/* ============================================================ */
/* nimue global.css — SSOT canonical                            */
/* Generated by /tmp/nimue_compose_global.py from:              */
/*   - backend/static/public.css           (site, Jinja2)       */
/*   - backend/static/app/design-system.css (SPA tokens)        */
/*   - backend/static/app/app.css           (SPA shell)         */
/* Scoping: @scope (body.site-body) / @scope (body.app-body).   */
/* Variables: --site-* (public) / --app-* (SPA).                */
/* ============================================================ */

/* ============================================================ */
/* BLOCK 0 — UNIVERSAL RESET (shared between site and app)      */
/* ============================================================ */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

/* ============================================================ */
/* BLOCK 0.5 — ROOT VARIABLES (site + app, light)               */
/* ============================================================ */
:root {
  /* --- site (ex public.css) --- */
  --site-bg-0: #0e171b;
  --site-bg-1: #12242b;
  --site-bg-2: #17323c;
  --site-card: #122129;
  --site-card-soft: #1a2e37;
  --site-line: rgba(191, 211, 205, 0.22);
  --site-line-strong: rgba(191, 211, 205, 0.42);
  --site-text: #e8f0ec;
  --site-muted: #afc2bc;
  --site-accent: #3fb4a2;
  --site-accent-2: #cc7a52;
  --site-success: #5dc48c;
  --site-danger: #f18282;
  --site-shadow-xl: 0 18px 50px rgba(0, 0, 0, 0.35);
  --site-shadow-lg: 0 10px 28px rgba(0, 0, 0, 0.28);
  --site-radius-lg: 24px;
  --site-radius-md: 16px;
  --site-radius-sm: 10px;

  /* --- app (ex design-system.css, light) --- */
  --app-bg: #f5f7fb;
  --app-surface: #ffffff;
  --app-surface-soft: #f8f9ff;
  --app-surface-hover: #f0f4ff;
  --app-surface-pressed: #dbe6ff;
  --app-text: #333333;
  --app-text-muted: #6b7280;
  --app-border: #e0e0e0;
  --app-border-strong: #c7d4ff;
  --app-focus: #4a90e2;
  --app-accent: #2563eb;
  --app-accent-dark: #0056b3;
  --app-danger-bg: #fff1f2;
  --app-danger-text: #b42318;
  --app-success-bg: #ecfdf3;
  --app-success-text: #027a48;
  --app-shadow-soft: 0 10px 30px rgba(20, 30, 55, 0.06);
  --app-shadow-card: 0 6px 16px rgba(20, 30, 55, 0.04);
  --app-radius-sm: 8px;
  --app-radius-md: 10px;
  --app-radius-lg: 12px;
  --app-sidebar-width: 260px;
  --app-font-body: "Segoe UI", "Helvetica Neue", "Roboto", sans-serif;
}

/* App dark theme variables (ex design-system.css) */
html.theme-dark,
body.theme-dark {
  --app-bg: #0f172a;
  --app-surface: #111827;
  --app-surface-soft: #182033;
  --app-surface-hover: #1b2840;
  --app-surface-pressed: #223354;
  --app-text: #e5e7eb;
  --app-text-muted: #9ca3af;
  --app-border: #25304a;
  --app-border-strong: #36507d;
  --app-focus: #60a5fa;
  --app-accent: #60a5fa;
  --app-accent-dark: #93c5fd;
  --app-danger-bg: #331318;
  --app-danger-text: #fda29b;
  --app-success-bg: #10281f;
  --app-success-text: #6ce9a6;
  --app-shadow-soft: 0 12px 30px rgba(0, 0, 0, 0.28);
  --app-shadow-card: 0 8px 18px rgba(0, 0, 0, 0.24);
}

