/* =====================================================================
   页面级样式：图表、工作台、收银台、登录、落地页、文档
   ===================================================================== */

/* -------------------------------------------------------------- 图表 */
.chart {
    position: relative;
    width: 100%;
}

.chart svg {
    display: block;
    width: 100%;
    overflow: visible;
}

.chart--area {
    height: 260px;
}

.chart--area svg {
    height: 100%;
}

.chart-grid {
    stroke: var(--line);
    stroke-dasharray: 3 5;
}

.chart-axis {
    fill: var(--text-3);
    font-size: 10px;
    font-family: var(--font-mono);
}

.chart-area-fill {
    opacity: 0.85;
}

.chart-line {
    fill: none;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: var(--len, 2000);
    stroke-dashoffset: var(--len, 2000);
    animation: draw-line 1.1s var(--ease-out) forwards;
}

@keyframes draw-line {
    to { stroke-dashoffset: 0; }
}

.chart-dot {
    fill: var(--bg);
    stroke-width: 2;
    opacity: 0;
    transition: opacity 0.15s;
}

.chart-hover-line {
    stroke: var(--line-strong);
    stroke-dasharray: 3 3;
    opacity: 0;
}

.chart-tooltip {
    position: absolute;
    z-index: 5;
    min-width: 132px;
    padding: 9px 11px;
    border-radius: 10px;
    border: 1px solid var(--line-strong);
    background: var(--panel-solid);
    box-shadow: var(--shadow-md);
    font-size: 11.5px;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, -110%);
    transition: opacity 0.12s;
}

.chart-tooltip.is-visible {
    opacity: 1;
}

.chart-tooltip strong {
    display: block;
    font-size: 12px;
    margin-bottom: 3px;
}

.chart-tooltip .tt-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--text-2);
    font-variant-numeric: tabular-nums;
}

.chart-legend {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 11.5px;
    color: var(--text-2);
}

.legend-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 2px;
    margin-right: 5px;
    vertical-align: 1px;
}

.chart--donut {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
}

.donut-wrap {
    position: relative;
    width: 152px;
    height: 152px;
    flex: 0 0 auto;
}

.donut-wrap svg {
    transform: rotate(-90deg);
}

.donut-arc {
    fill: none;
    stroke-width: 13;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s var(--ease-out);
}

.donut-center {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    text-align: center;
}

