/*
 * HVR Daily Safety & Cleanliness Audit System — approved design system.
 *
 * This stylesheet is the APPROVED REFERENCE VERSION, copied byte-for-byte from
 * HVR_Daily_Safety_Audit_System.html. Every token in §28 of the specification —
 * the brand and semantic palettes, the Archivo / IBM Plex pairing, the 4px
 * spacing scale, the radii, the shadows and the condition strip — lives here
 * unchanged. Do not restyle it as part of a backend change.
 */

    :root {
      /* Brand Palette v2.0 */
      --brand-900: #052229;
      --brand-800: #082C36;
      --brand-700: #0B3C48;
      --brand-600: #0F5265;
      --brand-500: #14697D;
      --brand-400: #2E8DA3;
      --brand-300: #7FB4C2;
      --brand-100: #CFE2E7;
      --brand-050: #EDF4F6;

      /* Semantic Status Palette */
      --ok: #1F7A4C;
      --ok-bg: #E8F4EE;
      --ok-border: #BFDFCE;
      --minor: #B47905;
      --minor-bg: #FBF2DE;
      --minor-border: #EBD5A2;
      --major: #C9551A;
      --major-bg: #FBEADF;
      --major-border: #EFC7AA;
      --critical: #B3151F;
      --critical-bg: #FAE5E6;
      --critical-border: #EEBEC1;
      --na: #6E7F86;
      --na-bg: #EFF2F3;
      --na-border: #D9E0E2;

      /* Neutral Ramp */
      --paper: #F4F6F7;
      --card: #FFFFFF;
      --card-2: #FAFBFC;
      --card-3: #F1F4F5;
      --line: #E2E7E9;
      --line-2: #CFD8DB;
      --line-3: #EDF0F1;
      --ink: #101B1F;
      --ink-2: #41545B;
      --ink-3: #6D8189;
      --ink-4: #94A6AC;

      /* Typography Tokens */
      --font-display: 'Archivo', -apple-system, BlinkMacSystemFont, sans-serif;
      --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
      --font-mono: 'IBM Plex Mono', monospace, Consolas, Courier;

      /* Radii & Shadows */
      --r-xs: 4px;
      --r-sm: 6px;
      --r: 8px;
      --r-lg: 10px;
      --r-xl: 14px;
      --sh-1: 0 1px 3px rgba(5,34,41,0.06);
      --sh-2: 0 4px 14px rgba(5,34,41,0.09);
      --sh-3: 0 12px 30px rgba(5,34,41,0.14);
    }

    * { box-sizing: border-box; margin: 0; padding: 0; }

    body {
      font-family: var(--font-body);
      font-size: 13.5px;
      line-height: 1.55;
      color: var(--ink);
      background-color: var(--paper);
      font-feature-settings: 'tnum' 1, 'cv02' 1, 'cv03' 1, 'cv04' 1;
      font-variant-numeric: tabular-nums lining-nums;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
      overflow-x: hidden;
    }

    h1, h2, h3, h4, h5, h6, .font-display {
      font-family: var(--font-display);
      font-feature-settings: 'tnum' 1;
      font-variant-numeric: tabular-nums lining-nums;
    }

    .font-mono {
      font-family: var(--font-mono);
      font-variant-numeric: tabular-nums;
      letter-spacing: -0.02em;
    }

    /* Top App Bar */
    #top-nav-bar {
      background: var(--brand-900);
      color: #fff;
      padding: 9px 22px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      position: sticky;
      top: 0;
      z-index: 1000;
      border-bottom: 1px solid rgba(255,255,255,0.08);
    }
    .user-pill {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      background: rgba(255,255,255,0.12);
      padding: 4px 12px;
      border-radius: 20px;
      font-family: var(--font-body);
      font-weight: 500;
      font-size: 12px;
    }

    /* Layout */
    #app-layout {
      display: flex;
      min-height: calc(100vh - 42px);
    }

    /* Desktop Sidebar */
    #sidebar {
      width: 250px;
      background: var(--brand-900);
      color: #fff;
      display: flex;
      flex-direction: column;
      flex-shrink: 0;
      border-right: 1px solid rgba(255,255,255,0.05);
    }
    .sidebar-header {
      padding: 18px 16px;
      border-bottom: 1px solid rgba(255,255,255,0.08);
      display: flex;
      align-items: center;
      gap: 12px;
    }
    .hvr-logo-mark {
      width: 36px;
      height: 36px;
      background: #fff;
      border-radius: var(--r-sm);
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 3px;
    }
    .hvr-logo-text h1 {
      font-family: var(--font-display);
      font-size: 15px;
      font-weight: 700;
      color: #fff;
      line-height: 1.1;
      letter-spacing: -0.2px;
    }
    .hvr-logo-text p {
      font-family: var(--font-display);
      font-size: 9.5px;
      color: var(--brand-300);
      text-transform: uppercase;
      letter-spacing: 0.08em;
      font-weight: 600;
      margin-top: 2px;
    }

    .nav-section-label {
      padding: 14px 14px 4px;
      font-size: 10px;
      font-weight: 700;
      color: var(--ink-4);
      text-transform: uppercase;
      letter-spacing: 0.08em;
      font-family: var(--font-display);
    }
    .nav-item {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 9px 14px;
      color: #CFE2E7;
      text-decoration: none;
      border-radius: var(--r-sm);
      margin: 2px 8px;
      font-family: var(--font-body);
      font-weight: 500;
      font-size: 13px;
      cursor: pointer;
      transition: all 0.15s;
      position: relative;
    }
    .nav-item:hover {
      background: rgba(255,255,255,0.06);
      color: #fff;
    }
    .nav-item.active {
      background: var(--brand-700);
      color: #fff;
      font-weight: 600;
    }
    .nav-item.active::before {
      content: '';
      position: absolute;
      left: -8px;
      top: 4px;
      bottom: 4px;
      width: 3px;
      background: var(--brand-300);
      border-radius: 2px;
    }
    .nav-item .badge {
      margin-left: auto;
      background: var(--critical);
      color: #fff;
      font-family: var(--font-mono);
      font-size: 10px;
      padding: 2px 6px;
      border-radius: 10px;
      font-weight: 700;
    }

    /* Main Content Container */
    #main-content {
      flex: 1;
      overflow-y: auto;
      padding: 24px 32px 80px;
      max-width: 1440px;
      margin: 0 auto;
      width: 100%;
    }

    .mobile-shell {
      max-width: 600px;
      margin: 0 auto;
      background: var(--paper);
      min-height: calc(100vh - 120px);
      position: relative;
    }

    /* Cards */
    .card {
      background: var(--card);
      border-radius: var(--r-lg);
      border: 1px solid var(--line);
      box-shadow: var(--sh-1);
      padding: 20px;
      margin-bottom: 20px;
    }
    .card-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 16px;
    }

    /* Page Header */
    .page-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 20px;
    }
    .page-title {
      font-family: var(--font-display);
      font-size: 24px;
      font-weight: 700;
      color: var(--ink);
      line-height: 1.2;
      letter-spacing: -0.025em;
    }
    .page-subtitle {
      font-family: var(--font-body);
      font-size: 13px;
      color: var(--ink-3);
      font-weight: 400;
      margin-top: 3px;
    }

    .section-title {
      font-family: var(--font-display);
      font-size: 15px;
      font-weight: 700;
      color: var(--ink);
      letter-spacing: -0.01em;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .field-label {
      font-family: var(--font-display);
      font-size: 10.5px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      color: var(--ink-3);
      display: block;
      margin-bottom: 6px;
    }

    /* Buttons */
    .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 7px;
      padding: 8px 16px;
      border-radius: var(--r);
      font-family: var(--font-display);
      font-weight: 600;
      font-size: 13px;
      letter-spacing: 0.01em;
      border: 1px solid transparent;
      cursor: pointer;
      transition: all 0.15s ease;
      text-decoration: none;
    }
    .btn-primary {
      background: var(--brand-600);
      color: #fff;
    }
    .btn-primary:hover { background: var(--brand-700); }
    .btn-secondary {
      background: #fff;
      color: var(--ink);
      border-color: var(--line-2);
    }
    .btn-secondary:hover { background: var(--card-3); border-color: var(--ink-3); }
    .btn-danger { background: var(--critical); color: #fff; }
    .btn-success { background: var(--ok); color: #fff; }
    .btn-lg {
      padding: 12px 22px;
      font-size: 14.5px;
      font-weight: 700;
      border-radius: var(--r-lg);
      letter-spacing: -0.01em;
    }
    .btn-sm {
      padding: 5px 11px;
      font-size: 11.5px;
      font-weight: 600;
    }
    .btn-block { width: 100%; }

    /* Hexagon Badges */
    .hex-badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 18px;
      height: 18px;
      clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
      color: #fff;
      font-family: var(--font-display);
      font-weight: 700;
      font-size: 9px;
    }
    .condition-strip {
      display: flex;
      gap: 2px;
      background: #D5DEE1;
      padding: 3px;
      border-radius: var(--r-xs);
      overflow-x: auto;
      max-width: 100%;
    }
    .strip-cell {
      flex: 1;
      min-width: 7px;
      height: 12px;
      border-radius: 2px;
      background: #B9C6CB;
      transition: all 0.2s;
    }
    .strip-cell.active {
      transform: scaleY(1.35);
      box-shadow: 0 0 6px rgba(5,34,41,0.35);
      border: 1px solid #fff;
    }
    .strip-cell.comp { background: var(--ok); }
    .strip-cell.minor { background: var(--minor); }
    .strip-cell.major { background: var(--major); }
    .strip-cell.crit { background: var(--critical); }
    .strip-cell.na { background: var(--na); }

    /* Chips */
    .chip {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding: 3px 8px;
      border-radius: var(--r-xs);
      font-family: var(--font-display);
      font-size: 10.5px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      font-variant-numeric: tabular-nums;
    }
    .chip-comp { background: var(--ok-bg); color: var(--ok); border: 1px solid var(--ok-border); }
    .chip-minor { background: var(--minor-bg); color: var(--minor); border: 1px solid var(--minor-border); }
    .chip-major { background: var(--major-bg); color: var(--major); border: 1px solid var(--major-border); }
    .chip-crit { background: var(--critical-bg); color: var(--critical); border: 1px solid var(--critical-border); }
    .chip-na { background: var(--na-bg); color: var(--na); border: 1px solid var(--na-border); }

    /* KPI Grid & Cards */
    .kpi-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
      gap: 16px;
      margin-bottom: 24px;
    }
    .kpi-card {
      background: var(--card);
      border: 1px solid var(--line);
      border-radius: var(--r-lg);
      padding: 16px 18px;
      box-shadow: var(--sh-1);
    }
    .kpi-label {
      font-family: var(--font-display);
      font-size: 10.5px;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      color: var(--ink-3);
      font-weight: 700;
      margin-bottom: 4px;
    }
    .kpi-value {
      font-family: var(--font-display);
      font-size: 32px;
      font-weight: 700;
      color: var(--ink);
      line-height: 1.05;
      letter-spacing: -0.03em;
      font-variant-numeric: tabular-nums lining-nums;
    }
    .kpi-sub {
      font-family: var(--font-body);
      font-size: 11.5px;
      font-weight: 500;
      color: var(--ink-2);
      margin-top: 5px;
    }

    /* Enterprise Tables */
    .data-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 13px;
    }
    .data-table th {
      background: var(--card-2);
      color: var(--ink-3);
      font-weight: 700;
      text-align: left;
      padding: 11px 14px;
      border-bottom: 1px solid var(--line);
      font-family: var(--font-display);
      font-size: 10.5px;
      text-transform: uppercase;
      letter-spacing: 0.08em;
    }
    .data-table td {
      padding: 12px 14px;
      border-bottom: 1px solid var(--line-3);
      vertical-align: middle;
      font-family: var(--font-body);
      font-weight: 500;
      color: var(--ink);
      font-variant-numeric: tabular-nums lining-nums;
    }
    .data-table tr:hover td {
      background: var(--brand-050);
    }
    .data-table td strong {
      font-weight: 600;
      color: var(--ink);
    }

    /* Critical Banner */
    .crit-banner {
      background: #FDF2F2;
      border: 1px solid #F8D7DA;
      border-left: 5px solid var(--critical);
      padding: 14px 18px;
      border-radius: var(--r-sm);
      margin-bottom: 22px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
    }

    /* Stepper Bar (Auditor Workflow) */
    .stepper-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      position: relative;
      margin-bottom: 22px;
      padding: 0 10px;
    }
    .stepper-bar::before {
      content: '';
      position: absolute;
      top: 14px;
      left: 30px;
      right: 30px;
      height: 2px;
      background: var(--line-2);
      z-index: 1;
    }
    .stepper-step {
      position: relative;
      z-index: 2;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 4px;
    }
    .step-circle {
      width: 28px;
      height: 28px;
      border-radius: 50%;
      background: #fff;
      border: 2px solid var(--line-2);
      color: var(--ink-3);
      display: flex;
      align-items: center;
      justify-content: center;
      font-family: var(--font-display);
      font-weight: 700;
      font-size: 12px;
    }
    .stepper-step.active .step-circle {
      background: var(--major);
      border-color: var(--major);
      color: #fff;
    }
    .stepper-step.done .step-circle {
      background: var(--brand-600);
      border-color: var(--brand-600);
      color: #fff;
    }
    .step-label {
      font-family: var(--font-display);
      font-size: 11px;
      font-weight: 600;
      color: var(--ink-3);
    }
    .stepper-step.active .step-label {
      color: var(--major);
      font-weight: 700;
    }

    /* Mobile Bottom Navigation */
    .mobile-bottom-nav {
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      height: 60px;
      background: #fff;
      border-top: 1px solid var(--line);
      display: flex;
      align-items: center;
      justify-content: space-around;
      z-index: 999;
    }
    .mob-nav-btn {
      display: flex;
      flex-direction: column;
      align-items: center;
      background: none;
      border: none;
      color: var(--ink-3);
      font-size: 10px;
      font-family: var(--font-display);
      font-weight: 600;
      cursor: pointer;
    }
    .mob-nav-btn.active { color: var(--brand-600); }
    .mob-center-btn {
      width: 48px;
      height: 48px;
      border-radius: 50%;
      background: var(--brand-700);
      color: #fff;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      margin-top: -24px;
      border: 3px solid #fff;
      box-shadow: var(--sh-2);
      cursor: pointer;
    }
    .mob-center-btn.resume { background: var(--major); }

    /* Sign In Page Specific Styles */
    .signin-container {
      display: grid;
      grid-template-columns: 1.08fr 0.92fr;
      min-height: 100vh;
      width: 100vw;
    }
    .signin-canvas {
      background: var(--brand-900);
      color: #fff;
      padding: 48px 56px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      position: relative;
      overflow: hidden;
    }
    .signin-canvas::after {
      content: '';
      position: absolute;
      bottom: -60px;
      right: -60px;
      width: 320px;
      height: 320px;
      clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
      background: rgba(20, 105, 125, 0.05);
      border: 2px solid rgba(255,255,255,0.03);
      pointer-events: none;
    }
    .signin-panel {
      background: var(--paper);
      padding: 48px 44px;
      overflow-y: auto;
      display: flex;
      flex-direction: column;
      align-items: center;
    }
    .signin-box {
      background: #fff;
      border: 1px solid var(--line);
      border-radius: var(--r-lg);
      box-shadow: var(--sh-1);
      padding: 24px;
      width: 100%;
      max-width: 420px;
      margin-bottom: 24px;
    }
    .form-input {
      width: 100%;
      padding: 10px 14px;
      border: 1px solid var(--line-2);
      border-radius: var(--r);
      font-size: 13.5px;
      font-family: var(--font-body);
      color: var(--ink);
      outline: none;
      transition: all 0.15s;
    }
    .form-input:focus {
      border-color: var(--brand-500);
      box-shadow: 0 0 0 3px rgba(20, 105, 125, 0.15);
    }

    .acc-card {
      background: #fff;
      border: 1px solid var(--line);
      border-radius: var(--r);
      padding: 11px 14px;
      margin-bottom: 8px;
      cursor: pointer;
      display: flex;
      justify-content: space-between;
      align-items: center;
      transition: all 0.15s;
    }
    .acc-card:hover {
      border-color: var(--brand-500);
      background: var(--brand-050);
    }
    .acc-card.principal {
      background: var(--brand-800);
      color: #fff;
      border-color: var(--brand-700);
      box-shadow: var(--sh-2);
    }
    .acc-card.principal:hover {
      background: var(--brand-700);
    }

    /* Modal Sheet */
    .modal-overlay {
      position: fixed;
      top: 0; left: 0; right: 0; bottom: 0;
      background: rgba(5, 34, 41, 0.55);
      backdrop-filter: blur(2px);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 2000;
      padding: 16px;
    }
    .modal-sheet {
      background: #fff;
      border-radius: var(--r-xl);
      max-width: 580px;
      width: 100%;
      max-height: 90vh;
      overflow-y: auto;
      box-shadow: var(--sh-3);
      padding: 24px;
      animation: slideUp 0.18s ease-out;
      position: relative;
    }
    @keyframes slideUp {
      from { transform: translateY(18px); opacity: 0; }
      to { transform: translateY(0); opacity: 1; }
    }
    .modal-close-btn {
      position: absolute;
      top: 18px;
      right: 18px;
      width: 30px;
      height: 30px;
      border-radius: var(--r-sm);
      border: 1px solid var(--line-2);
      background: #fff;
      color: var(--ink-3);
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      font-size: 15px;
      font-weight: 700;
    }
    .modal-close-btn:hover {
      background: var(--card-3);
      color: var(--ink);
    }

    /* Jump List 47 Button Grid */
    .jump-grid {
      display: grid;
      grid-template-columns: repeat(11, 1fr);
      gap: 6px;
      margin: 18px 0;
    }
    .jump-btn {
      aspect-ratio: 1;
      border-radius: var(--r-sm);
      border: 1px solid var(--line-2);
      background: #fff;
      display: flex;
      align-items: center;
      justify-content: center;
      font-family: var(--font-mono);
      font-size: 11px;
      font-weight: 600;
      color: var(--ink-2);
      cursor: pointer;
      transition: all 0.12s;
    }
    .jump-btn:hover { background: var(--brand-050); border-color: var(--brand-500); }
    .jump-btn.current { border: 2px solid var(--ink); font-weight: 700; }
    .jump-btn.comp { background: var(--ok-bg); border-color: var(--ok-border); color: var(--ok); }
    .jump-btn.minor { background: var(--minor-bg); border-color: var(--minor-border); color: var(--minor); }
    .jump-btn.major { background: var(--major-bg); border-color: var(--major-border); color: var(--major); }
    .jump-btn.crit { background: var(--critical-bg); border-color: var(--critical-border); color: var(--critical); }
    .jump-btn.skipped { background: #F3EDF7; border-color: #E0D3E8; color: #7B4C8D; }

    /* Skip Option Cards */
    .skip-card {
      border: 1px solid var(--line-2);
      border-radius: var(--r);
      padding: 11px 14px;
      margin-bottom: 8px;
      cursor: pointer;
      transition: all 0.15s;
      background: #fff;
    }
    .skip-card:hover {
      border-color: #9B6DB0;
      background: #FAF7FC;
    }
    .skip-card-title {
      font-size: 13px;
      font-weight: 700;
      color: var(--ink);
      display: flex;
      align-items: center;
      gap: 7px;
      font-family: var(--font-display);
    }
    .skip-card-desc {
      font-size: 11.5px;
      color: var(--ink-3);
      margin-top: 2px;
      margin-left: 21px;
    }

    /* Clean Vector Icons */
    .ico {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 16px;
      height: 16px;
      vertical-align: -2px;
    }
    .ico svg {
      width: 100%;
      height: 100%;
      fill: currentColor;
    }

    @media (max-width: 900px) {
      .signin-container { grid-template-columns: 1fr; }
      .signin-canvas { padding: 32px 24px; }
      .signin-panel { padding: 32px 20px; }
      .jump-grid { grid-template-columns: repeat(8, 1fr); }
    }

    @media print {
      #top-nav-bar, #sidebar, .no-print, .mobile-bottom-nav { display: none !important; }
      #main-content { padding: 0 !important; max-width: 100% !important; }
      .form-print-view { box-shadow: none !important; border: none !important; padding: 0 !important; }
    }
  