/* ============================================================ */
/* BLOCK 1 — SITE (public, Jinja2 templates)                    */
/* Source: ex backend/static/public.css verbatim                */
/* ============================================================ */
@scope (body.site-body) {
  :scope {
    background:
      radial-gradient(900px 540px at 8% 6%, rgba(63, 180, 162, 0.2), transparent 56%),
      radial-gradient(1000px 560px at 92% 12%, rgba(204, 122, 82, 0.2), transparent 54%),
      linear-gradient(165deg, #0b1417 0%, #12242b 48%, #0d1b21 100%);
    color: var(--site-text);
    font-family: "IBM Plex Sans", system-ui, sans-serif;
    line-height: 1.5;
    min-height: 100vh;
  }

  body.drawer-open {
    overflow: hidden;
  }

  a {
    color: inherit;
  }

  a:focus-visible,
  button:focus-visible,
  input:focus-visible,
  select:focus-visible,
  textarea:focus-visible {
    outline: 2px solid var(--site-accent);
    outline-offset: 2px;
  }

  .container {
    width: min(1240px, 94vw);
    margin: 0 auto;
  }

  .site-header {
    position: sticky;
    top: 0;
    z-index: 300;
    /* Keep header simple: filtered ancestors can break fixed mobile drawers on some mobile browsers. */
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: linear-gradient(180deg, rgba(14, 23, 27, 0.88), rgba(14, 23, 27, 0.76));
    border-bottom: 1px solid var(--site-line);
    overflow: visible;
  }

  .nav-shell {
    min-height: 78px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 18px;
  }

  .brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-family: "Sora", sans-serif;
    font-weight: 700;
    color: #f5fbf8;
    background: linear-gradient(135deg, #2f9f95, #c5704e);
    box-shadow: var(--site-shadow-lg);
  }

  .brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
  }

  .brand-copy strong {
    font-family: "Sora", sans-serif;
    font-weight: 700;
    letter-spacing: 0.02em;
  }

  .brand-copy small {
    color: var(--site-muted);
    font-size: 0.74rem;
  }

  .nav-desktop {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
  }

  .nav-desktop a {
    text-decoration: none;
    color: #d9e8e2;
    font-weight: 500;
    font-size: 0.94rem;
    border-bottom: 2px solid transparent;
    padding-bottom: 2px;
    transition: color 0.2s ease, border-color 0.2s ease;
  }

  .nav-desktop a:hover {
    color: #ffffff;
    border-bottom-color: var(--site-accent);
  }

  .nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .lang-switch {
    width: 44px;
    height: 38px;
    border-radius: 11px;
    border: 1px solid var(--site-line-strong);
    color: #f3f9f6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.05em;
  }

  .btn {
    border-radius: 999px;
    padding: 11px 18px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-weight: 600;
    border: 1px solid transparent;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
  }

  button.btn {
    font-family: inherit;
    color: inherit;
  }

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

  .btn-primary {
    background: linear-gradient(135deg, #2f9f95, #2a7f79);
    border-color: rgba(122, 229, 208, 0.3);
    color: #f5fffb;
    box-shadow: var(--site-shadow-lg);
  }

  .btn-soft {
    background: rgba(22, 38, 46, 0.7);
    border-color: var(--site-line-strong);
    color: #e9f2ef;
  }

  .btn-outline {
    background: transparent;
    border-color: var(--site-line-strong);
    color: #ecf4f1;
  }

  .btn-ghost {
    background: transparent;
    border-color: transparent;
    color: #e3f0eb;
    padding: 10px 12px;
  }

  .btn-full {
    width: 100%;
  }

  .nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--site-line-strong);
    border-radius: 11px;
    width: 44px;
    height: 38px;
    padding: 8px;
  }

  .nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: #dce8e3;
    margin: 3px 0;
  }

  .mobile-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(2, 6, 8, 0.82);
    backdrop-filter: blur(2px);
  }

  .mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(84vw, 360px);
    z-index: 1210;
    background: #0f1b23;
    border-left: 1px solid var(--site-line-strong);
    box-shadow: -18px 0 34px rgba(0, 0, 0, 0.42);
    transform: translateX(100%);
    transition: transform 0.22s ease;
    padding: 18px 18px 24px;
  }

  .mobile-drawer[aria-hidden="false"] {
    transform: translateX(0%);
  }

  .mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 14px;
  }

  .mobile-nav a {
    text-decoration: none;
    border: 1px solid var(--site-line);
    background: #172a33;
    border-radius: 10px;
    padding: 12px 14px;
    color: #ecf5f2;
  }

  .mobile-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--site-line);
    padding-bottom: 12px;
  }

  .mobile-drawer-title {
    font-family: "Sora", sans-serif;
    font-size: 0.96rem;
    letter-spacing: 0.02em;
  }

  .mobile-drawer-close {
    border: 1px solid var(--site-line-strong);
    background: #1d3440;
    color: #f1f8f5;
    border-radius: 10px;
    min-width: 84px;
    min-height: 36px;
    padding: 6px 12px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
  }

  .site-main {
    padding: 20px 0 0;
  }

  .section {
    padding: 56px 0;
  }

  .section-alt {
    background: linear-gradient(180deg, rgba(17, 36, 42, 0.62), rgba(18, 34, 41, 0.28));
    border-top: 1px solid var(--site-line);
    border-bottom: 1px solid var(--site-line);
  }

  .section-header {
    max-width: 860px;
    margin-bottom: 30px;
  }

  /* Error pages canonical (404 / 500 / 429 / maintenance) — cap 22 frontend_error_pages */
  .section-error {
    min-height: calc(100vh - 240px);
    display: flex;
    align-items: center;
    padding: 80px 0;
  }

  .error-card {
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
    padding: 40px;
    border-radius: 20px;
    background: rgba(16, 33, 40, 0.42);
    border: 1px solid var(--site-line);
  }

  .error-card h1 {
    margin-top: 14px;
  }

  .error-actions {
    margin-top: 28px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
  }

  .error-reference {
    margin-top: 24px;
    font-size: 0.88rem;
  }

  .error-reference code {
    background: rgba(255, 255, 255, 0.06);
    padding: 2px 8px;
    border-radius: 6px;
    font-family: "IBM Plex Mono", "Source Code Pro", monospace;
  }

  .eyebrow {
    display: inline-flex;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(63, 180, 162, 0.2);
    border: 1px solid rgba(123, 235, 214, 0.32);
    color: #dff7ef;
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 14px;
  }

  h1,
  h2,
  h3,
  h4 {
    font-family: "Sora", sans-serif;
    line-height: 1.2;
    margin: 0 0 12px;
    color: #f6f9f8;
  }

  h1 {
    font-size: clamp(2rem, 4.6vw, 3.45rem);
  }

  h2 {
    font-size: clamp(1.5rem, 2.8vw, 2.45rem);
  }

  h3 {
    font-size: clamp(1.02rem, 1.7vw, 1.35rem);
  }

  p,
  li,
  label {
    color: #d5e4de;
  }

  small,
  .muted,
  .text-muted {
    color: var(--site-muted);
  }

  .hero {
    padding-top: 28px;
  }

  .hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 22px;
    align-items: stretch;
  }

  .hero-panel,
  .hero-side {
    border-radius: var(--site-radius-lg);
    border: 1px solid var(--site-line);
    background: linear-gradient(160deg, rgba(20, 39, 46, 0.95), rgba(15, 27, 33, 0.95));
    box-shadow: var(--site-shadow-xl);
  }

  .hero-panel {
    padding: 34px;
  }

  .hero-side {
    padding: 24px;
  }

  .hero-copy p {
    margin-top: 0;
    margin-bottom: 18px;
    max-width: 62ch;
  }

  .hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
  }

  .kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
  }

  .kpi {
    border: 1px solid var(--site-line);
    border-radius: var(--site-radius-sm);
    background: rgba(16, 29, 36, 0.68);
    padding: 11px;
  }

  .kpi strong {
    display: block;
    color: #f4faf8;
    margin-bottom: 4px;
  }

  .side-list {
    margin: 0;
    padding-left: 18px;
  }

  .side-list li {
    margin-bottom: 10px;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    display: grid;
    gap: 14px;
  }

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

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

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

  .feature-card,
  .info-card,
  .pricing-card,
  .account-card,
  .contact-card,
  .faq-card,
  .legal-card,
  .form-card {
    background: linear-gradient(165deg, rgba(24, 41, 49, 0.9), rgba(18, 33, 40, 0.9));
    border: 1px solid var(--site-line);
    border-radius: var(--site-radius-md);
    padding: 18px;
    box-shadow: var(--site-shadow-lg);
  }

  .feature-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    font-family: "Sora", sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    color: #f0fbf8;
    background: linear-gradient(135deg, #2f9f95, #c5704e);
    margin-bottom: 10px;
  }

  .pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    margin: 0;
    list-style: none;
  }

  .pill-list li {
    border: 1px solid var(--site-line);
    border-radius: 999px;
    padding: 6px 11px;
    font-size: 0.84rem;
    color: #dbebe6;
    background: rgba(24, 43, 50, 0.66);
  }

  .timeline {
    display: grid;
    gap: 12px;
  }

  .timeline-step {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    align-items: start;
    border: 1px solid var(--site-line);
    border-radius: var(--site-radius-md);
    padding: 16px;
    background: rgba(17, 30, 36, 0.72);
  }

  .timeline-num {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(63, 180, 162, 0.24);
    border: 1px solid rgba(122, 237, 214, 0.36);
    display: grid;
    place-items: center;
    font-family: "Sora", sans-serif;
    font-weight: 700;
  }

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

  .pricing-price {
    font-family: "Sora", sans-serif;
    font-weight: 800;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    margin: 4px 0 10px;
  }

  .pricing-price span {
    font-size: 0.98rem;
    font-weight: 500;
    color: var(--site-muted);
  }

  .pricing-features {
    margin: 0 0 18px;
    padding-left: 18px;
  }

  .callout {
    border: 1px solid var(--site-line-strong);
    border-radius: var(--site-radius-md);
    padding: 16px;
    background: linear-gradient(145deg, rgba(26, 46, 55, 0.94), rgba(20, 36, 43, 0.94));
  }

  .callout strong {
    color: #f4fbf8;
  }

  .form-card,
  .auth-card {
    max-width: 860px;
  }

  .form-shell {
    display: grid;
    gap: 14px;
  }

  .field-grid {
    display: grid;
    gap: 12px;
  }

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

  .field {
    display: grid;
    gap: 6px;
  }

  .field input,
  .field select,
  .field textarea {
    width: 100%;
    border: 1px solid var(--site-line-strong);
    border-radius: 11px;
    background: rgba(15, 27, 33, 0.9);
    color: #edf6f2;
    padding: 12px 12px;
    font: inherit;
  }

  .field textarea {
    min-height: 110px;
    resize: vertical;
  }

  .form-radio-row {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
  }

  .form-radio-row label {
    display: inline-flex;
    gap: 7px;
    align-items: center;
  }

  .input-with-toggle {
    position: relative;
  }

  .input-with-toggle input {
    padding-right: 94px;
  }

  .password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    border: 1px solid var(--site-line-strong);
    background: rgba(21, 39, 47, 0.96);
    color: #ecf4f1;
    border-radius: 8px;
    height: 32px;
    min-width: 64px;
    font: inherit;
    font-size: 0.84rem;
    cursor: pointer;
  }

  .alert {
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 12px;
  }

  .alert-success {
    border-color: rgba(126, 226, 167, 0.42);
    background: rgba(42, 106, 68, 0.34);
  }

  .alert-error {
    border-color: rgba(243, 139, 139, 0.48);
    background: rgba(108, 43, 43, 0.38);
  }

  .alert-warning {
    border-color: rgba(232, 176, 120, 0.48);
    background: rgba(111, 69, 34, 0.34);
  }

  .inline-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  .inline-links a {
    color: #bde8de;
  }

  .spacer-top-12 {
    margin-top: 12px;
  }

  .spacer-top-14 {
    margin-top: 14px;
  }

  .spacer-top-16 {
    margin-top: 16px;
  }

  .section-compact {
    padding: 24px 0 0;
  }

  .account-grid {
    display: grid;
    gap: 14px;
  }

  .account-card p {
    margin: 0 0 8px;
  }

  .countdown {
    border: 1px solid rgba(114, 219, 201, 0.4);
    background: rgba(42, 94, 87, 0.32);
    border-radius: 10px;
    padding: 10px 12px;
  }

  .faq-list {
    display: grid;
    gap: 14px;
  }

  .faq-card h3 {
    margin-bottom: 8px;
  }

  .legal-wrap {
    display: grid;
    gap: 14px;
  }

  .legal-card h3 {
    margin-bottom: 6px;
  }

  .legal-card ul {
    margin: 8px 0 0;
    padding-left: 18px;
  }

  .site-footer {
    margin-top: 34px;
    border-top: 1px solid var(--site-line);
    background: linear-gradient(180deg, rgba(11, 18, 23, 0.92), rgba(11, 17, 21, 0.96));
  }

  .footer-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(4, 1fr);
    gap: 18px;
    padding: 30px 0;
  }

  .footer-grid section {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .footer-grid h4 {
    margin-bottom: 4px;
    font-size: 1rem;
  }

  .footer-grid a {
    text-decoration: none;
    color: #d2e4dd;
  }

  .footer-grid a:hover {
    color: #fff;
  }

  .footer-bottom {
    border-top: 1px solid var(--site-line);
    padding: 12px 0 22px;
    text-align: center;
    color: var(--site-muted);
    font-size: 0.9rem;
  }

  .about-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .stat {
    border-radius: 12px;
    border: 1px solid var(--site-line);
    padding: 12px;
    text-align: center;
    background: rgba(17, 31, 38, 0.7);
  }

  .stat strong {
    font-family: "Sora", sans-serif;
    font-size: 1.2rem;
    display: block;
  }

  .billing-type-panels {
    display: grid;
    gap: 14px;
  }

  .billing-panel[hidden] {
    display: none;
  }

  .policy-note {
    font-size: 0.95rem;
    color: var(--site-muted);
  }

  code,
  .code-chip {
    font-family: "IBM Plex Sans", monospace;
    background: rgba(17, 31, 38, 0.94);
    border: 1px solid var(--site-line);
    border-radius: 8px;
    padding: 2px 6px;
    color: #dff6ef;
  }

  @media (max-width: 1180px) {
    .nav-desktop {
      gap: 12px;
    }

    .nav-desktop a {
      font-size: 0.87rem;
    }

    .hero-grid,
    .grid-4,
    .grid-3,
    .pricing-grid,
    .footer-grid {
      grid-template-columns: 1fr 1fr;
    }

    .footer-grid {
      grid-template-columns: repeat(3, 1fr);
    }
  }

  @media (max-width: 900px) {
    .nav-desktop,
    .nav-actions {
      display: none;
    }

    .nav-toggle {
      display: inline-block;
      justify-self: end;
    }

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

    .hero-grid,
    .grid-2,
    .grid-3,
    .grid-4,
    .pricing-grid,
    .field-grid.cols-2,
    .about-stats,
    .footer-grid {
      grid-template-columns: 1fr;
    }

    .hero-panel,
    .hero-side {
      padding: 22px;
    }

    .section {
      padding: 42px 0;
    }
  }

  @media (max-width: 560px) {
    .container {
      width: min(1240px, 95vw);
    }

    .hero-actions .btn,
    .inline-links a,
    .btn {
      width: 100%;
    }

    .form-radio-row {
      flex-direction: column;
      gap: 10px;
    }

    .timeline-step {
      grid-template-columns: 1fr;
    }

    .timeline-num {
      width: 34px;
      height: 34px;
    }
  }

  @media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
      transition-duration: 0.01ms !important;
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      scroll-behavior: auto !important;
    }
  }
}