.donut-center strong {
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

.donut-center span {
    font-size: 10.5px;
    color: var(--text-3);
}

.donut-legend {
    flex: 1;
    min-width: 160px;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.donut-legend-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.donut-legend-row .lg-name {
    flex: 1;
    color: var(--text-2);
}

.donut-legend-row .lg-value {
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--text);
}

.donut-legend-row .lg-pct {
    width: 42px;
    text-align: right;
    font-size: 11px;
    color: var(--text-3);
    font-variant-numeric: tabular-nums;
}

.bars {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bar-row {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr) 78px;
    align-items: center;
    gap: 10px;
    font-size: 12px;
}

.bar-label {
    color: var(--text-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bar-track {
    height: 8px;
    border-radius: 99px;
    background: rgba(148, 163, 184, 0.13);
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 99px;
    background: var(--grad-brand);
    transform-origin: left;
    transform: scaleX(0);
    transition: transform 0.9s var(--ease-out);
}

.bar-row.is-visible .bar-fill {
    transform: scaleX(1);
}

.bar-value {
    text-align: right;
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--text-2);
    font-variant-numeric: tabular-nums;
}

.ring {
    display: grid;
    place-items: center;
    position: relative;
    width: 84px;
    height: 84px;
}

.ring svg {
    transform: rotate(-90deg);
}

.ring-track {
    fill: none;
    stroke: rgba(148, 163, 184, 0.16);
    stroke-width: 7;
}

.ring-value {
    fill: none;
    stroke: var(--brand);
    stroke-width: 7;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s var(--ease-out);
}

.ring-text {
    position: absolute;
    font-size: 15px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
}

/* 迷你趋势 */
.spark-line {
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.9;
}

.spark-fill {
    opacity: 0.35;
}

/* -------------------------------------------------------------- 看板 */
.hero-strip {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 26px;
    padding: 24px 26px;
    border-radius: var(--radius-xl);
    border: 1px solid rgba(34, 211, 238, 0.18);
    background:
        radial-gradient(120% 160% at 0% 0%, rgba(34, 211, 238, 0.16), transparent 55%),
        radial-gradient(100% 140% at 100% 100%, rgba(129, 140, 248, 0.16), transparent 60%),
        var(--panel);
    overflow: hidden;
}

.hero-strip::after {
    content: "";
    position: absolute;
    right: -80px;
    top: -120px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    border: 1px solid rgba(34, 211, 238, 0.14);
    box-shadow: 0 0 0 40px rgba(34, 211, 238, 0.03), 0 0 0 90px rgba(129, 140, 248, 0.02);
    pointer-events: none;
}

.hero-strip h2 {
    font-size: clamp(20px, 2.6vw, 26px);
    letter-spacing: -0.03em;
}

.hero-strip p {
    margin-top: 6px;
    font-size: 12.5px;
    color: var(--text-2);
    max-width: 540px;
}

.hero-actions {
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
    gap: 10px;
}

.quick-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 13px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(148, 163, 184, 0.045);
    font-size: 12.5px;
    color: var(--text-2);
    transition: background 0.18s, border-color 0.18s, transform 0.18s, color 0.18s;
}

.quick-link:hover {
    background: rgba(34, 211, 238, 0.08);
    border-color: rgba(34, 211, 238, 0.24);
    color: var(--text);
    transform: translateY(-2px);
}

.quick-link svg {
    color: var(--brand);
    flex: 0 0 auto;
}

.dash-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.kpi-inline {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.kpi-inline-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.kpi-inline-item span {
    font-size: 11px;
    color: var(--text-3);
}

.kpi-inline-item strong {
    font-size: 16px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

/* 通道健康 */
.gateway-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px dashed var(--line);
}

.gateway-row:last-child {
    border-bottom: 0;
}

.gateway-logo {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    border: 1px solid var(--line);
    background: rgba(148, 163, 184, 0.06);
    flex: 0 0 auto;
}

.gateway-logo--alipay { color: #38bdf8; background: rgba(56, 189, 248, 0.1); border-color: rgba(56, 189, 248, 0.2); }
.gateway-logo--wxpay { color: #34d399; background: rgba(52, 211, 153, 0.1); border-color: rgba(52, 211, 153, 0.2); }
.gateway-logo--unionpay { color: #f472b6; background: rgba(244, 114, 182, 0.1); border-color: rgba(244, 114, 182, 0.2); }

.gateway-meta {
    min-width: 0;
    flex: 1;
}

.gateway-name {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    font-weight: 600;
}

.gateway-sub {
    font-size: 11px;
    color: var(--text-3);
    margin-top: 1px;
}

.health-bar {
    width: 84px;
    flex: 0 0 auto;
}

.health-bar .progress {
    height: 4px;
    margin-top: 5px;
}

.health-score {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-2);
    text-align: right;
}

/* 订单详情 */
.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 16px;
    align-items: start;
}

.amount-hero {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 34px;
    font-weight: 750;
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.amount-hero small {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-3);
    letter-spacing: 0;
}

.order-status-line {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* 通道卡 */
.gateway-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 14px;
}

.gateway-card {
    padding: 18px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: var(--panel);
    transition: transform 0.22s var(--ease), border-color 0.22s;
}

.gateway-card:hover {
    transform: translateY(-2px);
    border-color: rgba(34, 211, 238, 0.22);
}

.gateway-card-head {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-bottom: 14px;
}

.gateway-card h4 {
    font-size: 13.5px;
}

.gateway-card .driver-tag {
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: var(--text-3);
}

.gateway-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 11px 0;
    border-top: 1px dashed var(--line);
    border-bottom: 1px dashed var(--line);
}

.gateway-metrics div {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.gateway-metrics span {
    font-size: 10px;
    color: var(--text-3);
}

.gateway-metrics strong {
    font-size: 13px;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
}

.gateway-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 13px;
}

/* 配置分组 */
.settings-grid {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.settings-nav {
    position: sticky;
    top: calc(var(--topbar-h) + 20px);
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 8px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--panel);
}

.settings-nav a {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 11px;
    border-radius: 9px;
    font-size: 12.5px;
    color: var(--text-2);
    transition: background 0.15s, color 0.15s;
}

.settings-nav a:hover {
    background: rgba(148, 163, 184, 0.08);
    color: var(--text);
}

.settings-nav a.is-active {
    background: var(--brand-soft);
    color: var(--brand);
}

/* 代码 / 文档 */
.docs-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.docs-nav {
    position: sticky;
    top: 96px;
    font-size: 12.5px;
}

.docs-nav strong {
    display: block;
    font-size: 10.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-3);
    margin: 16px 0 7px;
}

.docs-nav a {
    display: block;
    padding: 5px 0;
    color: var(--text-2);
    transition: color 0.15s;
}

.docs-nav a:hover {
    color: var(--brand);
}

.doc-section {
    padding: 24px 0;
    border-bottom: 1px solid var(--line);
    scroll-margin-top: 96px;
}

.doc-section:last-child {
    border-bottom: 0;
}

.doc-section h2 {
    font-size: 20px;
    margin-bottom: 10px;
    letter-spacing: -0.02em;
}

.doc-section h3 {
    font-size: 14px;
    margin: 22px 0 8px;
}

.doc-section p {
    font-size: 13px;
    color: var(--text-2);
    line-height: 1.8;
    margin-bottom: 10px;
}

.doc-section ul {
    margin: 8px 0 14px;
    padding-left: 18px;
    list-style: disc;
    color: var(--text-2);
    font-size: 13px;
    line-height: 1.9;
}

.doc-section table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
    margin: 12px 0;
}

