:root {
    --ink: #17140f;
    --muted: #667085;
    --paper: #fffaf4;
    --white: #ffffff;
    --line: #eadfd2;
    --earth: #c05621;
    --earth-dark: #954018;
    --leaf: #1f6f5b;
    --clay: #e8b15e;
    --shadow: 0 24px 70px rgba(23, 20, 15, 0.16);
    --font-head: "Playfair Display", Georgia, serif;
    --font-body: "Inter", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: var(--font-body);
}

a {
    color: inherit;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(420px, 1.12fr) minmax(380px, 0.88fr);
}

.brand-stage {
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    background:
        linear-gradient(115deg, rgba(23, 20, 15, 0.78), rgba(31, 111, 91, 0.45)),
        url("https://belesproduction.co.za/assets/images/IMG-20260115-WA0234.jpg") center / cover;
}

.brand-stage::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 32%;
    background: linear-gradient(to top, rgba(23, 20, 15, 0.88), rgba(23, 20, 15, 0));
    pointer-events: none;
}

.brand-stage__content {
    position: relative;
    z-index: 2;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 42px clamp(28px, 5vw, 72px);
    color: var(--white);
}

.brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    width: fit-content;
    color: inherit;
    text-decoration: none;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: var(--earth);
    color: var(--white);
    font-family: var(--font-head);
    font-size: 1.25rem;
    font-weight: 800;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}

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

.brand-lockup strong {
    font-size: 1rem;
    letter-spacing: 0.02em;
}

.brand-lockup small {
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.stage-copy {
    max-width: 720px;
    padding: 72px 0;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--earth);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.brand-stage .eyebrow {
    color: var(--clay);
}

.stage-copy h1,
.card-heading h2,
.dashboard-header h1 {
    margin: 0;
    font-family: var(--font-head);
    line-height: 1.02;
}

.stage-copy h1 {
    max-width: 760px;
    font-size: clamp(3rem, 7vw, 6.4rem);
}

.stage-summary {
    max-width: 560px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 1.08rem;
    line-height: 1.8;
}

.stage-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
}

.stage-metrics div {
    padding: 22px;
    background: rgba(23, 20, 15, 0.28);
}

.stage-metrics span,
.stage-metrics strong {
    display: block;
}

.stage-metrics span {
    color: var(--clay);
    font-size: 0.8rem;
    font-weight: 800;
}

.stage-metrics strong {
    margin-top: 7px;
    font-size: 0.95rem;
}

.login-panel {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 44px clamp(22px, 5vw, 78px);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 250, 244, 0.96)),
        var(--paper);
}

.panel-topline {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    align-self: flex-start;
    margin-bottom: 24px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--leaf);
    font-size: 0.82rem;
    font-weight: 800;
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--leaf);
    box-shadow: 0 0 0 5px rgba(31, 111, 91, 0.12);
}

.login-card {
    width: min(100%, 470px);
    padding: clamp(28px, 5vw, 46px);
    border: 1px solid rgba(234, 223, 210, 0.92);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow);
}

.card-heading h2 {
    font-size: clamp(2.4rem, 4vw, 3.6rem);
}

.card-heading p:last-child {
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.65;
}

.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 22px;
    padding: 14px 15px;
    border-radius: 14px;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.45;
}

.alert-error {
    border: 1px solid #ffd2cd;
    background: #fff1ef;
    color: #a23322;
}

.login-form {
    display: grid;
    gap: 19px;
    margin-top: 28px;
}

.field label {
    display: block;
    margin-bottom: 8px;
    color: #332c24;
    font-size: 0.82rem;
    font-weight: 800;
}

.input-shell {
    display: grid;
    grid-template-columns: 20px 1fr auto;
    align-items: center;
    gap: 10px;
    min-height: 56px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fffdf9;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.input-shell:focus-within {
    border-color: rgba(192, 86, 33, 0.78);
    background: var(--white);
    box-shadow: 0 0 0 5px rgba(192, 86, 33, 0.11);
}

.input-shell i {
    color: #8c7b69;
}

.input-shell input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-weight: 650;
}

