/* =========================================================
   Pro Carp Community — bold high-contrast redesign
   Phase 1: left sidebar shell + home page theme
   ========================================================= */

:root {
    --bg: #060807;
    --surface: #0c110f;
    --surface-2: #131a17;
    --surface-3: #1a231e;
    --fg: #f4f7f2;
    --fg-soft: #d7ded6;
    --muted-fg: #98a39a;
    --accent: #c9f73a;
    --accent-2: #e2ff7a;
    --accent-ink: #0a0d08;
    --line-2: rgba(255, 255, 255, .1);
    --line-2-strong: rgba(255, 255, 255, .18);
    --sidebar-w: 272px;
    --topbar-h: 68px;
    --radius-2: 8px;
}

/* ---------- Buttons that must contrast with either surface ---------- */

/* Outline and ghost buttons sit on dark heroes and on light content panels.
   Inherit the surrounding text colour so they stay readable on both, and tint
   the border from the same colour instead of a fixed light line. */
.button--outline {
    border-color: color-mix(in srgb, currentColor 38%, transparent);
    color: inherit;
}

.button--outline:hover {
    border-color: currentColor;
    background: color-mix(in srgb, currentColor 8%, transparent);
}

.button--ghost {
    border-color: color-mix(in srgb, currentColor 30%, transparent);
    color: inherit;
}

/* ---------- Shell ---------- */

.app-shell {
    min-height: 100vh;
}

/* The document behind the shell is still light; keep overscroll dark. */
html:has(.app-main),
body:has(.app-main) {
    background: #060807;
}

.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 200;
    display: flex;
    flex-direction: column;
    width: var(--sidebar-w);
    background: #080b0a;
    border-right: 1px solid var(--line-2);
}

.sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 16px 16px;
    border-bottom: 1px solid var(--line-2);
}

.sidebar-head .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.sidebar-head .brand-logo {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
}

/* A logo the club uploaded is whatever shape they sent: a wide wordmark would
   be unreadable squeezed into a 38px square, so let it keep its own shape and
   just cap how much of the sidebar it may take. */
.sidebar-head .brand-logo--custom {
    width: auto;
    height: 38px;
    max-width: min(11rem, 60%);
    object-fit: contain;
    border-radius: 6px;
}

.sidebar-head .brand-copy {
    min-width: 0;
}

.sidebar-head .brand-name {
    font-family: var(--font-display);
    font-size: clamp(.92rem, 1.02vw, 1.08rem);
    letter-spacing: .05em;
    line-height: 1.2;
    /* A club name can be a mouthful ("Bank Life Lads EST 2019"). Truncating it
       with an ellipsis hid the accent entirely, so let it take a second line. */
    white-space: normal;
    overflow-wrap: anywhere;
    color: var(--fg);
}

.sidebar-head .brand-name em {
    display: block;
    margin-top: 2px;
    color: var(--accent);
    font-size: .78em;
    font-style: normal;
    letter-spacing: .06em;
    line-height: 1.2;
}

.sidebar-close {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    border: 1px solid var(--line-2);
    border-radius: 50%;
    background: transparent;
    color: var(--fg-soft);
}

.sidebar-close:hover {
    color: var(--fg);
    border-color: var(--line-2-strong);
}

.sidebar-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 16px 12px 22px;
    scrollbar-width: thin;
    scrollbar-color: var(--surface-3) transparent;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-group-label {
    margin: 0 0 6px;
    padding: 0 10px;
    color: var(--muted-fg);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: var(--radius-2);
    color: var(--fg-soft);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    transition: background .15s ease, color .15s ease;
}

.sidebar-link:hover {
    background: var(--surface-2);
    color: var(--fg);
}

.sidebar-link.is-active {
    background: var(--accent);
    color: var(--accent-ink);
    font-weight: 800;
}

.sidebar-link.is-active .sidebar-ico {
    color: var(--accent-ink);
}

