:root { color-scheme: light; --bg:#f5f6f9; --panel:#fff; --line:#e3e7ee; --text:#1b2330; --muted:#66738a; --primary:#C8102E; --primary-dark:#a30b22; --primary-soft:#ffeff1; --hover:#f5f6f8; --sidebar-bg:#171a21; --sidebar-text:#aab2c0; --shadow:0 1px 2px rgba(20,30,48,0.05),0 10px 28px rgba(20,30,48,0.07); }
    * { box-sizing: border-box; }
    html, body { height: 100%; }
    body { margin: 0; font-family: "PingFang SC", "Microsoft YaHei UI", "Noto Sans SC", sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }
    a { color: var(--primary); text-decoration: none; }
    .shell { display: flex; min-height: 100vh; }
    .sidebar { width: 240px; flex: none; background: linear-gradient(180deg,#161920,#12151b); color: var(--sidebar-text); display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0; z-index: 30; }
    .side-brand { display: flex; align-items: center; gap: 10px; padding: 20px; color: #fff; border-bottom: 1px solid rgba(255,255,255,0.08); }
    .brand-mark { flex: none; width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(140deg,#e01c33,#8f0a1f); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 800; }
    .side-brand b { font-size: 15px; }
    .side-brand small { display: block; margin-top: 2px; font-size: 11px; color: rgba(255,255,255,0.45); }
    .sidenav { padding: 14px 12px; flex: 1; }
    .nav-label { padding: 0 10px 8px; font-size: 11px; font-weight: 700; letter-spacing: 0.12em; color: rgba(255,255,255,0.32); }
    .sidenav a, .side-foot a { display: flex; align-items: center; gap: 10px; padding: 11px 12px; margin: 2px 0; border-radius: 8px; color: var(--sidebar-text); font-size: 14px; }
    .sidenav a:hover, .side-foot a:hover { color: #fff; background: rgba(255,255,255,0.06); }
    .sidenav a.active { color: #fff; background: rgba(200,16,46,0.22); font-weight: 700; }
    .side-foot { padding: 14px 12px; border-top: 1px solid rgba(255,255,255,0.08); }
    .content { flex: 1; margin-left: 240px; min-width: 0; }
    .content-top { height: 64px; background: var(--panel); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 32px; position: sticky; top: 0; z-index: 20; }
    .content-top .who { font-size: 13px; color: var(--muted); }
    .page { padding: 28px 32px 56px; max-width: 1320px; }
    .page-title { margin: 0 0 4px; font-size: 22px; font-weight: 800; }
    .page-sub { margin: 0 0 22px; font-size: 13px; color: var(--muted); }
    .toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; }
    .search { flex: 1; min-width: 320px; height: 42px; padding: 0 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: inherit; color: var(--text); }
    .search:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(200,16,46,0.10); }
    .panel, .table-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
    .panel { padding: 26px; }
    .form-panel { max-width: 760px; }
    .data-table { width: 100%; border-collapse: collapse; }
    .data-table th, .data-table td { border-bottom: 1px solid var(--line); padding: 13px 14px; text-align: center; vertical-align: middle; font-size: 14px; }
    .data-table th { background: #f9fafc; color: #46536a; font-weight: 700; }
    .data-table .empty { text-align: center; color: var(--muted); padding: 30px 12px; }
    .center-cell { text-align: center; }
    .admin-table { width: auto; min-width: 460px; }
    .status-cell { width: auto; padding-right: 24px; }
    .status-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 56px; height: 26px; padding: 0 12px; border-radius: 999px; font-size: 12px; font-weight: 700; }
    .status-enabled { background: #ecfdf3; color: #1f7a46; }
    .status-disabled { background: var(--primary-soft); color: var(--primary-dark); }
    .row-actions { display: flex; gap: 8px; justify-content: center; align-items: center; }
    .row-actions form { margin: 0; }
    .primary-action { background: var(--primary); color: #fff; border: 0; border-radius: 8px; height: 34px; padding: 0 14px; cursor: pointer; font: inherit; }
    .primary-action:hover { background: var(--primary-dark); }
    .row-action-link, .row-action-danger { display: inline-flex; align-items: center; justify-content: center; height: 34px; min-width: 80px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--text); font: inherit; cursor: pointer; }
    .row-action-danger { color: var(--primary-dark); border-color: #f3c9ce; }
    .row-action-link:hover { background: var(--hover); }
    .row-action-danger:hover { background: var(--primary-soft); }
    .admin-actions { width: auto; white-space: nowrap; }
    .form { display: grid; gap: 16px; }
    .grid-form { grid-template-columns: 1fr 1fr; }
    .grid-form .full { grid-column: 1 / -1; }
    label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
    input, textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 11px 13px; font: inherit; background: #fff; color: var(--text); }
    input:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(200,16,46,0.10); }
    textarea { resize: vertical; }
    .checkbox { display: flex; align-items: center; gap: 8px; padding-top: 26px; color: var(--text); }
    .checkbox input { width: 17px; height: 17px; accent-color: var(--primary); }
    .form-actions { display: flex; gap: 12px; align-items: center; grid-column: 1 / -1; }
    .primary, .secondary, .pager-btn, .link-button { border: 0; border-radius: 8px; height: 42px; padding: 0 20px; display: inline-flex; align-items: center; justify-content: center; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
    .primary { background: var(--primary); color: #fff; }
    .primary:hover { background: var(--primary-dark); }
    .secondary, .link-button { background: #eef1f6; color: var(--text); }
    .secondary:hover, .link-button:hover { background: #e3e7ef; }
    .notice { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; }
    .notice.error { background: var(--primary-soft); color: var(--primary-dark); border: 1px solid #f3c9ce; }
    .pager { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; padding: 16px 16px 14px; }
    .pager-btn { background: #eef1f6; color: var(--text); min-width: 38px; height: 34px; padding: 0 10px; }
    .pager-btn.active { background: var(--primary); color: #fff; }
    .edit-layout { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }
    .form-body { display: grid; gap: 18px; }
    .form-section { border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; background: #fff; }
    .form-section-title { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; padding-bottom: 12px; font-size: 14px; font-weight: 700; border-bottom: 1px solid var(--line); }
    .section-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
    .fields-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
    .switch { display: flex; align-items: center; gap: 10px; margin-top: 16px; color: var(--text); cursor: pointer; }
    .switch input { position: absolute; opacity: 0; }
    .switch .track { width: 44px; height: 24px; border-radius: 999px; background: #cbd2dd; position: relative; flex: none; }
    .switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 999px; background: #fff; box-shadow: 0 1px 3px rgba(20,30,48,0.3); transition: transform 150ms; }
    .switch input:checked + .track { background: var(--primary); }
    .switch input:checked + .track::after { transform: translateX(20px); }
    .switch-hint { font-size: 12px; color: var(--muted); margin-left: 4px; }
    .side-card { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 20px; box-shadow: var(--shadow); }
    .side-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; margin: 0 0 16px; }
    .side-actions { display: grid; gap: 10px; }
    .side-actions .primary, .side-actions .secondary { width: 100%; }
    .side-note { margin: 16px 0 0; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 12px; color: var(--muted); line-height: 1.7; }
    .password-hint { margin-top: 18px; padding: 12px 14px; border-radius: 8px; font-size: 13px; line-height: 1.7; background: #f8fafc; border: 1px solid var(--line); color: var(--muted); }
    .auth-page { min-height: 100vh; position: relative; display: flex; align-items: center; justify-content: center; padding: 48px 24px; background: radial-gradient(1000px 500px at 85% -180px, rgba(255,255,255,0.10), transparent 55%), radial-gradient(700px 420px at -120px 110%, rgba(0,0,0,0.45), transparent 60%), linear-gradient(160deg,#2a0a10,#2a050c 35%,#71121f 75%,#8f0a1f 100%); overflow: hidden; }
    .auth-card { position: relative; z-index: 1; width: 100%; max-width: 560px; padding: 44px 46px 38px; background: rgba(255,255,255,0.98); border-radius: 20px; box-shadow: 0 30px 80px rgba(0,0,0,0.45); border: 1px solid rgba(255,255,255,0.6); }
    .auth-card .brand-mark { width: 48px; height: 48px; border-radius: 14px; font-size: 22px; box-shadow: 0 10px 24px rgba(200,16,46,0.32); }
    .auth-card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
    .auth-card .eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
    .auth-card h2 { margin: 6px 0 0; font-size: 22px; font-weight: 800; }
    .auth-desc { margin: 0 0 26px; padding-bottom: 22px; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--muted); line-height: 1.7; }
    .auth-card .auth-form { display: grid; gap: 18px; }
    .auth-card .auth-form input { height: 50px; font-size: 15px; padding: 0 14px; border-radius: 10px; }
    .auth-card .auth-form .primary { height: 50px; font-size: 15px; border-radius: 10px; margin-top: 6px; }
    .auth-foot { margin-top: 24px; padding-top: 16px; border-top: 1px dashed var(--line); display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); }
    .auth-foot .chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 12px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-dark); font-weight: 700; font-size: 12px; }
    @media (max-width: 980px) { .sidebar { width: 200px; } .content { margin-left: 200px; } .edit-layout { grid-template-columns: 1fr; } }
    @media (max-width: 900px) { .grid-form, .section-grid, .fields-3 { grid-template-columns: 1fr; } .search { min-width: 0; } .toolbar { flex-direction: column; align-items: stretch; } .sidebar { display: none; } .content { margin-left: 0; } }