@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.9);
    --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;
    --navy-soft: #dfeafb;
    --teal: #0f8b8d;
    --teal-soft: #d8f4ef;
    --amber: #f4a524;
    --amber-soft: #fff0cc;
    --coral: #f15a5a;
    --coral-soft: #ffe0df;
    --green: #1c9a6d;
    --green-soft: #daf5e8;
    --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;
}

img {
    max-width: 100%;
}

.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,
.distribution-grid,
.trend-grid,
.tag-list {
    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,
.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 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 16px;
    padding: 12px 18px;
    font-weight: 700;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

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

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

.nav a {
    padding: 13px 14px;
    border-radius: 15px;
    color: rgba(248, 251, 255, 0.8);
    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);
}

.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: 22px;
}

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

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

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

.hero-panel {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.9fr);
    gap: 24px;
    margin-bottom: 26px;
    padding: 28px;
    background:
        radial-gradient(circle at top right, rgba(244, 165, 36, 0.22), transparent 25%),
        radial-gradient(circle at bottom left, rgba(15, 139, 141, 0.16), transparent 30%),
        rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(18px);
}

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

.hero-stack {
    align-content: start;
}

.spotlight-card,
.card,
.stat-card,
.toolbar-card {
    background: var(--panel);
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(14px);
}

.spotlight-card {
    position: relative;
    padding: 22px;
    overflow: hidden;
}

.spotlight-card::after {
    content: "";
    position: absolute;
    inset: auto -28px -36px auto;
    width: 110px;
    height: 110px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
}

.spotlight-card span {
    color: rgba(255, 255, 255, 0.85);
}

.spotlight-card strong {
    display: block;
    margin: 10px 0 8px;
    font-size: 2.5rem;
    color: #fff;
}

.spotlight-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
}

.spotlight-card--teal {
    background: linear-gradient(135deg, #0f8b8d 0%, #0a5e74 100%);
}

.spotlight-card--amber {
    background: linear-gradient(135deg, #f4a524 0%, #f06d41 100%);
}

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

.stats-grid--six {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.stat-card {
    padding: 22px;
}

.stat-card span {
    display: block;
    color: var(--muted);
}

.stat-card strong {
    display: block;
    margin-top: 12px;
    font-size: 2rem;
    letter-spacing: -0.04em;
}

.content-grid,
.detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 24px;
}

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

.detail-grid--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card,
.toolbar-card {
    padding: 24px;
}

.section-heading {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
    margin-bottom: 14px;
}

.section-heading--compact {
    margin-top: 22px;
}

.section-heading h2,
.section-heading h3,
.card h2,
.card h3 {
    margin: 0;
}

.button {
    border: 1px solid transparent;
    cursor: pointer;
}

.button-primary {
    color: #fff;
    background: linear-gradient(135deg, #15325b 0%, #0f8b8d 100%);
    box-shadow: 0 14px 24px rgba(12, 28, 54, 0.18);
}

.button-secondary {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(21, 50, 91, 0.1);
}

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

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

.field-wide,
.form-actions {
    grid-column: 1 / -1;
}

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

label {
    display: grid;
    gap: 8px;
    font-weight: 600;
}

label span {
    font-size: 0.94rem;
}

input,
select,
textarea {
    width: 100%;
    padding: 13px 14px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.88);
    color: var(--ink);
    font: inherit;
    transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(15, 139, 141, 0.48);
    box-shadow: 0 0 0 4px rgba(15, 139, 141, 0.12);
    background: #fff;
}

textarea {
    resize: vertical;
}

.checkbox-row {
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(15, 139, 141, 0.06);
}

.checkbox-row input {
    width: 18px;
    height: 18px;
    margin: 0;
}

.summary-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 24px;
}

.summary-pill,
.mini-stat,
.tag-card {
    padding: 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.65);
    box-shadow: var(--shadow-md);
}

.summary-pill strong,
.mini-stat strong {
    display: block;
    font-family: "Space Grotesk", "Plus Jakarta Sans", sans-serif;
    font-size: 1.8rem;
}

.summary-pill span,
.mini-stat span {
    display: inline-flex;
}

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

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