.input-shell input::placeholder {
    color: #b3a899;
    font-weight: 500;
}

.field.is-invalid .input-shell {
    border-color: #d44835;
    box-shadow: 0 0 0 5px rgba(212, 72, 53, 0.1);
}

.field-message,
.caps-warning {
    min-height: 18px;
    margin-top: 7px;
    color: #b43a29;
    font-size: 0.78rem;
    font-weight: 700;
}

.field-message:empty {
    display: block;
}

.caps-warning {
    display: none;
    align-items: center;
    gap: 6px;
    color: #9b6216;
}

.caps-warning.visible {
    display: flex;
}

.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: background 160ms ease, color 160ms ease;
}

.icon-button:hover,
.icon-button:focus-visible {
    background: #f3eadf;
    color: var(--earth);
    outline: 0;
}

.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: var(--muted);
    font-size: 0.84rem;
}

.check-control {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    user-select: none;
}

.check-control input {
    width: 18px;
    height: 18px;
    accent-color: var(--earth);
}

.session-note {
    color: var(--leaf);
    font-weight: 800;
}

.submit-button,
.site-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    border-radius: 16px;
    text-decoration: none;
    font-family: var(--font-body);
    font-weight: 850;
    cursor: pointer;
}

.submit-button {
    min-height: 58px;
    margin-top: 6px;
    background: var(--ink);
    color: var(--white);
    box-shadow: 0 18px 35px rgba(23, 20, 15, 0.22);
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.submit-button:hover,
.submit-button:focus-visible {
    background: var(--earth-dark);
    transform: translateY(-2px);
    box-shadow: 0 22px 42px rgba(149, 64, 24, 0.27);
    outline: 0;
}

.submit-button.is-loading {
    pointer-events: none;
    opacity: 0.8;
}

.submit-button.is-loading i {
    animation: spin 820ms linear infinite;
}

.panel-footer {
    width: min(100%, 470px);
    margin: 22px 0 0;
    color: var(--muted);
    font-size: 0.82rem;
    text-align: center;
}

.dashboard-body {
    min-height: 100vh;
    background: #f6f2eb;
}

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

.dashboard-sidebar {
    padding: 28px;
    background: var(--ink);
    color: var(--white);
}

.brand-lockup.compact .brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    font-size: 1rem;
}

.dashboard-nav {
    display: grid;
    gap: 10px;
    margin-top: 38px;
}

.dashboard-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: 14px;
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    font-weight: 800;
    transition: background 160ms ease, color 160ms ease;
}

.dashboard-nav a:hover,
.dashboard-nav a.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.dashboard-nav .logout-link {
    margin-top: 28px;
    color: #ffb0a7;
}

.dashboard-main {
    padding: clamp(26px, 5vw, 60px);
}

.dashboard-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 30px;
}

.dashboard-header h1 {
    font-size: clamp(2.2rem, 4vw, 4rem);
}

.site-link {
    flex: 0 0 auto;
    padding: 13px 16px;
    border: 1px solid var(--line);
    background: var(--white);
    color: var(--ink);
    box-shadow: 0 10px 24px rgba(23, 20, 15, 0.06);
}

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

.dashboard-tile {
    display: block;
    min-height: 230px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--white);
    color: var(--ink);
    text-decoration: none;
    box-shadow: 0 14px 38px rgba(23, 20, 15, 0.08);
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.dashboard-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 48px rgba(23, 20, 15, 0.13);
}

.tile-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    margin-bottom: 24px;
    border-radius: 16px;
    color: var(--white);
}

.tile-icon.product {
    background: var(--earth);
}

.tile-icon.project {
    background: var(--leaf);
}

.dashboard-tile strong {
    display: block;
    font-size: 1.3rem;
}

.dashboard-tile p {
    max-width: 340px;
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.65;
}

.empty-state {
    max-width: 760px;
    padding: clamp(28px, 5vw, 48px);
    border: 1px dashed #d6c7b6;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 14px 34px rgba(23, 20, 15, 0.06);
}

.empty-state strong {
    display: block;
    color: var(--ink);
    font-size: 1.35rem;
}