.doc-section th,
.doc-section td {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

.doc-section th {
    color: var(--text-3);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.doc-section code {
    padding: 1px 5px;
    border-radius: 5px;
    background: rgba(148, 163, 184, 0.12);
    font-size: 11.5px;
    color: var(--brand);
}

/* -------------------------------------------------------------- 登录 */
.auth-body {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    background: var(--bg);
}

.auth-visual {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 40px;
    padding: clamp(32px, 5vw, 64px);
    border-right: 1px solid var(--line);
    overflow: hidden;
    background:
        radial-gradient(90% 70% at 10% 0%, rgba(34, 211, 238, 0.16), transparent 60%),
        radial-gradient(80% 70% at 90% 100%, rgba(129, 140, 248, 0.18), transparent 60%);
}

.auth-visual::after {
    content: "";
    position: absolute;
    right: -160px;
    bottom: -160px;
    width: 460px;
    height: 460px;
    border-radius: 50%;
    border: 1px solid rgba(34, 211, 238, 0.12);
    box-shadow: 0 0 0 60px rgba(34, 211, 238, 0.025), 0 0 0 130px rgba(129, 140, 248, 0.02);
    pointer-events: none;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    font-weight: 700;
}

.auth-copy {
    position: relative;
    max-width: 460px;
}

.auth-copy h2 {
    font-size: clamp(28px, 3.4vw, 40px);
    letter-spacing: -0.04em;
    line-height: 1.16;
}

.auth-copy p {
    margin-top: 14px;
    font-size: 13.5px;
    line-height: 1.85;
    color: var(--text-2);
}

.auth-points {
    display: flex;
    flex-direction: column;
    gap: 11px;
    margin-top: 26px;
}

.auth-point {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12.5px;
    color: var(--text-2);
}

.auth-point i {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 7px;
    background: rgba(34, 211, 238, 0.12);
    color: var(--brand);
    font-style: normal;
}

.auth-metrics {
    display: flex;
    gap: 34px;
    flex-wrap: wrap;
}

.auth-metrics div span {
    display: block;
    font-size: 10.5px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-3);
}

.auth-metrics div strong {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

.auth-panel {
    display: grid;
    place-items: center;
    padding: 40px clamp(20px, 4vw, 56px);
}

.auth-card {
    width: min(410px, 100%);
}

.auth-card h1 {
    font-size: 25px;
    letter-spacing: -0.03em;
}

.auth-sub {
    margin-top: 7px;
    font-size: 13px;
    color: var(--text-2);
    line-height: 1.7;
}

.auth-form {
    margin-top: 26px;
}

.auth-form .input {
    height: 46px;
    border-radius: 12px;
}

.auth-form .btn {
    height: 46px;
    border-radius: 12px;
    font-size: 14px;
}

.auth-captcha {
    display: flex;
    gap: 9px;
    align-items: stretch;
}

.auth-captcha .input {
    flex: 1;
}

.captcha-img {
    width: 132px;
    height: 46px;
    border-radius: 11px;
    border: 1px solid var(--line-strong);
    overflow: hidden;
    cursor: pointer;
    flex: 0 0 auto;
    background: #0b1220;
}

.captcha-img svg {
    width: 100%;
    height: 100%;
}

.auth-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 16px;
    font-size: 12px;
    color: var(--text-3);
    flex-wrap: wrap;
}

.auth-meta a {
    color: var(--text-2);
}

.auth-meta a:hover {
    color: var(--brand);
}

.auth-switch {
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    font-size: 12px;
    color: var(--text-3);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.auth-switch a {
    color: var(--brand);
    font-weight: 600;
}

.demo-hint {
    margin-top: 18px;
    padding: 11px 13px;
    border-radius: 11px;
    border: 1px dashed rgba(34, 211, 238, 0.25);
    background: rgba(34, 211, 238, 0.05);
    font-size: 11.5px;
    color: var(--text-2);
    line-height: 1.7;
}

.demo-hint code {
    color: var(--brand);
    font-family: var(--font-mono);
}

[data-theme="light"] .auth-visual {
    background:
        radial-gradient(90% 70% at 10% 0%, rgba(6, 182, 212, 0.14), transparent 60%),
        radial-gradient(80% 70% at 90% 100%, rgba(99, 102, 241, 0.14), transparent 60%);
}

/* -------------------------------------------------------------- 收银台 */
.cashier-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px 16px 48px;
}

.cashier-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 26px;
    font-size: 13px;
    font-weight: 650;
    color: var(--text-2);
}

