@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;700&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap");

:root {
    --bg: #f4f7fb;
    --bg-accent: #edf7f6;
    --panel: rgba(255, 255, 255, 0.92);
    --panel-strong: #ffffff;
    --panel-dark: #10203f;
    --line: rgba(29, 45, 74, 0.1);
    --line-strong: rgba(29, 45, 74, 0.18);
    --ink: #162033;
    --muted: #65718a;
    --navy: #15325b;
    --teal: #0f8b8d;
    --teal-soft: #d8f4ef;
    --amber: #f4a524;
    --amber-soft: #fff0cc;
    --coral: #f15a5a;
    --coral-soft: #ffe0df;
    --green: #1c9a6d;
    --green-soft: #daf5e8;
    --blue-soft: #dcecff;
    --shadow-lg: 0 30px 60px rgba(16, 32, 63, 0.12);
    --shadow-md: 0 16px 30px rgba(16, 32, 63, 0.08);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(15, 139, 141, 0.18), transparent 28%),
        radial-gradient(circle at top right, rgba(244, 165, 36, 0.16), transparent 24%),
        linear-gradient(180deg, #f8fbff 0%, #eef3f8 100%);
}

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

button,
input,
select,
textarea {
    font: inherit;
}

textarea {
    resize: vertical;
}

code {
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(16, 32, 63, 0.07);
    font-size: 0.92em;
}

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

.sidebar {
    position: relative;
    overflow: hidden;
    padding: 28px 22px;
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.12), transparent 30%),
        linear-gradient(180deg, #143660 0%, #0c1c36 100%);
    color: #f8fbff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 28px;
}

.sidebar::after {
    content: "";
    position: absolute;
    inset: auto -60px -80px auto;
    width: 180px;
    height: 180px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    filter: blur(8px);
}

.sidebar-top,
.sidebar-bottom,
.nav,
.hero-copy,
.hero-stack,
.stack-list,
.auth-shell,
.auth-copy,
.auth-points,
.form-grid,
.content-grid,
.detail-grid,
.page-header,
.stats-grid,
.summary-strip,
.toolbar,
.panel {
    display: grid;
    gap: 18px;
}

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

.brand strong,
.brand small {
    display: block;
}

.brand strong,
.page-header h1,
.hero-copy h1,
.auth-copy h1,
.auth-card h1,
.auth-card h2,
.card h2,
.card h3,
.stat-card strong,
.spotlight-card strong {
    font-family: "Space Grotesk", "Plus Jakarta Sans", sans-serif;
}

.brand small,
.user-chip span,
.user-chip small {
    color: rgba(248, 251, 255, 0.72);
}

.brand-mark {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #12253f;
    background: linear-gradient(135deg, #aef3de 0%, #ffd56f 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.sidebar-action,
.button,
.button-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 16px;
    padding: 12px 18px;
    font-weight: 700;
    border: 1px solid transparent;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
    cursor: pointer;
}

.sidebar-action {
    background: rgba(174, 243, 222, 0.16);
    color: #ebfff9;
    border-color: rgba(174, 243, 222, 0.22);
}

.button {
    background: linear-gradient(135deg, #0f8b8d 0%, #1c9a6d 100%);
    color: #fff;
    box-shadow: 0 14px 28px rgba(15, 139, 141, 0.18);
}

.button-secondary {
    background: rgba(255, 255, 255, 0.78);
    border-color: var(--line);
    color: var(--navy);
}

.sidebar-action:hover,
.button:hover,
.button-secondary:hover {
    transform: translateY(-1px);
}

.nav a {
    padding: 13px 14px;
    border-radius: 15px;
    color: rgba(248, 251, 255, 0.82);
    border: 1px solid transparent;
}

.nav a.is-active,
.nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.08);
}

.user-chip {
    margin: 0;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
}

.user-chip strong,
.user-chip span,
.user-chip small {
    display: block;
}

.logout-link {
    color: #cce8ff;
}

.main {
    padding: 34px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--teal);
    font-weight: 700;
}

