@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;600;700;800&display=swap");
/* 后台整体视觉基调与组件样式。 */

:root {
    color-scheme: only light;
    --bg: #0b1220;
    --card: #f8fafc;
    --accent: #f97316;
    --accent-strong: #ea580c;
    --text: #0f172a;
    --muted: #64748b;
    --error: #dc2626;
    --shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
    --radius: 22px;
    font-family: "Manrope", "Segoe UI", system-ui, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top, #1f2937 0%, #0b1220 45%, #020617 100%);
    color: var(--text);
}

.auth-body::before,
.dashboard-body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: linear-gradient(120deg, rgba(251, 146, 60, 0.2), transparent 55%);
    pointer-events: none;
}

.auth-shell {
    position: relative;
    width: min(960px, 92vw);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    place-items: center;
    padding: 32px 0;
}

.auth-scene {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: 28px;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(0.5px);
}

.orb-one {
    width: 240px;
    height: 240px;
    background: radial-gradient(circle, rgba(251, 146, 60, 0.75), transparent 60%);
    top: -40px;
    right: 10%;
}

.orb-two {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(14, 116, 144, 0.7), transparent 60%);
    bottom: -50px;
    left: 5%;
}

.grid-line {
    position: absolute;
    inset: 14% 12%;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 28px;
    box-shadow: inset 0 0 0 1px rgba(248, 250, 252, 0.05);
}

.auth-card {
    position: relative;
    width: min(440px, 92vw);
    padding: 36px 34px 30px;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    animation: float-in 0.6s ease-out;
}

.dashboard-body {
    align-items: stretch;
    justify-content: flex-start;
    background: linear-gradient(180deg, #0f172a 0%, #111827 40%, #0b1220 100%);
}

.app-shell {
    width: 100%;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.sidebar {
    padding: 32px 24px;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(12px);
    color: #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(140deg, var(--accent), var(--accent-strong));
    display: grid;
    place-items: center;
    font-weight: 800;
    color: #0f172a;
}

.brand-title {
    font-weight: 700;
    font-size: 16px;
}

.brand-sub {
    font-size: 12px;
    color: rgba(226, 232, 240, 0.7);
}

.nav {
    display: grid;
    gap: 10px;
}

.nav-link {
    padding: 10px 14px;
    border-radius: 12px;
    color: rgba(226, 232, 240, 0.82);
    text-decoration: none;
    font-weight: 600;
    background: transparent;
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(248, 250, 252, 0.12);
    color: #f8fafc;
}

.sidebar-footer {
    margin-top: auto;
    display: grid;
    gap: 10px;
}

.user-chip {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(148, 163, 184, 0.16);
    font-size: 14px;
}

.link-muted {
    color: rgba(226, 232, 240, 0.7);
    text-decoration: none;
    font-size: 14px;
}

.main {
    padding: 32px 36px 48px;
    color: #e2e8f0;
}

.topbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
}

.topbar h1 {
    margin: 0;
    font-size: 28px;
}

.topbar p {
    margin: 6px 0 0;
    color: rgba(226, 232, 240, 0.7);
}

.pill {
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(248, 250, 252, 0.12);
    font-size: 12px;
    font-weight: 600;
}

.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.stat-card {
    padding: 18px;
    border-radius: 16px;
    background: rgba(248, 250, 252, 0.08);
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.2);
}

.stat-label {
    font-size: 13px;
    color: rgba(226, 232, 240, 0.7);
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    margin-top: 6px;
}

.panel {
    padding: 22px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.78);
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.15);
    margin-bottom: 20px;
}

.panel .field {
    color: #e2e8f0;
}

.panel .field span {
    color: rgba(226, 232, 240, 0.85);
}

.panel-header h2 {
    margin: 0 0 6px;
    font-size: 20px;
}

.panel-header p {
    margin: 0 0 16px;
    color: rgba(226, 232, 240, 0.7);
}

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

select,
input[type="text"],
input[type="password"],
textarea {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(15, 23, 42, 0.8);
    color: #f8fafc;
    font-size: 15px;
    outline: none;
}