.cashier-card {
    width: min(460px, 100%);
    padding: 26px;
    border-radius: 26px;
    border: 1px solid var(--line-strong);
    background:
        radial-gradient(100% 80% at 50% 0%, rgba(34, 211, 238, 0.1), transparent 60%),
        var(--panel-solid);
    box-shadow: var(--shadow-lg);
    animation: rise 0.55s var(--ease-out) both;
}

.cashier-head {
    text-align: center;
    padding-bottom: 18px;
    border-bottom: 1px dashed var(--line);
}

.pay-amount {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 5px;
    font-size: clamp(38px, 9vw, 48px);
    font-weight: 800;
    letter-spacing: -0.05em;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    background: var(--grad-brand);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.pay-amount small {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-3);
    -webkit-text-fill-color: var(--text-3);
}

.cashier-subject {
    margin-top: 8px;
    font-size: 12.5px;
    color: var(--text-2);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cashier-no {
    margin-top: 4px;
    font-size: 10.5px;
    color: var(--text-3);
    font-family: var(--font-mono);
}

.pay-methods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 9px;
    margin-top: 18px;
}

.method-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 6px;
    border-radius: 13px;
    border: 1px solid var(--line);
    background: rgba(148, 163, 184, 0.04);
    color: var(--text-2);
    font-size: 11.5px;
    transition: border-color 0.18s, background 0.18s, transform 0.18s;
}

.method-card svg {
    width: 24px;
    height: 24px;
}

.method-card:hover {
    border-color: var(--line-strong);
    transform: translateY(-1px);
}

.method-card.is-active {
    border-color: rgba(34, 211, 238, 0.45);
    background: rgba(34, 211, 238, 0.08);
    color: var(--text);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.07);
}

.method-card--alipay svg { color: #38bdf8; }
.method-card--wxpay svg { color: #34d399; }
.method-card--unionpay svg { color: #f472b6; }

.qr-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 22px 0 6px;
}

.qr-box {
    position: relative;
    width: 214px;
    height: 214px;
    padding: 11px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 20px 50px -20px rgba(34, 211, 238, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.qr-box svg,
.qr-box canvas,
.qr-box img {
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

.qr-scan {
    position: absolute;
    left: 9%;
    right: 9%;
    height: 2px;
    top: 14%;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent, #06b6d4, transparent);
    box-shadow: 0 0 14px rgba(6, 182, 212, 0.9);
    animation: qr-scan 2.6s var(--ease) infinite;
}

@keyframes qr-scan {
    0%, 100% { transform: translateY(0); opacity: 0.2; }
    45% { transform: translateY(158px); opacity: 1; }
    55% { transform: translateY(158px); opacity: 1; }
}

.qr-tip {
    margin-top: 13px;
    font-size: 11.5px;
    color: var(--text-3);
    display: flex;
    align-items: center;
    gap: 6px;
    text-align: center;
}

.pay-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 16px;
    padding: 9px;
    border-radius: 10px;
    background: rgba(148, 163, 184, 0.07);
    font-size: 12px;
    color: var(--text-2);
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--brand);
    box-shadow: 0 0 9px var(--brand);
    animation: status-pulse 1.6s ease-in-out infinite;
}

@keyframes status-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.45; transform: scale(0.85); }
}

.pay-countdown {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
    font-size: 11.5px;
    color: var(--text-3);
    font-variant-numeric: tabular-nums;
}

.pay-countdown strong {
    color: var(--amber);
    font-family: var(--font-mono);
    font-weight: 600;
}

.cashier-foot {
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    font-size: 10.5px;
    color: var(--text-3);
    flex-wrap: wrap;
}

.cashier-foot span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.success-wrap {
    text-align: center;
    padding: 14px 0 6px;
}

.success-mark {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(52, 211, 153, 0.22), rgba(52, 211, 153, 0.04));
    border: 1px solid rgba(52, 211, 153, 0.35);
    color: var(--mint);
    animation: pop 0.55s var(--ease-spring) both;
}