.eyebrow::before {
    content: "";
    width: 26px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--teal), var(--amber));
}

.page-header {
    grid-template-columns: 1fr auto;
    align-items: end;
    margin-bottom: 8px;
}

.page-header h1,
.hero-copy h1,
.auth-copy h1,
.auth-card h1 {
    margin: 6px 0 10px;
    font-size: clamp(2rem, 4vw, 3.45rem);
    line-height: 1.02;
}

.page-header h2,
.auth-card h2 {
    margin: 6px 0 10px;
    font-size: clamp(1.5rem, 3vw, 2rem);
}

.page-header p,
.hero-copy p,
.auth-copy p,
.mini-card p,
.detail-block p,
.footer,
.muted,
.hint {
    color: var(--muted);
}

.page-header p,
.hero-copy p,
.auth-copy p,
.auth-card p {
    margin: 0;
    max-width: 780px;
    line-height: 1.7;
}

.hero-panel,
.card,
.stat-card,
.spotlight-card,
.auth-card,
.auth-copy {
    border-radius: var(--radius-xl);
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-md);
}

.hero-panel {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.5fr 0.8fr;
    gap: 22px;
    padding: 28px;
    background:
        radial-gradient(circle at top right, rgba(15, 139, 141, 0.12), transparent 34%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(245, 250, 255, 0.9));
}

.hero-panel::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 999px;
    right: -60px;
    top: -50px;
    background: rgba(15, 139, 141, 0.08);
}

.hero-stack,
.stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.spotlight-card,
.stat-card,
.mini-card,
.detail-block {
    padding: 20px;
    border-radius: var(--radius-lg);
    background: var(--panel-strong);
    border: 1px solid var(--line);
}

.spotlight-card strong,
.stat-card strong,
.mini-card strong {
    display: block;
    margin-top: 8px;
    font-size: 1.5rem;
}

.stat-card span,
.mini-card p {
    display: block;
}

.content-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    margin-top: 24px;
}

.card {
    padding: 24px;
    margin-top: 24px;
}

.summary-strip {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.detail-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.field {
    display: grid;
    gap: 8px;
}

.field input,
.field textarea,
.field select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    color: var(--ink);
}

.field textarea {
    min-height: 120px;
}

.form-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    line-height: 1.5;
}

.checkbox-row input {
    margin-top: 3px;
}

.flash {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid var(--line);
}

.flash-success {
    background: var(--green-soft);
    border-color: rgba(28, 154, 109, 0.18);
}

.flash-error {
    background: var(--coral-soft);
    border-color: rgba(241, 90, 90, 0.18);
}

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

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    text-align: left;
    padding: 14px 12px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

.pill {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.88rem;
    background: rgba(36, 22, 11, 0.07);
}

.pill-success {
    background: rgba(28, 154, 109, 0.14);
    color: var(--green);
}

.pill-warn {
    background: rgba(244, 165, 36, 0.16);
    color: #aa6a00;
}

.pill-info {
    background: rgba(21, 50, 91, 0.12);
    color: var(--navy);
}

.pill-neutral {
    background: rgba(16, 32, 63, 0.07);
    color: var(--muted);
}

.text-link {
    color: var(--teal);
    font-weight: 700;
}

.footer {
    margin-top: 28px;
    font-size: 0.94rem;
}

.auth-page {
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-shell {
    width: min(1120px, 100%);
    grid-template-columns: 1.25fr 0.85fr;
    align-items: stretch;
}

.auth-copy,
.auth-card {
    padding: 28px;
}

.auth-copy {
    background:
        radial-gradient(circle at top right, rgba(15, 139, 141, 0.14), transparent 30%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(241, 247, 255, 0.92));
}

.auth-points {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.hint {
    margin: 0;
}

@media (max-width: 980px) {
    .shell,
    .auth-shell,
    .hero-panel {
        grid-template-columns: 1fr;
    }

    .sidebar {
        gap: 20px;
    }

    .main {
        padding: 24px 16px 32px;
    }

    .page-header {
        grid-template-columns: 1fr;
    }
}
