:root {
    --bg: #070A12;
    --surface: #101827;
    --surface-2: #162033;
    --surface-3: #1a263d;
    --border: rgba(255, 255, 255, 0.10);
    --text: #F8FAFC;
    --muted: #94A3B8;
    --accent: #7C3AED;
    --accent-hover: #8B5CF6;
    --danger: #EF4444;
    --warning: #F59E0B;
    --success: #22C55E;
    --info: #60A5FA;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.30);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
    font-family: "Segoe UI", "Inter", Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top right, rgba(124, 58, 237, 0.15), transparent 30%),
        radial-gradient(circle at bottom left, rgba(96, 165, 250, 0.10), transparent 28%),
        var(--bg);
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

input, select, textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    padding: 0.78rem 0.9rem;
}
input:focus, select:focus, textarea:focus {
    outline: 2px solid rgba(124, 58, 237, 0.4);
    border-color: rgba(124, 58, 237, 0.6);
}
textarea { resize: vertical; }
label { display: grid; gap: 0.45rem; margin-bottom: 0.9rem; }
label span, .muted, .tagline, .eyebrow, .breadcrumbs, .list-card span, .stat-card p {
    color: var(--muted);
}

.brand {
    font-size: 1.28rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}
.tagline { margin: 0.25rem 0 0; font-size: 0.92rem; }
.eyebrow {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.74rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: var(--radius-md);
    padding: 0.72rem 1rem;
    min-height: 42px;
    font-weight: 700;
    cursor: pointer;
}
.button-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: #fff;
}
.button-primary:hover { filter: brightness(1.06); }
.button-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    border: 1px solid var(--border);
}
.button-large { min-height: 50px; }
.button-small { min-height: 36px; padding: 0.45rem 0.72rem; border-radius: var(--radius-sm); }
.button-full { width: 100%; }

.hr-body { background: #f8fafc; color: #0f172a; }
.hr-shell { width: min(1200px, 100% - 32px); margin: 0 auto; padding: 16px 0 24px; }
.hr-topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 14px 16px; }
.hr-topbar h1 { margin: 0; font-size: 1.2rem; }
.hr-nav { margin: 12px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.hr-nav a { display: inline-flex; padding: 8px 12px; border: 1px solid #cbd5e1; border-radius: 999px; color: #334155; text-decoration: none; font-weight: 600; }
.hr-nav a.active { background: #ede9fe; color: #5b21b6; border-color: #ddd6fe; }
.hr-main .panel { margin-bottom: 12px; }

@media (max-width: 767px) {
  .hr-shell { width: calc(100% - 24px); }
  .hr-topbar { flex-direction: column; align-items: flex-start; }
  .hr-nav a { flex: 1 1 calc(50% - 8px); justify-content: center; }
}

.panel {
    background: linear-gradient(180deg, rgba(22, 32, 51, 0.78), rgba(16, 24, 39, 0.88));
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 1rem;
}

.app-frame {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}
.app-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 0.95rem 0.85rem;
    background: rgba(10, 16, 29, 0.72);
    backdrop-filter: blur(8px);
    border-right: 1px solid var(--border);
    overflow-y: auto;
}
.sidebar-nav {
    display: grid;
    gap: 0.28rem;
    margin-top: 0.85rem;
}
.sidebar-nav a {
    padding: 0.5rem 0.65rem;
    border-radius: var(--radius-sm);
    color: #cad5e8;
    font-size: 0.96rem;
}
.sidebar-nav a:hover { background: rgba(124, 58, 237, 0.18); }
.sidebar-nav a.active {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.34), rgba(99, 102, 241, 0.24));
    color: #fff;
}

.sidebar-more {
    margin-top: 0.7rem;
    border-top: 1px solid var(--border);
    padding-top: 0.55rem;
}
.sidebar-more summary {
    list-style: none;
    cursor: pointer;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.4rem 0.55rem;
}
.sidebar-more summary::-webkit-details-marker { display: none; }
.sidebar-nav-secondary {
    margin-top: 0.25rem;
}

.app-main { padding: 1rem 1rem 5rem; width: min(1220px, 100%); margin: 0 auto; }
.app-topbar {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    margin-bottom: 0.65rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.topbar-context p { margin: 0; }
.topbar-user { display: flex; gap: 0.6rem; align-items: center; }
.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}
.breadcrumbs a { color: #c4b5fd; }

.mobile-nav {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    padding: 0.5rem;
    gap: 0.5rem;
    background: rgba(8, 13, 24, 0.98);
    border-top: 1px solid var(--border);
}
.mobile-nav a {
    flex: 1;
    text-align: center;
    font-size: 0.78rem;
    padding: 0.55rem 0.3rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.04);
}

.marketing-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(7, 10, 18, 0.9);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(10px);
}
.marketing-inner {
    width: min(1220px, calc(100% - 2rem));
    margin: 0 auto;
    min-height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.marketing-nav { display: flex; gap: 0.85rem; align-items: center; }
.marketing-shell {
    width: min(1220px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 1.2rem 0 2.4rem;
    display: grid;
    gap: 1rem;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    width: min(980px, calc(100% - 1.2rem));
    margin: 0 auto;
    padding: 1rem 0;
}

/* Phase 13 employee portal */
.portal-body {
    background: #f8fafc;
    color: #0f172a;
}
.portal-header {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 30;
}
.portal-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}
.portal-brand { display: grid; gap: 2px; }
.portal-business-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #fff;
    padding: 4px;
}
.portal-brand strong { font-size: 1.05rem; }
.portal-brand span { font-size: 0.86rem; color: #475569; }
.portal-brand small { font-size: 0.78rem; color: #64748b; }
.portal-header-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.portal-breadcrumbs { max-width: 1200px; margin: 0 auto; padding: 0 16px 10px; }
.portal-shell {
    max-width: 1200px;
    margin: 16px auto;
    padding: 0 16px 84px;
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 16px;
}
.portal-nav {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 12px;
    display: grid;
    gap: 6px;
    align-content: start;
    height: fit-content;
    position: sticky;
    top: 106px;
}
.portal-nav a {
    color: #334155;
    padding: 8px 10px;
    border-radius: 10px;
}
.portal-nav a:hover { background: #eef2ff; color: #4338ca; }
.portal-powered { margin: 10px 4px 0; color: #94a3b8; font-size: 0.78rem; }
.portal-main .panel {
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}
.portal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}
.portal-mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    z-index: 40;
    padding: 8px;
    gap: 8px;
}
.portal-mobile-nav a {
    flex: 1;
    text-align: center;
    font-size: 0.82rem;
    color: #334155;
    padding: 8px 4px;
    border-radius: 10px;
    background: #f8fafc;
}

.portal-auth-body {
    background: linear-gradient(180deg, #f8fafc, #eef2ff);
    color: #0f172a;
}
.portal-auth-body .auth-shell .panel,
.portal-auth-body .auth-shell form {
    background: #fff;
}

.schedule-toolbar {
    position: sticky;
    top: 0;
    z-index: 20;
}
.schedule-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: #475569;
    font-size: 0.92rem;
}
.portal-week-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 12px;
}
.team-week-grid {
    grid-template-columns: repeat(7, minmax(190px, 1fr));
}
.schedule-day h3 {
    margin: 0 0 10px;
    font-size: 0.95rem;
}
.schedule-shift-card {
    margin-bottom: 8px;
}

@media (max-width: 1100px) {
    .portal-week-grid,
    .team-week-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .portal-header { position: static; }
    .portal-header-inner { align-items: flex-start; }
    .portal-shell {
        display: block;
        margin: 10px 0 0;
        padding: 0 12px 90px;
    }
    .portal-nav { display: none; }
    .portal-grid { grid-template-columns: 1fr; gap: 12px; }
    .portal-mobile-nav { display: flex; }
    .schedule-toolbar {
        position: sticky;
        top: 0;
    }
    .portal-week-grid,
    .team-week-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

.landing-hero {
    display: grid;
    grid-template-columns: 1.12fr 0.88fr;
    gap: 1rem;
    align-items: stretch;
}
.hero-copy h1 {
    margin: 0.3rem 0 0.75rem;
    font-size: clamp(2rem, 5vw, 3.25rem);
    line-height: 1.05;
}
.lead { color: #d7e1f1; max-width: 56ch; margin: 0 0 1rem; }

.page, .two-column, .feature-grid, .stats-grid, .count-layout, .admin-grid {
    display: grid;
    gap: 1rem;
}
.feature-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.two-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.section-heading {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: end;
}
.section-heading h1 { margin: 0.25rem 0 0; font-size: clamp(1.4rem, 3vw, 2rem); }
.section-heading h2 { margin: 0; font-size: 1.2rem; }

.hero, .hero-actions, .action-row, .inline-actions, .inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    align-items: center;
}

.dashboard-actions {
    display: grid;
    gap: 0.6rem;
    width: 100%;
}

.dashboard-actions-primary,
.dashboard-actions-secondary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.dashboard-actions-secondary .button {
    min-height: 34px;
    padding: 0.42rem 0.62rem;
}

.task-list {
    display: grid;
    gap: 0.55rem;
}

.task-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.62rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.04);
}