/* ============================================================ */
/* BLOCK 2 — APP (SPA static/app/)                              */
/* Source: ex design-system.css + ex app.css verbatim           */
/* ============================================================ */
@scope (body.app-body) {
  :scope {
    min-height: 100%;
    background: var(--app-bg);
    color: var(--app-text);
    font-family: var(--app-font-body);
    font-size: 14px;
  }
  :scope { overflow-x: hidden; overflow-y: auto; }
  button,
  input,
  select,
  textarea {
    font: inherit;
  }

  a {
    color: var(--app-accent);
  }

  .card,
  .btn,
  .sidebar-button,
  .input,
  .select,
  .textarea {
    transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
  }

  .card {
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-lg);
    box-shadow: var(--app-shadow-card);
  }

  .btn,
  .sidebar-button,
  .button-link {
    background: var(--app-surface);
    color: var(--app-text);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-lg);
    padding: 15px;
    text-align: left;
    font-weight: 700;
    cursor: pointer;
    box-shadow: none;
  }

  .btn:hover,
  .sidebar-button:hover,
  .button-link:hover {
    background: var(--app-surface-hover);
    border-color: var(--app-border-strong);
  }

  .btn:active,
  .sidebar-button:active,
  .button-link:active {
    background: var(--app-surface-pressed);
    border-color: #a3baff;
  }

  .btn-primary {
    background: var(--app-accent);
    color: #ffffff;
    border-color: var(--app-accent);
  }

  .btn-primary:hover {
    background: var(--app-accent-dark);
    border-color: var(--app-accent-dark);
  }

  .btn-ghost {
    background: transparent;
  }

  .btn-danger {
    color: var(--app-danger-text);
  }

  .input,
  .select,
  .textarea {
    width: 100%;
    border: 2px solid var(--app-border);
    border-radius: var(--app-radius-sm);
    padding: 10px 12px;
    background: var(--app-surface);
    color: var(--app-text);
  }

  .select {
    border-radius: var(--app-radius-md);
  }

  .input:focus,
  .select:focus,
  .textarea:focus {
    outline: none;
    border-color: var(--app-focus);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.12);
  }

  .textarea {
    min-height: 120px;
    resize: vertical;
  }

  .field-label {
    display: block;
    margin-bottom: 6px;
    color: var(--app-text);
    font-weight: 600;
  }

  .text-muted {
    color: var(--app-text-muted);
  }

  .banner {
    border-radius: var(--app-radius-lg);
    padding: 12px 16px;
    margin-bottom: 16px;
    border: 1px solid transparent;
  }

  .banner-error {
    background: var(--app-danger-bg);
    color: var(--app-danger-text);
    border-color: rgba(180, 35, 24, 0.15);
  }

  .banner-success {
    background: var(--app-success-bg);
    color: var(--app-success-text);
    border-color: rgba(2, 122, 72, 0.15);
  }

  .action-group {
    display: flex;
    align-items: stretch;
    width: fit-content;
    max-width: 100%;
    flex: 0 0 auto;
  }

  .action-group-main {
    min-width: 150px;
    width: 150px;
    flex: 0 0 150px;
  }

  .action-group-sub {
    display: flex;
    gap: 8px;
    overflow: hidden;
    max-width: 0;
    padding-left: 0;
    transition: max-width 300ms ease, padding-left 300ms ease;
  }

  .action-group:hover .action-group-sub,
  .action-group:focus-within .action-group-sub {
    max-width: 1200px;
    padding-left: 8px;
  }

  .action-group-sub .btn {
    min-width: 150px;
  }

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

  .stack {
    display: grid;
    gap: 16px;
  }

  .section-title {
    margin: 0 0 8px;
    font-size: 18px;
  }

  .pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--app-surface-soft);
    border: 1px solid var(--app-border);
    color: var(--app-text-muted);
    font-size: 12px;
    font-weight: 600;
  }

  .detail-list {
    display: grid;
    gap: 8px;
  }

  .detail-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
  }

  .detail-row strong {
    min-width: 170px;
  }

  .modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 50;
  }

  .modal-card {
    width: min(720px, 100%);
    max-height: 90vh;
    overflow: auto;
    padding: 20px;
  }

  .scroll-y {
    overflow: auto;
  }

  .scroll-y::-webkit-scrollbar {
    width: 0;
    height: 0;
  }

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

  @media (max-width: 840px) {
    :scope {
      overflow: auto;
    }

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

  .app-shell {
    display: grid;
    grid-template-columns: var(--app-sidebar-width) minmax(0, 1fr);
    min-height: 100dvh;
  }

  .mobile-topbar,
  .mobile-route-strip,
  .mobile-utility-sheet,
  .sidebar-mobile-head {
    display: none;
  }

  .mobile-action-menu {
    display: none;
  }

  .mobile-topbar {
    position: sticky;
    top: 0;
    z-index: 45;
    padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 12px;
    gap: 14px;
    align-items: center;
    background:
      linear-gradient(180deg, color-mix(in srgb, var(--app-surface) 94%, transparent), color-mix(in srgb, var(--app-surface-soft) 92%, transparent));
    border-bottom: 1px solid var(--app-border);
    backdrop-filter: blur(16px);
  }

  .mobile-topbar-copy {
    min-width: 0;
    display: grid;
    gap: 3px;
  }

  .mobile-route-strip {
    position: sticky;
    top: calc(75px + env(safe-area-inset-top, 0px));
    z-index: 42;
    gap: 8px;
    padding: 10px 12px 12px;
    overflow-x: auto;
    background: linear-gradient(180deg, color-mix(in srgb, var(--app-bg) 94%, transparent), color-mix(in srgb, var(--app-bg) 88%, transparent));
    border-bottom: 1px solid color-mix(in srgb, var(--app-border) 72%, transparent);
  }

  .mobile-route-strip::-webkit-scrollbar {
    display: none;
  }

  .mobile-route-chip {
    flex: 0 0 auto;
    padding: 10px 14px;
    border: 1px solid var(--app-border);
    border-radius: 999px;
    background: var(--app-surface);
    color: var(--app-text-muted);
    box-shadow: var(--app-shadow-card);
  }

  .mobile-route-chip.is-active {
    background: var(--app-surface-hover);
    border-color: var(--app-border-strong);
    color: var(--app-text);
  }

  .mobile-utility-sheet {
    position: fixed;
    top: calc(66px + env(safe-area-inset-top, 0px));
    left: 12px;
    right: 12px;
    z-index: 48;
    padding: 14px;
    gap: 14px;
  }

  .mobile-utility-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
  }

  .mobile-utility-title {
    font-size: 16px;
    font-weight: 800;
  }

  .mobile-utility-subtitle {
    margin-top: 4px;
    color: var(--app-text-muted);
    font-size: 12px;
    overflow-wrap: anywhere;
  }

  .mobile-utility-actions {
    display: grid;
    gap: 10px;
  }

  .mobile-topbar-title {
    font-size: 15px;
    font-weight: 800;
  }

  .mobile-topbar-subtitle {
    color: var(--app-text-muted);
    font-size: 11px;
    line-height: 1.35;
  }

  .mobile-icon-button,
  .mobile-close-button {
    border: 1px solid var(--app-border);
    background: var(--app-surface);
    color: var(--app-text);
    border-radius: 14px;
    cursor: pointer;
    box-shadow: var(--app-shadow-card);
  }

  .mobile-icon-button {
    width: 48px;
    height: 48px;
    display: grid;
    gap: 5px;
    place-content: center;
    flex: 0 0 auto;
  }

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

  .mobile-close-button {
    padding: 10px 12px;
    font-weight: 700;
  }

  .sidebar-mobile-head {
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .sidebar-mobile-copy {
    min-width: 0;
  }

  .sidebar {
    position: sticky;
    top: 0;
    align-self: start;
    padding: 24px 18px;
    border-right: 1px solid var(--app-border);
    background: color-mix(in srgb, var(--app-surface) 84%, transparent);
    backdrop-filter: blur(14px);
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-height: 100vh;
    overflow: auto;
  }

  .brand-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
  }

  .brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--app-accent), #7c9bff);
    color: #ffffff;
    font-size: 20px;
    font-weight: 800;
  }

  .brand-title {
    font-size: 18px;
    font-weight: 800;
  }

  .brand-subtitle {
    color: var(--app-text-muted);
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .sidebar-nav {
    display: grid;
    gap: 10px;
  }

  .sidebar-button.is-active {
    background: var(--app-surface-hover);
    border-color: var(--app-border-strong);
    box-shadow: var(--app-shadow-soft);
  }

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

  .sidebar-link {
    display: block;
    padding: 12px 14px;
    border-radius: var(--app-radius-md);
    text-decoration: none;
    color: var(--app-text-muted);
  }

  .sidebar-link:hover {
    background: var(--app-surface-soft);
    color: var(--app-text);
  }

  .workspace {
    min-width: 0;
    min-height: 100vh;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow: visible;
  }

  .workspace::-webkit-scrollbar {
    width: 12px;
    height: 12px;
  }

  .workspace-header {
    grid-row: 1;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }

  .workspace-header h1 {
    margin: 0 0 8px;
    font-size: 26px;
  }

  .workspace-header p {
    margin: 0;
    color: var(--app-text-muted);
  }

  .workspace-account {
    text-align: right;
  }

  .account-label {
    color: var(--app-text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }

  .account-email {
    font-weight: 700;
  }

  .view-root {
    position: relative;
    flex: 0 0 auto;
    overflow: visible;
    min-height: calc(100dvh - 190px);
    padding: 0 4px 24px 0;
  }

  .view-root::-webkit-scrollbar {
    width: 12px;
    height: 12px;
  }

  .view-root.is-loading {
    pointer-events: none;
  }

  .view-loading-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: start;
    justify-content: center;
    padding-top: 8px;
    pointer-events: none;
    z-index: 3;
  }

  .view-loading-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--app-surface) 94%, transparent);
    backdrop-filter: blur(14px);
  }

  .view-loading-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--app-accent);
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--app-accent) 48%, transparent);
    animation: view-loading-pulse 900ms ease-in-out infinite;
  }

  .view-loading-label {
    font-weight: 700;
  }

  .loading-card {
    padding: 28px;
  }

  @keyframes view-loading-pulse {
    0% {
      transform: scale(0.9);
      box-shadow: 0 0 0 0 color-mix(in srgb, var(--app-accent) 42%, transparent);
    }
    70% {
      transform: scale(1);
      box-shadow: 0 0 0 10px color-mix(in srgb, var(--app-accent) 0%, transparent);
    }
    100% {
      transform: scale(0.9);
      box-shadow: 0 0 0 0 color-mix(in srgb, var(--app-accent) 0%, transparent);
    }
  }

  .toolbar-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
  }

  .toolbar-row .input {
    flex: 1 1 280px;
  }

  .toolbar-row .select {
    min-width: 190px;
  }

  .toolbar-search-input,
  .toolbar-filter-select,
  .toolbar-control-button {
    min-height: 52px;
  }

  .toolbar-search-input {
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .toolbar-filter-select {
    flex: 0 0 220px;
  }

  .toolbar-control-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

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

  .entity-card {
    min-height: 135px;
    padding: 18px;
    cursor: pointer;
    display: grid;
    align-content: start;
    gap: 6px;
  }

  .entity-card-title {
    font-size: 18px;
    font-weight: 800;
  }

  .entity-card-line {
    color: var(--app-text-muted);
  }

  .split-view {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    gap: 16px;
  }

  .panel {
    padding: 18px;
  }

  .panel h2,
  .panel h3 {
    margin-top: 0;
  }

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

  .form-grid .span-2 {
    grid-column: span 2;
  }

  .form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
  }

  .checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .doc-list,
  .audit-list,
  .history-list,
  .event-list,
  .claim-list,
  .assignment-list {
    display: grid;
    gap: 12px;
  }

  .doc-card,
  .history-item,
  .audit-item,
  .event-item,
  .claim-item,
  .assignment-item,
  .summary-card,
  .settings-group {
    padding: 16px;
  }

  .doc-card-header,
  .item-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: start;
  }

  .doc-actions,
  .inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .doc-upload-field {
    display: grid;
    gap: 8px;
  }

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

  .summary-number {
    font-size: 24px;
    font-weight: 800;
  }

  .settings-layout {
    display: grid;
    gap: 16px;
  }

  .settings-group h3 {
    margin-top: 0;
  }

  .settings-group .stack {
    margin-top: 12px;
  }

  .calendar-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .calendar-month-actions {
    justify-content: flex-end;
  }

  .calendar-month-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
  }

  .calendar-month-title {
    font-size: 20px;
    font-weight: 800;
    text-transform: capitalize;
  }

  .calendar-board {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
  }

  .calendar-weekday {
    padding: 8px 4px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--app-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .calendar-day {
    min-width: 0;
    min-height: 84px;
    padding: 10px 8px;
    border: 1px solid var(--app-border);
    border-radius: 18px;
    background: var(--app-surface);
    color: var(--app-text);
    display: grid;
    align-content: space-between;
    gap: 10px;
    text-align: left;
    box-shadow: var(--app-shadow-card);
  }

  .calendar-day:hover {
    background: var(--app-surface-hover);
  }

  .calendar-day.is-outside {
    opacity: 0.45;
  }

  .calendar-day.is-selected {
    border-color: var(--app-accent);
    background: color-mix(in srgb, var(--app-accent) 14%, var(--app-surface));
  }

  .calendar-day.has-events {
    border-color: color-mix(in srgb, var(--app-accent) 36%, var(--app-border));
  }

  .calendar-day-number {
    font-size: 15px;
    font-weight: 800;
  }

  .calendar-day-count {
    font-size: 11px;
    color: var(--app-text-muted);
    line-height: 1.3;
    overflow-wrap: anywhere;
  }

  .mobile-safe-date-input,
  .mobile-safe-time-input {
    min-width: 0;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
  }

  .is-hidden {
    display: none !important;
  }

  .assignment-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    align-items: center;
  }

  .assignment-toolbar-card {
    display: grid;
    gap: 14px;
  }

  .assignment-filter-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    align-items: end;
  }

  .assignment-actions-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  .assignment-date-shortcuts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
  }

  .assignment-shortcut-button {
    padding: 10px 12px;
    border-radius: 14px;
  }

  .assignment-vehicle-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
  }

  .assignment-row-field,
  .assignment-filter-field {
    min-width: 0;
  }

  .assignment-row-field.is-giro-active {
    border-color: color-mix(in srgb, var(--app-accent) 34%, var(--app-border));
  }

  .assignment-row-field.is-giro-inactive {
    opacity: 0.82;
  }

  .assignment-mobile-label {
    display: none;
  }

  .desktop-assignment-toolbar {
    padding: 18px 20px;
  }

  .desktop-assignment-filter-grid {
    grid-template-columns: minmax(220px, max-content) minmax(220px, 280px) minmax(0, 1fr);
    align-items: center;
  }

  .desktop-assignment-list {
    gap: 10px;
  }

  .desktop-assignment-item {
    padding: 0;
    overflow: hidden;
  }

  .desktop-assignment-row {
    grid-template-columns: minmax(116px, 132px) minmax(220px, 1fr) 70px minmax(170px, 210px) minmax(118px, 132px);
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
  }

  .assignment-plate-cell,
  .assignment-driver-cell,
  .assignment-driver-action,
  .assignment-heavy-slot,
  .assignment-giro-slot {
    min-width: 0;
  }

  .assignment-plate-cell {
    display: grid;
    gap: 2px;
  }

  .assignment-driver-cell {
    display: grid;
    gap: 4px;
    padding: 0 8px;
  }

  .assignment-driver-name {
    display: block;
    min-width: 0;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .assignment-driver-action,
  .assignment-giro-slot {
    display: flex;
    justify-content: center;
  }

  .assignment-inline-icon {
    width: 48px;
    min-width: 48px;
    padding: 12px 0;
    text-align: center;
  }

  .assignment-heavy-slot {
    display: flex;
    align-items: center;
  }

  .assignment-heavy-trigger {
    width: 100%;
    text-align: center;
    white-space: nowrap;
  }

  .assignment-empty-slot {
    font-size: 12px;
    color: var(--app-text-muted);
    font-weight: 600;
  }

  .assignment-giro-slot .select {
    min-width: 0;
    max-width: 118px;
  }

  .assignment-date-indicator {
    justify-self: end;
    font-size: 12px;
    font-weight: 700;
    color: var(--app-text-muted);
    text-align: right;
  }

  .assignment-heavy-drivers-panel {
    gap: 12px;
  }

  .assignment-history-row {
    display: grid;
    grid-template-columns: minmax(110px, 140px) minmax(120px, 180px) minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
  }

  .assignment-history-row strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .assignment-heavy-drivers-panel .assignment-history-row {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto;
  }

  .assignment-history-card {
    display: grid;
    gap: 12px;
  }

  .assignment-detail-pre {
    margin: 0;
    padding: 14px 16px;
    background: var(--app-surface-soft);
    border: 1px solid var(--app-border);
    border-radius: 16px;
    color: var(--app-text);
    font: inherit;
    font-size: 13px;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  .input.is-readonly {
    background: var(--app-surface-soft);
    color: var(--app-text-muted);
    cursor: default;
  }

  .mini-note {
    font-size: 12px;
    color: var(--app-text-muted);
  }

  .empty-state {
    padding: 28px;
    text-align: center;
    color: var(--app-text-muted);
  }

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

    .split-view,
    .calendar-grid {
      grid-template-columns: 1fr;
    }
  }

  @media (max-width: 840px) {
    :scope {
      background: var(--app-bg);
      padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    }

    .mobile-topbar {
      display: flex;
    }

    .mobile-route-strip {
      display: flex;
    }

    .app-shell {
      grid-template-columns: 1fr;
      min-height: auto;
    }

    .sidebar {
      display: none;
    }

    body.mobile-utility-open .mobile-utility-sheet {
      display: grid;
    }

    .workspace {
      min-height: calc(100dvh - 126px);
      padding: 12px 12px 0;
      gap: 12px;
    }

    .workspace-header {
      display: none;
    }

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

    .form-grid .span-2 {
      grid-column: span 1;
    }

    .workspace-account,
    .account-label {
      text-align: left;
    }

    .account-email {
      overflow-wrap: anywhere;
    }

    .toolbar-row,
    .form-actions,
    .inline-actions,
    .doc-actions,
    .item-header,
    .calendar-month-header,
    .doc-card-header,
    .detail-row {
      align-items: stretch;
      flex-direction: column;
    }

    .checkbox-row {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-direction: row;
    }

    .toolbar-row {
      gap: 10px;
    }

    .toolbar-row .input,
    .toolbar-row .select,
    .toolbar-row .btn,
    .form-actions .btn,
    .inline-actions .btn,
    .doc-actions .btn,
    .item-header .btn,
    .doc-card-header .btn,
    .action-group,
    .action-group-main,
    .action-group-sub {
      width: 100%;
    }

    .toolbar-row .input,
    .toolbar-row .select,
    .toolbar-row .btn,
    .toolbar-search-input,
    .toolbar-filter-select,
    .toolbar-control-button,
    .mobile-action-menu,
    .action-group,
    .action-group-main {
      flex: 0 0 auto;
      min-height: 52px;
    }

    .toolbar-search-input,
    .toolbar-filter-select {
      height: 52px;
      padding-top: 0;
      padding-bottom: 0;
    }

    .action-group {
      display: grid;
      gap: 10px;
    }

    .mobile-action-menu {
      display: block;
      width: 100%;
      min-width: 0;
      margin: 0;
      border: 0;
    }

    .mobile-action-menu[open] {
      display: block;
    }

    .mobile-action-summary {
      list-style: none;
      width: 100%;
    }

    .mobile-action-summary::-webkit-details-marker {
      display: none;
    }

    .mobile-action-menu-panel {
      display: grid;
      gap: 8px;
      margin-top: 10px;
    }

    .action-group-sub {
      display: grid;
      gap: 8px;
      max-width: none;
      padding-left: 0;
      overflow: visible;
    }

    .action-group:hover .action-group-sub,
    .action-group:focus-within .action-group-sub {
      max-width: none;
      padding-left: 0;
    }

    .list-grid,
    .summary-grid,
    .settings-layout,
    .split-view,
    .calendar-grid,
    .assignment-filter-grid {
      gap: 12px;
    }

    .calendar-board {
      gap: 6px;
    }

    .calendar-weekday {
      font-size: 10px;
      padding: 4px 2px;
    }

    .calendar-day {
      min-height: 70px;
      padding: 8px 6px;
      border-radius: 16px;
    }

    .calendar-day-number {
      font-size: 14px;
    }

    .calendar-day-count {
      font-size: 10px;
    }

    .entity-card,
    .panel,
    .summary-card,
    .settings-group,
    .doc-card,
    .history-item,
    .audit-item,
    .event-item,
    .claim-item,
    .assignment-item {
      padding: 14px;
      border-radius: 20px;
    }

    .entity-card {
      min-height: 0;
    }

    .entity-card-title {
      font-size: 17px;
    }

    .panel h2,
    .panel h3,
    .settings-group h3 {
      line-height: 1.2;
    }

    .assignment-row {
      grid-template-columns: 1fr;
      gap: 8px;
    }

    .desktop-assignment-toolbar {
      padding: 14px;
    }

    .assignment-toolbar-card,
    .assignment-item {
      overflow: hidden;
    }

    .assignment-filter-grid {
      grid-template-columns: 1fr;
    }

    .desktop-assignment-filter-grid {
      grid-template-columns: 1fr;
      align-items: stretch;
    }

    .assignment-date-indicator {
      justify-self: stretch;
      text-align: left;
      padding: 12px 14px;
      border: 1px solid var(--app-border);
      border-radius: 16px;
      background: var(--app-surface-soft);
    }

    .desktop-assignment-item {
      padding: 14px;
    }

    .desktop-assignment-row {
      grid-template-columns: 1fr;
      gap: 10px;
      padding: 0;
    }

    .assignment-plate-cell,
    .assignment-driver-cell,
    .assignment-driver-action,
    .assignment-heavy-slot,
    .assignment-giro-slot {
      display: grid;
      gap: 6px;
      width: 100%;
    }

    .assignment-plate-cell::before,
    .assignment-driver-cell::before,
    .assignment-driver-action::before,
    .assignment-heavy-slot::before,
    .assignment-giro-slot::before {
      content: attr(data-mobile-label);
      display: block;
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      color: var(--app-text-muted);
    }

    .assignment-plate-cell {
      padding-bottom: 10px;
      border-bottom: 1px solid var(--app-border);
    }

    .assignment-driver-cell {
      padding: 0;
    }

    .assignment-driver-name {
      white-space: normal;
      overflow: visible;
      text-overflow: initial;
    }

    .assignment-inline-icon,
    .assignment-heavy-trigger,
    .assignment-giro-slot .select {
      width: 100%;
      max-width: 100%;
    }

    .assignment-empty-slot {
      padding: 12px 14px;
      border: 1px solid var(--app-border);
      border-radius: 16px;
      background: var(--app-surface-soft);
    }

    .assignment-history-row,
    .assignment-heavy-drivers-panel .assignment-history-row {
      grid-template-columns: 1fr;
    }

    .assignment-history-row strong {
      white-space: normal;
    }

    .assignment-actions-grid {
      display: grid;
      grid-template-columns: 1fr;
    }

    .assignment-date-shortcuts {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .assignment-actions-grid .btn {
      width: 100%;
    }

    .assignment-vehicle-head {
      align-items: start;
      flex-direction: column;
      margin-bottom: 10px;
    }

    .assignment-row-field {
      padding: 12px;
      border: 1px solid var(--app-border);
      border-radius: 18px;
      background: var(--app-surface-soft);
    }

    .assignment-mobile-label {
      display: block;
    }

    .assignment-date-input,
    #claim-date,
    #calendar-start,
    #calendar-end,
    #calendar-start-date,
    #calendar-start-time,
    #calendar-end-date,
    #calendar-end-time,
    .assignment-filter-field,
    .assignment-field,
    .assignment-row-field,
    .assignment-filter-field .input,
    .assignment-filter-field .select,
    .assignment-filter-field input,
    .assignment-filter-field select,
    .assignment-row-field .input,
    .assignment-row-field .select,
    .assignment-row-field input,
    .assignment-row-field select,
    #assignment-group,
    #assignment-presets,
    #assignment-history {
      width: 100%;
      min-width: 0;
      max-width: 100%;
      box-sizing: border-box;
    }

    .mini-note {
      line-height: 1.45;
    }

    .assignment-detail-pre {
      font-size: 12px;
      padding: 12px 14px;
    }

    .view-root {
      min-height: calc(100dvh - 190px);
      padding: 0 0 calc(18px + env(safe-area-inset-bottom, 0px));
    }

    .modal-backdrop {
      align-items: end;
      padding: 10px 10px calc(10px + env(safe-area-inset-bottom, 0px));
    }

    .modal-card {
      width: 100%;
      max-height: min(82dvh, 760px);
      border-radius: 24px 24px 18px 18px;
      padding: 18px 16px 20px;
    }

  }

  @media (max-width: 520px) {
    .mobile-topbar {
      padding-top: calc(14px + env(safe-area-inset-top, 0px));
      padding-left: 12px;
      padding-right: 12px;
    }

    .mobile-route-strip {
      top: calc(73px + env(safe-area-inset-top, 0px));
      padding-left: 10px;
      padding-right: 10px;
    }

    .workspace {
      padding-left: 10px;
      padding-right: 10px;
    }

    .workspace-header {
      padding: 14px;
    }

    .summary-number {
      font-size: 22px;
    }

    .mobile-utility-sheet {
      left: 10px;
      right: 10px;
    }
  }
}