.empty-state p {
    max-width: 560px;
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

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

    .brand-stage {
        min-height: 48vh;
    }

    .brand-stage__content {
        min-height: 48vh;
    }

    .stage-copy {
        padding: 42px 0 30px;
    }

    .login-panel {
        min-height: auto;
        padding-top: 34px;
    }

    .login-card,
    .panel-footer {
        width: 100%;
    }

    .dashboard-shell {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar {
        position: static;
    }

    .dashboard-nav {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px;
    }

    .dashboard-nav a {
        justify-content: center;
        text-align: center;
    }

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

@media (max-width: 640px) {
    .brand-stage {
        min-height: 44vh;
    }

    .brand-stage__content {
        min-height: 44vh;
        padding: 24px;
    }

    .stage-copy h1 {
        font-size: 2.55rem;
    }

    .stage-summary {
        font-size: 0.96rem;
    }

    .stage-metrics {
        grid-template-columns: 1fr;
    }

    .stage-metrics div {
        padding: 14px 16px;
    }

    .login-panel {
        padding: 24px 16px 30px;
    }

    .login-card {
        padding: 24px;
        border-radius: 22px;
    }

    .form-row,
    .dashboard-header {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-nav {
        grid-template-columns: 1fr 1fr;
    }

    .dashboard-nav .logout-link {
        margin-top: 0;
    }
}

/* Admin layout v2 */
.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 292px minmax(0, 1fr);
}

.content-shell {
    min-width: 0;
}

.dashboard-sidebar {
    position: sticky;
    top: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 26px;
    background:
        linear-gradient(180deg, rgba(192, 86, 33, 0.12), rgba(31, 111, 91, 0.1)),
        var(--ink);
    color: var(--white);
}

.sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.sidebar-close {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--white);
    cursor: pointer;
}

.sidebar-profile,
.user-chip {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-profile {
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.07);
}

.profile-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 15px;
    background: var(--earth);
    color: var(--white);
    font-weight: 900;
    text-transform: uppercase;
}

.profile-avatar.small {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    border-radius: 13px;
}

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

.sidebar-profile strong,
.user-chip strong {
    font-size: 0.9rem;
}

.sidebar-profile small,
.user-chip small {
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-nav {
    display: grid;
    gap: 9px;
    margin-top: 0;
}

.dashboard-nav a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: 16px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-weight: 850;
    transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.dashboard-nav a:hover,
.dashboard-nav a.active {
    background: rgba(255, 255, 255, 0.11);
    color: var(--white);
    transform: translateX(2px);
}

.dashboard-nav a.active::before {
    content: "";
    position: absolute;
    left: -10px;
    width: 4px;
    height: 22px;
    border-radius: 999px;
    background: var(--clay);
}

.sidebar-footer {
    display: grid;
    gap: 8px;
    margin-top: auto;
}

.sidebar-footer a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 14px;
    border-radius: 15px;
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 800;
}

.sidebar-footer a:hover {
    background: rgba(255, 255, 255, 0.09);
    color: var(--white);
}

.sidebar-footer .logout-link {
    color: #ffb0a7;
}

.sidebar-backdrop {
    display: none;
}

.topnav {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 24px clamp(22px, 4vw, 44px);
    border-bottom: 1px solid rgba(234, 223, 210, 0.86);
    background: rgba(246, 242, 235, 0.9);
    backdrop-filter: blur(18px);
}

.menu-button {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--white);
    color: var(--ink);
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(23, 20, 15, 0.08);
}

.topnav-title {
    min-width: 0;
    margin-right: auto;
}

.topnav-title h1 {
    margin: 0;
    font-family: var(--font-head);
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.02;
}

.topnav-title p:last-child {
    max-width: 680px;
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.55;
}

.topnav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

.user-chip {
    min-height: 50px;
    padding: 6px 12px 6px 7px;
    border: 1px solid var(--line);
    border-radius: 17px;
    background: var(--white);
    box-shadow: 0 10px 24px rgba(23, 20, 15, 0.06);
}

.user-chip small {
    color: var(--muted);
}

