/*
 * ============================================
 * MayaSim - Business Simulation Platform
 * ============================================
 * @product    MayaSim
 * @module     Ctrl Panel
 * @file       app.css
 * @version    1.0.0
 * @since      2026-04-11
 * @modified   2026-04-11
 */

:root {
    --ctrl-bg: #091a0d;
    --ctrl-bg-2: #102316;
    --ctrl-card: #ffffff;
    --ctrl-text: #091a0d;
    --ctrl-muted: #a0b0a0;
    --ctrl-brand-a: #091a0d;
    --ctrl-brand-b: #c9a84c;
    --ctrl-action: #091a0d;
    --ctrl-action-hover: #132518;
}

html, body {
    touch-action: pan-y;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
}

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

body {
    font-family: 'Poppins', sans-serif;
}

.ctrl-notice-stack {
    position: fixed;
    top: 1rem;
    right: 1rem;
    width: min(420px, calc(100vw - 2rem));
    z-index: 1400;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ctrl-notice {
    display: grid;
    grid-template-columns: 40px 1fr 28px;
    gap: 0.8rem;
    align-items: start;
    padding: 0.9rem 0.95rem;
    border-radius: 14px;
    border: 1px solid rgba(9, 26, 13, 0.08);
    background: #ffffff;
    box-shadow: 0 14px 36px rgba(9, 26, 13, 0.12);
    color: #091a0d;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.ctrl-notice.is-leaving { opacity: 0; transform: translateY(-6px); }
.ctrl-notice--success { border-color: rgba(22, 163, 74, 0.18); }
.ctrl-notice--error { border-color: rgba(190, 24, 93, 0.18); }
.ctrl-notice--warning { border-color: rgba(201, 168, 76, 0.28); }

.ctrl-notice-icon {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f8f5;
    color: #091a0d;
}

.ctrl-notice--success .ctrl-notice-icon { background: rgba(22, 163, 74, 0.1); color: #166534; }
.ctrl-notice--error .ctrl-notice-icon { background: rgba(190, 24, 93, 0.08); color: #9f1239; }
.ctrl-notice--warning .ctrl-notice-icon { background: rgba(201, 168, 76, 0.14); color: #9a6b14; }

.ctrl-notice-content { min-width: 0; }
.ctrl-notice-title { font-size: 0.84rem; font-weight: 700; color: #091a0d; }
.ctrl-notice-message { margin-top: 0.2rem; font-size: 0.76rem; line-height: 1.55; color: #647564; }

.ctrl-notice-close {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: #90a090;
    cursor: pointer;
}

.ctrl-notice-close:hover { background: #f5f8f5; color: #091a0d; }

.ctrl-notice-actions {
    grid-column: 2 / 4;
    display: flex;
    justify-content: flex-end;
    gap: 0.55rem;
    margin-top: 0.35rem;
}

.ctrl-notice-btn {
    min-height: 36px;
    border-radius: 9px;
    padding: 0 0.9rem;
    border: 1px solid rgba(9, 26, 13, 0.1);
    background: #ffffff;
    color: #091a0d;
    font-size: 0.73rem;
    font-weight: 600;
    cursor: pointer;
}

.ctrl-notice-btn--solid { background: #091a0d; color: #c9a84c; border-color: #091a0d; }
.ctrl-notice-btn--ghost { background: #f5f8f5; }

@media (max-width: 767px) {
    .ctrl-notice-stack {
        top: auto;
        bottom: 1rem;
        right: 0.75rem;
        left: 0.75rem;
        width: auto;
    }
}

.ctrl-login-shell {
    min-height: 100vh;
    background: #f5f8f5;
    width: 100%;
    overflow-x: clip;
}

.ctrl-login-grid {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 100vw;
}

.ctrl-login-brand,
.ctrl-login-form-wrap {
    padding: 2rem 1.5rem;
}

.ctrl-login-brand {
    display: flex;
    color: #fff;
    position: relative;
}

.ctrl-brand-panel {
    height: 100%;
    width: 100%;
    min-width: 0;
    border-radius: 1.75rem;
    border: 1px solid rgba(255, 255, 255, 0.04);
    background:
        radial-gradient(380px 380px at 88% 82%, rgba(201, 168, 76, 0.08) 0%, rgba(201, 168, 76, 0) 70%),
        linear-gradient(180deg, var(--ctrl-bg) 0%, var(--ctrl-bg-2) 100%);
    box-shadow: 0 24px 60px rgba(5, 18, 8, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    text-align: left;
    padding: 3rem 2.5rem 2.2rem;
    overflow: hidden;
}

.ctrl-brand-top {
    position: relative;
    z-index: 1;
    max-width: 420px;
    min-width: 0;
}

.ctrl-wordmark {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.ctrl-wordmark-maya {
    color: #ffffff;
}

.ctrl-wordmark-sim {
    color: #c9a84c;
}

.ctrl-gold-rule {
    width: 32px;
    height: 1.5px;
    background: #c9a84c;
    margin: 3rem 0 1.75rem;
}

.ctrl-hero-title {
    margin: 0;
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(3rem, 7vw, 4.4rem);
    line-height: 0.98;
    letter-spacing: -0.04em;
    color: #ffffff;
    font-weight: 600;
}

.ctrl-hero-title em {
    font-style: italic;
    color: #c9a84c;
    font-weight: 500;
}

.ctrl-hero-copy {
    margin: 1.8rem 0 0;
    max-width: 360px;
    font-size: 0.92rem;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.32);
    font-weight: 300;
}

.ctrl-brand-copy {
    width: 100%;
    position: relative;
    z-index: 1;
    min-width: 0;
}

.ctrl-metric-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
    max-width: 360px;
}

.ctrl-metric-item {
    min-width: 0;
}

.ctrl-metric-value {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.15rem;
    line-height: 1;
    color: #c9a84c;
    font-weight: 600;
}

.ctrl-metric-label {
    margin-top: 0.45rem;
    font-size: 0.66rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.22);
}

.ctrl-trust-line {
    max-width: 360px;
    margin: 1.55rem 0 0;
    padding-top: 1.05rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.72rem;
    line-height: 1.6;
    font-weight: 300;
}

.ctrl-login-form-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
}

.ctrl-login-card {
    width: 100%;
    max-width: 500px;
    min-width: 0;
    background: transparent;
    color: var(--ctrl-text);
    border-radius: 0;
    border: 0;
    box-shadow: none;
}

.ctrl-login-head {
    color: var(--ctrl-text);
    padding: 0 0 1.2rem;
    background: transparent;
}

.ctrl-login-card .p-6 {
    padding: 1.5rem 0;
}

.ctrl-form-title {
    margin: 0;
    font-family: 'Cormorant Garamond', serif;
    font-size: 3rem;
    line-height: 1;
    color: #091a0d;
    font-weight: 600;
}

.ctrl-form-subtitle {
    margin: 0.85rem 0 0;
    color: #a0b0a0;
    font-size: 0.92rem;
    line-height: 1.7;
    font-weight: 300;
}

.ctrl-gold-rule-form {
    margin: 1.5rem 0 0;
}

.ctrl-form-label {
    display: block;
    margin-bottom: 0.7rem;
    color: #b0bab0;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.ctrl-input {
    width: 100%;
    min-height: 54px;
    border: 1.5px solid #e8ede8;
    border-radius: 11px;
    padding: 0.9rem 1rem;
    outline: none;
    background: #f8faf8;
    color: #091a0d;
    font-size: 0.95rem;
}

.ctrl-input:focus {
    border-color: rgba(201, 168, 76, 0.5);
    background: #fffef9;
    box-shadow: none;
}

.ctrl-btn-primary {
    width: 100%;
    min-height: 54px;
    border-radius: 11px;
    background: #091a0d;
    color: #c9a84c;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.ctrl-btn-primary:hover {
    background: #132518;
    transform: translateY(-1px);
    box-shadow: 0 14px 24px rgba(9, 26, 13, 0.16);
}

.ctrl-btn-primary.is-loading {
    opacity: 0.78;
    cursor: wait;
}

.ctrl-inline-alert {
    display: none;
    border-radius: 10px;
    padding: 0.7rem 0.85rem;
    font-size: 0.8rem;
    line-height: 1.45;
    font-weight: 500;
    border: 1px solid transparent;
}

.ctrl-inline-alert.is-visible {
    display: block;
}

.ctrl-inline-alert.is-error {
    background: rgba(190, 24, 93, 0.08);
    color: #9f1239;
    border-color: rgba(190, 24, 93, 0.2);
}

.ctrl-inline-alert.is-success {
    background: rgba(22, 163, 74, 0.09);
    color: #166534;
    border-color: rgba(22, 163, 74, 0.22);
}

.ctrl-login-meta {
    margin-top: 1rem;
    padding-top: 1.1rem;
    border-top: 1px solid rgba(9, 26, 13, 0.06);
    color: #c0ccc0;
    font-size: 0.76rem;
    letter-spacing: 0.02em;
    font-weight: 300;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    width: 100%;
    max-width: 100vw;
}

.ctrl-footer-copy,
.ctrl-footer-version {
    min-width: 0;
}

.ctrl-footer-version {
    text-align: right;
}

@media (min-width: 1024px) {
    .ctrl-login-grid {
        grid-template-columns: 54% 46%;
        align-items: stretch;
    }

    .ctrl-login-brand,
    .ctrl-login-form-wrap {
        padding: 0;
    }

    .ctrl-login-form-wrap {
        padding: 0 4rem;
        min-height: 100vh;
        align-items: center;
        background: #f5f8f5;
    }

    .ctrl-brand-panel {
        min-height: 100vh;
        border-radius: 0;
        padding: 3.25rem 3rem 2.4rem;
    }

    .ctrl-login-card {
        max-width: 520px;
    }
}

@media (max-width: 1023px) {
    .ctrl-login-grid {
        min-height: auto;
    }

    .ctrl-login-brand,
    .ctrl-login-form-wrap {
        padding: 1rem;
    }

    .ctrl-brand-panel {
        border-radius: 1.5rem;
        padding: 1.55rem 1.05rem;
    }

    .ctrl-login-form-wrap {
        padding-top: 0.5rem;
    }

    .ctrl-form-title {
        font-size: 2.25rem;
    }

    .ctrl-hero-title {
        font-size: clamp(2.35rem, 11vw, 3.25rem);
    }

    .ctrl-hero-copy {
        max-width: none;
        margin-top: 1.1rem;
        font-size: 0.82rem;
        line-height: 1.75;
    }

    .ctrl-metric-row {
        gap: 0.65rem;
        margin-top: 0.4rem;
        max-width: none;
    }

    .ctrl-metric-value {
        font-size: 1.7rem;
    }

    .ctrl-metric-label {
        font-size: 0.58rem;
    }

    .ctrl-trust-line {
        max-width: none;
        margin-top: 1rem;
        padding-top: 0.8rem;
        font-size: 0.64rem;
    }

    .ctrl-gold-rule {
        margin: 1.7rem 0 1.15rem;
    }

    .ctrl-login-meta {
        margin-top: 0.75rem;
        padding-top: 0.85rem;
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .ctrl-footer-version {
        text-align: left;
    }
}

/* ==============================================
   PANEL SHELL — Sidebar · Topbar · Layout
   ============================================== */
   PANEL SHELL — Sidebar · Topbar · Layout
   ============================================== */

/* ---- Layout root ---- */
.ctrl-panel-body {
    background: #f5f8f5;
    overflow-x: hidden;
}

/* ---- Sidebar ---- */
.ctrl-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 240px;
    background: linear-gradient(180deg, #091a0d 0%, #102316 100%);
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 4px 0 20px rgba(5, 18, 8, 0.18);
}

.ctrl-sidebar-brand {
    padding: 1.6rem 1.4rem 1.3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}

.ctrl-sidebar-close {
    display: none;
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 7px;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.45);
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    margin-top: 0.1rem;
    padding: 0;
}

.ctrl-sidebar-close:hover {
    background: rgba(255,255,255,0.12);
    color: #ffffff;
}

.ctrl-sidebar-logo {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.ctrl-sidebar-domain {
    margin-top: 0.35rem;
    font-size: 0.68rem;
    color: rgba(201, 168, 76, 0.55);
    font-weight: 400;
    letter-spacing: 0.04em;
}

.ctrl-sidebar-nav {
    flex: 1;
    padding: 1rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.ctrl-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.85rem;
    border-radius: 9px;
    min-height: 44px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.84rem;
    font-weight: 400;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.ctrl-nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.85);
}

.ctrl-nav-link--active {
    background: rgba(201, 168, 76, 0.1);
    color: #c9a84c;
    font-weight: 500;
}

.ctrl-nav-link--active:hover {
    background: rgba(201, 168, 76, 0.14);
    color: #c9a84c;
}

.ctrl-nav-icon {
    width: 16px;
    text-align: center;
    flex-shrink: 0;
    font-size: 0.85rem;
}

.ctrl-sidebar-foot {
    padding: 0.9rem 1rem 1.1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ctrl-sidebar-user {
    flex: 1;
    min-width: 0;
}

.ctrl-sidebar-user-name {
    font-size: 0.82rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ctrl-sidebar-user-role {
    margin-top: 0.18rem;
    font-size: 0.68rem;
    color: rgba(201, 168, 76, 0.6);
    letter-spacing: 0.03em;
}

.ctrl-sidebar-logout {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.04);
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.ctrl-sidebar-logout:hover {
    background: rgba(190, 24, 93, 0.15);
    color: #fb7185;
}

/* ---- Mobile Bottom Nav ---- */
.ctrl-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: #091a0d;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: space-around;
    padding: 0.4rem 0 calc(0.4rem + env(safe-area-inset-bottom));
}

.ctrl-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    min-width: 52px;
    padding: 0.3rem 0.5rem;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.6rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    text-decoration: none;
    gap: 0.2rem;
    transition: color 0.15s ease;
}

.ctrl-bottom-nav-item i {
    font-size: 1rem;
}

.ctrl-bottom-nav-item--active {
    color: #c9a84c;
}

/* ---- Main content area ---- */
.ctrl-main {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.ctrl-topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #ffffff;
    border-bottom: 1px solid rgba(9, 26, 13, 0.07);
    padding: 0.9rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: 68px;
}

.ctrl-topbar-left {
    flex: 1;
    min-width: 0;
}

.ctrl-mobile-wordmark {
    display: none;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1;
    flex-shrink: 0;
}

.ctrl-mobile-wordmark .ctrl-wordmark-maya {
    color: #091a0d;
}

.ctrl-mobile-wordmark .ctrl-wordmark-sim {
    color: #c9a84c;
}

.ctrl-page-title {
    margin: 0;
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.55rem, 2.5vw, 1.9rem);
    font-weight: 600;
    line-height: 1;
    color: #091a0d;
    letter-spacing: -0.025em;
}

.ctrl-page-subtitle {
    margin: 0.3rem 0 0;
    font-size: 0.75rem;
    color: #a0b0a0;
    font-weight: 300;
    line-height: 1;
}

.ctrl-topbar-meta {
    font-size: 0.72rem;
    color: #b8c8b8;
    font-weight: 300;
    white-space: nowrap;
    flex-shrink: 0;
}

.ctrl-content {
    flex: 1;
    padding: 1.75rem 1.5rem;
}

.ctrl-panel-footer {
    padding: 1rem 1.5rem;
    font-size: 0.72rem;
    color: #b8c8b8;
    border-top: 1px solid rgba(9, 26, 13, 0.07);
    background: #ffffff;
    font-weight: 300;
}

/* ---- Hamburger toggle (mobile only) ---- */
.ctrl-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}

.ctrl-hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: #091a0d;
    border-radius: 2px;
    transition: transform 0.22s ease, opacity 0.22s ease;
    transform-origin: center;
}

.ctrl-hamburger.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.ctrl-hamburger.is-open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.ctrl-hamburger.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ---- Sidebar overlay (mobile) ---- */
.ctrl-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(5, 18, 8, 0.55);
    z-index: 99;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.ctrl-sidebar-overlay.is-visible {
    display: block;
}

/* ---- Dashboard: stat cards ---- */
.ctrl-stat-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.ctrl-stat-card {
    background: #ffffff;
    border: 1px solid rgba(9, 26, 13, 0.07);
    border-radius: 14px;
    padding: 1.4rem 1.5rem 1.3rem;
    box-shadow: 0 2px 12px rgba(9, 26, 13, 0.04), 0 1px 3px rgba(9, 26, 13, 0.06);
    transition: box-shadow 0.2s ease;
}

.ctrl-stat-card:hover {
    box-shadow: 0 6px 24px rgba(9, 26, 13, 0.09);
}

.ctrl-stat-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #a0b0a0;
    margin: 0;
}

.ctrl-stat-value {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2rem, 8vw, 2.6rem);
    font-weight: 600;
    line-height: 1;
    color: #091a0d;
    margin: 0.55rem 0 0;
    letter-spacing: -0.03em;
    font-variant-numeric: lining-nums tabular-nums;
    font-feature-settings: "lnum" 1, "tnum" 1;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ctrl-stat-value.is-text-value {
    font-size: clamp(1.1rem, 3.2vw, 1.45rem);
    line-height: 1.2;
    letter-spacing: -0.01em;
}

/* ---- Dashboard: summary section ---- */
.ctrl-summary-section {
    background: #ffffff;
    border: 1px solid rgba(9, 26, 13, 0.07);
    border-radius: 14px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(9, 26, 13, 0.04), 0 1px 3px rgba(9, 26, 13, 0.06);
    margin-top: 1.25rem;
}

.ctrl-summary-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    gap: 1rem;
}

.ctrl-summary-heading {
    margin: 0;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.45rem;
    font-weight: 600;
    color: #091a0d;
    letter-spacing: -0.02em;
    line-height: 1;
}

.ctrl-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
}

.ctrl-summary-item {
    border: 1px solid rgba(9, 26, 13, 0.07);
    border-radius: 10px;
    padding: 1rem 1.1rem;
    background: #f9fbf9;
}

.ctrl-summary-item-label {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #a0b0a0;
    margin: 0;
}

.ctrl-summary-item-value {
    font-size: 0.92rem;
    font-weight: 500;
    color: #091a0d;
    margin: 0.35rem 0 0;
    line-height: 1.3;
}

/* ---- Responsive breakpoints ---- */
@media (min-width: 1024px) {
    .ctrl-sidebar {
        display: flex;
        transform: none;
    }

    .ctrl-hamburger {
        display: none;
    }

    .ctrl-bottom-nav {
        display: none;
    }

    .ctrl-main {
        margin-left: 240px;
        padding-bottom: 0;
    }

    .ctrl-topbar {
        padding: 1rem 2rem;
    }

    .ctrl-content {
        padding: 2rem;
    }

    .ctrl-stat-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .ctrl-stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1023px) {
    .ctrl-sidebar {
        transform: translateX(-100%);
        transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .ctrl-sidebar.is-open {
        transform: translateX(0);
    }

    .ctrl-hamburger {
        display: flex;
    }

    .ctrl-sidebar-close {
        display: flex;
    }

    .ctrl-mobile-wordmark {
        display: inline-flex;
        align-items: baseline;
    }

    .ctrl-bottom-nav {
        display: none;
    }

    .ctrl-main {
        margin-left: 0;
        padding-bottom: 0;
    }

    .ctrl-topbar {
        padding: 0.75rem 1rem;
        min-height: 58px;
    }

    .ctrl-page-title {
        font-size: clamp(2rem, 6.5vw, 2.35rem);
    }

    .ctrl-content {
        padding: 1rem;
    }

    .ctrl-topbar-meta {
        display: none;
    }

    .ctrl-summary-grid {
        grid-template-columns: 1fr;
    }
}
