/* ============================================================
   手动过白系统 — 全局视觉（端庄大气）
   ============================================================ */

:root {
    --wl-primary: #165dff;
    --wl-primary-soft: #e8f3ff;
    --wl-text: #1d2129;
    --wl-text-2: #4e5969;
    --wl-text-3: #86909c;
    --wl-border: #e5e6eb;
    --wl-bg: #eef1f6;
    --wl-card: #ffffff;
    --wl-radius: 8px;
    --wl-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
}

*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--wl-text);
    background: linear-gradient(160deg, #e8ecf4 0%, var(--wl-bg) 45%, #f4f6f9 100%);
    padding:
        max(16px, env(safe-area-inset-top))
        max(16px, env(safe-area-inset-right))
        max(16px, env(safe-area-inset-bottom))
        max(16px, env(safe-area-inset-left));
}

.page {
    display: flex;
    justify-content: center;
    align-items: stretch;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 20px 16px 0;
}

/* 居中窄版：过白工具不占满全屏；页脚贴底 */
.page-inner {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    min-height: calc(100vh - 40px);
    min-height: calc(100dvh - 40px);
    display: flex;
    flex-direction: column;
}

.main-wrapper {
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1 0 auto;
}

/* 宽屏才双栏，整体仍限制在 880px 内 */
@media (min-width: 900px) {
    .page-inner {
        max-width: 880px;
    }

    .main-wrapper {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 16px;
        align-items: start;
    }
}

/* 平板/手机单栏：尽量占满屏宽 */
@media (max-width: 899px) {
    body {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
        padding-top: max(10px, env(safe-area-inset-top));
        padding-bottom: max(10px, env(safe-area-inset-bottom));
    }

    .page {
        width: 100%;
        padding: 8px max(6px, env(safe-area-inset-left)) 0 max(6px, env(safe-area-inset-right));
    }

    .page-inner {
        width: 100%;
        max-width: none;
    }

    .main-wrapper {
        gap: 10px;
    }

    .panel-card .arco-card-body {
        padding: 16px 14px 18px !important;
    }
}

/* —— 卡片 —— */
.main-wrapper > .panel-card {
    min-width: 0;
    max-width: 100%;
}

.panel-card {
    border-radius: var(--wl-radius) !important;
    border: 1px solid var(--wl-border) !important;
    box-shadow: var(--wl-shadow) !important;
    overflow: hidden;
    min-width: 0;
    max-width: 100%;
}

.panel-card .arco-card-body {
    padding: 22px 22px 24px !important;
}

.panel-card.arco-card {
    width: 100%;
    max-width: 100%;
}

.panel-brand {
    text-align: center;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--wl-border);
}

.panel-brand.compact {
    padding-bottom: 14px;
    margin-bottom: 16px;
}

.panel-brand h2,
.panel-brand h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--wl-text);
    letter-spacing: 0.04em;
    line-height: 26px;
}

.panel-brand .panel-desc {
    margin: 8px 0 0;
    font-size: 13px;
    color: var(--wl-text-3);
    line-height: 22px;
    font-weight: 400;
}

.panel-brand .panel-node {
    display: inline-block;
    margin-top: 6px;
    padding: 2px 10px;
    font-size: 12px;
    color: var(--wl-primary);
    background: var(--wl-primary-soft);
    border-radius: 4px;
    font-weight: 500;
}

/* —— 提示条：Arco Alert 原生样式，仅微调间距 —— */
.wl-guide {
    margin-bottom: 16px;
    border-radius: var(--wl-radius);
}

.wl-guide .arco-alert-title {
    font-weight: 600;
    color: var(--wl-text);
}

.wl-guide .arco-alert-body {
    font-size: 13px;
    line-height: 22px;
    color: var(--wl-text-2);
}

.wl-guide .arco-alert-body strong {
    color: var(--wl-text);
    font-weight: 600;
}

/* —— 表单 —— */
.wl-form .arco-form-item-label {
    font-size: 13px !important;
    font-weight: 500 !important;
    color: var(--wl-text) !important;
}

.wl-form .arco-form-item {
    margin-bottom: 18px !important;
}

.wl-form {
    min-width: 0;
    max-width: 100%;
}