.success-mark svg {
    width: 34px;
    height: 34px;
    stroke-dasharray: 40;
    stroke-dashoffset: 40;
    animation: draw-check 0.6s 0.25s var(--ease-out) forwards;
}

@keyframes draw-check {
    to { stroke-dashoffset: 0; }
}

@keyframes pop {
    from { opacity: 0; transform: scale(0.7); }
    to { opacity: 1; transform: scale(1); }
}

.success-wrap h2 {
    font-size: 21px;
    letter-spacing: -0.02em;
}

.success-amount {
    margin: 8px 0 18px;
    font-size: 30px;
    font-weight: 750;
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
}

.cashier-error {
    text-align: center;
    padding: 10px 0 4px;
}

.cashier-error .err-mark {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: rgba(251, 113, 133, 0.12);
    border: 1px solid rgba(251, 113, 133, 0.3);
    color: var(--rose);
}

/* -------------------------------------------------------------- 落地页 */
.landing {
    position: relative;
    overflow: hidden;
}

.landing-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 18px;
    height: 70px;
    padding: 0 clamp(18px, 4vw, 48px);
    background: rgba(5, 7, 15, 0.55);
    border-bottom: 1px solid transparent;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition: border-color 0.25s, background 0.25s;
}

.landing-nav.is-scrolled {
    border-color: var(--line);
    background: rgba(5, 7, 15, 0.78);
}

[data-theme="light"] .landing-nav {
    background: rgba(243, 246, 252, 0.7);
}

[data-theme="light"] .landing-nav.is-scrolled {
    background: rgba(255, 255, 255, 0.86);
}

.landing-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 700;
}

.landing-nav-links {
    display: flex;
    align-items: center;
    gap: 26px;
    margin-left: 30px;
    font-size: 13px;
    color: var(--text-2);
}

.landing-nav-links a {
    transition: color 0.18s;
}

.landing-nav-links a:hover {
    color: var(--text);
}

.landing-nav-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 9px;
}

.hero {
    position: relative;
    max-width: 1160px;
    margin: 0 auto;
    padding: clamp(120px, 15vw, 168px) 22px 40px;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 30px;
    padding: 0 12px;
    border-radius: 99px;
    border: 1px solid rgba(34, 211, 238, 0.24);
    background: rgba(34, 211, 238, 0.06);
    font-size: 11.5px;
    color: var(--brand);
    margin-bottom: 22px;
}

.hero-badge .dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--brand);
    box-shadow: 0 0 10px var(--brand);
    animation: status-pulse 2s infinite;
}

.hero h1 {
    font-size: clamp(38px, 6.2vw, 74px);
    line-height: 1.06;
    letter-spacing: -0.055em;
    font-weight: 750;
    margin: 0 auto;
    max-width: 940px;
}