.workflow-shell {
    display: grid;
    gap: 1rem;
    padding: 1rem;
}

.workflow-header h1 {
    margin: 0.2rem 0 0.35rem;
    font-size: clamp(1.9rem, 4vw, 2.5rem);
}

.workflow-header p {
    margin: 0;
}

.workflow-primary-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    max-width: 560px;
}

.workflow-checklist {
    display: grid;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: #fff;
    overflow: hidden;
}

.workflow-step-card {
    display: grid;
    grid-template-columns: 34px 1fr auto;
    align-items: center;
    gap: 0.7rem;
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: #fff;
}

.task-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 0.72rem 0.8rem;
    border-bottom: 1px solid #eef2f7;
    transition: background 0.15s ease;
}

.task-row:last-child {
    border-bottom: 0;
}

.task-row:hover {
    background: #fafcff;
}

.task-main {
    min-width: 0;
}

.task-main-title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.workflow-step-index {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #5b21b6;
    background: #ede9fe;
}

.workflow-step-content h3,
.task-main h3 {
    margin: 0;
    font-size: 1.03rem;
}

.workflow-step-content p,
.task-main p {
    margin: 0.2rem 0 0;
    font-size: 0.9rem;
}

.workflow-step-title-row {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    justify-content: space-between;
}

.task-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

.business-logo-wrap {
  margin: 0.75rem 0 1rem;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.business-logo {
  max-width: 100%;
  max-height: 52px;
  object-fit: contain;
  display: block;
}

.small {
  font-size: 0.75rem;
}

.support-code-box {
  margin-top: 1rem;
  padding: 0.8rem;
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
}

.support-code {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.25rem;
  margin: 0.4rem 0;
}

.ticket-thread {
  display: grid;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.ticket-message {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem;
  background: var(--surface-soft);
}

.section-divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 1rem 0;
}

.workflow-eod-cta .button {
    width: 100%;
    max-width: 560px;
}

.workflow-secondary-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    padding-top: 0.2rem;
}

.workflow-support-grid {
    margin-top: 0.95rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.health-main-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.health-score {
    font-size: 2.25rem;
    line-height: 1;
}

.health-meta {
    margin-top: 0.75rem;
    display: grid;
    gap: 0.45rem;
}

.health-meta p {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--muted);
}

.health-meta p strong {
    color: var(--text);
}

.cash-snapshot {
    display: grid;
    gap: 0.1rem;
}

.snapshot-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.56rem 0;
    border-bottom: 1px solid var(--border);
}

.snapshot-row:last-child {
    border-bottom: 0;
}

.mobile-eod-bar {
    display: none;
}

.button.is-disabled {
    opacity: 0.56;
    pointer-events: none;
}

.task-actions .status-badge {
    min-height: 28px;
    min-width: 76px;
    padding: 0.24rem 0.6rem;
    border-radius: 999px;
    font-size: 0.78rem;
    line-height: 1;
}

.workflow-step-action {
    min-width: 90px;
    min-height: 36px;
    padding: 0.45rem 0.72rem;
}

.health-gauge {
    display: grid;
    justify-items: center;
    margin-bottom: 0.45rem;
}

.health-gauge-svg {
    width: min(300px, 100%);
    height: auto;
    overflow: visible;
}

.gauge-zone {
    fill: none;
    stroke-width: 14;
    stroke-linecap: round;
}