.field-hint {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    line-height: 20px;
    color: var(--wl-text-2);
}

.wl-form .arco-input-wrapper,
.wl-form .arco-select-view-single {
    border-radius: 6px !important;
    background: #fafbfc !important;
}

.wl-form .arco-input-wrapper:hover,
.wl-form .arco-select-view-single:hover {
    background: #fff !important;
}

.submit-btn {
    margin-top: 4px !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 44px !important;
    border-radius: 6px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    letter-spacing: 0.06em;
    box-shadow: 0 2px 8px rgba(22, 93, 255, 0.25);
}

.submit-btn.arco-btn-disabled {
    box-shadow: none;
}

/* —— 过白进度（与上游回执同结构） —— */
.receipt-progress {
    margin-top: 20px;
}

.receipt-progress-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

.receipt-progress-bar {
    flex: 1;
    min-width: 0;
    margin-top: 0;
}

.receipt-progress-bar .arco-progress-line-wrapper {
    background-color: #f2f3f5 !important;
}

.receipt-progress-bar .arco-progress-line-text,
.receipt-progress-bar .arco-progress-text {
    display: none !important;
}

.receipt-progress-pct {
    flex-shrink: 0;
    min-width: 42px;
    font-size: 13px;
    font-weight: 500;
    color: var(--wl-text-2);
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.progress-fade-enter-active,
.progress-fade-leave-active {
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.progress-fade-enter-from,
.progress-fade-leave-to {
    opacity: 0;
    transform: translateY(-8px);
}

/* —— 上游回执面板 —— */
.receipt-panel {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: var(--wl-radius);
    border: 1px solid var(--wl-border);
    background: #fff;
}

.receipt-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.receipt-head .receipt-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--wl-text-3);
}

.receipt-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--wl-text);
    line-height: 22px;
}

.receipt-msg {
    margin: 0;
    font-size: 13px;
    line-height: 22px;
    color: var(--wl-text-2);
    word-break: break-word;
}

.receipt-close {
    margin-left: auto;
    cursor: pointer;
    color: var(--wl-text-3);
    font-size: 14px;
    line-height: 1;
    padding: 4px;
    border: none;
    background: none;
}

.receipt-close:hover {
    color: var(--wl-text);
}

/* —— 右侧状态码列表 —— */
.code-ref-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.code-ref-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f2f3f5;
}

.code-ref-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.code-ref-item:first-child {
    padding-top: 0;
}

.code-ref-badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    min-height: 22px;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.code-ref-badge.is-success {
    color: #009a29;
    background: #e8ffea;
}

.code-ref-badge.is-error {
    color: #cb2634;
    background: #ffece8;
}

.code-ref-badge.is-warn {
    color: #d46b08;
    background: #fff7e8;
}

.code-ref-text {
    flex: 1;
    font-size: 13px;
    line-height: 22px;
    color: var(--wl-text-2);
}

/* —— 页脚（贴页面最底） —— */
.site-footer {
    margin-top: auto;
    flex-shrink: 0;
    width: 100%;
    padding: 20px 0 24px;
    border-top: 1px solid var(--wl-border);
    text-align: center;
}

.site-notices {
    margin: 0;
    padding: 0;
}

.site-notice {
    margin: 0 0 8px;
    font-size: 13px;
    line-height: 22px;
    color: var(--wl-text-2);
}

.site-notice:last-child {
    margin-bottom: 0;
}

.site-link {
    color: var(--wl-primary);
    font-weight: 600;
    text-decoration: none;
}

.site-link:hover {
    text-decoration: underline;
}

.site-copy {
    margin: 14px 0 0;
    padding-top: 14px;
    border-top: 1px solid var(--wl-border);
    font-size: 12px;
    color: var(--wl-text-3);
    line-height: 20px;
}

.site-copy strong,
.site-footer strong {
    color: var(--wl-text-2);
    font-weight: 500;
}

/* —— 移动端 —— */
@media (max-width: 575px) {
    .wl-form .arco-input,
    .wl-form .arco-select-view-input,
    .wl-form .arco-select-view-value {
        font-size: 16px !important;
    }
}

@media (hover: none) and (pointer: coarse) {
    .submit-btn { min-height: 48px !important; }
}
