/* ==========================================================================
   炎黄科技管理后台 · 现代化样式
   ========================================================================== */

:root {
    --bg: #f4f6fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --ink: #0f172a;
    --ink-soft: #334155;
    --muted: #64748b;
    --line: #e2e8f0;
    --line-strong: #cbd5e1;
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-soft: #eef2ff;
    --success: #047857;
    --success-soft: #ecfdf5;
    --warning: #b45309;
    --warning-soft: #fffbeb;
    --danger: #b91c1c;
    --danger-soft: #fef2f2;
    --info: #0369a1;
    --info-soft: #e0f2fe;
    --sidebar-top: #111827;
    --sidebar-bottom: #1e1b4b;
    --radius-lg: 18px;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow: 0 10px 30px -12px rgba(15, 23, 42, 0.18);
    --shadow-lg: 0 24px 60px -20px rgba(15, 23, 42, 0.35);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

h1,
h2,
h3,
p {
    margin: 0;
}

svg {
    display: block;
}

.icon {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

.icon-flip {
    transform: rotate(180deg);
}

.mono,
code {
    font-family: var(--mono);
}

.muted {
    color: var(--muted);
}

/* --------------------------------- 布局 --------------------------------- */

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    width: 264px;
    min-height: 100vh;
    padding: 24px 18px;
    color: #cbd5e1;
    background: linear-gradient(165deg, var(--sidebar-top) 0%, var(--sidebar-bottom) 100%);
    overflow-y: auto;
    z-index: 40;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 8px 24px;
    color: #f8fafc;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    font-size: 19px;
    font-weight: 700;
    color: #fff;
    border-radius: 13px;
    background: linear-gradient(140deg, #6366f1, #8b5cf6 55%, #ec4899);
    box-shadow: 0 10px 24px -8px rgba(139, 92, 246, 0.75);
}

.brand-text,
.auth-brand span:last-child {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.brand-text strong {
    font-size: 15px;
    letter-spacing: 0.04em;
}

.brand-text small {
    font-size: 11px;
    color: #94a3b8;
    letter-spacing: 0.16em;
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding-top: 8px;
}

.nav-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-group-title {
    padding: 0 12px 6px;
    font-size: 11px;
    letter-spacing: 0.16em;
    color: #64748b;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    font-size: 13.5px;
    color: #cbd5e1;
    border-radius: var(--radius-sm);
    transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.nav-link svg {
    width: 17px;
    height: 17px;
    opacity: 0.75;
}

.nav-link:hover {
    color: #fff;
    background: rgba(148, 163, 184, 0.14);
}

.nav-link.is-active {
    color: #fff;
    background: linear-gradient(120deg, rgba(99, 102, 241, 0.9), rgba(139, 92, 246, 0.75));
    box-shadow: 0 10px 24px -12px rgba(99, 102, 241, 0.9);
}

.nav-link.is-active svg {
    opacity: 1;
}

.nav-sub {
    padding-left: 30px;
    font-size: 13px;
    color: #94a3b8;
}

.sidebar-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding: 12px;
    font-size: 11.5px;
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--radius-sm);
    background: rgba(148, 163, 184, 0.06);
}

.sidebar-note svg {
    width: 16px;
    height: 16px;
    color: #a5b4fc;
}

.main {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 28px;
    background: rgba(255, 255, 255, 0.86);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
}

.topbar-title {
    flex: 1;
    min-width: 0;
}

.topbar-title h1 {
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.topbar-title p {
    font-size: 12px;
    color: var(--muted);
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    font-size: 14px;
    font-weight: 600;
    color: #4338ca;
    text-transform: uppercase;
    border-radius: 50%;
    background: var(--primary-soft);
}

.user-name {
    max-width: 140px;
    overflow: hidden;
    font-size: 13px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.menu-btn {
    display: none;
}

.content {
    flex: 1;
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 28px;
}

.footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 28px 26px;
    font-size: 12px;
    color: var(--muted);
}

.footer-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--line-strong);
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 35;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
}

/* --------------------------------- 卡片 --------------------------------- */

.card,
.stat-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    animation: rise 0.32s ease both;
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.card {
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, #fff, var(--surface-soft));
}

.card-header h2 {
    font-size: 16px;
    font-weight: 700;
}

.card-header .muted {
    font-size: 12px;
}

.card-actions {
    display: flex;
    gap: 8px;
}

.card-form {
    max-width: 860px;
}

.card-form .form {
    padding: 22px;
}

/* --------------------------------- 仪表盘 -------------------------------- */

.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 28px;
    margin-bottom: 20px;
    color: #eef2ff;
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at 88% 12%, rgba(236, 72, 153, 0.35), transparent 42%),
        radial-gradient(circle at 12% 90%, rgba(56, 189, 248, 0.28), transparent 46%),
        linear-gradient(120deg, #1e1b4b, #312e81 55%, #4338ca);
    box-shadow: var(--shadow-lg);
}