input[type="date"] {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(15, 23, 42, 0.8);
    color: #f8fafc;
    font-size: 14px;
    outline: none;
}

select:focus,
input[type="text"]:focus,
input[type="password"]:focus,
textarea:focus {
    border-color: rgba(249, 115, 22, 0.8);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2);
}

input[type="date"]:focus {
    border-color: rgba(249, 115, 22, 0.8);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2);
}

textarea {
    resize: vertical;
}

input::placeholder,
textarea::placeholder {
    color: rgba(226, 232, 240, 0.55);
}

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

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

thead th {
    text-align: left;
    padding: 10px;
    color: rgba(226, 232, 240, 0.7);
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

tbody td {
    padding: 12px 10px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.mono {
    font-family: "JetBrains Mono", "SFMono-Regular", ui-monospace, monospace;
    font-size: 13px;
}

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.code-block {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.9);
    font-family: "JetBrains Mono", "SFMono-Regular", ui-monospace, monospace;
    font-size: 13px;
    color: #f8fafc;
}

.help-text {
    margin-top: 8px;
    font-size: 13px;
    color: rgba(226, 232, 240, 0.65);
}

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

.table-action-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-bar,
.bulk-provider {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.bulk-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 12px;
}

.filter-bar .field {
    min-width: 180px;
}

.table-actions .help-text {
    margin: 0;
}

input[type="checkbox"] {
    accent-color: var(--accent);
}

.pagination {
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
    color: rgba(226, 232, 240, 0.7);
}

.page-links {
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-link {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(248, 250, 252, 0.12);
    color: #f8fafc;
    text-decoration: none;
    font-weight: 600;
}

.auth-header h1 {
    margin: 14px 0 8px;
    font-size: 30px;
    letter-spacing: 0.02em;
}

.auth-header p {
    margin: 0 0 22px;
    color: var(--muted);
}

.auth-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.15);
    color: var(--accent-strong);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 12px;
}

.auth-form {
    display: grid;
    gap: 16px;
}

.field {
    display: grid;
    gap: 8px;
    font-weight: 700;
    color: #1f2937;
}

.field input {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    font-size: 15px;
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus {
    border-color: rgba(249, 115, 22, 0.8);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.18);
}

.auth-card .field input {
    background: #ffffff;
    color: #0f172a;
}

.toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-weight: 600;
    font-size: 14px;
}

.toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.toggle .track {
    width: 46px;
    height: 24px;
    border-radius: 999px;
    background: #e2e8f0;
    position: relative;
    transition: background 0.2s ease;
}

.toggle .track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.25);
    transition: transform 0.2s ease;
}

.toggle input:checked + .track {
    background: rgba(249, 115, 22, 0.8);
}

.toggle input:checked + .track::after {
    transform: translateX(22px);
}

.primary-btn,
.secondary-btn {
    border: none;
    padding: 12px 18px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.primary-btn {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #1f2937;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(249, 115, 22, 0.3);
}

.secondary-btn {
    background: #0f172a;
    color: #f8fafc;
}

.link-btn {
    border: none;
    background: transparent;
    color: var(--accent);
    cursor: pointer;
    font-weight: 600;
    padding: 0;
}

.inline-form {
    display: inline;
}

.auth-error {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(220, 38, 38, 0.12);
    color: var(--error);
    font-weight: 700;
    animation: shake 0.25s ease-in-out;
}

.auth-success {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(34, 197, 94, 0.12);
    color: #22c55e;
    font-weight: 700;
}

.auth-footer {
    margin-top: 18px;
    color: var(--muted);
    font-size: 14px;
}

@keyframes float-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%,
    100% {
        transform: translateX(0);
    }
    40% {
        transform: translateX(-6px);
    }
    70% {
        transform: translateX(6px);
    }
}

@media (max-width: 640px) {
    body {
        align-items: flex-start;
    }

    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: sticky;
        top: 0;
        z-index: 2;
    }

    .main {
        padding: 24px 20px 40px;
    }

    .auth-card {
        padding: 30px 22px 26px;
    }
}