.sidebar-ico {
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    color: var(--muted-fg);
}

.sidebar-ico .nav-ico {
    width: 17px;
    height: 17px;
}

.sidebar-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-badge {
    flex: 0 0 auto;
    min-width: 19px;
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--accent-ink);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.6;
    text-align: center;
}

.sidebar-link.is-active .sidebar-badge {
    background: var(--accent-ink);
    color: var(--accent);
}

.sidebar-link .nav-pill {
    flex: 0 0 auto;
    margin-left: auto;
    min-width: 19px;
    padding: 1px 6px;
    background: var(--accent);
    color: var(--accent-ink);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.6;
    vertical-align: 0;
}

.sidebar-link.is-active .nav-pill {
    background: var(--accent-ink);
    color: var(--accent);
}

.sidebar-tools {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--line-2);
}

.sidebar-link--staff {
    color: var(--accent);
}

.sidebar-link--staff .sidebar-ico {
    color: var(--accent);
}

.sidebar-link--staff:hover {
    background: rgba(201, 247, 58, .1);
    color: var(--accent-2);
}

.sidebar-foot {
    padding: 14px 14px 16px;
    border-top: 1px solid var(--line-2);
    background: #070a09;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.sidebar-user-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.sidebar-user-copy strong {
    font-size: 12px;
    line-height: 1.2;
    color: var(--fg);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user-copy span {
    color: var(--muted-fg);
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-signout {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    border: 1px solid var(--line-2);
    border-radius: var(--radius-2);
    background: transparent;
    color: var(--muted-fg);
}

.sidebar-signout:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.sidebar-guest {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-guest .button {
    width: 100%;
    justify-content: center;
}

.sidebar-scrim {
    position: fixed;
    inset: 0;
    z-index: 190;
    border: 0;
    background: rgba(0, 0, 0, .62);
    backdrop-filter: blur(2px);
}

.app-main {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
    margin-left: var(--sidebar-w);
    background: var(--cream);
}

/* ---------- Top bar ---------- */

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 150;
    display: flex;
    align-items: center;
    gap: 14px;
    height: var(--topbar-h);
    padding: 0 22px;
    background: rgba(6, 8, 7, .88);
    border-bottom: 1px solid var(--line-2);
    backdrop-filter: blur(14px);
    color: var(--fg);
}

.app-topbar.is-scrolled {
    background: rgba(6, 8, 7, .97);
    box-shadow: 0 18px 44px -30px rgba(0, 0, 0, .95);
}

.topbar-toggle {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    border: 1px solid var(--line-2);
    border-radius: var(--radius-2);
    background: transparent;
    color: var(--fg);
}

.topbar-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
}

.topbar-heading {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.topbar-kicker {
    color: var(--muted-fg);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
    white-space: nowrap;
}

.topbar-title {
    font-family: var(--font-display);
    font-size: 1.35rem;
    letter-spacing: .04em;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.topbar-icon {
    position: relative;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--line-2);
    border-radius: var(--radius-2);
    color: var(--fg-soft);
    transition: color .15s ease, border-color .15s ease, background .15s ease;
}

.topbar-icon:hover {
    color: var(--fg);
    border-color: var(--line-2-strong);
    background: var(--surface-2);
}

.topbar-icon .nav-ico {
    width: 18px;
    height: 18px;
}

.topbar-dot {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 17px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--accent-ink);
    font-size: 11px;
    font-weight: 800;
    line-height: 17px;
    text-align: center;
}

.topbar-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    padding: 0 14px;
    border-radius: var(--radius-2);
    background: var(--accent);
    color: var(--accent-ink);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
    white-space: nowrap;
    transition: transform .15s ease, background .15s ease;
}

.topbar-cta:hover {
    transform: translateY(-1px);
    background: var(--accent-2);
}

.topbar-cta .nav-ico {
    width: 15px;
    height: 15px;
}

