:root {
    --bg: #f3f6fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --text: #172033;
    --muted: #667085;
    --line: #e4e9f1;
    --primary: #2457d6;
    --primary-dark: #1945b3;
    --danger: #d92d20;
    --danger-soft: #fff2f0;
    --success: #039855;
    --warning: #b54708;
    --shadow: 0 18px 50px rgba(23,32,51,.09);
    --radius: 18px;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { margin: 0; min-height: 100%; color: var(--text); background: var(--bg); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.site-header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid rgba(228,233,241,.85); background: rgba(255,255,255,.9); backdrop-filter: blur(18px); }
.header-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-logo, .brand-mark { width: 44px; height: 44px; border-radius: 13px; object-fit: cover; flex: 0 0 auto; }
.brand-mark { display: grid; place-items: center; color: white; font-weight: 800; font-size: 21px; background: linear-gradient(145deg, #2457d6, #5a7fec); box-shadow: 0 10px 22px rgba(36,87,214,.25); }
.brand-mark.small { width: 36px; height: 36px; border-radius: 10px; font-size: 17px; }
.brand-title { font-size: 16px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-subtitle { margin-top: 2px; color: var(--muted); font-size: 12px; }
.account-area { display: flex; align-items: center; gap: 12px; }
.account-name { max-width: 160px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.text-link { color: var(--primary); font-size: 14px; }
.page-space { padding-top: 34px; padding-bottom: 30px; }
.hero-panel { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 210px; padding: 38px 42px; color: white; border-radius: 26px; background: radial-gradient(circle at 88% 15%, rgba(255,255,255,.22), transparent 27%), linear-gradient(130deg, #183b91 0%, #2457d6 58%, #5379e6 100%); box-shadow: 0 22px 55px rgba(36,87,214,.2); }
.hero-panel h1 { margin: 13px 0 10px; font-size: clamp(28px, 4vw, 43px); letter-spacing: -.04em; }
.hero-panel p { max-width: 680px; margin: 0; color: rgba(255,255,255,.78); line-height: 1.75; }
.demo-badge { display: inline-flex; align-items: center; min-height: 25px; padding: 4px 9px; border: 1px solid rgba(36,87,214,.18); border-radius: 999px; color: var(--primary); background: #eef3ff; font-size: 10px; font-weight: 800; letter-spacing: .11em; }
.hero-panel .demo-badge { color: white; border-color: rgba(255,255,255,.23); background: rgba(255,255,255,.12); }
.hero-stat { min-width: 150px; padding: 21px; text-align: center; border: 1px solid rgba(255,255,255,.17); border-radius: 20px; background: rgba(255,255,255,.1); backdrop-filter: blur(10px); }
.hero-stat strong { display: block; font-size: 42px; }
.hero-stat span { color: rgba(255,255,255,.75); font-size: 13px; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; margin: 34px 0 18px; }
.section-heading h2 { margin: 0 0 7px; font-size: 22px; }
.section-heading p { margin: 0; color: var(--muted); font-size: 14px; }
.app-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.app-card { display: flex; flex-direction: column; min-height: 310px; padding: 23px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 7px 25px rgba(23,32,51,.045); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.app-card:hover { transform: translateY(-3px); border-color: #cbd7f5; box-shadow: var(--shadow); }
.app-icon-wrap { margin-bottom: 17px; }
.app-icon { width: 70px; height: 70px; border-radius: 18px; object-fit: cover; box-shadow: 0 8px 21px rgba(23,32,51,.12); }
.app-icon-fallback { display: grid; place-items: center; color: white; font-weight: 800; font-size: 27px; background: linear-gradient(145deg, #455a84, #2457d6); }
.app-card h3 { margin: 0 0 7px; font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-meta { color: var(--muted); font-size: 12px; }
.app-description { min-height: 42px; margin: 14px 0 20px; color: #566177; font-size: 13px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 10px 17px; border: 1px solid transparent; border-radius: 11px; cursor: pointer; font-weight: 700; font-size: 14px; transition: .18s ease; }
.btn-primary { color: white; background: var(--primary); box-shadow: 0 8px 18px rgba(36,87,214,.18); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { color: #344054; border-color: var(--line); background: white; }
.btn-ghost:hover { border-color: #c6d1e3; background: #f8fafc; }
.btn-disabled { color: #98a2b3; border-color: #eaecf0; background: #f2f4f7; cursor: not-allowed; box-shadow: none; }
.btn-block { width: 100%; margin-top: auto; }
.btn-small { min-height: 35px; padding: 7px 12px; font-size: 12px; }
.btn-large { min-height: 49px; margin-top: 22px; }
.alert { margin: 18px 0; padding: 13px 15px; border-radius: 12px; font-size: 14px; }
.alert-error { color: #9f2016; border: 1px solid #f4c7c3; background: var(--danger-soft); }
.alert-success { color: #027a48; border: 1px solid #b7e6d1; background: #ecfdf3; }
.empty-state { padding: 54px 20px; text-align: center; color: var(--muted); border: 1px dashed #cdd5df; border-radius: var(--radius); background: rgba(255,255,255,.55); }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 34px; padding: 22px 2px 0; color: var(--muted); border-top: 1px solid var(--line); font-size: 12px; }
.site-footer a { color: var(--primary); }

/* 登录 */
.auth-page, .verify-page, .result-page { min-height: 100vh; background: radial-gradient(circle at 15% 0%, #e8efff, transparent 34%), var(--bg); }
.auth-shell { width: min(470px, calc(100% - 28px)); margin: 0 auto; padding: 48px 0; }
.back-link { display: inline-block; margin: 0 0 17px; color: #475467; font-size: 14px; }
.auth-card { padding: 34px; border: 1px solid var(--line); border-radius: 24px; background: rgba(255,255,255,.96); box-shadow: var(--shadow); }
.auth-logo { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 18px; color: white; border-radius: 14px; background: linear-gradient(145deg, #2457d6, #5d7fe7); font-size: 22px; font-weight: 800; }
.auth-card h1 { margin: 13px 0 8px; font-size: 27px; }
.auth-intro { margin: 0 0 20px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.safety-notice, .warning-box { margin: 0 0 20px; padding: 12px 13px; color: #7a4b08; border: 1px solid #fedf89; border-radius: 11px; background: #fffaeb; font-size: 12px; line-height: 1.55; }
.form-label { display: block; margin: 15px 0 7px; color: #344054; font-size: 13px; font-weight: 700; }
.form-input { width: 100%; min-height: 44px; padding: 10px 12px; color: var(--text); border: 1px solid #d0d5dd; border-radius: 10px; outline: 0; background: white; transition: border .16s, box-shadow .16s; }
.form-input:focus { border-color: #7a9af0; box-shadow: 0 0 0 4px rgba(36,87,214,.1); }
.form-textarea { resize: vertical; line-height: 1.55; }
.file-input { padding: 7px; }
.form-help { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; }
.auth-footnote { margin: 20px 0 0; color: #98a2b3; text-align: center; font-size: 11px; line-height: 1.6; }

/* 检查动画 */
.verify-shell, .result-shell { width: min(650px, calc(100% - 28px)); margin: 0 auto; padding: 8vh 0 40px; }
.verify-card, .result-card { padding: 36px; border: 1px solid var(--line); border-radius: 25px; background: rgba(255,255,255,.97); box-shadow: var(--shadow); }
.verify-app { display: flex; align-items: center; gap: 17px; margin-bottom: 29px; }
.verify-app h1 { margin: 8px 0 3px; font-size: 24px; }
.verify-app p { margin: 0; color: var(--muted); font-size: 13px; }
.progress-track { height: 7px; overflow: hidden; margin-bottom: 23px; border-radius: 999px; background: #edf1f7; }
.progress-track span { display: block; width: 5%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2457d6, #7896eb); transition: width .55s ease; }
.check-list { display: grid; gap: 10px; }
.check-row { display: grid; grid-template-columns: 37px 1fr auto; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: #fbfcfe; opacity: .62; transition: .25s ease; }
.check-row.active { opacity: 1; border-color: #9fb5ef; background: #f4f7ff; box-shadow: 0 0 0 3px rgba(36,87,214,.06); }
.check-row.done { opacity: 1; border-color: #b7e6d1; background: #f0fdf7; }
.check-icon { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; color: #667085; background: #e9edf4; font-size: 12px; font-weight: 800; }
.check-row.active .check-icon { color: white; background: var(--primary); animation: pulse 1s infinite; }
.check-row.done .check-icon { color: white; background: var(--success); }
.check-row strong { display: block; font-size: 14px; }
.check-row small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.check-state { color: var(--muted); font-size: 11px; font-weight: 700; }
.check-row.done .check-state { color: var(--success); }
.verify-note { margin: 21px 0 0; color: #98a2b3; text-align: center; font-size: 11px; line-height: 1.6; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(36,87,214,.28); } 50% { box-shadow: 0 0 0 7px rgba(36,87,214,0); } }

/* 结果 */
.result-card { text-align: center; }
.result-icon { display: grid; place-items: center; width: 70px; height: 70px; margin: 22px auto 15px; color: var(--danger); border: 8px solid #fee4e2; border-radius: 50%; background: #fff; font-size: 31px; font-weight: 900; }
.result-card h1 { margin: 0 0 10px; font-size: 29px; }
.result-lead { max-width: 500px; margin: 0 auto 25px; color: var(--muted); line-height: 1.7; }
.result-details { overflow: hidden; text-align: left; border: 1px solid var(--line); border-radius: 15px; }
.result-details > div { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.result-details > div:last-child { border-bottom: 0; }
.result-details span { color: var(--muted); font-size: 13px; }
.result-details strong, .result-details code { text-align: right; overflow-wrap: anywhere; }
.status-failed { color: var(--danger); }
.result-contact { margin-top: 17px; padding: 16px; text-align: left; border-radius: 14px; background: #f8fafc; }
.result-contact p { margin: 6px 0; color: var(--muted); font-size: 13px; }
.result-contact span { color: var(--primary); font-size: 13px; font-weight: 700; }
.result-actions { display: flex; justify-content: center; gap: 10px; margin-top: 24px; }

/* 后台 */
.admin-body { background: #eef2f8; }
.admin-layout { min-height: 100vh; display: grid; grid-template-columns: 238px minmax(0,1fr); }
.admin-sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 21px 15px; color: #dce5f9; background: #14213d; }
.admin-brand { display: flex; align-items: center; gap: 11px; padding: 0 7px 20px; border-bottom: 1px solid rgba(255,255,255,.1); }
.admin-brand strong, .admin-brand small { display: block; }
.admin-brand small { margin-top: 2px; color: #8494b4; font-size: 10px; }
.admin-nav { display: grid; gap: 5px; margin-top: 20px; }
.admin-nav a { padding: 11px 12px; color: #aebbd4; border-radius: 10px; font-size: 14px; font-weight: 650; }
.admin-nav a:hover, .admin-nav a.active { color: white; background: rgba(255,255,255,.1); }
.admin-sidebar-bottom { display: grid; gap: 8px; margin-top: auto; padding: 16px 8px 0; border-top: 1px solid rgba(255,255,255,.1); }
.admin-sidebar-bottom a { color: #9eadc7; font-size: 12px; }
.admin-main { min-width: 0; padding: 26px; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 23px; }
.admin-topbar h1 { margin: 0 0 3px; font-size: 25px; }
.admin-topbar p { margin: 0; color: var(--muted); font-size: 12px; }
.mobile-nav-button { display: none; border: 0; color: var(--text); background: transparent; font-size: 23px; }
.admin-alert { margin-top: -5px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 15px; margin-bottom: 18px; }
.stat-card, .admin-panel { border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: 0 5px 22px rgba(23,32,51,.04); }
.stat-card { padding: 20px; }
.stat-card span, .stat-card small { display: block; color: var(--muted); font-size: 12px; }
.stat-card strong { display: block; margin: 9px 0 8px; font-size: 27px; }
.admin-panel { padding: 21px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.panel-heading.compact { margin-bottom: 2px; }
.panel-heading h2 { margin: 0 0 5px; font-size: 17px; }
.panel-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.info-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.info-grid > div { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fafbfc; }
.info-grid p { margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.admin-two-column { display: grid; grid-template-columns: minmax(300px, .72fr) minmax(0, 1.6fr); gap: 18px; align-items: start; }
.sticky-panel { position: sticky; top: 20px; }
.admin-form .form-label:first-of-type { margin-top: 0; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.form-actions { display: flex; gap: 9px; margin-top: 20px; }
.switch-row { display: flex; align-items: center; gap: 9px; margin-top: 16px; color: #344054; font-size: 13px; font-weight: 700; }
.switch-row input { width: 17px; height: 17px; accent-color: var(--primary); }
.admin-list { display: grid; gap: 9px; }
.admin-list-item { display: grid; grid-template-columns: 45px minmax(150px,1fr) auto auto auto; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.mini-icon { width: 43px; height: 43px; border-radius: 11px; object-fit: cover; font-size: 17px; }
.list-main { min-width: 0; }
.list-main strong, .list-main span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-main span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.status-pill { display: inline-flex; padding: 5px 8px; border-radius: 999px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.status-pill.ok { color: #027a48; background: #ecfdf3; }
.status-pill.muted { color: #667085; background: #f2f4f7; }
.status-pill.warn { color: #b54708; background: #fffaeb; }
.row-actions { display: flex; align-items: center; gap: 9px; }
.row-actions a, .row-actions button { padding: 0; border: 0; color: var(--primary); background: transparent; cursor: pointer; font-size: 12px; }
.row-actions button { color: var(--danger); }
.row-actions form { margin: 0; }
.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.admin-table th, .admin-table td { padding: 12px 10px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.admin-table th { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table code { color: #344054; }
.settings-panel { max-width: 920px; }
.wide-form { max-width: 800px; }
.panel-divider { height: 1px; margin: 27px 0 20px; background: var(--line); }
.admin-login-bg { background: radial-gradient(circle at 80% 10%, #d9e4ff, transparent 32%), #eef2f8; }

@media (max-width: 1000px) {
    .app-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
    .stat-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .admin-two-column { grid-template-columns: 1fr; }
    .sticky-panel { position: static; }
}
@media (max-width: 760px) {
    .container { width: min(100% - 22px, 1180px); }
    .header-inner { min-height: 67px; }
    .brand-subtitle, .account-name { display: none; }
    .page-space { padding-top: 18px; }
    .hero-panel { min-height: auto; padding: 27px 24px; border-radius: 20px; }
    .hero-stat { display: none; }
    .hero-panel h1 { font-size: 28px; }
    .app-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 11px; }
    .app-card { min-height: 275px; padding: 16px; border-radius: 15px; }
    .app-icon { width: 58px; height: 58px; border-radius: 15px; }
    .app-card h3 { font-size: 15px; }
    .app-description { min-height: 38px; margin: 11px 0 15px; font-size: 11px; }
    .site-footer { align-items: flex-start; flex-direction: column; gap: 7px; }
    .auth-shell { padding-top: 26px; }
    .auth-card, .verify-card, .result-card { padding: 25px 20px; border-radius: 20px; }
    .verify-shell, .result-shell { padding-top: 4vh; }
    .check-row { grid-template-columns: 34px 1fr; }
    .check-state { grid-column: 2; }
    .result-actions { flex-direction: column; }
    .result-actions .btn { width: 100%; }

    .admin-layout { display: block; }
    .admin-sidebar { position: fixed; z-index: 50; left: 0; top: 0; width: 238px; transform: translateX(-105%); transition: transform .22s ease; box-shadow: 20px 0 50px rgba(0,0,0,.2); }
    .nav-open .admin-sidebar { transform: translateX(0); }
    .admin-main { padding: 16px 12px; }
    .admin-topbar { justify-content: flex-start; }
    .admin-topbar .demo-badge { margin-left: auto; }
    .mobile-nav-button { display: block; }
    .stat-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
    .stat-card { padding: 16px; }
    .stat-card strong { font-size: 22px; }
    .info-grid, .form-row { grid-template-columns: 1fr; }
    .admin-list-item { grid-template-columns: 43px minmax(0,1fr) auto; }
    .admin-list-item > .status-pill { display: none; }
    .row-actions { grid-column: 2 / -1; }
}
@media (max-width: 390px) {
    .app-grid { grid-template-columns: 1fr; }
    .app-card { min-height: 255px; }
}