.dashboard-main {
    padding: clamp(22px, 4vw, 44px);
}

.notice-card {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
    padding: 15px 16px;
    border: 1px solid #f1d3a0;
    border-radius: 18px;
    background: #fff8eb;
    color: #815315;
    font-weight: 800;
}

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

.stat-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    min-height: 152px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--white);
    box-shadow: 0 14px 36px rgba(23, 20, 15, 0.07);
}

.stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 15px;
    color: var(--white);
}

.accent-earth .stat-icon {
    background: var(--earth);
}

.accent-leaf .stat-icon {
    background: var(--leaf);
}

.accent-clay .stat-icon {
    background: var(--clay);
    color: var(--ink);
}

.accent-ink .stat-icon {
    background: var(--ink);
}

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

.stat-card small {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.stat-card strong {
    display: block;
    margin-top: 8px;
    color: var(--ink);
    font-size: 2.15rem;
    line-height: 1;
}

.stat-card span {
    margin-top: 10px;
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.45;
}

.workspace-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.75fr);
    gap: 24px;
    align-items: start;
}

.workspace-panel {
    padding: clamp(22px, 3vw, 30px);
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 16px 42px rgba(23, 20, 15, 0.07);
}

.panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.panel-heading h2 {
    margin: 0;
    font-family: var(--font-head);
    font-size: clamp(1.65rem, 3vw, 2.3rem);
}

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

.action-card {
    display: block;
    min-height: 248px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--white);
    color: var(--ink);
    text-decoration: none;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.action-card:hover {
    transform: translateY(-4px);
    border-color: rgba(192, 86, 33, 0.38);
    box-shadow: 0 18px 38px rgba(23, 20, 15, 0.1);
}

.action-card strong {
    display: block;
    font-size: 1.22rem;
}

.action-card p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.6;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    color: var(--earth);
    font-weight: 900;
}

.activity-list {
    display: grid;
    gap: 10px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px;
    border: 1px solid transparent;
    border-radius: 18px;
    color: var(--ink);
    text-decoration: none;
    transition: background 160ms ease, border-color 160ms ease;
}

.activity-item:hover {
    border-color: var(--line);
    background: var(--white);
}

.activity-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 14px;
    color: var(--white);
}

.activity-icon.product {
    background: var(--earth);
}

.activity-icon.project {
    background: var(--leaf);
}

.activity-item strong,
.activity-item small {
    display: block;
}

.activity-item strong {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.activity-item small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.empty-activity {
    padding: 22px;
    border: 1px dashed #d6c7b6;
    border-radius: 20px;
    color: var(--muted);
    text-align: center;
}

.empty-activity i {
    color: var(--earth);
    font-size: 1.4rem;
}

.empty-activity strong {
    display: block;
    margin-top: 12px;
    color: var(--ink);
}

.empty-activity p {
    margin: 7px 0 0;
    line-height: 1.55;
}

@media (max-width: 1180px) {
    .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 980px) {
    .app-shell {
        display: block;
    }

    .dashboard-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 60;
        width: min(86vw, 320px);
        transform: translateX(-105%);
        transition: transform 180ms ease;
    }

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

    .sidebar-open .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 55;
        background: rgba(23, 20, 15, 0.45);
        backdrop-filter: blur(3px);
    }

    .sidebar-close,
    .menu-button {
        display: inline-flex;
    }

    .dashboard-nav {
        grid-template-columns: 1fr;
    }

    .topnav {
        align-items: flex-start;
    }

    .topnav-actions {
        margin-left: auto;
    }

    .user-chip {
        display: none;
    }
}

@media (max-width: 720px) {
    .topnav {
        flex-wrap: wrap;
    }

    .topnav-title {
        order: 3;
        flex: 1 0 100%;
    }

    .stat-grid,
    .action-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        min-height: auto;
    }
}

@media (max-width: 520px) {
    .topnav-actions .site-link {
        width: 44px;
        height: 44px;
        padding: 0;
        overflow: hidden;
        white-space: nowrap;
        color: transparent;
    }

    .topnav-actions .site-link i {
        color: var(--ink);
    }
}