.topbar-signin {
    color: var(--fg-soft);
    font-size: 12px;
    font-weight: 700;
    padding: 8px 10px;
}

.topbar-signin:hover {
    color: var(--fg);
}

/* Topbar user menu — inherits the existing user-menu styles; align the chip. */

.app-topbar .user-chip {
    border-color: var(--line-2);
    color: var(--fg-soft);
}

.app-topbar .user-chip:hover {
    border-color: var(--line-2-strong);
    color: var(--fg);
}

/* ---------- Site-wide — bold high-contrast dark theme ---------- */

.app-main {
    color-scheme: dark;
    --ink: #f4f7f2;
    --ink-rgb: 244, 247, 242;
    --ink-soft: #d7ded6;
    --muted: #98a39a;
    --forest: #060807;
    --forest-2: #0c110f;
    --forest-3: #131a17;
    --cream: #060807;
    --paper: #0c110f;
    --paper-2: #131a17;
    --gold: #c9f73a;
    --gold-light: #e2ff7a;
    --gold-deep: #a8cc2a;
    --rust: #ff6b3d;
    --sage: #7f8f80;
    --line: rgba(255, 255, 255, .12);
    --line-dark: rgba(255, 255, 255, .14);
    --white-line: rgba(255, 255, 255, .14);
    --shadow: 0 30px 80px -40px rgba(0, 0, 0, .92);
    --shadow-soft: 0 18px 44px -30px rgba(0, 0, 0, .85);
    color: var(--ink);
}

/* Dark-surface components paint their text with --paper, which is now a dark
   surface colour. Restore light text on every page. */
.auth-visual,
.club-head,
.app-hero,
.profile-head,
.logger-head,
.chat-page-head,
.message-bubble.is-out,
.channel.is-active,
.rail-card--quote p,
.rail-card--personal,
.rail-card--personal .text-link,
.gps-box,
.event-card-date,
.site-footer {
    color: var(--fg);
}

.crew-badge,
.gps-chip {
    color: var(--fg);
}

.crew-badge--bank-life {
    color: var(--bg);
}

/* --forest is near-black now; a dark button on a dark surface disappears. */
.button--dark {
    background: var(--fg);
    border-color: var(--fg);
    color: var(--bg);
}

/* Form hover fills were tuned for a light surface. */
.upload-zone:hover {
    background: var(--surface-3);
}

/* Empty states used a hardcoded cream fill; keep them on the dark surface. */
.empty-state,
.club-page .empty-state {
    background: var(--surface-2);
    border-color: var(--line);
}

/* The chat message area was a near-white panel; keep it on the dark surface. */
.chat-messages {
    background:
        linear-gradient(rgba(6, 8, 7, .92), rgba(6, 8, 7, .92)),
        url("../img/catch-placeholder.svg") center / cover;
    scrollbar-color: var(--line-2-strong) transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--line-2-strong);
}

/* Chat sat on a cream band with a cream "mine" bubble; keep both dark. */
.app-main .chat-section {
    background: #060807;
}

.app-main .chat-message.is-mine .chat-message-body {
    border-color: var(--line-2-strong);
    background: var(--forest-2);
    color: var(--fg);
}

/* Active/hover feed tabs and the account preview painted --forest/--paper text,
   which is near-black on the dark theme. Restore light. */
.app-main .feed-tabs a:hover,
.app-main .feed-tabs a.is-active {
    color: var(--fg);
}

.app-main .account-preview {
    color: var(--fg);
}

/* The settings preview body painted --forest with --paper text; keep it light. */
.app-main .preview-body {
    color: var(--fg);
}

/* Plain buttons keep the browser's light button face on the dark theme. */
.app-main .sponsor-admin button {
    border: 0;
    background: transparent;
    color: inherit;
}

/* Checkboxes/radios were tinted with the dark forest; use the bright accent. */
.app-main .check-row input,
.app-main .settings-check input {
    accent-color: var(--gold);
}