.hero h2 {
    margin: 6px 0 4px;
    font-size: 24px;
    color: #fff;
    letter-spacing: -0.01em;
}

.hero-kicker {
    font-size: 12px;
    letter-spacing: 0.18em;
    color: #a5b4fc;
}

.hero-text {
    font-size: 13px;
    color: #c7d2fe;
}

.hero-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.28);
    backdrop-filter: blur(6px);
}

.hero-badge svg {
    width: 24px;
    height: 24px;
    color: #fbbf24;
}

.hero-badge div {
    display: flex;
    flex-direction: column;
    line-height: 1.35;
}

.hero-badge strong {
    font-size: 14px;
    color: #fff;
}

.hero-badge span {
    font-size: 11.5px;
    color: #c7d2fe;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.stat-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 13px;
}

.stat-icon svg {
    width: 21px;
    height: 21px;
}

.stat-body {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.stat-value {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 12px;
    color: var(--muted);
}

.stat-arrow {
    margin-left: auto;
    color: var(--line-strong);
}

.stat-arrow svg {
    width: 16px;
    height: 16px;
}

.tone-indigo {
    color: #4338ca;
    background: var(--primary-soft);
}

.tone-emerald {
    color: var(--success);
    background: var(--success-soft);
}

.tone-sky {
    color: var(--info);
    background: var(--info-soft);
}

.tone-amber {
    color: var(--warning);
    background: var(--warning-soft);
}

.tone-danger {
    color: var(--danger);
    background: var(--danger-soft);
}

.tone-warning {
    color: var(--warning);
    background: var(--warning-soft);
}

.tone-info {
    color: var(--info);
    background: var(--info-soft);
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.timeline,
.notice-list {
    padding: 8px 22px 18px;
    margin: 0;
    list-style: none;
}

.timeline-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px dashed var(--line);
}

.timeline-item:last-child,
.notice-item:last-child {
    border-bottom: none;
}

.timeline-dot {
    flex: 0 0 auto;
    width: 9px;
    height: 9px;
    margin-top: 7px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.16);
}

.timeline-body {
    min-width: 0;
}

.timeline-head {
    display: flex;
    align-items: center;
    gap: 8px;
}

.timeline-head strong {
    font-size: 13.5px;
}

.timeline-body .muted {
    font-size: 12px;
}

.notice-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px dashed var(--line);
}

.notice-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.4;
}

