:root {
    color-scheme: light;
    --bg: #eef3f7;
    --navy: #0f172a;
    --navy-soft: #1e293b;
    --teal: #0f766e;
    --teal-soft: #d9fbf5;
    --amber-soft: #fff4cf;
    --slate-soft: #e8eef5;
    --line: rgba(148, 163, 184, 0.22);
    --panel-bg: rgba(255, 255, 255, 0.9);
    --shadow: 0 24px 48px rgba(15, 23, 42, 0.08);
    font-family: "Microsoft YaHei UI", "PingFang SC", sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-width: 1280px;
    min-height: 100vh;
    color: var(--navy);
    background:
        radial-gradient(circle at top left, rgba(13, 148, 136, 0.16), transparent 24%),
        radial-gradient(circle at bottom right, rgba(15, 23, 42, 0.08), transparent 24%),
        linear-gradient(180deg, #f5fafc 0%, var(--bg) 100%);
}

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

button,
input,
select {
    font: inherit;
}

.toast {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 30;
    min-width: 260px;
    padding: 14px 16px;
    border-radius: 16px;
    box-shadow: var(--shadow);
}

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

.toast-error {
    color: #991b1b;
    background: #fee2e2;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 700;
}

.eyebrow::before {
    content: "";
    width: 28px;
    height: 1px;
    background: currentColor;
    opacity: 0.45;
}

.eyebrow.light {
    color: #94a3b8;
}

.panel-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    margin-bottom: 14px;
    border-radius: 999px;
    color: var(--teal);
    background: var(--teal-soft);
    font-size: 12px;
    font-weight: 700;
}

.login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-card {
    width: 1060px;
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 28px 56px rgba(15, 23, 42, 0.14);
    backdrop-filter: blur(18px);
}

.login-brand {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 56px 50px;
    color: #ecfeff;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.22), transparent 32%),
        radial-gradient(circle at 88% 18%, rgba(94, 234, 212, 0.24), transparent 16%),
        linear-gradient(145deg, #0f766e 0%, #115e59 44%, #0f172a 100%);
}

.login-brand h1 {
    margin: 0;
    font-size: 38px;
    line-height: 1.15;
}

.login-brand p {
    margin: 0;
    line-height: 1.8;
    color: rgba(236, 254, 255, 0.82);
}

.brand-grid {
    display: grid;
    gap: 14px;
}

.brand-grid article {
    padding: 16px 18px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
}

.brand-grid strong {
    display: block;
}

.brand-grid span {
    display: block;
    margin-top: 6px;
    line-height: 1.6;
    color: rgba(236, 254, 255, 0.78);
}

.login-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 46px;
}

.login-panel h2 {
    margin: 0;
    font-size: 32px;
}

.subtitle,
.login-note,
.sidebar-card span,
.sidebar-card small,
.user-chip span,
.recent-copy span,
.recent-item time,
.user-copy span,
.muted {
    color: #64748b;
}

.login-note {
    margin-top: 18px;
    line-height: 1.7;
    font-size: 13px;
}

.stack-form,
.inline-form,
.compact-form {
    display: flex;
    gap: 14px;
}

.stack-form {
    flex-direction: column;
}

.inline-form {
    align-items: end;
    flex-wrap: wrap;
}

.compact-form {
    align-items: center;
    flex-wrap: wrap;
}

.stack-form label,
.inline-form label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #334155;
    font-size: 14px;
    font-weight: 600;
}

input,
select {
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid #d7e0ea;
    border-radius: 12px;
    background: #fff;
    color: var(--navy);
    transition: border-color .2s ease, box-shadow .2s ease;
}