/* Chrome autofill paints a light yellow box; keep it on the dark field. */
.app-main input:-webkit-autofill,
.app-main input:-webkit-autofill:hover,
.app-main input:-webkit-autofill:focus,
.app-main input:-webkit-autofill:active {
    -webkit-text-fill-color: var(--fg);
    -webkit-box-shadow: 0 0 0 1000px var(--paper) inset;
    caret-color: var(--fg);
    transition: background-color 9999s ease-out 0s;
}

/* The single-post title and a few hover states still painted --forest, which
   is near-black on the dark theme. Keep them light. */
.app-main .post-title,
.app-main .post-back a:hover,
.app-main .feed-time:hover,
.app-main .text-link:hover {
    color: var(--fg);
}

.app-main .text-link:hover {
    border-bottom-color: var(--fg);
}

/* Staff settle cards and donate option tiles were cream panels; keep them dark. */
.app-main .staff-card,
.app-main .donate-kind-inner {
    background: var(--paper-2);
}

/* The feed composer's file input has a wide intrinsic size that pushed the
   Post button past the viewport on phones; let it shrink. */
.app-main .feed-composer-actions input[type="file"] {
    min-width: 0;
    max-width: 100%;
}

/* The board is wider than a phone; let its panel scroll. */
.app-main .board-panel {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Two-column club layouts keep a 300–320px rail beside the main column, which
   leaves the content column too narrow on a phone. Stack them. */
@media (max-width: 720px) {
    .app-main .diary-layout,
    .app-main .messages-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Accent chips, status pills and active filters were tuned for light surfaces;
   --forest/--cream are both dark now, so restore contrast. */
.news-filters a.is-on,
.ticket-filters a.is-on {
    background: var(--fg);
    border-color: var(--fg);
    color: var(--bg);
}

.news-lead,
.news-lead h2 a {
    color: var(--fg);
}

.role-chip--admin {
    background: var(--fg);
    color: var(--bg);
}

.role-chip--mod {
    background: rgba(52, 118, 84, .28);
    color: #9fe0b8;
}

.role-chip--helpdesk {
    background: rgba(120, 84, 168, .28);
    color: #cdb6ef;
}

.ticket-status--open {
    background: rgba(201, 168, 106, .22);
    color: #f0d79a;
}

.ticket-status--waiting {
    background: rgba(120, 84, 168, .22);
    color: #cdb6ef;
}

.ticket-status--answered {
    background: rgba(52, 118, 84, .22);
    color: #9fe0b8;
}

.post-hidden-note {
    background: rgba(156, 50, 38, .16);
    color: #f0a79c;
}

.changelog-draft {
    background: rgba(156, 50, 38, .18);
    color: #f0a79c;
}

.home-page .hero {
    background: #060807;
    color: var(--fg);
}

/* These sections paint a dark surface but set their text with var(--paper);
   the home theme repoints --paper at a dark card colour, so restore light text. */
.home-page .feature-card--chat,
.home-page .legacy,
.home-page .cta-panel,
.home-page .site-footer {
    color: var(--fg);
}

/* Small dark-surface labels/chips that paint their own text with var(--paper)
   or var(--forest) — both become near-black on the home theme. Restore light. */
.home-page .hero-presence strong,
.home-page .hero-stats-link,
.home-page .gps-chip,
.home-page .gps-chip--light,
.home-page .crew-badge {
    color: var(--fg);
}

.home-page .gps-chip,
.home-page .crew-badge {
    border-color: var(--line-2-strong);
}

/* The Bank Life badge sits on bright gold; keep its text dark everywhere. */
.crew-badge--bank-life,
.home-page .crew-badge--bank-life {
    color: #060807;
}

/* Muted copy was hardcoded for a cream surface; use the light muted token. */
.app-main .muted,
.app-main .muted-note,
.app-main .care-step p,
.app-main .privacy-body li {
    color: var(--muted);
}

/* Accent text tuned for cream (dark greens, purple, blue, brown) needs light
   variants on the dark theme. */
.app-main .status-pill,
.app-main .status-pill--open,
.app-main .price-pill--free,
.app-main .improved-delta.is-up,
.app-main .weather-trend--rising,
.app-main .ticket-status--answered,
.app-main .donation-kind--gear,
.app-main .received-chip {
    color: #9fe0b8;
}

.app-main .form-alert {
    color: var(--rust);
}

.app-main .form-alert--soft {
    color: var(--gold-light);
}

.app-main .ticket-status--waiting {
    color: #c3aee8;
}

.app-main .donation-kind--boat {
    color: #a9b8e0;
}

.app-main .ticket-status--open {
    color: var(--gold-light);
}

/* The sidebar lives on a dark surface on every page; the guest ghost button
   must stay light even when the home theme darkens --paper. */
.sidebar-guest .button--ghost {
    border-color: var(--line-2-strong);
    color: var(--fg);
}

.home-page .hero-inner {
    min-height: 560px;
    padding-top: 72px;
    padding-bottom: 56px;
}

.home-page .hero h1 {
    font-size: clamp(3rem, 7vw, 6rem);
    line-height: .84;
    letter-spacing: .01em;
}

@media (max-width: 900px) {
    .home-page .hero h1 {
        font-size: clamp(2.6rem, 8vw, 4.2rem);
    }
}

@media (max-width: 480px) {
    .home-page .hero h1 {
        font-size: clamp(2.2rem, 12vw, 3rem);
    }
}

.home-page .hero h1 em {
    color: var(--accent);
}

.home-page .hero-eyebrow {
    color: rgba(244, 247, 242, .72);
}

.home-page .eyebrow-rule {
    background: rgba(201, 247, 58, .45);
}

.home-page .section {
    padding: 84px 0;
}

.home-page .section-head h2,
.home-page .feature-card h2,
.home-page .legacy-head h2,
.home-page .cta-panel h2 {
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    line-height: .95;
    letter-spacing: .015em;
}

.home-page .catch-card,
.home-page .feature-card,
.home-page .honour-card,
.home-page .legacy-card,
.home-page .hero-card {
    border-radius: 12px;
}

.home-page .catch-card:hover,
.home-page .feature-card:hover {
    border-color: var(--accent);
}

.home-page .ticker {
    background: var(--accent);
    color: var(--accent-ink);
}

.home-page .ticker-track span,
.home-page .ticker-track i {
    color: var(--accent-ink);
}

.home-page .button--gold {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-ink);
}

.home-page .button--gold:hover {
    background: var(--accent-2);
    border-color: var(--accent-2);
}

.home-page .button--dark {
    background: var(--fg);
    border-color: var(--fg);
    color: var(--bg);
}

.home-page .button--outline {
    border-color: rgba(244, 247, 242, .35);
    color: var(--fg);
}

/* The CTA panel is dark on the home theme; its outline-dark buttons paint
   their text with var(--paper), which is near-black here. Restore light. */
.home-page .cta-actions .button--outline-dark {
    border-color: rgba(244, 247, 242, .35);
    color: var(--fg);
}

.home-page .cta-actions .button--outline-dark:hover {
    border-color: var(--fg);
    background: var(--fg);
    color: var(--bg);
}

.home-page .live-badge {
    border-color: rgba(201, 247, 58, .4);
    color: var(--accent);
}

.home-page .live-badge .live-dot {
    background: var(--accent);
}

.home-page .honours-baits {
    border-color: var(--line);
}

.home-page .bait-chip {
    border-color: var(--line);
    background: var(--paper-2);
    color: var(--ink-soft);
}

.home-page .legacy-quote p {
    color: var(--accent-2);
}

.home-page .cta-panel {
    border-color: rgba(201, 247, 58, .28);
}

.home-page .cta-stamp {
    color: rgba(201, 247, 58, .35);
    border-color: rgba(201, 247, 58, .35);
}

/* ---------- Auth pages sit under the new top bar ---------- */

.auth-page .auth-shell {
    min-height: calc(100vh - var(--topbar-h));
}

/* The checked crew option paints --forest with --paper text; on the dark
   theme both are near-black, so restore the light label. */
.app-main .crew-option input:checked + .crew-option-inner {
    color: var(--ink);
}

/* ---------- Footer ---------- */

.app-main .site-footer {
    padding-top: 64px;
    background: #050706;
    border-top: 1px solid var(--line-2);
}

.app-main .site-footer::before {
    background: radial-gradient(circle, rgba(201, 247, 58, .09), transparent 65%);
}

.app-main .footer-wordmark em {
    color: var(--accent);
}

.app-main .footer-kicker,
.app-main .footer-legacy span {
    color: var(--accent);
}

.app-main .footer-legacy > div {
    border-top-color: var(--line-2);
}

/* ---------- Back to top ---------- */

.app-shell ~ .back-to-top {
    border-color: rgba(201, 247, 58, .55);
    background: rgba(6, 8, 7, .92);
    color: var(--accent);
}

/* ---------- Staff CP launcher (retheme) ---------- */

.staff-cp-toggle {
    border-color: rgba(201, 247, 58, .5);
    background: rgba(6, 8, 7, .94);
    color: var(--accent);
}

.staff-cp-toggle:hover {
    border-color: var(--accent);
    background: rgba(6, 8, 7, .99);
}

.staff-cp-toggle > .staff-cp-ico {
    color: var(--accent);
}

.staff-cp-panel {
    border-color: var(--line-2);
    background: var(--surface);
    color: var(--fg);
}

.staff-cp-kicker {
    color: var(--accent);
}

.staff-cp-role,
.staff-cp-copy small,
.staff-cp-note {
    color: var(--muted-fg);
}

.staff-cp-head,
.staff-cp-note {
    border-color: var(--line-2);
}

.staff-cp-link {
    color: var(--fg-soft);
}

.staff-cp-link:hover {
    background: var(--surface-2);
    color: var(--fg);
}

.staff-cp-ico {
    border-color: var(--line-2);
    background: var(--surface-2);
    color: var(--accent);
}

/* ---------- Responsive: off-canvas sidebar ---------- */

@media (max-width: 1024px) {
    .app-sidebar {
        transform: translateX(-100%);
        transition: transform .28s cubic-bezier(.22, .61, .36, 1);
        box-shadow: 24px 0 60px -30px rgba(0, 0, 0, .9);
    }

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

    body.sidebar-open {
        overflow: hidden;
    }

    .app-main {
        margin-left: 0;
    }

    .topbar-toggle {
        display: inline-flex;
    }

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

@media (max-width: 640px) {
    :root {
        --topbar-h: 60px;
    }

    .app-topbar {
        padding: 0 14px;
        gap: 10px;
    }

    .topbar-title {
        font-size: 1.15rem;
    }

    .topbar-kicker {
        display: none;
    }

    .topbar-cta span {
        display: none;
    }

    .topbar-cta {
        width: 40px;
        padding: 0;
        justify-content: center;
    }

    .app-topbar .user-chip-name {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-sidebar {
        transition: none;
    }
}

/* Print: drop the app chrome and force a clean light sheet. */
@media print {
    .app-sidebar,
    .app-topbar,
    .sidebar-scrim,
    .staff-cp,
    .no-print {
        display: none !important;
    }

    html,
    body {
        background: #fff !important;
    }

    .app-main {
        margin-left: 0 !important;
        background: #fff !important;
        color: #111 !important;
    }

    .app-main * {
        color: #111 !important;
        border-color: #999 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    .app-main a {
        text-decoration: underline;
    }
}