.notice-body strong {
    font-size: 13.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notice-body .muted {
    font-size: 11.5px;
}

/* --------------------------------- 表格 --------------------------------- */

.table-wrap {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.table th {
    padding: 12px 18px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--muted);
    text-align: left;
    letter-spacing: 0.08em;
    white-space: nowrap;
    border-bottom: 1px solid var(--line);
    background: var(--surface-soft);
}

.table td {
    padding: 14px 18px;
    vertical-align: middle;
    border-bottom: 1px solid var(--line);
}

.table tbody tr {
    transition: background 0.14s ease;
}

.table tbody tr:hover {
    background: #f8faff;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.th-actions,
.cell-actions {
    text-align: right;
    white-space: nowrap;
}

.cell-main {
    font-weight: 600;
    color: var(--ink);
}

.cell-sub {
    font-size: 11.5px;
    color: var(--muted);
}

.cell-actions > * {
    vertical-align: middle;
}

.cell-actions > * + * {
    margin-left: 4px;
}

.price {
    font-weight: 600;
    color: var(--ink);
}

.code-cell {
    display: flex;
    align-items: center;
    gap: 4px;
}

.code-cell code {
    padding: 4px 8px;
    font-size: 11px;
    letter-spacing: -0.2px;
    color: #334155;
    border-radius: 7px;
    background: #f1f5f9;
    white-space: nowrap;
}

.empty {
    padding: 46px 20px;
    font-size: 13px;
    color: var(--muted);
    text-align: center;
}

.link {
    display: inline-block;
    max-width: 260px;
    overflow: hidden;
    color: var(--primary);
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

.link:hover {
    text-decoration: underline;
}

/* --------------------------------- 徽章 --------------------------------- */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.6;
    border-radius: 999px;
    white-space: nowrap;
}

.badge-success {
    color: #166534;
    background: #dcfce7;
}

.badge-warning {
    color: #92400e;
    background: #fef3c7;
}

.badge-danger {
    color: #991b1b;
    background: #fee2e2;
}

.badge-info {
    color: #075985;
    background: #e0f2fe;
}

.badge-neutral {
    color: #475569;
    background: #f1f5f9;
}

/* --------------------------------- 按钮 --------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 16px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--ink-soft);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: transparent;
    cursor: pointer;
    transition: background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease, color 0.16s ease;
    white-space: nowrap;
}

.btn svg {
    width: 16px;
    height: 16px;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    color: #fff;
    background: linear-gradient(120deg, #4f46e5, #7c3aed);
    box-shadow: 0 10px 22px -12px rgba(79, 70, 229, 0.85);
}

.btn-primary:hover {
    background: linear-gradient(120deg, #4338ca, #6d28d9);
}

.btn-ghost {
    color: var(--ink-soft);
    border-color: var(--line);
    background: var(--surface);
}

.btn-ghost:hover {
    background: var(--surface-soft);
    border-color: var(--line-strong);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-block {
    width: 100%;
    padding: 11px 16px;
}

.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    color: var(--muted);
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    cursor: pointer;
    transition: background 0.14s ease, color 0.14s ease;
}

.icon-btn svg {
    width: 17px;
    height: 17px;
}

.icon-btn:hover {
    color: var(--ink);
    background: var(--surface-soft);
    border-color: var(--line);
}

.icon-btn.is-danger:hover {
    color: var(--danger);
    background: var(--danger-soft);
    border-color: #fecaca;
}

.icon-btn.is-copied {
    color: var(--success);
    background: var(--success-soft);
    border-color: #a7f3d0;
}

.inline-form {
    display: inline-flex;
    margin: 0;
}

/* --------------------------------- 表单 --------------------------------- */

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 20px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.field-full {
    grid-column: 1 / -1;
}

.field label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink-soft);
}

.req {
    color: var(--danger);
}

.input {
    width: 100%;
    padding: 9px 12px;
    font-family: inherit;
    font-size: 13.5px;
    color: var(--ink);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.16);
}

.input.is-invalid {
    border-color: var(--danger);
}

.input.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.14);
}

.textarea {
    min-height: 120px;
    font-family: var(--mono);
    font-size: 13px;
    line-height: 1.65;
    resize: vertical;
}

.field-hint {
    font-size: 11.5px;
    color: var(--muted);
}

.field-error {
    font-size: 11.5px;
    font-weight: 500;
    color: var(--danger);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 22px;
    margin-top: 22px;
    border-top: 1px solid var(--line);
}

/* --------------------------------- 提示 --------------------------------- */

.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    margin-bottom: 18px;
    font-size: 13px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    animation: rise 0.25s ease both;
}

.alert svg {
    width: 17px;
    height: 17px;
}

.alert.is-hiding {
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.24s ease, transform 0.24s ease;
}

.alert-close {
    margin-left: auto;
    padding: 0 4px;
    font-size: 18px;
    line-height: 1;
    color: inherit;
    border: 0;
    background: transparent;
    opacity: 0.6;
    cursor: pointer;
}

.alert-close:hover {
    opacity: 1;
}

.alert-success {
    color: #065f46;
    border-color: #a7f3d0;
    background: var(--success-soft);
}

.alert-error {
    color: #991b1b;
    border-color: #fecaca;
    background: var(--danger-soft);
}

.alert-warning {
    color: #92400e;
    border-color: #fde68a;
    background: var(--warning-soft);
}

.alert-info {
    color: #075985;
    border-color: #bae6fd;
    background: var(--info-soft);
}

/* --------------------------------- 分页 --------------------------------- */

.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 22px;
    border-top: 1px solid var(--line);
    background: var(--surface-soft);
}

.pagination-info {
    font-size: 12px;
    color: var(--muted);
}

.pagination {
    display: flex;
    align-items: center;
    gap: 4px;
}

