:root {
    --font-body: "Segoe UI Variable Text", Aptos, "Segoe UI", "Helvetica Neue", sans-serif;
    --font-display: "Segoe UI Variable Display", Aptos Display, "Segoe UI", "Helvetica Neue", sans-serif;
    --ink: #0f2139;
    --ink-soft: #3f5574;
    --paper: #eef4fb;
    --surface: rgba(255, 255, 255, 0.82);
    --surface-strong: rgba(255, 255, 255, 0.94);
    --surface-deep: rgba(13, 30, 55, 0.9);
    --line: rgba(20, 60, 114, 0.12);
    --primary: #2558a8;
    --primary-deep: #163c74;
    --primary-soft: rgba(37, 88, 168, 0.12);
    --accent: #7f1f44;
    --accent-deep: #5f1732;
    --accent-soft: rgba(127, 31, 68, 0.12);
    --success: #17745f;
    --warning: #8b234e;
    --danger: #b4234f;
    --muted: #60738e;
    --shadow-soft: 0 18px 50px rgba(15, 33, 57, 0.08);
    --shadow-strong: 0 28px 70px rgba(15, 33, 57, 0.16);
    --radius: 24px;
    --radius-sm: 18px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(37, 88, 168, 0.16), transparent 24%),
        radial-gradient(circle at 85% 15%, rgba(127, 31, 68, 0.12), transparent 18%),
        radial-gradient(circle at bottom right, rgba(22, 60, 116, 0.12), transparent 22%),
        linear-gradient(135deg, #edf4fb 0%, #f8fbff 46%, #f8eef3 100%);
    min-height: 100vh;
}

h1,
h2,
h3,
th,
.button,
.status,
.chip {
    font-family: var(--font-display);
}

h1,
h2,
h3 {
    margin: 0;
    letter-spacing: -0.035em;
}