.gauge-zone-red { stroke: #ef4444; }
.gauge-zone-yellow { stroke: #f59e0b; }
.gauge-zone-green { stroke: #22c55e; }

.gauge-needle {
    stroke: #0f172a;
    stroke-width: 4;
    stroke-linecap: round;
    transform-origin: 120px 120px;
    transform: rotate(-90deg);
    transition: transform 700ms cubic-bezier(.2,.8,.2,1);
}

.gauge-pivot {
    fill: #0f172a;
}

.gauge-readout {
    margin-top: -0.4rem;
    display: grid;
    justify-items: center;
    gap: 0.35rem;
}

.flash {
    padding: 0.8rem 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 0.9rem;
}
.flash-success { background: rgba(34, 197, 94, 0.12); border: 1px solid rgba(34, 197, 94, 0.35); }
.flash-error { background: rgba(239, 68, 68, 0.12); border: 1px solid rgba(239, 68, 68, 0.35); }

.stat-card strong { display: block; margin-top: 0.3rem; font-size: clamp(1.35rem, 3vw, 2rem); }
.data-list { display: grid; gap: 0.62rem; margin: 0; }
.data-list div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.55rem;
}
.data-list dd { margin: 0; text-align: right; }

.stack-list { display: grid; gap: 0.65rem; }
.list-card {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 0.82rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.03);
}

.responsive-table { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td {
    text-align: left;
    padding: 0.72rem 0.6rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
th { color: #cdd8ea; font-weight: 600; }

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.25rem 0.58rem;
    font-size: 0.78rem;
    font-weight: 700;
}
.status-balanced { background: rgba(34, 197, 94, 0.14); color: #72e6a0; border: 1px solid rgba(34, 197, 94, 0.3); }
.status-warning { background: rgba(245, 158, 11, 0.16); color: #f8c471; border: 1px solid rgba(245, 158, 11, 0.3); }
.status-flagged { background: rgba(239, 68, 68, 0.16); color: #ff9b9b; border: 1px solid rgba(239, 68, 68, 0.32); }
.status-reviewed { background: rgba(96, 165, 250, 0.16); color: #9dc7ff; border: 1px solid rgba(96, 165, 250, 0.3); }
.status-neutral { background: rgba(255, 255, 255, 0.06); color: var(--muted); border: 1px solid var(--border); }

.variance-positive, .variance-positive * { color: var(--success); }
.variance-negative, .variance-negative * { color: var(--danger); }
.variance-neutral, .variance-neutral * { color: var(--text); }

.count-layout {
    grid-template-columns: minmax(290px, 360px) 1fr;
    align-items: start;
}
.sticky-summary {
    position: sticky;
    top: 0.8rem;
    z-index: 6;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
    margin-bottom: 0.9rem;
    padding: 0.8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: rgba(10, 18, 31, 0.95);
}
.sticky-summary p, .sticky-summary strong { margin: 0; }
.sticky-summary strong { display: block; margin-top: 0.22rem; font-size: clamp(1.05rem, 2vw, 1.5rem); }

.warning-banner {
    margin-bottom: 0.8rem;
    padding: 0.75rem 0.85rem;
    border-radius: var(--radius-md);
    background: rgba(245, 158, 11, 0.18);
    border: 1px solid rgba(245, 158, 11, 0.32);
    color: #ffdca7;
}
.hidden { display: none; }

.denomination-list { display: grid; gap: 0.55rem; }
.denomination-row {
    display: grid;
    grid-template-columns: minmax(170px, 1fr) minmax(190px, 260px) minmax(120px, 150px);
    gap: 0.6rem;
    align-items: center;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 0.78rem;
    background: rgba(255, 255, 255, 0.025);
}
.denomination-subtotal { font-size: 1.06rem; font-weight: 700; text-align: right; }
.stepper { display: grid; grid-template-columns: 54px 1fr 54px; gap: 0.5rem; align-items: center; }
.stepper input { text-align: center; min-height: 52px; font-size: 1.08rem; }
.stepper-button {
    min-height: 52px;
    border: 1px solid rgba(124, 58, 237, 0.45);
    border-radius: var(--radius-md);
    font-size: 1.4rem;
    color: #e4dcff;
    background: rgba(124, 58, 237, 0.2);
    cursor: pointer;
}

.login-card {
    width: min(980px, 100%);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.checkbox-row input { width: auto; }
.empty-state, .empty-panel { text-align: center; }
.final-cta { text-align: center; }
.workflow-list {
    display: grid;
    gap: 0.65rem;
}
.workflow-list div {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.62rem 0.7rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.workflow-list span {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(124, 58, 237, 0.25);
    color: #e8ddff;
    font-size: 0.78rem;
}
.workflow-list p { margin: 0; }

.onboarding-shell {
    width: min(560px, 100%);
    display: grid;
    gap: 0.8rem;
}
.onboarding-progress {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
}
.onboarding-progress span {
    min-height: 30px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.03);
    font-size: 0.82rem;
}
.onboarding-progress .active {
    color: #fff;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.45), rgba(139, 92, 246, 0.45));
}
.onboarding-progress .done {
    color: #d6fbe5;
    background: rgba(34, 197, 94, 0.22);
}
.onboarding-card { padding: 1.15rem; }
.onboarding-list {
    margin: 0.4rem 0 1rem;
    padding-left: 1.1rem;
    color: #c6d3e9;
}
.panel-lite {
    margin: 0.45rem 0;
    padding: 0.6rem 0.72rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
}
.panel-lite summary {
    cursor: pointer;
    color: #d8e3f7;
    font-weight: 600;
}
.panel-lite p { margin: 0.45rem 0 0; color: #b8c7df; }

.plan-grid {
    display: grid;
    gap: 0.75rem;
    margin: 0.6rem 0 1rem;
}
.plan-option {
    border: 1px solid #d5deeb;
    border-radius: 14px;
    padding: 0.8rem 0.9rem;
    display: grid;
    gap: 0.25rem;
    background: #fff;
    cursor: pointer;
}
.plan-option input {
    margin-right: 0.45rem;
}
.kv-list {
    display: grid;
    gap: 0.6rem;
    margin: 0.5rem 0 1rem;
}
.kv-list div {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.4rem;
}
.legal-page { max-width: 760px; }

/* Landing page v11 */
.landing-v11 {
    display: grid;
    gap: 3.6rem;
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 2rem 0 3rem;
}
.v11-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.74rem;
    font-weight: 700;
    color: #6d28d9;
    margin: 0 0 0.6rem;
}
.v11-hero {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 1.5rem;
    align-items: center;
}
.v11-hero-copy h1 {
    font-size: clamp(2rem, 4vw, 3.3rem);
    line-height: 1.05;
    margin: 0 0 0.85rem;
    color: #0f172a;
}
.v11-lead {
    margin: 0 0 1.1rem;
    color: #475569;
    font-size: 1.05rem;
    max-width: 58ch;
}
.v11-hero-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.8rem;
}
.v11-trust-bullets {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0.9rem;
    flex-wrap: wrap;
    color: #64748b;
    font-size: 0.92rem;
}
.v11-trust-bullets li::before {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #7c3aed;
    margin-right: 0.45rem;
}
.v11-hero-visual {
    position: relative;
    min-height: 420px;
    border-radius: 24px;
    background: radial-gradient(circle at 20% 20%, rgba(124, 58, 237, 0.20), transparent 55%), #f1f5f9;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}
.v11-shot {
    position: absolute;
    border-radius: 16px;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
    border: 1px solid #e2e8f0;
    background: #fff;
}
.v11-shot-main {
    width: 82%;
    left: 9%;
    top: 9%;
}
.v11-shot-float-a {
    width: 42%;
    left: 4%;
    bottom: 8%;
}
.v11-shot-float-b {
    width: 42%;
    right: 4%;
    bottom: 8%;
}
.v11-trust-strip {
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 18px;
    padding: 1rem 1.15rem;
    display: grid;
    gap: 0.7rem;
}
.v11-trust-strip p {
    margin: 0;
    color: #334155;
    font-weight: 600;
}
.v11-trust-strip ul {
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.5rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    list-style: none;
}
.v11-trust-strip li {
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 999px;
    padding: 0.45rem 0.75rem;
    text-align: center;
    color: #475569;
    font-size: 0.9rem;
}
.v11-section {
    display: grid;
    gap: 1rem;
}
.v11-section-head h2 {
    margin: 0.15rem 0 0;
    color: #0f172a;
    font-size: clamp(1.45rem, 2.8vw, 2.15rem);
}
.v11-problem-grid {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.v11-problem-grid article,
.v11-team-grid article,
.v11-feature-panel,
.v11-pricing-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 1rem;
    box-shadow: 0 6px 22px rgba(15, 23, 42, 0.05);
}
.v11-problem-grid h3,
.v11-team-grid h3,
.v11-feature-panel h3,
.v11-pricing-card h3 {
    margin: 0 0 0.45rem;
    color: #0f172a;
}
.v11-problem-grid p,
.v11-team-grid p,
.v11-pricing-card p {
    margin: 0;
    color: #64748b;
}
.v11-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.65rem;
}
.v11-timeline li {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 0.9rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 0.75rem 0.95rem;
}
.v11-timeline li strong { color: #0f172a; }
.v11-timeline li span { color: #64748b; }
.v11-feature-groups {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.v11-feature-panel img,
.v11-security img {
    width: 100%;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-bottom: 0.7rem;
}
.v11-feature-panel ul,
.v11-security ul,
.v11-pricing-card ul {
    margin: 0.2rem 0 0;
    padding-left: 1.1rem;
    color: #475569;
    display: grid;
    gap: 0.3rem;
}
.v11-team-grid {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.v11-security {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1.1fr 1fr;
    background: linear-gradient(135deg, #ffffff 0%, #f8f7ff 100%);
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    padding: 1rem;
}
.v11-pricing-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.v11-price {
    margin: 0.2rem 0 0.45rem;
    color: #0f172a;
    font-size: 1.75rem;
    font-weight: 800;
}
.v11-price span {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 600;
    margin-left: 0.2rem;
}
.v11-pricing-popular {
    border-color: #7c3aed;
    box-shadow: 0 16px 32px rgba(124, 58, 237, 0.16);
}
.v11-popular-badge {
    display: inline-flex;
    margin: 0 0 0.55rem;
    background: rgba(124, 58, 237, 0.12);
    color: #6d28d9;
    border-radius: 999px;
    padding: 0.32rem 0.62rem;
    font-size: 0.75rem;
    font-weight: 700;
}
.v11-demo-cta,
.v11-final-cta {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    padding: 1.3rem;
    text-align: center;
}
.v11-demo-cta h2,
.v11-final-cta h2 { margin: 0 0 0.5rem; }
.v11-demo-cta p,
.v11-final-cta p { margin: 0 0 0.95rem; color: #64748b; }
.v11-faq {
    display: grid;
    gap: 0.55rem;
}
.v11-faq details {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    padding: 0.75rem 0.85rem;
}
.v11-faq summary { cursor: pointer; font-weight: 600; color: #0f172a; }
.v11-faq p { color: #64748b; margin: 0.5rem 0 0; }
.marketing-footer {
    margin-top: 2rem;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    padding: 1.8rem 0 1.2rem;
}
.marketing-footer-grid {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.marketing-footer-grid h4 {
    margin: 0 0 0.5rem;
    color: #0f172a;
    font-size: 0.95rem;
}
.marketing-footer-grid a {
    display: block;
    color: #64748b;
    text-decoration: none;
    margin: 0.36rem 0;
}
.marketing-footer-grid a:hover { color: #6d28d9; }
.marketing-footer-bottom {
    width: min(1180px, calc(100% - 2rem));
    margin: 1rem auto 0;
    padding-top: 0.9rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 0.8rem;
    justify-content: space-between;
    color: #64748b;
    font-size: 0.9rem;
}
.v11-legal-wrap {
    width: min(980px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 2rem 0 3rem;
    display: grid;
    gap: 1rem;
}
.v11-legal-hero h1 {
    margin: 0.1rem 0 0;
    font-size: clamp(1.9rem, 3.6vw, 2.8rem);
    color: #0f172a;
}
.v11-legal-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.05);
    padding: 1.2rem 1.25rem;
}
.v11-legal-card h2 {
    margin: 1.2rem 0 0.45rem;
    font-size: 1.2rem;
    color: #0f172a;
}
.v11-legal-card p {
    margin: 0.5rem 0;
    color: #334155;
    line-height: 1.68;
}
.v11-legal-card ul {
    margin: 0.4rem 0 0.7rem;
    padding-left: 1.2rem;
    color: #334155;
    display: grid;
    gap: 0.35rem;
}
.v11-legal-card a {
    color: #6d28d9;
}

@media (max-width: 1024px) {
    .v11-hero,
    .v11-security {
        grid-template-columns: 1fr;
    }
    .v11-problem-grid,
    .v11-feature-groups,
    .v11-pricing-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .v11-team-grid { grid-template-columns: 1fr; }
    .v11-trust-strip ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .landing-v11 { width: min(100%, calc(100% - 1rem)); padding-top: 1rem; gap: 2.1rem; }
    .marketing-nav a:not(.button) { display: none; }
    .v11-problem-grid,
    .v11-feature-groups,
    .v11-pricing-grid,
    .marketing-footer-grid { grid-template-columns: 1fr; }
    .v11-hero-actions .button,
    .v11-demo-cta .button,
    .v11-final-cta .button { width: 100%; }
    .v11-hero-visual { min-height: 340px; }
    .v11-timeline li { grid-template-columns: 1fr; }
    .marketing-footer-bottom {
        flex-direction: column;
        gap: 0.35rem;
    }
    .v11-legal-wrap {
        width: min(100%, calc(100% - 1rem));
        padding: 1rem 0 2rem;
    }
    .v11-legal-card {
        padding: 0.95rem;
    }
}

.ts-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(4, 8, 16, 0.72);
    display: grid;
    place-items: center;
    z-index: 200;
    padding: 1rem;
}
.ts-modal {
    width: min(460px, 100%);
    background: linear-gradient(180deg, rgba(23, 34, 54, 0.96), rgba(13, 21, 35, 0.96));
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    padding: 1rem;
}
.ts-modal h3 { margin: 0 0 0.45rem; }
.ts-modal p { margin: 0.35rem 0; color: #d4def1; }
.ts-modal p.warning { color: #f8c471; }
.ts-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    margin-top: 0.85rem;
}

.lp-hero {
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        radial-gradient(circle at 12% 8%, rgba(124, 58, 237, 0.18), transparent 38%),
        linear-gradient(180deg, rgba(20, 30, 49, 0.88), rgba(11, 18, 31, 0.92));
}
.lp-hero-copy h1 {
    margin: 0.45rem 0 0.75rem;
    font-size: clamp(2rem, 5vw, 3.6rem);
    line-height: 1.03;
    max-width: 13ch;
}
.lp-trust-line {
    margin: 0;
    color: #b7c4dc;
    max-width: 56ch;
}
.lp-hero-flow h2 {
    margin: 0;
    font-size: 1.4rem;
}
.lp-hero-flow ol {
    margin: 0.9rem 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.5rem;
}
.lp-hero-flow li {
    display: grid;
    gap: 0.2rem;
    padding: 0.65rem 0.7rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}
.lp-hero-flow li strong {
    font-size: 1.02rem;
}
.lp-hero-flow li span {
    color: #b9c7dd;
    font-size: 0.92rem;
}

.lp-trust-strip {
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    padding: 0.85rem 0;
    margin-top: 0.1rem;
}
.lp-trust-strip p {
    margin: 0;
    color: #c9d5ea;
    text-align: center;
}

.lp-section {
    display: grid;
    gap: 0.85rem;
    padding: 1.1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.lp-section-head h2 {
    margin: 0.2rem 0 0;
    font-size: clamp(1.5rem, 3.2vw, 2.1rem);
}
.lp-section-head p {
    margin: 0;
}

.lp-problem-grid,
.lp-steps,
.lp-feature-list,
.lp-two-col,
.lp-pricing {
    display: grid;
    gap: 0.7rem;
}
.lp-problem-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.lp-steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.lp-feature-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.lp-two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.lp-problem-grid article,
.lp-steps article,
.lp-feature-list article,
.lp-two-col article {
    padding: 0.75rem 0.1rem 0.25rem;
}
.lp-problem-grid h3,
.lp-steps h3,
.lp-feature-list h3,
.lp-two-col h3 {
    margin: 0 0 0.45rem;
    font-size: 1.18rem;
}
.lp-problem-grid p,
.lp-steps p,
.lp-feature-list p,
.lp-two-col p {
    margin: 0;
    color: #c2d0e6;
}
.lp-steps article {
    position: relative;
    padding-top: 2rem;
}
.lp-steps span {
    position: absolute;
    top: 0;
    left: 0;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(124, 58, 237, 0.25);
    color: #ede7ff;
    font-weight: 700;
}

.lp-pricing {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.lp-pricing .panel {
    padding: 1rem;
}
.lp-pricing h3 {
    margin: 0;
    font-size: 1.15rem;
}
.lp-price {
    margin: 0.45rem 0 0.65rem;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}
.lp-price span {
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 500;
}
.lp-pricing ul {
    margin: 0;
    padding-left: 1.1rem;
    color: #ced9eb;
    display: grid;
    gap: 0.35rem;
}
.lp-pricing-highlight {
    border-color: rgba(124, 58, 237, 0.4);
    box-shadow: 0 18px 38px rgba(36, 18, 80, 0.38);
}
.lp-about {
    margin: 0;
    max-width: 72ch;
    color: #c4d2e9;
}
.lp-faq {
    display: grid;
    gap: 0.55rem;
}
.lp-final-cta {
    margin-top: 0.7rem;
    text-align: center;
}
.lp-final-cta h2 {
    margin: 0 0 0.35rem;
    font-size: clamp(1.45rem, 3.4vw, 2rem);
}
.lp-final-cta p {
    margin: 0 0 0.9rem;
    color: #c0d0e8;
}

body.marketing-light {
    color: #0f172a;
    background:
        radial-gradient(circle at top right, rgba(148, 163, 184, 0.10), transparent 34%),
        linear-gradient(180deg, #f8fafc, #f1f5f9);
}
body.marketing-light .marketing-topbar {
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(10px);
}
body.marketing-light .marketing-nav a,
body.marketing-light .brand {
    color: #0f172a;
}
body.marketing-light .marketing-shell {
    gap: 0;
    padding-top: 1.8rem;
    padding-bottom: 3rem;
}
body.marketing-light .button-primary {
    background: #7c3aed;
}
body.marketing-light .button-primary:hover {
    background: #6d28d9;
    filter: none;
}
body.marketing-light .button-secondary {
    background: #ffffff;
    color: #334155;
    border-color: rgba(51, 65, 85, 0.22);
}
body.marketing-light .eyebrow {
    color: #7c3aed;
}
body.marketing-light .lead,
body.marketing-light .lp-trust-line,
body.marketing-light .lp-trust-strip p,
body.marketing-light .lp-problem-grid p,
body.marketing-light .lp-steps p,
body.marketing-light .lp-feature-list p,
body.marketing-light .lp-two-col p,
body.marketing-light .lp-about,
body.marketing-light .lp-final-cta p,
body.marketing-light .panel-lite p {
    color: #64748b;
}
body.marketing-light .lp-hero {
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    border: 1px solid rgba(148, 163, 184, 0.24);
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
}
body.marketing-light .lp-hero-copy h1 {
    color: #0f172a;
    font-size: clamp(1.95rem, 4.2vw, 3.15rem);
    max-width: 14ch;
}
body.marketing-light .lp-hero-flow {
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}
body.marketing-light .lp-hero-flow h2 {
    color: #0f172a;
}
body.marketing-light .lp-hero-flow li {
    background: #f8fafc;
    border-color: rgba(148, 163, 184, 0.22);
}
body.marketing-light .lp-hero-flow li span {
    color: #64748b;
}
body.marketing-light .lp-trust-strip {
    border-top-color: rgba(148, 163, 184, 0.28);
    border-bottom-color: rgba(148, 163, 184, 0.28);
}
body.marketing-light .lp-section {
    border-bottom-color: rgba(148, 163, 184, 0.24);
    padding-top: 1.7rem;
    padding-bottom: 1.7rem;
}
body.marketing-light .lp-problem-grid article,
body.marketing-light .lp-steps article,
body.marketing-light .lp-feature-list article,
body.marketing-light .lp-two-col article {
    padding: 0.9rem 0.2rem;
}
body.marketing-light .lp-steps article {
    border-left: 2px solid rgba(124, 58, 237, 0.18);
    padding-left: 0.9rem;
    padding-top: 0.4rem;
}
body.marketing-light .lp-steps span {
    position: static;
    width: 28px;
    height: 28px;
    background: #ede9fe;
    color: #6d28d9;
    margin-bottom: 0.55rem;
}
body.marketing-light .lp-pricing .panel {
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.24);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}
body.marketing-light .lp-pricing-highlight {
    border-color: rgba(124, 58, 237, 0.45);
    box-shadow: 0 20px 38px rgba(109, 40, 217, 0.12);
}
body.marketing-light .lp-price {
    color: #0f172a;
}
body.marketing-light .lp-price span {
    color: #64748b;
}
body.marketing-light .lp-pricing ul {
    color: #475569;
}
body.marketing-light .panel-lite {
    background: #ffffff;
    border-color: rgba(148, 163, 184, 0.28);
}
body.marketing-light .panel-lite summary {
    color: #0f172a;
}
body.marketing-light .lp-final-cta {
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    border: 1px solid rgba(148, 163, 184, 0.24);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.07);
}
body.marketing-light .lp-final-cta h2,
body.marketing-light .lp-section h2,
body.marketing-light .lp-section h3 {
    color: #0f172a;
}

@media (max-width: 1100px) {
    .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lp-problem-grid, .lp-feature-list, .lp-pricing { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lp-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 920px) {
    .app-frame { grid-template-columns: 1fr; }
    .app-sidebar { display: none; }
    .mobile-nav { display: flex; }
    .app-main { padding-bottom: 5.3rem; }
    .landing-hero, .login-card, .two-column, .count-layout { grid-template-columns: 1fr; }
    .marketing-nav a:not(.button) { display: none; }
    .sticky-summary { position: sticky; bottom: 4.7rem; top: auto; backdrop-filter: blur(8px); }
    .lp-hero { grid-template-columns: 1fr; padding: 1rem; }
    .lp-section { padding: 0.9rem 0; }
    .workflow-primary-actions { grid-template-columns: 1fr; max-width: none; }
    .workflow-step-card { grid-template-columns: 30px 1fr; }
    .task-row {
        grid-template-columns: 1fr;
        align-items: start;
    }
    .task-actions {
        width: 100%;
        justify-content: space-between;
    }
    .workflow-step-action {
        width: 100%;
    }
    .workflow-support-grid { grid-template-columns: 1fr; }
    .mobile-eod-bar {
        display: block;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 4.15rem;
        z-index: 85;
        padding: 0.55rem 0.6rem;
        background: rgba(248, 250, 252, 0.94);
        border-top: 1px solid var(--border);
        box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08);
    }
    .mobile-eod-bar .button {
        width: 100%;
    }
}

@media (max-width: 720px) {
    .marketing-shell, .app-main { width: min(100%, calc(100% - 0.9rem)); }
    .denomination-row { grid-template-columns: 1fr; }
    .denomination-subtotal { text-align: left; }
    .feature-grid, .stats-grid { grid-template-columns: 1fr; }
    .lp-problem-grid, .lp-steps, .lp-feature-list, .lp-two-col, .lp-pricing { grid-template-columns: 1fr; }
    .lp-hero-copy h1 { max-width: none; }
    table thead { display: none; }
    table, tbody, tr, td { display: block; width: 100%; }
    tr { border: 1px solid var(--border); border-radius: var(--radius-md); margin-bottom: 0.7rem; padding: 0.35rem; background: rgba(255, 255, 255, 0.03); }
    td { border: 0; padding: 0.45rem; }
}

@media print {
    body { background: #fff; color: #000; }
    .app-sidebar, .mobile-nav, .marketing-topbar, .button, .app-topbar, .breadcrumbs { display: none !important; }
    .panel { background: #fff; box-shadow: none; border: 1px solid #ddd; }
    .count-layout, .two-column { grid-template-columns: 1fr !important; }
}

/* Phase 6: light-first product UI */
:root {
    --bg: #F8FAFC;
    --surface: #FFFFFF;
    --surface-2: #F1F5F9;
    --surface-3: #E2E8F0;
    --border: #E2E8F0;
    --text: #0F172A;
    --muted: #64748B;
    --accent: #7C3AED;
    --accent-hover: #6D28D9;
    --danger: #DC2626;
    --warning: #F59E0B;
    --success: #16A34A;
    --info: #2563EB;
    --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.08);
}

body {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    color: var(--text);
}

.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

input, select, textarea {
    background: #fff;
    border: 1px solid #cbd5e1;
    color: var(--text);
}

.button-secondary {
    background: #fff;
    border-color: #cbd5e1;
    color: #334155;
}

.marketing-topbar {
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--border);
}

.brand,
.marketing-nav a {
    color: var(--text);
}

.marketing-shell {
    padding-top: 1.8rem;
}

.lp-hero {
    border: 1px solid var(--border);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.lp-hero-copy h1 {
    color: var(--text);
    font-size: clamp(1.95rem, 4.2vw, 3.2rem);
}

.lp-hero-flow {
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.lp-hero-flow li {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.lp-hero-flow li span,
.lead,
.lp-trust-line,
.lp-about,
.lp-section p,
.panel-lite p,
.tagline,
.muted,
label span,
.denomination-meta span {
    color: var(--muted);
}

.lp-section {
    border-bottom: 1px solid #e2e8f0;
    padding-top: 1.6rem;
    padding-bottom: 1.6rem;
}

.lp-pricing .panel {
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.lp-pricing-highlight {
    border-color: rgba(124, 58, 237, 0.45);
    box-shadow: 0 14px 32px rgba(124, 58, 237, 0.14);
}

.lp-final-cta {
    background: #fff;
    border: 1px solid var(--border);
}

.app-frame {
    background: transparent;
}

.app-sidebar {
    background: rgba(255, 255, 255, 0.86);
    border-right: 1px solid var(--border);
}

.app-sidebar .brand {
    font-size: 2.05rem;
    letter-spacing: -0.02em;
}

.app-sidebar .tagline {
    margin-top: 0.35rem;
    line-height: 1.3;
    font-size: 0.78rem;
    max-width: 19ch;
}

.sidebar-nav a {
    color: #334155;
}

.sidebar-nav a:hover {
    background: #eef2ff;
}

.sidebar-nav a.active {
    background: #ede9fe;
    color: #5b21b6;
}

.app-topbar {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.58rem 0.78rem;
}

.topbar-context p:first-child { font-weight: 700; }
.topbar-user > span:first-child { font-weight: 600; }

.topbar-user .status-badge {
    background: #e2e8f0;
    color: #334155;
    border-color: #cbd5e1;
}

.breadcrumbs a {
    color: #6d28d9;
}

.flash-success {
    background: #f0fdf4;
    border-color: #86efac;
    color: #14532d;
}

.flash-error {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #7f1d1d;
}

.sticky-summary {
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid var(--border);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.09);
}

.sticky-summary strong {
    color: var(--text);
}

.denomination-row {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
}

.stepper-button {
    background: #ede9fe;
    border-color: #c4b5fd;
    color: #5b21b6;
}

.warning-banner {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    color: #92400e;
}

.table-toolbar,
.filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
    margin-bottom: 0.7rem;
}

th {
    color: #334155;
}

th, td {
    border-bottom: 1px solid #e2e8f0;
}

tr:hover td {
    background: #f8fafc;
}

.panel-lite {
    background: #fff;
    border: 1px solid #e2e8f0;
}

.onboarding-card {
    background: #fff;
    border: 1px solid #e2e8f0;
}

.onboarding-progress span {
    background: #fff;
    color: #64748b;
    border: 1px solid #cbd5e1;
}

.onboarding-progress .active {
    color: #fff;
    background: #7c3aed;
    border-color: #7c3aed;
}

.onboarding-progress .done {
    color: #065f46;
    background: #dcfce7;
    border-color: #86efac;
}

.ts-modal-backdrop {
    background: rgba(15, 23, 42, 0.42);
}

.ts-modal {
    background: #fff;
    border: 1px solid #e2e8f0;
}

.ts-modal p {
    color: #475569;
}

@media (max-width: 920px) {
    .mobile-nav {
        background: rgba(255, 255, 255, 0.98);
        border-top: 1px solid #e2e8f0;
    }
    .mobile-nav a {
        background: #f1f5f9;
        color: #334155;
    }
}

/* Phase 12: mobile responsiveness foundation */
:root {
    --bp-mobile-max: 640px;
    --bp-tablet-max: 1024px;
}

html, body {
    overflow-x: hidden;
}

img, svg, video, canvas {
    max-width: 100%;
    height: auto;
}

.mobile-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.mobile-full {
    width: 100%;
}

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

.hide-mobile {
    display: initial;
}

.show-mobile {
    display: none !important;
}

.mobile-scroll-x {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.sticky-mobile-action {
    position: sticky;
    bottom: 0;
    z-index: 60;
    background: rgba(248, 250, 252, 0.96);
    backdrop-filter: blur(8px);
    border-top: 1px solid #e2e8f0;
    padding: 0.75rem;
}

.button,
input,
select,
textarea {
    min-height: 44px;
}

.page,
.panel,
.app-main,
.marketing-shell,
.auth-shell {
    max-width: 100%;
}

.responsive-table {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.responsive-table table {
    min-width: 680px;
}

/* App mobile nav system */
.app-mobile-topbar {
    display: none;
}

.app-mobile-topbar-context {
    min-width: 0;
    display: grid;
}

.app-mobile-topbar-context strong,
.app-mobile-topbar-context span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-mobile-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: min(86vw, 360px);
    height: 100vh;
    background: #fff;
    border-right: 1px solid #e2e8f0;
    transform: translateX(-102%);
    transition: transform 180ms ease;
    z-index: 200;
    display: grid;
    grid-template-rows: auto 1fr auto;
}

.app-mobile-drawer.is-open {
    transform: translateX(0);
}

.mobile-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
    z-index: 180;
}

body.mobile-nav-open .mobile-drawer-backdrop {
    opacity: 1;
    pointer-events: auto;
}

.app-mobile-drawer-header,
.app-mobile-drawer-footer {
    padding: 0.8rem;
    border-bottom: 1px solid #e2e8f0;
}

.app-mobile-drawer-footer {
    border-bottom: 0;
    border-top: 1px solid #e2e8f0;
    display: grid;
    gap: 0.55rem;
}

.app-mobile-drawer-body {
    overflow-y: auto;
    padding: 0.4rem 0.7rem 0.8rem;
}

.marketing-mobile-nav {
    display: none;
    padding: 0 1rem 0.85rem;
    border-top: 1px solid #e2e8f0;
    background: #fff;
}

.marketing-mobile-nav.is-open {
    display: grid;
    gap: 0.55rem;
}

.marketing-mobile-nav a {
    padding: 0.65rem 0.25rem;
    border-bottom: 1px solid #eef2f7;
}

.marketing-mobile-nav a:last-child {
    border-bottom: 0;
}

/* Forms + onboarding */
.onboarding-shell,
.login-card,
.count-layout,
.two-column,
.feature-grid,
.stats-grid,
.workflow-support-grid {
    min-width: 0;
}

.onboarding-shell .button,
.auth-shell .button,
.login-card .button {
    width: 100%;
}

/* Till/Safe count row stacking helper */
.denomination-row {
    min-width: 0;
}

.denomination-row .denomination-meta {
    min-width: 0;
}

/* Tablet + down */
@media (max-width: 1024px) {
    .app-frame {
        grid-template-columns: 1fr;
    }

    .app-sidebar {
        display: none;
    }

    .app-main {
        width: 100%;
        padding: 0.75rem 0.75rem 5.5rem;
    }

    .app-topbar {
        display: none;
    }

    .app-mobile-topbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.65rem;
        position: sticky;
        top: 0;
        z-index: 120;
        margin-bottom: 0.65rem;
        padding: 0.55rem 0.6rem;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        background: #fff;
    }

    .show-mobile {
        display: inline-flex !important;
    }

    .hide-mobile {
        display: none !important;
    }

    .mobile-nav {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .mobile-nav a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

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

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

    .count-layout {
        grid-template-columns: 1fr;
    }

    .sticky-summary {
        position: sticky;
        top: 0.45rem;
    }

    .workflow-primary-actions {
        max-width: 100%;
    }
}

/* Mobile */
@media (max-width: 640px) {
    body {
        font-size: 15px;
    }

    .panel {
        padding: 0.78rem;
        border-radius: 14px;
    }

    .marketing-inner,
    .marketing-shell,
    .landing-v11 {
        width: min(100%, calc(100% - 1rem));
    }

    .landing-v11 {
        gap: 2.2rem;
        padding-top: 1rem;
    }

    .v11-hero,
    .landing-hero,
    .login-card,
    .two-column,
    .feature-grid,
    .workflow-support-grid {
        grid-template-columns: 1fr;
    }

    .v11-hero-copy h1,
    .lp-hero-copy h1 {
        font-size: clamp(1.65rem, 8vw, 2.1rem);
    }

    .dashboard-actions-primary,
    .dashboard-actions-secondary,
    .action-row,
    .inline-actions,
    .inline-form,
    .workflow-secondary-nav {
        display: grid;
        grid-template-columns: 1fr;
    }

    .workflow-primary-actions {
        grid-template-columns: 1fr;
    }

    .task-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        align-items: start;
    }

    .task-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .task-actions .workflow-step-action,
    .task-actions .button,
    .workflow-eod-cta .button,
    .workflow-secondary-nav .button {
        width: 100%;
    }

    .workflow-eod-cta {
        position: sticky;
        bottom: 3.8rem;
        z-index: 50;
        padding-top: 0.25rem;
        background: linear-gradient(180deg, rgba(248,250,252,0) 0%, rgba(248,250,252,0.95) 24%);
    }

    .mobile-eod-bar {
        display: block;
        position: sticky;
        bottom: 3.4rem;
        z-index: 55;
        padding: 0.55rem 0;
        background: linear-gradient(180deg, rgba(248,250,252,0) 0%, rgba(248,250,252,0.95) 24%);
    }

    .mobile-eod-bar .button {
        width: 100%;
    }

    .onboarding-progress {
        grid-template-columns: 1fr 1fr;
    }

    .section-heading {
        align-items: start;
    }

    .section-heading,
    .topbar-user {
        flex-direction: column;
        align-items: stretch;
    }

    .denomination-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 0.65rem;
    }

    .denomination-subtotal {
        text-align: left;
        font-size: 1rem;
    }

    .stepper {
        grid-template-columns: 50px 1fr 50px;
    }

    .stepper-button,
    .stepper input {
        min-height: 48px;
    }

    .sticky-summary {
        grid-template-columns: 1fr;
        gap: 0.45rem;
        top: 0.35rem;
        padding: 0.65rem;
    }

    .marketing-footer-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .marketing-footer-bottom {
        display: grid;
        gap: 0.3rem;
    }

    .table-toolbar,
    .filters-row,
    .hero-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .table-toolbar .button,
    .filters-row .button,
    .table-toolbar input,
    .table-toolbar select,
    .filters-row input,
    .filters-row select {
        width: 100%;
    }
}

/* Phase 12 strict mobile enforcement (final override block) */
/* Debug helper (run in browser console to find overflow nodes):
document.querySelectorAll('*').forEach(el => { if (el.scrollWidth > document.documentElement.clientWidth) console.log(el); });
*/
@media (max-width: 768px) {
    html, body {
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    body {
        padding: 0 !important;
    }

    .container,
    .app-container,
    .page,
    .page-shell,
    .public-shell,
    .app-frame,
    .app-main,
    .marketing-shell,
    .landing-v11,
    .auth-shell {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .app-frame {
        display: block !important;
        grid-template-columns: 1fr !important;
    }

    .app-sidebar {
        display: none !important;
        width: 0 !important;
        max-width: 0 !important;
    }

    .app-main {
        margin: 0 !important;
        padding: 0.75rem 0.75rem 6.4rem !important;
    }

    .app-topbar {
        display: none !important;
    }

    .app-mobile-topbar {
        display: flex !important;
    }

    .app-mobile-drawer {
        width: min(320px, 90vw) !important;
    }

    .show-mobile {
        display: inline-flex !important;
    }

    .hide-mobile {
        display: none !important;
    }

    .mobile-nav {
        display: grid !important;
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }

    .mobile-nav a {
        min-height: 44px !important;
    }

    .dashboard-grid,
    .stats-grid,
    .card-grid,
    .form-grid,
    .two-column,
    .three-column,
    .workflow-grid,
    .settings-grid,
    .report-grid,
    .pricing-grid,
    .feature-grid,
    .workflow-support-grid,
    .count-layout,
    .login-card,
    .landing-hero,
    .v11-hero,
    .lp-hero,
    .lp-pricing,
    .lp-steps,
    .lp-feature-list,
    .lp-problem-grid,
    .lp-two-col {
        grid-template-columns: 1fr !important;
    }

    .actions,
    .button-row,
    .btn-row,
    .page-actions,
    .action-row,
    .hero-actions,
    .inline-actions,
    .inline-form,
    .workflow-secondary-nav,
    .dashboard-actions-primary,
    .dashboard-actions-secondary {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 0.55rem !important;
    }

    .actions .button,
    .button-row .button,
    .btn-row .button,
    .page-actions .button,
    .action-row .button,
    .workflow-secondary-nav .button,
    .workflow-primary-actions .button,
    .workflow-eod-cta .button,
    .login-card .button,
    .onboarding-shell .button {
        width: 100% !important;
        min-height: 44px !important;
    }

    .workflow-primary-actions {
        grid-template-columns: 1fr !important;
        max-width: 100% !important;
    }

    .task-row {
        grid-template-columns: 1fr !important;
        align-items: start !important;
    }

    .task-actions {
        width: 100% !important;
        justify-content: flex-start !important;
        flex-wrap: wrap !important;
    }

    .task-actions .workflow-step-action,
    .task-actions .button {
        width: 100% !important;
        min-width: 0 !important;
    }

    .health-gauge-svg {
        width: min(250px, 100%) !important;
    }

    .sticky-summary {
        grid-template-columns: 1fr !important;
        top: 0.3rem !important;
        padding: 0.65rem !important;
        z-index: 40 !important;
    }

    .denomination-row {
        grid-template-columns: 1fr !important;
        gap: 0.5rem !important;
        width: 100% !important;
    }

    .stepper {
        grid-template-columns: 48px 1fr 48px !important;
    }

    .stepper-button {
        min-height: 48px !important;
    }

    .stepper input {
        min-height: 48px !important;
        min-width: 64px !important;
        font-size: 16px !important;
    }

    input, select, textarea, button {
        font-size: 16px !important;
    }

    label {
        display: grid !important;
        grid-template-columns: 1fr !important;
    }

    /* Tables: force safe horizontal scroll within table only, not page */
    .responsive-table,
    .mobile-scroll-x,
    .table-wrap {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .page table,
    .panel table,
    .responsive-table table,
    .mobile-scroll-x table,
    .table-wrap table {
        min-width: 720px !important;
        width: 100% !important;
    }

    .marketing-inner,
    .marketing-shell,
    .landing-v11 {
        width: calc(100% - 1rem) !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .marketing-nav {
        display: none !important;
    }

    .marketing-menu-toggle {
        display: inline-flex !important;
    }

    .marketing-mobile-nav.is-open {
        display: grid !important;
    }

    .marketing-footer-grid {
        grid-template-columns: 1fr !important;
    }

    .lp-hero-copy h1,
    .v11-hero-copy h1 {
        font-size: clamp(1.65rem, 8vw, 2.15rem) !important;
        line-height: 1.12 !important;
    }

    .lp-hero-visual,
    .v11-hero-media {
        overflow: hidden !important;
    }

    .ts-modal,
    .modal,
    [role="dialog"] {
        width: min(92vw, 520px) !important;
        max-height: 86vh !important;
        overflow-y: auto !important;
    }

    .ts-modal-actions,
    .modal-actions {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 0.55rem !important;
    }
}

/* Emergency mobile layout hard-fix */
@media (max-width: 767px) {
  .sidebar,
  .app-sidebar,
  .desktop-sidebar,
  .desktop-nav,
  .app-nav-desktop {
    display: none !important;
  }

  .desktop-topbar,
  .app-topbar-desktop {
    display: none !important;
  }

  .mobile-topbar {
    display: flex !important;
  }

  .app-shell,
  .app-layout,
  .app-main,
  .main-content,
  .page-content {
    margin-left: 0 !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
    width: 100% !important;
    max-width: 100vw !important;
    min-width: 0 !important;
  }

  .app-frame {
    display: block !important;
    grid-template-columns: 1fr !important;
    width: 100% !important;
    max-width: 100vw !important;
  }

  .page {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    grid-template-columns: 1fr !important;
  }

  .mobile-nav {
    display: none !important;
  }

  .app-mobile-topbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 140 !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
  }

  body,
  .app-main,
  .page {
    background: #F8FAFC !important;
    color: #0f172a !important;
  }

  .panel,
  .list-card,
  .workflow-checklist,
  .task-row,
  .sticky-summary {
    background: #ffffff !important;
    color: #0f172a !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06) !important;
  }

  .workflow-header h1 {
    font-size: 1.9rem !important;
  }

  .workflow-shell,
  .workflow-support-grid,
  .stats-grid,
  .feature-grid,
  .two-column,
  .count-layout {
    grid-template-columns: 1fr !important;
  }

  .workflow-primary-actions .button,
  .workflow-secondary-nav .button,
  .task-actions .button,
  .workflow-eod-cta .button {
    width: 100% !important;
  }

  .app-mobile-drawer {
    width: min(320px, 90vw) !important;
  }
}

/* Phase 12 structural shell visibility */
.desktop-only {
  display: block;
}

.app-topbar.desktop-only,
.app-topbar-desktop {
  display: flex;
}

.mobile-only {
  display: none;
}

/* Light app theme baseline */
body {
  background: #f8fafc !important;
  color: #0f172a !important;
}

.panel,
.list-card,
.workflow-checklist,
.task-row,
.sticky-summary,
.app-topbar,
.mobile-app-header {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #e2e8f0 !important;
}

@media (max-width: 767px) {
  .desktop-only {
    display: none !important;
  }

  .app-topbar.desktop-only,
  .app-topbar-desktop {
    display: none !important;
  }

  .mobile-only {
    display: flex !important;
  }

  .app-shell {
    display: block !important;
    width: 100% !important;
    max-width: 100vw !important;
  }

  .app-main {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    padding: 16px !important;
    padding-top: 84px !important;
    box-sizing: border-box !important;
  }

  .mobile-app-header {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    height: 68px;
    z-index: 1000;
    background: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    box-sizing: border-box;
  }

  .mobile-app-header > div {
    display: grid;
    min-width: 0;
  }

  .mobile-app-header strong,
  .mobile-app-header span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-drawer[hidden],
  .mobile-drawer-backdrop[hidden] {
    display: none !important;
  }

  .mobile-drawer:not([hidden]) {
    display: block !important;
    position: fixed;
    top: 0;
    left: 0;
    width: min(320px, 88vw);
    height: 100vh;
    z-index: 1100;
    background: #ffffff !important;
    padding: 20px;
    overflow-y: auto;
    box-shadow: 20px 0 60px rgba(15, 23, 42, 0.18);
  }

  .mobile-drawer-backdrop:not([hidden]) {
    display: block !important;
    position: fixed;
    inset: 0;
    z-index: 1090;
    background: rgba(15, 23, 42, 0.45);
  }

  .page,
  .workflow-shell,
  .workflow-support-grid,
  .stats-grid,
  .feature-grid,
  .two-column,
  .count-layout {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    grid-template-columns: 1fr !important;
  }

  /* Business dashboard + generic hero blocks */
  .hero {
    display: grid !important;
    grid-template-columns: 1fr !important;
    align-items: start !important;
    gap: 0.65rem !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .hero > * {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .hero h1,
  .section-heading h1,
  .panel h1,
  .panel h2,
  .panel h3 {
    font-size: clamp(1.5rem, 7vw, 2.05rem) !important;
    line-height: 1.18 !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
    margin-right: 0 !important;
    max-width: 100% !important;
  }

  .hero .muted,
  .panel p,
  .panel .muted,
  .breadcrumbs,
  .breadcrumbs a,
  .breadcrumbs span {
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }

  .hero-actions,
  .hero .hero-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    width: 100% !important;
  }

  .workflow-header h1 {
    font-size: 1.9rem !important;
  }

  .workflow-primary-actions {
    grid-template-columns: 1fr !important;
    max-width: 100% !important;
  }

  .workflow-primary-actions .button,
  .workflow-secondary-nav .button,
  .workflow-eod-cta .button,
  .task-actions .button {
    width: 100% !important;
  }

  .task-row {
    grid-template-columns: 1fr !important;
  }

  .task-actions {
    width: 100% !important;
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
  }

  /* Mobile polish: anti-clipping + intentional scale */
  h1, h2, h3, p, span, div {
    max-width: 100%;
  }

  .page-title,
  .hero-title,
  .dashboard-title,
  .hero h1,
  .workflow-header h1,
  .section-heading h1 {
    font-size: 28px !important;
    line-height: 1.1 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }

  h2,
  .section-heading h2,
  .panel h2,
  .panel h3 {
    font-size: 20px !important;
    line-height: 1.2 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }

  body,
  p,
  .muted,
  label,
  input,
  select,
  textarea,
  button,
  a {
    font-size: 15px !important;
    line-height: 1.4 !important;
  }

  .breadcrumbs,
  .breadcrumbs a,
  .breadcrumbs span {
    font-size: 14px !important;
    line-height: 1.35 !important;
  }

  .stat-card strong,
  .health-score {
    font-size: 32px !important;
    line-height: 1.05 !important;
  }

  .stat-card p,
  .health-meta p span {
    font-size: 14px !important;
  }

  .card,
  .panel,
  .hero-card,
  .dashboard-card,
  .stat-card,
  .workflow-shell {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    padding: 18px !important;
    border-radius: 18px !important;
    margin-bottom: 16px !important;
    box-sizing: border-box !important;
  }

  .app-main {
    padding: 16px !important;
    padding-top: 84px !important;
  }

  .hero {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .hero-actions,
  .hero .hero-actions,
  .hero .action-row {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .stats-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .stats-grid .stat-card {
    margin-bottom: 0 !important;
  }
}