.gradient-text {
    background: var(--grad-brand);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-desc {
    max-width: 620px;
    margin: 22px auto 0;
    font-size: clamp(13px, 1.5vw, 15px);
    line-height: 1.9;
    color: var(--text-2);
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(20px, 5vw, 58px);
    margin-top: 46px;
    flex-wrap: wrap;
}

.hero-stat {
    text-align: center;
}

.hero-stat strong {
    display: block;
    font-size: 23px;
    font-weight: 750;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

.hero-stat span {
    font-size: 11px;
    color: var(--text-3);
    letter-spacing: 0.06em;
}

.hero-preview {
    position: relative;
    max-width: 1040px;
    margin: 58px auto 0;
    border-radius: 22px;
    border: 1px solid var(--line-strong);
    background: rgba(9, 14, 26, 0.8);
    box-shadow: 0 50px 120px -40px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(34, 211, 238, 0.06);
    overflow: hidden;
    text-align: left;
}

[data-theme="light"] .hero-preview {
    background: rgba(255, 255, 255, 0.9);
}

.preview-bar {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 11px 15px;
    border-bottom: 1px solid var(--line);
    background: rgba(148, 163, 184, 0.05);
}

.preview-bar i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.3);
}

.preview-bar i:nth-child(1) { background: #fb7185; }
.preview-bar i:nth-child(2) { background: #fbbf24; }
.preview-bar i:nth-child(3) { background: #34d399; }

.preview-bar span {
    margin-left: 8px;
    font-size: 10.5px;
    color: var(--text-3);
    font-family: var(--font-mono);
}

.preview-body {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    min-height: 330px;
}

.preview-side {
    padding: 16px 12px;
    border-right: 1px solid var(--line);
    background: rgba(148, 163, 184, 0.03);
}

.preview-side-item {
    height: 30px;
    border-radius: 8px;
    margin-bottom: 7px;
    background: rgba(148, 163, 184, 0.08);
}

.preview-side-item.is-active {
    background: linear-gradient(90deg, rgba(34, 211, 238, 0.22), rgba(129, 140, 248, 0.06));
}

.preview-main {
    padding: 18px;
}

.preview-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.preview-card {
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(148, 163, 184, 0.04);
}

.preview-card span {
    display: block;
    height: 7px;
    width: 42%;
    border-radius: 4px;
    background: rgba(148, 163, 184, 0.18);
}

.preview-card strong {
    display: block;
    margin-top: 9px;
    height: 13px;
    width: 68%;
    border-radius: 5px;
    background: linear-gradient(90deg, rgba(34, 211, 238, 0.5), rgba(129, 140, 248, 0.3));
}

.preview-chart {
    display: flex;
    align-items: flex-end;
    gap: 7px;
    height: 150px;
    margin-top: 16px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(148, 163, 184, 0.03);
}

.preview-chart i {
    flex: 1;
    border-radius: 5px 5px 2px 2px;
    background: linear-gradient(180deg, rgba(34, 211, 238, 0.65), rgba(34, 211, 238, 0.06));
    animation: bar-grow 1.2s var(--ease-out) both;
    transform-origin: bottom;
}

@keyframes bar-grow {
    from { transform: scaleY(0); }
    to { transform: scaleY(1); }
}

.landing-section {
    max-width: 1160px;
    margin: 0 auto;
    padding: 84px 22px;
}

.landing-section-head {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 42px;
}

.landing-section-head .eyebrow {
    margin-bottom: 12px;
}

.landing-section-head h2 {
    font-size: clamp(26px, 3.6vw, 38px);
    letter-spacing: -0.04em;
    line-height: 1.2;
}

.landing-section-head p {
    margin-top: 12px;
    font-size: 13.5px;
    color: var(--text-2);
    line-height: 1.85;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 14px;
}

.feature-card {
    padding: 22px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: var(--panel);
    transition: transform 0.25s var(--ease), border-color 0.25s, background 0.25s;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(34, 211, 238, 0.24);
}

.feature-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--grad-brand-soft);
    border: 1px solid rgba(34, 211, 238, 0.16);
    color: var(--brand);
    margin-bottom: 14px;
}

.feature-card h3 {
    font-size: 14.5px;
    margin-bottom: 7px;
}

.feature-card p {
    font-size: 12.5px;
    color: var(--text-3);
    line-height: 1.8;
}

.flow {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
}

.flow-step {
    position: relative;
    padding: 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: var(--panel);
}

.flow-step .step-no {
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: rgba(34, 211, 238, 0.1);
    color: var(--brand);
    font-family: var(--font-mono);
    font-size: 11px;
    margin-bottom: 12px;
}

.flow-step h4 {
    font-size: 13px;
    margin-bottom: 5px;
}

.flow-step p {
    font-size: 11.5px;
    color: var(--text-3);
    line-height: 1.7;
}

.cta-panel {
    position: relative;
    text-align: center;
    padding: clamp(38px, 6vw, 64px) 24px;
    border-radius: 26px;
    border: 1px solid rgba(34, 211, 238, 0.2);
    background:
        radial-gradient(80% 120% at 20% 0%, rgba(34, 211, 238, 0.16), transparent 60%),
        radial-gradient(80% 120% at 80% 100%, rgba(129, 140, 248, 0.16), transparent 60%),
        var(--panel);
    overflow: hidden;
}

.cta-panel h2 {
    font-size: clamp(24px, 3.4vw, 34px);
    letter-spacing: -0.04em;
}

.cta-panel p {
    margin: 12px auto 24px;
    max-width: 520px;
    font-size: 13px;
    color: var(--text-2);
    line-height: 1.8;
}

.landing-footer {
    max-width: 1160px;
    margin: 0 auto;
    padding: 36px 22px 46px;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    font-size: 11.5px;
    color: var(--text-3);
}

.landing-footer-links {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.landing-footer a:hover {
    color: var(--text-2);
}

/* 文档页 */
.docs-page {
    min-height: 100vh;
}

.docs-hero {
    max-width: 1160px;
    margin: 0 auto;
    padding: 110px 22px 30px;
}

.docs-hero h1 {
    font-size: clamp(28px, 4vw, 42px);
    letter-spacing: -0.04em;
}

.docs-hero p {
    margin-top: 10px;
    color: var(--text-2);
    font-size: 13.5px;
}

.docs-container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 20px 22px 80px;
}

/* -------------------------------------------------------------- 主题图标 / 安装向导 */
.theme-icon {
    display: grid;
    place-items: center;
}

[data-theme="dark"] .theme-icon--sun { display: none; }
[data-theme="light"] .theme-icon--moon { display: none; }

.auth-card--wide {
    width: min(620px, 100%);
}

.auth-card--wide .auth-form {
    margin-top: 20px;
}

.auth-card h1 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.install-section {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px dashed var(--line);
}

.install-section h4 {
    font-size: 12.5px;
    margin-bottom: 10px;
    color: var(--text-2);
    display: flex;
    align-items: center;
    gap: 6px;
}

.install-section h4::before {
    content: "";
    width: 3px;
    height: 12px;
    border-radius: 2px;
    background: var(--grad-brand);
}

.req-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 8px;
}