thead th {
    padding: 0 16px 14px;
    text-align: left;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

tbody td {
    padding: 16px;
    border-top: 1px solid var(--line);
    vertical-align: top;
}

tbody tr:hover {
    background: rgba(15, 139, 141, 0.04);
}

.empty {
    text-align: center;
    color: var(--muted);
    padding: 26px 16px;
}

.stack-list {
    gap: 14px;
}

.mini-card {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
}

.mini-card-top {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.mini-card p,
.mini-card small,
.detail-block p {
    margin: 0;
    line-height: 1.7;
}

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

.trend-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    align-items: end;
}

.trend-bar-card {
    padding: 14px 10px;
    border-radius: 18px;
    background: rgba(244, 247, 251, 0.9);
    border: 1px solid rgba(21, 50, 91, 0.08);
    text-align: center;
}

.trend-bar {
    height: 140px;
    display: flex;
    align-items: end;
    justify-content: center;
    margin-bottom: 12px;
}

.trend-bar span {
    width: 24px;
    min-height: 14px;
    border-radius: 999px 999px 10px 10px;
    background: linear-gradient(180deg, #0f8b8d 0%, #15325b 100%);
    box-shadow: 0 10px 18px rgba(21, 50, 91, 0.16);
}

.detail-block + .detail-block {
    margin-top: 18px;
}

.detail-block h3 {
    margin: 0 0 8px;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.badge-neutral {
    background: rgba(21, 50, 91, 0.08);
    color: var(--navy);
}

.badge-teal,
.badge-status-open {
    background: var(--teal-soft);
    color: var(--teal);
}

.badge-amber,
.badge-severity-medium,
.badge-status-under_review {
    background: var(--amber-soft);
    color: #8a5a00;
}

.badge-coral,
.badge-severity-high,
.badge-severity-critical {
    background: var(--coral-soft);
    color: #bb3f43;
}

.badge-navy,
.badge-severity-low {
    background: var(--navy-soft);
    color: var(--navy);
}

.badge-status-resolved,
.badge-status-closed {
    background: var(--green-soft);
    color: var(--green);
}

.flash {
    margin-bottom: 22px;
    padding: 14px 18px;
    border-radius: 18px;
    border: 1px solid transparent;
}

.flash-success {
    background: rgba(28, 154, 109, 0.1);
    border-color: rgba(28, 154, 109, 0.18);
    color: #176948;
}

.flash-error {
    background: rgba(241, 90, 90, 0.11);
    border-color: rgba(241, 90, 90, 0.2);
    color: #a33636;
}

.tag-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tag-card small {
    display: block;
    margin-top: 10px;
    color: var(--muted);
}

.toolbar-card {
    margin-bottom: 18px;
}

.footer {
    margin-top: 18px;
    font-size: 0.92rem;
}

.auth-body {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 28px;
}

.auth-shell {
    width: min(1120px, 100%);
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 420px);
    align-items: center;
    padding: 24px;
    border-radius: 34px;
    background:
        radial-gradient(circle at top left, rgba(15, 139, 141, 0.16), transparent 28%),
        radial-gradient(circle at bottom right, rgba(244, 165, 36, 0.2), transparent 22%),
        rgba(255, 255, 255, 0.75);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(20px);
}

.auth-copy {
    padding: 32px;
}

.auth-form {
    padding: 28px;
}

.auth-points {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 28px;
}

.auth-points span {
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(21, 50, 91, 0.08);
    box-shadow: var(--shadow-md);
}

@media (max-width: 1280px) {
    .stats-grid--six {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

@media (max-width: 1080px) {
    .shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        gap: 20px;
    }

    .main {
        padding: 24px;
    }

    .hero-panel,
    .page-header,
    .content-grid,
    .detail-grid,
    .stats-grid,
    .summary-strip,
    .auth-shell {
        grid-template-columns: 1fr;
    }

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

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

    .auth-copy {
        padding: 20px;
    }
}

@media (max-width: 720px) {
    body,
    .auth-body {
        padding: 0;
    }

    .main,
    .sidebar,
    .auth-shell {
        padding: 18px;
    }

    .card,
    .toolbar-card,
    .spotlight-card {
        padding: 18px;
    }

    .compact-grid,
    .form-grid,
    .distribution-grid,
    .tag-list,
    .auth-points,
    .trend-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions,
    .form-actions,
    .mini-card-top {
        flex-direction: column;
        align-items: stretch;
    }

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