.page-btn {
    display: inline-grid;
    place-items: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--ink-soft);
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--surface);
    transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.page-btn svg {
    width: 15px;
    height: 15px;
}

a.page-btn:hover {
    color: var(--primary);
    border-color: #c7d2fe;
    background: var(--primary-soft);
}

.page-btn.is-active {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(120deg, #4f46e5, #7c3aed);
}

.page-btn.is-disabled {
    color: var(--line-strong);
    cursor: default;
    background: transparent;
}

.page-ellipsis {
    padding: 0 4px;
    color: var(--muted);
}

/* --------------------------------- 登录页 -------------------------------- */

.auth-body {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 24px;
    background:
        radial-gradient(circle at 12% 18%, rgba(99, 102, 241, 0.45), transparent 42%),
        radial-gradient(circle at 88% 82%, rgba(14, 165, 233, 0.32), transparent 40%),
        radial-gradient(circle at 70% 10%, rgba(236, 72, 153, 0.22), transparent 36%),
        #070b1a;
}

.auth-layout {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    width: min(1020px, 100%);
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.35);
    box-shadow: 0 40px 100px -30px rgba(2, 6, 23, 0.9);
    backdrop-filter: blur(18px);
}

.auth-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 22px;
    padding: 56px 48px;
    color: #e2e8f0;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    color: #f8fafc;
}

.auth-brand small {
    font-size: 11px;
    letter-spacing: 0.16em;
    color: #94a3b8;
}

.auth-panel h1 {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.25;
    color: #fff;
    letter-spacing: -0.02em;
}

.auth-lead {
    max-width: 420px;
    font-size: 13.5px;
    line-height: 1.8;
    color: #cbd5e1;
}

.auth-points {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0;
    margin: 4px 0 0;
    list-style: none;
    font-size: 13px;
    color: #c7d2fe;
}

.auth-points li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.point-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #818cf8;
    box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.16);
}

.auth-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 52px 48px;
    background: var(--surface);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.auth-card-head h2 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.auth-card-head p {
    font-size: 12.5px;
    color: var(--muted);
}

.auth-card .field label {
    font-size: 12px;
}

.auth-card .input {
    padding: 10px 12px;
}

.auth-foot {
    margin-top: 24px;
    font-size: 11.5px;
    color: var(--muted);
    text-align: center;
}

/* --------------------------------- 错误页 -------------------------------- */

.error-body {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 24px;
    background: #0b1120;
}

.error-card {
    width: min(480px, 100%);
    padding: 44px;
    text-align: center;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 24px;
    background: #111827;
    box-shadow: var(--shadow-lg);
}

.error-code {
    display: block;
    font-size: 56px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
    background: linear-gradient(120deg, #818cf8, #f472b6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.error-card h1 {
    margin: 14px 0 8px;
    font-size: 20px;
    color: #f8fafc;
}

.error-card p {
    margin-bottom: 24px;
    font-size: 13px;
    color: #94a3b8;
}

.error-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.error-card .btn-ghost {
    color: #cbd5e1;
    border-color: rgba(148, 163, 184, 0.28);
    background: transparent;
}

/* --------------------------------- 响应式 -------------------------------- */

@media (max-width: 1100px) {
    .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 960px) {
    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        height: 100vh;
        transform: translateX(-100%);
        transition: transform 0.24s ease;
        box-shadow: var(--shadow-lg);
    }

    .sidebar.is-open {
        transform: none;
    }

    .menu-btn {
        display: inline-grid;
    }

    .topbar {
        padding: 14px 18px;
    }

    .content {
        padding: 20px 18px;
    }

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

    .auth-panel {
        padding: 36px 32px;
        gap: 16px;
    }

    .auth-panel h1 {
        font-size: 28px;
    }

    .auth-card {
        padding: 36px 32px;
    }
}

@media (max-width: 640px) {
    .hero {
        flex-direction: column;
        align-items: flex-start;
        padding: 22px;
    }

    .hero h2 {
        font-size: 20px;
    }

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

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

    .field-full {
        grid-column: auto;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .pagination-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .user-name {
        display: none;
    }

    .table th,
    .table td {
        padding: 11px 12px;
    }

    .auth-panel {
        display: none;
    }

    .auth-card {
        padding: 30px 24px;
    }

    .error-card {
        padding: 32px 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
    }
}