input:focus,
select:focus {
    outline: none;
    border-color: rgba(15, 118, 110, 0.45);
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.primary-btn,
.ghost-btn,
.danger-btn {
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease;
}

.primary-btn:hover,
.ghost-btn:hover,
.danger-btn:hover {
    transform: translateY(-1px);
}

.primary-btn {
    min-height: 44px;
    padding: 0 20px;
    color: #fff;
    background: linear-gradient(135deg, #0f766e 0%, #0f172a 100%);
    box-shadow: 0 12px 24px rgba(15, 118, 110, 0.2);
}

.ghost-btn {
    min-height: 40px;
    padding: 0 16px;
    color: var(--navy);
    background: #e8eef5;
}

.danger-btn {
    min-height: 36px;
    padding: 0 14px;
    color: #fff;
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
}

.small {
    min-height: 34px;
    padding: 0 12px;
}

.admin-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 256px 1fr;
}

.sidebar {
    display: flex;
    flex-direction: column;
    padding: 28px 20px 24px;
    color: #e2e8f0;
    background:
        radial-gradient(circle at top left, rgba(94, 234, 212, 0.18), transparent 24%),
        linear-gradient(180deg, #0f172a 0%, #111827 100%);
}

.brand-box {
    margin-bottom: 28px;
}

.brand-box h1 {
    margin: 0;
    font-size: 26px;
}

.brand-box p {
    margin: 8px 0 0;
    color: #94a3b8;
    line-height: 1.7;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-menu a {
    padding: 14px 16px;
    border-radius: 14px;
    color: #cbd5e1;
    font-weight: 600;
}

.nav-menu a.active,
.nav-menu a:hover {
    color: #fff;
    background: rgba(94, 234, 212, 0.14);
}

.sidebar-card {
    margin-top: auto;
    padding: 16px 18px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
}

.sidebar-card strong,
.user-chip strong,
.user-copy strong {
    display: block;
    margin: 6px 0 4px;
}

.content {
    padding: 28px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 24px;
}

.topbar h2 {
    margin: 0;
    font-size: 30px;
    line-height: 1.18;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-chip {
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

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

.metric-card,
.panel {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.metric-card span {
    display: block;
    margin-bottom: 14px;
    color: #64748b;
    font-weight: 600;
}

.metric-card strong {
    font-size: 34px;
    line-height: 1.1;
}

.accent-teal {
    background: linear-gradient(180deg, rgba(217, 251, 245, 0.82) 0%, rgba(255, 255, 255, 0.92) 100%);
}

.accent-navy {
    background: linear-gradient(180deg, rgba(224, 231, 255, 0.8) 0%, rgba(255, 255, 255, 0.92) 100%);
}

.accent-amber {
    background: linear-gradient(180deg, rgba(254, 243, 199, 0.84) 0%, rgba(255, 255, 255, 0.92) 100%);
}

.accent-slate {
    background: linear-gradient(180deg, rgba(226, 232, 240, 0.84) 0%, rgba(255, 255, 255, 0.92) 100%);
}

.panel-grid {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 20px;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.panel-head h3 {
    margin: 0;
    font-size: 20px;
}

.soft-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    color: var(--teal);
    background: var(--teal-soft);
    font-size: 12px;
    font-weight: 700;
}

.link-action {
    color: var(--teal);
    font-size: 14px;
    font-weight: 700;
}

.info-list {
    margin: 0;
}

.info-list div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
}

.info-list dt {
    color: #64748b;
}

.recent-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recent-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid #edf2f7;
    background: #f8fafc;
}

.recent-main,
.user-name-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.recent-copy,
.user-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.avatar-pill {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, #0f766e 0%, #0f172a 100%);
    font-weight: 700;
}

.avatar-pill.small {
    width: 34px;
    height: 34px;
    border-radius: 12px;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table th,
.data-table td {
    padding: 14px 12px;
    border-bottom: 1px solid #edf2f7;
    text-align: left;
    vertical-align: top;
}

.data-table thead th {
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
    background: #f8fafc;
}

.data-table thead th:first-child {
    border-top-left-radius: 14px;
}

.data-table thead th:last-child {
    border-top-right-radius: 14px;
}

.badge {
    display: inline-block;
    margin-top: 8px;
    padding: 3px 9px;
    border-radius: 999px;
    color: var(--navy);
    background: #dbeafe;
    font-size: 12px;
    font-weight: 700;
}

.empty-tip {
    color: #64748b;
}