.req-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 9px;
    border-radius: 8px;
    background: rgba(148, 163, 184, 0.05);
    font-size: 11.5px;
    color: var(--text-2);
}

.req-row code {
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: var(--text-3);
}

.req-row .ok { color: var(--mint); }
.req-row .bad { color: var(--rose); }

.docs-page .landing-nav {
    position: fixed;
}

/* -------------------------------------------------------------- 响应式 */
@media (max-width: 1024px) {
    .dash-grid,
    .detail-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .settings-grid,
    .docs-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .settings-nav,
    .docs-nav {
        position: static;
        flex-direction: row;
        overflow-x: auto;
        padding: 6px;
    }

    .settings-nav a {
        white-space: nowrap;
    }

    .docs-nav {
        display: none;
    }

    .auth-body {
        grid-template-columns: minmax(0, 1fr);
    }

    .auth-visual {
        display: none;
    }
}

@media (max-width: 760px) {
    .hero {
        padding-top: 110px;
    }

    .hero-strip {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
    }

    .hero-strip h2 {
        font-size: 22px;
    }

    .hero-actions {
        width: 100%;
    }

    .hero-actions .btn {
        flex: 1 1 auto;
        justify-content: center;
    }

    .landing-nav-links {
        display: none;
    }

    .hero-stats {
        gap: 24px;
    }

    .hero-preview {
        margin-top: 36px;
    }

    .preview-body {
        grid-template-columns: 60px minmax(0, 1fr);
        min-height: 240px;
    }

    .preview-side-item {
        height: 22px;
    }

    .landing-section {
        padding: 56px 18px;
    }

    .cashier-card {
        padding: 22px 18px;
    }

    .qr-box {
        width: 190px;
        height: 190px;
    }

    @keyframes qr-scan {
        0%, 100% { transform: translateY(0); opacity: 0.2; }
        45% { transform: translateY(136px); opacity: 1; }
        55% { transform: translateY(136px); opacity: 1; }
    }

    .bar-row {
        grid-template-columns: 78px minmax(0, 1fr) 66px;
    }

    .amount-hero {
        font-size: 27px;
    }
}
