/* =========================================================
   方案展示 · LitePic 同款极简开发者工具风
   明暗双主题 / 硬朗直角 / 低饱和商务蓝
   ========================================================= */

/* ---------- Design Tokens ---------- */
:root {
    --bg: #f6f7f9;
    --bg-elev: #ffffff;
    --bg-sub: #f0f1f4;
    --input-bg: #ffffff;
    --topbar-bg: rgba(255, 255, 255, .82);
    --border: #e3e5e8;
    --border-strong: #d0d3d8;
    --text: #1f2328;
    --text-2: #57606a;
    --text-3: #8b949e;

    --primary: #0052d9;
    --primary-hover: #0044b8;
    --primary-weak: rgba(0, 82, 217, .07);

    --green: #1a7f37;
    --green-weak: rgba(26, 127, 55, .08);
    --orange: #9a6700;
    --orange-weak: rgba(154, 103, 0, .10);
    --red: #cf222e;
    --red-weak: rgba(207, 34, 46, .08);

    --radius: 2px;
    --radius-lg: 4px;
    --shadow: 0 1px 2px rgba(15, 17, 22, .05);

    --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
    --mono: "SFMono-Regular", "SF Mono", ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;
}

:root[data-theme="dark"] {
    --bg: #0f1116;
    --bg-elev: #161a21;
    --bg-sub: #1b2029;
    --input-bg: #12161c;
    --topbar-bg: rgba(15, 17, 22, .82);
    --border: #262c36;
    --border-strong: #333b47;
    --text: #c9d1d9;
    --text-2: #8b949e;
    --text-3: #6e7681;

    --primary: #3b82f6;
    --primary-hover: #5c9df8;
    --primary-weak: rgba(59, 130, 246, .12);

    --green: #3fb950;
    --green-weak: rgba(63, 185, 80, .14);
    --orange: #d29922;
    --orange-weak: rgba(210, 153, 34, .14);
    --red: #f85149;
    --red-weak: rgba(248, 81, 73, .14);

    --shadow: 0 1px 3px rgba(0, 0, 0, .35);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 14px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    transition: background-color .2s, color .2s;
}
button, input, textarea, select { font: inherit; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

code, .code, kbd {
    font-family: var(--mono);
    font-size: .92em;
    background: var(--bg-sub);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1px 5px;
    color: var(--text);
}
.boot {
    text-align: center;
    padding: 140px 20px;
    color: var(--text-3);
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: .06em;
}

/* ---------- Topbar ---------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--topbar-bg);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
.topbar-inner {
    max-width: 960px;
    margin: 0 auto;
    height: 54px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
}
.brand-mark {
    width: 24px;
    height: 24px;
    border-radius: var(--radius);
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
}
.actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 30px;
    padding: 0 12px;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--bg-elev);
    color: var(--text);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    transition: background-color .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--bg-sub); }
.btn:active { transform: translateY(.5px); }
.btn.primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.ghost {
    border-color: transparent;
    background: transparent;
    color: var(--text-2);
}
.btn.ghost:hover { background: var(--bg-sub); color: var(--text); }
.btn.danger { color: var(--red); border-color: var(--red-weak); background: transparent; }
.btn.danger:hover { background: var(--red-weak); }
.btn.sm { height: 26px; padding: 0 9px; font-size: 12px; }
.btn.block { width: 100%; height: 36px; }

.icon-btn {
    width: 30px;
    height: 30px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: var(--radius);
    background: transparent;
    color: var(--text-2);
    cursor: pointer;
    transition: background-color .15s, color .15s;
}
.icon-btn:hover { background: var(--bg-sub); color: var(--text); }
.icon-btn svg { width: 15px; height: 15px; display: block; }

/* ---------- Badge ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 18px;
    padding: 0 6px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: .02em;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-sub);
    color: var(--text-3);
    white-space: nowrap;
}
.badge.blue { color: var(--primary); border-color: transparent; background: var(--primary-weak); }
.badge.green { color: var(--green); border-color: transparent; background: var(--green-weak); }
.badge.orange { color: var(--orange); border-color: transparent; background: var(--orange-weak); }
.badge.red { color: var(--red); border-color: transparent; background: var(--red-weak); }

/* ---------- Login ---------- */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--bg);
}
.login-theme { position: fixed; top: 14px; right: 16px; z-index: 30; }
.login-card {
    width: 100%;
    max-width: 360px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 34px 30px 26px;
    box-shadow: var(--shadow);
}
.login-head { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.login-mark {
    width: 28px;
    height: 28px;
    border-radius: var(--radius);
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
}
.login-card h1 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.login-card .sub { margin: 0 0 20px; color: var(--text-2); font-size: 13px; }
.login-card .err { color: var(--red); font-size: 12px; min-height: 20px; margin: 8px 0 0; }
.login-card .hint {
    margin: 20px 0 0;
    color: var(--text-3);
    font-size: 11.5px;
    font-family: var(--mono);
    letter-spacing: .02em;
}

/* ---------- Inputs ---------- */
input:not([type="button"]):not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
textarea {
    width: 100%;
    height: 34px;
    padding: 0 10px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--input-bg);
    color: var(--text);
    font-size: 13px;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
textarea {
    height: auto;
    min-height: 84px;
    padding: 8px 10px;
    line-height: 1.6;
    resize: vertical;
}
input::placeholder, textarea::placeholder { color: var(--text-3); }
input:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-weak);
}

