:root {
    --ink: #1b2823;
    --ink-soft: #405149;
    --muted: #718078;
    --canvas: #f3f6f2;
    --surface: #ffffff;
    --surface-soft: #f7f9f6;
    --line: #e0e8e1;
    --line-strong: #cad7ce;
    --nav: #162521;
    --nav-soft: #223831;
    --nav-muted: #9aaba3;
    --accent: #4f8b77;
    --accent-dark: #3c705f;
    --accent-pale: #e7f1eb;
    --coral: #dd725d;
    --coral-pale: #fff0ec;
    --amber: #b77d24;
    --amber-pale: #fff7e6;
    --green: #31805e;
    --green-pale: #eaf6ef;
    --red: #b95150;
    --red-pale: #fff0f0;
    --shadow-sm: 0 3px 12px rgba(25, 47, 38, .06);
    --shadow-md: 0 18px 50px rgba(25, 47, 38, .1);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background: var(--canvas);
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { min-width: 320px; min-height: 100vh; margin: 0; color: var(--ink); background: var(--canvas); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .58; }
::selection { color: #fff; background: var(--accent); }

.app-shell { display: flex; min-height: 100vh; }
.sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    width: 256px;
    min-height: 100vh;
    flex: 0 0 256px;
    flex-direction: column;
    padding: 28px 16px 20px;
    color: #fff;
    background: var(--nav);
}
.brand-lockup { display: block; padding: 0 12px 30px; }
.brand-name { color: #fff; font-size: 20px; line-height: 1.15; font-weight: 780; letter-spacing: 0; }
.brand-name span { color: #b4db80; }
.brand-caption { margin-top: 8px; color: #81958b; font-size: 9px; font-weight: 650; letter-spacing: 1.5px; text-transform: uppercase; }
.side-role {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 8px 28px;
    padding: 11px 13px;
    border: 1px solid #315047;
    border-radius: 8px;
    color: #d0ded7;
    background: #1e332c;
    font-size: 12px;
    font-weight: 650;
}
.side-role::before { width: 7px; height: 7px; border-radius: 50%; background: #b5db80; content: ""; }
.side-section { margin: 0 8px 23px; }
.side-section-title { padding: 0 11px 9px; color: #779087; font-size: 10px; font-weight: 700; letter-spacing: 1px; }
.side-nav { display: grid; gap: 4px; }
.side-nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 42px;
    padding: 0 11px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--nav-muted);
    font-size: 13px;
    font-weight: 560;
    transition: color .16s ease, background .16s ease, border-color .16s ease;
}
.side-nav a:hover { color: #fff; background: var(--nav-soft); }
.side-nav a.active { border-color: #3b6154; color: #fff; background: #2a4c40; }
.nav-mark {
    display: inline-grid;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    place-items: center;
    border-radius: 6px;
    color: #92a69d;
    background: rgba(255, 255, 255, .06);
    font-size: 12px;
    line-height: 1;
    text-align: center;
}
.side-nav a.active .nav-mark { color: #d9efbe; background: rgba(181, 219, 128, .16); }
.side-footer { margin-top: auto; padding: 17px 8px 0; border-top: 1px solid #2a4038; }
.side-footer a, .side-footer button { color: #afc0b8; font-size: 12px; }
.side-footer a { display: block; padding: 9px 11px; }
.logout-form { margin: 5px 0 0; }
.logout-button { width: 100%; padding: 9px 11px; border: 0; border-radius: 8px; color: #afc0b8; background: transparent; text-align: left; }
.logout-button:hover { color: #fff; background: var(--nav-soft); }

.main-area { min-width: 0; flex: 1; }
.topbar {
    display: flex;
    min-height: 76px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 0 clamp(20px, 4vw, 56px);
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, .9);
}
.topbar-left { display: flex; min-width: 0; align-items: center; gap: 13px; }
.mobile-menu {
    display: none;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: var(--surface);
    font-size: 18px;
}
.topbar-title { overflow: hidden; color: var(--ink); font-size: 15px; font-weight: 720; white-space: nowrap; text-overflow: ellipsis; }
.topbar-right { display: flex; align-items: center; gap: 18px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.user-chip { display: flex; align-items: center; gap: 9px; color: var(--ink); font-weight: 650; }
.avatar { display: grid; width: 32px; height: 32px; flex: 0 0 32px; place-items: center; border-radius: 10px; color: #fff; background: var(--accent); font-size: 12px; font-weight: 750; }
.content { width: min(1440px, 100%); margin: 0 auto; padding: 40px clamp(20px, 4vw, 56px) 72px; }
.page-heading { margin-bottom: 28px; }
.page-heading h1 { margin: 0; color: var(--ink); font-size: 30px; line-height: 1.2; font-weight: 770; letter-spacing: 0; }
.page-heading p { max-width: 720px; margin: 9px 0 0; color: var(--muted); font-size: 13px; line-height: 1.75; }
.page-heading-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }

.flash {
    position: relative;
    margin-bottom: 24px;
    padding: 13px 16px 13px 43px;
    border: 1px solid #cfe2d6;
    border-radius: 8px;
    color: #35634e;
    background: var(--green-pale);
    font-size: 13px;
    line-height: 1.6;
}
.flash::before { position: absolute; top: 17px; left: 18px; width: 9px; height: 9px; border-radius: 50%; background: currentColor; content: ""; }
.flash.info { border-color: #cfe0da; color: #3d6f60; background: var(--accent-pale); }
.flash.error { border-color: #efd0cf; color: #a14948; background: var(--red-pale); }
.flash.error::before { background: var(--red); }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.metric-card {
    position: relative;
    min-height: 128px;
    padding: 20px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}
.metric-card::after { position: absolute; right: -22px; bottom: -24px; width: 74px; height: 74px; border: 1px solid var(--accent-pale); border-radius: 50%; content: ""; }
.metric-label { color: var(--muted); font-size: 12px; font-weight: 600; }
.metric-value { margin-top: 14px; color: var(--ink); font-size: 30px; line-height: 1; font-weight: 780; }
.metric-note { margin-top: 11px; color: #93a099; font-size: 11px; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .75fr); gap: 18px; align-items: start; }
.card {
    margin-bottom: 18px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}
.card:last-child { margin-bottom: 0; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.card-head h2, .card > h2 { margin: 0; color: var(--ink); font-size: 17px; line-height: 1.35; font-weight: 740; }
.card-head p { max-width: 650px; margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.card > p { color: var(--muted); font-size: 13px; line-height: 1.8; }
.card-kicker { padding: 5px 8px; border-radius: 5px; color: var(--accent-dark); background: var(--accent-pale); font-size: 10px; font-weight: 750; letter-spacing: .7px; text-transform: uppercase; white-space: nowrap; }
.empty-state { padding: 36px 14px; color: var(--muted); text-align: center; font-size: 13px; }

.button, button.button {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
    border: 1px solid var(--accent);
    border-radius: 8px;
    color: #fff;
    background: var(--accent);
    box-shadow: 0 4px 12px rgba(79, 139, 119, .16);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.button:hover { border-color: var(--accent-dark); background: var(--accent-dark); box-shadow: 0 7px 16px rgba(79, 139, 119, .2); transform: translateY(-1px); }
.button.secondary, button.button.secondary { border-color: var(--line-strong); color: var(--ink-soft); background: var(--surface); box-shadow: none; }
.button.secondary:hover { border-color: var(--accent); color: var(--accent-dark); background: var(--accent-pale); box-shadow: none; }
.button.danger, button.button.danger { border-color: #e8bdbb; color: var(--red); background: #fff; box-shadow: none; }
.button.danger:hover { border-color: var(--red); background: var(--red-pale); box-shadow: none; }
.button.small, button.button.small { min-height: 34px; padding: 0 12px; font-size: 12px; }
.button-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.link-button { padding: 0; border: 0; color: var(--accent-dark); background: transparent; font-size: 13px; font-weight: 650; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.form-grid.one { grid-template-columns: 1fr; }
.field { display: block; min-width: 0; margin-bottom: 17px; }
.field > span, .field-label { display: block; margin-bottom: 8px; color: var(--ink-soft); font-size: 12px; font-weight: 700; }
input[type="text"], input[type="password"], input[type="email"], input[type="number"], input[type="date"], input:not([type]), select, textarea {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    outline: 0;
    color: var(--ink);
    background: var(--surface);
    font-size: 13px;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
input::placeholder, textarea::placeholder { color: #a2aea7; }
textarea { min-height: 100px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); background: #fcfefc; box-shadow: 0 0 0 4px rgba(79, 139, 119, .12); }
.field-hint { display: block; margin-top: 7px; color: #8b9991; font-size: 11px; line-height: 1.55; font-weight: 400; }
.section-label { grid-column: 1 / -1; margin: 9px 0 17px; padding-top: 21px; border-top: 1px solid var(--line); color: var(--ink); font-size: 13px; font-weight: 750; }
.section-label:first-child { padding-top: 0; border-top: 0; }
.check-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.check-item { display: flex; min-height: 42px; align-items: center; gap: 9px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink-soft); background: var(--surface-soft); font-size: 13px; font-weight: 600; }
.check-item input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.inline-form { margin: 0; }

.key-box { padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); }
.key-line { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0 0 13px; color: var(--muted); font-size: 12px; }
.key-line:last-child { margin-bottom: 0; }
.key-value { color: var(--ink); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; overflow-wrap: anywhere; }
.command-box { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 17px 0; padding: 15px 16px; border: 1px solid #cfe0d6; border-radius: 8px; color: #31594b; background: var(--accent-pale); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.copy-button { flex: 0 0 auto; padding: 4px 0; border: 0; color: var(--accent-dark); background: transparent; font-size: 12px; font-weight: 700; white-space: nowrap; }

.table-wrap { margin: 0 -24px -24px; overflow-x: auto; border-top: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { padding: 13px 17px; color: #829088; background: var(--surface-soft); font-size: 10px; font-weight: 750; letter-spacing: .4px; text-align: left; white-space: nowrap; text-transform: uppercase; }
td { padding: 16px 17px; border-top: 1px solid var(--line); color: var(--ink-soft); vertical-align: top; }
tbody tr:hover { background: #fbfdfb; }
.status { display: inline-flex; align-items: center; gap: 7px; color: var(--green); font-weight: 650; white-space: nowrap; }
.status::before { width: 7px; height: 7px; border-radius: 50%; background: currentColor; content: ""; }
.status.off { color: #9aa6a0; }
.status.warn { color: var(--amber); }
.table-muted { color: #93a099; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; overflow-wrap: anywhere; }
.merchant-tools { min-width: 270px; }
.merchant-tools .mini-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.merchant-tools input { min-width: 82px; min-height: 31px; padding: 5px 7px; font-size: 11px; }
.merchant-tools .field { margin-bottom: 8px; }
.merchant-tools .field > span { margin-bottom: 4px; font-size: 10px; }
.merchant-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.merchant-actions .button { min-height: 31px; }

.merchant-list, .user-list { display: grid; gap: 10px; }
.merchant-row, .user-row {
    display: grid;
    min-width: 0;
    align-items: center;
    gap: 18px;
    padding: 17px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    transition: border-color .16s ease, box-shadow .16s ease;
}
.merchant-row { grid-template-columns: minmax(220px, 1.3fr) minmax(240px, 1fr) auto; }
.user-row { grid-template-columns: minmax(190px, 1.2fr) minmax(220px, 1fr) minmax(120px, .7fr) auto; }
.merchant-row:hover, .user-row:hover { border-color: #b9cec1; box-shadow: var(--shadow-sm); }
.resource-primary { display: flex; min-width: 0; align-items: center; gap: 12px; }
.resource-avatar { display: grid; width: 40px; height: 40px; flex: 0 0 40px; place-items: center; border-radius: 12px; color: var(--accent-dark); background: var(--accent-pale); font-size: 15px; font-weight: 800; }
.resource-title { min-width: 0; }
.resource-title strong { display: block; overflow: hidden; color: var(--ink); font-size: 13px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.resource-title small { display: block; margin-top: 4px; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.resource-meta { display: flex; flex-wrap: wrap; gap: 7px; color: var(--muted); font-size: 11px; }
.meta-chip { padding: 6px 8px; border-radius: 6px; background: var(--surface-soft); white-space: nowrap; }
.meta-chip strong { color: var(--ink-soft); font-weight: 750; }
.resource-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.merchant-detail { border-color: #bfd5c6; background: #fbfefb; }
.merchant-detail .detail-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 24px; }
.detail-title { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.detail-title h2 { margin: 0; font-size: 19px; }
.detail-title p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.detail-side { padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); }
.detail-side h3 { margin: 0 0 14px; font-size: 13px; }
.detail-side .key-line { padding-bottom: 11px; border-bottom: 1px solid var(--line); }
.detail-side .key-line:last-child { padding-bottom: 0; border-bottom: 0; }

.test-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.test-card { min-height: 250px; padding: 21px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow-sm); }
.test-card h3 { margin: 0 0 8px; color: var(--ink); font-size: 15px; }
.test-card p { min-height: 42px; margin: 0 0 16px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.result-box { margin-top: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink-soft); background: var(--surface-soft); font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
.social-test-layout { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 22px; align-items: center; }
.social-qr-wrap { display: grid; width: 180px; height: 180px; place-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.social-qr { display: block; width: 158px; height: 158px; object-fit: contain; }
.social-test-url { min-width: 0; }
.announcement-admin-list { display: grid; gap: 8px; }
.announcement-admin-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(230px, auto); gap: 16px; align-items: center; padding: 15px 0; border-bottom: 1px solid var(--line); }
.announcement-admin-row:last-child { border-bottom: 0; }
.announcement-admin-row strong, .announcement-admin-row small { display: block; }
.announcement-admin-row strong { color: var(--ink); font-size: 13px; }
.announcement-admin-row small { margin-top: 5px; color: var(--muted); font-size: 11px; }
.announcement-toggle { align-self: end; min-height: 42px; padding: 12px 0; }
.field textarea { display: block; width: 100%; min-height: 120px; resize: vertical; }
.captcha-row { display: flex; align-items: flex-end; gap: 10px; }
.captcha-row .field { min-width: 0; flex: 1; }
.captcha-img { display: block; width: 150px; height: 46px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); cursor: pointer; }

.auth-page { min-height: 100vh; padding: 28px; background: var(--canvas); }
.auth-nav { display: flex; width: min(1180px, 100%); align-items: center; justify-content: space-between; gap: 20px; margin: 0 auto 22px; }
.auth-nav .brand-lockup { padding: 0; }
.auth-nav .brand-name { color: var(--ink); }
.auth-nav .brand-name span { color: var(--accent); }
.auth-nav .brand-caption { color: #8b9991; }
.auth-nav-link { display: inline-flex; min-height: 36px; align-items: center; padding: 0 11px; border-radius: 7px; color: var(--accent-dark); font-size: 12px; font-weight: 700; }
.auth-nav-link:hover { background: var(--accent-pale); }
.auth-layout { display: grid; width: min(1180px, 100%); min-height: 650px; grid-template-columns: minmax(360px, .9fr) minmax(480px, 1.1fr); margin: 0 auto; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow-md); }
.auth-layout-compact { width: min(900px, 100%); min-height: 520px; grid-template-columns: minmax(290px, .85fr) minmax(390px, 1.15fr); }
.auth-layout-compact .showcase-copy { padding-top: 34px; }
.auth-layout-compact .showcase-copy h1 { font-size: 30px; }
.auth-showcase { position: relative; display: flex; min-width: 0; flex-direction: column; padding: 42px; color: #fff; background: var(--nav); }
.auth-showcase .brand-name { color: #fff; }
.showcase-copy { margin-top: auto; padding: 50px 0 34px; }
.showcase-eyebrow { color: #b8db87; font-size: 10px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; }
.showcase-copy h1 { max-width: 380px; margin: 16px 0 15px; color: #fff; font-size: 36px; line-height: 1.22; font-weight: 780; }
.showcase-copy p { max-width: 400px; margin: 0; color: #b5c7bf; font-size: 13px; line-height: 1.85; }
.showcase-console { display: grid; grid-template-columns: 82px 1fr; min-height: 172px; padding: 13px; border: 1px solid #355348; border-radius: 8px; background: #20362f; }
.showcase-console-side { padding: 8px 10px; border-right: 1px solid #36534a; }
.showcase-console-side b { display: block; margin-bottom: 18px; color: #d9e8df; font-size: 9px; }
.showcase-console-side span { display: block; width: 48px; height: 6px; margin: 12px 0; border-radius: 3px; background: #46675b; }
.showcase-console-side span.active { width: 58px; background: #b8db87; }
.showcase-console-main { padding: 8px 13px; }
.showcase-console-main strong { display: block; color: #f5fbf7; font-size: 12px; }
.showcase-console-main small { display: block; margin-top: 5px; color: #8fa99e; font-size: 9px; }
.showcase-console-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 19px; }
.showcase-console-stats span { padding: 9px 7px; border: 1px solid #3b5a4e; border-radius: 6px; color: #bdd2c7; font-size: 9px; }
.showcase-console-stats b { display: block; margin-top: 5px; color: #fff; font-size: 14px; }
.showcase-facts { display: flex; flex-wrap: wrap; gap: 7px; padding-top: 22px; border-top: 1px solid #2f4a40; color: #adc1b8; font-size: 11px; }
.showcase-facts span { display: inline-flex; align-items: center; gap: 6px; }
.showcase-facts span::before { width: 5px; height: 5px; border-radius: 50%; background: #b8db87; content: ""; }
.auth-card { min-width: 0; background: var(--surface); }
.auth-login-card { display: block; }
.auth-main { padding: 54px 64px 48px; }
.auth-login-card .auth-main { max-width: 600px; margin: 0 auto; }
.auth-product-line { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 29px; color: #84928a; font-size: 11px; font-weight: 650; }
.auth-product-line span { display: inline-flex; align-items: center; gap: 7px; }
.auth-product-line span::before { width: 6px; height: 6px; border-radius: 50%; background: var(--coral); content: ""; }
.auth-main h2 { margin: 0; color: var(--ink); font-size: 26px; line-height: 1.25; font-weight: 780; }
.auth-main .subhead { margin: 9px 0 26px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.social-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.social-button {
    display: flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    color: var(--ink-soft);
    background: var(--surface);
    font-size: 13px;
    font-weight: 700;
    transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.social-button:hover { border-color: #a6c5b4; background: var(--accent-pale); transform: translateY(-1px); }
.social-icon { display: inline-grid; width: 22px; height: 22px; place-items: center; border-radius: 7px; color: #fff; font-size: 11px; font-weight: 800; }
.social-icon.qq { background: #4d85ca; }
.social-icon.wx { background: #42a66c; }
.divider { display: flex; align-items: center; gap: 12px; margin: 27px 0 16px; color: #9aa69f; font-size: 11px; }
.divider::before, .divider::after { height: 1px; flex: 1; background: var(--line); content: ""; }
.auth-switch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); }
.auth-switch button { min-height: 35px; padding: 0 8px; border: 0; border-radius: 6px; color: #85928a; background: transparent; font-size: 12px; font-weight: 650; }
.auth-switch button.active { color: var(--ink); background: var(--surface); box-shadow: 0 2px 7px rgba(27, 40, 35, .1); font-weight: 750; }
.auth-panel { display: none; padding-top: 21px; }
.auth-panel.active { display: block; }
.auth-submit { width: 100%; margin-top: 3px; }
.auth-footnote { margin: 22px 0 0; color: #95a19a; font-size: 11px; line-height: 1.7; }
.auth-footnote a { color: var(--accent-dark); font-weight: 700; }
.auth-account { width: min(560px, 100%); margin: 40px auto; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow-md); }
.auth-account .auth-main { padding: 42px; }
.verify-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; align-items: end; }
.verify-line .button { min-width: 112px; }
.field-destination { grid-column: span 2; }
.field-destination .verify-line input { min-width: 0; min-height: 46px; }
.code-status { margin: 10px 0 13px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: var(--surface-soft); font-size: 12px; line-height: 1.5; }
.code-status.success { border-color: #b8d9c3; color: var(--green); background: var(--green-pale); }
.code-status.error { border-color: #e4b9b6; color: var(--red); background: var(--red-pale); }
.code-status[hidden] { display: none; }
.registration-identity { margin-bottom: 2px; }
.captcha-field { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 10px; align-items: end; }
.geetest-box { min-height: 54px; margin-bottom: 17px; padding: 2px 0; }
.geetest-status { display: inline-flex; min-height: 38px; align-items: center; padding: 0 12px; border: 1px dashed var(--line-strong); border-radius: 7px; color: var(--muted); background: var(--surface-soft); font-size: 12px; }
.geetest-status.error { border-color: #e4b9b6; color: var(--red); background: var(--red-pale); }
.modal-open { overflow: hidden; }
.modal-backdrop[hidden] { display: none; }
.modal-backdrop { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: rgba(20, 34, 29, .56); }
.auth-modal { position: relative; width: min(470px, 100%); padding: 34px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 24px 80px rgba(18, 37, 29, .28); }
.auth-modal h2 { margin: 7px 0 8px; color: var(--ink); font-size: 24px; }
.auth-modal p { margin: 0 0 22px; color: var(--muted); font-size: 13px; line-height: 1.75; }
.modal-eyebrow { color: var(--accent-dark); font-size: 10px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; }
.modal-close { position: absolute; top: 13px; right: 14px; width: 32px; height: 32px; border: 0; border-radius: 7px; color: var(--muted); background: transparent; font-size: 23px; line-height: 1; }
.modal-close:hover { color: var(--ink); background: var(--surface-soft); }
.social-bind-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.social-bind-item { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); }
.social-bind-item > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.social-bind-item strong { color: var(--ink); font-size: 14px; }
.social-bind-item span { color: var(--green); font-size: 11px; font-weight: 700; }
.social-bind-item .geetest-box { margin-bottom: 5px; }
.auth-panel .section-label { margin-top: 4px; padding-top: 18px; }

.site-page { color: var(--ink); background: var(--canvas); }
.site-nav { display: flex; width: min(1240px, calc(100% - 64px)); min-height: 78px; align-items: center; justify-content: space-between; gap: 28px; margin: 0 auto; }
.site-nav .brand-lockup { padding: 0; }
.site-nav .brand-name { color: var(--ink); }
.site-nav .brand-name span { color: var(--accent); }
.site-nav .brand-caption { color: #8b9991; }
.site-links { display: flex; align-items: center; gap: 28px; color: var(--muted); font-size: 13px; font-weight: 650; }
.site-links a { padding: 9px 0; }
.site-links a:hover { color: var(--accent-dark); }
.site-actions { display: flex; align-items: center; gap: 9px; }
.site-hero { color: #fff; background: var(--nav); }
.site-hero-inner { display: grid; width: min(1240px, calc(100% - 64px)); min-height: 620px; grid-template-columns: minmax(0, .92fr) minmax(430px, 1.08fr); align-items: center; gap: 68px; margin: 0 auto; padding: 82px 0 86px; }
.site-eyebrow { color: #b8db87; font-size: 10px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; }
.site-hero h1 { max-width: 620px; margin: 18px 0 17px; color: #fff; font-size: 60px; line-height: 1.12; font-weight: 790; letter-spacing: 0; }
.site-hero p { max-width: 570px; margin: 0; color: #b8c9c1; font-size: 15px; line-height: 1.9; }
.site-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 29px; }
.site-hero .button { border-color: #b8db87; color: #18251f; background: #b8db87; box-shadow: none; }
.site-hero .button:hover { border-color: #d1efa6; background: #d1efa6; }
.site-hero .button.secondary { border-color: #416258; color: #e1eee7; background: transparent; }
.site-hero .button.secondary:hover { border-color: #8cb3a0; color: #fff; background: #294a3f; }
.site-note { margin-top: 16px !important; color: #88a297 !important; font-size: 11px !important; }
.hero-stage { position: relative; min-width: 0; padding: 46px 34px 38px; }
.hero-network { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; opacity: .8; pointer-events: none; }
.hero-network .network-line { fill: none; stroke: #4f8974; stroke-width: 1; stroke-dasharray: 7 12; animation: network-flow 12s linear infinite; }
.hero-network .network-line.alt { stroke: #b8db87; stroke-dasharray: 2 16; animation-duration: 8s; }
.hero-network .network-ring { fill: none; stroke: #365d50; stroke-width: 1; transform-origin: 50% 50%; animation: network-spin 22s linear infinite; }
.hero-network .network-ring.inner { stroke: #b8db87; stroke-dasharray: 2 13; animation-direction: reverse; animation-duration: 15s; }
.hero-network .network-node { fill: #b8db87; animation: network-pulse 2.8s ease-in-out infinite; }
.hero-network .network-node.alt { fill: #e7c266; animation-delay: -1.1s; }
.product-preview { position: relative; z-index: 1; padding: 14px; border: 1px solid #416257; border-radius: 8px; background: #1e352e; box-shadow: 0 22px 60px rgba(0, 0, 0, .2); animation: preview-float 6s ease-in-out infinite; }
.preview-bar { display: flex; height: 38px; align-items: center; justify-content: space-between; padding: 0 12px; border-bottom: 1px solid #38564b; color: #a6bab0; font-size: 10px; }
.preview-dots { display: flex; gap: 5px; }
.preview-dots i { width: 7px; height: 7px; border-radius: 50%; background: #5b786b; }
.preview-dots i:first-child { background: #e7c266; }
.preview-body { display: grid; min-height: 340px; grid-template-columns: 122px minmax(0, 1fr); gap: 18px; padding: 20px; }
.preview-side { padding: 2px 17px 0 2px; border-right: 1px solid #38564b; }
.preview-side b { display: block; margin-bottom: 22px; color: #f3faf6; font-size: 11px; }
.preview-side span { display: block; width: 75px; height: 7px; margin: 15px 0; border-radius: 4px; background: #36554a; }
.preview-side span.active { width: 92px; background: #b8db87; }
.preview-main h3 { margin: 0; color: #f3faf6; font-size: 17px; }
.preview-main p { margin: 7px 0 19px; color: #8eaa9d; font-size: 10px; }
.preview-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.preview-stat { padding: 13px 11px; border: 1px solid #416257; border-radius: 7px; background: #254238; }
.preview-stat small { display: block; color: #9db4a8; font-size: 9px; }
.preview-stat strong { display: block; margin-top: 8px; color: #fff; font-size: 19px; }
.preview-table { margin-top: 15px; border: 1px solid #416257; border-radius: 7px; overflow: hidden; background: #213c32; }
.preview-table div { display: flex; height: 39px; align-items: center; border-bottom: 1px solid #355349; }
.preview-table div:last-child { border-bottom: 0; }
.preview-table div::before { display: block; width: 60%; height: 6px; margin-left: 13px; border-radius: 4px; background: #47665a; content: ""; }
.preview-table div::after { width: 7px; height: 7px; margin-left: auto; margin-right: 13px; border-radius: 50%; background: #b8db87; content: ""; }
.site-section { width: min(1240px, calc(100% - 64px)); margin: 0 auto; padding: 92px 0; }
.site-section.border { border-top: 1px solid var(--line); }
.section-title { max-width: 720px; }
.section-title h2 { margin: 0; color: var(--ink); font-size: 34px; line-height: 1.25; font-weight: 780; }
.section-title p { margin: 13px 0 0; color: var(--muted); font-size: 14px; line-height: 1.85; }
.feature-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-top: 35px; }
.feature-item { min-height: 205px; padding: 22px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow-sm); }
.feature-index { display: inline-flex; min-width: 30px; min-height: 24px; align-items: center; justify-content: center; border-radius: 6px; color: var(--accent-dark); background: var(--accent-pale); font-size: 10px; font-weight: 800; }
.feature-item h3 { margin: 26px 0 9px; color: var(--ink); font-size: 15px; }
.feature-item p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.steps-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 35px; }
.step-item { min-width: 0; padding: 22px 0 0; border-top: 2px solid #bcd1c4; }
.step-number { color: var(--coral); font-size: 12px; font-weight: 800; }
.step-item h3 { margin: 14px 0 9px; color: var(--ink); font-size: 16px; }
.step-item p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.step-item code { padding: 2px 5px; border-radius: 4px; color: var(--accent-dark); background: var(--accent-pale); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; }
.site-download { display: grid; grid-template-columns: 1.1fr .9fr; gap: 15px; margin-top: 35px; }
.download-panel { min-width: 0; padding: 26px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow-sm); }
.download-panel h3 { margin: 0; color: var(--ink); font-size: 18px; }
.download-panel p { margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.download-links { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 23px; }
.site-footer { padding: 27px 0 36px; border-top: 1px solid var(--line); color: #89968f; font-size: 11px; }
.site-footer-inner { display: flex; width: min(1240px, calc(100% - 64px)); justify-content: space-between; gap: 15px; margin: auto; }
.site-announcement { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: 24px 0; border-bottom: 1px solid var(--line); }
.site-announcement-copy { min-width: 0; }
.site-announcement-kicker { color: var(--coral); font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.site-announcement h2 { margin: 7px 0 5px; color: var(--ink); font-size: 17px; }
.site-announcement p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; white-space: pre-line; }
.site-announcement-link { color: var(--accent-dark); font-size: 12px; font-weight: 750; white-space: nowrap; }
.announcement-list { display: grid; gap: 12px; }
.announcement-item { padding: 22px 0; border-bottom: 1px solid var(--line); }
.announcement-item:last-child { border-bottom: 0; }
.announcement-item-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.announcement-item h2 { margin: 0; color: var(--ink); font-size: 18px; }
.announcement-item time { color: #94a19a; font-size: 11px; white-space: nowrap; }
.announcement-item p { margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.85; white-space: pre-line; }
.announcement-level { display: inline-flex; margin-right: 8px; padding: 4px 7px; border-radius: 5px; color: var(--accent-dark); background: var(--accent-pale); font-size: 10px; font-weight: 750; vertical-align: 2px; }
.announcement-level.warning { color: #926316; background: var(--amber-pale); }
.announcement-level.critical { color: var(--red); background: var(--red-pale); }
@keyframes network-flow { to { stroke-dashoffset: -190; } }
@keyframes network-spin { to { transform: rotate(360deg); } }
@keyframes network-pulse { 0%, 100% { opacity: .45; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.2); } }
@keyframes preview-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

@media (max-width: 1100px) {
    .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .content-grid { grid-template-columns: 1fr; }
    .test-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .site-hero-inner { grid-template-columns: minmax(0, .9fr) minmax(360px, 1.1fr); gap: 35px; }
    .site-hero h1 { font-size: 52px; }
    .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .auth-layout { grid-template-columns: minmax(310px, .8fr) minmax(440px, 1.2fr); }
    .auth-main { padding-right: 44px; padding-left: 44px; }
}

@media (max-width: 820px) {
    .sidebar { position: fixed; inset: 0 auto 0 0; transform: translateX(-105%); transition: transform .2s ease; box-shadow: 16px 0 35px rgba(20, 37, 30, .22); }
    .sidebar.open { transform: translateX(0); }
    .topbar { padding-right: 20px; padding-left: 20px; }
    .mobile-menu { display: inline-grid; place-items: center; }
    .topbar-right > span { display: none; }
    .content { padding: 30px 20px 52px; }
    .merchant-row, .user-row { grid-template-columns: 1fr; gap: 14px; }
    .announcement-admin-row { grid-template-columns: 1fr; gap: 10px; }
    .social-test-layout { grid-template-columns: 1fr; }
    .social-qr-wrap { width: 170px; height: 170px; }
    .social-qr { width: 148px; height: 148px; }
    .resource-actions { justify-content: flex-start; }
    .merchant-detail .detail-grid { grid-template-columns: 1fr; }
    .site-nav, .site-hero-inner, .site-section, .site-footer-inner { width: min(calc(100% - 40px), 1240px); }
    .site-nav { min-height: 72px; flex-wrap: wrap; padding: 14px 0; }
    .site-links { order: 3; width: 100%; gap: 20px; overflow-x: auto; }
    .site-hero-inner { grid-template-columns: 1fr; min-height: 0; padding: 66px 0 70px; }
    .site-hero h1 { max-width: 580px; font-size: 48px; }
    .hero-stage { max-width: 680px; padding: 24px 16px 18px; }
    .product-preview { max-width: 680px; }
    .site-download { grid-template-columns: 1fr; }
    .auth-page { padding: 18px 12px 30px; }
    .auth-nav { width: min(100%, 680px); }
    .auth-layout { display: block; width: min(100%, 680px); min-height: 0; }
    .auth-showcase { min-height: 310px; padding: 27px; }
    .showcase-copy { margin-top: 0; padding: 38px 0 0; }
    .showcase-copy h1 { max-width: 560px; margin-top: 13px; font-size: 29px; }
    .showcase-console { display: none; }
    .showcase-facts { margin-top: 23px; }
    .auth-main { padding: 36px 28px 34px; }
    .auth-login-card .auth-main { max-width: none; }
}

@media (max-width: 560px) {
    .topbar-title { max-width: 190px; }
    .page-heading h1 { font-size: 26px; }
    .metric-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .metric-card { min-height: 116px; padding: 15px; }
    .metric-value { margin-top: 11px; font-size: 25px; }
    .form-grid, .test-grid, .check-list, .social-row { grid-template-columns: 1fr; }
    .card { padding: 19px; }
    .table-wrap { margin-right: -19px; margin-left: -19px; }
    .card-head { gap: 10px; }
    .card-kicker { display: none; }
    .site-nav { width: calc(100% - 30px); }
    .site-links { gap: 16px; font-size: 12px; }
    .site-actions .button.secondary { display: none; }
    .site-hero-inner, .site-section, .site-footer-inner { width: calc(100% - 30px); }
    .site-hero h1 { font-size: 42px; }
    .site-hero p { font-size: 14px; }
    .preview-body { grid-template-columns: 78px minmax(0, 1fr); gap: 10px; padding: 13px; }
    .preview-side { padding-right: 10px; }
    .preview-side span { width: 48px; }
    .preview-side span.active { width: 62px; }
    .preview-stats { gap: 5px; }
    .preview-stat { padding: 10px 7px; }
    .preview-stat strong { font-size: 16px; }
    .section-title h2 { font-size: 28px; }
    .feature-grid { grid-template-columns: 1fr; }
    .steps-grid { grid-template-columns: 1fr; }
    .site-footer-inner { display: block; line-height: 2; }
    .captcha-field, .verify-line, .social-bind-grid { grid-template-columns: 1fr; }
    .field-destination { grid-column: auto; }
    .captcha-img { width: 150px; }
    .auth-main { padding-right: 20px; padding-left: 20px; }
    .auth-main h2 { font-size: 23px; }
    .showcase-facts { display: grid; gap: 8px; }
    .command-box { align-items: flex-start; flex-direction: column; gap: 8px; }
    .auth-modal { padding: 29px 21px 24px; }
    .site-announcement { grid-template-columns: 1fr; gap: 12px; }
    .announcement-item-head { display: block; }
    .announcement-item time { display: block; margin-top: 7px; }
}

@media (max-width: 380px) {
    .metric-grid { grid-template-columns: 1fr; }
    .auth-showcase { padding: 23px 20px; }
    .site-hero h1 { font-size: 36px; }
}
