:root {
    --brand-teal: #00a6b4;
    --brand-teal-light: #7bd4e7;
    --brand-lime: #b7d434;
    --brand-navy: #0b2a3c;
    --brand-charcoal: #142635;
    --surface: #f3f9fb;
    --surface-alt: #ecf4f7;
    --surface-card: #ffffff;
    --text-main: #0c2431;
    --text-muted: #5c7180;
    --border-soft: rgba(11, 42, 60, 0.08);
    --focus-ring: 0 0 0 3px rgba(0, 166, 180, 0.18);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background:
        radial-gradient(circle at top left, rgba(123, 212, 231, 0.14), transparent 22%),
        linear-gradient(180deg, #f7fbfc 0%, var(--surface) 26%, #eef5f8 100%);
    color: var(--text-main);
    line-height: 1.55;
}

a,
button,
input,
select,
textarea {
    transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

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

.app-shell > * {
    min-width: 0;
}

.mobile-sidebar-scrim,
.mobile-nav-toggle {
    display: none;
}

.sidebar {
    background:
        radial-gradient(circle at top left, rgba(123, 212, 231, 0.08), transparent 24%),
        linear-gradient(180deg, #092538 0%, var(--brand-navy) 52%, #0e3145 100%);
    color: #fff;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
}

.sidebar-header {
    padding: 0.25rem 0;
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-mark {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-teal), var(--brand-lime));
    color: var(--brand-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.sidebar h1 {
    margin: 0.2rem 0 0;
    font-size: 1.15rem;
    line-height: 1.2;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.72rem;
    margin: 0;
    opacity: 0.9;
}

.sidebar .eyebrow {
    color: rgba(255, 255, 255, 0.66);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-right: 0.3rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

.sidebar-group-title {
    margin: 0.85rem 0 0.2rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.5);
}

.sidebar-nav a {
    padding: 0.7rem 0.8rem;
    border-radius: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.user-panel {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    padding: 0.9rem;
}

.user-name {
    margin: 0 0 0.35rem;
    font-weight: 600;
    font-size: 1rem;
}

.small {
    font-size: 0.9rem;
}

.role-pill {
    display: inline-flex;
    margin-top: 0.65rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.sidebar .muted {
    color: rgba(255, 255, 255, 0.56);
}

.sidebar-footer {
    padding: 0.85rem 0.15rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-footer-copy {
    margin: 0.45rem 0 0;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.9rem;
}

.content-area {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-header {
    background: radial-gradient(circle at top left, rgba(0, 166, 180, 0.35), transparent), var(--brand-navy);
    color: #fff;
    padding: 2rem clamp(1rem, 5vw, 3.5rem) 1.15rem;
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.08);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 1.5rem;
}

.page-title-block {
    display: grid;
    gap: 0.9rem;
}

.page-title h2 {
    margin: 0.25rem 0 0;
    font-size: clamp(1.9rem, 3.6vw, 3rem);
    line-height: 1.1;
}

.header-actions {
    display: flex;
    gap: 0.85rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.header-actions > .button,
.header-actions > .inline-form {
    flex: 0 0 auto;
}

.header-context {
    display: grid;
    justify-items: end;
    gap: 0.55rem;
    max-width: 30rem;
}

.header-note {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    text-align: right;
}

.header-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: flex-end;
}

.header-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.header-chip.subtle {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.82);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.2rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 600;
    text-decoration: none;
}

.button.primary {
    background: linear-gradient(135deg, var(--brand-teal), #0fb8c5);
    color: #062634;
    box-shadow: 0 12px 24px rgba(0, 166, 180, 0.18);
}

.button.primary:hover {
    transform: translateY(-1px);
}

.button.ghost {
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
}

.button.ghost:hover {
    background: rgba(255, 255, 255, 0.12);
}

.inline-form {
    margin: 0;
}

.button.ghost-dark {
    border-color: rgba(11, 42, 60, 0.15);
    color: var(--text-main);
    background: rgba(11, 42, 60, 0.04);
}

.button.ghost-dark:hover {
    background: rgba(11, 42, 60, 0.09);
}

.page-container {
    padding: clamp(1.25rem, 4vw, 3rem);
    margin-top: -1.1rem;
}

.flash-message {
    margin-bottom: 1rem;
    padding: 0.95rem 1rem;
    border-radius: 1rem;
    border: 1px solid rgba(0, 166, 180, 0.16);
    background: rgba(0, 166, 180, 0.08);
    color: #0c4c57;
    font-weight: 600;
}

.project-state {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-block: 1rem;
}

.project-state-closed {
    border-color: rgba(161, 35, 95, 0.16);
    background: rgba(161, 35, 95, 0.05);
}

.layout-grid {
    display: grid;
    gap: clamp(1rem, 2vw, 1.6rem);
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.full-span {
    grid-column: 1 / -1;
}

.hero,
.card {
    background: var(--surface-card);
    border: 1px solid var(--border-soft);
    border-radius: 1.6rem;
    box-shadow: 0 16px 36px rgba(11, 42, 60, 0.07);
}

.hero {
    padding: 1.4rem 1.5rem;
    background:
        radial-gradient(circle at top left, rgba(123, 212, 231, 0.35), transparent 45%),
        radial-gradient(circle at right center, rgba(183, 212, 52, 0.22), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(247, 251, 252, 0.98));
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.hero h2,
.section-head h3 {
    margin: 0.25rem 0 0;
}

.hero .muted {
    max-width: 54rem;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.hero-inline-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1rem;
}

.meta-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.42rem 0.72rem;
    border-radius: 999px;
    border: 1px solid rgba(11, 42, 60, 0.08);
    background: rgba(255, 255, 255, 0.72);
    color: #2d5263;
    font-size: 0.8rem;
    font-weight: 600;
}

.card {
    padding: 1.4rem 1.45rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.chart-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.layout-grid > *,
.stats-grid > *,
.chart-grid > *,
.two-column > * {
    min-width: 0;
}

.stat-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(236, 244, 247, 0.92));
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: "";
    position: absolute;
    inset: auto auto -1.25rem -0.75rem;
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(123, 212, 231, 0.32), transparent 70%);
    pointer-events: none;
}

.stat-card strong {
    display: block;
    margin-top: 0.55rem;
    font-size: 2.2rem;
    line-height: 1;
}

.stat-card span,
.muted {
    color: var(--text-muted);
}

.chart-card {
    display: grid;
    gap: 1rem;
    align-content: start;
    background:
        radial-gradient(circle at top right, rgba(123, 212, 231, 0.14), transparent 30%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 249, 251, 0.94));
}

.chart-donut-layout {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 1rem;
    align-items: center;
}

.donut-chart {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--ring-fill);
    box-shadow: inset 0 0 0 1px rgba(11, 42, 60, 0.05);
}

.donut-chart::before {
    content: "";
    width: 116px;
    height: 116px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: inset 0 0 0 1px rgba(11, 42, 60, 0.06);
    grid-area: 1 / 1;
}

.donut-chart > div {
    grid-area: 1 / 1;
    display: grid;
    place-items: center;
    text-align: center;
    z-index: 1;
}

.donut-chart strong {
    font-size: 2rem;
    line-height: 1;
}

.donut-chart span {
    margin-top: 0.3rem;
    color: var(--text-muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.chart-legend {
    display: grid;
    gap: 0.75rem;
}

.chart-legend.compact {
    margin-top: 0.35rem;
}

.legend-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.65rem;
    align-items: center;
    padding: 0.75rem 0.8rem;
    border-radius: 0.95rem;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(11, 42, 60, 0.08);
}

.legend-dot {
    width: 0.72rem;
    height: 0.72rem;
    border-radius: 50%;
}

.stacked-meter {
    height: 1.05rem;
    border-radius: 999px;
    background: var(--stack-fill);
    box-shadow: inset 0 0 0 1px rgba(11, 42, 60, 0.08);
}

.load-chart {
    display: grid;
    gap: 0.95rem;
}

.load-row {
    display: grid;
    gap: 0.7rem;
    padding: 0.95rem 1rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(11, 42, 60, 0.08);
}

.load-labels {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
}

.load-bars {
    display: grid;
    gap: 0.55rem;
}

.load-bar-group {
    display: grid;
    grid-template-columns: 88px 1fr auto;
    gap: 0.65rem;
    align-items: center;
}

.load-bar-label {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
}

.load-bar-track {
    height: 0.55rem;
    border-radius: 999px;
    background: rgba(11, 42, 60, 0.08);
    overflow: hidden;
}

.load-bar-fill {
    height: 100%;
    border-radius: inherit;
}

.load-bar-fill.teal {
    background: linear-gradient(90deg, #00a6b4, #43c7d2);
}

.load-bar-fill.lime {
    background: linear-gradient(90deg, #b7d434, #d3e36d);
}

.load-bar-fill.rose {
    background: linear-gradient(90deg, #d64a8c, #f078ac);
}

.two-column {
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    gap: 1.35rem;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.section-head p {
    margin: 0.25rem 0 0;
}

.stack-list,
.checklist {
    margin: 0;
    padding: 0;
    list-style: none;
}

.stack-list li {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 1rem;
    padding: 0.95rem 0;
    border-top: 1px solid rgba(11, 42, 60, 0.08);
}

.stack-list li > * {
    min-width: 0;
}

.stack-list li:first-child {
    border-top: 0;
    padding-top: 0;
}

.table-wrap {
    overflow-x: auto;
    max-width: 100%;
}

.responsive-table td > * {
    min-width: 0;
}

.table-link {
    color: var(--text-main);
    text-decoration: none;
}

.table-link:hover {
    color: #006a74;
}

.list-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.link-button {
    padding: 0.45rem 0.85rem;
    border-color: rgba(11, 42, 60, 0.12);
    background: rgba(11, 42, 60, 0.04);
    color: var(--text-main);
}

.link-button:hover {
    background: rgba(11, 42, 60, 0.09);
}

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

tbody tr:hover {
    background: rgba(243, 249, 251, 0.88);
}

th,
td {
    padding: 0.9rem 0.95rem;
    border-top: 1px solid rgba(11, 42, 60, 0.08);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

thead th {
    border-top: 0;
    padding-top: 0;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.38rem 0.68rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-active,
.badge-on_track {
    background: rgba(0, 166, 180, 0.14);
    color: #00737e;
}

.badge-on_hold,
.badge-at_risk,
.badge-draft {
    background: rgba(183, 212, 52, 0.22);
    color: #617212;
}

.badge-off_track,
.badge-open,
.badge-critical {
    background: rgba(214, 74, 140, 0.13);
    color: #a1235f;
}

.badge-monitoring,
.badge-not_started,
.badge-neutral,
.badge-submitted {
    background: rgba(13, 42, 60, 0.08);
    color: #556774;
}

.badge-closed,
.badge-final {
    background: rgba(0, 166, 180, 0.1);
    color: #0d5d65;
}

.empty-state {
    margin: 0;
    padding: 1rem 1.05rem;
    border: 1px dashed rgba(11, 42, 60, 0.18);
    border-radius: 1rem;
    color: var(--text-muted);
    background: rgba(236, 244, 247, 0.58);
}

.checklist li {
    position: relative;
    padding-left: 1.5rem;
    margin-top: 0.9rem;
}

.checklist li:first-child {
    margin-top: 0;
}

.checklist li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.45rem;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-teal), var(--brand-lime));
}

.pagination-wrap {
    margin-top: 1rem;
}

.pagination-wrap nav {
    display: flex;
    justify-content: flex-end;
}

.pagination-wrap svg {
    width: 16px;
}

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

.field {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.full-width {
    grid-column: 1 / -1;
}

.field label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main);
}

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 0.8rem 0.9rem;
    border: 1px solid rgba(11, 42, 60, 0.12);
    border-radius: 0.95rem;
    background: #fff;
    color: var(--text-main);
    font: inherit;
    box-shadow: inset 0 1px 2px rgba(11, 42, 60, 0.03);
}

.field textarea {
    resize: vertical;
}

.field-error {
    margin: 0;
    color: #a1235f;
    font-size: 0.85rem;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.button-block {
    width: 100%;
}

.compact-form {
    margin-bottom: 1rem;
}

.inline-section {
    margin-top: 1rem;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.meta-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin: 0;
}

.meta-list div {
    padding: 0.95rem 1rem;
    border-radius: 1rem;
    background: rgba(236, 244, 247, 0.75);
}

.meta-list dt {
    color: var(--text-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.35rem;
}

.meta-list dd {
    margin: 0;
    font-weight: 600;
}

.timeline {
    display: grid;
    gap: 1rem;
}

.cycle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.cycle-card {
    padding: 1rem 1.05rem;
    border: 1px solid rgba(11, 42, 60, 0.08);
    border-radius: 1rem;
    background: rgba(243, 249, 251, 0.72);
}

.cycle-meta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin: 0.9rem 0 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.stats-strip {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.mini-stat {
    min-width: 180px;
    padding: 0.95rem 1rem;
    border-radius: 1rem;
    background: rgba(236, 244, 247, 0.8);
    border: 1px solid rgba(11, 42, 60, 0.08);
}

.mini-stat strong {
    display: block;
    margin-top: 0.35rem;
    font-size: 1.35rem;
}

.mini-stack {
    display: grid;
    gap: 0.65rem;
    margin-top: 0.9rem;
}

.mini-stack > div {
    padding-top: 0.65rem;
    border-top: 1px solid rgba(11, 42, 60, 0.08);
}

.mini-stack > div:first-child {
    padding-top: 0;
    border-top: 0;
}

.timeline-item {
    padding: 1rem 1.05rem;
    border: 1px solid rgba(11, 42, 60, 0.08);
    border-radius: 1rem;
    background: rgba(243, 249, 251, 0.7);
}

.timeline-item p:last-child {
    margin-bottom: 0;
}

.timeline-head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.auth-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(123, 212, 231, 0.28), transparent 28%),
        radial-gradient(circle at right center, rgba(183, 212, 52, 0.2), transparent 22%),
        linear-gradient(160deg, #0b2a3c 0%, #10374d 50%, #f3f9fb 50%, #f3f9fb 100%);
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.5rem;
}

.auth-card {
    width: min(100%, 1080px);
    padding: 1rem;
    border-radius: 1.7rem;
    border: 1px solid rgba(11, 42, 60, 0.08);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 18px 45px rgba(11, 42, 60, 0.16);
    backdrop-filter: blur(8px);
}

.auth-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 1rem;
}

.auth-panel {
    padding: 1.5rem;
    border-radius: 1.35rem;
}

.auth-panel-brand {
    background:
        radial-gradient(circle at top left, rgba(123, 212, 231, 0.24), transparent 30%),
        radial-gradient(circle at bottom right, rgba(183, 212, 52, 0.14), transparent 28%),
        linear-gradient(180deg, rgba(243, 249, 251, 0.88), rgba(230, 242, 246, 0.92));
}

.auth-panel-form {
    background: #fff;
    border: 1px solid rgba(11, 42, 60, 0.06);
}

.auth-title {
    margin: 0.2rem 0 0;
    font-size: 1.2rem;
}

.auth-copy {
    margin: 1.4rem 0 1rem;
}

.auth-copy h2 {
    margin: 0 0 0.35rem;
}

.auth-form {
    grid-template-columns: 1fr;
}

.auth-actions {
    justify-content: stretch;
}

.auth-feature-list {
    display: grid;
    gap: 0.8rem;
    margin-top: 1.4rem;
}

.auth-feature {
    padding: 1rem 1.05rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(11, 42, 60, 0.08);
}

.auth-feature strong,
.auth-feature p {
    display: block;
    margin: 0.2rem 0 0;
}

.auth-feature-kicker {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    background: rgba(11, 42, 60, 0.08);
    color: #31505e;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

@media (max-width: 1080px) {
    .header-inner {
        flex-direction: column;
    }

    .header-actions {
        justify-content: flex-start;
    }

    .header-context {
        justify-items: start;
    }

    .header-note {
        text-align: left;
    }

    .header-badges {
        justify-content: flex-start;
    }

    .chart-grid {
        grid-template-columns: 1fr;
    }

    .chart-donut-layout {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .load-labels {
        flex-direction: column;
        align-items: start;
    }

    .auth-grid {
        grid-template-columns: 1fr;
    }
}

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

    .mobile-sidebar-scrim {
        position: fixed;
        inset: 0;
        z-index: 40;
        border: 0;
        background: rgba(7, 17, 26, 0.48);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
    }

    body.nav-open {
        overflow: hidden;
    }

    body.nav-open .mobile-sidebar-scrim {
        display: block;
        opacity: 1;
        pointer-events: auto;
    }

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 50;
        width: min(84vw, 320px);
        height: 100vh;
        transform: translateX(calc(-100% - 1rem));
        transition: transform 0.22s ease;
        box-shadow: 0 22px 50px rgba(0, 0, 0, 0.26);
    }

    body.nav-open .sidebar {
        transform: translateX(0);
    }

    .mobile-nav-toggle {
        display: inline-flex;
        align-items: center;
        gap: 0.8rem;
        width: fit-content;
        padding: 0.7rem 1rem;
        border: 1px solid rgba(255, 255, 255, 0.22);
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.08);
        color: #fff;
        font: inherit;
        font-weight: 700;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        cursor: pointer;
    }

    .mobile-nav-icon {
        display: grid;
        gap: 0.22rem;
    }

    .mobile-nav-icon span {
        display: block;
        width: 1rem;
        height: 2px;
        border-radius: 999px;
        background: currentColor;
    }

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

    .two-column {
        grid-template-columns: 1fr;
    }

    .load-bar-group {
        grid-template-columns: 1fr;
    }

    .form-grid,
    .meta-list {
        grid-template-columns: 1fr;
    }

    .header-actions {
        justify-content: stretch;
    }

    .header-actions > .button,
    .header-actions > .inline-form,
    .header-actions > .inline-form .button {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .site-header {
        padding: 1.2rem 1rem 1rem;
    }

    .page-container {
        padding: 1rem;
    }

    .header-inner,
    .header-actions {
        gap: 0.9rem;
    }

    .header-context {
        max-width: none;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    th,
    td {
        min-width: 130px;
    }

    .responsive-table {
        min-width: 0;
    }

    .responsive-table thead {
        display: none;
    }

    .responsive-table,
    .responsive-table tbody,
    .responsive-table tr,
    .responsive-table td {
        display: block;
        width: 100%;
    }

    .responsive-table tbody {
        display: grid;
        gap: 0.9rem;
    }

    .responsive-table tr {
        padding: 1rem;
        border: 1px solid rgba(11, 42, 60, 0.08);
        border-radius: 1rem;
        background: rgba(243, 249, 251, 0.82);
    }

    .responsive-table td {
        min-width: 0;
        padding: 0.8rem 0 0;
        border-top: 1px solid rgba(11, 42, 60, 0.08);
        display: grid;
        grid-template-columns: minmax(0, 6.5rem) 1fr;
        gap: 0.75rem;
        align-items: start;
    }

    .responsive-table td:first-child {
        padding-top: 0;
        border-top: 0;
    }

    .responsive-table td::before {
        content: attr(data-label);
        min-width: 0;
        color: var(--text-muted);
        font-size: 0.74rem;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .responsive-table .list-actions {
        justify-content: flex-start;
    }
}