/* ---------- Layout ---------- */
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 30px 24px 72px;
}

/* ---------- Hero ---------- */
.hero {
    border: 1px solid var(--border);
    border-left: 3px solid var(--primary);
    border-radius: var(--radius-lg);
    background: var(--bg-elev);
    padding: 30px 30px 26px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}
.hero-eyebrow {
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 12px;
}
.hero h1 {
    margin: 0 0 8px;
    font-size: 27px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -.015em;
}
.hero-sub { margin: 0 0 14px; color: var(--text-2); font-size: 14.5px; }
.hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    color: var(--text-3);
    font-size: 12px;
}
.hero-meta .sep { color: var(--border-strong); }

/* ---------- Panels ---------- */
.panel {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-elev);
    margin-bottom: 14px;
    box-shadow: var(--shadow);
}
.panel-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 20px;
    border-bottom: 1px solid var(--border);
    border-left: 3px solid var(--primary);
}
.panel-idx {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-3);
    letter-spacing: .04em;
}
.panel-head h2 { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: -.01em; }
.panel-head .head-note { margin-left: auto; color: var(--text-3); font-size: 11px; font-family: var(--mono); }
.panel-body { padding: 20px; }

.prose { color: var(--text); font-size: 13.5px; line-height: 1.85; }

/* ---------- Plan list ---------- */
.plan-list { display: flex; flex-direction: column; }
.plan-item {
    display: flex;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}
.plan-item:first-child { padding-top: 0; }
.plan-item:last-child { border-bottom: none; padding-bottom: 0; }
.plan-no {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--primary);
    padding-top: 3px;
    flex: 0 0 auto;
}
.plan-content h3 { margin: 0 0 3px; font-size: 13.5px; font-weight: 600; }
.plan-content p { margin: 0; color: var(--text-2); font-size: 13px; line-height: 1.75; }

/* ---------- Table ---------- */
.tbl-wrap { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
    text-align: left;
    font-weight: 500;
    font-size: 10.5px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--text-3);
    padding: 9px 14px;
    background: var(--bg-sub);
    border-bottom: 1px solid var(--border);
}
.tbl td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    vertical-align: top;
}
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl tbody tr { transition: background-color .12s; }
.tbl tbody tr:hover { background: var(--bg-sub); }
.tbl .num { text-align: right; font-family: var(--mono); white-space: nowrap; }
.tbl .price { color: var(--primary); font-weight: 600; }
.tbl .muted { color: var(--text-2); font-size: 12.5px; }
.tbl .empty { color: var(--text-3); text-align: center; padding: 22px 14px; }
.tbl th:nth-child(1), .tbl td:nth-child(1) { width: 36%; }
.tbl th:nth-child(2), .tbl td:nth-child(2) { width: 16%; }
.tbl th:nth-child(3), .tbl td:nth-child(3) { width: 48%; }

.total-line {
    display: flex;
    justify-content: flex-end;
    align-items: baseline;
    gap: 10px;
    margin-top: 16px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-sub);
    font-family: var(--mono);
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
}
.total-line .label { font-family: var(--sans); font-size: 12px; font-weight: 500; color: var(--text-2); }

.note-text { margin: 12px 0 0; color: var(--text-3); font-size: 12px; line-height: 1.7; }

/* ---------- Reserved slot ---------- */
.reserved {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius);
    background: var(--bg-sub);
    padding: 16px 18px;
    color: var(--text-3);
    font-size: 13px;
    line-height: 1.7;
}
.reserved .badge { flex: 0 0 auto; margin-top: 1px; }

/* ---------- Footer ---------- */
.footer {
    text-align: center;
    color: var(--text-3);
    font-size: 11px;
    font-family: var(--mono);
    letter-spacing: .04em;
    padding: 18px 20px 42px;
}

/* ---------- Edit form ---------- */
.form-grid { display: flex; flex-direction: column; gap: 14px; }
.field { margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-2);
    margin-bottom: 6px;
}
.field .hint {
    display: block;
    font-size: 11.5px;
    color: var(--text-3);
    margin-top: 5px;
}
.row {
    display: grid;
    gap: 8px;
    padding: 10px;
    margin-bottom: 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-sub);
}
.row.plan { grid-template-columns: 1fr 2fr auto; }
.row.price { grid-template-columns: 1.15fr .75fr 1.2fr auto; }
.row input { width: 100%; }

/* ---------- Toast ---------- */
.toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%) translateY(8px);
    background: var(--text);
    color: var(--bg-elev);
    padding: 9px 16px;
    border-radius: var(--radius);
    font-size: 12.5px;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s, transform .2s;
    z-index: 50;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
    .topbar-inner { padding: 0 16px; }
    .container { padding: 20px 14px 56px; }
    .hero { padding: 24px 20px; }
    .hero h1 { font-size: 22px; }
    .panel-head { padding: 12px 14px; }
    .panel-body { padding: 16px; }
    .row.plan, .row.price { grid-template-columns: 1fr; }
    .tbl th, .tbl td { padding: 10px 10px; }
    .tbl .muted { font-size: 12px; }
}