.login-body {
    padding: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card,
.panel,
.stat-card,
.list-card,
.profile-card,
.privacy-banner,
.info-box {
    background: var(--surface);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.login-shell {
    width: min(1160px, 100%);
    display: grid;
    grid-template-columns: 1.2fr 0.9fr;
    gap: 24px;
}

.login-card {
    padding: 34px;
    min-height: 100%;
}

.login-intro-card {
    background:
        linear-gradient(160deg, rgba(20, 53, 101, 0.94), rgba(32, 88, 163, 0.88) 55%, rgba(127, 31, 68, 0.88));
    color: white;
    box-shadow: var(--shadow-strong);
}

.login-intro-card .muted,
.login-intro-card span {
    color: rgba(255, 255, 255, 0.82);
}

.login-form-card {
    background: rgba(255, 255, 255, 0.96);
}

.page-shell {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    border-right: 1px solid rgba(19, 39, 66, 0.08);
    background:
        radial-gradient(circle at top left, rgba(79, 133, 215, 0.22), transparent 30%),
        linear-gradient(180deg, rgba(11, 29, 54, 0.98), rgba(18, 47, 88, 0.96) 62%, rgba(83, 18, 44, 0.94));
    color: white;
}

.brand-card {
    padding: 22px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar .muted,
.sidebar span {
    color: rgba(255, 255, 255, 0.78);
}

.content {
    padding: 30px;
}

.content-header,
.panel-header,
.split,
.button-row,
.filters {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.content-header {
    margin-bottom: 26px;
    padding: 0 4px;
}

.page-heading {
    display: grid;
    gap: 4px;
}

.content-body {
    display: grid;
    gap: 24px;
}

.menu {
    display: grid;
    gap: 8px;
}

.menu a,
.link-card,
a {
    color: inherit;
    text-decoration: none;
}

.nav-link {
    padding: 13px 15px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.nav-link:hover,
.link-card:hover {
    transform: translateY(-1px);
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.16);
}

.nav-link.active {
    background: linear-gradient(135deg, rgba(67, 121, 205, 0.26), rgba(127, 31, 68, 0.2));
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.profile-card,
.privacy-banner,
.panel,
.stat-card,
.list-card,
.info-box {
    padding: 20px;
}

.profile-card {
    display: grid;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.14);
}

.profile-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.privacy-banner {
    max-width: 520px;
    display: grid;
    gap: 6px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(241, 246, 255, 0.9));
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.75rem;
    margin: 0 0 8px;
    color: var(--accent);
    font-weight: 700;
}

.sidebar .eyebrow {
    color: #f2c8d4;
}

.muted {
    color: var(--muted);
}

.page-intro {
    position: relative;
    overflow: hidden;
}

.page-intro::after {
    content: "";
    position: absolute;
    inset: auto -40px -60px auto;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(127, 31, 68, 0.12), transparent 60%);
    pointer-events: none;
}

.hero-panel {
    background:
        linear-gradient(140deg, rgba(255, 255, 255, 0.96), rgba(241, 246, 255, 0.88) 58%, rgba(253, 240, 245, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-strong);
}

.stats-grid,
.two-column,
.detail-grid,
.list-grid,
.notification-list,
.metric-strip {
    display: grid;
    gap: 18px;
}

.stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.two-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.workspace-grid {
    align-items: start;
}

.detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 16px;
}

.list-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.compact-grid {
    grid-template-columns: 1fr;
    margin-top: 18px;
}

.detail-panel {
    display: grid;
    gap: 14px;
}

.stack-form {
    display: grid;
    gap: 14px;
}

.two-up-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.full-span {
    grid-column: 1 / -1;
}

label {
    display: grid;
    gap: 8px;
    font-weight: 600;
    color: var(--primary-deep);
}

input,
select,
textarea,
button {
    font: inherit;
}

input,
select,
textarea {
    width: 100%;
    padding: 13px 15px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.92);
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(31, 77, 141, 0.45);
    box-shadow: 0 0 0 4px rgba(31, 77, 141, 0.12);
    background: white;
}

.checkbox-row {
    grid-template-columns: auto 1fr;
    align-items: center;
}

.checkbox-row input {
    width: auto;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 20px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 14px 30px rgba(37, 88, 168, 0.2);
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.button:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 32px rgba(37, 88, 168, 0.24);
    filter: saturate(1.05);
}

.button.secondary,
.chip.active {
    background: linear-gradient(135deg, var(--primary-deep), var(--accent-deep));
    color: white;
}

.button.ghost {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    box-shadow: none;
}

.button.small {
    padding: 8px 14px;
    font-size: 0.9rem;
}

.full-width {
    width: 100%;
}

.pill,
.status,
.chip {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 0.9rem;
}

.pill {
    min-width: 30px;
    justify-content: center;
    background: linear-gradient(135deg, #ffd2de, #fff7fa);
    color: #4d1026;
    border: 1px solid rgba(127, 31, 68, 0.18);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
    font-weight: 800;
    margin-left: 6px;
}

.chip {
    background: var(--primary-soft);
    color: var(--primary-deep);
}

.status.complete {
    background: rgba(23, 116, 95, 0.12);
    color: var(--success);
}

.status.in_progress {
    background: var(--primary-soft);
    color: var(--primary);
}

.status.normal,
.status.high,
.status.urgent {
    background: var(--accent-soft);
    color: var(--warning);
}

.status.incomplete {
    background: var(--accent-soft);
    color: var(--danger);
}

.flash-stack {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
}

.flash {
    padding: 15px 16px;
    border-radius: 16px;
    border: 1px solid transparent;
}

.flash.success {
    background: rgba(23, 116, 95, 0.1);
    color: var(--success);
    border-color: rgba(23, 116, 95, 0.12);
}

.flash.info {
    background: rgba(37, 88, 168, 0.08);
    border-color: rgba(37, 88, 168, 0.1);
}

.flash.warning {
    background: rgba(127, 31, 68, 0.1);
    color: var(--warning);
    border-color: rgba(127, 31, 68, 0.12);
}

.flash.danger {
    background: rgba(180, 35, 79, 0.08);
    color: var(--danger);
    border-color: rgba(180, 35, 79, 0.1);
}

.stat-card,
.list-card,
.notification-item {
    position: relative;
    overflow: hidden;
}

.stat-card::before,
.list-card::before,
.notification-item::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0.9;
}

.stat-card {
    display: grid;
    gap: 10px;
    min-height: 128px;
}

.stat-card span {
    color: var(--ink-soft);
    font-size: 0.92rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.stat-card strong {
    font-size: 2.3rem;
    line-height: 1;
}

.list-card {
    display: grid;
    gap: 8px;
    min-height: 120px;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.link-card:hover {
    box-shadow: var(--shadow-strong);
    border-color: rgba(255, 255, 255, 0.95);
}

.feature-card {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.18);
}

.upload-guidance {
    display: grid;
    gap: 6px;
    padding: 16px 18px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, rgba(37, 88, 168, 0.08), rgba(127, 31, 68, 0.08));
    border: 1px solid rgba(37, 88, 168, 0.08);
}

.table-wrap {
    overflow-x: auto;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.85);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 16px 14px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--primary-deep);
    font-size: 0.92rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.notification-item {
    padding: 18px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(37, 88, 168, 0.07), rgba(127, 31, 68, 0.06));
}

@media (max-width: 980px) {
    .login-shell,
    .page-shell,
    .two-column,
    .stats-grid,
    .detail-grid,
    .two-up-form {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        height: auto;
        border-right: none;
    }

    .content-header,
    .panel-header,
    .split,
    .button-row,
    .filters {
        align-items: flex-start;
        flex-direction: column;
    }
}
