/* =========================================================
   TransReg — Design System
   Dark navy/graphite surface, green regulatory accent
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&family=Montserrat:wght@400;500;600;700&family=Poppins:wght@400;500;600;700&display=swap');

:root{
  /* Official Seal palette — dark mode */
  --seal-navy:       #18233F;
  --seal-blue:       #364B76;
  --seal-slate:      #7289A9;
  --seal-light:      #C6D6EF;
  --seal-pale:       #ECF4FF;

  --bg:            #18233F;
  --bg-soft:       rgba(32, 48, 82, 0.82);
  --surface:       rgba(94, 127, 191, 0.18);
  --surface-2:     rgba(94, 127, 191, 0.26);
  --surface-hover: rgba(126, 164, 232, 0.24);
  --glass-bg:      rgba(53, 78, 128, 0.28);
  --border:        rgba(198, 214, 239, 0.18);
  --border-soft:   rgba(198, 214, 239, 0.12);

  --text:          #ECF4FF;
  --text-dim:      #C6D6EF;
  --text-faint:    #7289A9;

  --green:         #5eead4;
  --green-bright:  #99f6e4;
  --green-dim:     #2dd4bf;
  --green-glow:    rgba(94, 234, 212, 0.16);

  --accent:        #C6D6EF;
  --accent-bright: #ECF4FF;
  --accent-glow:   rgba(198, 214, 239, 0.2);
  --accent-yellow: #C6D6EF;
  --accent-yellow-glow: rgba(198, 214, 239, 0.15);

  --sidebar-bg:    rgba(24, 35, 63, 0.94);
  --sidebar-nav-idle: rgba(114, 137, 169, 0.22);
  --sidebar-nav-active-bg: linear-gradient(135deg, #7289A9 0%, #364B76 100%);
  --sidebar-nav-active-text: #ECF4FF;

  --blue:          #7289A9;
  --amber:         #f59e0b;
  --red:           #ef4444;
  --purple:        #a78bfa;

  /* Chart & analytics palette — dark mode: full-opacity vivid series */
  --chart-1: #38bdf8;
  --chart-2: #22c55e;
  --chart-3: #fbbf24;
  --chart-4: #fb923c;
  --chart-5: #a78bfa;
  --chart-6: #f87171;
  --chart-7: #2dd4bf;
  --chart-8: #e879f9;
  --chart-primary: #38bdf8;
  --chart-secondary: #22c55e;
  --chart-glow: rgba(56, 189, 248, 0.45);
  --chart-area-opacity: 0.38;

  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 18px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow:    0 8px 24px rgba(0,0,0,.35);
  --shadow-lg: 0 20px 50px rgba(0,0,0,.5);

  --sidebar-w: 340px;
  --topbar-h: 72px;

  --drawer-bg: rgba(24, 35, 63, 0.88);
  --drawer-btn-bg: rgba(114, 137, 169, 0.22);
  --drawer-btn-text: #ECF4FF;
  --drawer-btn-active-bg: #C6D6EF;
  --drawer-btn-active-text: #18233F;

  /* Shared primary action fill — lighter tint of seal slate-blue */
  --btn-primary-gradient: linear-gradient(135deg, #C6D6EF 0%, #B3C6E3 42%, #9BB3D0 100%);
  --btn-primary-gradient-hover: linear-gradient(135deg, #DCE6F5 0%, #C6D6EF 48%, #A8BDDA 100%);
  --btn-primary-text: #18233F;
  --btn-primary-text-shadow: none;
  --btn-primary-border: rgba(54, 75, 118, 0.28);
}

html[data-theme="light"]{
  --bg:            #f1f5f9;
  --bg-soft:       rgba(248, 250, 252, 0.94);
  --surface:       rgba(255, 255, 255, 0.92);
  --surface-2:     rgba(241, 245, 249, 0.96);
  --surface-hover: rgba(226, 232, 240, 0.98);
  --glass-bg:      rgba(255, 255, 255, 0.88);
  --border:        rgba(54, 75, 118, 0.18);
  --border-soft:   rgba(54, 75, 118, 0.12);
  --text:          #0a0f1a;
  --text-dim:      #1e293b;
  --text-faint:    #334155;
  --accent:        #eab308;
  --accent-bright: #ca8a04;
  --accent-glow:   rgba(234,179,8,.15);
  --sidebar-bg:    rgba(255, 255, 255, 0.92);
  --sidebar-nav-idle: rgba(198, 214, 239, 0.42);
  --sidebar-nav-active-bg: linear-gradient(135deg, #C6D6EF 0%, #93b4e0 22%, #5a7ab0 48%, #364B76 72%, #18233F 100%);
  --sidebar-nav-active-text: #ffffff;
  --sidebar-nav-text: #18233F;
  --sidebar-nav-icon: #243352;
  --sidebar-nav-hover-text: #0f172a;

  /* Buttons — same lighter slate-blue primary as dark mode */
  --btn-primary-gradient: linear-gradient(135deg, #C6D6EF 0%, #B3C6E3 42%, #9BB3D0 100%);
  --btn-primary-gradient-hover: linear-gradient(135deg, #DCE6F5 0%, #C6D6EF 48%, #A8BDDA 100%);
  --btn-primary-text: #18233F;
  --btn-primary-text-shadow: none;
  --btn-primary-border: rgba(54, 75, 118, 0.38);
  --btn-secondary-bg: #f8fafc;
  --btn-secondary-border: #18233F;
  --btn-secondary-text: #18233F;

  --drawer-bg: rgba(255, 255, 255, 0.94);
  --drawer-btn-bg: #f8fafc;
  --drawer-btn-text: #18233F;
  --drawer-btn-hover-bg: rgba(198, 214, 239, 0.42);
  --drawer-btn-active-bg: linear-gradient(135deg, #C6D6EF 0%, #93b4e0 22%, #5a7ab0 48%, #364B76 72%, #18233F 100%);
  --drawer-btn-active-text: #ffffff;

  /* Status badges — high-contrast light mode */
  --badge-green-bg: #dcfce7;
  --badge-green-text: #14532d;
  --badge-green-dot: #16a34a;
  --badge-amber-bg: #fef3c7;
  --badge-amber-text: #92400e;
  --badge-amber-dot: #d97706;
  --badge-red-bg: #fee2e2;
  --badge-red-text: #991b1b;
  --badge-red-dot: #dc2626;
  --badge-blue-bg: #dbeafe;
  --badge-blue-text: #1e3a8a;
  --badge-blue-dot: #2563eb;
  --badge-gray-bg: #f1f5f9;
  --badge-gray-text: #334155;
  --badge-gray-dot: #64748b;

  /* Chart & analytics palette — light mode: full-opacity high-contrast series */
  --chart-1: #0284c7;
  --chart-2: #16a34a;
  --chart-3: #ca8a04;
  --chart-4: #ea580c;
  --chart-5: #7c3aed;
  --chart-6: #dc2626;
  --chart-7: #0d9488;
  --chart-8: #c026d3;
  --chart-primary: #0284c7;
  --chart-secondary: #16a34a;
  --chart-glow: rgba(2, 132, 199, 0.35);
  --chart-area-opacity: 0.32;
}

*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  font-family:'Montserrat','Poppins',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
  background:var(--bg);
  color:var(--text);
  -webkit-font-smoothing:antialiased;
  transition: color 0.35s ease, background 0.35s ease;
}

/* ========== SHARED PAGE BACKGROUND (Index + Dashboard) ========== */
.page-bg{
  position:fixed;
  inset:0;
  z-index:0;
  pointer-events:none;
  overflow:hidden;
}
.page-bg-image{
  position:absolute;
  inset:0;
  background-size:cover;
  background-position:center center;
  background-repeat:no-repeat;
  transform:scale(1.06);
  transform-origin:center center;
  transition:filter 0.4s ease, background-image 0.4s ease, transform 0.4s ease;
}
html[data-theme="dark"] .page-bg-image{
  background-image:image-set(
    url('../images/bg/bgbw-1080.webp?v=3847340c17') type('image/webp'),
    url('../images/bg/bgbw-1080.jpg?v=5ced3c181f') type('image/jpeg')
  );
  background-position:center 28%;
  filter:blur(2px);
}
html[data-theme="light"] .page-bg-image{
  background-image:image-set(
    url('../images/bg/bg-1080.webp?v=6aa5e7306c') type('image/webp'),
    url('../images/bg/bg-1080.jpg?v=3dafd49e35') type('image/jpeg')
  );
  background-position:center 28%;
  filter:blur(2px);
  transform:scale(1.08);
}
@media (min-width:768px){
  .page-bg-image{
    transform:scale(1.04);
  }
  html[data-theme="dark"] .page-bg-image,
  html[data-theme="light"] .page-bg-image{
    background-position:center center;
  }
  html[data-theme="dark"] .page-bg-image{
    background-image:image-set(
      url('../images/bg/bgbw-1920.webp?v=9c7dc991f0') type('image/webp'),
      url('../images/bg/bgbw-1920.jpg?v=9d57ff0b79') type('image/jpeg')
    );
  }
  html[data-theme="light"] .page-bg-image{
    background-image:image-set(
      url('../images/bg/bg-1920.webp?v=c3db7629f2') type('image/webp'),
      url('../images/bg/bg-1920.jpg?v=b229ebeb7d') type('image/jpeg')
    );
    transform:scale(1.04);
  }
}
.page-bg-overlay{
  position:absolute;
  inset:0;
  transition:background 0.4s ease;
}
html[data-theme="dark"] .page-bg-overlay{
  background:
    linear-gradient(180deg, rgba(24,35,63,0.62) 0%, rgba(24,35,63,0.78) 42%, rgba(24,35,63,0.94) 100%),
    linear-gradient(135deg, rgba(54,75,118,0.28), transparent 55%);
}
html[data-theme="light"] .page-bg-overlay{
  background:
    linear-gradient(180deg, rgba(255,255,255,0.68) 0%, rgba(255,255,255,0.74) 45%, rgba(255,255,255,0.80) 100%);
}
@media (max-width:767.98px){
  html[data-theme="dark"] .page-bg-overlay{
    background:
      linear-gradient(180deg, rgba(24,35,63,0.72) 0%, rgba(24,35,63,0.84) 48%, rgba(24,35,63,0.96) 100%),
      linear-gradient(135deg, rgba(54,75,118,0.22), transparent 60%);
  }
  html[data-theme="light"] .page-bg-overlay{
    background:
      linear-gradient(180deg, rgba(255,255,255,0.74) 0%, rgba(255,255,255,0.80) 48%, rgba(255,255,255,0.88) 100%);
  }
}

/* Official transparent logo — no background, no crop */
.brand-logo{
  display:block;
  width:auto;
  height:auto;
  max-width:100%;
  object-fit:contain;
  background:none !important;
  border:none;
  box-shadow:none;
  border-radius:0;
  padding:0;
}
.official-seal{
  background:transparent !important;
}
html[data-theme="dark"] .sidebar-seal.official-seal,
html[data-theme="dark"] .sidebar-head .official-seal{
  mix-blend-mode:screen;
}
html[data-theme="light"] .sidebar-seal.official-seal,
html[data-theme="light"] .sidebar-head .official-seal{
  mix-blend-mode:multiply;
}
html[data-theme="dark"] .hero-logo-seal.official-seal{
  mix-blend-mode:screen;
}
html[data-theme="light"] .hero-logo-seal.official-seal{
  mix-blend-mode:multiply;
}
.sidebar-head .brand-logo,
.sidebar-head .sidebar-seal{
  max-height:120px;
  margin:0 auto;
}
.sidebar-head .sidebar-seal{
  max-height:108px;
}
.brand-logo-sm{
  max-height:48px;
  flex-shrink:0;
}
.topbar-brand .brand-logo-tdfro{
  max-height:100%;
  max-width:100%;
  width:100%;
  height:100%;
  object-fit:contain;
  object-position:center;
}
.tdfro-logo .brand-logo{
  max-height:68px;
}
.agency-logo{
  display:block;
  max-width:100%;
  height:auto;
  object-fit:contain;
  background:none !important;
}
a{ color:inherit; text-decoration:none; }
button{ font-family:inherit; }
ul{ list-style:none; margin:0; padding:0; }

::-webkit-scrollbar{ width:10px; height:10px; }
::-webkit-scrollbar-track{ background:transparent; }
::-webkit-scrollbar-thumb{ background:var(--surface-2); border-radius:10px; border:2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover{ background:var(--border); }

:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; border-radius:4px; }

@media (prefers-reduced-motion: reduce){
  *{ animation-duration:.001ms !important; transition-duration:.001ms !important; }
}

/* ---------- Utility ---------- */
.mono{ font-variant-numeric:tabular-nums; font-feature-settings:"tnum"; }
.text-dim{ color:var(--text-dim); }
.text-faint{ color:var(--text-faint); }
.hidden{ display:none !important; }

/* =========================================================
   ROLE SELECTION PAGE
   ========================================================= */
.select-page{
  min-height:100vh;
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:center;
  padding:56px 24px 80px;
  overflow:hidden;
  background:
    radial-gradient(1100px 600px at 15% -10%, rgba(34,197,94,.14), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(59,130,246,.08), transparent 55%),
    var(--bg);
}
.select-page::before{
  content:"";
  position:absolute; inset:0;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size:44px 44px;
  mask-image:radial-gradient(circle at 50% 0%, black, transparent 75%);
  pointer-events:none;
}
.brandmark{
  display:flex; align-items:center; gap:12px;
  position:relative; z-index:1;
  margin-bottom:36px;
}
.brandmark .logo-badge{
  width:44px;height:44px;border-radius:12px;
  background:linear-gradient(145deg,var(--green),#0e8a41);
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 6px 20px rgba(34,197,94,.35);
  flex-shrink:0;
}
.brandmark .logo-badge svg{ width:24px;height:24px; }
.brandmark-text{ line-height:1.15; }
.brandmark-text b{ font-size:19px; letter-spacing:.2px; }
.brandmark-text span{ display:block; font-size:11px; color:var(--text-faint); letter-spacing:.5px; text-transform:uppercase; }

.select-hero{
  position:relative; z-index:1;
  text-align:center;
  max-width:680px;
  margin-bottom:44px;
}
.select-hero .eyebrow{
  display:inline-flex; align-items:center; gap:8px;
  font-size:12px; font-weight:600; letter-spacing:.6px; text-transform:uppercase;
  color:var(--green-bright);
  background:var(--green-glow);
  border:1px solid rgba(34,197,94,.3);
  padding:6px 14px; border-radius:999px;
  margin-bottom:20px;
}
.select-hero .eyebrow .dot{ width:6px;height:6px;border-radius:50%;background:var(--green-bright); box-shadow:0 0 8px var(--green-bright); }
.select-hero h1{
  font-size:clamp(28px,4.4vw,44px);
  line-height:1.12;
  margin:0 0 14px;
  letter-spacing:-.02em;
  font-weight:700;
}
.select-hero h1 em{ color:var(--green-bright); font-style:normal; }
.select-hero p{ color:var(--text-dim); font-size:16px; line-height:1.6; margin:0; }

.role-grid{
  position:relative; z-index:1;
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:18px;
  width:100%;
  max-width:1180px;
}
@media (max-width:1080px){ .role-grid{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:600px){ .role-grid{ grid-template-columns:1fr; } }

.role-card{
  position:relative;
  background:linear-gradient(180deg,var(--surface),var(--bg-soft));
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  padding:26px 22px 24px;
  text-align:left;
  cursor:pointer;
  transition:transform .22s ease, border-color .22s ease, box-shadow .22s ease, background .22s ease;
  display:flex; flex-direction:column; gap:16px;
  overflow:hidden;
}
.role-card::after{
  content:"";
  position:absolute; inset:0;
  background:linear-gradient(160deg, var(--card-tint,rgba(34,197,94,.09)), transparent 60%);
  opacity:0; transition:opacity .25s ease;
  pointer-events:none;
}
.role-card:hover{
  transform:translateY(-4px);
  border-color:rgba(34,197,94,.4);
  box-shadow:var(--shadow-lg);
}
.role-card:hover::after{ opacity:1; }
.role-card .icon-wrap{
  width:48px;height:48px;border-radius:12px;
  display:flex;align-items:center;justify-content:center;
  background:var(--card-icon-bg,var(--green-glow));
  color:var(--card-icon-color,var(--green-bright));
}
.role-card .icon-wrap svg{ width:24px;height:24px; }
.role-card h3{ margin:0; font-size:17px; font-weight:650; letter-spacing:-.01em; }
.role-card p{ margin:0; font-size:13px; color:var(--text-dim); line-height:1.55; flex:1; }
.role-card .tags{ display:flex; flex-wrap:wrap; gap:6px; }
.role-card .tag{
  font-size:10.5px; padding:4px 9px; border-radius:999px;
  background:var(--surface-2); color:var(--text-dim);
  border:1px solid var(--border-soft);
}
.role-card .enter-row{
  display:flex; align-items:center; justify-content:space-between;
  font-size:12.5px; font-weight:600; color:var(--green-bright);
  padding-top:14px; border-top:1px solid var(--border-soft);
  margin-top:2px;
}
.role-card .enter-row svg{ width:15px;height:15px; transition:transform .2s ease; }
.role-card:hover .enter-row svg{ transform:translateX(3px); }

.select-footnote{
  position:relative; z-index:1;
  margin-top:46px; text-align:center; max-width:640px;
  color:var(--text-faint); font-size:12.5px; line-height:1.7;
}
.select-footnote b{ color:var(--text-dim); }

/* =========================================================
   DASHBOARD SHELL
   ========================================================= */
.app-shell{
  display:flex;
  min-height:100vh;
  position:relative;
  z-index:1;
}

/* ---- Sidebar ---- */
.sidebar{
  width:var(--sidebar-w);
  flex-shrink:0;
  background:var(--sidebar-bg);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
  border-right:1px solid var(--border);
  display:flex;
  flex-direction:column;
  position:fixed;
  top:0;
  left:0;
  bottom:0;
  z-index:40;
  transition:transform 0.25s ease, background 0.35s ease;
}
.sidebar-head{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:16px 16px 10px;
  flex-shrink:0;
}
.sidebar-seal-frame{
  display:flex;
  align-items:center;
  justify-content:center;
  width:min(108px, 70%);
  aspect-ratio:1 / 1;
  max-width:108px;
  overflow:hidden;
  box-sizing:border-box;
}
.sidebar-seal-frame .brand-logo,
.sidebar-seal-frame .sidebar-seal{
  width:100%;
  height:100%;
  max-width:100%;
  max-height:100%;
  object-fit:contain;
  object-position:center;
  margin:0;
}
.sidebar-role{
  margin:4px 14px 10px;
  padding:10px 14px;
  background:rgba(54, 75, 118, 0.35);
  border:1px solid rgba(198, 214, 239, 0.12);
  border-radius:999px;
  display:flex;
  align-items:center;
  gap:10px;
}
html[data-theme="light"] .sidebar-role{
  background:rgba(255,255,255,0.65);
  border-color:rgba(15,23,42,0.08);
}
.sidebar-role .avatar{
  width:32px;height:32px;border-radius:50%;
  background:linear-gradient(135deg,#7289A9,#364B76);
  color:#ECF4FF;
  display:flex;align-items:center;justify-content:center;
  font-weight:700; font-size:12px; flex-shrink:0;
}
html[data-theme="light"] .sidebar-role .avatar{
  background:linear-gradient(135deg,#fde047,#eab308);
  color:#0f172a;
}
.sidebar-role .who{
  min-width:0;
  flex:1;
}
.sidebar-role .who b{
  display:block;
  font-size:12.5px;
  font-weight:600;
  color:var(--text);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.sidebar-role .who span{
  display:block;
  font-size:10.5px;
  color:var(--text-dim);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.sidebar-nav{
  flex:1;
  overflow-y:auto;
  padding:4px 12px 14px;
  scrollbar-width:thin;
}
.nav-group{ margin-bottom:2px; }
.nav-item{
  display:flex;
  align-items:center;
  gap:10px;
  padding:9px 12px;
  margin:2px 0;
  border-radius:10px;
  font-size:12px;
  color:var(--text);
  font-weight:600;
  line-height:1.3;
  letter-spacing:.01em;
  cursor:pointer;
  transition:background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
  position:relative;
  border:none;
  background:transparent;
  width:100%;
  text-align:left;
  min-height:40px;
  box-sizing:border-box;
}
.nav-item-icon{
  flex:0 0 auto;
  width:16px;
  height:16px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.nav-item-label{
  flex:1;
  min-width:0;
  white-space:normal;
  overflow-wrap:anywhere;
  word-break:break-word;
  line-height:1.3;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
}
.nav-item svg{
  width:16px;
  height:16px;
  flex-shrink:0;
  opacity:1;
}
.nav-item:hover{
  background:var(--sidebar-nav-idle);
  color:var(--text);
}
.nav-item.active{
  background:var(--sidebar-nav-active-bg);
  color:var(--sidebar-nav-active-text);
  font-weight:700;
  box-shadow:0 2px 8px rgba(0,0,0,0.14);
}
.nav-item.active svg{ opacity:1; color:var(--sidebar-nav-active-text); }
.drv-photo{width:132px;height:132px;aspect-ratio:1/1;border-radius:10px;object-fit:cover;flex:0 0 auto;border:1px solid var(--border)}
.drv-photo-fallback{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;background:var(--surface-2, rgba(255,255,255,.08));color:var(--text-faint);font-size:11px}
.drv-photo-fallback svg{width:36px;height:36px}
.drv-portal{display:flex;flex-direction:column;gap:16px}
.drv-portal .panel{margin:0}
.drv-portal .section-title{margin:0 0 14px}
.drv-hero{
  display:flex;align-items:center;gap:16px;
  margin-bottom:16px;padding:16px;
  border-radius:var(--radius);
  background:var(--surface-2);
  border:1px solid var(--border-soft);
}
.drv-hero b{display:block;font-size:18px;letter-spacing:-.01em;color:var(--text)}
.drv-hero .text-dim{margin-top:2px}
.drv-profile-sections{display:grid;grid-template-columns:1fr 1fr;gap:0 28px}
.drv-profile-section{padding:16px 0;border-top:1px solid var(--border-soft);min-width:0}
.drv-profile-section h3{margin:0 0 10px;font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--text-faint)}
.drv-profile-section .detail-grid{margin-top:0}
.drv-settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;align-items:start}
.drv-settings-grid > *{min-width:0}
.drv-portal .field input,.drv-portal .field select{width:100%;box-sizing:border-box}
.drv-id-layout{display:grid;grid-template-columns:minmax(280px,460px) minmax(240px,1fr);gap:16px;align-items:start}
.drv-id-frame{display:flex;justify-content:center;overflow:auto}
.drv-id-frame .dac-stage{margin:0}
.drv-portal .field{margin-bottom:12px}
@media (max-width:900px){
  .drv-id-layout,.drv-settings-grid,.drv-profile-sections{grid-template-columns:1fr}
}
@media (max-width:560px){
  .drv-hero{flex-direction:column;align-items:flex-start}
  .drv-portal .detail-grid{grid-template-columns:1fr}
}
.nav-item .badge,
.nav-item .badge-count{
  margin-left:auto;
  flex-shrink:0;
  font-size:9.5px;
  font-weight:700;
  background:var(--red);
  color:#fff;
  padding:2px 7px;
  border-radius:999px;
}
.nav-item .badge::before{ display:none; }
.nav-item.active .badge,
.nav-item.active .badge-count{ background:var(--seal-navy); color:#ECF4FF; }
html[data-theme="light"] .nav-item.active .badge,
html[data-theme="light"] .nav-item.active .badge-count{
  background:rgba(255,255,255,.92);
  color:#18233F;
}

/* Light Mode sidebar navigation */
html[data-theme="light"] .sidebar{
  background:var(--sidebar-bg);
  border-right:1px solid rgba(24,35,63,.12);
  box-shadow:2px 0 18px rgba(24,35,63,.06);
}
html[data-theme="light"] .sidebar-role{
  background:#f8fafc;
  border:1px solid rgba(24,35,63,.12);
}
html[data-theme="light"] .sidebar-role .avatar{
  background:linear-gradient(135deg, #C6D6EF 0%, #364B76 100%);
  color:#ffffff;
}
html[data-theme="light"] .sidebar-role .who b{
  color:#18233F;
  font-weight:700;
}
html[data-theme="light"] .sidebar-role .who span{
  color:#1e293b;
  font-weight:550;
}
html[data-theme="light"] .nav-item{
  color:var(--sidebar-nav-text);
  font-weight:650;
  font-size:12px;
  background:transparent;
}
html[data-theme="light"] .nav-item svg{
  color:var(--sidebar-nav-icon);
  opacity:1;
  stroke-width:2;
}
html[data-theme="light"] .nav-item:hover:not(.active){
  background:var(--sidebar-nav-idle);
  color:var(--sidebar-nav-hover-text);
  box-shadow:none;
  transform:none;
}
html[data-theme="light"] .nav-item:hover:not(.active) svg{
  color:#18233F;
}
html[data-theme="light"] .nav-item.active{
  background:var(--sidebar-nav-active-bg);
  color:var(--sidebar-nav-active-text);
  font-weight:700;
  text-shadow:0 1px 2px rgba(15,23,42,.35);
  box-shadow:0 2px 10px rgba(24,35,63,.18);
  padding:9px 12px;
  min-height:40px;
  transform:none;
}
html[data-theme="light"] .nav-item.active:hover{
  background:var(--sidebar-nav-active-bg);
  color:var(--sidebar-nav-active-text);
  box-shadow:0 2px 10px rgba(24,35,63,.18);
  transform:none;
}
html[data-theme="light"] .nav-item.active svg{
  color:#ffffff;
  opacity:1;
}
html[data-theme="light"] .nav-item:focus-visible{
  outline:2px solid #364B76;
  outline-offset:1px;
}

.sidebar-foot{
  padding:10px 12px 16px;
  flex-shrink:0;
}
.btn-back-role{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:12px 18px;
  border-radius:999px;
  background:rgba(255,255,255,0.92);
  border:1px solid rgba(255,255,255,0.2);
  color:#0f172a;
  font-size:13px;
  font-weight:600;
  cursor:pointer;
  transition:filter 0.15s ease, transform 0.15s ease;
}
html[data-theme="light"] .btn-back-role{
  background:var(--btn-secondary-bg, #f8fafc);
  border:1.5px solid #18233F;
  color:#18233F;
  font-weight:650;
}
.btn-back-role:hover{ filter:brightness(0.97); }
.btn-back-role svg{ width:14px;height:14px; }

/* ---- Role switch drawer (matches landing role drawer) ---- */
.drawer-scrim{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.45);
  z-index:150;
  opacity:0;
  visibility:hidden;
  transition:opacity 0.3s ease, visibility 0.3s ease;
}
.drawer-scrim.show{
  opacity:1;
  visibility:visible;
}
.role-drawer{
  position:fixed;
  top:var(--topbar-h);
  left:0;
  bottom:0;
  width:min(340px, 88vw);
  z-index:160;
  transform:translateX(-100%);
  transition:transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}
.role-drawer.open{
  transform:translateX(0);
}
.role-drawer-panel{
  height:100%;
  background:var(--drawer-bg);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
  padding:28px 22px;
  display:flex;
  flex-direction:column;
  gap:14px;
  border-right:1px solid rgba(255,255,255,.08);
  box-shadow:8px 0 40px rgba(0,0,0,.3);
}
html[data-theme="light"] .role-drawer-panel{
  border-right-color:rgba(15,23,42,.08);
  box-shadow:8px 0 40px rgba(0,0,0,.12);
}
.role-drawer-btn{
  width:100%;
  padding:18px 22px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:var(--drawer-btn-bg);
  color:var(--drawer-btn-text);
  font-family:'Montserrat','Poppins',sans-serif;
  font-size:14px;
  font-weight:600;
  text-align:center;
  cursor:pointer;
  transition:background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  line-height:1.35;
}
html[data-theme="light"] .role-drawer-btn{
  border:1.5px solid rgba(24,35,63,.2);
  font-weight:650;
  min-height:48px;
  padding:12px 18px;
  border-radius:12px;
  transition:background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.role-drawer-btn:hover{
  transform:translateX(4px);
  background:rgba(255,255,255,.2);
}
html[data-theme="light"] .role-drawer-btn:hover:not(.active){
  transform:none;
  background:var(--drawer-btn-hover-bg, rgba(198,214,239,.42));
  color:#0f172a;
  border-color:rgba(24,35,63,.28);
  box-shadow:none;
}
.role-drawer-btn.active{
  background:var(--drawer-btn-active-bg);
  color:var(--drawer-btn-active-text);
  border-color:transparent;
  box-shadow:0 4px 16px rgba(0,0,0,.15);
}
html[data-theme="light"] .role-drawer-btn.active{
  border-color:#18233F;
  font-weight:700;
  text-shadow:0 1px 2px rgba(15,23,42,.4);
  box-shadow:0 2px 10px rgba(24,35,63,.2);
}
.role-drawer-btn.active:hover{
  transform:none;
}
html[data-theme="light"] .role-drawer-btn.active:hover{
  background:var(--drawer-btn-active-bg);
  color:#ffffff;
}
.role-drawer-btn-logout{
  margin-top:auto;
}
html[data-theme="light"] .role-drawer-btn-logout:not(.active){
  border-color:rgba(24,35,63,.28);
}

@media (max-width:720px){
  .role-drawer{
    top:var(--topbar-h);
    width:min(300px, 92vw);
  }
}

/* ---- Main column ---- */
.main-col{
  flex:1;
  margin-left:var(--sidebar-w);
  display:flex;
  flex-direction:column;
  min-height:100vh;
  position:relative;
  z-index:1;
  transition:margin-left 0.25s ease;
}
@media (min-width:961px){
  html.sidebar-collapsed .sidebar{ transform:translateX(-100%); visibility:hidden; transition:transform 0.25s ease, visibility 0s linear 0.25s, background 0.35s ease; }
  html.sidebar-collapsed .main-col{ margin-left:0; }
  html.sidebar-collapsed .content{ max-width:min(1280px, calc(100% + var(--sidebar-w))); }
}

.topbar{
  --topbar-pad-inline: max(var(--topbar-inline, 24px), env(safe-area-inset-left, 0px)) max(var(--topbar-inline, 24px), env(safe-area-inset-right, 0px));
  height:var(--topbar-h);
  width:100%;
  max-width:100%;
  min-width:0;
  box-sizing:border-box;
  flex-shrink:0;
  display:flex;
  align-items:center;
  gap:16px;
  padding-top:env(safe-area-inset-top, 0px);
  padding-inline:var(--topbar-pad-inline);
  background:var(--sidebar-bg);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
  border-bottom:1px solid var(--border);
  position:sticky;
  top:0;
  z-index:30;
  transition:background 0.35s ease;
}
.topbar-brand{
  display:flex; align-items:center; gap:12px; min-width:0; flex:1 1 auto;
}
.topbar-brand-mark{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:44px;
  height:44px;
  flex:0 0 44px;
  overflow:hidden;
  box-sizing:border-box;
}
.topbar-brand-mark .brand-logo,
.topbar-brand-mark .brand-logo-tdfro{
  width:100%;
  height:100%;
  max-width:100%;
  max-height:100%;
  object-fit:contain;
  object-position:center;
}
.topbar-brand-text{ min-width:0; overflow:hidden; }
.topbar-brand-text b{ display:block; font-family:'Archivo Black','Montserrat',sans-serif; font-size:17px; letter-spacing:.3px; line-height:1.1; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.topbar-brand-text span{ display:block; font-family:'Poppins',sans-serif; font-size:11px; color:var(--text-faint); margin-top:1px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.topbar-theme-btn{
  width:40px;height:40px;border-radius:50%;
  background:var(--surface); border:1px solid var(--border-soft);
  color:var(--text-dim); cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  margin-left:4px;
  transition:background .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.topbar-theme-btn:hover{
  color:var(--text);
  border-color:var(--border);
  background:var(--surface-hover);
  box-shadow:0 2px 8px rgba(0,0,0,.12);
}
.topbar-theme-btn svg{ width:18px;height:18px; transition:color .25s ease, filter .25s ease; }
.topbar-theme-btn:hover svg{ filter:brightness(1.15); }
.hamburger{
  display:flex; flex-shrink:0; background:none; border:1px solid var(--border-soft); border-radius:9999px;
  width:36px;height:36px; align-items:center; justify-content:center; cursor:pointer; color:var(--text-dim);
  transition:background .25s ease, color .25s ease, border-color .25s ease;
}
.hamburger:hover{
  color:var(--text);
  background:var(--surface-hover);
  border-color:var(--border);
}
.hamburger svg{ width:18px;height:18px; }
.topbar .crumb{ font-size:13px; color:var(--text-faint); display:flex; align-items:center; gap:8px; }
.topbar .crumb b{ color:var(--text); font-weight:600; }
.topbar .crumb svg{ width:13px;height:13px; opacity:.5; }

.topbar-search{
  flex:1; max-width:420px;
  display:flex; align-items:center; gap:9px;
  background:var(--surface);
  backdrop-filter:blur(10px);
  border:1px solid var(--border);
  border-radius:999px;
  padding:8px 16px;
  min-width:0;
}
.topbar-search svg{ width:15px;height:15px; color:var(--text-faint); flex-shrink:0; }
.topbar-search input{
  border:none; background:none; outline:none; color:var(--text); font-size:13px; width:100%;
}
.topbar-search input::placeholder{ color:var(--text-faint); }

.topbar-right{ margin-left:auto; display:flex; align-items:center; gap:8px; flex-shrink:0; }
.icon-btn{
  position:relative;
  width:38px;height:38px; border-radius:50%;
  background:var(--surface); border:1px solid var(--border);
  display:flex; align-items:center; justify-content:center;
  color:var(--text-dim); cursor:pointer;
  transition:background .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.icon-btn:hover{
  color:var(--text);
  border-color:var(--border);
  background:var(--surface-hover);
  box-shadow:0 2px 8px rgba(0,0,0,.12);
}
.icon-btn svg{ width:17px;height:17px; transition:color .25s ease, filter .25s ease; }
.icon-btn:hover svg{ filter:brightness(1.2); color:var(--text); }
.icon-btn .dot{
  position:absolute; top:6px; right:6px; width:7px;height:7px; border-radius:50%;
  background:var(--red); border:2px solid var(--bg-soft);
}
.notif-menu{ position:relative; }
:root{
  --notif-row-h: 64px;
  --notif-view-all-w: 72px;
}
.notif-dropdown{
  position:absolute; right:0; top:calc(100% + 8px); z-index:120;
  width:min(400px, calc(100vw - 24px));
  max-height:min(70vh, 560px);
  overflow:auto;
  /* Solid opaque panel — never inherit translucent --surface */
  background:#ffffff;
  border:1px solid rgba(24, 35, 63, 0.16);
  border-radius:12px;
  box-shadow:0 14px 36px rgba(15, 23, 42, .22), 0 2px 8px rgba(15, 23, 42, .08);
  padding:10px 0 0;
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
}
html[data-theme="dark"] .notif-dropdown{
  background:#1a2338;
  border-color:rgba(148, 163, 184, 0.28);
  box-shadow:0 14px 36px rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .25);
}
html[data-theme="light"] .notif-dropdown{
  background:#ffffff;
}
.notif-dropdown-head{
  display:flex; align-items:center; justify-content:space-between; gap:8px;
  padding:4px 14px 10px;
  border-bottom:1px solid var(--border-soft);
}
.notif-dropdown-head b{ font-size:13px; }
.notif-dropdown-count{ font-size:11px; color:var(--text-dim); }
.notif-dropdown-list{ padding:0; }
.notif-dropdown-item{
  --notif-action-slot: 0px;
  display:grid;
  grid-template-columns:minmax(0, 1fr) var(--notif-action-slot);
  align-items:center;
  height:var(--notif-row-h);
  min-height:var(--notif-row-h);
  max-height:var(--notif-row-h);
  box-sizing:border-box;
  padding:0 10px 0 12px;
  color:inherit;
  border-bottom:1px solid var(--border-soft);
  overflow:hidden;
}
.notif-dropdown-item.has-view-all{
  --notif-action-slot: var(--notif-view-all-w);
}
.notif-dropdown-item:hover{ background:var(--surface-hover); }
.notif-dropdown-main{
  display:grid;
  grid-template-columns:10px minmax(0, 1fr) auto;
  align-items:center;
  gap:8px;
  min-width:0;
  height:100%;
  margin:0;
  padding:0;
  border:0;
  background:none;
  color:inherit;
  text-align:left;
  text-decoration:none;
  cursor:pointer;
  font:inherit;
}
.notif-dropdown-main:focus-visible{
  outline:2px solid var(--accent);
  outline-offset:2px;
  border-radius:8px;
}
.notif-unread-dot{
  width:8px;
  height:8px;
  border-radius:50%;
  background:transparent;
  flex-shrink:0;
}
.notif-dropdown-item.is-unread .notif-unread-dot{
  background:var(--green-bright, #4ade80);
}
.notif-dropdown-item.is-unread .notif-title{ font-weight:700; }
.notif-dropdown-copy{
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:2px;
  min-width:0;
}
.notif-dropdown-item .notif-title,
.notif-dropdown-item .notif-preview-text{
  display:block;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  line-height:1.25;
}
.notif-dropdown-item .notif-title{
  font-size:13px;
  margin:0;
}
.notif-dropdown-item .notif-preview-text{
  font-size:12px;
  color:var(--text-dim);
}
.notif-dropdown-item .notif-time{
  font-size:11px;
  color:var(--text-faint);
  margin:0;
  white-space:nowrap;
  flex-shrink:0;
}
.notif-view-all{
  position:relative;
  justify-self:end;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:30px;
  min-height:30px;
  padding:0 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background:var(--surface-2);
  color:var(--text);
  font-size:11.5px;
  font-weight:650;
  cursor:pointer;
  z-index:2;
}
.notif-view-all::before{
  content:"";
  position:absolute;
  inset:-7px;
}
.notif-view-all:focus-visible{
  outline:2px solid var(--accent);
  outline-offset:2px;
}
.notif-view-all[hidden]{ display:none !important; }
.notif-dropdown-empty{ padding:12px 14px; margin:0; }
.notif-dropdown-all{
  display:block; text-align:center; padding:10px 14px;
  font-size:12.5px; font-weight:650; color:var(--chart-primary); text-decoration:none;
  border-top:1px solid var(--border-soft);
}
.notif-dropdown-all:hover{ text-decoration:underline; }
.notif-center .notif-item{
  position:relative;
  align-items:center;
  min-height:112px;
  box-sizing:border-box;
  padding:14px 12px;
  gap:12px;
}
.notif-center .notif-item.has-target{ cursor:pointer; }
.notif-center .notif-item .notif-copy{
  position:relative;
  z-index:1;
  flex:1 1 auto;
  min-width:0;
  width:auto;
}
.notif-center .notif-stretched-link{
  position:absolute;
  inset:0;
  z-index:0;
  border-radius:8px;
}
.notif-center .notif-stretched-link:focus-visible{
  outline:2px solid var(--accent);
  outline-offset:2px;
}
.notif-center .notif-item-actions{
  position:relative;
  z-index:2;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
  flex-shrink:0;
}
.notif-center .notif-item-actions .btn{ flex-shrink:0; }
.notif-center .notif-mark-read-form{ margin:0; }
@media (max-width: 720px){
  .notif-center .notif-item{ flex-direction:column; align-items:stretch; }
  .notif-center .notif-item-actions{ width:100%; }
}
@media (max-width:767.98px){
  .notif-dropdown{
    position:fixed;
    left:0;
    right:0;
    top:var(--topbar-h, 64px);
    width:100%;
    max-width:none;
    z-index:130;
    border-radius:0 0 12px 12px;
    max-height:min(70vh, calc(100vh - var(--topbar-h, 64px)));
    background:#ffffff;
  }
  html[data-theme="dark"] .notif-dropdown{ background:#1a2338; }
}
.profile-chip{
  display:flex; align-items:center; gap:9px;
  padding:6px 12px 6px 6px; border-radius:999px;
  background:var(--surface); border:1px solid var(--border-soft);
  cursor:default; pointer-events:none; user-select:none;
}
.profile-chip:hover,
.profile-chip:focus,
.profile-chip:focus-visible{
  background:var(--surface);
  border-color:var(--border-soft);
  outline:none;
  box-shadow:none;
}
.profile-chip .avatar{
  width:28px;height:28px;border-radius:50%; background:var(--surface-2); color:var(--accent-bright);
  display:flex;align-items:center;justify-content:center; font-size:12px; font-weight:700;
}
.profile-chip span{ font-size:12.5px; font-weight:600; }

.content{
  flex:1;
  /* Spacing applies only to main page content — not the header/topbar */
  padding:
    var(--shell-gutter-y, 20px)
    max(var(--shell-page-inset, 28px), var(--shell-gutter-x, 20px), env(safe-area-inset-right, 0px))
    calc(48px + env(safe-area-inset-bottom, 0px))
    max(var(--shell-page-inset, 28px), var(--shell-gutter-x, 20px), env(safe-area-inset-left, 0px));
  max-width:1280px;
  width:100%;
  margin:0 auto;
  position:relative;
  box-sizing:border-box;
  min-width:0;
}
.app-shell:has(.overlay:not([hidden]):not(.hidden)) .main-col{ z-index:80; }

.page-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:var(--page-head-gap, 14px); margin-bottom:16px; flex-wrap:wrap; }
.page-head h1{ font-size:22px; margin:0 0 4px; letter-spacing:-.01em; color:var(--text); }
.page-head p{ margin:0; color:var(--text-dim); font-size:13.5px; }
.page-head .actions{ display:flex; gap:10px; flex-wrap:wrap; }

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex; align-items:center; gap:8px; justify-content:center;
  padding:10px 18px; border-radius:9999px; font-size:13px; font-weight:650;
  line-height:1.35; min-height:40px;
  cursor:pointer; border:1px solid transparent;
  transition:
    filter .25s ease,
    background .25s ease,
    background-color .25s ease,
    border-color .25s ease,
    box-shadow .25s ease,
    color .25s ease;
  white-space:normal; text-align:center;
}
.btn svg{
  width:15px;height:15px; flex-shrink:0;
  transition:color .25s ease, opacity .25s ease, filter .25s ease;
}
.btn-primary{
  background:var(--btn-primary-gradient);
  color:var(--btn-primary-text);
  border-color:var(--btn-primary-border);
  text-shadow:var(--btn-primary-text-shadow);
  font-weight:700;
  letter-spacing:.01em;
}
.btn-primary svg{
  color:var(--btn-primary-text);
  stroke:currentColor;
  opacity:1;
  flex-shrink:0;
}
html[data-theme="light"] .btn-primary{
  box-shadow:0 2px 10px rgba(24,35,63,.12);
}
.btn-primary:hover{
  background:var(--btn-primary-gradient-hover);
  color:var(--btn-primary-text);
  filter:none;
  box-shadow:0 4px 14px rgba(54,75,118,.22);
}
.btn-primary:hover svg{
  color:var(--btn-primary-text);
  opacity:1;
}
html[data-theme="light"] .btn-primary:hover{
  box-shadow:0 4px 16px rgba(54,75,118,.22);
}
.btn-primary:active{ filter:brightness(.96); }
html[data-theme="light"] .btn-primary:active{ filter:brightness(.96); }
.btn-secondary{ background:var(--surface-2); color:var(--text); border-color:var(--border); }
html[data-theme="light"] .btn-secondary,
html[data-theme="light"] .btn-ghost{
  background:var(--btn-secondary-bg);
  color:var(--btn-secondary-text);
  border:1.5px solid var(--btn-secondary-border);
  font-weight:650;
  letter-spacing:.01em;
  box-shadow:0 1px 2px rgba(24,35,63,.06);
}
html[data-theme="light"] .btn-secondary svg,
html[data-theme="light"] .btn-ghost svg{
  color:var(--btn-secondary-text);
  stroke:currentColor;
  opacity:1;
  flex-shrink:0;
}
.btn-secondary:hover{
  background:var(--surface-hover);
  box-shadow:0 2px 10px rgba(0,0,0,.18);
}
html[data-theme="light"] .btn-secondary:hover,
html[data-theme="light"] .btn-ghost:hover{
  background:rgba(198,214,239,.55);
  border-color:#0f172a;
  color:#0f172a;
  box-shadow:0 2px 10px rgba(24,35,63,.14);
}
html[data-theme="light"] .btn-secondary:hover svg,
html[data-theme="light"] .btn-ghost:hover svg{
  color:#0f172a;
  opacity:1;
}
html[data-theme="light"] .btn-secondary:active,
html[data-theme="light"] .btn-ghost:active{
  background:rgba(198,214,239,.75);
}
.btn-ghost{ background:transparent; color:var(--text-dim); border-color:var(--border-soft); }
.btn-ghost:hover{ color:var(--text); border-color:var(--border); background:var(--surface-2); }
.btn-danger{ background:rgba(239,68,68,.14); color:#fca5a5; border-color:rgba(239,68,68,.3); }
html[data-theme="light"] .btn-danger{
  background:#fee2e2;
  color:#991b1b;
  border:1.5px solid #dc2626;
  font-weight:650;
}
.btn-danger:hover{ background:rgba(239,68,68,.22); box-shadow:0 2px 10px rgba(239,68,68,.2); }
html[data-theme="light"] .btn-danger:hover{
  background:#fecaca;
  color:#7f1d1d;
  border-color:#b91c1c;
  box-shadow:0 2px 10px rgba(185,28,28,.16);
}
.btn-sm{ padding:8px 14px; font-size:12.5px; border-radius:9999px; min-height:36px; }
.btn:disabled,
.btn:disabled:hover{
  opacity:.52;
  cursor:not-allowed;
  filter:none !important;
  box-shadow:none !important;
  background:inherit;
}

/* ---------- Cards / KPI ---------- */
.kpi-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:14px; margin-bottom:26px; }
.kpi-grid-5{ grid-template-columns:repeat(5, minmax(0, 1fr)); }
.kpi-grid-4{ grid-template-columns:repeat(4, minmax(0, 1fr)); }
.kpi-card{
  background:var(--glass-bg);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:17px 18px;
  display:flex;
  flex-direction:column;
  gap:10px;
  min-width:0;
  transition:border-color .15s ease, transform .15s ease;
}
.kpi-card:hover{ border-color:var(--chart-primary); transform:translateY(-3px); box-shadow:0 12px 28px rgba(0,0,0,.25); }
a.kpi-card.is-action{ text-decoration:none; color:inherit; cursor:pointer; }
a.kpi-card.is-action:focus-visible,
button.kpi-card.is-action:focus-visible,
button.track-summary-card.is-action:focus-visible{
  outline:2px solid var(--chart-primary);
  outline-offset:2px;
}
.kpi-card.is-inert,
.kpi-card.is-inert:hover{
  cursor:default;
  transform:none;
  box-shadow:none;
  border-color:var(--border);
}
.kpi-card.is-inert{ pointer-events:none; }
button.kpi-card.is-action,
button.track-summary-card.is-action{
  appearance:none;
  font:inherit;
  color:inherit;
  text-align:left;
  width:100%;
  cursor:pointer;
  background:var(--glass-bg);
}
button.track-summary-card.is-action:hover{ transform:translateY(-2px); }
button.kpi-card.is-action[aria-pressed="true"],
button.track-summary-card.is-action[aria-pressed="true"]{
  border-color:var(--chart-primary);
  box-shadow:inset 0 0 0 1px var(--chart-primary);
}
.kpi-card-modern{
  position:relative; overflow:hidden;
  animation:kpiFadeIn .5s ease both;
  animation-delay:calc(var(--kpi-i, 0) * 0.06s);
}
@keyframes kpiFadeIn{ from{ opacity:0; transform:translateY(12px); } to{ opacity:1; transform:translateY(0); } }
.kpi-shimmer{
  position:absolute; inset:0; background:linear-gradient(105deg,transparent 40%,rgba(255,255,255,.04) 50%,transparent 60%);
  transform:translateX(-100%); animation:kpiShimmer 2.5s ease infinite;
  pointer-events:none;
}
@keyframes kpiShimmer{ to{ transform:translateX(100%); } }
.kpi-icon-glow{ transition:transform .25s ease, box-shadow .25s ease; background:var(--chart-glow) !important; color:var(--chart-primary) !important; }
.kpi-card:hover .kpi-icon-glow{ transform:scale(1.08); box-shadow:0 0 16px var(--chart-glow); }
.kpi-value{ transition:color .2s ease; }
.kpi-card:hover .kpi-value{ color:var(--chart-primary); }
.kpi-trend.up{ color:var(--chart-primary); background:var(--chart-glow); }

.animate-in{ animation:panelSlideIn .55s ease both; }
@keyframes panelSlideIn{ from{ opacity:0; transform:translateY(16px); } to{ opacity:1; transform:none; } }
.dash-refreshing .kpi-card, .dash-refreshing .chart-panel{ opacity:.4; pointer-events:none; transition:opacity .3s ease; }

.dash-charts-row{ margin-bottom:20px; }
.dash-pie-row{ display:flex; flex-wrap:wrap; gap:24px; align-items:flex-start; }
.dash-pie-slot{ flex:1; min-width:min(100%, 280px); }

/* ---------- Modern charts (SVG) ---------- */
.chart-block{ width:100%; }
.chart-header{ margin-bottom:12px; }
.chart-title{ font-size:14px; font-weight:650; color:var(--text); line-height:1.35; }
.chart-subtitle{ font-size:12px; color:var(--text-dim); line-height:1.5; margin-top:4px; }
.chart-legend-title{ font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:var(--text-faint); margin-bottom:8px; }
.chart-axis-x-title{ text-align:center; font-size:11.5px; font-weight:600; color:var(--text-dim); margin-top:6px; }
.chart-axis-y-title{
  writing-mode:vertical-rl; transform:rotate(180deg);
  font-size:11.5px; font-weight:600; color:var(--text-dim);
  text-align:center; flex-shrink:0; padding-right:4px;
}
.chart-bar-y-hint{ font-size:11px; font-weight:600; color:var(--text-faint); margin-bottom:8px; }
.chart-plot-wrap{ display:flex; align-items:stretch; gap:4px; width:100%; }
.chart-svg-box{ position:relative; flex:1; min-width:0; min-height:220px; }
.chart-plot-bg{ fill:var(--surface-2); opacity:.35; }

.chart-panel{ transition:border-color .2s ease, box-shadow .2s ease; overflow:visible; }
.chart-panel:hover{ border-color:var(--chart-primary); box-shadow:0 8px 24px var(--chart-glow); }
.chart-pie-wrap{ display:flex; flex-wrap:wrap; gap:20px; align-items:flex-start; justify-content:center; }
.chart-pie-block .chart-pie-wrap{ justify-content:flex-start; }
.chart-legend-wrap{ flex:1; min-width:140px; }
.chart-pie-svg .pie-center-val{ fill:var(--text); font-size:22px; font-weight:700; font-family:'Montserrat',sans-serif; }
.chart-pie-svg .pie-center-lbl{ fill:var(--text-faint); font-size:10px; font-family:'Montserrat',sans-serif; }
.pie-slice{ cursor:pointer; transition:opacity .2s ease, transform .2s ease; }
.chart-legend{ display:flex; flex-direction:column; gap:6px; }
.legend-item{ display:flex; align-items:center; gap:8px; font-size:12px; color:var(--text-dim); padding:5px 8px; border-radius:6px; cursor:pointer; transition:background .15s ease; }
.legend-item:hover{ background:var(--surface-2); }
.legend-dot{ width:10px; height:10px; border-radius:50%; flex-shrink:0; }
.legend-label{ flex:1; }
.legend-val{ font-weight:700; color:var(--text); font-size:11px; white-space:nowrap; }
.legend-val em{ font-style:normal; font-weight:500; color:var(--text-faint); }

.chart-line-block{ width:100%; }
.chart-line-legend{
  display:flex; flex-wrap:wrap; align-items:center; gap:8px 16px;
  margin-bottom:12px; padding-bottom:10px; border-bottom:1px solid var(--border-soft);
}
.chart-line-legend .chart-legend-title{ margin:0 8px 0 0; }
.chart-legend-item{ display:flex; align-items:center; gap:6px; font-size:11.5px; color:var(--text-dim); font-weight:600; }
.chart-legend-item i{ width:10px; height:10px; border-radius:50%; display:inline-block; flex-shrink:0; }
.chart-line-svg{ width:100%; height:auto; display:block; min-height:200px; }
.chart-grid-line{ stroke:var(--border-soft); stroke-width:1; }
.chart-axis-label{ fill:var(--text-faint); font-size:10px; font-family:'Montserrat',sans-serif; }
.chart-x-tick{ font-size:10.5px; }
.line-path{
  stroke-opacity:1 !important;
  stroke-width:3.25;
  filter:drop-shadow(0 1px 3px rgba(0,0,0,.35));
}
.line-area{ fill-opacity:1; }
.line-dot{
  cursor:pointer;
  transition:r .15s ease;
  stroke:#fff !important;
  stroke-width:2.25 !important;
  stroke-opacity:1 !important;
  fill-opacity:1 !important;
  filter:drop-shadow(0 1px 2px rgba(0,0,0,.35));
}
.line-dot:hover{ r:7; }
html[data-theme="light"] .line-dot{ stroke:#0f172a !important; }
.chart-tooltip{
  position:absolute; pointer-events:none; background:var(--surface); border:1px solid var(--border);
  padding:6px 10px; border-radius:8px; font-size:11px; color:var(--text); opacity:0; transform:translateY(4px);
  transition:opacity .15s ease, transform .15s ease; z-index:5; white-space:nowrap; box-shadow:var(--shadow-sm);
}
.chart-tooltip.show{ opacity:1; transform:none; }

.chart-bars-modern{ display:flex; align-items:flex-end; gap:10px; height:150px; padding-top:8px; }
.cbm-col{ flex:1; display:flex; flex-direction:column; align-items:center; gap:8px; height:100%; justify-content:flex-end; }
.cbm-bar{
  width:100%; max-width:48px; height:var(--h,0); min-height:6px;
  background:var(--c,var(--chart-primary));
  border:1px solid color-mix(in srgb, var(--c, var(--chart-primary)) 80%, #000);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.22), 0 2px 8px color-mix(in srgb, var(--c, var(--chart-primary)) 35%, transparent);
  opacity:1;
  border-radius:6px 6px 0 0; position:relative; transition:height .7s cubic-bezier(.2,.8,.2,1), filter .15s ease;
}
.cbm-bar:hover{ filter:brightness(1.12); }
.cbm-val{ position:absolute; top:-18px; left:0; right:0; text-align:center; font-size:10px; font-weight:700; color:var(--text); }
.cbm-lbl{ font-size:10px; color:var(--text-dim); font-weight:600; }
.chart-legend-item i{
  width:12px !important;
  height:12px !important;
  opacity:1 !important;
  box-shadow:0 0 0 1px rgba(0,0,0,.2);
}

.exec-bar-fill-animated{ transition:width 1s cubic-bezier(.2,.8,.2,1); }
.exec-stage-animated{ animation:panelSlideIn .5s ease both; animation-delay:var(--delay,0); }
.activity-item-hover{ transition:background .15s ease, padding-left .15s ease; border-radius:8px; }
.activity-item-hover:hover{ background:var(--surface-2); padding-left:8px; }
.table-row-hover{ transition:background .12s ease; }
.table-row-hover:hover{ background:var(--surface-2); }
.qa-btn-modern{ transition:transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.qa-btn-modern:hover{ transform:translateY(-2px); border-color:var(--chart-primary); box-shadow:0 6px 16px var(--chart-glow); }

.dash-analytics .activity-dot{ background:var(--chart-primary) !important; }
.dash-analytics .panel h3 svg{ color:var(--chart-primary); }
.exec-analytics .exec-bar-fill{ background:linear-gradient(90deg,var(--chart-2),var(--chart-primary)); }
.exec-analytics .exec-bar-fill-green{ background:linear-gradient(90deg,var(--chart-2),var(--chart-primary)); }
.exec-analytics .exec-bar-fill-amber{ background:linear-gradient(90deg,var(--chart-4),var(--chart-6)); }
.exec-dot-app{ background:var(--chart-primary); }
.exec-dot-ren{ background:var(--chart-secondary); }
.exec-bar-app{ background:var(--chart-primary); opacity:1; }
.exec-bar-ren{ background:var(--chart-secondary); opacity:1; }
.exec-stage-row .exec-stage-head b{ color:var(--chart-primary); }

.kpi-top{ display:flex; align-items:center; justify-content:space-between; }
.kpi-icon{ width:32px;height:32px;border-radius:8px; display:flex;align-items:center;justify-content:center; }
.kpi-icon svg{ width:16px;height:16px; }
.kpi-trend{ font-size:11px; font-weight:700; padding:2px 7px; border-radius:999px; display:flex; align-items:center; gap:3px; }
.kpi-trend svg{ width:10px;height:10px; }

.kpi-trend.down{ color:#fca5a5; background:rgba(239,68,68,.14); }
.kpi-value{ font-size:26px; font-weight:700; letter-spacing:-.02em; overflow-wrap:anywhere; }
.kpi-label{ font-size:12.5px; color:var(--text-dim); overflow-wrap:anywhere; line-height:1.35; }

.section-title{ display:flex; align-items:center; justify-content:space-between; margin:30px 0 14px; }
.section-title h2{ font-size:15.5px; margin:0; font-weight:650; color:var(--text); }

.grid-2{ display:grid; grid-template-columns:1.4fr 1fr; gap:16px; }
.grid-2 > *{ min-width:0; }
@media (max-width:900px){ .grid-2{ grid-template-columns:1fr; } }

.panel{
  background:var(--glass-bg);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:18px 20px;
}

/* =========================================================
   Global glass surfaces (cards / panels / tables)
   ========================================================= */
.panel,
.kpi-card,
.table-wrap,
.driver-mgmt-panel,
.track-column,
.form-card,
.req-panel,
.report-card,
.search-hero,
.search-cat,
.settings-nav,
.doc-verify-item,
.linked-insp-card,
.payment-card,
.review-summary,
.tsir-table-wrap,
.insp-check-item,
.sidebar-role,
.btn-back-role{
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  box-shadow:0 14px 40px rgba(0,0,0,.14);
}

html[data-theme="light"] .panel,
html[data-theme="light"] .kpi-card,
html[data-theme="light"] .table-wrap,
html[data-theme="light"] .driver-mgmt-panel,
html[data-theme="light"] .track-column,
html[data-theme="light"] .form-card,
html[data-theme="light"] .req-panel,
html[data-theme="light"] .report-card,
html[data-theme="light"] .search-hero,
html[data-theme="light"] .search-cat,
html[data-theme="light"] .settings-nav,
html[data-theme="light"] .doc-verify-item,
html[data-theme="light"] .linked-insp-card,
html[data-theme="light"] .payment-card,
html[data-theme="light"] .review-summary,
html[data-theme="light"] .tsir-table-wrap,
html[data-theme="light"] .insp-check-item,
html[data-theme="light"] .sidebar-role,
html[data-theme="light"] .btn-back-role{
  background:rgba(255,255,255,0.94);
  box-shadow:0 14px 40px rgba(2,6,23,.08);
}
.panel h3{ margin:0 0 14px; font-size:14px; font-weight:650; display:flex; align-items:center; gap:8px; color:var(--text); }
.panel h3 svg{ width:16px;height:16px; color:var(--accent-bright); }

.driver-scope-note{
  display:flex;
  align-items:flex-start;
  gap:12px;
  margin:0 0 20px;
  padding:14px 16px;
  border-radius:var(--radius);
  border:1px solid rgba(59,130,246,.28);
  background:rgba(59,130,246,.08);
  color:var(--text);
}
.driver-scope-note svg{
  width:18px;
  height:18px;
  flex-shrink:0;
  margin-top:2px;
  color:#93c5fd;
}
.driver-scope-note strong{
  display:block;
  font-size:13px;
  font-weight:650;
  margin-bottom:2px;
}
.driver-scope-note span{
  display:block;
  font-size:12.5px;
  color:var(--text-dim);
  line-height:1.45;
}
html[data-theme="light"] .driver-scope-note{
  background:rgba(37,99,235,.06);
  border-color:rgba(37,99,235,.2);
}
html[data-theme="light"] .driver-scope-note svg{ color:#2563eb; }

.driver-mgmt-page{ display:flex; flex-direction:column; gap:4px; }
.driver-mgmt-columns{
  display:flex;
  flex-direction:column;
  gap:18px;
  align-items:stretch;
  margin-bottom:8px;
}
.driver-mgmt-panel{
  display:flex;
  flex-direction:column;
  min-height:0;
  width:100%;
  border:1px solid var(--border);
  border-radius:var(--radius);
  background:var(--glass-bg);
  backdrop-filter:blur(12px);
  overflow:hidden;
}
.driver-mgmt-panel-actions{
  display:flex;
  flex-direction:row;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-shrink:0;
}
.driver-mgmt-panel-actions .btn{
  flex-shrink:0;
  white-space:nowrap;
}
.driver-mgmt-panel-actions .track-column-count{
  order:0;
}
.driver-mgmt-panel-actions [data-add-driver-open],
.driver-mgmt-panel-actions #opAddDriverOpen{
  order:1;
}
.driver-mgmt-panel-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:var(--panel-pad-y, 12px) var(--panel-pad-x, 14px) 12px;
  border-bottom:1px solid var(--border);
}
.driver-mgmt-panel-head h2{
  margin:0 0 4px;
  font-size:15px;
  font-weight:650;
  color:var(--text);
}
.driver-mgmt-panel-head p{
  margin:0;
  font-size:12.5px;
  color:var(--text-dim);
  line-height:1.4;
}
.driver-mgmt-filters{
  display:flex;
  flex-wrap:wrap;
  align-items:flex-end;
  gap:10px;
  padding:var(--panel-pad-y, 12px) var(--panel-pad-x, 14px);
  border-bottom:1px solid var(--border);
  background:rgba(255,255,255,.02);
}
html[data-theme="light"] .driver-mgmt-filters{ background:rgba(15,23,42,.02); }
.driver-mgmt-filters label{
  display:flex;
  flex-direction:column;
  gap:5px;
  min-width:260px;
  flex:0 1 320px;
  font-size:11px;
  font-weight:650;
  color:var(--text-dim);
}
.driver-mgmt-filters .select-filter{ width:100%; min-width:240px; }
.driver-mgmt-table{
  flex:1;
  max-height:none;
  overflow-x:auto;
  overflow-y:visible;
  border:0;
  border-radius:0;
  margin:0;
}
.driver-mgmt-table .data-table{
  font-size:13px;
  width:max-content;
  min-width:100%;
}
.driver-mgmt-table .data-table th,
.driver-mgmt-table .data-table td{ padding:12px 14px; white-space:nowrap; }
.driver-mgmt-table .data-table th:last-child,
.driver-mgmt-table .data-table td:last-child{
  position:sticky;
  right:0;
  z-index:2;
  background:var(--surface);
  box-shadow:-8px 0 12px rgba(0,0,0,.12);
}
.driver-mgmt-table .data-table thead th:last-child{
  background:var(--surface-2);
  z-index:3;
}
html[data-theme="light"] .driver-mgmt-table .data-table th:last-child,
html[data-theme="light"] .driver-mgmt-table .data-table td:last-child{
  box-shadow:-8px 0 12px rgba(15,23,42,.08);
}
.op-vio-case-directory{
  overflow-x:auto;
}
.op-vio-case-table{
  width:100% !important;
  min-width:0 !important;
  table-layout:fixed;
}
.op-vio-case-table th,
.op-vio-case-table td{
  white-space:nowrap;
  vertical-align:middle;
  padding:12px 14px;
  overflow:hidden;
  text-overflow:ellipsis;
}
.op-vio-case-table th:nth-child(1),
.op-vio-case-table td:nth-child(1){ width:55%; }
.op-vio-case-table th:nth-child(2),
.op-vio-case-table td:nth-child(2){ width:45%; }
.op-driver-case-table{
  width:100% !important;
  min-width:860px !important;
  table-layout:fixed;
}
.op-compliance-table-wrap{
  overflow-x:auto;
}
.op-compliance-table{
  width:100% !important;
  min-width:0 !important;
  table-layout:fixed;
}
.op-driver-case-table th,
.op-driver-case-table td,
.op-compliance-table th,
.op-compliance-table td{
  white-space:nowrap;
  vertical-align:middle;
  padding:10px 12px;
}
.op-compliance-table th,
.op-compliance-table td{
  overflow:hidden;
  text-overflow:ellipsis;
}
.op-compliance-table th:nth-child(1),
.op-compliance-table td:nth-child(1){ width:22%; } /* name */
.op-compliance-table th:nth-child(2),
.op-compliance-table td:nth-child(2){ width:14%; } /* id */
.op-compliance-table th:nth-child(3),
.op-compliance-table td:nth-child(3){ width:14%; } /* plate */
.op-compliance-table th:nth-child(4),
.op-compliance-table td:nth-child(4){ width:16%; } /* % */
.op-compliance-table th:nth-child(5),
.op-compliance-table td:nth-child(5){ width:16%; } /* status */
.op-compliance-table th:nth-child(6),
.op-compliance-table td:nth-child(6){ width:18%; } /* action */
.op-compliance-table .op-comp-score-cell,
.op-compliance-table td.op-comp-score-cell{
  overflow:visible;
  text-overflow:clip;
  white-space:normal;
}
.op-compliance-table .compliance-score-cell,
.op-compliance-table .cmp-score-cell{
  min-width:0;
  width:100%;
  max-width:none;
  gap:4px;
}
.op-compliance-table .compliance-score-pct,
.op-compliance-table .cmp-score-cell .compliance-detail-pct{
  font-size:12.5px;
  white-space:normal;
  overflow:visible;
  text-overflow:clip;
  line-height:1.25;
  word-break:normal;
  overflow-wrap:anywhere;
}
.op-compliance-table .compliance-bar{
  height:6px;
  margin:0;
  min-width:72px;
}
.op-compliance-table .vio-case-action-col .btn{
  padding:7px 10px;
  font-size:12px;
}
.op-driver-case-table .vio-case-action-col,
.op-compliance-table .vio-case-action-col,
.op-vio-case-table .vio-case-action-col{
  text-align:right !important;
}
.op-driver-case-table thead th.vio-case-action-col,
.op-compliance-table thead th.vio-case-action-col,
.op-vio-case-table thead th.vio-case-action-col{
  text-align:right !important;
}
.op-driver-case-table th:last-child,
.op-driver-case-table td:last-child,
.op-compliance-table th:last-child,
.op-compliance-table td:last-child,
.op-vio-case-table th:last-child,
.op-vio-case-table td:last-child{
  position:static !important;
  box-shadow:none !important;
  background:transparent !important;
}
.op-driver-case-table thead th:last-child,
.op-compliance-table thead th:last-child,
.op-vio-case-table thead th:last-child{
  background:var(--surface-2) !important;
}
html[data-theme="light"] .op-driver-case-table th:last-child,
html[data-theme="light"] .op-driver-case-table td:last-child,
html[data-theme="light"] .op-compliance-table th:last-child,
html[data-theme="light"] .op-compliance-table td:last-child,
html[data-theme="light"] .op-vio-case-table th:last-child,
html[data-theme="light"] .op-vio-case-table td:last-child{
  box-shadow:none !important;
  background:transparent !important;
}
html[data-theme="light"] .op-driver-case-table thead th:last-child,
html[data-theme="light"] .op-compliance-table thead th:last-child,
html[data-theme="light"] .op-vio-case-table thead th:last-child{
  background:#e2e8f0 !important;
}
.vio-row-payable:hover{ background:rgba(56,189,248,.06); }
html[data-theme="light"] .vio-row-payable:hover{ background:rgba(234,179,8,.08); }
.driver-mgmt-table .btn-sm{ padding:8px 12px; font-size:12px; min-width:min-content; }

.vio-reason-section{
  margin-top:18px;
  padding:14px 16px;
  border:1px solid var(--border);
  border-radius:var(--radius);
  background:var(--surface-2);
}
.vio-reason-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:8px;
}
.vio-reason-head h4{
  margin:0;
  font-size:13.5px;
  font-weight:650;
  color:var(--text);
  display:flex;
  align-items:center;
  gap:8px;
}
.vio-reason-head h4 svg{
  width:16px;
  height:16px;
  color:var(--accent-bright);
}
.vio-reason-text{
  margin:0 0 10px;
  font-size:13.5px;
  line-height:1.55;
  color:var(--text);
}
.vio-reason-meta{
  display:flex;
  flex-wrap:wrap;
  gap:14px;
  font-size:12px;
  color:var(--text-dim);
}
.vio-reason-meta b{ color:var(--text); font-weight:650; }

.pay-method-list{ display:flex; flex-direction:column; gap:10px; }
.pay-method-card{
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:12px;
  width:100%;
  text-align:left;
  padding:14px 16px;
  border:1px solid var(--border);
  border-radius:12px;
  background:var(--surface-2);
  color:inherit;
  cursor:pointer;
  font:inherit;
  transition:border-color .15s ease, transform .15s ease;
}
.pay-method-card:hover{
  border-color:rgba(56,189,248,.4);
  transform:translateY(-1px);
}
html[data-theme="light"] .pay-method-card:hover{ border-color:rgba(234,179,8,.45); }
.pay-method-icon{
  width:40px;height:40px;border-radius:10px;
  display:flex;align-items:center;justify-content:center;
  background:var(--accent-glow); color:var(--accent-bright);
}
.pay-method-icon svg{ width:18px;height:18px; }
.pay-method-card b{ display:block; font-size:14px; margin-bottom:2px; }
.pay-method-card span{ display:block; font-size:12px; color:var(--text-dim); }
.pay-method-card.is-selected{
  border-color:var(--green);
  box-shadow:0 0 0 1px var(--green-glow);
  background:color-mix(in srgb, var(--green-glow) 55%, var(--surface-2));
}
.pay-method-card:disabled{
  opacity:.7;
  cursor:default;
  transform:none;
}
.renewal-pay-methods{ margin-top:4px; }
.renewal-pay-actions{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:12px;
  margin-top:16px;
}

.pay-sim-brand{
  font-size:18px;
  font-weight:700;
  margin-bottom:14px;
  color:var(--text);
}
.pay-processing, .pay-success{
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  gap:8px;
  padding:28px 12px;
}
.pay-processing h4, .pay-success h4{ margin:8px 0 0; font-size:18px; color:var(--text); }
.pay-processing p, .pay-success p{ margin:0; color:var(--text-dim); font-size:13.5px; max-width:360px; line-height:1.5; }
.pay-success-icon{
  width:56px;height:56px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  background:var(--green-glow); color:var(--green-bright);
}
.pay-success-icon svg{ width:26px;height:26px; }

/* ---------- Operator Compliance Monitoring ---------- */
.compliance-page{ display:flex; flex-direction:column; gap:4px; }

/* ---------- Field Inspector — Violation Monitoring ---------- */
.violation-monitor-page{ display:flex; flex-direction:column; gap:4px; }
.vio-summary-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:12px;
  margin-top:10px;
}
.insp-vio-stats{
  grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
}
@media (max-width:1000px){
  .vio-summary-grid{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
  .insp-vio-stats{ grid-template-columns:repeat(auto-fit, minmax(200px, 1fr)); }
}
@media (max-width:640px){
  .vio-summary-grid{ grid-template-columns:1fr; }
  .insp-vio-stats{ grid-template-columns:1fr; }
}
.vio-summary-card{
  display:flex;
  align-items:flex-start;
  gap:12px;
  text-align:left;
  text-decoration:none;
  padding:14px 16px;
  border-radius:12px;
  border:1px solid var(--border);
  background:var(--glass-bg);
  color:var(--text);
  cursor:pointer;
  transition:border-color .18s ease, background .18s ease, box-shadow .18s ease;
  min-height:0;
}
.vio-summary-card.is-active{
  border-color:rgba(56,189,248,.55);
  box-shadow:0 0 0 1px rgba(56,189,248,.22);
  background:color-mix(in srgb, var(--glass-bg) 88%, rgba(56,189,248,.14));
}
.vio-summary-card:hover,
.vio-summary-card:focus-visible{
  border-color:rgba(56,189,248,.4);
  box-shadow:0 0 0 1px rgba(56,189,248,.15);
  outline:none;
}
html[data-theme="light"] .vio-summary-card.is-active{
  border-color:#7dd3fc;
  background:#f0f9ff;
  box-shadow:0 0 0 1px rgba(14,165,233,.18);
}
html[data-theme="light"] .vio-summary-card:hover,
html[data-theme="light"] .vio-summary-card:focus-visible{
  border-color:#93b4e0;
  box-shadow:0 4px 14px rgba(24,35,63,.08);
}
.vio-summary-icon{
  width:36px;
  height:36px;
  border-radius:10px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
  background:rgba(56,189,248,.12);
  color:#38bdf8;
}
.vio-summary-icon svg{ width:18px; height:18px; }
.vio-summary-card.tone-green .vio-summary-icon{ background:rgba(34,197,94,.14); color:#4ade80; }
.vio-summary-card.tone-amber .vio-summary-icon{ background:rgba(245,158,11,.14); color:#fbbf24; }
.vio-summary-card.tone-red .vio-summary-icon{ background:rgba(239,68,68,.14); color:#f87171; }
.vio-summary-card.tone-blue .vio-summary-icon{ background:rgba(56,189,248,.12); color:#38bdf8; }
html[data-theme="light"] .vio-summary-card.tone-green .vio-summary-icon{ background:#dcfce7; color:#15803d; }
html[data-theme="light"] .vio-summary-card.tone-amber .vio-summary-icon{ background:#fef3c7; color:#b45309; }
html[data-theme="light"] .vio-summary-card.tone-red .vio-summary-icon{ background:#fee2e2; color:#b91c1c; }
html[data-theme="light"] .vio-summary-card.tone-blue .vio-summary-icon{ background:#dbeafe; color:#1d4ed8; }
.vio-summary-copy{
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width:0;
}
.violation-monitor-page .vio-summary-copy{
  flex:1;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  grid-template-areas:
    "title count"
    "desc count";
  column-gap:12px;
  row-gap:2px;
  align-items:center;
}
.violation-monitor-page .vio-summary-title{ grid-area:title; }
.violation-monitor-page .vio-summary-count{
  grid-area:count;
  font-size:26px;
  align-self:center;
}
.violation-monitor-page .vio-summary-desc{ grid-area:desc; overflow-wrap:anywhere; }
.insp-vio-stats .vio-summary-title,
.insp-vio-stats .vio-summary-desc{ min-width:0; overflow-wrap:anywhere; }
.insp-vio-stats .vio-summary-count{ white-space:nowrap; }
.vio-summary-title{
  font-size:12.5px;
  font-weight:700;
  color:var(--text);
  line-height:1.3;
}
.vio-summary-count{
  font-size:22px;
  font-weight:800;
  line-height:1.15;
  color:var(--text);
}
.vio-summary-desc{
  font-size:11.5px;
  color:var(--text-dim);
  line-height:1.35;
}
.vio-summary-hint{
  margin:14px 2px 0;
  font-size:12.5px;
}
.vio-table-toolbar{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin:8px 0 12px;
}
.vio-table-title{
  margin:10px 0 2px;
  font-size:16px;
  font-weight:750;
  color:var(--text);
}
.violation-monitor-panel{
  background:var(--glass-bg);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:0;
  overflow:hidden;
  width:100%;
  max-width:none;
}
.violation-monitor-table{
  border:none;
  border-radius:0;
  overflow-x:auto;
  width:100%;
}
.vio-case-directory{
  max-width:none;
  background:transparent;
  box-shadow:none;
  border:none;
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
}
.vio-case-table{
  width:100% !important;
  min-width:640px;
  table-layout:fixed;
}
.vio-case-table th,
.vio-case-table td{
  white-space:nowrap;
  vertical-align:middle;
  padding:12px 16px;
  overflow:hidden;
  text-overflow:ellipsis;
}
.vio-case-table th:nth-child(1),
.vio-case-table td:nth-child(1){ width:16%; }
.vio-case-table th:nth-child(2),
.vio-case-table td:nth-child(2){ width:24%; }
.vio-case-table th:nth-child(3),
.vio-case-table td:nth-child(3){ width:26%; }
.vio-case-table th:nth-child(4),
.vio-case-table td:nth-child(4){ width:16%; }
.vio-case-table th:nth-child(5),
.vio-case-table td:nth-child(5){ width:18%; }
.vio-case-action-col{
  text-align:right !important;
  white-space:nowrap;
}
.vio-case-table thead th.vio-case-action-col{
  text-align:right !important;
}
.vio-case-number{
  font-size:13.5px;
  font-weight:700;
  letter-spacing:.02em;
  color:var(--text);
  overflow:visible;
  text-overflow:clip;
}
.vio-case-action-col .btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  font-weight:650;
  white-space:nowrap;
}
.vio-case-action-col .btn svg{
  width:14px;
  height:14px;
}
.vio-case-directory .pagination{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 16px;
  flex-wrap:wrap;
}
.vio-detail-body{
  display:flex;
  flex-direction:column;
  gap:14px;
}
.vio-detail-section{
  padding:12px 14px;
  border:1px solid var(--border-soft);
  border-radius:12px;
  background:var(--surface);
}
.vio-detail-section h4{
  margin:0 0 10px;
  font-size:12.5px;
  font-weight:750;
  letter-spacing:.03em;
  text-transform:uppercase;
  color:var(--text-dim);
}
.vio-detail-section .detail-grid{
  margin-top:0;
}
.detail-grid .dg-item.full{ grid-column:1 / -1; }
.overlay.op-drv-overlay{
  z-index:240;
  padding:16px;
  align-items:flex-start;
  overflow-y:auto;
}
/* Drop-confirm must sit above the driver profile (240). Also uses inline z-index:5000 in Blade. */
.overlay.op-drop-confirm-overlay{
  z-index:5000;
}
.op-drv-modal{
  max-width:720px;
  width:min(720px, 100%);
  max-height:calc(100vh - 32px);
  margin:auto;
  overflow:hidden;
}
.op-drv-modal .modal-body{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
}
.op-drv-modal .modal-head h3{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.op-drv-note{
  margin:12px 0 14px;
  font-size:12.5px;
  color:var(--text-dim);
  line-height:1.45;
}
.op-drv-modal .opm-meter{
  background:rgba(94,234,212,.10);
  border-color:rgba(94,234,212,.22);
}
.op-drv-modal .opm-meter > i,
.op-drv-modal .opm-meter.hold > i,
.op-drv-modal .opm-meter.suspended > i,
.op-drv-modal .opm-meter.inactive > i{
  background:transparent;
}
.op-drv-modal .opm-meter span{
  color:var(--green-bright);
  font-weight:650;
}
.op-drv-modal .opm-meter.hold{
  background:rgba(245,158,11,.12);
  border-color:rgba(245,158,11,.26);
}
.op-drv-modal .opm-meter.hold span{ color:#fbbf24; }
.op-drv-modal .opm-meter.suspended{
  background:rgba(239,68,68,.12);
  border-color:rgba(239,68,68,.26);
}
.op-drv-modal .opm-meter.suspended span{ color:#fca5a5; }
.op-drv-modal .opm-meter.inactive{
  background:rgba(148,163,184,.12);
  border-color:rgba(148,163,184,.22);
}
.op-drv-modal .opm-meter.inactive span{ color:var(--text-dim); }
html[data-theme="light"] .op-drv-modal .opm-meter{
  background:rgba(15,118,110,.10);
  border-color:rgba(15,118,110,.22);
}
html[data-theme="light"] .op-drv-modal .opm-meter span{ color:#0f766e; }
html[data-theme="light"] .op-drv-modal .opm-meter.hold{
  background:rgba(180,83,9,.10);
  border-color:rgba(180,83,9,.24);
}
html[data-theme="light"] .op-drv-modal .opm-meter.hold span{ color:#b45309; }
html[data-theme="light"] .op-drv-modal .opm-meter.suspended{
  background:rgba(185,28,28,.10);
  border-color:rgba(185,28,28,.24);
}
html[data-theme="light"] .op-drv-modal .opm-meter.suspended span{ color:#b91c1c; }
html[data-theme="light"] .op-drv-modal .opm-meter.inactive{
  background:rgba(71,85,105,.08);
  border-color:rgba(71,85,105,.18);
}
html[data-theme="light"] .op-drv-modal .opm-meter.inactive span{ color:#1e293b; }

.compliance-page .track-summary-card:nth-child(1) .track-summary-icon{
  background:rgba(45,212,191,.12);
  color:#5eead4;
}
.compliance-page .track-summary-card:nth-child(2) .track-summary-icon{
  background:var(--green-glow);
  color:var(--green-bright);
}
.compliance-page .track-summary-card:nth-child(3) .track-summary-icon{
  background:rgba(245,158,11,.14);
  color:#fbbf24;
}
.compliance-page .track-summary-card:nth-child(4) .track-summary-icon{
  background:rgba(239,68,68,.14);
  color:#fca5a5;
}
.modal.op-drv-modal.op-comp-modal{ max-width:860px; width:min(860px, 100%); }
.modal.op-drv-modal.op-att-modal{ max-width:1040px; width:min(1040px, 100%); }
.op-comp-modal .vio-detail-section,
.op-att-modal .vio-detail-section{
  background:rgba(15,23,42,.28);
  border-color:var(--border);
}
.op-comp-modal .doc-verify-list{ margin-top:12px; }
.op-comp-modal .doc-verify-item{
  background:rgba(8,15,32,.45);
  border-color:var(--border);
}
.op-att-table{ width:100%; min-width:920px; }
.op-att-table th,
.op-att-table td{
  white-space:normal;
  vertical-align:middle;
  padding:10px 12px;
}
.op-compliance-table .compliance-bar{
  height:7px;
  background:rgba(148,163,184,.16);
}
.op-compliance-table .compliance-bar-fill.tone-green,
.op-drv-modal .compliance-bar-fill.tone-green{ background:#2dd4bf; }
.op-compliance-table .compliance-bar-fill.tone-amber,
.op-drv-modal .compliance-bar-fill.tone-amber{ background:#fbbf24; }
.op-compliance-table .compliance-bar-fill.tone-red,
.op-drv-modal .compliance-bar-fill.tone-red{ background:#f87171; }
.op-drv-modal .compliance-bar.lg{
  height:10px;
  background:rgba(148,163,184,.16);
}
.op-drv-modal .compliance-detail-score{
  background:rgba(8,15,32,.38);
  border:1px solid var(--border-soft);
  border-radius:14px;
  padding:16px 18px;
  margin-bottom:12px;
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
  overflow:visible;
}
.op-drv-modal .compliance-detail-pct{
  font-size:clamp(22px, 6vw, 34px);
  line-height:1.2;
  white-space:normal;
  overflow-wrap:anywhere;
  word-break:normal;
  max-width:100%;
}

/* Record Violation wizard */
.vio-wiz-body{ min-height:360px; }
.vio-wiz-track{ margin-bottom:18px; flex-wrap:wrap; }
.vio-lookup-card[hidden]{ display:none !important; }
.vio-lookup-card,
.vio-penalty-note{
  display:flex;
  align-items:flex-start;
  gap:12px;
  margin-top:14px;
  padding:12px 14px;
  border-radius:12px;
  border:1px solid var(--border-soft);
  background:var(--surface);
}
.vio-lookup-card .vio-lookup-icon,
.vio-penalty-note svg{
  width:18px;
  height:18px;
  flex-shrink:0;
  color:var(--text-dim);
  margin-top:2px;
}
.vio-lookup-card strong,
.vio-penalty-note strong{
  display:block;
  font-size:13px;
  margin-bottom:2px;
  color:var(--text);
}
.vio-lookup-card span,
.vio-penalty-note span{
  font-size:12.5px;
  color:var(--text-dim);
  line-height:1.4;
}
.vio-review-grid{
  display:flex;
  flex-direction:column;
  gap:14px;
}
.vio-review-grid section{
  padding:12px 14px;
  border:1px solid var(--border-soft);
  border-radius:12px;
  background:var(--surface);
}
.vio-review-grid h5{
  margin:0 0 10px;
  font-size:12.5px;
  font-weight:750;
  letter-spacing:.02em;
  text-transform:uppercase;
  color:var(--text-dim);
}
.vio-review-remarks{
  margin:0;
  font-size:13px;
  color:var(--text);
  line-height:1.45;
}
.vio-confirm{
  text-align:center;
  padding:12px 8px 4px;
}
.vio-confirm-icon{
  width:56px;
  height:56px;
  margin:0 auto 12px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(34,197,94,.16);
  color:#4ade80;
}
.vio-confirm-icon svg{ width:28px; height:28px; }
html[data-theme="light"] .vio-confirm-icon{
  background:#dcfce7;
  color:#15803d;
}
.vio-confirm h4{
  margin:0 0 6px;
  font-size:18px;
  color:var(--text);
}
.vio-confirm > p{
  margin:0 0 18px;
  font-size:13px;
  color:var(--text-dim);
}
.vio-confirm-grid{
  text-align:left;
  max-width:560px;
  margin:0 auto;
}

.compliance-summary-row{ margin-top:4px; }
.compliance-score-cell{
  display:flex;
  flex-direction:column;
  gap:6px;
  min-width:120px;
}
.compliance-score-pct{
  font-size:13px;
  font-weight:700;
  color:var(--text);
}
.compliance-bar{
  width:100%;
  height:8px;
  border-radius:999px;
  background:var(--surface-2);
  overflow:hidden;
}
.compliance-bar.lg{ height:12px; margin-top:10px; }
.compliance-bar-fill{
  display:block;
  height:100%;
  border-radius:999px;
  transition:width .25s ease;
}
.compliance-bar-fill.tone-green{ background:linear-gradient(90deg, #22c55e, #4ade80); }
.compliance-bar-fill.tone-amber{ background:linear-gradient(90deg, #f59e0b, #fbbf24); }
.compliance-bar-fill.tone-red{ background:linear-gradient(90deg, #ef4444, #f87171); }

.compliance-detail-score{
  padding:16px;
  border:1px solid var(--border);
  border-radius:var(--radius);
  background:var(--surface-2);
  margin-bottom:8px;
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
  overflow:visible;
}
.compliance-detail-label{
  display:block;
  font-size:12px;
  color:var(--text-dim);
  font-weight:650;
  margin-bottom:4px;
}
.compliance-detail-pct{
  font-size:clamp(22px, 5.5vw, 32px);
  font-weight:700;
  line-height:1.2;
  white-space:normal;
  overflow:visible;
  text-overflow:clip;
  overflow-wrap:anywhere;
  word-break:normal;
  max-width:100%;
}
.compliance-detail-pct.tone-green{ color:var(--green-bright); }
.compliance-detail-pct.tone-amber{ color:#fcd34d; }
.compliance-detail-pct.tone-red{ color:#fca5a5; }

.compliance-checklist{
  display:flex;
  flex-direction:column;
  gap:10px;
  min-width:0;
}
.compliance-check-item{
  display:grid;
  grid-template-columns:auto minmax(0, 1fr);
  gap:12px;
  padding:14px 16px;
  border:1px solid var(--border);
  border-radius:12px;
  background:var(--glass-bg);
  min-width:0;
}
.compliance-check-body{ min-width:0; }
.compliance-check-mark{
  width:34px;height:34px;border-radius:10px;
  display:flex;align-items:center;justify-content:center;
  flex-shrink:0;
}
.compliance-check-mark svg{ width:16px;height:16px; }
.compliance-check-item.state-ok .compliance-check-mark{
  background:var(--green-glow); color:var(--green-bright);
}
.compliance-check-item.state-due .compliance-check-mark{
  background:rgba(245,158,11,.14); color:#fcd34d;
}
.compliance-check-item.state-fail .compliance-check-mark{
  background:rgba(239,68,68,.14); color:#fca5a5;
}
.compliance-check-title-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  margin-bottom:4px;
  flex-wrap:wrap;
}
.compliance-check-title-row > b{
  flex:1 1 140px;
  min-width:0;
  overflow-wrap:anywhere;
  line-height:1.35;
}
.compliance-check-title-row .badge{
  flex:0 0 auto;
  max-width:100%;
  white-space:normal;
  text-align:center;
}
.compliance-check-body p{
  margin:0 0 6px;
  font-size:13px;
  color:var(--text-dim);
  line-height:1.45;
}
.compliance-check-expiry{
  font-size:12px;
  color:var(--text-faint);
}
.compliance-check-expiry b{ color:var(--text-dim); }
@media (max-width:640px){
  .compliance-check-item{
    padding:12px;
    gap:10px;
  }
  .compliance-check-title-row{
    flex-wrap:wrap;
    align-items:flex-start;
  }
  .compliance-detail-score{
    padding:14px 12px;
  }
  .compliance-detail-pct{
    font-size:clamp(20px, 7vw, 28px);
  }
  .op-compliance-table th,
  .op-compliance-table td{
    white-space:normal;
  }
  .op-compliance-table .op-comp-score-cell .cmp-score-cell,
  .op-compliance-table .compliance-score-cell,
  .op-compliance-table .cmp-score-cell{
    max-width:none;
    width:100%;
    min-width:0;
  }
  .op-comp-modal .modal-body,
  .op-comp-modal-light .modal-body{
    overflow-x:auto;
    overflow-y:auto;
    -webkit-overflow-scrolling:touch;
  }
  .op-comp-modal .detail-grid.opm-info-grid,
  .op-comp-modal-light .detail-grid.opm-info-grid{
    grid-template-columns:1fr;
  }
  .op-comp-modal .dg-item,
  .op-comp-modal-light .dg-item{
    min-width:0;
  }
  .op-comp-modal .dg-item b,
  .op-comp-modal-light .dg-item b,
  .op-comp-modal .opm-meter,
  .op-comp-modal-light .opm-meter{
    max-width:100%;
    overflow-wrap:anywhere;
  }
}
tr[data-compliance-id]{ cursor:pointer; }
tr[data-compliance-id]:hover{ background:rgba(56,189,248,.05); }
html[data-theme="light"] tr[data-compliance-id]:hover{ background:rgba(234,179,8,.06); }

/* Fake chart */
.chart-bars{ display:flex; align-items:flex-end; gap:8px; height:150px; padding-top:10px; }
.chart-bars .bar{ flex:1; background:var(--chart-primary); border-radius:5px 5px 0 0; position:relative; min-height:6px; opacity:1; box-shadow:0 2px 8px var(--chart-glow); }
.chart-bars .bar span{ position:absolute; bottom:-20px; left:0; right:0; text-align:center; font-size:10px; color:var(--text-faint); }

/* Executive Analytics */
.exec-kpi-grid{ margin-bottom:24px; grid-template-columns:repeat(5, minmax(0, 1fr)); }
.exec-kpi-grid-stats{ grid-template-columns:repeat(4, minmax(0, 1fr)); }
@media (max-width:1100px){
  .exec-kpi-grid, .exec-kpi-grid-stats{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
}
@media (max-width:640px){
  .exec-kpi-grid, .exec-kpi-grid-stats{ grid-template-columns:1fr; }
}
.exec-chart-legend{ display:flex; gap:18px; margin-bottom:14px; font-size:12px; color:var(--text-dim); }
.exec-dot{ display:inline-block; width:10px; height:10px; border-radius:50%; margin-right:6px; vertical-align:middle; }
.exec-dot-app{ background:var(--accent-bright); }
.exec-dot-ren{ background:var(--green-bright); }
.exec-grouped-bars{ display:flex; align-items:flex-end; gap:12px; height:160px; padding-top:8px; }
.exec-bar-group{ flex:1; display:flex; flex-direction:column; align-items:center; gap:8px; min-width:0; }
.exec-bar-pair{ display:flex; align-items:flex-end; gap:4px; height:130px; width:100%; justify-content:center; }
.exec-bar{ width:14px; border-radius:5px 5px 0 0; min-height:4px; transition:height .3s ease; }
.exec-bar-app{ background:linear-gradient(180deg,var(--accent-bright),var(--accent)); }
.exec-bar-ren{ background:linear-gradient(180deg,var(--green-bright),var(--green-dim)); }
.exec-bar-group > span{ font-size:10px; color:var(--text-faint); }
.exec-stage-list{ display:flex; flex-direction:column; gap:14px; }
.exec-stage-row .exec-stage-head{ display:flex; justify-content:space-between; align-items:center; margin-bottom:6px; font-size:13px; color:var(--text); }
.exec-stage-row .exec-stage-head b{ color:var(--accent-bright); font-size:13px; }
.exec-bar-track{ height:8px; background:var(--surface-2); border-radius:999px; overflow:hidden; border:1px solid var(--border-soft); }
.exec-bar-fill{ height:100%; background:linear-gradient(90deg,var(--chart-2),var(--chart-primary)); border-radius:999px; }
.exec-bar-fill-green{ background:linear-gradient(90deg,var(--green-dim),var(--green-bright)); }
.exec-bar-fill-amber{ background:linear-gradient(90deg,#b45309,#fcd34d); }
.exec-footnote{ margin:16px 0 0; font-size:12.5px; color:var(--text-dim); }
.exec-footnote b{ color:var(--text); }
.exec-split-stats{ display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.exec-split-item{ display:flex; flex-direction:column; gap:6px; padding:12px; background:var(--surface-2); border-radius:var(--radius-sm); border:1px solid var(--border-soft); }
.exec-split-value{ font-size:24px; font-weight:700; color:var(--text); }
.exec-split-label{ font-size:12px; color:var(--text-dim); }
.exec-table-panel{ padding:0; overflow:hidden; }
.exec-table-panel .data-table thead th{ background:var(--surface-2); }
@media (max-width:640px){
  .exec-split-stats{ grid-template-columns:1fr; }
  .exec-grouped-bars{ gap:6px; }
  .exec-bar{ width:10px; }
}

.activity-list{ display:flex; flex-direction:column; gap:2px; }
.activity-item{ display:flex; gap:12px; padding:10px 4px; border-bottom:1px solid var(--border-soft); }
.activity-item:last-child{ border-bottom:none; }
.activity-dot{ width:8px;height:8px;border-radius:50%; margin-top:5px; flex-shrink:0; }
.activity-text{ font-size:12.8px; line-height:1.5; }
.activity-text b{ font-weight:600; }
.activity-time{ font-size:11px; color:var(--text-faint); }

.quick-actions-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(140px,1fr)); gap:10px; }
.qa-btn{
  display:flex; flex-direction:column; align-items:center; gap:8px; text-align:center;
  padding:16px 10px; border-radius:var(--radius-sm);
  background:var(--glass-bg);
  backdrop-filter:blur(10px);
  border:1px solid var(--border);
  cursor:pointer; font-size:12px; font-weight:600; color:var(--text);
}
.qa-btn:hover{ background:var(--surface-hover); border-color:var(--border); }
.qa-btn .qa-icon{ width:34px;height:34px;border-radius:9px; background:var(--green-glow); color:var(--green-bright); display:flex;align-items:center;justify-content:center; }
.qa-btn .qa-icon svg{ width:17px;height:17px; }

/* ---------- Tabs ---------- */
.tabs{ display:flex; gap:4px; border-bottom:1px solid var(--border); margin-bottom:20px; overflow-x:auto; }
.tab-btn{
  padding:10px 16px; font-size:13px; font-weight:600; color:var(--text-dim);
  background:none; border:none; cursor:pointer; white-space:nowrap; text-decoration:none;
  border-bottom:2px solid transparent; margin-bottom:-1px;
  transition:color .25s ease, border-color .25s ease, background .25s ease;
}
.tab-btn:hover{ color:var(--text); background:rgba(114,137,169,.12); }
.tab-btn.active{ color:var(--accent-bright); border-color:var(--accent); }

/* ---------- Toolbar / table ---------- */
.toolbar{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:16px; }
.search-box{
  display:flex; align-items:center; gap:8px; background:var(--surface); border:1px solid var(--border);
  border-radius:9999px; padding:8px 12px; flex:1; min-width:180px; max-width:340px;
}
.search-box svg{ width:15px;height:15px; color:var(--text-faint); }
.search-box input{ border:none; background:none; outline:none; color:var(--text); font-size:13px; width:100%; }
.select-filter{
  background:var(--surface);
  border:1px solid var(--border);
  color:var(--text);
  padding:8px 38px 8px 12px;
  border-radius:9999px;
  font-size:12.5px;
  font-weight:600;
  cursor:pointer;
  width:100%;
  max-width:100%;
  min-height:40px;
  line-height:1.35;
  appearance:none;
  -webkit-appearance:none;
  -moz-appearance:none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text-faint) 50%),
    linear-gradient(135deg, var(--text-faint) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px);
  background-size:6px 6px, 6px 6px;
  background-repeat:no-repeat;
  text-overflow:ellipsis;
  white-space:nowrap;
  overflow:hidden;
}
.select-filter:hover{ border-color:var(--border); color:var(--text); }
.select-filter:focus{
  outline:none;
  border-color:var(--green);
  box-shadow:0 0 0 3px var(--green-glow);
}
.select-filter option{
  color:#0f172a;
  background:#ffffff;
}
html[data-theme="dark"] .select-filter option{
  color:#ECF4FF;
  background:#243352;
}
.toolbar .spacer{ flex:1; }
.chip-actions{ display:flex; gap:8px; flex-wrap:wrap; }
.um-page .chip-actions{ margin-bottom:20px; }
.hist-page .chip-actions{ margin-bottom:16px; }
.hist-page .chip-actions .btn.is-on{
  background:var(--accent-glow); color:var(--accent-bright); border-color:transparent;
}
.hist-filter-row{
  display:flex;
  flex-wrap:wrap;
  align-items:flex-end;
  gap:8px;
  margin:0 0 12px;
}
.op-history-panel .hist-filter-row,
.op-history-filters{
  padding:0 var(--panel-pad-x, 14px) 12px;
  margin:0;
}
.hist-filter-row label{ display:flex; flex-direction:column; gap:4px; font-size:11.5px; color:var(--text-faint); }
.hist-filter-row input[type="date"],
.hist-filter-row .select-filter{
  font:inherit;
  font-size:13px;
  color:var(--text);
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:8px;
  padding:7px 10px;
}
.hist-filter-actions{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.hist-table-wrap{ overflow-x:auto; max-width:100%; }
.hist-table{ table-layout:fixed; width:100%; min-width:1080px; }
.hist-page .data-table th,
.hist-page .data-table td{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; padding:8px 10px; font-size:12.5px; }
.hist-col-dt{ width:138px; }
.hist-col-user{ width:150px; }
.hist-col-role{ width:120px; }
.hist-col-action{ width:220px; }
.hist-col-mod{ width:130px; }
.hist-col-detail{ width:220px; }
.hist-col-src{ width:110px; }
.hist-pager{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-top:12px;
  font-size:12.5px;
  color:var(--text-faint);
}
@media (max-width:720px){
  .hist-filter-row{ flex-direction:column; align-items:stretch; }
}
.um-page .data-table th,
.um-page .data-table td{ white-space:nowrap; }
.um-edit-meta{ margin:0 0 14px; font-size:12.5px; color:var(--text-dim); }
.um-edit-note{ margin:10px 0 0; min-height:1em; font-size:12px; color:var(--text-faint); }
.um-modal-actions{ display:flex; flex-wrap:wrap; gap:8px; margin-top:18px; padding-top:16px; border-top:1px solid var(--border-soft); }
.um-perm-list{ display:flex; flex-direction:column; gap:8px; }
.um-perm-list label{ display:flex; align-items:center; gap:10px; font-size:13.5px; color:var(--text); }
.um-perm-list input{ width:16px; height:16px; accent-color:var(--accent); }
.dam-page .chip-actions{ margin-bottom:16px; }
.dam-page .chip-actions .btn.is-on{
  background:var(--accent-glow); color:var(--accent-bright); border-color:transparent;
}
.dam-page .dam-toolbar{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
}
.dam-page .dam-toolbar .select-filter{ width:auto; min-width:160px; max-width:280px; }
.dam-page .data-table th,
.dam-page .data-table td{ white-space:nowrap; }
.vip-page .vip-toolbar{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
}
.vip-page .vip-toolbar .select-filter{ width:auto; min-width:160px; max-width:280px; }
.vip-page .data-table th,
.vip-page .data-table td{ white-space:nowrap; }
.cmp-page .chip-actions{ margin-bottom:16px; }
.cmp-page .chip-actions .btn.is-on{
  background:var(--accent-glow); color:var(--accent-bright); border-color:transparent;
}
.cmp-page .cmp-toolbar{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
}
.cmp-page .cmp-toolbar .select-filter{ width:auto; min-width:160px; max-width:280px; }
.cmp-page .data-table th,
.cmp-page .data-table td{ white-space:nowrap; }
.cmp-page .table-wrap{ overflow-x:auto; }
.cmp-page .cmp-table{
  table-layout:fixed;
  min-width:1140px;
  width:100%;
}
.cmp-page .cmp-table th,
.cmp-page .cmp-table td{ padding:10px 12px; overflow:hidden; text-overflow:ellipsis; }
.cmp-page .cmp-col-driver{ width:168px; }
.cmp-page .cmp-col-op{ width:168px; }
.cmp-page .cmp-col-plate{ width:118px; }
.cmp-page .cmp-col-count{ width:96px; }
.cmp-page .cmp-col-status{ width:124px; }
.cmp-page .cmp-col-score{ width:180px; }
.cmp-page .cmp-col-act{ width:56px; }
.cmp-page .cmp-operator-table{
  table-layout:fixed;
  width:100%;
  min-width:820px;
}
.cmp-page .cmp-operator-table th,
.cmp-page .cmp-operator-table td{
  padding:12px 16px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  vertical-align:middle;
}
.cmp-page .cmp-col-name{ width:auto; }
.cmp-page .cmp-col-drivers{ width:96px; }
.cmp-page .cmp-col-violations{ width:120px; }
.cmp-page .cmp-operator-table .cmp-col-status{ width:150px; }
.cmp-page .cmp-operator-table .cmp-col-score{ width:200px; }
.cmp-page .cmp-operator-table td:last-child,
.cmp-page .cmp-operator-table th:last-child{ overflow:visible; text-overflow:clip; }
.cmp-page .cmp-operator-table td:has(.cmp-score-cell),
.cmp-page .cmp-table td:has(.cmp-score-cell),
.cmp-page .cmp-table td.op-comp-score-cell,
.cmp-page td.op-comp-score-cell{
  overflow:visible;
  text-overflow:clip;
  white-space:normal;
}
.cmp-page a.row-icon-btn{ text-decoration:none; }
.cmp-page .cmp-toolbar form{ margin:0; }
@media (max-width:720px){
  .cmp-page.dam-operator-drivers-page .page-head{ flex-wrap:wrap; }
  .cmp-page.dam-operator-drivers-page .page-head .actions{ margin-left:0; }
}
#cmpVioOverlay{ z-index:230; }
#cmpStaffPayOverlay{ z-index:270; }
.cmp-vio-row .op-comp-vio-actions{
  display:flex; align-items:center; gap:8px; flex-wrap:wrap;
}
.op-comp-modal-light .row-icon-btn{
  background:#e2e8f0; color:#0f172a; border:1px solid #cbd5e1;
}
.cmp-page .cmp-score-cell{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:4px;
  min-width:0;
  width:100%;
  max-width:100%;
}
.cmp-page .cmp-score-cell .compliance-detail-pct,
.cmp-page .cmp-score-cell .compliance-score-pct{
  font-size:12.5px;
  line-height:1.25;
  white-space:normal;
  overflow:visible;
  text-overflow:clip;
  overflow-wrap:anywhere;
  word-break:normal;
  max-width:100%;
}
.cmp-page .cmp-score-cell .compliance-bar{
  height:6px;
  margin:0;
  width:100%;
  min-width:72px;
}
.um-page .um-toolbar{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
}
.um-page .um-toolbar .select-filter{ width:auto; min-width:160px; max-width:280px; }

.table-wrap{
  background:var(--glass-bg);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  border:1px solid var(--border);
  border-radius:var(--radius);
  overflow-x:auto;
  overflow-y:hidden;
  -webkit-overflow-scrolling:touch;
}
.table-wrap.driver-mgmt-table{
  overflow-x:auto;
  overflow-y:visible;
  max-width:100%;
}
table.data-table{ width:100%; border-collapse:collapse; font-size:13px; }
.data-table thead th{
  text-align:left; padding:12px 16px; font-size:11px; text-transform:uppercase; letter-spacing:.4px;
  color:var(--text-faint); background:var(--surface-2); border-bottom:1px solid var(--border); font-weight:650; white-space:nowrap;
}
.data-table tbody td{ padding:12px 16px; border-bottom:1px solid var(--border-soft); color:var(--text); vertical-align:middle; }
.data-table tbody tr:last-child td{ border-bottom:none; }
.data-table tbody tr:hover{ background:var(--surface-hover); }
.data-table .cell-dim{ color:var(--text-dim); }
.row-actions{ display:flex; gap:6px; justify-content:flex-end; align-items:center; }
.row-actions form{ margin:0; }
.row-icon-btn{
  width:28px;height:28px; border-radius:9999px; background:var(--surface-2); border:1px solid var(--border-soft);
  display:flex; align-items:center; justify-content:center; cursor:pointer; color:var(--text-dim);
  transition:background .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.row-icon-btn:hover{
  color:var(--text);
  border-color:var(--border);
  background:var(--surface-hover);
  box-shadow:0 2px 8px rgba(0,0,0,.12);
}
.row-icon-btn svg{ width:13px;height:13px; transition:color .25s ease, filter .25s ease; }
.row-icon-btn:hover svg{ filter:brightness(1.2); color:var(--text); }

.badge{ display:inline-flex; align-items:center; gap:6px; padding:4px 11px; border-radius:999px; font-size:11.5px; font-weight:700; line-height:1.3; white-space:normal; text-align:center; }
.badge::before{ content:""; width:6px;height:6px;border-radius:50%; flex-shrink:0; }
.badge.b-green{ background:var(--green-glow); color:var(--green-bright); }
.badge.b-green::before{ background:var(--green-bright); }
.badge.b-amber{ background:rgba(245,158,11,.14); color:#fcd34d; }
.badge.b-amber::before{ background:#fcd34d; }
.badge.b-red{ background:rgba(239,68,68,.14); color:#fca5a5; }
.badge.b-red::before{ background:#fca5a5; }
.badge.b-blue{ background:rgba(59,130,246,.14); color:#93c5fd; }
.badge.b-blue::before{ background:#93c5fd; }
.badge.b-gray{ background:var(--surface-2); color:var(--text-dim); }
.badge.b-gray::before{ background:var(--text-faint); }
html[data-theme="light"] .badge.b-green{ background:var(--badge-green-bg); color:var(--badge-green-text); border:1px solid rgba(22,163,74,.22); }
html[data-theme="light"] .badge.b-green::before{ background:var(--badge-green-dot); }
html[data-theme="light"] .badge.b-amber{ background:var(--badge-amber-bg); color:var(--badge-amber-text); border:1px solid rgba(217,119,6,.25); }
html[data-theme="light"] .badge.b-amber::before{ background:var(--badge-amber-dot); }
html[data-theme="light"] .badge.b-red{ background:var(--badge-red-bg); color:var(--badge-red-text); border:1px solid rgba(220,38,38,.22); }
html[data-theme="light"] .badge.b-red::before{ background:var(--badge-red-dot); }
html[data-theme="light"] .badge.b-blue{ background:var(--badge-blue-bg); color:var(--badge-blue-text); border:1px solid rgba(37,99,235,.22); }
html[data-theme="light"] .badge.b-blue::before{ background:var(--badge-blue-dot); }
html[data-theme="light"] .badge.b-gray{ background:var(--badge-gray-bg); color:var(--badge-gray-text); border:1px solid rgba(100,116,139,.22); }
html[data-theme="light"] .badge.b-gray::before{ background:var(--badge-gray-dot); }

.pagination{ display:flex; align-items:center; justify-content:space-between; padding:14px 18px; font-size:12.5px; color:var(--text-dim); flex-wrap:wrap; gap:10px; }
.pg-btns{ display:flex; gap:6px; }
.pg-btn{
  width:30px;height:30px; border-radius:9999px; background:var(--surface-2); border:1px solid var(--border-soft);
  color:var(--text-dim); display:flex;align-items:center;justify-content:center; cursor:pointer; font-size:12px;
  transition:background .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.pg-btn.active{ background:var(--accent-glow); color:var(--accent-bright); border-color:transparent; font-weight:700; }
.pg-btn:hover:not(.active){
  color:var(--text);
  background:var(--surface-hover);
  border-color:var(--border);
  box-shadow:0 2px 8px rgba(0,0,0,.1);
}

.empty-state{ display:flex; flex-direction:column; align-items:center; text-align:center; padding:60px 20px; color:var(--text-dim); }
.empty-state .es-icon{ width:56px;height:56px; border-radius:16px; background:var(--surface-2); display:flex; align-items:center; justify-content:center; margin-bottom:16px; color:var(--text-faint); }
.empty-state .es-icon svg{ width:26px;height:26px; }
.empty-state h4{ margin:0 0 6px; color:var(--text); font-size:15px; }
.empty-state p{ margin:0 0 16px; font-size:13px; max-width:320px; }

/* ---------- Forms ---------- */
.form-card{
  background:var(--glass-bg);
  backdrop-filter:blur(12px);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:24px;
  max-width:760px;
}
.form-grid{ display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.form-grid.single{ grid-template-columns:1fr; }
@media (max-width:640px){ .form-grid{ grid-template-columns:1fr; } }
.field{ display:flex; flex-direction:column; gap:6px; }
.field.full{ grid-column:1/-1; }
.field label{ font-size:12.5px; font-weight:600; color:var(--text-dim); }
.field .hint{ font-size:11px; color:var(--text-faint); }
.field input, .field select, .field textarea{
  background:var(--bg-soft); border:1px solid var(--border); border-radius:9999px; padding:10px 12px;
  color:var(--text); font-size:13px; font-family:inherit; outline:none; width:100%;
}
.field input[type="checkbox"],
.field input[type="radio"],
.field input[type="file"],
.field input[type="range"],
.field input[type="color"]{
  border-radius:8px;
}
.field select{
  padding-right:38px;
  font-weight:600;
  line-height:1.35;
  appearance:none;
  -webkit-appearance:none;
  -moz-appearance:none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text-faint) 50%),
    linear-gradient(135deg, var(--text-faint) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px);
  background-size:6px 6px, 6px 6px;
  background-repeat:no-repeat;
  text-overflow:ellipsis;
}
.field input:focus, .field select:focus, .field textarea:focus{ border-color:var(--green); }
.field textarea{ resize:vertical; min-height:80px; border-radius:12px; }
.upload-box{
  border:1.5px dashed var(--border); border-radius:10px; padding:22px; text-align:center;
  color:var(--text-dim); font-size:12.5px; cursor:pointer; background:var(--bg-soft);
}
.upload-box:hover,
.upload-box.is-dragover{ border-color:var(--green); color:var(--text); }
.upload-box input[type="file"]{ display:none; }
.upload-box svg{ width:22px;height:22px; margin-bottom:8px; color:var(--text-faint); }
.form-actions{ display:flex; gap:10px; justify-content:flex-end; flex-wrap:wrap; margin-top:22px; padding-top:18px; border-top:1px solid var(--border-soft); }
.form-grid + .btn,
.form-grid + .form-actions,
.field + .btn,
.field + .form-actions,
.toggle-row + .btn,
.toggle-row + .form-actions,
.text-dim + .btn,
.form-card > .btn,
.panel > .btn{
  margin-top:22px;
}
.form-card > .btn,
.panel > .btn{
  display:inline-flex;
}
.step-track{ display:flex; align-items:center; gap:8px; margin-bottom:24px; flex-wrap:wrap; }
.step-track .step{ display:flex; align-items:flex-start; gap:8px; font-size:12px; color:var(--text-faint); font-weight:600; min-width:0; }
.step-track .step .num{ width:24px;height:24px;border-radius:50%; background:var(--surface-2); display:flex;align-items:center;justify-content:center; font-size:11px; flex-shrink:0; }
.step-track .step .step-label{ max-width:180px; line-height:1.35; white-space:normal; overflow-wrap:anywhere; }
.step-track .step.done .num{ background:var(--green); color:#04150a; }
.step-track .step.current{ color:var(--text); }
.step-track .step.current .num{ background:var(--green-glow); color:var(--green-bright); border:1px solid var(--green); }
.step-track .line{ flex:1; height:1px; background:var(--border); min-width:16px; align-self:center; }

/* ---------- Franchise / Renewal requirements panel ---------- */
.req-panel{
  background:var(--glass-bg); border:1px solid var(--border); border-radius:var(--radius);
  padding:24px; margin-bottom:22px;
}
.req-panel-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:18px; flex-wrap:wrap; }
.req-kicker{
  font-size:11.5px; font-weight:700; letter-spacing:.06em; text-transform:uppercase;
  color:var(--green-bright); margin-bottom:6px; opacity:1;
}
.req-panel-head h2{ margin:0 0 6px; font-size:20px; font-weight:700; color:var(--text); line-height:1.3; }
.req-panel-head p{ margin:0; font-size:13.5px; color:var(--text-dim); line-height:1.55; max-width:62ch; font-weight:550; }
.role-note{
  font-size:13px; color:var(--text); background:var(--surface-2); border:1px solid var(--border);
  border-radius:10px; padding:12px 14px; margin:0 0 16px; line-height:1.5; font-weight:550;
}
.req-step-track{
  margin-bottom:10px;
  align-items:flex-start;
  flex-wrap:nowrap;
  gap:8px;
  max-width:520px;
  margin-left:auto;
  margin-right:auto;
}
.req-step-track .step{
  flex:1 1 0;
  min-width:0;
  display:flex;
  align-items:flex-start;
  gap:8px;
  color:var(--text-dim);
  font-weight:650;
  font-size:12.5px;
  appearance:none;
  -webkit-appearance:none;
  background:transparent;
  border:none;
  padding:6px 4px;
  cursor:pointer;
  text-align:left;
  font-family:inherit;
  transition:color .25s ease, background .25s ease;
  border-radius:10px;
}
.req-step-track .step:hover{
  color:var(--text);
  background:rgba(114,137,169,.12);
}
.req-step-track .step.done .num{
  background:var(--green);
  color:#04150a;
  border-color:var(--green);
}
.req-step-track .step .num{
  width:28px; height:28px; font-size:12px; font-weight:700;
  color:var(--text); background:var(--surface-2); border:1px solid var(--border);
}
.req-step-track .step .step-label{
  max-width:none;
  width:100%;
  color:inherit;
  font-weight:650;
  line-height:1.4;
  overflow-wrap:break-word;
  white-space:normal;
}
.req-step-track .step.current{ color:var(--text); }
.req-step-track .step.current .num{
  background:var(--green-glow); color:var(--green-bright); border:1px solid var(--green); font-weight:700;
}
.req-step-track .line{
  flex:0 0 18px;
  min-width:18px;
  max-width:28px;
  align-self:flex-start;
  margin-top:13px;
}
@media (max-width: 720px){
  .req-step-track{ flex-wrap:wrap; }
  .req-step-track .step{ flex:1 1 140px; }
  .req-step-track .line{ display:none; }
}
.req-steps-grid{
  display:none;
}
.req-carousel{
  display:flex;
  flex-direction:column;
  gap:8px;
  width:100%;
  max-width:520px;
  margin:0 auto;
}
.req-carousel-viewport{
  width:100%;
  overflow:hidden;
  border-radius:10px;
}
.req-carousel-track{
  display:flex;
  width:100%;
  align-items:flex-start;
  transition:transform .35s cubic-bezier(.22,.7,.25,1);
  will-change:transform;
}
.req-carousel-slide{
  flex:0 0 100%;
  width:100%;
  max-width:100%;
  min-width:100%;
  box-sizing:border-box;
  padding:0;
  display:block;
  height:auto;
  align-self:flex-start;
}
.req-step-card.req-step-slide-card{
  width:100%;
  min-height:0 !important;
  height:auto !important;
  max-height:min(240px, 42vh);
  overflow-y:auto;
  padding:10px 14px !important;
  margin:0;
  flex:none;
  cursor:default;
  pointer-events:auto;
  border-radius:10px;
}
.req-step-slide-card:hover{
  transform:none;
  box-shadow:none;
}
.req-step-slide-card .rsc-top{ margin-bottom:2px; }
.req-step-slide-card .rsc-num{ font-size:10.5px; }
.req-step-slide-card h4{
  margin:0 0 2px !important;
  font-size:13.5px !important;
  line-height:1.3;
}
.req-step-slide-card p{
  margin:0 !important;
  font-size:12px !important;
  line-height:1.35 !important;
}
.req-step-slide-card .req-doc-preview{
  margin:6px 0 0 !important;
  padding-left:16px;
  font-size:11.5px !important;
}
.req-step-slide-card .req-doc-preview li{ margin-bottom:2px; }
.req-step-slide-card .rsc-tags{
  margin-top:6px !important;
  margin-bottom:0;
  gap:5px;
}
.req-step-slide-card .rsc-tag{
  font-size:10.5px;
  padding:3px 8px;
}
.req-carousel-foot{
  display:flex;
  flex-direction:column;
  gap:6px;
  align-items:stretch;
  max-width:520px;
  margin:0 auto;
  width:100%;
}
.req-carousel-dots{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.req-carousel-dot{
  width:10px;
  height:10px;
  border-radius:50%;
  border:1.5px solid var(--border);
  background:var(--surface-2);
  padding:0;
  cursor:pointer;
  transition:background .25s ease, border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}
.req-carousel-dot:hover{
  border-color:var(--chart-primary, var(--green));
  transform:none;
}
.req-carousel-dot.is-active{
  background:var(--chart-primary, var(--green-bright));
  border-color:var(--chart-primary, var(--green));
  box-shadow:0 0 0 3px rgba(56,189,248,.2);
  width:22px;
  border-radius:999px;
}
.req-carousel-nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.req-carousel-status{
  font-size:13px;
  font-weight:700;
  color:var(--text);
  text-align:center;
  flex:1 1 auto;
  min-width:120px;
  opacity:1;
}
.req-carousel-nav .btn{
  min-width:96px;
  min-height:36px;
  padding:6px 12px;
  font-size:12.5px;
}
@media (max-width:720px){
  .req-carousel,
  .req-carousel-foot{
    max-width:100%;
  }
  .req-step-card.req-step-slide-card{
    max-height:min(220px, 40vh);
    padding:8px 12px !important;
  }
}
@media (max-width:560px){
  .req-carousel-nav{
    flex-direction:column;
  }
  .req-carousel-nav .btn{
    width:100%;
    min-width:0;
  }
  .req-step-card.req-step-slide-card{
    max-height:min(200px, 38vh);
    padding:8px 12px !important;
  }
  .req-step-slide-card h4{ font-size:13px !important; }
  .req-step-slide-card p,
  .req-step-slide-card .req-doc-preview{ font-size:11.5px !important; }
}

html[data-theme="light"] .req-carousel-status{
  color:#0a0f1a;
}
html[data-theme="light"] .req-carousel-dot{
  background:#e2e8f0;
  border-color:rgba(24,35,63,.2);
}
html[data-theme="light"] .req-carousel-dot.is-active{
  background:linear-gradient(135deg, #93b4e0, #364B76);
  border-color:#18233F;
  box-shadow:0 0 0 3px rgba(54,75,118,.18);
}
html[data-theme="light"] .req-step-track .step:hover{
  background:rgba(198,214,239,.4);
  color:#0a0f1a;
}
html[data-theme="light"] .req-step-track .step.done .num{
  background:#16a34a;
  color:#ffffff;
  border-color:#15803d;
}
html[data-theme="dark"] .req-carousel-dot.is-active{
  background:#7dd3fc;
  border-color:#38bdf8;
}
.req-step-card{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  height:100%;
  min-height:100%;
  text-align:left;
  background:var(--bg-soft);
  border:1.5px solid var(--border);
  border-radius:12px;
  padding:18px 16px;
  gap:0;
  cursor:pointer;
  color:inherit;
  font:inherit;
  transition:border-color .25s ease, background .25s ease, box-shadow .25s ease;
}
.req-step-card:hover{
  border-color:var(--chart-primary, var(--green));
  box-shadow:0 4px 14px rgba(0,0,0,.12);
  transform:none;
}
.req-step-card:focus-visible{
  outline:2px solid var(--chart-primary, var(--green));
  outline-offset:2px;
}
.rsc-top{ margin-bottom:8px; width:100%; }
.rsc-num{
  display:inline-flex; align-items:center; gap:6px;
  font-size:11.5px; font-weight:700; text-transform:uppercase; letter-spacing:.04em;
  color:var(--green-bright); opacity:1;
}
.req-step-card h4{
  margin:0 0 8px;
  font-size:15px;
  font-weight:700;
  color:var(--text);
  line-height:1.35;
  overflow-wrap:break-word;
  word-break:normal;
  opacity:1;
}
.req-step-card p{
  margin:0;
  font-size:13px;
  font-weight:550;
  color:var(--text-dim);
  line-height:1.5;
  overflow-wrap:break-word;
  opacity:1;
}
.req-doc-preview{
  margin:12px 0 0;
  padding:0 0 0 18px;
  font-size:12.5px;
  font-weight:550;
  color:var(--text);
  line-height:1.45;
  width:100%;
  max-height:none;
  opacity:1;
}
.req-doc-preview li{
  margin-bottom:5px;
  overflow-wrap:break-word;
}
.req-doc-preview li:last-child{ margin-bottom:0; }
.rsc-tags{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:12px;
  margin-bottom:2px;
  width:100%;
}
.rsc-tag{
  display:inline-flex;
  align-items:center;
  margin:0;
  max-width:100%;
  font-size:11.5px;
  font-weight:650;
  color:var(--text);
  background:var(--surface-2);
  border:1px solid var(--border-soft);
  border-radius:999px;
  padding:5px 11px;
  line-height:1.3;
  white-space:normal;
  overflow-wrap:break-word;
  opacity:1;
}
.rsc-hint{
  display:block;
  width:100%;
  margin-top:auto;
  padding-top:14px;
  border-top:1px solid var(--border-soft);
  font-size:12px;
  font-weight:700;
  letter-spacing:.02em;
  color:var(--accent-bright, var(--green-bright));
  text-align:left;
  flex-shrink:0;
  opacity:1;
}
.step-guide-modal .step-guide-kicker{
  font-size:11.5px;
  font-weight:700;
  letter-spacing:.05em;
  text-transform:uppercase;
  color:var(--green-bright);
  margin-bottom:8px;
  opacity:1;
}
.step-guide-intro{
  margin:0 0 8px;
  font-size:14px;
  line-height:1.55;
  color:var(--text);
  font-weight:550;
}
.step-guide-list{
  margin:0;
  padding-left:18px;
  color:var(--text);
  font-size:13.5px;
  line-height:1.55;
  font-weight:550;
}
.step-guide-list li{ margin-bottom:6px; }
.step-guide-docs{ list-style:disc; }
.step-guide-note{
  margin:14px 0 0;
  font-size:13px;
  line-height:1.5;
  color:var(--text-dim);
  font-weight:550;
}
.step-guide-footnote{
  margin:18px 0 0;
  font-size:13px;
  color:var(--text-dim);
  line-height:1.45;
  font-weight:550;
}
.req-panel-guide .req-step-track .step{ cursor:pointer; }
.phase-block{ margin-top:22px; padding-top:18px; border-top:1px solid var(--border-soft); }
.phase-block-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; flex-wrap:wrap; }
.phase-block-head h3{ margin:0; font-size:15px; font-weight:700; color:var(--text); }
.phase-hint{ margin:0 0 12px; font-size:13px; color:var(--text-dim); font-weight:550; line-height:1.45; }
.phase-timeline{ display:flex; flex-direction:column; gap:0; }
.phase-item{
  display:flex; align-items:flex-start; gap:12px; padding:8px 0 8px 4px; position:relative;
  cursor:pointer; border-radius:8px;
}
.phase-item::before{
  content:''; position:absolute; left:9px; top:22px; bottom:-8px; width:2px; background:var(--border);
}
.phase-item:last-child::before{ display:none; }
.phase-dot{
  width:12px; height:12px; border-radius:50%; background:var(--surface-2); border:2px solid var(--border);
  margin-top:3px; flex-shrink:0; position:relative; z-index:1;
}
.phase-label{ font-size:13px; color:var(--text-dim); line-height:1.4; font-weight:550; }
.phase-item.done .phase-dot{ background:var(--green); border-color:var(--green); }
.phase-item.done .phase-label{ color:var(--text); }
.phase-item.current .phase-dot{ background:var(--green-bright); border-color:var(--green); box-shadow:0 0 0 3px var(--green-glow); }
.phase-item.current .phase-label{ color:var(--text); font-weight:700; }
.phase-timeline.compact{ display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:4px 12px; }
.phase-timeline.compact .phase-item::before{ display:none; }

/* Light Mode — Franchise / Renewal cards high contrast */
html[data-theme="light"] .req-panel{
  background:rgba(255,255,255,0.96);
  border-color:rgba(24,35,63,.14);
}
html[data-theme="light"] .req-kicker,
html[data-theme="light"] .rsc-num,
html[data-theme="light"] .step-guide-modal .step-guide-kicker{
  color:#1d4ed8;
}
html[data-theme="light"] .req-panel-head h2,
html[data-theme="light"] .req-step-card h4,
html[data-theme="light"] .phase-block-head h3{
  color:#0a0f1a;
}
html[data-theme="light"] .req-panel-head p,
html[data-theme="light"] .req-step-card p,
html[data-theme="light"] .role-note,
html[data-theme="light"] .phase-hint,
html[data-theme="light"] .step-guide-note,
html[data-theme="light"] .step-guide-footnote{
  color:#1e293b;
}
html[data-theme="light"] .role-note{
  background:#f1f5f9;
  border-color:rgba(24,35,63,.14);
  color:#0a0f1a;
}
html[data-theme="light"] .req-step-card{
  background:#ffffff;
  border-color:rgba(24,35,63,.16);
}
html[data-theme="light"] .req-step-card:hover{
  border-color:#364B76;
  background:#f8fafc;
  box-shadow:0 4px 14px rgba(24,35,63,.12);
  transform:none;
}
html[data-theme="light"] .req-doc-preview,
html[data-theme="light"] .req-doc-preview li,
html[data-theme="light"] .step-guide-list,
html[data-theme="light"] .step-guide-intro{
  color:#0a0f1a;
}
html[data-theme="light"] .rsc-tag{
  background:#f1f5f9;
  border-color:rgba(24,35,63,.16);
  color:#0a0f1a;
}
html[data-theme="light"] .rsc-hint{
  color:#1e3a8a;
  border-top-color:rgba(24,35,63,.12);
}
html[data-theme="light"] .req-step-track .step{
  color:#1e293b;
}
html[data-theme="light"] .req-step-track .step .num{
  background:#e2e8f0;
  color:#0a0f1a;
  border-color:rgba(24,35,63,.18);
}
html[data-theme="light"] .req-step-track .step.current{
  color:#0a0f1a;
}
html[data-theme="light"] .req-step-track .step.current .num{
  background:linear-gradient(135deg, #C6D6EF 0%, #364B76 100%);
  color:#ffffff;
  border-color:#18233F;
}
html[data-theme="light"] .req-step-track .step.current .step-label{
  color:#0a0f1a;
  font-weight:700;
}
html[data-theme="light"] .phase-label{ color:#1e293b; }
html[data-theme="light"] .phase-item.current .phase-label,
html[data-theme="light"] .phase-item.done .phase-label{ color:#0a0f1a; }

/* Dark Mode — Franchise / Renewal cards readable */
html[data-theme="dark"] .req-kicker,
html[data-theme="dark"] .rsc-num,
html[data-theme="dark"] .step-guide-modal .step-guide-kicker{
  color:#99f6e4;
}
html[data-theme="dark"] .rsc-hint{
  color:#7dd3fc;
}
html[data-theme="dark"] .req-step-card{
  background:rgba(24,35,63,.55);
}
html[data-theme="dark"] .req-step-card:hover{
  border-color:#7289A9;
  transform:none;
}
html[data-theme="dark"] .req-doc-preview,
html[data-theme="dark"] .rsc-tag{
  color:#ECF4FF;
}
html[data-theme="dark"] .req-step-card p,
html[data-theme="dark"] .req-panel-head p{
  color:#C6D6EF;
}

.wizard-body{ min-height:320px; }
.wizard-section-title{ margin-bottom:16px; }
.wizard-section-title h4{ margin:0 0 4px; font-size:15px; color:var(--text); }
.wizard-section-title p{ margin:0; font-size:12.5px; color:var(--text-dim); }
.doc-verify-list{ display:flex; flex-direction:column; gap:10px; }
.doc-verify-item{
  background:var(--bg-soft); border:1px solid var(--border-soft); border-radius:12px; padding:14px;
  display:grid; grid-template-columns:1fr auto; gap:10px 14px; align-items:start;
}
.doc-verify-item.compact{ grid-template-columns:1fr auto; align-items:center; }
.dvi-main{ display:flex; gap:12px; align-items:flex-start; }
.dvi-check{
  width:28px; height:28px; border-radius:8px; background:var(--surface-2); color:var(--text-dim);
  display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:700; flex-shrink:0;
}
.dvi-check.ok{ background:var(--green-glow); color:var(--green-bright); }
.dvi-check.bad{ background:rgba(239,68,68,.14); color:#fca5a5; }
.dvi-text{ display:flex; flex-direction:column; gap:2px; }
.dvi-text b{ font-size:13px; color:var(--text); }
.dvi-text span{ font-size:11.5px; color:var(--text-faint); }
.dvi-actions{ display:flex; gap:8px; align-items:center; flex-wrap:wrap; justify-content:flex-end; }
.upload-box-sm{ padding:10px 12px; min-width:90px; }
.upload-box-sm svg{ width:16px; height:16px; margin-bottom:4px; }
.doc-status-select{
  background:var(--bg-soft); border:1px solid var(--border); border-radius:9999px; padding:8px 10px;
  color:var(--text); font-size:12px; font-family:inherit;
}
.dvi-remarks{ grid-column:1/-1; margin:0; }
.linked-insp-card{
  display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap;
  background:var(--bg-soft); border:1px solid var(--border); border-radius:10px; padding:14px;
}
.linked-insp-card span:not(.badge){ display:block; font-size:12px; color:var(--text-faint); margin-top:2px; }
.payment-card, .review-summary{
  background:var(--bg-soft); border:1px solid var(--border-soft); border-radius:12px; padding:16px;
}

/* ---------- Official paper forms (MTOP / TSIR) ---------- */
.official-form{
  background:var(--bg-soft); border:1px solid var(--border); border-radius:12px; padding:18px;
}
.official-form-title{
  text-align:center; font-size:15px; font-weight:800; letter-spacing:.04em;
  border:2px solid var(--text); color:var(--text); padding:10px 14px; margin:0 0 18px;
  text-transform:uppercase;
}
.mtop-form-head{
  display:flex;
  align-items:flex-start;
  gap:14px;
  margin-bottom:18px;
}
.mtop-form-head .official-form-title{
  flex:1 1 auto;
  min-width:0;
  margin:0;
  align-self:stretch;
  display:flex;
  align-items:center;
  justify-content:center;
}
.mtop-id-photo{
  position:relative;
  flex:0 0 96px;
  width:96px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:6px;
}
.mtop-id-photo-frame{
  position:relative;
  width:100%;
  aspect-ratio:1 / 1;
  border:1.5px solid var(--border);
  border-radius:10px;
  background:var(--surface);
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  cursor:pointer;
  box-shadow:inset 0 0 0 1px var(--border-soft);
}
.mtop-id-photo-preview{
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:10px;
  display:block;
}
.mtop-id-photo-icon{
  display:flex;
  width:44%;
  color:var(--text-faint);
  pointer-events:none;
}
.mtop-id-photo-icon svg{
  width:100%;
  height:auto;
}
.mtop-id-photo-label{
  font-size:10px;
  font-weight:700;
  letter-spacing:.02em;
  color:var(--text-faint);
  text-align:center;
  line-height:1.2;
  display:block;
}
.mtop-id-photo-actions{
  display:none;
  position:absolute;
  top:6px;
  right:6px;
  gap:4px;
  z-index:2;
}
.mtop-id-photo.has-photo .mtop-id-photo-actions{ display:flex; }
.mtop-id-photo-btn{
  width:26px; height:26px; border-radius:8px; border:none;
  background:rgba(8,14,28,.78); color:#fff; cursor:pointer;
  display:inline-flex; align-items:center; justify-content:center; padding:0;
}
.mtop-id-photo-btn svg{ width:13px; height:13px; }
.mtop-id-photo-btn:hover{ background:var(--green); color:#04150a; }
.mtop-id-photo-error{
  margin:0;
  font-size:11px;
  font-weight:650;
  color:#fca5a5;
  text-align:center;
  line-height:1.3;
}
.mtop-id-photo-review{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:6px;
  flex:0 0 auto;
}
.mtop-id-photo-review img{
  width:96px; height:96px; object-fit:cover; border-radius:10px;
  border:1.5px solid var(--border); background:var(--surface);
}
.mtop-id-photo-review span{
  font-size:10px; font-weight:700; letter-spacing:.02em; color:var(--text-faint);
}
.mtop-part-progress{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:0 0 16px;
  padding:8px 14px;
  border:1px solid var(--border);
  border-radius:999px;
  background:var(--surface);
  color:var(--text);
  font-size:12.5px;
  font-weight:650;
  letter-spacing:.01em;
}
.mtop-part-dots{ display:flex; align-items:center; gap:6px; flex-shrink:0; }
.mtop-part-dot{
  width:8px; height:8px; border-radius:50%;
  background:var(--surface-2); border:1px solid var(--border);
}
.mtop-part-dot.is-current{ background:var(--green); border-color:var(--green); }
.mtop-part-dot.is-done{ background:var(--green-bright); border-color:var(--green); }
.mtop-part.is-hidden, .mtop-part[hidden]{ display:none !important; }
.mtop-part .form-grid.mtop-mid{ gap:14px 16px; }
.mtop-part-actions{ display:flex; justify-content:flex-end; gap:10px; flex-wrap:wrap; }
.op-wiz-review-group{ margin:0 0 18px; }
.op-wiz-review-group-head{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  margin:0 0 10px;
}
.op-wiz-review-group-head h4{
  margin:0; font-size:14px; font-weight:700; color:var(--text);
}
@media (max-width:640px){
  .mtop-part-progress{ flex-wrap:wrap; border-radius:12px; }
  .op-wiz-review-group-head{ flex-wrap:wrap; }
}
@media (max-width:640px){
  .mtop-form-head{ flex-direction:column; align-items:center; }
  .mtop-form-head .official-form-title{ width:100%; }
  .mtop-id-photo{ width:96px; flex-basis:96px; }
}

/*
  My Applications → View (eye) — Applicant & Application Information
  Photo+name row, then two equal columns. Not used by staff MTOP review.
*/
.op-app-info{
  container-type:inline-size;
  container-name:op-app-info;
  width:100%;
  max-width:100%;
  min-width:0;
  margin:0 0 14px;
  position:relative;
  height:auto;
  overflow:visible;
}
.op-app-info-photo-row{
  display:flex;
  flex-direction:row;
  flex-wrap:nowrap;
  align-items:center;
  gap:16px;
  width:100%;
  max-width:100%;
  min-width:0;
  margin:0 0 16px;
  position:relative;
  z-index:0;
  float:none;
}
.op-app-info-photo-frame{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:6px;
  flex:0 0 auto;
  width:96px;
  position:relative;
}
.op-app-info-photo-btn,
.op-app-info-photo-empty{
  width:96px;
  height:96px;
  aspect-ratio:1 / 1;
  flex:0 0 96px;
  box-sizing:border-box;
  position:relative;
  float:none;
}
.op-app-info-photo-btn{
  padding:0;
  border:1px solid var(--border);
  border-radius:12px;
  overflow:hidden;
  background:var(--bg-soft);
  cursor:pointer;
}
.op-app-info-photo-btn img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.op-app-info-photo-empty{
  border:1px solid var(--border);
  border-radius:12px;
  background:var(--bg-soft);
  color:var(--text-faint);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:4px;
  font-size:12px;
  line-height:1.25;
  text-align:center;
  padding:8px;
  overflow:hidden;
}
/* display:flex above would otherwise override the HTML [hidden] attribute */
.op-app-info-photo-empty[hidden],
.op-app-info-photo-btn[hidden]{
  display:none !important;
}
.pi-review-photo-empty[hidden],
.pi-review-photo-btn[hidden],
.applicant-photo-empty[hidden],
.applicant-photo-btn[hidden]{
  display:none !important;
}
.op-app-info-photo-empty span:last-child{
  display:block;
  max-width:100%;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.op-app-info-photo-caption{
  font-size:10px;
  font-weight:700;
  letter-spacing:.02em;
  color:var(--text-faint);
  text-align:left;
  line-height:1.2;
  width:96px;
}
.op-app-info-driver-name{
  min-width:0;
  flex:1 1 auto;
  position:relative;
}
.op-app-info-driver-name span{
  display:block;
  font-size:12.5px;
  font-weight:600;
  color:var(--text-dim);
  margin-bottom:2px;
}
.op-app-info-driver-name strong{
  display:block;
  font-size:16px;
  font-weight:700;
  color:var(--text);
  overflow-wrap:anywhere;
  word-break:break-word;
}
.op-app-info-cols{
  display:grid;
  grid-template-columns:minmax(0, 1fr) minmax(0, 1fr);
  column-gap:24px;
  row-gap:14px;
  align-items:start;
  width:100%;
  min-width:0;
}
.op-app-info-col{
  display:flex;
  flex-direction:column;
  gap:14px;
  min-width:0;
}
.op-app-info-item span{
  display:block;
  font-size:11px;
  color:var(--text-faint);
  margin-bottom:3px;
}
.op-app-info-item b{
  display:block;
  font-size:13px;
  font-weight:600;
  color:var(--text);
  overflow-wrap:anywhere;
  word-break:break-word;
}
@container op-app-info (max-width: 559px){
  .op-app-info-cols{
    grid-template-columns:minmax(0, 1fr);
  }
}

/*
  Personal Information photo + fields (.pi-review)
  Outer .pi-review is the size container; inner .pi-review-layout is the grid.
  (A container cannot style itself via @container — descendants only.)
  Never position:absolute / float on the photo.
*/
.pi-review{
  container-type:inline-size;
  container-name:pi-review;
  width:100%;
  max-width:100%;
  min-width:0;
  margin:0 0 14px;
  position:relative;
  height:auto;
  overflow:visible;
}
.pi-review-layout{
  display:grid;
  grid-template-columns:minmax(0, 1fr);
  grid-template-areas:
    "photo"
    "fields";
  column-gap:16px;
  row-gap:16px;
  align-items:start;
  width:100%;
  max-width:100%;
  min-width:0;
  height:auto;
  overflow:visible;
}
.pi-review-photo{
  grid-area:photo;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:6px;
  width:104px;
  max-width:100%;
  margin:0;
  position:relative;
  z-index:0;
  float:none;
}
.pi-review-photo--beside{
  width:auto;
  max-width:100%;
  min-width:0;
}
.pi-review-photo-pair{
  display:flex;
  flex-direction:row;
  flex-wrap:nowrap;
  align-items:center;
  gap:16px;
  min-width:0;
  width:100%;
  max-width:100%;
}
.pi-review-photo-frame{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:6px;
  flex:0 0 auto;
  width:96px;
  position:relative;
}
.pi-review-beside-name{
  min-width:0;
  flex:1 1 auto;
  position:relative;
  z-index:0;
}
.pi-review-beside-name span{
  display:block;
  font-size:12.5px;
  font-weight:600;
  color:var(--text-dim);
  margin-bottom:2px;
}
.pi-review-beside-name strong{
  display:block;
  font-size:16px;
  font-weight:700;
  color:var(--text);
  overflow-wrap:anywhere;
  word-break:break-word;
}
.pi-review-photo-btn,
.pi-review-photo-empty,
.pi-review .applicant-photo-btn,
.pi-review .applicant-photo-empty{
  width:96px;
  height:96px;
  aspect-ratio:1 / 1;
  flex:0 0 96px;
  box-sizing:border-box;
  position:relative;
  float:none;
}
.pi-review-photo-btn{
  padding:0;
  border:1px solid var(--border);
  border-radius:12px;
  overflow:hidden;
  background:var(--bg-soft);
  cursor:pointer;
}
.pi-review-photo-btn img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.pi-review-photo-empty{
  border:1px solid var(--border);
  border-radius:12px;
  background:var(--bg-soft);
  color:var(--text-faint);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:4px;
  font-size:12px;
  line-height:1.25;
  text-align:center;
  padding:8px;
  overflow:hidden;
}
.pi-review-photo-empty span:last-child{
  display:block;
  max-width:100%;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.pi-review-photo-empty svg{ width:22px; height:22px; flex-shrink:0; }
.pi-review-photo-caption{
  font-size:10px;
  font-weight:700;
  letter-spacing:.02em;
  color:var(--text-faint);
  text-align:left;
  line-height:1.2;
  width:96px;
}
.pi-review-fields{
  grid-area:fields;
  min-width:0;
  margin:0 !important;
  position:relative;
  z-index:0;
  float:none;
}
.pi-review-fields .dg-item span{
  display:block;
  font-size:11px;
  color:var(--text-faint);
  margin-bottom:3px;
}
.pi-review-fields .dg-item b{
  display:block;
  font-size:13px;
  font-weight:600;
  color:var(--text);
  overflow-wrap:anywhere;
  word-break:break-word;
}
@container pi-review (min-width: 560px){
  .pi-review-layout{
    grid-template-columns:minmax(0, 1fr) 104px;
    grid-template-areas:"fields photo";
    row-gap:12px;
  }
  .pi-review-photo{
    justify-self:end;
    align-items:center;
  }
  .pi-review-photo-caption{ text-align:center; }
  .pi-review--beside .pi-review-layout{
    grid-template-columns:minmax(220px, 320px) minmax(0, 1fr);
    grid-template-areas:"photo fields";
  }
  .pi-review--beside .pi-review-photo{
    justify-self:start;
    align-items:stretch;
    width:auto;
    max-width:100%;
  }
  .pi-review--beside .pi-review-photo-pair{ align-items:center; }
  .pi-review--beside .pi-review-photo-caption{ text-align:left; }
  /* Operator Profile (Staff/Main Admin): photo on the left, details on the right */
  .pi-review--photo-left .pi-review-layout{
    grid-template-columns:104px minmax(0, 1fr);
    grid-template-areas:"photo fields";
    column-gap:24px;
    row-gap:12px;
  }
  .pi-review--photo-left .pi-review-photo{
    justify-self:start;
    align-items:flex-start;
    width:104px;
  }
  .pi-review--photo-left .pi-review-photo-caption{ text-align:left; }
  .pi-review--photo-left .pi-review-fields{
    min-width:0;
  }
}
@container pi-review (max-width: 559px){
  .pi-review-fields{
    grid-template-columns:1fr;
  }
  .pi-review--beside .pi-review-photo{
    width:100%;
  }
  .pi-review--photo-left .pi-review-layout{
    grid-template-columns:minmax(0, 1fr);
    grid-template-areas:
      "photo"
      "fields";
    row-gap:16px;
    column-gap:16px;
  }
  .pi-review--photo-left .pi-review-photo{
    width:104px;
    justify-self:start;
  }
}
.mtop-mid{ grid-template-columns:1fr 1fr 1fr; }
@media (max-width:900px){ .mtop-mid{ grid-template-columns:1fr 1fr; } }
@media (max-width:640px){ .mtop-mid{ grid-template-columns:1fr; } }
/*
  Driver name row — same layout pattern as City / Barangay / Street (.addr-block / .addr-grid):
  full-width of the form grid, one horizontal row of compact cells, container-query stack.
*/
.mtop-driver-name-block,
[data-driver-name-block]{
  grid-column:1 / -1;
  width:100%;
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:6px;
  container-type:inline-size;
  container-name:driver-name;
}
.mtop-driver-name-legend{
  font-size:12.5px;
  font-weight:600;
  color:var(--text-dim);
  white-space:nowrap;
}
.mtop-driver-name-fields{
  display:block;
  width:100%;
  min-width:0;
}
/* Parallel to .addr-grid (3 equal cols). Four name parts; Suffix is the short select. */
.mtop-driver-name-row,
[data-driver-name-row]{
  display:grid;
  grid-template-columns:minmax(0,1.15fr) minmax(0,1fr) minmax(0,1.15fr) minmax(0,0.55fr);
  gap:16px;
  width:100%;
  min-width:0;
  align-items:start;
}
.mtop-driver-name-row > .field,
.mtop-driver-name-row > .mtop-driver-name-cell,
[data-driver-name-row] > .field{
  min-width:0;
  width:auto;
  max-width:none;
  margin:0;
  grid-column:auto;
  grid-row:auto;
}
.mtop-driver-name-row > .field > label,
.mtop-driver-name-row > .mtop-driver-name-cell > label,
[data-driver-name-row] > .field > label,
.mtop-driver-name-suffix > label{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.mtop-driver-name-row input,
.mtop-driver-name-row select,
[data-driver-name-row] input,
[data-driver-name-row] select{
  min-width:0;
  width:100%;
  max-width:100%;
  box-sizing:border-box;
  overflow:hidden;
  text-overflow:ellipsis;
}
.mtop-driver-name-row > .mtop-driver-name-suffix,
.mtop-driver-name-suffix{
  min-width:0;
  margin:0;
  width:auto;
  max-width:none;
  grid-column:auto;
}
.form-grid .mtop-driver-name-block,
.form-grid [data-driver-name-block],
.modal .mtop-driver-name-block,
.modal [data-driver-name-block],
.op-add-driver-modal .mtop-driver-name-block,
.op-wiz-form .mtop-driver-name-block,
.op-wiz-form [data-driver-name-block]{
  grid-column:1 / -1;
}
.form-grid .mtop-driver-name-row,
.form-grid [data-driver-name-row],
.modal .mtop-driver-name-row,
.modal [data-driver-name-row],
.op-add-driver-modal .mtop-driver-name-row,
.op-add-driver-modal [data-driver-name-row],
.op-wiz-form .mtop-driver-name-row,
.op-wiz-form [data-driver-name-row]{
  display:grid;
  grid-template-columns:minmax(0,1.15fr) minmax(0,1fr) minmax(0,1.15fr) minmax(0,0.55fr);
  gap:16px;
}
.op-add-driver-modal .mtop-driver-name-block{ margin-bottom:4px; }
.op-add-driver-modal{ max-width:min(760px, 96vw); }
/* Narrow: two-by-two, then single column — container width, not viewport. */
@container driver-name (max-width: 600px){
  .mtop-driver-name-row,
  [data-driver-name-row],
  .form-grid .mtop-driver-name-row,
  .form-grid [data-driver-name-row],
  .modal .mtop-driver-name-row,
  .modal [data-driver-name-row],
  .op-add-driver-modal .mtop-driver-name-row,
  .op-add-driver-modal [data-driver-name-row],
  .op-wiz-form .mtop-driver-name-row,
  .op-wiz-form [data-driver-name-row]{
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  }
}
@container driver-name (max-width: 380px){
  .mtop-driver-name-row,
  [data-driver-name-row],
  .form-grid .mtop-driver-name-row,
  .form-grid [data-driver-name-row],
  .modal .mtop-driver-name-row,
  .modal [data-driver-name-row],
  .op-add-driver-modal .mtop-driver-name-row,
  .op-add-driver-modal [data-driver-name-row],
  .op-wiz-form .mtop-driver-name-row,
  .op-wiz-form [data-driver-name-row]{
    grid-template-columns:minmax(0,1fr);
  }
}
@supports not (container-type: inline-size){
  @media (max-width:600px){
    .mtop-driver-name-row,
    [data-driver-name-row],
    .form-grid .mtop-driver-name-row,
    .modal .mtop-driver-name-row,
    .op-add-driver-modal .mtop-driver-name-row,
    .op-wiz-form .mtop-driver-name-row{
      grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    }
  }
  @media (max-width:380px){
    .mtop-driver-name-row,
    [data-driver-name-row],
    .form-grid .mtop-driver-name-row,
    .modal .mtop-driver-name-row,
    .op-add-driver-modal .mtop-driver-name-row,
    .op-wiz-form .mtop-driver-name-row{
      grid-template-columns:minmax(0,1fr);
    }
  }
}
.mtop-app-type{ grid-column: span 1; }
.mtop-checks{ display:flex; flex-direction:column; gap:6px; margin-top:4px; }
.mtop-checks .chk{
  display:flex; align-items:center; gap:8px; font-size:12.5px; font-weight:650; color:var(--text);
  cursor:pointer;
}
.mtop-checks input{ width:16px; height:16px; accent-color:var(--green); }
.mtop-declaration{
  margin:16px 0; padding:12px 14px; border:1px solid var(--border-soft); border-radius:10px;
  background:var(--surface);
}
.mtop-declaration p{ margin:0; font-size:12px; color:var(--text-dim); line-height:1.55; font-style:italic; }
.mtop-sign .sign-hint{
  display:block; margin-top:4px; font-size:11px; font-weight:700; letter-spacing:.08em; color:var(--text-faint);
}
.tsir-form .tsir-meta{ margin-bottom:4px; }
.tsir-table-wrap{ overflow-x:auto; border:1px solid var(--border); border-radius:10px; }
.tsir-table{ width:100%; border-collapse:collapse; font-size:13px; }
.tsir-table th{
  background:var(--surface-2); color:var(--text-dim); font-size:11px; font-weight:700;
  text-align:left; padding:10px 12px; border-bottom:1px solid var(--border); letter-spacing:.04em;
}
.tsir-table td{ padding:8px 12px; border-bottom:1px solid var(--border-soft); color:var(--text); vertical-align:middle; }
.tsir-table tr:last-child td{ border-bottom:none; }
.tsir-table{ table-layout:fixed; }
.tsir-table th:nth-child(2),
.tsir-table th:nth-child(3),
.tsir-table td:nth-child(2),
.tsir-table td:nth-child(3){ width:88px; text-align:center; }
.tsir-table th:first-child,
.tsir-table td:first-child{ width:24%; }
.tsir-table td.tsir-remark input{
  width:100%; box-sizing:border-box; background:#fff; border:1px solid #d7dde8;
  border-radius:9999px; color:#0a0f1a; font:inherit; font-size:13px;
  padding:8px 16px; min-height:36px; outline:none;
}
.tsir-table td.tsir-remark input:focus{ border-color:var(--green); }
.tsir-check{ text-align:center; }
.tsir-box{
  width:28px; height:28px; border:1.5px solid var(--border); border-radius:6px;
  background:var(--bg-soft); color:transparent; cursor:pointer; font-weight:800; font-size:14px;
  display:inline-flex; align-items:center; justify-content:center;
}
.tsir-box.on.pass{ background:var(--green-glow); border-color:var(--green); color:var(--green-bright); }
.tsir-box.on.fail{ background:rgba(239,68,68,.14); border-color:rgba(239,68,68,.5); color:#fca5a5; }
.tsir-cert{
  margin-top:20px; padding-top:16px; border-top:1px solid var(--border);
}
.tsir-cert h4{ margin:0 0 8px; font-size:13px; letter-spacing:.04em; color:var(--text); }
.tsir-cert p{ margin:0 0 14px; font-size:12.5px; color:var(--text-dim); font-style:italic; line-height:1.5; }

.tsir-photos-section{
  margin-top:18px;
  padding-top:16px;
  border-top:1px solid var(--border);
}
.tsir-photos-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}
.tsir-photos-head h4{
  margin:0 0 4px;
  font-size:14px;
  font-weight:650;
  color:var(--text);
  display:flex;
  align-items:center;
  gap:8px;
}
.tsir-photos-head h4 svg{
  width:16px;
  height:16px;
  color:var(--accent-bright, var(--green-bright));
}
.tsir-photos-head p{
  margin:0;
  font-size:12.5px;
  color:var(--text-dim);
  line-height:1.4;
}
.tsir-photos-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(140px, 1fr));
  gap:10px;
  margin-bottom:12px;
}
.tsir-photos-grid:empty{ display:none; margin:0; }
.tsir-photo-card{
  position:relative;
  border:1px solid var(--border);
  border-radius:12px;
  overflow:hidden;
  background:var(--surface-2, var(--bg-soft));
}
.tsir-photo-card img{
  display:block;
  width:100%;
  height:110px;
  object-fit:cover;
  background:rgba(0,0,0,.2);
}
.tsir-photo-meta{
  padding:8px 10px 10px;
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width:0;
}
.tsir-photo-meta b{
  font-size:11.5px;
  color:var(--text);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.tsir-photo-meta span{
  font-size:11px;
  color:var(--text-dim);
}
.tsir-photo-remove{
  position:absolute;
  top:8px;
  right:8px;
  width:28px;
  height:28px;
  border-radius:8px;
  border:1px solid var(--border);
  background:rgba(15,23,42,.72);
  color:#fff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  padding:0;
}
.tsir-photo-remove svg{ width:14px; height:14px; }
.tsir-photo-remove:hover{
  background:rgba(220,38,38,.9);
  border-color:rgba(220,38,38,.9);
}
.tsir-photo-upload{
  display:block;
  margin:0;
}
.tsir-photo-upload.is-dragover{
  border-color:var(--green);
  color:var(--text);
  background:var(--green-glow);
}
.tsir-photo-upload.is-disabled{
  opacity:.55;
  pointer-events:none;
  cursor:not-allowed;
}
.tsir-photos-readonly{ margin-top:4px; }

/* ---------- Inspector checklist with remarks (legacy card layout) ---------- */
.insp-layout{ align-items:start; grid-template-columns:1fr 1.5fr; }
@media (max-width:900px){ .insp-layout{ grid-template-columns:1fr; } }
.insp-hint{ margin:0 0 14px; font-size:12.5px; color:var(--text-dim); }
.insp-checklist{ max-height:62vh; overflow-y:auto; padding-right:4px; }
.insp-check-item{
  border:1px solid var(--border-soft); border-radius:12px; padding:12px 14px; margin-bottom:10px;
  background:var(--bg-soft);
}
.ici-head{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:10px; }
.ici-num{
  width:24px; height:24px; border-radius:7px; background:var(--surface-2); color:var(--text-dim);
  display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:700; flex-shrink:0;
}
.ici-head b{ flex:1; font-size:13px; color:var(--text); min-width:120px; }
.ici-status-btns{ display:flex; gap:6px; }
.ici-btn{
  border:1px solid var(--border); background:transparent; color:var(--text-dim); border-radius:9999px;
  padding:5px 10px; font-size:11px; font-weight:650; cursor:pointer; font-family:inherit;
}
.ici-btn.on.pass{ background:var(--green-glow); color:var(--green-bright); border-color:var(--green); }
.ici-btn.on.fail{ background:rgba(239,68,68,.14); color:#fca5a5; border-color:rgba(239,68,68,.45); }
.ici-btn.on:not(.pass):not(.fail){ background:var(--surface-2); color:var(--text); }

/* ---------- Modal ---------- */
.overlay{
  position:fixed; inset:0; background:rgba(0,0,0,.58); backdrop-filter:blur(2px);
  display:flex; align-items:center; justify-content:center; z-index:200; padding:24px;
  animation:fadeIn .18s ease;
}
.overlay[hidden],
.overlay.hidden{ display:none !important; }
@keyframes fadeIn{ from{ opacity:0; } to{ opacity:1; } }
.modal{
  background:#ffffff;
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  width:100%; max-width:480px; box-shadow:var(--shadow-lg);
  animation:modalIn .2s cubic-bezier(.2,.8,.2,1);
  max-height:calc(100vh - 48px); display:flex; flex-direction:column; overflow:hidden;
  color:#111111;
  --text-dim:#111111;
}
html[data-theme="dark"] .modal{
  background:#18233F;
  color:#f4f7fb;
  --text-dim:#f4f7fb;
}
.modal > form{
  display:flex; flex-direction:column; min-height:0; flex:1 1 auto; overflow:hidden;
}
.modal.modal-lg{ max-width:680px; }
.modal.modal-xl{ max-width:920px; }
@keyframes modalIn{ from{ opacity:0; transform:translateY(10px) scale(.98); } to{ opacity:1; transform:none; } }
.modal-head{ display:flex; align-items:center; justify-content:space-between; padding:18px 22px; border-bottom:1px solid var(--border); flex-shrink:0; }
.modal-head h3{ margin:0; font-size:15.5px; color:var(--text); }
.modal-close{
  width:30px;height:30px; border-radius:9999px; background:var(--surface-2); border:none; color:var(--text-dim);
  cursor:pointer; display:flex; align-items:center; justify-content:center;
  text-decoration:none;
  transition:background .25s ease, color .25s ease, box-shadow .25s ease;
}
.modal-close:hover{
  background:var(--surface-hover);
  color:var(--text);
  box-shadow:0 2px 8px rgba(0,0,0,.12);
}
.modal-close svg{ width:15px;height:15px; transition:color .25s ease, filter .25s ease; }
.modal-close:hover svg{ filter:brightness(1.15); }
.modal-body{ padding:20px 22px; overflow-y:auto; flex:1 1 auto; min-height:0; font-size:13.5px; color:var(--text-dim); line-height:1.6; }
.modal-body b{ color:var(--text); }
.modal-foot{ display:flex; justify-content:flex-end; gap:10px; padding:16px 22px; border-top:1px solid var(--border); flex-shrink:0; flex-wrap:wrap; }
.overlay [hidden],
.modal [hidden]{
  display:none !important;
}
.modal-foot-split{
  justify-content:space-between;
  align-items:center;
  gap:12px;
}
.modal-foot-split > .btn{
  flex:1 1 0;
  min-width:0;
}
.modal-foot-split > .btn:only-child{
  flex:0 1 auto;
  margin-left:auto;
}
.modal-icon{ width:48px;height:48px; border-radius:12px; display:flex; align-items:center; justify-content:center; margin-bottom:14px; }
.modal-icon svg{ width:24px;height:24px; }
.detail-grid{ display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-top:6px; }
.detail-grid .dg-item span{ display:block; font-size:11px; color:var(--text-faint); margin-bottom:3px; }
.detail-grid .dg-item b{ font-size:13px; font-weight:600; color:var(--text); }
.checklist-item{ display:flex; align-items:center; justify-content:space-between; padding:9px 0; border-bottom:1px solid var(--border-soft); font-size:13px; }
button.checklist-toggle{ border:none; cursor:pointer; font-family:inherit; }
.checklist-item:last-child{ border-bottom:none; }

/* ---------- Toast ---------- */
.toast-stack{ position:fixed; top:20px; right:20px; z-index:300; display:flex; flex-direction:column; gap:10px; max-width:340px; }
.toast{
  background:var(--surface); border:1px solid var(--border); border-left:3px solid var(--green);
  border-radius:10px; padding:13px 16px; display:flex; gap:10px; align-items:flex-start;
  box-shadow:var(--shadow); animation:toastIn .25s ease;
}
.toast.err{ border-left-color:var(--red); }
.toast.warn{ border-left-color:var(--amber); }
@keyframes toastIn{ from{ opacity:0; transform:translateX(20px); } to{ opacity:1; transform:none; } }
.toast svg{ width:18px;height:18px; flex-shrink:0; margin-top:1px; color:var(--green-bright); }
.toast.err svg{ color:#fca5a5; }
.toast.warn svg{ color:#fcd34d; }
.toast .tt{ font-size:13px; font-weight:650; margin-bottom:2px; }
.toast .td{ font-size:12px; color:var(--text-dim); }

/* ---------- Loading ---------- */
.loading-overlay{
  position:fixed; inset:0; background:rgba(24,35,63,0.92); backdrop-filter:blur(8px); z-index:500;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:16px;
}
html[data-theme="light"] .loading-overlay{
  background:rgba(241,245,249,0.92);
}
.spinner{ width:40px;height:40px; border-radius:50%; border:3px solid var(--border); border-top-color:var(--accent); animation:spin .8s linear infinite; }
@keyframes spin{ to{ transform:rotate(360deg); } }
.loading-overlay p{ color:var(--text-dim); font-size:13px; animation:pulseText 1.5s ease infinite; }
@keyframes pulseText{ 0%,100%{ opacity:.6; } 50%{ opacity:1; } }
.skeleton{ background:linear-gradient(90deg,var(--surface) 25%,var(--surface-2) 50%,var(--surface) 75%); background-size:200% 100%; animation:shimmer 1.4s infinite; border-radius:8px; }
@keyframes shimmer{ from{ background-position:200% 0; } to{ background-position:-200% 0; } }

/* ---------- Notification / list panel ---------- */
.notif-item{ display:flex; gap:12px; padding:14px 4px; border-bottom:1px solid var(--border-soft); min-width:0; width:100%; color:inherit; text-decoration:none; }
.notif-item:hover{ background:var(--surface-2); border-radius:8px; }
.notif-item.unread .notif-title{ font-weight:700; }
.notif-icon{ width:36px;height:36px;border-radius:9px; display:flex; align-items:center; justify-content:center; flex-shrink:0; background:var(--surface-2); color:var(--chart-primary); }
.notif-icon svg{ width:17px;height:17px; }
.notif-copy{ flex:1; min-width:0; width:100%; }
.notif-center .notif-title{
  display:block;
  font-size:13px;
  margin-bottom:2px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:inherit;
  text-decoration:none;
  position:relative;
  z-index:2;
}
.notif-center .notif-title:focus-visible{
  outline:2px solid var(--accent);
  outline-offset:2px;
  border-radius:4px;
}
.notif-preview.is-clamped,
.notif-preview.is-clamped .notif-desc,
.notif-preview.is-clamped .notif-desc-structured{
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
  max-height:2.8em;
}
.notif-preview.is-clamped .notif-desc-structured p,
.notif-preview.is-clamped .notif-desc-structured ol,
.notif-preview.is-clamped .notif-desc-structured li{
  margin:0;
  padding:0;
  display:inline;
}
.notif-preview.is-clamped .notif-desc-structured ol{ list-style:none; }
.notif-preview.is-clamped .notif-desc-structured .notif-link{ display:none; }
.notif-desc{ font-size:12px; color:var(--text-dim); overflow-wrap:anywhere; }
.notif-desc-structured{ font-size:12px; color:var(--text-dim); overflow-wrap:anywhere; }
.notif-desc-structured p{ margin:0 0 8px; }
.notif-desc-structured ol{ margin:0; padding-left:1.25rem; }
.notif-desc-structured li{ margin:0 0 4px; }
.notif-time{ font-size:11px; color:var(--text-faint); margin-top:4px; }
.notif-view-modal{
  width:min(560px, calc(100vw - 24px));
  max-height:min(85vh, 720px);
}
.notif-view-modal .modal-body{
  overflow:auto;
  max-height:min(60vh, 480px);
}
.notif-view-time{
  margin:0 0 12px;
  font-size:12px;
  color:var(--text-faint);
}
.notif-view-body{
  min-width:0;
}
.notif-view-body .notif-desc,
.notif-view-body .notif-desc-structured{
  display:block;
  -webkit-line-clamp:unset;
  max-height:none;
  overflow:visible;
  white-space:normal;
}
.notif-view-body .ann-chip{ margin-bottom:10px; }
.notif-view-body .ann-copy{ margin:8px 0; }
.notif-view-body .ann-files{ margin:12px 0 0; padding-left:1.1rem; }
.unread-dot{ width:8px;height:8px; border-radius:50%; background:var(--green-bright); margin-left:auto; margin-top:4px; flex-shrink:0; }
.dash-notif-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:4px; }
.dash-notif-head h3{ margin:0; display:flex; align-items:center; gap:8px; }
.dash-notif-all{ font-size:12.5px; font-weight:650; color:var(--chart-primary); text-decoration:none; white-space:nowrap; }
.dash-notif-all:hover{ text-decoration:underline; }

.insp-dash-notifs{ margin-bottom:20px; }
.insp-dash-notifs .dash-notif-head{ margin-bottom:8px; }
.insp-dash-notifs .dash-notif-head h3{ font-size:15px; }
.insp-dash-notifs .activity-list{ display:flex; flex-direction:column; gap:6px; }
.insp-dash-notifs .notif-item{
  align-items:flex-start;
  gap:12px;
  padding:12px 14px;
  border-bottom:none;
  border-radius:12px;
}
.insp-dash-notifs .notif-item.unread{
  background:color-mix(in srgb, var(--surface-2) 88%, var(--chart-glow));
  border:1px solid color-mix(in srgb, var(--chart-primary) 22%, var(--border));
}
.insp-dash-notifs .notif-dot{
  width:8px;
  height:8px;
  border-radius:50%;
  background:var(--chart-primary);
  box-shadow:0 0 8px var(--chart-glow);
  margin-top:6px;
  flex-shrink:0;
}
.insp-dash-notifs .notif-title{ font-size:13.5px; font-weight:650; }
.insp-dash-notifs .notif-item.unread .notif-title{ font-weight:700; }

/* Report cards */
.report-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:14px;
  justify-content:start;
  align-items:stretch;
}
.report-grid.staff-report-grid{ grid-template-columns:repeat(4, minmax(0, 1fr)); }
.report-card{ background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:18px; cursor:pointer; text-decoration:none; color:inherit; transition:border-color .15s ease, transform .15s ease; min-width:0; max-width:100%; box-sizing:border-box; }
button.report-card{ font:inherit; text-align:left; width:100%; display:block; }
.report-card:hover{ border-color:rgba(34,197,94,.4); transform:translateY(-2px); }
.report-card .ric{ width:36px;height:36px; border-radius:9px; background:var(--green-glow); color:var(--green-bright); display:flex; align-items:center; justify-content:center; margin-bottom:12px; }
.report-card .ric svg{ width:18px;height:18px; }
.report-card h4{ margin:0 0 4px; font-size:13.5px; overflow-wrap:anywhere; word-break:break-word; }
.report-card p{ margin:0; font-size:11.5px; color:var(--text-faint); overflow-wrap:anywhere; word-break:break-word; }
.report-card.insp-report-card{
  cursor:default;
  display:flex;
  flex-direction:column;
  min-height:100%;
}
.report-card.insp-report-card:hover{ transform:none; }
.insp-report-card .insp-report-actions{
  margin-top:auto;
  padding-top:12px;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.insp-report-card .insp-rpt-actions-group{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}
.insp-report-card .insp-report-actions .btn{
  font-size:11.5px;
}
.insp-report-card .insp-rpt-icon-btn{
  min-width:34px;
  justify-content:center;
}
.modal.modal-xl.pay-rpt-modal{ max-width:min(1120px, calc(100vw - 32px)); }
.pay-rpt-modal .modal-body{ overflow-x:hidden; }
.pay-rpt-toolbar{
  display:flex;
  flex-wrap:wrap;
  align-items:flex-end;
  gap:10px;
  margin-bottom:14px;
}
.pay-rpt-seg{
  display:inline-flex;
  border:1px solid var(--border);
  border-radius:999px;
  overflow:hidden;
  background:var(--surface);
}
.pay-rpt-seg button{
  appearance:none;
  border:0;
  background:transparent;
  color:var(--text);
  font:inherit;
  font-size:12.5px;
  font-weight:650;
  padding:8px 14px;
  cursor:pointer;
}
.pay-rpt-seg button.is-on{
  background:var(--green-glow);
  color:var(--green-bright);
}
.pay-rpt-picker{ display:flex; flex-direction:column; gap:4px; font-size:11.5px; color:var(--text-faint); }
.pay-rpt-picker.is-hidden{ display:none; }
.pay-rpt-picker input,
.pay-rpt-picker select{
  font:inherit;
  font-size:13px;
  color:var(--text);
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:8px;
  padding:7px 10px;
}
.pay-rpt-stats{
  display:grid;
  grid-template-columns:repeat(6, minmax(0, 1fr));
  gap:10px;
  margin:0 0 14px;
}
.pay-rpt-stats .dam-stat-card{ pointer-events:none; min-width:0; }
.pay-rpt-stats .dam-stat-card .kpi-value{ font-size:18px; overflow-wrap:anywhere; }
.pay-rpt-stats .dam-stat-card .kpi-label{ font-size:11px; }
.pay-rpt-body{ display:flex; flex-direction:column; min-height:0; }
.pay-rpt-table-wrap{ overflow:auto; max-width:100%; max-height:min(42vh, 380px); border:1px solid var(--border); border-radius:var(--radius); }
.pay-rpt-pager{ flex-shrink:0; }
.pay-rpt-table{ table-layout:fixed; width:100%; min-width:1080px; margin:0; }
.pay-rpt-table th,
.pay-rpt-table td{ padding:8px 10px; font-size:12.5px; vertical-align:middle; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.pay-rpt-table th{ text-align:left; }
.pay-rpt-table .num,
.pay-rpt-amt{ text-align:right; font-variant-numeric:tabular-nums; }
.pay-col-dt{ width:138px; }
.pay-col-ref{ width:170px; }
.pay-col-payer{ width:150px; }
.pay-col-type{ width:150px; }
.pay-col-rel{ width:130px; }
.pay-col-amt{ width:110px; }
.pay-col-method{ width:130px; }
.pay-col-status{ width:168px; }
.pay-rpt-table td:last-child{ white-space:normal; overflow:visible; text-overflow:unset; }
.pay-rpt-pager{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-top:12px;
  font-size:12.5px;
  color:var(--text-faint);
}
.pay-rpt-empty,
.pay-rpt-error,
.pay-rpt-loading{
  padding:28px 12px;
  text-align:center;
  color:var(--text-faint);
}
.pay-rpt-content.is-loading{ opacity:.7; }
@media (max-width:1100px){
  .report-grid,
  .report-grid.staff-report-grid{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
  .pay-rpt-stats{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
}
@media (max-width:640px){
  .report-grid,
  .report-grid.staff-report-grid{ grid-template-columns:minmax(0, 1fr); }
  .pay-rpt-stats{ grid-template-columns:minmax(0, 1fr); }
  .pay-rpt-toolbar{ flex-direction:column; align-items:stretch; }
  .pay-rpt-seg{ width:100%; }
  .pay-rpt-seg button{ flex:1; }
}

/* Field Inspector — Reports Center */
.insp-reports-page{
  display:flex;
  flex-direction:column;
  gap:14px;
  width:100%;
  max-width:100%;
}
.insp-reports-panel{
  width:100%;
  overflow:hidden;
}
.insp-reports-list{
  overflow-x:auto;
  overflow-y:visible;
  max-width:100%;
  -webkit-overflow-scrolling:touch;
}
.insp-reports-list .insp-rpt-list-table{
  width:100%;
  min-width:0;
  table-layout:fixed;
}
.insp-reports-list.driver-mgmt-table .data-table{
  width:100% !important;
  min-width:0 !important;
}
.insp-reports-list .col-rpt-name{ width:40%; }
.insp-reports-list .col-rpt-date{ width:15%; }
.insp-reports-list .col-rpt-records{ width:9%; }
.insp-reports-list .col-rpt-actions{ width:36%; }

/* Compact list table — fit all columns and actions on one row */
.insp-reports-list .insp-rpt-list-table{
  font-size:12px;
}
.insp-reports-list .insp-rpt-data-table thead th{
  font-size:10.5px;
  font-weight:650;
  letter-spacing:.03em;
  text-transform:uppercase;
  padding:9px 12px;
}
.insp-reports-list .insp-rpt-data-table tbody td{
  padding:8px 12px;
  font-size:12px;
  line-height:1.35;
}
.insp-reports-list .insp-report-name{
  gap:8px;
}
.insp-reports-list .insp-report-title-text{
  font-size:12px;
  font-weight:600;
  line-height:1.3;
}
.insp-reports-list .insp-report-icon{
  width:28px;
  height:28px;
  border-radius:7px;
}
.insp-reports-list .insp-report-icon svg{
  width:14px;
  height:14px;
}
.insp-reports-list .insp-report-actions{
  gap:8px;
}
.insp-reports-list .insp-rpt-actions-group{
  gap:4px;
}
.insp-reports-list .insp-rpt-actions-export{
  padding-left:8px;
}
.insp-reports-list .insp-report-actions .btn{
  min-height:28px;
  font-size:11px;
  padding:4px 8px;
  gap:4px;
}
.insp-reports-list .insp-report-actions .btn svg{
  width:12px;
  height:12px;
}
.insp-reports-list .insp-rpt-icon-btn{
  width:28px;
  height:28px;
  min-height:28px !important;
  padding:0 !important;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.insp-reports-list .insp-rpt-icon-btn svg{
  width:13px;
  height:13px;
}
.insp-reports-list .cell-num{
  font-size:11.5px;
}
.insp-reports-list .insp-col-date{
  font-size:11.5px;
}

.insp-rpt-scroll{
  overflow:auto;
  max-width:100%;
  -webkit-overflow-scrolling:touch;
}
.insp-report-table.insp-rpt-scroll{
  max-height:min(52vh, 480px);
  margin-top:4px;
}

.insp-rpt-data-table{
  border-collapse:separate;
  border-spacing:0;
  font-size:13.5px;
}
.insp-report-table .insp-rpt-data-table{
  width:max-content;
  min-width:100%;
  table-layout:auto;
  font-size:12px;
}
.insp-report-table .insp-rpt-data-table thead th{
  font-size:11px;
  padding:9px 11px;
}
.insp-report-table .insp-rpt-data-table tbody td{
  font-size:12px;
  padding:8px 11px;
}
.insp-report-table .badge{
  font-size:10.5px;
  padding:2px 8px;
}

.insp-rpt-data-table thead th{
  position:sticky;
  top:0;
  z-index:3;
  background:var(--surface-2);
  color:var(--text);
  font-size:12px;
  font-weight:700;
  letter-spacing:.02em;
  text-transform:none;
  padding:12px 16px;
  border-bottom:1px solid var(--border);
  white-space:nowrap;
  vertical-align:middle;
}
.insp-rpt-data-table tbody td{
  padding:12px 16px;
  vertical-align:middle;
  color:var(--text);
  line-height:1.45;
  border-bottom:1px solid var(--border-soft);
  white-space:normal;
}
.insp-col-date,
.insp-col-num,
.insp-col-status,
.insp-rpt-data-table .insp-cell-badge,
.insp-rpt-data-table .mono.insp-col-date,
.insp-rpt-data-table .mono.insp-col-num{
  white-space:nowrap;
}
.insp-rpt-data-table tbody tr:last-child td{ border-bottom:none; }
.insp-rpt-data-table tbody tr.insp-rpt-row-alt{ background:rgba(255,255,255,.025); }
html[data-theme="light"] .insp-rpt-data-table tbody tr.insp-rpt-row-alt{ background:rgba(15,23,42,.028); }
.insp-rpt-data-table tbody tr:hover{ background:rgba(56,189,248,.06); }
html[data-theme="light"] .insp-rpt-data-table tbody tr:hover{ background:rgba(14,165,233,.07); }
.insp-rpt-data-table tbody tr.insp-row-selected{
  background:rgba(56,189,248,.14) !important;
  box-shadow:inset 3px 0 0 var(--chart-primary);
}
html[data-theme="light"] .insp-rpt-data-table tbody tr.insp-row-selected{
  background:rgba(14,165,233,.12) !important;
}

.insp-col-num,
.insp-rpt-data-table .cell-num{ text-align:right; }
.insp-col-status,
.insp-rpt-data-table .insp-cell-badge{
  text-align:center;
  white-space:nowrap;
}
.insp-col-date{ white-space:nowrap; }
.insp-col-wrap,
.insp-rpt-data-table .cell-wrap{
  max-width:280px;
  white-space:normal;
  word-break:break-word;
  line-height:1.4;
  display:-webkit-box;
  -webkit-line-clamp:2;
  line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.insp-col-name{
  min-width:0;
  width:100%;
}

/* List table: no sticky action column — full-width fixed layout */
.insp-reports-list .insp-rpt-data-table th:last-child,
.insp-reports-list .insp-rpt-data-table td:last-child{
  position:static;
  box-shadow:none;
  background:transparent;
  white-space:normal;
}
html[data-theme="light"] .insp-reports-list .insp-rpt-data-table th:last-child,
html[data-theme="light"] .insp-reports-list .insp-rpt-data-table td:last-child{
  background:transparent;
  box-shadow:none;
}
.insp-reports-list th.insp-col-actions,
.insp-reports-list td.insp-col-actions{
  text-align:right;
  vertical-align:middle;
  padding-right:16px;
}

.insp-reports-list.driver-mgmt-table .insp-rpt-data-table th,
.insp-reports-list.driver-mgmt-table .insp-rpt-data-table td{
  white-space:normal;
}
.insp-reports-list .insp-col-date,
.insp-reports-list .insp-col-num{
  white-space:nowrap;
}

.insp-report-name{
  display:flex;
  align-items:center;
  gap:12px;
  font-weight:650;
  color:var(--text);
  min-width:0;
}
.insp-report-title-text{
  flex:1;
  min-width:0;
  line-height:1.35;
  word-break:break-word;
}
.insp-report-icon{
  width:34px;
  height:34px;
  border-radius:9px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
  background:var(--chart-glow);
  color:var(--chart-primary);
}
.insp-report-icon svg{ width:16px; height:16px; }

.insp-report-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:nowrap;
}
.insp-rpt-actions-group{
  display:inline-flex;
  align-items:center;
  gap:6px;
  flex-shrink:0;
}
.insp-rpt-actions-export{
  padding-left:10px;
  border-left:1px solid var(--border);
}
.insp-report-actions .btn{
  white-space:nowrap;
  min-height:32px;
  font-size:12px;
  padding:6px 10px;
}
.insp-rpt-export-btn{
  min-width:0;
  padding:6px 9px !important;
}
.insp-rpt-export-btn svg{
  width:13px;
  height:13px;
  flex-shrink:0;
}
.insp-rpt-icon-btn{
  width:28px;
  height:28px;
  min-width:28px;
  padding:0 !important;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.insp-rpt-icon-btn svg{
  width:13px;
  height:13px;
}

.insp-report-preview{
  display:flex;
  flex-direction:column;
  gap:0;
  max-height:72vh;
  overflow:hidden;
}
.insp-report-header{
  padding:16px;
  margin-bottom:14px;
  border:1px solid var(--border);
  border-radius:12px;
  background:var(--surface-2);
  flex-shrink:0;
}
.insp-report-agency{
  font-size:12px;
  font-weight:700;
  letter-spacing:.04em;
  text-transform:uppercase;
  color:var(--chart-primary);
}
.insp-report-org{
  font-size:13px;
  color:var(--text-dim);
  margin:4px 0 10px;
}
.insp-report-title{
  margin:0 0 14px;
  font-size:18px;
  font-weight:700;
  color:var(--text);
  line-height:1.3;
}
.insp-report-meta{ margin:0; }
.insp-report-summary{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:10px;
  margin-bottom:14px;
  flex-shrink:0;
}
.insp-report-summary-card{
  display:flex;
  flex-direction:column;
  gap:6px;
  padding:12px 14px;
  border:1px solid var(--border);
  border-radius:10px;
  background:var(--surface-2);
}
.insp-report-summary-card span{
  font-size:11.5px;
  font-weight:650;
  text-transform:uppercase;
  letter-spacing:.03em;
  color:var(--text-dim);
  line-height:1.35;
}
.insp-report-summary-card strong{
  font-size:20px;
  color:var(--text);
  text-align:right;
}

.insp-report-empty{
  padding:36px 20px;
  text-align:center;
  min-height:120px;
}
.insp-report-empty h4{
  margin:8px 0 6px;
  font-size:15px;
  color:var(--text);
}
.insp-report-empty p{
  margin:0;
  font-size:13px;
  color:var(--text-dim);
}

.insp-report-foot{
  flex-wrap:wrap;
  gap:8px;
}
.insp-report-generated-note{
  margin-bottom:14px;
  padding:10px 12px;
  border-radius:8px;
  border:1px solid rgba(34,197,94,.35);
  background:rgba(34,197,94,.1);
  color:#4ade80;
  font-size:13.5px;
  font-weight:650;
}
html[data-theme="light"] .insp-report-generated-note{
  color:#15803d;
  background:rgba(34,197,94,.12);
}
.insp-report-generating{
  text-align:center;
  padding:28px 20px;
}
.insp-report-generating h3{ margin:16px 0 8px; font-size:16px; }
.insp-report-generating p{ margin:0; color:var(--text-dim); font-size:13.5px; }
.insp-report-spinner{
  width:44px;
  height:44px;
  margin:0 auto;
  border:3px solid var(--border);
  border-top-color:var(--chart-primary);
  border-radius:50%;
  animation:inspReportSpin .8s linear infinite;
}
@keyframes inspReportSpin{ to{ transform:rotate(360deg); } }
.insp-report-progress{
  margin-top:18px;
  height:6px;
  border-radius:999px;
  background:var(--border);
  overflow:hidden;
}
.insp-report-progress-fill{
  height:100%;
  width:0;
  border-radius:inherit;
  background:var(--chart-primary);
  animation:inspReportProgress 1.2s ease forwards;
}
@keyframes inspReportProgress{
  from{ width:0; }
  to{ width:100%; }
}

html[data-theme="light"] .insp-report-header,
html[data-theme="light"] .insp-report-summary-card{
  background:#f8fafc;
  border-color:#cbd5e1;
}
html[data-theme="light"] .insp-report-title{ color:#0f172a; }
html[data-theme="light"] .insp-rpt-data-table thead th{
  background:#f1f5f9;
  color:#0f172a;
  border-bottom-color:#cbd5e1;
}
html[data-theme="light"] .insp-rpt-data-table tbody td{ color:#1e293b; }

.insp-report-table .insp-rpt-data-table th:last-child,
.insp-report-table .insp-rpt-data-table td:last-child{
  position:static;
  box-shadow:none;
  background:transparent;
}
html[data-theme="light"] .insp-report-table .insp-rpt-data-table th:last-child,
html[data-theme="light"] .insp-report-table .insp-rpt-data-table td:last-child{
  background:transparent;
}

/* Inspector Reports Center list — match .data-table / violation tracking */
.insp-reports-page .table-wrap.insp-reports-table{
  width:100%;
  max-width:none;
  overflow:auto;
}
.insp-reports-page .insp-reports-table .data-table{
  width:100%;
  min-width:0;
  table-layout:fixed;
}
.insp-reports-page .insp-reports-table .data-table thead th{
  text-align:left;
}
.insp-reports-page .insp-reports-table .col-rpt-date{
  width:132px;
  white-space:nowrap;
}
.insp-reports-page .insp-reports-table .col-rpt-records{
  width:96px;
  white-space:nowrap;
  text-align:left;
}
.insp-reports-page .insp-reports-table .col-rpt-actions,
.insp-reports-page .insp-reports-table .data-table thead th.col-rpt-actions{
  width:360px;
  text-align:right;
  white-space:nowrap;
  vertical-align:middle;
}
.insp-reports-page .insp-reports-table .insp-report-name{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}
.insp-reports-page .insp-reports-table .insp-report-title-text{
  flex:1;
  min-width:0;
  font-weight:650;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.insp-reports-page .insp-reports-table .insp-report-actions{
  flex-direction:row;
  flex-wrap:nowrap;
  justify-content:flex-end;
  align-items:center;
  gap:10px;
}
.insp-reports-page .insp-reports-table .insp-rpt-actions-export{
  padding-left:10px;
  border-left:1px solid var(--border);
  padding-top:0;
  border-top:none;
}

@media (max-width: 1100px){
  .insp-report-summary{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px){
  .insp-report-summary{ grid-template-columns:1fr; }
  .insp-rpt-actions-group{
    flex-wrap:wrap;
    justify-content:flex-end;
  }
  .insp-reports-page .insp-reports-table .data-table{
    min-width:760px;
  }
  .insp-reports-page .insp-reports-table .insp-rpt-actions-group{
    flex-wrap:nowrap;
  }
  .insp-rpt-data-table{ font-size:13px; }
  .insp-rpt-data-table thead th,
  .insp-rpt-data-table tbody td{ padding:10px 12px; }
}

/* Settings */
.settings-layout{ display:grid; grid-template-columns:220px 1fr; gap:20px; align-items:start; }
@media (max-width:800px){ .settings-layout{ grid-template-columns:1fr; } }
.settings-layout .form-card{ max-width:none; }
.settings-nav{
  display:flex; flex-direction:column; gap:2px; align-self:start;
  background:var(--glass-bg); border:1px solid var(--border); border-radius:var(--radius); padding:8px;
}
.settings-nav button{ text-align:left; padding:10px 13px; border-radius:8px; background:none; border:none; color:var(--text-dim); font-size:13px; font-weight:600; cursor:pointer; }
.settings-nav button:hover{ background:var(--surface); color:var(--text); }
.settings-nav button.active{ background:var(--accent-glow); color:var(--accent-bright); }

/* Operator Settings structural wrap (Blade also injects matching head CSS for Hostinger). */
.settings-operator-wrap{
  display:flex;
  flex-direction:column;
  gap:14px;
  width:100%;
}
.settings-operator-wrap > .settings-nav{
  display:flex;
  flex-direction:row;
  flex-wrap:wrap;
  gap:4px;
  width:100%;
}
.settings-operator-wrap > .settings-nav button{
  text-align:center;
  white-space:nowrap;
  padding:10px 16px;
}
.settings-operator-wrap > .settings-content{
  display:block;
  width:100%;
}

.toggle-row{ display:flex; align-items:center; justify-content:space-between; padding:13px 0; border-bottom:1px solid var(--border-soft); }
.toggle-row:last-child{ border-bottom:none; }
.toggle-row .tr-text b{ display:block; font-size:13px; }
.toggle-row .tr-text span{ font-size:12px; color:var(--text-faint); }
.switch{ width:40px;height:22px; padding:0; border-radius:999px; background:var(--surface-2); border:1px solid var(--border); position:relative; cursor:pointer; flex-shrink:0; }
.switch::after{ content:""; position:absolute; width:16px;height:16px; border-radius:50%; background:var(--text-faint); top:2px; left:2px; transition:.2s ease; }
.switch.on{ background:var(--green-glow); border-color:var(--green); }
.switch.on::after{ background:var(--green-bright); left:20px; }

/* Search center */
.search-hero{ display:flex; align-items:center; gap:10px; background:var(--surface); border:1px solid var(--border); border-radius:9999px; padding:14px 18px; margin-bottom:20px; }
.search-hero svg{ width:19px;height:19px; color:var(--text-faint); }
.search-hero input{ flex:1; background:none; border:none; outline:none; color:var(--text); font-size:15px; }
.search-cat-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:12px; margin-bottom:24px; }
.search-cat{ background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-sm); padding:14px; text-align:center; cursor:pointer; }
.search-cat:hover{ border-color:rgba(34,197,94,.4); }
.search-cat .sc-icon{ width:34px;height:34px; border-radius:9px; background:var(--green-glow); color:var(--green-bright); display:flex; align-items:center; justify-content:center; margin:0 auto 8px; }
.search-cat .sc-icon svg{ width:17px;height:17px; }
.search-cat span{ font-size:12px; font-weight:600; }

/* Responsive shell */
@media (max-width:1024px){
  .sidebar{ transform:translateX(-100%); width:min(280px, 85vw); }
  .sidebar.open{ transform:translateX(0); box-shadow:var(--shadow-lg); }
  .main-col{ margin-left:0; }
  .hamburger{ display:flex; }
  .topbar-brand-text span,
  .topbar-city-sub{ display:none; }
  .content{
    padding:
      var(--shell-gutter-y, 16px)
      max(var(--shell-page-inset, 18px), var(--shell-gutter-x, 14px), env(safe-area-inset-right, 0px))
      calc(48px + env(safe-area-inset-bottom, 0px))
      max(var(--shell-page-inset, 18px), var(--shell-gutter-x, 14px), env(safe-area-inset-left, 0px));
  }
}
@media (max-width:1024px){
  html[data-theme="light"] .sidebar.open{
    box-shadow:8px 0 28px rgba(24,35,63,.18);
  }
  .nav-item{
    font-size:11.5px;
  }
  .nav-item-label{
    white-space:normal;
    overflow-wrap:anywhere;
  }
}
.scrim{ position:fixed; inset:0; background:rgba(0,0,0,.5); z-index:35; display:none; }
.scrim.show{ display:block; }

@media (max-width:520px){
  .kpi-grid{ grid-template-columns:repeat(2,1fr); }
  .page-head{ flex-direction:column; align-items:flex-start; }
  .modal{ max-width:100%; }
}

/* ---------- Application Tracking (Operator) ---------- */
.track-page{ display:flex; flex-direction:column; gap:4px; }

.track-columns{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
  align-items:stretch;
  margin-bottom:8px;
}
@media (max-width:980px){
  .track-columns{ grid-template-columns:1fr; }
}

.track-column{
  display:flex;
  flex-direction:column;
  min-height:320px;
  border:1px solid var(--border);
  border-radius:var(--radius);
  background:var(--glass-bg);
  backdrop-filter:blur(12px);
  overflow:hidden;
}
.track-column-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:16px 18px 14px;
  border-bottom:1px solid var(--border);
}
.track-column-head h2{
  margin:0 0 4px;
  font-size:15px;
  font-weight:650;
  color:var(--text);
}
.track-column-head p{
  margin:0;
  font-size:12.5px;
  color:var(--text-dim);
  line-height:1.4;
}
.track-column-count{
  min-width:34px;
  height:34px;
  border-radius:10px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:14px;
  font-weight:700;
  background:var(--surface-2);
  color:var(--text);
  flex-shrink:0;
}

.track-list{
  display:flex;
  flex-direction:column;
  flex:1;
  overflow:auto;
  max-height:min(62vh, 640px);
}
.track-list-empty{
  margin:auto;
  padding:28px 18px;
}

.track-list-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto auto;
  align-items:center;
  gap:12px;
  width:100%;
  text-align:left;
  padding:14px 16px;
  border:0;
  border-bottom:1px solid var(--border);
  background:transparent;
  color:inherit;
  text-decoration:none;
  cursor:pointer;
  font:inherit;
  transition:background .15s ease;
}
.track-list-row:last-child{ border-bottom:0; }
.track-list-row:hover{ background:rgba(255,255,255,.03); }
html[data-theme="light"] .track-list-row:hover{ background:rgba(15,23,42,.03); }
.track-list-row.selected{
  background:rgba(56,189,248,.08);
  box-shadow:inset 3px 0 0 var(--accent-bright);
}
html[data-theme="light"] .track-list-row.selected{
  background:rgba(234,179,8,.1);
  box-shadow:inset 3px 0 0 #eab308;
}
.track-list-row:focus-visible{
  outline:2px solid var(--green);
  outline-offset:-2px;
}
.track-list-row.on-hold .track-list-title{ color:#fcd34d; }

.track-list-main{ min-width:0; }
.track-list-id-row{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin-bottom:4px;
}
.track-list-id{
  font-size:12px;
  color:var(--text-dim);
  font-weight:600;
}
.track-type-pill.compact{
  font-size:10px;
  padding:2px 7px;
}
.track-list-title{
  font-size:13.5px;
  font-weight:650;
  color:var(--text);
  line-height:1.3;
  margin-bottom:2px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.track-list-meta{
  font-size:12px;
  color:var(--text-dim);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.track-list-side{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:6px;
  min-width:118px;
}
.track-list-progress{
  display:flex;
  align-items:center;
  gap:8px;
  width:100%;
  min-width:110px;
}
.track-list-progress .track-progress-bar.mini{ flex:1; }
.track-list-pct{
  font-size:11px;
  color:var(--text-dim);
  min-width:28px;
  text-align:right;
}
.track-list-updated{
  font-size:11px;
  color:var(--text-faint);
}
.track-list-chevron{
  width:18px;
  height:18px;
  color:var(--text-faint);
  display:flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
}
.track-list-chevron svg{ width:16px; height:16px; }

.track-detail-body .track-timeline{ margin-top:8px; }

.track-preview-list{
  border:1px solid var(--border);
  border-radius:var(--radius);
  background:var(--glass-bg);
  max-height:none;
  overflow:hidden;
  margin-bottom:8px;
}
.track-preview-list .track-list-row{ grid-template-columns:minmax(0,1fr) auto auto; }

.track-section-block{
  margin-bottom:28px;
  padding:18px 18px 8px;
  border:1px solid var(--border);
  border-radius:var(--radius);
  background:var(--glass-bg);
}
.track-subsection-label{
  font-size:12px;
  font-weight:650;
  color:var(--text-dim);
  letter-spacing:.02em;
  text-transform:uppercase;
  margin:14px 0 10px;
}

.track-summary-row{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:14px;
  margin:18px 0 24px;
}
@media (max-width:900px){
  .track-summary-row{ grid-template-columns:repeat(2,1fr); }
}
@media (max-width:640px){
  .track-summary-row{ grid-template-columns:1fr; }
}

.track-summary-card{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:4px;
  padding:18px 20px;
  background:var(--glass-bg);
  backdrop-filter:blur(12px);
  border:1px solid var(--border);
  border-radius:var(--radius);
  transition:border-color .15s ease, transform .15s ease;
}
.track-summary-card.highlight{
  border-color:rgba(56,189,248,.35);
  background:linear-gradient(145deg,var(--glass-bg),var(--accent-glow));
}
html[data-theme="light"] .track-summary-card.highlight{
  border-color:rgba(234,179,8,.4);
  background:linear-gradient(145deg,var(--glass-bg),var(--accent-glow));
}
.track-summary-icon{
  width:36px;height:36px;
  border-radius:10px;
  background:var(--green-glow);
  color:var(--green-bright);
  display:flex; align-items:center; justify-content:center;
  margin-bottom:4px;
}
.track-summary-icon svg{ width:18px;height:18px; }
.track-summary-card.highlight .track-summary-icon{
  background:var(--accent-glow);
  color:var(--accent-bright);
}
.track-summary-value{
  font-size:28px;
  font-weight:700;
  line-height:1.1;
  color:var(--text);
}
.track-summary-label{
  font-size:12px;
  color:var(--text-dim);
  font-weight:600;
}

.track-app-list{
  display:flex;
  flex-direction:column;
  gap:14px;
  margin-bottom:28px;
}

.track-app-card{
  background:var(--glass-bg);
  backdrop-filter:blur(12px);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:18px 20px;
  cursor:pointer;
  transition:border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.track-app-card:hover{
  border-color:rgba(34,197,94,.35);
  box-shadow:0 4px 24px rgba(0,0,0,.12);
  transform:translateY(-1px);
}
.track-app-card:focus-visible{
  outline:2px solid var(--green);
  outline-offset:2px;
}
.track-app-card.expanded{
  border-color:rgba(56,189,248,.4);
  cursor:default;
}
html[data-theme="light"] .track-app-card.expanded{
  border-color:rgba(234,179,8,.45);
}
.track-app-card.compact{
  padding:14px 16px;
  cursor:pointer;
}
.track-app-card.compact:hover{ transform:none; }

.track-app-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:12px;
}
.track-app-head-main{ flex:1; min-width:0; }
.track-app-type-row{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin-bottom:6px;
}
.track-app-id{
  font-size:12px;
  font-weight:700;
  color:var(--accent-bright);
  letter-spacing:.02em;
}
.track-type-pill{
  font-size:10.5px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.04em;
  padding:3px 8px;
  border-radius:999px;
  background:var(--surface-2);
  color:var(--text-dim);
  border:1px solid var(--border-soft);
}
.track-app-head h3{
  margin:0 0 4px;
  font-size:16px;
  font-weight:700;
  color:var(--text);
  line-height:1.3;
}
.track-app-meta{
  margin:0;
  font-size:12px;
  color:var(--text-dim);
}

.track-app-details{ margin-bottom:14px; }
.track-app-note{
  display:flex;
  align-items:flex-start;
  gap:8px;
  padding:12px 14px;
  margin-bottom:14px;
  border-radius:var(--radius-sm);
  background:rgba(245,158,11,.1);
  border:1px solid rgba(245,158,11,.22);
  font-size:12.5px;
  color:var(--text);
  line-height:1.45;
}
.track-app-note svg{
  width:16px;height:16px;
  flex-shrink:0;
  margin-top:1px;
  color:#fcd34d;
}
.track-app-card:not(.on-hold) .track-app-note{
  background:var(--accent-glow);
  border-color:rgba(56,189,248,.2);
}
html[data-theme="light"] .track-app-card:not(.on-hold) .track-app-note{
  background:var(--accent-glow);
  border-color:rgba(234,179,8,.25);
}

.track-app-mini{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  font-size:12.5px;
  color:var(--text-dim);
  margin-bottom:8px;
}
.track-next-hint{
  margin:8px 0 0;
  font-size:11.5px;
  color:var(--accent-bright);
  font-weight:600;
}
.track-expand-hint{
  margin:10px 0 0;
  font-size:11px;
  color:var(--text-faint);
  text-align:center;
}

.track-current-banner{
  display:flex;
  align-items:flex-start;
  gap:14px;
  padding:14px 16px;
  margin:16px 0 18px;
  border-radius:var(--radius-sm);
  background:linear-gradient(135deg,var(--accent-glow),transparent);
  border:1px solid rgba(56,189,248,.25);
}
html[data-theme="light"] .track-current-banner{
  border-color:rgba(234,179,8,.3);
  background:linear-gradient(135deg,var(--accent-glow),transparent);
}
.track-current-banner.hold{
  background:linear-gradient(135deg,rgba(245,158,11,.12),transparent);
  border-color:rgba(245,158,11,.28);
}
.track-current-banner.done{
  background:linear-gradient(135deg,var(--green-glow),transparent);
  border-color:rgba(34,197,94,.28);
}
.track-current-icon{
  width:40px;height:40px;
  border-radius:11px;
  background:var(--accent-glow);
  color:var(--accent-bright);
  display:flex; align-items:center; justify-content:center;
  flex-shrink:0;
}
.track-current-banner.hold .track-current-icon{
  background:rgba(245,158,11,.15);
  color:#fcd34d;
}
.track-current-banner.done .track-current-icon{
  background:var(--green-glow);
  color:var(--green-bright);
}
.track-current-icon svg{ width:20px;height:20px; }
.track-current-label{
  display:block;
  font-size:10.5px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.06em;
  color:var(--text-faint);
  margin-bottom:2px;
}
.track-current-banner strong{
  display:block;
  font-size:15px;
  font-weight:700;
  color:var(--text);
  margin-bottom:4px;
}
.track-next-label{
  display:block;
  font-size:12px;
  color:var(--accent-bright);
  font-weight:600;
}

.track-progress-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:8px;
}
.track-progress-label{
  font-size:12px;
  font-weight:600;
  color:var(--text-dim);
}
.track-progress-pct{
  font-size:13px;
  font-weight:700;
  color:var(--green-bright);
}

.track-progress-bar{
  height:8px;
  border-radius:999px;
  background:var(--surface-2);
  border:1px solid var(--border-soft);
  overflow:hidden;
  margin-bottom:12px;
}
.track-progress-bar.mini{
  height:5px;
  margin-bottom:0;
}
.track-progress-bar > span,
.track-progress-fill{
  display:block;
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg,var(--green-dim),var(--green-bright));
  transition:width .5s ease;
}
.track-progress-fill.hold{
  background:linear-gradient(90deg,#92400e,#fcd34d);
}
.track-progress-fill.done{
  background:linear-gradient(90deg,var(--green-dim),var(--green-bright));
}

.track-legend{
  display:flex;
  flex-wrap:wrap;
  gap:12px 18px;
  margin-bottom:16px;
  padding-bottom:14px;
  border-bottom:1px solid var(--border-soft);
}
.track-legend span{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:11px;
  color:var(--text-faint);
  font-weight:600;
}
.track-legend-dot{
  width:8px;height:8px;
  border-radius:50%;
  display:inline-block;
}
.track-legend-dot.done{ background:var(--green-bright); }
.track-legend-dot.active{ background:var(--accent-bright); }
.track-legend-dot.hold{ background:#fcd34d; }
.track-legend-dot.pending{ background:var(--text-faint); opacity:.5; }

.track-timeline{
  display:flex;
  flex-direction:column;
  gap:0;
  position:relative;
  padding-left:4px;
}
.track-timeline.compact .track-stage-title{ font-size:12px; }
.track-timeline.compact .track-stage-meta{ display:none; }

.track-stage{
  display:flex;
  gap:14px;
  position:relative;
  padding-bottom:18px;
}
.track-stage:last-child{ padding-bottom:0; }
.track-stage:not(:last-child)::before{
  content:"";
  position:absolute;
  left:15px;
  top:28px;
  bottom:0;
  width:2px;
  background:var(--border);
}
.track-stage-completed:not(:last-child)::before,
.track-stage-completed:not(:last-child)::before{
  background:var(--green-dim);
}
.track-stage-completed:not(:last-child)::before{ background:var(--green-dim); }

.track-stage-marker{
  width:32px;height:32px;
  border-radius:50%;
  flex-shrink:0;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:14px;
  font-weight:700;
  border:2px solid var(--border);
  background:var(--surface);
  color:var(--text-faint);
  z-index:1;
}
.track-stage-marker svg{ width:14px;height:14px; }
.track-stage-completed .track-stage-marker{
  background:var(--green-glow);
  border-color:var(--green);
  color:var(--green-bright);
}
.track-stage-in_progress .track-stage-marker{
  background:var(--accent-glow);
  border-color:var(--accent);
  color:var(--accent-bright);
  box-shadow:0 0 0 4px var(--accent-glow);
}
.track-stage-hold .track-stage-marker{
  background:rgba(245,158,11,.15);
  border-color:#f59e0b;
  color:#fcd34d;
  box-shadow:0 0 0 4px rgba(245,158,11,.12);
}

.track-stage-body{ flex:1; min-width:0; padding-top:4px; }
.track-stage-title{
  font-size:13.5px;
  font-weight:600;
  color:var(--text);
  margin-bottom:6px;
  line-height:1.3;
}
.track-stage-completed .track-stage-title{ color:var(--text-dim); }
.track-stage-in_progress .track-stage-title{ color:var(--text); font-weight:700; }
.track-stage-meta{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px 12px;
}
.track-stage-date{
  font-size:11px;
  color:var(--text-faint);
}

.track-status-pill{
  display:inline-block;
  font-size:10px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.04em;
  padding:3px 8px;
  border-radius:999px;
}
.track-status-pill.done{
  background:var(--green-glow);
  color:var(--green-bright);
}
.track-status-pill.active{
  background:var(--accent-glow);
  color:var(--accent-bright);
}
.track-status-pill.hold{
  background:rgba(245,158,11,.14);
  color:#fcd34d;
}
.track-status-pill.pending{
  background:var(--surface-2);
  color:var(--text-faint);
}

.track-empty{
  padding:36px 24px;
  text-align:center;
  background:var(--glass-bg);
  border:1px dashed var(--border);
  border-radius:var(--radius);
}

@media (max-width:520px){
  .track-app-head{ flex-direction:column; }
  .track-app-head .badge{ align-self:flex-start; }
  .track-stage-title{ font-size:12.5px; }
  .track-current-banner{ flex-direction:column; gap:10px; }
  .track-legend{ gap:8px 12px; }
}

/* ---------- Staff Franchise Workflow ---------- */
.fw-page{ display:flex; flex-direction:column; gap:4px; }
.fw-page .page-head{
  flex-wrap:nowrap;
  align-items:flex-start;
}
.fw-page .page-head > div:first-child{
  min-width:0;
  flex:1;
}
.fw-page .page-head .actions{ flex-shrink:0; }

.fw-summary.track-summary-row{
  grid-template-columns:repeat(4,1fr);
}
@media (max-width:900px){
  .fw-summary.track-summary-row{ grid-template-columns:repeat(2,1fr); }
}
@media (max-width:520px){
  .fw-summary.track-summary-row{ grid-template-columns:1fr; }
}

.fw-filter-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:4px 0 18px;
}
.fw-filter-chip{
  padding:7px 14px;
  border-radius:9999px;
  border:1px solid var(--border);
  background:var(--surface);
  color:var(--text-dim);
  font-size:12px;
  font-weight:600;
  cursor:pointer;
  transition:border-color .15s ease, background .15s ease, color .15s ease;
}
.fw-filter-chip:hover{
  border-color:rgba(34,197,94,.35);
  color:var(--text);
}
.fw-filter-chip.active{
  background:var(--green-glow);
  border-color:var(--green);
  color:var(--green-bright);
}

/* Compact franchise application / renewal list */
.fw-list-panel{
  padding:0;
  overflow:hidden;
  margin-top:4px;
}
.fw-list-head{
  display:grid;
  grid-template-columns:minmax(140px,1.15fr) minmax(110px,1fr) minmax(90px,.75fr) minmax(120px,1fr) minmax(100px,.85fr) minmax(120px,1fr) minmax(90px,.7fr) auto;
  gap:10px;
  padding:12px 16px;
  font-size:11px;
  font-weight:700;
  letter-spacing:.03em;
  text-transform:uppercase;
  color:var(--text-faint);
  border-bottom:1px solid var(--border);
  background:rgba(0,0,0,.12);
}
.fw-list-head.is-renewal{
  grid-template-columns:minmax(140px,1.15fr) minmax(110px,1fr) minmax(90px,.75fr) minmax(100px,.85fr) minmax(120px,1fr) minmax(90px,.7fr) auto;
}
html[data-theme="light"] .fw-list-head{
  background:rgba(24,35,63,.04);
}
.fw-list-row{
  text-decoration:none;
  color:inherit;
  display:grid;
  grid-template-columns:minmax(140px,1.15fr) minmax(110px,1fr) minmax(90px,.75fr) minmax(120px,1fr) minmax(100px,.85fr) minmax(120px,1fr) minmax(90px,.7fr) auto;
  gap:10px;
  align-items:center;
  padding:12px 16px;
  border-bottom:1px solid var(--border);
  cursor:pointer;
  transition:background .15s ease;
}
.fw-list-row:last-child{ border-bottom:0; }
.fw-list-row:hover{ background:rgba(255,255,255,.03); }
html[data-theme="light"] .fw-list-row:hover{ background:rgba(15,23,42,.03); }
.fw-list-panel:has(.fw-list-head.is-renewal) .fw-list-row{
  grid-template-columns:minmax(140px,1.15fr) minmax(110px,1fr) minmax(90px,.75fr) minmax(100px,.85fr) minmax(120px,1fr) minmax(90px,.7fr) auto;
}
.fw-list-cell{
  min-width:0;
  font-size:12.5px;
  color:var(--text);
}
.fw-list-id{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:4px;
}
.fw-list-id .mono{ font-size:12px; font-weight:650; color:var(--text); }
.fw-kind-tag{
  font-size:9.5px;
  font-weight:800;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--accent-bright);
}
.fw-list-operator b{
  display:block;
  font-size:13px;
  font-weight:650;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.fw-list-franchise,
.fw-list-date,
.fw-list-type{
  color:var(--text-dim);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.fw-list-progress{
  display:flex;
  align-items:center;
  gap:8px;
}
.fw-list-progress .track-progress-bar.mini{
  flex:1;
  min-width:40px;
  max-width:72px;
}
.fw-list-progress .mono{
  font-size:11px;
  font-weight:700;
  color:var(--text-dim);
  min-width:2.4em;
}
.fw-list-action{ justify-self:end; }
.fw-list-action .btn{ white-space:nowrap; }
.fw-list-row.on-hold .fw-list-operator b{ color:#fcd34d; }

@media (max-width:1100px){
  .fw-list-head{ display:none; }
  .fw-list-row,
  .fw-list-panel:has(.fw-list-head.is-renewal) .fw-list-row{
    grid-template-columns:minmax(0,1fr) auto;
    gap:8px 12px;
  }
  .fw-list-id{ grid-column:1; }
  .fw-list-operator{ grid-column:1; }
  .fw-list-franchise,
  .fw-list-type,
  .fw-list-date{ display:none; }
  .fw-list-status{ grid-column:2; grid-row:1; justify-self:end; }
  .fw-list-progress{ grid-column:1; }
  .fw-list-action{ grid-column:2; grid-row:2 / span 2; align-self:center; }
}

.fw-detail-page{ display:flex; flex-direction:column; gap:16px; margin-top:8px; }
.fw-detail-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.fw-detail-head{ margin-bottom:0; }
.fw-detail-section h3{
  display:flex;
  align-items:center;
  gap:8px;
  margin:0 0 14px;
  font-size:15px;
}
.fw-detail-section h3 svg{ width:16px; height:16px; color:var(--accent-bright); }
.fw-req-block{ margin-top:16px; }
.fw-req-block h4{
  margin:0 0 8px;
  font-size:12px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:var(--text-faint);
}
.fw-req-list{
  margin:0;
  padding:0;
  list-style:none;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.fw-req-list li{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 12px;
  border-radius:999px;
  border:1px solid var(--border-soft);
  background:var(--surface-2);
  font-size:12px;
  font-weight:600;
  color:var(--text-dim);
}
.fw-req-pill-status{
  font-size:10px;
  font-weight:700;
  letter-spacing:.03em;
  text-transform:uppercase;
  color:var(--text-faint);
}
.fw-status-track{
  display:flex;
  width:100%;
  justify-content:center;
  box-sizing:border-box;
  border-radius:9999px;
  padding:8px 16px;
}
.fw-detail-section .track-app-note{ margin:16px 0 0; }
.fw-records-intro{ margin-top:16px; }
.fw-records-intro h3{
  display:flex;
  align-items:center;
  gap:8px;
  margin:0 0 6px;
  font-size:15px;
}
.fw-records-intro h3 svg{ width:16px; height:16px; color:var(--accent-bright); }
.fw-records-intro p{ margin:0; font-size:13px; color:var(--text-dim); }
.fw-records-toolbar{
  display:flex;
  flex-wrap:wrap;
  gap:10px 12px;
  align-items:center;
}
.fw-records-toolbar .select-filter{
  width:auto;
  min-width:160px;
  max-width:280px;
}
.fw-records-exports{ display:flex; gap:10px; }
.fw-workflow-block{ margin-top:4px; }
.fw-stage-num{
  font-variant-numeric:tabular-nums;
  font-weight:700;
  color:var(--accent-bright);
}
.track-stage.is-active{
  background:rgba(56,189,248,.08);
  border-radius:10px;
  box-shadow:inset 3px 0 0 var(--accent-bright);
  padding-left:8px;
  margin-left:-8px;
}
html[data-theme="light"] .track-stage.is-active{
  background:rgba(234,179,8,.1);
  box-shadow:inset 3px 0 0 #eab308;
}
.fw-stage-alert{
  display:flex;
  align-items:flex-start;
  gap:8px;
  margin-top:8px;
  padding:10px 12px;
  border-radius:8px;
  background:rgba(245,158,11,.12);
  border:1px solid rgba(245,158,11,.28);
  color:#fcd34d;
  font-size:12.5px;
  line-height:1.4;
}
.fw-stage-alert svg{ width:14px; height:14px; flex-shrink:0; margin-top:2px; }
html[data-theme="light"] .fw-stage-alert{
  color:#92400e;
  background:rgba(245,158,11,.12);
}

.fw-compliance-panel,
.fw-inspection-panel{
  margin-bottom:0;
  padding:16px 18px;
  border-radius:var(--radius);
  border:1px solid var(--border);
  background:var(--glass-bg);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
}
.fw-compliance-panel h4,
.fw-inspection-panel h4{
  display:flex;
  align-items:center;
  gap:8px;
  margin:0 0 12px;
  font-size:14px;
  color:var(--text);
}
.fw-compliance-panel h4 svg,
.fw-inspection-panel h4 svg{ width:16px;height:16px; color:var(--green-bright); }

.fw-compliance-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
@media (max-width:640px){
  .fw-compliance-grid{ grid-template-columns:1fr; }
}
.fw-compliance-item span{
  display:block;
  font-size:10.5px;
  color:var(--text-faint);
  margin-bottom:3px;
  text-transform:uppercase;
  letter-spacing:.03em;
  font-weight:600;
}
.fw-compliance-item b{
  font-size:12.5px;
  color:var(--text);
  line-height:1.4;
}

.fw-inspection-sched{
  margin:0 0 10px;
  font-size:12.5px;
  color:var(--text-dim);
}
.fw-inspection-result{
  display:flex;
  flex-direction:column;
  gap:6px;
  padding:10px 12px;
  border-radius:8px;
  background:var(--surface);
  border:1px solid var(--border);
}
.fw-inspection-result.pass{ border-color:rgba(34,197,94,.3); }
.fw-inspection-result.fail{ border-color:rgba(239,68,68,.3); }
.fw-inspection-result p{
  margin:0;
  font-size:12px;
  color:var(--text-dim);
  line-height:1.45;
}

.fw-step-actions{
  margin-top:12px;
  padding-top:12px;
  border-top:1px solid var(--border);
  display:flex;
  flex-direction:column;
  gap:10px;
}
.fw-step-action-btns{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
}
.fw-btn-warn{
  border-color:rgba(245,158,11,.35) !important;
  color:#fcd34d !important;
}
html[data-theme="light"] .fw-btn-warn{
  background:#ffffff !important;
  color:#92400e !important;
  border:1.5px solid #d97706 !important;
  font-weight:650;
}
html[data-theme="light"] .fw-btn-warn:hover{
  background:#fef3c7 !important;
  border-color:#b45309 !important;
  color:#78350f !important;
}

.track-stage-rejected .track-stage-marker{
  background:rgba(239,68,68,.14);
  border-color:#ef4444;
  color:#fca5a5;
}
.track-stage-rejected .track-stage-title{ color:#fca5a5; }

.fw-timeline{ margin-top:4px; }

/* ---- Staff workflow process wizards ---- */
.fw-process-wizard{ max-height:min(72vh, 680px); overflow-y:auto; }
.fw-proc-track .step-label{ font-size:10px; max-width:88px; white-space:normal; line-height:1.2; }
.fw-proc-foot-right{ display:flex; gap:8px; margin-left:auto; }
.modal-foot{ display:flex; align-items:center; justify-content:space-between; gap:12px; }
.fw-process-summary{ margin-bottom:14px; }
.fw-process-note{
  margin-top:12px;
  padding:12px 14px;
  border-radius:8px;
  background:var(--surface-2);
  border:1px solid var(--border-soft);
  font-size:12.5px;
  line-height:1.45;
  color:var(--text-dim);
}
.fw-process-hint{ font-size:12px; margin-top:8px; }
.fw-checklist{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.fw-checklist-item{
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:12px 14px;
  border-radius:10px;
  border:1px solid var(--border-soft);
  background:var(--surface-2);
  cursor:pointer;
  font-size:13px;
  font-weight:600;
  color:var(--text);
}
.fw-checklist-item input{ margin-top:2px; flex-shrink:0; accent-color:var(--green); }
.fw-req-status-list,
.fw-eval-grid{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.fw-req-status-row,
.fw-eval-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) 140px;
  gap:10px;
  align-items:center;
  padding:10px 12px;
  border-radius:8px;
  border:1px solid var(--border-soft);
  background:var(--surface-2);
  font-size:12.5px;
}
.fw-eval-row{
  grid-template-columns:minmax(0,1fr) 150px minmax(0,1fr);
}
.fw-eval-label{ font-weight:600; color:var(--text); }
.fw-eval-select,
.fw-req-status-row select{
  width:100%;
  padding:8px 10px;
  border-radius:9999px;
  border:1px solid var(--border);
  background:var(--surface);
  color:var(--text);
  font-size:12px;
}
.fw-eval-remark{
  width:100%;
  padding:8px 10px;
  border-radius:9999px;
  border:1px solid var(--border);
  background:var(--surface);
  color:var(--text);
  font-size:12px;
}
.fw-summary-card{
  padding:16px 18px;
  line-height:1.45;
}
.fw-summary-card p{ margin:0 0 8px; }
.fw-ref-id{
  font-size:11px;
  font-weight:700;
  color:var(--text-faint);
  font-family:monospace;
}
.fw-decision-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.fw-decision-option{
  display:flex;
  align-items:center;
  gap:10px;
  padding:14px 16px;
  border-radius:10px;
  border:1px solid var(--border-soft);
  background:var(--surface-2);
  cursor:pointer;
  font-size:13px;
  font-weight:600;
}
.fw-decision-option input{ accent-color:var(--green); }
.fw-completeness-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:16px;
}
.fw-stage-lock{
  display:flex;
  align-items:flex-start;
  gap:8px;
  margin-top:8px;
  font-size:12px;
  color:var(--text-faint);
  line-height:1.35;
}
.fw-stage-lock svg{ width:13px; height:13px; flex-shrink:0; margin-top:2px; }
.track-stage.is-locked{ opacity:.72; }
.fw-step-action-desc{
  margin:0;
  font-size:12.5px;
  line-height:1.4;
}
.fw-stage-alert-inline{
  display:flex;
  align-items:flex-start;
  gap:8px;
  color:#fcd34d;
  font-size:12.5px;
}
html[data-theme="light"] .fw-stage-alert-inline{ color:#92400e; }
.fw-forward-confirm{
  text-align:center;
  padding:28px 20px !important;
}
.fw-forward-icon{
  width:48px;
  height:48px;
  margin:0 auto 12px;
  border-radius:50%;
  background:var(--green-glow);
  color:var(--green-bright);
  display:flex;
  align-items:center;
  justify-content:center;
}
.fw-forward-icon svg{ width:24px; height:24px; }
.fw-forward-confirm h4{
  margin:0 0 8px;
  font-size:16px;
}
@media (max-width:720px){
  .fw-eval-row{ grid-template-columns:1fr; }
  .fw-req-status-row{ grid-template-columns:1fr; }
}

/* =========================================================
   Operator Dashboard
   ========================================================= */
.op-dashboard{ display:flex; flex-direction:column; gap:14px; min-width:0; max-width:100%; }
.op-dashboard-simple{ gap:12px; }
.op-dashboard-simple .op-dash-head{
  margin-bottom:4px;
  align-items:flex-start;
  gap:12px;
}
.op-dashboard-simple .op-dash-head > div:first-child{
  min-width:0;
  flex:1 1 auto;
  max-width:100%;
}
.op-dashboard-simple .op-dash-head h1{
  font-size:clamp(1.05rem, 2.4vw + 0.7rem, 1.35rem);
  margin:0 0 2px;
  line-height:1.25;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.op-dashboard-simple .op-dash-head p{
  font-size:12.5px;
  line-height:1.4;
}
.op-dashboard-simple .op-dash-head .actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
}
.op-dashboard-simple .op-dash-head .actions > .btn{
  min-height:40px;
  justify-content:center;
}

.op-kpi-grid{
  display:grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap:12px;
  margin-bottom:2px;
  width:100%;
  min-width:0;
}
.op-dashboard-simple .op-kpi-grid{
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap:12px;
  margin-bottom:6px;
}
a.op-kpi-card,
button.op-kpi-card{
  appearance:none;
  -webkit-appearance:none;
  font:inherit;
  text-align:left;
  cursor:pointer;
  width:100%;
  color:inherit;
  padding:14px 15px;
  gap:0;
  min-height:0;
  border-radius:12px;
  transform:none;
}
a.op-kpi-card:hover,
button.op-kpi-card:hover{
  transform:translateY(-2px);
  box-shadow:0 8px 20px rgba(0,0,0,.2);
}
.op-kpi-inner{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:10px;
  min-width:0;
}
.op-kpi-card .kpi-icon{
  width:34px;
  height:34px;
  border-radius:9px;
  flex-shrink:0;
}
.op-kpi-card .kpi-icon svg{ width:16px; height:16px; }
.op-kpi-text{
  display:flex;
  flex-direction:column;
  gap:4px;
  min-width:0;
  width:100%;
}
.op-kpi-card .kpi-value{
  font-size:22px;
  font-weight:700;
  letter-spacing:-.02em;
  line-height:1.15;
}
.op-kpi-card .kpi-label{
  font-size:12.5px;
  line-height:1.35;
  color:var(--text-dim);
  white-space:normal;
  overflow:visible;
  overflow-wrap:anywhere;
}
a.op-kpi-card{
  text-decoration:none;
  color:inherit;
  display:block;
  box-sizing:border-box;
}
.op-kpi-card.tone-blue .kpi-value{ color:#7dd3fc; }
.op-kpi-card.tone-amber .kpi-value{ color:#fbbf24; }
.op-kpi-card.tone-red .kpi-value{ color:#fca5a5; }
.op-kpi-card.tone-green .kpi-value{ color:#4ade80; }
.op-kpi-card.tone-blue:hover .kpi-value{ color:#7dd3fc; }
.op-kpi-card.tone-amber:hover .kpi-value{ color:#fbbf24; }
.op-kpi-card.tone-red:hover .kpi-value{ color:#fca5a5; }
.op-kpi-card.tone-green:hover .kpi-value{ color:#4ade80; }
html[data-theme="light"] .op-kpi-card.tone-blue .kpi-value,
html[data-theme="light"] .op-kpi-card.tone-blue:hover .kpi-value{ color:#0369a1; }
html[data-theme="light"] .op-kpi-card.tone-amber .kpi-value,
html[data-theme="light"] .op-kpi-card.tone-amber:hover .kpi-value{ color:#b45309; }
html[data-theme="light"] .op-kpi-card.tone-red .kpi-value,
html[data-theme="light"] .op-kpi-card.tone-red:hover .kpi-value{ color:#b91c1c; }
html[data-theme="light"] .op-kpi-card.tone-green .kpi-value,
html[data-theme="light"] .op-kpi-card.tone-green:hover .kpi-value{ color:#15803d; }
.op-kpi-card.tone-green{ border-color:rgba(34,197,94,.32); }
.op-kpi-card.tone-green .kpi-icon-glow{ color:#4ade80 !important; background:rgba(34,197,94,.14) !important; }
.op-kpi-card.tone-amber{ border-color:rgba(245,158,11,.35); }
.op-kpi-card.tone-amber .kpi-icon-glow{ color:#fbbf24 !important; background:rgba(245,158,11,.14) !important; }
.op-kpi-card.tone-red{ border-color:rgba(239,68,68,.35); }
.op-kpi-card.tone-red .kpi-icon-glow{ color:#fca5a5 !important; background:rgba(239,68,68,.14) !important; }
.op-kpi-card.tone-blue{ border-color:rgba(56,189,248,.32); }
.op-kpi-card.tone-blue .kpi-icon-glow{ color:#7dd3fc !important; background:rgba(56,189,248,.14) !important; }
html[data-theme="light"] .op-kpi-card.tone-green .kpi-icon-glow{ color:#15803d !important; }
html[data-theme="light"] .op-kpi-card.tone-amber .kpi-icon-glow{ color:#b45309 !important; }
html[data-theme="light"] .op-kpi-card.tone-red .kpi-icon-glow{ color:#b91c1c !important; }
html[data-theme="light"] .op-kpi-card.tone-blue .kpi-icon-glow{ color:#0369a1 !important; }

.op-section-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  margin-top:2px;
  margin-bottom:0;
}
.op-section-head h2{
  margin:0;
  font-size:14.5px;
  font-weight:650;
  color:var(--text);
}
.op-section-head p{ display:none; }
.op-period-toggle{
  display:inline-flex;
  gap:4px;
  padding:4px;
  border:1px solid var(--border);
  border-radius:12px;
  background:var(--surface-2);
}
.op-period-btn{
  appearance:none;
  border:0;
  background:transparent;
  color:var(--text-dim);
  font:inherit;
  font-size:13px;
  font-weight:650;
  padding:9px 16px;
  border-radius:9999px;
  cursor:pointer;
  min-height:40px;
}
.op-period-btn:hover{ color:var(--text); background:rgba(255,255,255,.04); }
.op-period-btn.active{
  background:var(--chart-primary);
  color:#041018;
  box-shadow:0 4px 14px var(--chart-glow);
}
html[data-theme="light"] .op-period-btn.active{ color:#fff; }

.op-analytics-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:16px;
}
.op-chart-card{
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:16px 16px 14px;
  min-height:0;
}
.op-chart-meta{
  display:flex;
  justify-content:space-between;
  gap:14px;
  align-items:flex-start;
  flex-wrap:wrap;
}
.op-chart-range{
  display:inline-block;
  font-size:11.5px;
  font-weight:700;
  letter-spacing:.03em;
  text-transform:uppercase;
  color:var(--text-dim);
  margin-bottom:6px;
}
.op-chart-card .chart-title{
  font-size:15px;
  font-weight:700;
  color:var(--text);
  margin:0 0 4px;
}
.op-chart-card .chart-subtitle{
  font-size:12.5px;
  color:var(--text-dim);
  line-height:1.45;
  max-width:360px;
}
.op-chart-summary{
  text-align:right;
  min-width:140px;
}
.op-chart-total{
  font-size:26px;
  font-weight:750;
  line-height:1.1;
  color:var(--text);
}
.op-chart-total-label,
.op-chart-pct,
.op-chart-compare{
  font-size:11.5px;
  color:var(--text-dim);
  margin-top:2px;
}
.op-chart-pct{ font-weight:650; color:var(--text); margin-top:4px; }
.op-trend{
  display:inline-flex;
  align-items:center;
  gap:5px;
  margin-top:8px;
  padding:4px 8px;
  border-radius:8px;
  font-size:11.5px;
  font-weight:650;
  border:1px solid var(--border);
}
.op-trend svg{ width:14px; height:14px; }
.op-trend.up{ color:#4ade80; background:rgba(34,197,94,.12); border-color:rgba(34,197,94,.35); }
.op-trend.down{ color:#fca5a5; background:rgba(239,68,68,.12); border-color:rgba(239,68,68,.35); }
.op-trend.flat{ color:var(--text-dim); background:var(--surface-2); }
html[data-theme="light"] .op-trend.up{ color:#15803d; }
html[data-theme="light"] .op-trend.down{ color:#b91c1c; }
.op-chart-mount{ min-height:220px; }
.op-chart-open{
  align-self:flex-start;
  margin-top:2px;
  min-height:38px;
  font-size:12.5px;
}

.op-panel{ margin:0; }
.op-dashboard-simple .op-panel .driver-mgmt-panel-head{
  align-items:center;
  padding:10px 12px;
  gap:8px;
}
.op-dashboard-simple .op-panel .driver-mgmt-panel-head h2{
  margin:0;
  font-size:14px;
}
.op-dashboard-simple .op-panel .driver-mgmt-panel-head p{ display:none; }

.op-dash-table{
  max-height:none;
  overflow:auto;
}
.op-dashboard-simple .op-dash-table .data-table{
  width:100%;
  table-layout:fixed;
  min-width:0;
}
.op-dashboard-simple .op-dash-table .data-table th,
.op-dashboard-simple .op-dash-table .data-table td{
  padding:8px 10px;
  font-size:12.5px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.op-dashboard-simple .op-dash-table .data-table th:last-child,
.op-dashboard-simple .op-dash-table .data-table td:last-child{
  position:static;
  box-shadow:none;
  background:transparent;
}
html[data-theme="light"] .op-dashboard-simple .op-dash-table .data-table th:last-child,
html[data-theme="light"] .op-dashboard-simple .op-dash-table .data-table td:last-child{
  background:transparent;
  box-shadow:none;
}

.op-expire-table .data-table{ min-width:0; }
.op-expire-table col.col-driver{ width:22%; }
.op-expire-table col.col-req{ width:24%; }
.op-expire-table col.col-expiry{ width:18%; }
.op-expire-table col.col-days{ width:18%; }
.op-expire-table col.col-status{ width:18%; }
.op-dashboard-simple .op-expire-table .data-table th,
.op-dashboard-simple .op-expire-table .data-table td{
  white-space:normal;
  overflow:visible;
  text-overflow:clip;
  line-height:1.35;
  vertical-align:middle;
}
.op-dashboard-simple .op-expire-table .data-table td:nth-child(3),
.op-dashboard-simple .op-expire-table .data-table td:nth-child(4),
.op-dashboard-simple .op-expire-table .data-table td:nth-child(5){
  white-space:nowrap;
}
.op-table-foot{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:8px 12px;
  border-top:1px solid var(--border);
  font-size:12px;
}
.op-dash-empty{
  padding:18px 12px;
  min-height:0;
}
.op-dash-empty h4{ font-size:13px; margin:0; }

.op-panel .driver-mgmt-table .data-table tr[data-compliance-id],
.op-panel .driver-mgmt-table .data-table tr[data-activity-id]{ cursor:pointer; }
.op-panel .driver-mgmt-table .data-table tr[data-compliance-id]:hover,
.op-panel .driver-mgmt-table .data-table tr[data-activity-id]:hover,
.op-panel .driver-mgmt-table .data-table tr[data-compliance-id]:focus-visible{
  background:rgba(56,189,248,.07);
  outline:none;
}
html[data-theme="light"] .op-panel .driver-mgmt-table .data-table tr[data-compliance-id]:hover,
html[data-theme="light"] .op-panel .driver-mgmt-table .data-table tr[data-activity-id]:hover,
html[data-theme="light"] .op-panel .driver-mgmt-table .data-table tr[data-compliance-id]:focus-visible{
  background:rgba(14,165,233,.08);
}

.op-bottom-grid{ align-items:stretch; gap:12px; }
.op-bottom-grid-simple > .op-panel{
  min-height:0;
  display:flex;
  flex-direction:column;
}
.op-dash-notif-list{
  max-height:280px;
  overflow:auto;
  padding:2px 8px 8px;
}
.op-dashboard-simple .op-dash-notif-list .activity-item{
  gap:10px;
  padding:8px 4px;
}
.op-dashboard-simple .op-dash-notif-list .activity-text b{
  font-size:12.5px;
  font-weight:650;
}
.op-dashboard-simple .op-dash-notif-list .activity-time{
  margin-top:2px;
  font-size:11px;
}

.op-vio-stats{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:10px;
  padding:14px 16px;
}
button.op-stat-card{
  appearance:none;
  border:1px solid var(--border);
  border-radius:12px;
  background:var(--surface-2);
  padding:12px 14px;
  text-align:left;
  cursor:pointer;
  color:inherit;
  font:inherit;
  transition:border-color .15s ease, transform .15s ease;
}
button.op-stat-card:hover{ border-color:var(--chart-primary); transform:translateY(-1px); }
.op-stat-label{
  display:block;
  font-size:11.5px;
  font-weight:650;
  color:var(--text-dim);
  margin-bottom:4px;
}
.op-stat-value{
  font-size:22px;
  font-weight:750;
  color:var(--text);
}
.op-stat-card.tone-green{ border-color:rgba(34,197,94,.35); }
.op-stat-card.tone-green .op-stat-value{ color:#4ade80; }
.op-stat-card.tone-amber{ border-color:rgba(245,158,11,.4); }
.op-stat-card.tone-amber .op-stat-value{ color:#fbbf24; }
.op-stat-card.tone-red{ border-color:rgba(239,68,68,.4); }
.op-stat-card.tone-red .op-stat-value{ color:#fca5a5; }
html[data-theme="light"] .op-stat-card.tone-green .op-stat-value{ color:#15803d; }
html[data-theme="light"] .op-stat-card.tone-amber .op-stat-value{ color:#b45309; }
html[data-theme="light"] .op-stat-card.tone-red .op-stat-value{ color:#b91c1c; }

.row-critical{ background:rgba(239,68,68,.08); }
.row-warn{ background:rgba(245,158,11,.08); }
html[data-theme="light"] .row-critical{ background:rgba(239,68,68,.1); }
html[data-theme="light"] .row-warn{ background:rgba(245,158,11,.12); }

.op-expire-overdue{ color:#fca5a5; font-weight:650; }
.op-expire-soon{ color:#fbbf24; font-weight:650; }
html[data-theme="light"] .op-expire-overdue{ color:#b91c1c; }
html[data-theme="light"] .op-expire-soon{ color:#b45309; }
.op-dash-notif-list .activity-item{
  text-decoration:none;
  color:inherit;
  border-radius:10px;
  padding:10px 12px;
  align-items:flex-start;
}
.op-dash-notif-list .activity-item.unread{
  background:rgba(56,189,248,.1);
}
html[data-theme="light"] .op-dash-notif-list .activity-item.unread{
  background:rgba(14,165,233,.1);
}
.op-dash-notif-list .activity-item b{
  display:inline;
}
.op-dash-notif-list .op-notif-kind{
  display:block;
  font-size:10px;
  font-weight:700;
  letter-spacing:.04em;
  text-transform:uppercase;
  color:var(--text-dim);
  margin-bottom:2px;
}

/* Operator dashboard breakpoints (aligned to project shell ranges). */
@media (max-width: 1100px){
  .op-analytics-grid{ grid-template-columns: 1fr; }
  .op-bottom-grid-simple{ grid-template-columns: 1fr; }
  .kpi-grid-4{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Tablet: two-column KPI cards */
@media (min-width: 768px) and (max-width: 1024px){
  .op-kpi-grid,
  .op-dashboard-simple .op-kpi-grid,
  .op-dashboard .kpi-grid.op-kpi-grid,
  .kpi-grid-5{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Large mobile / phones: single-column KPI cards */
@media (max-width: 767.98px){
  .op-kpi-grid,
  .op-dashboard-simple .op-kpi-grid,
  .op-dashboard .kpi-grid.op-kpi-grid,
  .op-dashboard .kpi-grid,
  .kpi-grid-5{ grid-template-columns: 1fr; }
  .op-vio-stats{ grid-template-columns: 1fr 1fr; }
  .op-chart-summary{ text-align:left; }
  .op-section-head{ flex-direction:row; align-items:center; }
  .op-expire-table .data-table{ min-width:520px; }
  .op-dashboard-simple .op-dash-table .data-table{ min-width:560px; table-layout:auto; }
  .op-dashboard-simple .op-kpi-card,
  .op-dashboard-simple a.op-kpi-card,
  .op-dashboard-simple button.op-kpi-card{
    padding:14px 16px;
    width:100%;
  }
  .op-dashboard-simple .op-kpi-inner{
    flex-direction:row;
    align-items:center;
    gap:14px;
  }
  .op-dashboard-simple .op-kpi-text{ flex:1 1 auto; }
  .op-dashboard-simple .op-kpi-card .kpi-value{ font-size:24px; }
  .op-dashboard-simple .op-kpi-card .kpi-label{ font-size:13px; }
}
@media (max-width: 430px){
  .op-vio-stats{ grid-template-columns: 1fr; }
}

/* =========================================================
   Operator — Franchise Management
   ========================================================= */
.op-fm-page{ display:flex; flex-direction:column; gap:4px; }
.op-fm-head{ margin-bottom:4px; }
.op-fm-head h1{ margin:0 0 4px; }
.op-fm-head p{ margin:0; max-width:72ch; }
.op-fm-req{
  overflow-x:hidden;
}
.op-fm-req .op-fm-step-track{
  max-width:none;
  margin-bottom:18px;
  gap:10px;
}
.op-fm-req .op-fm-step-track .step{
  font-size:13.5px;
  padding:8px 6px;
}
.op-fm-req .op-fm-step-track .step .num{
  width:38px;
  height:38px;
  font-size:16px;
  border-radius:50%;
  flex:0 0 38px;
}
.op-fm-req .op-fm-step-track .line{
  margin-top:18px;
}
.op-fm-req .op-fm-step-track .step.current .num{
  box-shadow:0 0 0 4px rgba(56,189,248,.22);
}
.op-fm-peek{
  position:relative;
  display:block;
  width:100%;
  max-width:960px;
  margin:0 auto;
  padding:0 52px;
}
.op-fm-peek-viewport{
  width:100%;
  overflow:hidden;
  padding:12px 0 18px;
}
.op-fm-peek-track{
  --i: 0;
  --slide: 68%;
  --gap: 18px;
  display:flex;
  align-items:center;
  gap:var(--gap);
  width:100%;
  transform:translateX(calc((100% - var(--slide)) / 2 - var(--i) * (var(--slide) + var(--gap))));
  transition:transform .4s cubic-bezier(.22,.7,.25,1);
  will-change:transform;
}
.op-fm-peek-slide{
  flex:0 0 var(--slide);
  width:var(--slide);
  min-width:var(--slide);
  max-width:var(--slide);
  box-sizing:border-box;
  cursor:pointer;
}
.op-fm-step-card{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:8px;
  padding:22px 24px;
  background:var(--bg-soft);
  border:1.5px solid var(--border);
  border-radius:16px;
  color:var(--text);
  opacity:.46;
  transform:scale(.9);
  transform-origin:center center;
  transition:opacity .4s ease, transform .4s cubic-bezier(.22,.7,.25,1), border-color .4s ease, box-shadow .4s ease;
}
.op-fm-peek-slide.is-active{
  cursor:default;
}
.op-fm-peek-slide.is-active .op-fm-step-card{
  opacity:1;
  transform:scale(1);
  border-color:var(--green, #38bdf8);
  box-shadow:
    0 0 0 1px var(--green, #38bdf8),
    0 14px 36px rgba(56,189,248,.22);
}
.op-fm-step-card-top{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:4px;
}
.op-fm-step-badge{
  width:42px;
  height:42px;
  border-radius:50%;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:18px;
  font-weight:800;
  background:var(--surface-2);
  border:1.5px solid var(--border);
  color:var(--text);
}
.op-fm-peek-slide.is-active .op-fm-step-badge{
  background:var(--green-glow, rgba(56,189,248,.18));
  color:var(--green-bright, #7dd3fc);
  border-color:var(--green, #38bdf8);
  box-shadow:0 0 0 4px rgba(56,189,248,.18);
}
.op-fm-step-kicker{
  font-size:12px;
  font-weight:700;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--text-dim);
}
.op-fm-step-card h3{
  margin:0;
  font-size:22px;
  font-weight:750;
  line-height:1.25;
  color:var(--text);
}
.op-fm-step-card p{
  margin:0;
  font-size:15px;
  line-height:1.55;
  color:var(--text-dim);
  font-weight:550;
}
.op-fm-doc-list{
  margin:8px 0 0;
  padding-left:18px;
  font-size:13.5px;
  line-height:1.45;
  color:var(--text);
  max-height:none;
}
.op-fm-doc-list li{ margin-bottom:4px; }
.op-fm-step-card .rsc-tags{ margin-top:8px; }
.op-fm-peek-btn{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  width:44px;
  height:44px;
  border-radius:999px;
  border:1px solid var(--border);
  background:var(--surface-2);
  color:var(--text);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  padding:0;
  z-index:3;
  transition:background .2s ease, border-color .2s ease, opacity .2s ease;
}
.op-fm-peek-btn[data-op-fm-prev]{ left:6px; }
.op-fm-peek-btn[data-op-fm-next]{ right:6px; }
.op-fm-peek-btn svg{ width:20px; height:20px; }
.op-fm-peek-btn:hover:not(:disabled){
  border-color:var(--green, #38bdf8);
  background:var(--green-glow, rgba(56,189,248,.14));
}
.op-fm-peek-btn:disabled{
  opacity:.35;
  cursor:default;
}
.op-fm-peek-dots{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:10px;
  margin:4px 0 8px;
}
.op-fm-peek-dot{
  width:10px;
  height:10px;
  border-radius:50%;
  border:1.5px solid var(--border);
  background:var(--surface-2);
  padding:0;
  cursor:pointer;
  transition:background .25s ease, border-color .25s ease, width .25s ease, box-shadow .25s ease;
}
.op-fm-peek-dot.is-active{
  width:22px;
  border-radius:999px;
  background:var(--chart-primary, var(--green-bright, #7dd3fc));
  border-color:var(--chart-primary, var(--green, #38bdf8));
  box-shadow:0 0 0 3px rgba(56,189,248,.2);
}
html[data-theme="light"] .op-fm-peek-slide.is-active .op-fm-step-card{
  border-color:#364B76;
  box-shadow:0 0 0 1px #364B76, 0 14px 32px rgba(54,75,118,.18);
}
html[data-theme="light"] .op-fm-peek-slide.is-active .op-fm-step-badge{
  background:linear-gradient(135deg, #93b4e0, #364B76);
  color:#fff;
  border-color:#18233F;
}
html[data-theme="light"] .op-fm-peek-dot.is-active{
  background:linear-gradient(135deg, #93b4e0, #364B76);
  border-color:#18233F;
  box-shadow:0 0 0 3px rgba(54,75,118,.18);
}
html[data-theme="light"] .op-fm-req .op-fm-step-track .step.current .num{
  background:linear-gradient(135deg, #93b4e0, #364B76);
  color:#fff;
  border-color:#18233F;
}
@media (prefers-reduced-motion: reduce){
  .op-fm-peek-track,
  .op-fm-step-card,
  .op-fm-peek-dot{
    transition:none;
  }
}
@media (max-width:720px){
  .op-fm-peek{
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    gap:8px;
    padding:0;
  }
  .op-fm-peek-viewport{
    order:-1;
    width:100%;
    flex:1 1 100%;
    padding:4px 0 10px;
  }
  .op-fm-peek-track{
    --slide: 100%;
    --gap: 12px;
    transform:translateX(calc(-1 * var(--i) * (var(--slide) + var(--gap))));
  }
  .op-fm-step-card{
    transform:none;
    opacity:1;
    padding:18px 16px;
  }
  .op-fm-peek-slide:not(.is-active) .op-fm-step-card{
    opacity:1;
    transform:none;
  }
  .op-fm-peek-slide.is-active .op-fm-step-card{
    transform:none;
  }
  .op-fm-step-card h3{ font-size:18px; }
  .op-fm-step-card p{ font-size:14px; }
  .op-fm-peek-btn{
    position:static;
    transform:none;
    width:40px;
    height:40px;
  }
}
.op-fm-wizard{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:14px 18px;
  margin:4px 0 18px;
  background:var(--glass-bg);
  border:1px solid var(--border);
  border-radius:var(--radius);
  backdrop-filter:blur(12px);
}
.op-fm-wizard-mid{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
  min-width:0;
}
.op-fm-dots{ display:flex; align-items:center; gap:8px; }
.op-fm-dot{
  width:8px;
  height:8px;
  border-radius:50%;
  background:var(--surface-2);
  border:1.5px solid var(--border);
}
.op-fm-dot.is-active{
  width:22px;
  border-radius:999px;
  background:var(--chart-primary, var(--green-bright));
  border-color:var(--chart-primary, var(--green));
  box-shadow:0 0 0 3px rgba(56,189,248,.2);
}
.op-fm-step-label{ font-size:13.5px; font-weight:700; color:var(--text); }
.op-fm-wiz-btn{
  min-width:96px;
  min-height:36px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
}
.overlay.op-wiz-overlay{
  z-index:240;
  padding:16px;
  align-items:flex-start;
  overflow-y:auto;
}
.op-wiz-modal{
  max-width:980px;
  width:min(980px, 100%);
  max-height:calc(100vh - 32px);
  margin:auto;
  overflow:hidden;
}
.op-wiz-shell{
  display:flex;
  flex-direction:column;
  min-height:0;
  max-height:calc(100vh - 32px);
  overflow:hidden;
}
.op-wiz-body{ padding:18px 22px 12px; overflow-y:auto; flex:1 1 auto; min-height:0; }
.op-wiz-file{
  position:absolute;
  width:1px;
  height:1px;
  opacity:0;
  overflow:hidden;
  clip:rect(0,0,0,0);
}
.op-wiz-form .form-grid{ gap:10px 12px; }
.op-wiz-form .mtop-form-head{ margin-bottom:12px; }
.op-wiz-form .mtop-declaration{ margin:12px 0; }
.op-wiz-steps{
  display:flex;
  flex-wrap:wrap;
  align-items:flex-start;
  gap:8px 6px;
  margin:0 0 18px;
}
.op-wiz-step{
  display:flex;
  align-items:flex-start;
  gap:8px;
  color:var(--text-dim);
  font-size:12px;
  font-weight:650;
  line-height:1.35;
  max-width:220px;
}
.op-wiz-step .num{
  width:22px; height:22px; border-radius:50%; flex-shrink:0;
  display:inline-flex; align-items:center; justify-content:center;
  font-size:11px; font-weight:700;
  background:var(--surface-2); border:1px solid var(--border); color:var(--text-dim);
}
.op-wiz-step.current{ color:var(--text); }
.op-wiz-step.current .num{
  background:var(--green-glow); color:var(--green-bright); border-color:var(--green);
}
.op-wiz-step.done{ color:var(--text); }
.op-wiz-step.done .num{
  background:var(--green); color:#04150a; border-color:var(--green);
}
.op-wiz-line{
  flex:1 1 24px;
  min-width:16px;
  max-width:48px;
  height:1px;
  background:var(--border);
  align-self:center;
  margin-top:0;
}
.op-wiz-intro{ margin:0 0 14px; }
.op-wiz-intro h2{
  margin:0 0 4px;
  font-size:18px;
  font-weight:700;
  color:var(--text);
}
.op-wiz-intro p{
  margin:0;
  font-size:13px;
  color:var(--text-dim);
}
.op-wiz-form{
  background:transparent;
  border:none;
  padding:0;
}
.op-wiz-form .official-form-title{
  font-size:14px;
  letter-spacing:.08em;
}
.mtop-id-photo .op-wiz-file{ position:absolute; }
.op-wiz-docs{ display:flex; flex-direction:column; gap:10px; }
.op-wiz-doc{
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px 14px;
  border:1px solid var(--border);
  border-radius:14px;
  background:var(--surface-2);
}
.op-wiz-doc-num{
  width:28px; height:28px; border-radius:8px; flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
  background:var(--bg-soft); border:1px solid var(--border);
  font-size:12px; font-weight:700; color:var(--text);
}
.op-wiz-doc-text{ flex:1; min-width:0; }
.op-wiz-doc-text b{ display:block; color:var(--text); font-size:13.5px; }
.op-wiz-doc-text span{ display:block; font-size:12px; color:var(--text-dim); margin-top:2px; }
.op-wiz-doc-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-shrink:0;
}
.op-wiz-upload{
  display:inline-flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:4px;
  min-width:76px;
  height:56px;
  padding:6px 10px;
  border:1.5px dashed var(--border);
  border-radius:10px;
  background:var(--bg-soft);
  color:var(--text);
  font-size:11.5px;
  font-weight:650;
  cursor:pointer;
}
.op-wiz-upload input{ display:none; }
.op-wiz-upload svg{ width:16px; height:16px; color:var(--text-dim); }
.op-wiz-status{
  min-width:132px;
  height:36px;
  border-radius:9999px;
  border:1px solid var(--border);
  background:var(--bg-soft);
  color:var(--text);
  font:inherit;
  font-size:12.5px;
  padding:0 10px;
}
.op-wiz-review{
  border:1px solid var(--border);
  border-radius:14px;
  background:var(--surface-2);
  padding:16px 18px;
}
.op-wiz-review .detail-grid{ margin:0 0 16px; }
.op-wiz-review h4{
  margin:0 0 10px;
  font-size:13.5px;
  color:var(--text);
}
.op-wiz-rev-list{ display:flex; flex-direction:column; gap:8px; }
.op-wiz-rev-doc{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:12px;
  background:var(--bg-soft);
}
.op-wiz-rev-dot{
  width:10px; height:10px; border-radius:50%;
  background:var(--text-faint); flex-shrink:0;
}
.op-wiz-rev-doc b{ flex:1; color:var(--text); font-size:13px; font-weight:650; }
.op-wiz-foot{ justify-content:space-between; }
.op-wiz-foot-mid{ display:flex; justify-content:center; flex:1; }
@media (max-width:720px){
  .op-wiz-step{ max-width:100%; }
  .op-wiz-line{ display:none; }
  .op-wiz-doc{ flex-wrap:wrap; }
  .op-wiz-doc-actions{ width:100%; justify-content:flex-end; }
}
.op-fm-apps h2{
  margin:0 0 12px;
  font-size:18px;
  font-weight:700;
}
.op-fm-filter{
  margin:0 0 12px;
}
.op-fm-filter select{
  width:100%;
  min-height:42px;
  border-radius:9999px;
  border:1px solid var(--border);
  background:var(--glass-bg);
  color:var(--text);
  padding:10px 14px;
  font:inherit;
  font-size:13.5px;
}
.op-fm-table .data-table{
  width:100%;
}
.op-fm-table .data-table th,
.op-fm-table .data-table td{
  white-space:nowrap;
  font-size:12.5px;
}
.op-fm-list-card{
  margin:14px 0 18px;
  overflow:visible;
}
.op-fm-list-card .table-wrap{
  border:none;
  background:transparent;
  box-shadow:none;
  max-width:100%;
}
.op-fm-list-head{
  padding:16px 18px 0;
  margin:0;
}
.op-fm-list-head h2{ margin:0; }
.op-fm-row-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  white-space:nowrap;
}
.op-fm-row-actions .btn{ min-height:32px; padding:6px 14px; }
form[data-mtop-lock-stepper] .mtop-part-dot{ cursor:pointer; }
.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea{
  border-color:#b91c1c;
}
.op-fm-eye{
  width:36px;
  min-width:36px;
  height:32px;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.op-fm-eye svg{ width:16px; height:16px; }
.op-fm-pagination{
  padding:12px 14px;
  border-top:1px solid var(--border);
}
@media (max-width:720px){
  .op-fm-wizard{ flex-wrap:wrap; }
  .op-fm-wizard-mid{ order:-1; width:100%; }
  .op-fm-wiz-btn{ flex:1; }
  .op-fm-row-actions{ flex-wrap:wrap; justify-content:flex-start; }
}

/* =========================================================
   Operator — History Logs
   ========================================================= */
.op-history-page{
  display:flex;
  flex-direction:column;
  gap:14px;
}
.op-history-head{ margin-bottom:2px; }
.op-history-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.op-history-item,
button.op-history-item{
  appearance:none;
  -webkit-appearance:none;
  display:flex;
  align-items:center;
  gap:14px;
  width:100%;
  text-align:left;
  font:inherit;
  color:inherit;
  cursor:pointer;
  padding:14px 16px;
  border:1px solid var(--border);
  border-radius:var(--radius);
  background:var(--glass-bg);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  transition:border-color .15s ease, transform .15s ease, background .15s ease;
}
.op-history-item:hover,
button.op-history-item:hover{
  border-color:var(--chart-primary);
  transform:translateY(-1px);
  background:var(--surface-2);
}
.op-history-item:focus-visible,
button.op-history-item:focus-visible{
  outline:2px solid var(--chart-primary);
  outline-offset:2px;
}
.op-history-item-icon{
  width:40px;
  height:40px;
  border-radius:10px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
  background:var(--chart-glow);
  color:var(--chart-primary);
}
.op-history-item-icon svg{ width:18px; height:18px; }
.op-history-item-body{
  display:flex;
  flex-direction:column;
  gap:3px;
  min-width:0;
  flex:1;
}
.op-history-item-title{
  font-size:14.5px;
  font-weight:650;
  color:var(--text);
}
.op-history-item-desc{
  font-size:12.5px;
  color:var(--text-dim);
  line-height:1.4;
}
.op-history-item-meta{
  display:flex;
  align-items:center;
  gap:10px;
  flex-shrink:0;
}
.op-history-item-count{
  font-size:12px;
  font-weight:650;
  color:var(--text-dim);
  padding:4px 8px;
  border-radius:8px;
  border:1px solid var(--border);
  background:var(--surface-2);
}
.op-history-item-chevron{
  display:flex;
  color:var(--text-dim);
}
.op-history-item-chevron svg{ width:16px; height:16px; }
a.op-history-item{ text-decoration:none; color:inherit; }
.op-history-item:hover .op-history-item-chevron,
button.op-history-item:hover .op-history-item-chevron{ color:var(--chart-primary); }
.op-history-item.is-selected{
  border-color:var(--chart-primary);
  background:var(--surface-2);
  box-shadow:0 0 0 1px var(--chart-glow);
}
.op-history-category-chips{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  padding:0 var(--panel-pad-x, 14px) 12px;
}
.op-history-category-chips .btn.is-on{
  border-color:var(--chart-primary);
  background:var(--chart-glow);
  color:var(--chart-primary);
  font-weight:650;
}
@media (max-width:640px){
  .op-history-item{
    flex-wrap:wrap;
    gap:10px;
    padding:12px;
  }
  .op-history-item-meta{
    width:100%;
    justify-content:space-between;
    padding-left:54px;
  }
  .op-history-category-chips{
    padding-left:12px;
    padding-right:12px;
  }
}

.op-history-panel{ margin:0; }
.op-history-panel-head{
  align-items:center !important;
}
.op-history-panel-title{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}
.op-history-panel-icon{
  width:36px;
  height:36px;
  border-radius:9px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
  background:var(--chart-glow);
  color:var(--chart-primary);
}
.op-history-panel-icon svg{ width:17px; height:17px; }
.op-history-panel-title h2{ margin:0 0 2px; }
.op-history-panel-title p{ margin:0; }
.op-history-close svg{ width:14px; height:14px; }
.op-history-filters{
  align-items:flex-end;
  gap:12px;
}
.op-history-filters label{
  min-width:0;
}
.op-history-filters .select-filter{
  min-width:160px;
  color:var(--text);
  background:var(--surface-2);
  border-color:var(--border);
}
.op-history-filters input[type="date"].select-filter{
  min-width:150px;
  color-scheme: dark;
}
html[data-theme="light"] .op-history-filters input[type="date"].select-filter{
  color-scheme: light;
}
.op-history-date-field.is-hidden{ display:none; }
.op-history-filter-actions{
  display:flex;
  align-items:flex-end;
  padding-bottom:1px;
  margin-left:auto;
}
.op-history-table .data-table{
  width:100%;
  min-width:640px;
}
.op-history-table .data-table th:last-child,
.op-history-table .data-table td:last-child{
  position:static;
  box-shadow:none;
  background:transparent;
}
.op-history-table .data-table thead th:last-child{
  background:var(--surface-2);
}
html[data-theme="light"] .op-history-table .data-table th:last-child,
html[data-theme="light"] .op-history-table .data-table td:last-child{
  box-shadow:none;
  background:transparent;
}
html[data-theme="light"] .op-history-table .data-table thead th:last-child{
  background:var(--surface-2);
}
.op-history-table .data-table thead th{
  background:var(--surface-2);
  color:var(--text);
  border-bottom:1px solid var(--border);
}
.op-history-table .data-table th,
.op-history-table .data-table td{
  padding:10px 12px;
  font-size:13px;
  vertical-align:top;
  color:var(--text);
}
.op-history-table .data-table td.cell-dim{
  color:var(--text-dim);
}
.op-history-table .data-table tbody tr:nth-child(even){
  background:rgba(255,255,255,.02);
}
html[data-theme="light"] .op-history-table .data-table tbody tr:nth-child(even){
  background:rgba(15,23,42,.025);
}
.op-history-table .data-table td:nth-child(3){
  white-space:normal;
  line-height:1.4;
  max-width:420px;
}
.op-history-sort,
button.op-history-sort{
  appearance:none;
  border:0;
  background:transparent;
  color:inherit;
  font:inherit;
  font-weight:650;
  padding:0;
  margin:0;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:6px;
  text-align:left;
  text-decoration:none;
}
.op-history-sort:hover,
button.op-history-sort:hover{ color:var(--chart-primary); }
.op-history-sort:focus-visible,
button.op-history-sort:focus-visible{
  outline:2px solid var(--chart-primary);
  outline-offset:2px;
  border-radius:4px;
}
.op-history-sort-ind{
  font-size:10px;
  opacity:.35;
  min-width:10px;
}
.op-history-sort-ind.active{
  opacity:1;
  color:var(--chart-primary);
}
html[data-theme="light"] .op-history-item-title,
html[data-theme="light"] .op-history-panel-title h2{
  color:#0f172a;
}
html[data-theme="light"] .op-history-item-desc,
html[data-theme="light"] .op-history-panel-title p{
  color:#1e293b;
}
html[data-theme="light"] .op-history-item,
html[data-theme="light"] button.op-history-item{
  background:#fff;
  border-color:#cbd5e1;
}
html[data-theme="light"] .op-history-item:hover,
html[data-theme="light"] button.op-history-item:hover{
  background:#f8fafc;
  border-color:#38bdf8;
}

@media (max-width: 720px){
  .op-history-item,
  button.op-history-item{
    flex-wrap:wrap;
    gap:10px;
  }
  .op-history-item-meta{ margin-left:auto; }
  .op-history-panel-head{
    flex-direction:column;
    align-items:flex-start !important;
  }
  .op-history-close{ align-self:stretch; justify-content:center; }
  .op-history-filters{ align-items:stretch; }
  .op-history-filters label{ width:100%; }
  .op-history-filters .select-filter{ min-width:0; width:100%; }
  .op-history-filter-actions{ margin-left:0; width:100%; }
  .op-history-filter-actions .btn{ width:100%; justify-content:center; }
}

/* =========================================================
   Field Inspector — Inspection Schedule
   ========================================================= */
.schedule-page{ display:flex; flex-direction:column; gap:14px; }
.sched-banner{
  display:flex;
  align-items:flex-start;
  gap:12px;
  padding:14px 16px;
}
.sched-banner-icon{
  width:36px;height:36px;border-radius:10px;flex-shrink:0;
  background:var(--chart-glow); color:var(--chart-primary);
  display:flex; align-items:center; justify-content:center;
}
.sched-banner-icon svg{ width:18px;height:18px; }
.sched-banner b{ display:block; margin-bottom:4px; }
.sched-banner p{ margin:0; font-size:12.5px; color:var(--text-dim); line-height:1.45; }
.sched-view-toggle{ display:flex; gap:6px; flex-shrink:0; }
.sched-view-btn{
  padding:7px 14px;
  border-radius:999px;
  border:1px solid var(--border);
  background:var(--surface-2);
  color:var(--text);
  font-size:12.5px;
  font-weight:650;
  text-decoration:none;
}
.sched-view-btn.active{
  background:#38bdf8;
  border-color:#38bdf8;
  color:#041018;
}
.sched-panel-count{
  min-width:32px;
  height:28px;
  padding:0 10px;
  border-radius:8px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid var(--border);
  background:var(--surface-2);
  font-weight:700;
  font-size:13px;
}
.sched-cal-empty{
  color:var(--text-faint);
  font-size:12px;
  padding:8px 4px;
}
.schedule-page .driver-mgmt-panel{
  overflow:hidden;
  max-width:100%;
}
.schedule-page .schedule-table-panel{
  min-height:0;
}
.schedule-page .schedule-table-empty{
  margin:0 16px 18px;
  min-height:80px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.schedule-page .table-wrap.driver-mgmt-table{
  overflow-x:auto;
  overflow-y:visible;
  max-width:100%;
  padding-bottom:0;
}
.schedule-page .driver-mgmt-table .data-table{
  width:100%;
  min-width:900px;
  table-layout:fixed;
  border-collapse:collapse;
  border-spacing:0;
}
.schedule-page .driver-mgmt-table.franchise-table .data-table{ min-width:980px; }
.schedule-page .driver-mgmt-table.reinspect-table .data-table{ min-width:900px; }

.schedule-page .driver-mgmt-table.franchise-table col.col-id{ width:12%; }
.schedule-page .driver-mgmt-table.franchise-table col.col-op{ width:12%; }
.schedule-page .driver-mgmt-table.franchise-table col.col-fr{ width:14%; }
.schedule-page .driver-mgmt-table.franchise-table col.col-veh{ width:15%; }
.schedule-page .driver-mgmt-table.franchise-table col.col-dt{ width:12%; }
.schedule-page .driver-mgmt-table.franchise-table col.col-loc{ width:12%; }
.schedule-page .driver-mgmt-table.franchise-table col.col-st{ width:11%; }
.schedule-page .driver-mgmt-table.franchise-table col.col-act{ width:12%; }

.schedule-page .driver-mgmt-table.reinspect-table col.col-id{ width:15%; }
.schedule-page .driver-mgmt-table.reinspect-table col.col-op{ width:14%; }
.schedule-page .driver-mgmt-table.reinspect-table col.col-fr{ width:15%; }
.schedule-page .driver-mgmt-table.reinspect-table col.col-prev{ width:13%; }
.schedule-page .driver-mgmt-table.reinspect-table col.col-dt{ width:14%; }
.schedule-page .driver-mgmt-table.reinspect-table col.col-st{ width:13%; }
.schedule-page .driver-mgmt-table.reinspect-table col.col-act{ width:16%; }

.schedule-page .driver-mgmt-table .data-table th,
.schedule-page .driver-mgmt-table .data-table td{
  position:static;
  z-index:auto;
  padding:14px 16px;
  vertical-align:middle;
  white-space:normal;
  overflow:hidden;
  word-break:break-word;
  overflow-wrap:break-word;
  line-height:1.45;
  border-right:0;
  background:transparent;
  box-shadow:none;
}
.schedule-page .driver-mgmt-table .data-table thead th{
  white-space:normal;
  line-height:1.35;
  background:var(--surface-2);
  border-bottom:1px solid var(--border);
}
.schedule-page .driver-mgmt-table .data-table tbody td{
  border-bottom:1px solid var(--border-soft);
  color:var(--text);
}
.schedule-page .driver-mgmt-table .data-table tbody tr:last-child td{
  border-bottom:none;
}
.schedule-page .driver-mgmt-table .data-table tbody tr:hover td{
  background:var(--surface-hover);
}
.schedule-page .driver-mgmt-table .data-table .mono{
  white-space:normal;
  word-break:break-word;
  font-size:12.5px;
}
.schedule-page .driver-mgmt-table .sched-wrap-cell{
  white-space:normal;
  line-height:1.45;
}
.schedule-page .driver-mgmt-table .data-table .badge{
  max-width:100%;
  white-space:nowrap;
  line-height:1.25;
  height:auto;
  padding:4px 10px;
}

/* Action column — normal cell, aligned with row borders */
.schedule-page .driver-mgmt-table .data-table th:last-child,
.schedule-page .driver-mgmt-table .data-table td:last-child{
  position:static !important;
  right:auto !important;
  z-index:auto !important;
  min-width:0;
  width:auto;
  max-width:none;
  padding:14px 16px;
  text-align:left;
  vertical-align:middle;
  overflow:visible;
  border-left:0 !important;
  box-shadow:none !important;
}
.schedule-page .driver-mgmt-table .data-table td:last-child{
  background:transparent !important;
}
.schedule-page .driver-mgmt-table .data-table thead th:last-child{
  position:static !important;
  right:auto !important;
  z-index:auto !important;
  background:var(--surface-2) !important;
  border-left:0 !important;
  box-shadow:none !important;
}
.schedule-page .driver-mgmt-table .data-table tbody tr:hover td:last-child{
  background:var(--surface-hover) !important;
}
html[data-theme="light"] .schedule-page .driver-mgmt-table .data-table th:last-child,
html[data-theme="light"] .schedule-page .driver-mgmt-table .data-table td:last-child,
html[data-theme="light"] .schedule-page .driver-mgmt-table .data-table thead th:last-child,
html[data-theme="light"] .schedule-page .driver-mgmt-table .data-table tbody tr:hover td:last-child{
  box-shadow:none !important;
  border-left:0 !important;
}

.schedule-page .driver-mgmt-table .sched-actions{
  display:flex;
  flex-wrap:nowrap;
  align-items:center;
  justify-content:flex-start;
  gap:8px;
  white-space:nowrap;
  margin:0;
  width:auto;
}
.schedule-page .driver-mgmt-table .sched-action-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  width:auto;
  max-width:100%;
  min-width:0;
  padding:7px 12px;
  margin:0;
  white-space:nowrap;
  line-height:1.2;
  box-shadow:none;
}
.schedule-summary-row{ margin-bottom:4px; }
.schedule-summary-row a.track-summary-card{ text-decoration:none; color:inherit; }
.schedule-summary-row .track-summary-card.is-clickable{
  width:100%;
  text-align:left;
  font:inherit;
  color:inherit;
  cursor:pointer;
  appearance:none;
}
.schedule-summary-row .track-summary-card.is-clickable:hover{
  border-color:var(--chart-primary, rgba(56,189,248,.55));
  transform:translateY(-2px);
}
.schedule-summary-row .track-summary-card.is-clickable:focus-visible{
  outline:2px solid var(--chart-primary, #38bdf8);
  outline-offset:2px;
}
.sched-jump-target{
  scroll-margin-top: calc(var(--topbar-h, 64px) + 16px);
}
.sched-jump-flash{
  animation: schedJumpFlash 1.4s ease;
}
@keyframes schedJumpFlash{
  0%{ box-shadow:0 0 0 0 rgba(56,189,248,.55); }
  35%{ box-shadow:0 0 0 3px rgba(56,189,248,.45); }
  100%{ box-shadow:0 0 0 0 rgba(56,189,248,0); }
}
html[data-theme="light"] .sched-jump-flash{
  animation-name: schedJumpFlashLight;
}
@keyframes schedJumpFlashLight{
  0%{ box-shadow:0 0 0 0 rgba(37,99,235,.4); }
  35%{ box-shadow:0 0 0 3px rgba(37,99,235,.35); }
  100%{ box-shadow:0 0 0 0 rgba(37,99,235,0); }
}
.schedule-filters{ margin-bottom:0; }
.schedule-filters .daily-insp-launch{
  margin-left:auto;
  padding:0;
  align-self:flex-end;
}
.sched-remarks-cell{
  max-width:220px;
  white-space:normal !important;
  line-height:1.4;
  font-size:12.5px;
}
.sched-actions{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}
.sched-prev-fail{
  margin-bottom:14px;
  padding:12px 14px;
  border-radius:12px;
  border:1px solid rgba(239,68,68,.35);
  background:rgba(239,68,68,.1);
  color:var(--text);
}
.sched-prev-fail strong{ display:block; margin-bottom:6px; color:#fca5a5; }
html[data-theme="light"] .sched-prev-fail strong{ color:#b91c1c; }
.sched-prev-fail p{ margin:0 0 6px; font-size:13px; line-height:1.5; color:var(--text-dim); }

.sched-cal-toolbar{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px;
  padding:12px 16px;
  border-bottom:1px solid var(--border);
}
.sched-cal-heading{
  flex:1;
  text-align:center;
  font-size:15px;
  font-weight:700;
  color:var(--text);
  min-width:160px;
}
.sched-cal-body{ padding:14px 16px 18px; }
.sched-cal-legend{
  display:flex;
  flex-wrap:wrap;
  gap:14px;
  padding:0 16px 16px;
  font-size:12px;
  color:var(--text-dim);
  font-weight:600;
}
.sched-cal-legend i{
  display:inline-block;
  width:10px;
  height:10px;
  border-radius:50%;
  margin-right:6px;
  vertical-align:middle;
}
.sched-cal-legend i.tone-daily{ background:#38bdf8; }
.sched-cal-legend i.tone-franchise{ background:#22c55e; }
.sched-cal-legend i.tone-reinspect{ background:#f59e0b; }
.sched-cal-legend i.tone-meeting{ background:#a78bfa; }
.sched-cal-legend i.tone-holiday{ background:#94a3b8; }

.sched-cal-daylist{ display:flex; flex-direction:column; gap:10px; }
.sched-cal-event-card{
  appearance:none;
  width:100%;
  text-align:left;
  border:1px solid var(--border);
  border-radius:12px;
  background:var(--surface-2);
  padding:12px 14px;
  color:var(--text);
  cursor:pointer;
  font:inherit;
  display:flex;
  flex-direction:column;
  gap:4px;
  border-left:4px solid var(--chart-primary);
  text-decoration:none;
}
.sched-cal-event-card.tone-daily{ border-left-color:#38bdf8; }
.sched-cal-event-card.tone-franchise{ border-left-color:#22c55e; }
.sched-cal-event-card.tone-reinspect{ border-left-color:#f59e0b; }
.sched-cal-event-card.tone-meeting{ border-left-color:#a78bfa; }
.sched-cal-event-card.tone-holiday{ border-left-color:#94a3b8; }
.sched-cal-event-card:hover,
.sched-cal-event-card:focus-visible{
  border-color:var(--chart-primary);
  outline:none;
}
.sched-cal-event-top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
  font-size:12px;
  color:var(--text-dim);
}
.sched-cal-event-card strong{ font-size:14px; }
.sched-cal-event-card > span{ font-size:12.5px; color:var(--text-dim); }

.sched-cal-week{
  display:grid;
  grid-template-columns:repeat(7, minmax(0,1fr));
  gap:8px;
}
.sched-cal-col{
  border:1px solid var(--border);
  border-radius:12px;
  background:var(--surface-2);
  min-height:160px;
  overflow:hidden;
}
.sched-cal-col.is-focus{ border-color:var(--chart-primary); box-shadow:0 0 0 1px var(--chart-glow); }
.sched-cal-col-head{
  display:flex;
  justify-content:space-between;
  padding:8px 10px;
  border-bottom:1px solid var(--border);
  font-size:12px;
  color:var(--text-dim);
}
.sched-cal-col-head strong{ color:var(--text); }
.sched-cal-col-body{
  display:flex;
  flex-direction:column;
  gap:6px;
  padding:8px;
}
.sched-cal-pill{
  appearance:none;
  border:0;
  border-radius:8px;
  padding:7px 8px;
  font:inherit;
  font-size:11.5px;
  font-weight:650;
  text-align:left;
  cursor:pointer;
  color:#041018;
  background:#38bdf8;
  text-decoration:none;
  display:block;
  line-height:1.3;
}
.sched-cal-pill.tone-franchise{ background:#4ade80; }
.sched-cal-pill.tone-reinspect{ background:#fbbf24; }
.sched-cal-pill.tone-meeting{ background:#c4b5fd; }
.sched-cal-pill.tone-holiday{ background:#cbd5e1; }
.sched-cal-pill:hover,
.sched-cal-pill:focus-visible{ filter:brightness(1.08); outline:2px solid var(--text); outline-offset:1px; }
html[data-theme="light"] .sched-cal-pill{ color:#0f172a; }

.sched-cal-month-head,
.sched-cal-month{
  display:grid;
  grid-template-columns:repeat(7, minmax(0,1fr));
  gap:6px;
}
.sched-cal-month-head{
  margin-bottom:6px;
  font-size:11.5px;
  font-weight:700;
  color:var(--text-dim);
  text-align:center;
}
.sched-cal-cell{
  min-height:92px;
  border:1px solid var(--border);
  border-radius:10px;
  background:var(--surface-2);
  padding:6px;
}
.sched-cal-cell.empty{ background:transparent; border-color:transparent; }
.sched-cal-cell.is-focus{ border-color:var(--chart-primary); box-shadow:0 0 0 1px var(--chart-glow); }
.sched-cal-date{
  appearance:none;
  border:0;
  background:transparent;
  color:var(--text);
  font:inherit;
  font-size:13px;
  font-weight:700;
  cursor:pointer;
  padding:2px 4px;
  border-radius:6px;
}
.sched-cal-date:hover,
.sched-cal-date:focus-visible{ background:var(--chart-glow); outline:none; }
.sched-cal-dots{ display:flex; flex-direction:column; gap:3px; margin-top:4px; }
.sched-cal-dot{
  appearance:none;
  border:0;
  border-radius:6px;
  padding:3px 5px;
  font:inherit;
  font-size:10px;
  font-weight:700;
  cursor:pointer;
  text-align:left;
  color:#041018;
  background:#38bdf8;
}
.sched-cal-dot.tone-franchise{ background:#4ade80; }
.sched-cal-dot.tone-reinspect{ background:#fbbf24; }
.sched-cal-dot.tone-meeting{ background:#c4b5fd; }
.sched-cal-dot.tone-holiday{ background:#cbd5e1; }
.schedule-page.is-inspector .sched-cal-pill.is-static,
.schedule-page.is-inspector .sched-cal-dot.is-static,
.schedule-page.is-inspector .sched-cal-date.is-static,
.schedule-page.is-inspector .sched-cal-event-card.is-static,
.schedule-page.is-inspector .sched-cal-cell.has-items .sched-cal-date{
  cursor:default;
  pointer-events:none;
  outline:none;
}

.schedule-page .is-hidden{ display:none !important; }
.daily-insp-anchor{ scroll-margin-top: calc(var(--topbar-h, 64px) + 16px); }

.daily-insp-launch{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:12px 16px;
}
.daily-insp-launch .btn{ min-height:38px; white-space:nowrap; }
.daily-insp-panel{ margin-top:0; }
.daily-insp-lookup{
  display:flex;
  flex-wrap:wrap;
  align-items:flex-end;
  gap:12px;
  padding:4px 16px 18px;
}
.daily-insp-lookup .field{
  margin:0;
  min-width:min(240px, 100%);
  flex:1 1 200px;
}
.daily-insp-lookup .field span{
  display:block;
  font-size:12px;
  font-weight:600;
  color:var(--text-dim);
  margin-bottom:6px;
}
.daily-insp-lookup input{
  width:100%;
  letter-spacing:0.04em;
  text-transform:uppercase;
}
.daily-insp-hint{ flex:1 1 100%; font-size:12.5px; }
.daily-insp-empty{ margin:0 16px 18px; }
.daily-insp-driver{ padding:0 16px 20px; }

.daily-insp-checklist{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.daily-insp-check-row{
  display:grid;
  grid-template-columns:minmax(0,1.4fr) auto auto;
  align-items:center;
  gap:10px 14px;
  padding:12px 14px;
  border:1px solid var(--border);
  border-radius:12px;
  background:var(--surface2, var(--glass-bg));
}
.daily-insp-check-label b{ font-size:13.5px; }
.daily-insp-check-actions{
  display:inline-flex;
  gap:6px;
}
.daily-mark-btn{
  appearance:none;
  border:1px solid var(--border);
  background:var(--surface, transparent);
  color:var(--text);
  font:inherit;
  font-size:12.5px;
  font-weight:600;
  padding:7px 12px;
  border-radius:9999px;
  cursor:pointer;
  transition:background .15s, border-color .15s, color .15s;
}
.daily-mark-btn.present.on{
  background:#16a34a;
  border-color:#16a34a;
  color:#fff;
}
.daily-mark-btn.missing.on{
  background:#dc2626;
  border-color:#dc2626;
  color:#fff;
}
.daily-mark-btn:hover,
.daily-mark-btn:focus-visible{
  outline:2px solid var(--chart-primary);
  outline-offset:1px;
}

.daily-attendance-row{
  display:grid;
  grid-template-columns:repeat(3, minmax(0,1fr));
  gap:10px;
}
.daily-attendance-card{
  display:flex;
  flex-direction:column;
  gap:6px;
  padding:14px 16px;
  border:1px solid var(--border);
  border-radius:12px;
  background:var(--surface2, var(--glass-bg));
}
.daily-attendance-label{
  font-size:11.5px;
  font-weight:700;
  letter-spacing:0.04em;
  text-transform:uppercase;
  color:var(--text-dim);
}
.daily-attendance-bar{
  margin-top:12px;
  height:8px;
  border-radius:999px;
  background:color-mix(in srgb, var(--border) 70%, transparent);
  overflow:hidden;
}
.daily-attendance-fill{
  height:100%;
  border-radius:inherit;
  background:linear-gradient(90deg, #0ea5e9, #22c55e);
}
.daily-insp-submit-row{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:12px;
  margin-top:18px;
}

.terminal-entry-modal .terminal-entry-intro{
  margin:0 0 16px;
  font-size:13px;
  line-height:1.5;
  color:var(--text-dim);
}
.terminal-entry-grid{
  margin-bottom:16px;
}
.terminal-entry-progress{
  padding:14px 16px;
  border:1px solid var(--border);
  border-radius:12px;
  background:var(--surface-2);
}
.terminal-entry-progress-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
  font-size:12.5px;
  font-weight:650;
  color:var(--text);
}
.terminal-entry-progress .cell-dim{
  margin:10px 0 0;
  font-size:12px;
}
html[data-theme="light"] .terminal-entry-progress{
  background:#f8fafc;
  border-color:#cbd5e1;
}

@media (max-width: 1100px){
  .sched-cal-week{ grid-template-columns:repeat(2, minmax(0,1fr)); }
  .daily-attendance-row{ grid-template-columns:1fr; }
}
@media (max-width: 720px){
  .sched-cal-week{ grid-template-columns:1fr; }
  .sched-cal-month-head{ display:none; }
  .sched-cal-month{ grid-template-columns:1fr 1fr; }
  .schedule-filters label{ min-width:100%; flex:1 1 100%; }
  .schedule-filters .daily-insp-launch{
    margin-left:0;
    width:100%;
  }
  .schedule-filters .daily-insp-launch .btn{ width:100%; }
  .daily-insp-check-row{
    grid-template-columns:1fr;
    align-items:start;
  }
}

/* =========================================================
   Visibility Pass (Light + Dark) — Reports and Checklist
   ========================================================= */
.insp-reports-page,
.insp-report-preview,
.daily-insp-panel{
  color:var(--text);
}

/* Reports list readability */
.insp-reports-list .insp-rpt-data-table{
  font-size:12px;
}
.insp-reports-list .insp-rpt-data-table thead th{
  font-size:10.5px;
  font-weight:700;
  color:var(--text);
}
.insp-reports-list .insp-rpt-data-table tbody td{
  color:var(--text);
}
.insp-reports-list .cell-dim{
  color:var(--text-dim);
}
.insp-reports-list .btn{
  color:var(--text);
}
.insp-reports-list .btn-primary{
  color:var(--btn-primary-text);
}
html[data-theme="light"] .insp-reports-list .btn-primary{
  color:var(--btn-primary-text);
  text-shadow:var(--btn-primary-text-shadow);
}
.insp-reports-list .btn svg,
.insp-report-foot .btn svg{
  opacity:1;
  stroke-width:2;
}

/* Ensure icon-only export buttons remain visible */
.insp-rpt-icon-btn{
  border-color:var(--border);
  background:var(--surface-2);
  color:var(--text);
}
.insp-rpt-icon-btn:hover{
  border-color:var(--chart-primary);
  color:var(--chart-primary);
}

/* Checklist readability */
.daily-insp-check-label b{
  color:var(--text);
  font-size:13px;
}
.daily-mark-btn{
  font-size:12.5px;
  font-weight:700;
  color:var(--text);
  border-width:1px;
}
.daily-mark-btn.present{
  border-color:rgba(34,197,94,.45);
}
.daily-mark-btn.missing{
  border-color:rgba(239,68,68,.45);
}
.daily-mark-btn.present.on,
.daily-mark-btn.missing.on{
  color:#fff;
}
.daily-insp-check-row .badge{
  font-size:11px;
}

/* Light mode contrast adjustments */
html[data-theme="light"] .insp-reports-list .driver-mgmt-table,
html[data-theme="light"] .insp-reports-list .insp-rpt-data-table,
html[data-theme="light"] .insp-report-table .insp-rpt-data-table{
  color:#0f172a;
}
html[data-theme="light"] .insp-reports-list .insp-rpt-data-table thead th,
html[data-theme="light"] .insp-report-table .insp-rpt-data-table thead th{
  background:#e2e8f0;
  color:#0f172a;
}
html[data-theme="light"] .insp-reports-list .btn-secondary{
  background:var(--btn-secondary-bg);
  color:var(--btn-secondary-text);
  border:1.5px solid var(--btn-secondary-border);
  font-weight:650;
}
html[data-theme="light"] .insp-reports-list .btn-secondary:hover{
  background:rgba(198,214,239,.55);
  border-color:#0f172a;
  color:#0f172a;
  box-shadow:0 2px 10px rgba(24,35,63,.14);
}
html[data-theme="light"] .daily-mark-btn{
  background:#ffffff;
  color:#0f172a;
  border-color:#94a3b8;
}
html[data-theme="light"] .daily-insp-check-row .cell-dim{
  color:#1e293b;
}

/* Dark mode readability adjustments */
html[data-theme="dark"] .insp-reports-list .btn-secondary{
  color:#e2e8f0;
  border-color:rgba(198,214,239,.28);
}
html[data-theme="dark"] .daily-mark-btn{
  color:#ecf4ff;
  border-color:rgba(198,214,239,.3);
}

/* =========================================================
   Light Mode — Global Dashboard UI System
   (Administrator, Staff, Inspector, Operator)
   ========================================================= */
html[data-theme="light"] .page-head h1,
html[data-theme="light"] .panel-head h3,
html[data-theme="light"] .modal-head h3{
  font-weight:700;
  color:#0a0f1a;
  letter-spacing:-.01em;
  line-height:1.3;
  opacity:1;
}
html[data-theme="light"] .page-head p,
html[data-theme="light"] .panel-head p{
  color:#1e293b;
  line-height:1.55;
  opacity:1;
  font-weight:550;
}
html[data-theme="light"] .nav-item{
  font-weight:650;
  font-size:12.5px;
  color:var(--sidebar-nav-text, #18233F);
  line-height:1.3;
  opacity:1;
}
html[data-theme="light"] .nav-item.active{
  font-weight:700;
  color:var(--sidebar-nav-active-text, #ffffff);
}
html[data-theme="light"] .data-table thead th{
  font-weight:700;
  color:#0a0f1a;
  background:#e2e8f0;
  opacity:1;
}
html[data-theme="light"] .data-table tbody td,
html[data-theme="light"] .data-table tbody td *,
html[data-theme="light"] .insp-rpt-data-table tbody td,
html[data-theme="light"] .insp-rpt-data-table tbody td *{
  color:#0a0f1a;
  line-height:1.5;
  opacity:1;
  font-weight:600;
  -webkit-font-smoothing:antialiased;
}
html[data-theme="light"] .data-table .cell-dim,
html[data-theme="light"] .cell-dim,
html[data-theme="light"] .text-dim,
html[data-theme="light"] .pagination,
html[data-theme="light"] .topbar .crumb,
html[data-theme="light"] .topbar-brand-text span,
html[data-theme="light"] .field label,
html[data-theme="light"] .field .hint,
html[data-theme="light"] .chart-subtitle,
html[data-theme="light"] .chart-axis-x-title,
html[data-theme="light"] .chart-axis-y-title,
html[data-theme="light"] .legend-item,
html[data-theme="light"] .empty-state p{
  color:#1e293b !important;
  opacity:1;
}
html[data-theme="light"] .text-faint,
html[data-theme="light"] .chart-legend-title,
html[data-theme="light"] .chart-bar-y-hint,
html[data-theme="light"] .detail-grid .dg-item span{
  color:#334155 !important;
  opacity:1;
}
html[data-theme="light"] body,
html[data-theme="light"] .content,
html[data-theme="light"] .panel,
html[data-theme="light"] .modal,
html[data-theme="light"] .kpi-card,
html[data-theme="light"] .table-wrap,
html[data-theme="light"] .form-card,
html[data-theme="light"] .track-column,
html[data-theme="light"] .op-panel,
html[data-theme="light"] .settings-panel,
html[data-theme="light"] .report-card{
  color:#0a0f1a;
  opacity:1;
}
html[data-theme="light"] .panel h3,
html[data-theme="light"] .kpi-label,
html[data-theme="light"] .kpi-value,
html[data-theme="light"] .op-kpi-card .kpi-value,
html[data-theme="light"] .op-kpi-card .kpi-label,
html[data-theme="light"] .op-stat-value,
html[data-theme="light"] b,
html[data-theme="light"] strong{
  color:#0a0f1a;
  opacity:1;
}
html[data-theme="light"] .data-table tbody td .badge,
html[data-theme="light"] .insp-rpt-data-table .badge{
  font-weight:700;
  opacity:1;
}
html[data-theme="light"] .data-table tbody td .badge.b-green{ color:var(--badge-green-text); }
html[data-theme="light"] .data-table tbody td .badge.b-amber{ color:var(--badge-amber-text); }
html[data-theme="light"] .data-table tbody td .badge.b-red{ color:var(--badge-red-text); }
html[data-theme="light"] .data-table tbody td .badge.b-blue{ color:var(--badge-blue-text); }
html[data-theme="light"] .data-table tbody td .badge.b-gray{ color:var(--badge-gray-text); }
html[data-theme="light"] .tab-btn{
  color:#1e293b;
  opacity:1;
  font-weight:600;
}
html[data-theme="light"] .tab-btn.active{
  color:#18233F;
  border-color:#18233F;
  font-weight:700;
}
html[data-theme="light"] .select-filter,
html[data-theme="light"] .search-box input,
html[data-theme="light"] .field input,
html[data-theme="light"] .field select,
html[data-theme="light"] .field textarea,
html[data-theme="light"] .topbar-search input{
  color:#0a0f1a;
  opacity:1;
  font-weight:600;
}
html[data-theme="light"] .pg-btn{
  color:#0a0f1a;
  opacity:1;
  font-weight:600;
}
html[data-theme="light"] .pg-btn.active{
  background:var(--btn-primary-gradient);
  color:var(--btn-primary-text);
  border-color:var(--btn-primary-border);
  text-shadow:var(--btn-primary-text-shadow);
  font-weight:700;
}
html[data-theme="light"] .fw-filter-chip.active{
  background:#dcfce7;
  border-color:#16a34a;
  color:#14532d;
  font-weight:700;
}
html[data-theme="light"] .op-period-btn.active{
  background:var(--btn-primary-gradient);
  color:var(--btn-primary-text);
  text-shadow:var(--btn-primary-text-shadow);
  border:1px solid var(--btn-primary-border);
  font-weight:700;
}
html[data-theme="light"] .track-status-pill.done{
  background:var(--badge-green-bg);
  color:var(--badge-green-text);
  border:1px solid rgba(22,163,74,.2);
}
html[data-theme="light"] .track-status-pill.active{
  background:var(--badge-blue-bg);
  color:var(--badge-blue-text);
  border:1px solid rgba(37,99,235,.2);
}
html[data-theme="light"] .track-status-pill.hold{
  background:var(--badge-amber-bg);
  color:var(--badge-amber-text);
  border:1px solid rgba(217,119,6,.2);
}
html[data-theme="light"] .track-status-pill.pending{
  background:var(--badge-gray-bg);
  color:var(--badge-gray-text);
  border:1px solid rgba(100,116,139,.2);
}
html[data-theme="light"] .modal-foot,
html[data-theme="light"] .form-actions,
html[data-theme="light"] .page-head .actions,
html[data-theme="light"] .row-actions,
html[data-theme="light"] .fw-step-actions{
  flex-wrap:wrap;
  gap:10px;
}
html[data-theme="light"] .row-actions .btn,
html[data-theme="light"] .data-table .btn-sm,
html[data-theme="light"] .insp-report-actions .btn{
  min-width:min-content;
  max-width:100%;
}
html[data-theme="light"] .insp-rpt-icon-btn{
  background:var(--btn-secondary-bg);
  color:var(--btn-secondary-text);
  border:1.5px solid var(--btn-secondary-border);
  transition:background .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease;
}
html[data-theme="light"] .insp-rpt-icon-btn:hover{
  background:rgba(198,214,239,.55);
  border-color:#0f172a;
  color:#0f172a;
  box-shadow:0 2px 10px rgba(24,35,63,.14);
}
html[data-theme="light"] .insp-rpt-icon-btn:hover svg{
  color:#0f172a;
  filter:brightness(1.1);
}
html[data-theme="light"] .insp-rpt-icon-btn svg{
  color:inherit;
  opacity:1;
  transition:color .25s ease, filter .25s ease;
}
html[data-theme="light"] .toolbar,
html[data-theme="light"] .chip-actions,
html[data-theme="light"] .insp-report-actions,
html[data-theme="light"] .daily-insp-launch{
  flex-wrap:wrap;
  gap:10px;
}
html[data-theme="light"] .row-icon-btn{
  background:var(--btn-secondary-bg);
  border:1.5px solid var(--btn-secondary-border);
  color:var(--btn-secondary-text);
  width:32px;
  height:32px;
  transition:background .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease;
}
html[data-theme="light"] .row-icon-btn:hover{
  background:rgba(198,214,239,.55);
  color:#0f172a;
  border-color:#0f172a;
  box-shadow:0 2px 10px rgba(24,35,63,.14);
}
html[data-theme="light"] .row-icon-btn:hover svg{
  color:#0f172a;
  filter:brightness(1.1);
}
html[data-theme="light"] .badge{
  letter-spacing:.02em;
  line-height:1.35;
  min-height:24px;
}
html[data-theme="light"] .daily-mark-btn.present.on,
html[data-theme="light"] .daily-mark-btn.missing.on{
  background:var(--btn-primary-gradient);
  color:var(--btn-primary-text);
  text-shadow:var(--btn-primary-text-shadow);
  border-color:var(--btn-primary-border);
  font-weight:700;
}
html[data-theme="light"] .settings-nav button.active{
  background:var(--badge-blue-bg);
  color:var(--badge-blue-text);
  font-weight:700;
}
html[data-theme="light"] .btn-back-role{
  background:var(--btn-secondary-bg);
  border:1.5px solid #18233F;
  color:#18233F;
  font-weight:650;
  transition:background .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease, filter .25s ease;
}
html[data-theme="light"] .btn-back-role:hover{
  background:rgba(198,214,239,.55);
  border-color:#0f172a;
  color:#0f172a;
  box-shadow:0 2px 10px rgba(24,35,63,.14);
  transform:none;
  filter:none;
}
html[data-theme="light"] .insp-cell-badge .badge,
html[data-theme="light"] .track-app-head .badge,
html[data-theme="light"] .modal-head .badge{
  font-weight:700;
}
html[data-theme="light"] .schedule-page .driver-mgmt-table .sched-actions{
  flex-wrap:wrap;
  white-space:normal;
}
html[data-theme="light"] .schedule-page .driver-mgmt-table .sched-action-btn{
  white-space:normal;
  min-width:min-content;
}
@media (max-width:640px){
  html[data-theme="light"] .modal-foot .btn,
  html[data-theme="light"] .form-actions .btn{
    flex:1 1 auto;
    min-width:min(100%, 160px);
  }
}

/* =========================================================
   Global Button Hover System — All Dashboards
   No size/layout shift; ~250ms smooth feedback
   ========================================================= */
.btn,
.icon-btn,
.row-icon-btn,
.insp-rpt-icon-btn,
.pg-btn,
.tab-btn,
.modal-close,
.topbar-theme-btn,
.hamburger,
.fw-filter-chip,
.op-period-btn,
.nav-item,
.btn-back-role,
.daily-mark-btn,
.settings-nav button,
.qa-btn,
.sched-action-btn{
  cursor:pointer;
}

html[data-theme="light"] .icon-btn,
html[data-theme="light"] .topbar-theme-btn,
html[data-theme="light"] .hamburger,
html[data-theme="light"] .modal-close{
  transition:background .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease;
}
html[data-theme="light"] .icon-btn:hover,
html[data-theme="light"] .topbar-theme-btn:hover,
html[data-theme="light"] .hamburger:hover,
html[data-theme="light"] .modal-close:hover{
  background:rgba(198,214,239,.55);
  border-color:#18233F;
  color:#0f172a;
  box-shadow:0 2px 10px rgba(24,35,63,.12);
}
html[data-theme="light"] .icon-btn:hover svg,
html[data-theme="light"] .topbar-theme-btn:hover svg,
html[data-theme="light"] .hamburger:hover svg,
html[data-theme="light"] .modal-close:hover svg{
  color:#0f172a;
  filter:brightness(1.1);
}

html[data-theme="light"] .tab-btn:hover:not(.active){
  color:#18233F;
  background:rgba(198,214,239,.35);
}
html[data-theme="light"] .pg-btn:hover:not(.active){
  background:rgba(198,214,239,.55);
  border-color:#18233F;
  color:#0f172a;
  box-shadow:0 2px 8px rgba(24,35,63,.12);
}
html[data-theme="light"] .fw-filter-chip{
  transition:background .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease;
}
html[data-theme="light"] .fw-filter-chip:hover:not(.active){
  background:rgba(198,214,239,.45);
  border-color:#18233F;
  color:#0f172a;
  box-shadow:0 2px 8px rgba(24,35,63,.1);
}
html[data-theme="light"] .op-period-btn{
  transition:background .25s ease, color .25s ease, box-shadow .25s ease, border-color .25s ease;
}
html[data-theme="light"] .op-period-btn:hover:not(.active){
  background:rgba(198,214,239,.4);
  color:#0f172a;
}
html[data-theme="light"] .settings-nav button{
  transition:background .25s ease, color .25s ease;
}
html[data-theme="light"] .settings-nav button:hover:not(.active){
  background:rgba(198,214,239,.4);
  color:#0f172a;
}
html[data-theme="light"] .daily-mark-btn{
  transition:background .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease;
}
html[data-theme="light"] .daily-mark-btn:hover:not(.on){
  background:rgba(198,214,239,.45);
  border-color:#18233F;
  color:#0f172a;
  box-shadow:0 2px 8px rgba(24,35,63,.1);
}
html[data-theme="light"] .qa-btn{
  transition:background .25s ease, border-color .25s ease, box-shadow .25s ease, color .25s ease;
}
html[data-theme="light"] .qa-btn:hover{
  background:rgba(198,214,239,.45);
  border-color:#18233F;
  color:#0f172a;
  box-shadow:0 2px 10px rgba(24,35,63,.12);
  transform:none;
}
html[data-theme="light"] .data-table .btn:hover,
html[data-theme="light"] .insp-report-actions .btn:hover,
html[data-theme="light"] .sched-action-btn:hover,
html[data-theme="light"] .row-actions .btn:hover,
html[data-theme="light"] .fw-step-actions .btn:hover{
  /* inherit primary/secondary hover; keep table alignment stable */
  transform:none;
}

/* Dark mode — parallel subtle hover feedback */
html[data-theme="dark"] .btn-primary:hover{
  background:var(--btn-primary-gradient-hover);
  color:var(--btn-primary-text);
  filter:none;
  box-shadow:0 4px 16px rgba(198,214,239,.18);
}
html[data-theme="dark"] .btn-secondary:hover,
html[data-theme="dark"] .btn-ghost:hover{
  background:rgba(114,137,169,.28);
  border-color:rgba(198,214,239,.35);
  color:#ECF4FF;
  box-shadow:0 2px 10px rgba(0,0,0,.28);
}
html[data-theme="dark"] .icon-btn:hover,
html[data-theme="dark"] .row-icon-btn:hover,
html[data-theme="dark"] .insp-rpt-icon-btn:hover,
html[data-theme="dark"] .modal-close:hover,
html[data-theme="dark"] .topbar-theme-btn:hover,
html[data-theme="dark"] .pg-btn:hover:not(.active){
  background:rgba(114,137,169,.3);
  border-color:rgba(198,214,239,.35);
  color:#ECF4FF;
  box-shadow:0 2px 10px rgba(0,0,0,.25);
}
html[data-theme="dark"] .tab-btn:hover:not(.active){
  color:#ECF4FF;
  background:rgba(114,137,169,.18);
}

/* Prevent layout shift on all interactive controls */
.btn:hover,
.btn:active,
.icon-btn:hover,
.row-icon-btn:hover,
.insp-rpt-icon-btn:hover,
.pg-btn:hover,
.tab-btn:hover,
.modal-close:hover,
.topbar-theme-btn:hover,
.fw-filter-chip:hover,
.op-period-btn:hover,
.daily-mark-btn:hover,
.sched-action-btn:hover,
.nav-item:hover,
.btn-back-role:hover{
  transform:none;
}

/* ---------- Staff Operator Management ---------- */
.app-shell:has(.opm-page) .main-col,
.app-shell:has(.opm-page) .content,
.opm-page{
  min-width:0;
}
.opm-page{ display:flex; flex-direction:column; gap:16px; max-width:100%; }
.opm-page .page-head{
  flex-wrap:nowrap;
  align-items:flex-start;
}
.opm-page .page-head > div:first-child{
  min-width:0;
  flex:1;
}
.opm-page .page-head .actions{ flex-shrink:0; }
.opm-page .fw-summary.track-summary-row{
  margin:0;
  width:100%;
}
.opm-toolbar{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px;
  margin:0;
  padding:14px 16px 4px;
}
.opm-filter-row{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  margin:0;
  width:100%;
}
.opm-filter-row .fw-filter-chip{
  height:36px;
  display:inline-flex;
  align-items:center;
  box-sizing:border-box;
}
.opm-applicants{
  display:block;
  width:100%;
  flex:0 0 auto;
  padding:0;
  overflow:hidden;
  border:1px solid var(--border);
  border-radius:var(--radius);
  background:var(--glass-bg);
  min-width:0;
  margin:0 0 8px;
}
.opm-applicants-head{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:10px 16px;
  padding:14px 16px 12px;
  border-bottom:1px solid var(--border);
}
.opm-applicants-title{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}
.opm-applicants-title h2{
  margin:0;
  font-size:15px;
}
.opm-count-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:24px;
  height:22px;
  padding:0 8px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  background:rgba(245,158,11,.16);
  color:#fbbf24;
  border:1px solid rgba(245,158,11,.28);
}
html[data-theme="light"] .opm-count-badge{
  background:rgba(180,83,9,.1);
  color:#b45309;
  border-color:rgba(180,83,9,.22);
}
.opm-rejected-toggle{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:13px;
  color:var(--text-dim);
  cursor:pointer;
  user-select:none;
}
.opm-table-wrap{
  overflow-x:auto;
  overflow-y:visible;
  max-width:100%;
}
.opm-list-panel{
  display:block;
  width:100%;
  flex:0 0 auto;
  padding:0;
  overflow:hidden;
  min-width:0;
  border:1px solid var(--border);
  border-radius:var(--radius);
}
.opm-directory-head{
  margin:8px 16px 10px;
  gap:12px;
  justify-content:flex-start;
}
.opm-directory-head h2{ font-size:15px; }
.opm-table{
  width:100%;
  border-collapse:collapse;
}
.opm-applicants-table,
.opm-directory-table{
  width:960px;
  min-width:960px;
  max-width:none;
  table-layout:fixed;
}
.opm-applicants-table th,
.opm-applicants-table td,
.opm-directory-table th,
.opm-directory-table td{
  text-align:left;
  vertical-align:middle;
  padding:12px 14px;
  box-sizing:border-box;
}
.opm-applicants-table th,
.opm-directory-table th{ white-space:nowrap; }
.opm-applicants-table td,
.opm-directory-table td{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.opm-applicants-table .opm-col-name{ width:18%; }
.opm-applicants-table .opm-col-email{ width:22%; }
.opm-applicants-table .opm-col-contact{ width:14%; }
.opm-applicants-table .opm-col-date{ width:14%; }
.opm-applicants-table .opm-col-status{ width:10%; }
.opm-applicants-table .opm-col-actions{ width:22%; }
.opm-directory-table .opm-col-op-name{ width:20%; }
.opm-directory-table .opm-col-op-id{ width:12%; }
.opm-directory-table .opm-col-op-contact{ width:14%; }
.opm-directory-table .opm-col-op-num{ width:12%; }
.opm-directory-table .opm-col-op-status{ width:14%; }
.opm-directory-table .opm-col-op-actions{ width:16%; }
.opm-td-actions{
  text-align:right;
  white-space:nowrap;
  overflow:visible;
}
.opm-applicants-table th:last-child,
.opm-directory-table th:last-child,
.opm-td-actions{ text-align:right; }
.opm-row-actions{
  display:flex;
  flex-wrap:nowrap;
  justify-content:flex-end;
  align-items:center;
  gap:6px;
}
.opm-btn-pill{ border-radius:999px; }
.cmp-driver-foot{ justify-content:flex-end; }
.cmp-driver-foot .cmp-suspend-btn{ margin-right:auto; }
.cmp-suspend-btn{
  border-radius:999px; border:1px solid #b91c1c; color:#b91c1c; background:transparent;
}
.cmp-suspend-btn:hover{ background:rgba(185,28,28,.08); }
html[data-theme="dark"] .cmp-suspend-btn{ color:#fca5a5; border-color:#f87171; }
html[data-theme="dark"] .cmp-suspend-btn:hover{ background:rgba(239,68,68,.12); }
.cmp-suspend-note{ margin:6px 0 0; font-size:13px; line-height:1.45; color:var(--text-dim); max-width:640px; }
.cmp-confirm-error{ margin:8px 0 0; color:#b91c1c; font-size:13px; }
.opm-btn-outline{
  background:transparent;
  box-shadow:none;
}
.opm-empty{ padding:28px 16px; }
.opm-page .empty-state[hidden]{ display:none !important; }
.opm-applicants .opm-empty{ border-top:1px solid var(--border); }
.opm-detail{ display:flex; flex-direction:column; gap:12px; min-width:0; max-width:100%; }
.opm-table-panel{ padding:0; overflow:auto; min-width:0; max-width:100%; }
.opm-detail .opm-update-form{ max-width:none; width:100%; }
.opm-section-title{ margin-top:4px; }
.opm-section-title span{ font-size:12px; color:var(--text-dim); font-weight:500; }
.opm-report-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:14px;
  align-items:stretch;
}
.opm-report-card{
  display:grid;
  grid-template-columns:40px minmax(0, 1fr);
  grid-template-rows:auto minmax(44px, 1fr) auto;
  column-gap:12px;
  row-gap:8px;
  align-items:start;
  padding:16px 18px;
  min-width:0;
}
.opm-report-copy{ grid-column:2; grid-row:1 / span 2; min-width:0; }
.opm-report-card h4{ margin:0; font-size:14px; line-height:1.3; }
.opm-report-card p{ margin:4px 0 0; font-size:12.5px; color:var(--text-dim); line-height:1.4; }
.opm-report-card .opm-report-actions{
  grid-column:1 / -1;
  grid-row:3;
  display:flex;
  align-items:center;
  margin:0;
}
.opm-view-modal{
  max-height:min(90vh, 760px);
}
.opm-view-modal .modal-body{
  display:flex;
  flex-direction:column;
  gap:16px;
  overflow-y:auto;
}
.opm-gov-id{
  margin-top:8px;
  padding-top:16px;
  border-top:1px solid var(--border);
}
.opm-gov-id h4{
  margin:0 0 12px;
  font-size:14px;
  color:var(--text);
}
.opm-gov-id-meta{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px 18px;
  margin-bottom:14px;
}
.opm-gov-id-meta .dg-item span{
  display:block;
  font-size:11px;
  color:var(--text-faint);
  margin-bottom:3px;
}
.opm-gov-id-muted{
  font-weight:600;
  color:var(--text-faint) !important;
}
.opm-gov-id-empty{
  margin:0;
  padding:14px 16px;
  border-radius:10px;
  background:var(--surface-2);
  color:var(--text-faint);
  font-size:13px;
}
.opm-gov-id-files{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:12px;
}
.opm-gov-id-file{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:8px;
  padding:12px;
  border:1px solid var(--border);
  border-radius:12px;
  background:var(--surface);
}
.opm-gov-id-file-label{
  font-size:11px;
  font-weight:650;
  letter-spacing:.03em;
  text-transform:uppercase;
  color:var(--text-faint);
}
.opm-gov-id-filename{
  display:block;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:12.5px;
  color:var(--text-dim);
}
.opm-gov-id-thumb{
  display:block;
  width:100%;
  padding:0;
  border:1px solid var(--border);
  border-radius:10px;
  overflow:hidden;
  background:var(--surface-2);
  cursor:zoom-in;
}
.opm-gov-id-thumb img{
  display:block;
  width:100%;
  height:140px;
  object-fit:cover;
}
.opm-gov-id-pdf{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}
.opm-gov-id-pdf-icon{
  flex-shrink:0;
  width:36px;
  height:36px;
  border-radius:8px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(239,68,68,.12);
  color:#fca5a5;
}
.opm-gov-id-pdf-icon svg{ width:18px; height:18px; }
.opm-gov-id-pdf .opm-gov-id-filename{ flex:1; }
.opm-gov-id-pdf .btn{ flex-shrink:0; }
#govIdLightbox{ z-index:240; }
.opm-gov-id-lightbox{
  width:min(920px, 100%);
  max-height:90vh;
  display:flex;
  flex-direction:column;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  overflow:hidden;
  box-shadow:var(--shadow-lg);
}
.opm-gov-id-lightbox-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 18px;
  border-bottom:1px solid var(--border);
  flex-shrink:0;
}
.opm-gov-id-lightbox-head h3{
  margin:0;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:15px;
}
.opm-gov-id-lightbox-body{
  overflow:auto;
  padding:16px;
  background:#0f172a;
  display:flex;
  justify-content:center;
  align-items:center;
  min-height:280px;
}
.opm-gov-id-lightbox-body img{
  max-width:100%;
  max-height:calc(90vh - 80px);
  object-fit:contain;
}
html[data-theme="light"] .opm-gov-id-lightbox-body{ background:#1e293b; }
html[data-theme="light"] .opm-gov-id-pdf-icon{
  background:rgba(185,28,28,.1);
  color:#b91c1c;
}
@media (max-width: 700px){
  .opm-gov-id-meta,
  .opm-gov-id-files{ grid-template-columns:1fr; }
}
.opm-view-modal .vio-detail-section{
  padding:18px 20px;
}
.opm-view-modal .vio-detail-section h4{
  margin-bottom:16px;
}
.opm-view-modal .vio-detail-section .detail-grid{
  gap:18px 24px;
}
.opm-view-modal .vio-detail-section .dg-item span{
  margin-bottom:6px;
}
.opm-view-modal .opm-history-list{
  gap:14px;
}
.opm-view-modal .opm-history-item{
  padding:14px 16px;
}
.opm-report-icon{
  grid-column:1;
  grid-row:1;
  width:36px; height:36px;
  border-radius:10px;
  display:flex; align-items:center; justify-content:center;
  background:var(--accent-glow);
  color:var(--accent-bright);
}
.opm-report-icon svg{ width:18px; height:18px; }
.opm-report-preview{ overflow:auto; }
.opm-report-actions{ flex-wrap:wrap; }
@media (max-width:800px){
  .opm-report-grid{ grid-template-columns:1fr; }
}
.opm-history-list{ display:flex; flex-direction:column; gap:12px; }
.opm-history-item{
  display:grid;
  grid-template-columns:100px minmax(0,1fr);
  gap:12px;
  padding:12px 14px;
  border-radius:10px;
  border:1px solid var(--border-soft);
  background:var(--surface-2);
}
.opm-history-date{
  font-size:11px;
  font-weight:700;
  color:var(--text-faint);
}
.opm-history-item p{
  margin:4px 0 0;
  font-size:12.5px;
  color:var(--text-dim);
  line-height:1.4;
}
.opm-back{
  align-self:flex-start;
  margin-bottom:10px;
}
.opm-hero{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:8px;
}
.opm-hero h1{ font-size:22px; margin:0 0 4px; letter-spacing:-.01em; color:var(--text); }
.opm-hero p{ margin:0; color:var(--text-dim); font-size:13.5px; }
.opm-info-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin:0 0 14px;
}
.opm-info-head h3{ margin:0; }
.opm-update-form .opm-info-head h3{ font-size:15px; font-weight:650; display:flex; align-items:center; gap:8px; }
.opm-meter{
  position:relative;
  width:100%;
  max-width:100%;
  height:28px;
  border-radius:999px;
  background:var(--surface-2);
  border:1px solid var(--border-soft);
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  margin-top:4px;
}
.opm-meter > i{
  position:absolute;
  inset:0;
  background:linear-gradient(90deg,var(--green-dim),var(--green-bright));
}
.opm-meter.hold > i{ background:linear-gradient(90deg,#92400e,#fcd34d); }
.opm-meter.suspended > i{ background:linear-gradient(90deg,#7f1d1d,#fca5a5); }
.opm-meter span{
  position:relative;
  z-index:1;
  font-size:12px;
  font-weight:700;
  color:#ecfdf5;
}
.detail-grid.opm-info-grid .dg-item{ min-width:0; }
.opm-meter.suspended span{ color:#fef2f2; }
@media (max-width:720px){
  .opm-page .page-head{ flex-wrap:wrap; }
  .opm-info-grid{ grid-template-columns:1fr; }
  .opm-info-head .btn{ width:100%; justify-content:center; }
  .opm-directory-head{
    flex-direction:column;
    align-items:flex-start;
  }
}
@media (max-width:1100px){
  .opm-list-head{ display:none; }
  .opm-list-row{
    grid-template-columns:minmax(0,1fr) auto;
    gap:8px 12px;
  }
  .opm-name{ grid-column:1; }
  .opm-cell.mono:nth-child(2){ grid-column:1; color:var(--text-dim); font-size:11.5px; }
  .opm-dim,
  .opm-cell.mono:nth-child(4),
  .opm-cell.mono:nth-child(5){ display:none; }
  .opm-cell:nth-child(6){ grid-column:2; grid-row:1; justify-self:end; }
  .opm-action{ grid-column:2; grid-row:2; }
}
.settings-nav a{
  display:block;
  text-align:left;
  padding:10px 13px;
  border-radius:8px;
  background:none;
  border:none;
  color:var(--text-dim);
  font-size:13px;
  font-weight:600;
  text-decoration:none;
}
.settings-nav a:hover{ background:var(--surface); color:var(--text); }
.settings-nav a.active{ background:var(--accent-glow); color:var(--accent-bright); }
html[data-theme="light"] .settings-nav a.active{
  background:var(--accent-glow); color:var(--accent-bright);
}

/* ---------- Staff workflow workspaces ---------- */
.sw-page{ display:flex; flex-direction:column; gap:4px; }
.sw-page .page-head{ flex-wrap:nowrap; align-items:flex-start; }
.sw-page .page-head > div:first-child{ min-width:0; flex:1; }
.sw-page .page-head .actions{ flex-shrink:0; }
.sw-module-drivers{
  container-type:inline-size;
  container-name:dam-staff;
  min-width:0;
}
.sw-module-drivers .page-head{ margin-bottom:14px; }
.sw-module-drivers .tabs{ margin-bottom:14px; }
.sw-module-drivers .sw-toolbar{ margin:0 0 12px; }
.dam-stat-grid{
  display:grid;
  grid-template-columns:repeat(7, minmax(0, 1fr));
  gap:10px;
  margin:0 0 14px;
  align-items:stretch;
  width:100%;
  max-width:100%;
  min-width:0;
}
.dam-stat-card{
  min-width:0;
  min-height:0;
  padding:10px 12px;
  gap:6px;
  pointer-events:none;
  cursor:default;
  transform:none;
  animation:none;
  overflow:visible;
  box-sizing:border-box;
}
button.dam-stat-card.is-action{
  pointer-events:auto;
  cursor:pointer;
}
button.dam-stat-card.is-action:hover{
  transform:translateY(-2px);
  border-color:var(--chart-primary);
}
.pay-rpt-stats button.dam-stat-card.is-action{ pointer-events:auto; }
.dam-stat-card:hover{
  transform:none;
  box-shadow:none;
  border-color:var(--border);
}
.dam-stat-card:hover .kpi-icon-glow{
  transform:none;
  box-shadow:none;
}
.dam-stat-card .kpi-value{
  font-size:26px;
  font-weight:700;
  line-height:1.15;
  overflow:visible;
  overflow-wrap:normal;
}
.dam-stat-card .kpi-label{
  font-size:12.5px;
  line-height:1.3;
  white-space:nowrap;
  overflow:visible;
  text-overflow:clip;
  overflow-wrap:normal;
  letter-spacing:-.01em;
}
.dam-stat-icon{
  width:30px;
  height:30px;
  border-radius:9999px;
  flex:0 0 30px;
}
.dam-stat-icon svg{ width:14px; height:14px; }
@container dam-staff (max-width: 959px){
  .dam-stat-grid{ grid-template-columns:repeat(3, minmax(0, 1fr)); gap:12px; }
}
@media (max-width:1024px){
  .dam-stat-grid{ grid-template-columns:repeat(2, minmax(0, 1fr)); gap:12px; }
}
@media (max-width:560px){
  .dam-stat-grid{ grid-template-columns:minmax(0, 1fr); }
}
.dam-stat-card.tone-green{ border-color:rgba(34,197,94,.32); }
.dam-stat-card.tone-green .dam-stat-icon{ color:#4ade80 !important; background:rgba(34,197,94,.14) !important; }
.dam-stat-card.tone-green .kpi-value{ color:#4ade80; }
.dam-stat-card.tone-amber{ border-color:rgba(245,158,11,.35); }
.dam-stat-card.tone-amber .dam-stat-icon{ color:#fbbf24 !important; background:rgba(245,158,11,.14) !important; }
.dam-stat-card.tone-amber .kpi-value{ color:#fbbf24; }
.dam-stat-card.tone-red{ border-color:rgba(239,68,68,.35); }
.dam-stat-card.tone-red .dam-stat-icon{ color:#fca5a5 !important; background:rgba(239,68,68,.14) !important; }
.dam-stat-card.tone-red .kpi-value{ color:#fca5a5; }
.dam-stat-card.tone-blue{ border-color:rgba(56,189,248,.32); }
.dam-stat-card.tone-blue .dam-stat-icon{ color:#7dd3fc !important; background:rgba(56,189,248,.14) !important; }
.dam-stat-card.tone-blue .kpi-value{ color:#7dd3fc; }
html[data-theme="light"] .dam-stat-card.tone-green .dam-stat-icon{ color:#15803d !important; }
html[data-theme="light"] .dam-stat-card.tone-green .kpi-value{ color:#15803d; }
html[data-theme="light"] .dam-stat-card.tone-amber .dam-stat-icon{ color:#b45309 !important; }
html[data-theme="light"] .dam-stat-card.tone-amber .kpi-value{ color:#b45309; }
html[data-theme="light"] .dam-stat-card.tone-red .dam-stat-icon{ color:#b91c1c !important; }
html[data-theme="light"] .dam-stat-card.tone-red .kpi-value{ color:#b91c1c; }
html[data-theme="light"] .dam-stat-card.tone-blue .dam-stat-icon{ color:#0369a1 !important; }
html[data-theme="light"] .dam-stat-card.tone-blue .kpi-value{ color:#0369a1; }
@supports not (container-type: inline-size){
  @media (max-width:1365px){
    .dam-stat-grid{ grid-template-columns:repeat(3, minmax(0, 1fr)); gap:12px; }
  }
}
.sw-chips{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:4px 0 14px;
}
.dam-form-error,
.modal-form-error{
  margin:0 0 12px;
  color:#fca5a5;
  font-size:13px;
}
.sw-chip{
  padding:8px 14px;
  border-radius:9999px;
  border:1px solid var(--border);
  background:var(--surface);
  color:var(--text);
  font-size:12px;
  font-weight:600;
  line-height:1.3;
  text-decoration:none;
  transition:border-color .15s ease, background .15s ease, color .15s ease;
}
.sw-chip:hover{
  border-color:rgba(34,197,94,.35);
  color:var(--text);
}
.sw-chip.active{
  background:var(--accent-glow);
  border-color:var(--accent);
  color:var(--accent-bright);
}

.dam-operator-drivers-page .page-head{
  flex-wrap:nowrap;
  align-items:flex-start;
}
.dam-operator-drivers-page .page-head .actions{
  flex-shrink:0;
  margin-left:auto;
}
.dam-table-scroll{
  overflow-x:auto;
  max-width:100%;
}
.dam-table{
  min-width:780px;
  width:100%;
}
.dam-profile-overlay{ z-index:220; }
.dam-vehicle-card{
  border:1px solid var(--border-soft);
  border-radius:12px;
  padding:14px 16px;
  background:var(--surface-2);
  margin-bottom:12px;
}
.dam-vehicle-card .detail-grid{ margin:0; }
.notif-desc-structured .notif-link{ margin:8px 0 0; }
.notif-desc-structured .notif-link a{ color:var(--accent); font-weight:600; }
.btn-view-drivers{
  border-radius:9999px;
  white-space:nowrap;
}
.dam-summary{
  display:flex;
  flex-wrap:wrap;
  gap:8px 16px;
  margin:0 0 16px;
  color:var(--text-dim);
  font-size:13px;
}
.dam-summary span{
  white-space:normal;
  overflow-wrap:anywhere;
  max-width:100%;
}
.dam-summary .compliance-detail-pct{
  font-size:inherit;
  font-weight:700;
  white-space:normal;
  overflow-wrap:anywhere;
}
.dam-actions-col{
  min-width:148px;
  width:148px;
  overflow:visible;
  vertical-align:middle;
}
.dam-actions{
  display:flex;
  gap:6px;
  flex-wrap:nowrap;
  align-items:center;
  justify-content:flex-start;
}
.dam-actions form{ margin:0; display:flex; flex:0 0 auto; }
.dam-actions .row-icon-btn,
.dam-actions .dam-act-slot{
  width:34px;
  height:34px;
  flex:0 0 34px;
  border-radius:9999px;
}
.dam-actions .row-icon-btn svg{ width:14px; height:14px; }
.dam-actions .dam-act-view{
  color:var(--accent-bright);
  border-color:rgba(198,214,239,.35);
  background:var(--accent-glow);
}
.dam-actions .dam-act-approve{
  color:var(--green-bright);
  border-color:rgba(94,234,212,.45);
  background:var(--green-glow);
}
.dam-actions .dam-act-approve.is-done,
.dam-actions .dam-act-approve:disabled{
  opacity:.55;
  cursor:default;
}
.dam-actions .dam-act-reject{
  color:#fca5a5;
  border-color:rgba(239,68,68,.35);
  background:rgba(239,68,68,.14);
}
.dam-actions .dam-act-edit{
  color:#fcd34d;
  border-color:rgba(245,158,11,.35);
  background:rgba(245,158,11,.12);
}
html[data-theme="light"] .dam-actions .dam-act-edit{
  color:#b45309;
  border-color:rgba(217,119,6,.3);
  background:rgba(245,158,11,.12);
}
.dam-act-slot{
  visibility:hidden;
  pointer-events:none;
  border:none;
  background:transparent;
}
html[data-theme="light"] .dam-actions .dam-act-view{
  color:#2563eb;
  border-color:rgba(37,99,235,.28);
  background:rgba(37,99,235,.1);
}
html[data-theme="light"] .dam-actions .dam-act-approve{
  color:#047857;
  border-color:rgba(5,150,105,.4);
  background:rgba(16,185,129,.18);
}
html[data-theme="light"] .dam-actions .dam-act-reject{
  color:#b91c1c;
  border-color:rgba(185,28,28,.28);
  background:rgba(239,68,68,.1);
}
.sw-toolbar{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px;
  margin:0 0 16px;
}
.sw-toolbar .search-box{
  max-width:280px;
  flex:0 1 260px;
}
.sw-filter-form{
  flex:1;
  min-width:180px;
}
.sw-filter-form .select-filter{
  width:100%;
  max-width:none;
}
.sw-exports{
  display:flex;
  gap:8px;
  margin-left:auto;
  flex-wrap:wrap;
}
.sw-table-panel{ padding:0; overflow:auto; }
.sw-table-panel .data-table{ min-width:860px; }
.vic-stat-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:14px;
  margin:0 0 16px;
  width:100%;
  max-width:100%;
  min-width:0;
}
.vic-stat-grid .dam-stat-card{
  width:100%;
}
@media (max-width:640px){
  .vic-stat-grid{ grid-template-columns:minmax(0, 1fr); }
}
.vic-inspector-panel .dam-table-scroll{ overflow-x:auto; max-width:100%; }
.vic-inspector-table{
  table-layout:fixed; width:100%; min-width:920px;
}
.vic-inspector-table th,
.vic-inspector-table td{
  padding:10px 12px; vertical-align:middle; white-space:nowrap;
}
.vic-inspector-table td{
  overflow:hidden; text-overflow:ellipsis;
}
.vic-col-name{ width:20%; }
.vic-col-email{ width:22%; }
.vic-col-status{ width:140px; }
.vic-col-count{ width:108px; }
.vic-col-act{ width:210px; }
.vic-inspector-table td:nth-child(4),
.vic-inspector-table td:nth-child(5),
.vic-inspector-table td:nth-child(6){ text-align:center; }
.vic-inspector-table th:nth-child(4),
.vic-inspector-table th:nth-child(5),
.vic-inspector-table th:nth-child(6){ text-align:center; }
.vic-inspector-table td:last-child{
  overflow:visible; white-space:nowrap;
}
.vic-inspector-vehicles-page .page-head{
  flex-wrap:nowrap; align-items:flex-start;
}
.vic-inspector-vehicles-page .page-head .actions{
  flex-shrink:0; margin-left:auto;
}
.vic-inner-toolbar{ margin:0 0 16px; }
.vic-vehicles-table{
  table-layout:fixed; width:100%; min-width:780px;
}
.vic-vehicles-table th,
.vic-vehicles-table td{
  padding:10px 12px; vertical-align:middle;
  overflow:hidden; text-overflow:ellipsis;
}
.vic-v-col-fr{ width:22%; }
.vic-v-col-op{ width:24%; }
.vic-v-col-plate{ width:120px; }
.vic-v-col-date{ width:120px; }
.vic-v-col-status{ width:120px; }
.vic-v-col-act{ width:64px; }
.vic-vehicles-table .row-actions{ justify-content:flex-end; }
.vic-vehicles-table td:last-child{ overflow:visible; }
.vic-vehicles-table td:first-child,
.vic-vehicles-table td:nth-child(2){
  white-space:normal; overflow-wrap:anywhere;
}
.vic-vehicles-table td:nth-child(3),
.vic-vehicles-table td:nth-child(4),
.vic-vehicles-table td:nth-child(5){
  white-space:nowrap;
}
.fis-view-modal .modal-head h3{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.fis-view-modal .fis-section{
  margin:16px 0 8px;
  font-size:14px;
  font-weight:650;
  color:var(--text);
}
.fis-view-modal .fis-result b{ display:block; }
.fis-view-modal .fis-result .badge{
  display:flex;
  width:100%;
  justify-content:center;
  box-sizing:border-box;
  padding:8px 12px;
}
.fis-view-modal .tsir-table th:first-child,
.fis-view-modal .tsir-table td:first-child{ width:44px; text-align:left; }
.fis-view-modal .tsir-table th:nth-child(2),
.fis-view-modal .tsir-table td:nth-child(2){ width:auto; text-align:left; }
.fis-view-modal .tsir-table th:nth-child(3),
.fis-view-modal .tsir-table td:nth-child(3){
  width:68px;
  text-align:center;
  padding-left:4px;
  padding-right:12px;
}
.fis-view-modal .tsir-table td.tsir-remark input{
  background:var(--bg-soft);
  border:1px solid var(--border);
  color:var(--text);
}
.sched-inspect-btn{ border-radius:999px; }
.btn-locked,
.btn-locked:disabled{
  opacity:.55;
  cursor:not-allowed !important;
  filter:grayscale(.35);
  pointer-events:none;
}
.fw-locked-action{ display:inline-flex; cursor:not-allowed; }
.ins-photo-overlay{ z-index:320; }
.ins-photo-dialog{
  position:relative; max-width:min(920px, 94vw); max-height:88vh;
  background:var(--glass-bg); border:1px solid var(--border); border-radius:16px; padding:28px 18px 18px;
}
.ins-photo-dialog img{ display:block; max-width:100%; max-height:68vh; margin:0 auto; border-radius:10px; }
.ins-photo-dialog .modal-close{ position:absolute; top:10px; right:10px; }
.ins-photo-head{
  display:flex; align-items:flex-start; justify-content:space-between; gap:12px;
  margin:0 0 12px; padding-right:4px;
}
.ins-photo-head .modal-close{ position:static; flex-shrink:0; }
.ins-photo-head-copy{ min-width:0; display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.ins-photo-head-copy h3{
  margin:0; font-size:15px; color:var(--text); overflow-wrap:anywhere; word-break:break-word;
}
.ins-photo-nav{
  display:flex; align-items:center; justify-content:center; gap:12px; margin-top:12px;
}
.ins-photo-nav[hidden]{ display:none !important; }
.ins-photo-count{ font-size:12px; font-weight:650; color:var(--text-dim); min-width:48px; text-align:center; }
.ins-checklist[data-readonly] .ins-ro-wrap{ overflow-x:auto; -webkit-overflow-scrolling:touch; }
.ins-checklist[data-readonly] .ins-ro-table{
  table-layout:fixed; width:100%; min-width:520px; border-collapse:collapse;
}
.ins-checklist[data-readonly] .ins-ro-table th,
.ins-checklist[data-readonly] .ins-ro-table td{
  padding:8px 12px; vertical-align:middle; font-size:13px;
}
.ins-checklist[data-readonly] .ins-ro-col-item{ width:auto; }
.ins-checklist[data-readonly] .ins-ro-col-result{ width:108px; }
.ins-checklist[data-readonly] .ins-ro-col-photo{ width:132px; }
.ins-checklist[data-readonly] .ins-ro-item{
  font-weight:650; white-space:normal; overflow-wrap:anywhere; word-break:break-word;
}
.ins-checklist[data-readonly] .ins-ro-result,
.ins-checklist[data-readonly] .ins-ro-photo{
  text-align:center; white-space:nowrap;
}
.ins-checklist[data-readonly] .ins-ro-table th:first-child,
.ins-checklist[data-readonly] .ins-ro-table td:first-child{
  width:auto; text-align:left;
}
.ins-checklist[data-readonly] .ins-ro-table th:nth-child(2),
.ins-checklist[data-readonly] .ins-ro-table td:nth-child(2){
  width:108px; text-align:center;
}
.ins-checklist[data-readonly] .ins-ro-table th:nth-child(3),
.ins-checklist[data-readonly] .ins-ro-table td:nth-child(3){
  width:132px; text-align:center;
}
.fis-view-modal .ins-checklist[data-readonly] .ins-ro-table th:first-child,
.fis-view-modal .ins-checklist[data-readonly] .ins-ro-table td:first-child{
  width:auto; text-align:left;
}
.fis-view-modal .ins-checklist[data-readonly] .ins-ro-table th:nth-child(2),
.fis-view-modal .ins-checklist[data-readonly] .ins-ro-table td:nth-child(2){
  width:108px; text-align:center;
}
.fis-view-modal .ins-checklist[data-readonly] .ins-ro-table th:nth-child(3),
.fis-view-modal .ins-checklist[data-readonly] .ins-ro-table td:nth-child(3),
.fis-view-modal .ins-checklist[data-readonly] .ins-ro-table th:nth-child(4),
.fis-view-modal .ins-checklist[data-readonly] .ins-ro-table td:nth-child(4),
.fis-view-modal .ins-checklist[data-readonly] .ins-ro-table th:nth-child(5),
.fis-view-modal .ins-checklist[data-readonly] .ins-ro-table td:nth-child(5){
  width:132px; text-align:center;
}
html[data-theme="light"] .ins-photo-dialog{
  background:#fff; border-color:rgba(54,75,118,.18);
}
.fis-view-modal .tsir-table th:nth-child(4),
.fis-view-modal .tsir-table td.tsir-photo{
  width:268px;
  min-width:230px;
  vertical-align:top;
  text-align:left;
}
.fis-view-modal .tsir-table td.tsir-photo{
  overflow:hidden;
}
.tsir-photo-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  border-radius:999px;
  padding:8px 14px;
  font-size:12.5px;
  min-height:36px;
  white-space:nowrap;
  flex-shrink:0;
}
.tsir-photo-btn[hidden],
.tsir-item-preview[hidden]{
  display:none !important;
}
.tsir-photo-btn svg{ width:15px; height:15px; }
.tsir-item-preview,
.tsir-item-thumb{
  display:flex;
  flex-direction:row;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
  min-width:0;
  max-width:100%;
}
.tsir-item-frame{
  width:72px;
  height:72px;
  flex:0 0 72px;
  border-radius:10px;
  border:1px solid var(--border);
  background:var(--surface-2);
  overflow:hidden;
  position:relative;
  box-sizing:border-box;
}
.tsir-item-preview img,
.tsir-item-frame img,
.tsir-item-thumb img{
  width:100%;
  height:100%;
  max-width:100%;
  max-height:100%;
  object-fit:cover;
  object-position:center;
  display:block;
  border:0;
  border-radius:0;
  background:transparent;
}
.tsir-item-thumb img{
  width:72px;
  height:72px;
  border-radius:10px;
  border:1px solid var(--border);
  background:var(--surface-2);
  flex-shrink:0;
}
.tsir-photo-actions{
  display:flex;
  flex-direction:row;
  flex-wrap:wrap;
  align-items:center;
  gap:6px;
  min-width:0;
}
@media (max-width:640px){
  .fis-view-modal .tsir-table th:nth-child(4),
  .fis-view-modal .tsir-table td.tsir-photo{
    width:auto;
    min-width:148px;
  }
  .tsir-item-preview{
    flex-direction:column;
    align-items:flex-start;
  }
}
.fis-view-modal .dvi-check svg{ width:14px; height:14px; }
@media (max-width:720px){
  .sw-page .page-head{ flex-wrap:wrap; }
  .sw-exports{ margin-left:0; }
  .report-grid.staff-report-grid{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
  .op-comp-vio-actions{ justify-content:flex-start; }
  .op-drop-form-actions{ flex-wrap:wrap; }
}

.op-drv-drop-row{ margin-top:16px; display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.op-drop-form{ margin-top:14px; display:flex; flex-direction:column; align-items:flex-start; gap:10px; }
.op-drop-reasons{ border:1px solid var(--line); border-radius:12px; padding:12px 14px; display:flex; flex-direction:column; gap:8px; min-width:min(420px, 100%); }
.op-drop-reasons legend{ font-size:12px; font-weight:700; padding:0 4px; }
.op-drop-reasons label{ display:flex; align-items:flex-start; gap:8px; font-size:13px; }
.op-drop-reasons textarea{ width:100%; margin-top:4px; }
.btn-drop-request{
  display:inline-flex; align-items:center; justify-content:center;
  padding:8px 16px; min-height:34px; border-radius:999px;
  background:transparent; color:#b91c1c;
  border:1px solid rgba(185,28,28,.45);
  font-size:12.5px; font-weight:650; cursor:pointer;
}
.btn-drop-request:hover{ background:rgba(185,28,28,.08); }
html[data-theme="dark"] .btn-drop-request{
  color:#fca5a5; border-color:rgba(252,165,165,.4);
}
html[data-theme="dark"] .btn-drop-request:hover{ background:rgba(239,68,68,.12); }
.op-drop-pending{
  display:inline-flex; align-items:center; padding:8px 14px; border-radius:999px;
  border:1px dashed rgba(180,83,9,.45); color:#b45309;
  font-size:12.5px; font-weight:650;
}
html[data-theme="dark"] .op-drop-pending{
  color:#fbbf24; border-color:rgba(251,191,36,.35);
}
.op-drop-form{
  margin-top:14px; padding:14px; border:1px solid var(--border);
  border-radius:12px; background:var(--surface);
}
.op-drop-form-actions{ display:flex; justify-content:flex-end; gap:8px; margin-top:12px; }
.op-drop-reasons{
  border:0; margin:0 0 14px; padding:0; display:flex; flex-direction:column; gap:8px;
}
.op-drop-reasons legend{
  font-size:12px; font-weight:700; color:var(--text-faint); margin-bottom:8px;
}
.op-drop-reason-card{
  display:flex; align-items:center; gap:10px; padding:12px 14px;
  border:1px solid var(--border); border-radius:12px; background:var(--surface-2);
  cursor:pointer; font-size:13px; font-weight:650;
}
.op-drop-reason-card:has(input:checked){
  border-color:var(--green);
  box-shadow:0 0 0 1px var(--green-glow);
}
.op-drop-reason-card input{ accent-color:var(--green); }
.op-drop-proof-field{ margin-top:4px; }
.op-drop-proof-label{
  display:block; font-size:12px; font-weight:700; color:var(--text-faint); margin-bottom:8px;
}
.op-drop-pdf{
  display:flex; align-items:center; gap:8px; min-width:0;
}
.op-drop-pdf b{ font-size:12px; word-break:break-all; }
.op-comp-vio-actions{
  display:flex; align-items:center; gap:8px; flex-wrap:wrap; justify-content:flex-end;
}
#opPayMethods .pay-method-card{ display:flex; }
#opPayMethods .pay-method-card input{
  position:absolute; opacity:0; pointer-events:none;
}
.drop-proof-link{
  display:inline-flex; align-items:center; gap:8px; max-width:220px;
  color:inherit; text-decoration:none; font-size:12px; font-weight:650;
}
.drop-proof-link img{
  width:48px; height:48px; object-fit:cover; border-radius:8px; border:1px solid var(--border);
}
.drop-proof-link span[data-icon] svg{ width:18px; height:18px; }
.op-pay-success-lead{ margin:0 0 12px; font-weight:700; }
.field-error{ margin:6px 0 0; color:#b91c1c; font-size:12px; }
.op-drv-empty{ margin:8px 0 0; color:var(--text-dim); font-size:13px; }
.drop-review-form{ display:flex; flex-direction:column; gap:8px; min-width:220px; }
.drop-review-remarks{ display:flex; flex-direction:column; gap:4px; font-size:11px; color:var(--text-faint); }
.drop-review-remarks input{
  padding:7px 10px; border-radius:8px; border:1px solid var(--border);
  background:var(--surface); color:var(--text); font:inherit;
}

.op-comp-modal-light{
  --bg:#f8fafc;
  --glass-bg:#ffffff;
  --surface:#ffffff;
  --surface-2:#f1f5f9;
  --surface-hover:#e2e8f0;
  --border:rgba(54,75,118,.18);
  --border-soft:rgba(54,75,118,.12);
  --text:#0a0f1a;
  --text-dim:#1e293b;
  --text-faint:#334155;
  --green:#0f766e;
  --green-bright:#0f766e;
  --green-glow:rgba(15,118,110,.12);
  --accent:#ca8a04;
  --accent-bright:#ca8a04;
  background:#f8fafc;
  color:#0a0f1a;
  border-color:rgba(54,75,118,.2);
}
.op-comp-modal-light .modal-head,
.op-comp-modal-light .modal-foot{
  border-color:rgba(54,75,118,.16);
  background:#ffffff;
}
.op-comp-modal-light .modal-head h3,
.op-comp-modal-light .modal-body,
.op-comp-modal-light .modal-body b,
.op-comp-modal-light h4,
.op-comp-modal-light .dg-item b{
  color:#0a0f1a;
}
.op-comp-modal-light .modal-body,
.op-comp-modal-light .dg-item span,
.op-comp-modal-light .op-drv-note,
.op-comp-modal-light .compliance-detail-label{
  color:#1e293b;
}
.op-comp-modal-light .modal-close{
  background:#f1f5f9; color:#334155; cursor:pointer;
}
.op-comp-modal-light .modal-close:hover{
  background:#e2e8f0; color:#0f172a;
}
.op-comp-modal-light .vio-detail-section{
  background:#ffffff;
  border:1px solid rgba(54,75,118,.16);
}
.op-comp-modal-light .doc-verify-item{
  background:#f8fafc;
  border-color:rgba(54,75,118,.16);
  color:#0a0f1a;
}
.op-comp-modal-light .compliance-detail-score{
  background:#fffbeb;
  border-color:rgba(202,138,4,.28);
}
.op-comp-modal-light .compliance-detail-pct.tone-green{ color:#0f766e; }
.op-comp-modal-light .compliance-detail-pct.tone-amber{ color:#b45309; }
.op-comp-modal-light .compliance-detail-pct.tone-red{ color:#b91c1c; }
.op-comp-modal-light .compliance-bar.lg,
.op-comp-modal-light .compliance-bar{
  background:rgba(54,75,118,.12);
}
.op-comp-modal-light .opm-meter{
  background:rgba(15,118,110,.10);
  border-color:rgba(15,118,110,.22);
}
.op-comp-modal-light .opm-meter span{ color:#0f766e; }
.op-comp-modal-light .opm-meter.hold{
  background:rgba(180,83,9,.10);
  border-color:rgba(180,83,9,.24);
}
.op-comp-modal-light .opm-meter.hold span{ color:#b45309; }
.op-comp-modal-light .opm-meter.suspended{
  background:rgba(185,28,28,.10);
  border-color:rgba(185,28,28,.24);
}
.op-comp-modal-light .opm-meter.suspended span{ color:#b91c1c; }
.op-comp-modal-light .opm-meter.inactive{
  background:rgba(71,85,105,.08);
  border-color:rgba(71,85,105,.18);
}
.op-comp-modal-light .opm-meter.inactive span{ color:#1e293b; }
.op-comp-modal-light .badge.b-green{ background:#dcfce7; color:#14532d; }
.op-comp-modal-light .badge.b-green::before{ background:#16a34a; }
.op-comp-modal-light .badge.b-amber{ background:#fef3c7; color:#92400e; }
.op-comp-modal-light .badge.b-amber::before{ background:#d97706; }
.op-comp-modal-light .badge.b-red{ background:#fee2e2; color:#991b1b; }
.op-comp-modal-light .badge.b-red::before{ background:#dc2626; }
.op-comp-modal-light .badge.b-blue{ background:#dbeafe; color:#1e3a8a; }
.op-comp-modal-light .badge.b-blue::before{ background:#2563eb; }
.op-comp-modal-light .badge.b-gray{ background:#f1f5f9; color:#334155; }
.op-comp-modal-light .badge.b-gray::before{ background:#64748b; }
.op-comp-modal-light .btn-secondary{
  background:#f8fafc; color:#18233F; border:1.5px solid #18233F;
}
.op-comp-modal-light .btn-primary{
  background:var(--btn-primary-gradient);
  color:var(--btn-primary-text);
}
.op-comp-modal-light .data-table th{
  color:#334155; background:#f1f5f9; border-color:rgba(54,75,118,.14);
}
.op-comp-modal-light .data-table td{
  color:#0a0f1a; border-color:rgba(54,75,118,.12);
}
.op-comp-modal-light .driver-scope-note{
  background:rgba(37,99,235,.06);
  border-color:rgba(37,99,235,.2);
  color:#1e293b;
}
.op-comp-modal-light .driver-scope-note strong{ color:#0a0f1a; }
.op-comp-modal-light .cell-dim{ color:#334155; }

.btn-pay-accent{
  display:inline-flex; align-items:center; justify-content:center;
  padding:8px 18px; min-height:34px; border-radius:999px;
  background:var(--accent); color:#18233F; border:1px solid var(--accent);
  font-size:12.5px; font-weight:700; cursor:pointer;
}
html[data-theme="light"] .btn-pay-accent{
  background:var(--accent); color:#18233F; border-color:#ca8a04;
}
.btn-pay-accent:hover{ filter:brightness(1.08); }
.paid-chip{
  display:inline-flex; align-items:center; padding:7px 12px; border-radius:999px;
  background:rgba(34,197,94,.16); color:#86efac; font-size:12px; font-weight:650;
}
html[data-theme="light"] .paid-chip,
.op-comp-modal-light .paid-chip{
  background:#dcfce7; color:#14532d;
}
#opPayOverlay{ z-index:260; }

body.fw-cc-locked{ overflow:hidden; pointer-events:none; }
body.fw-cc-locked .fw-cc-overlay{ pointer-events:auto; }
.fw-cc-overlay{
  position:fixed; inset:0; z-index:520;
  display:flex; align-items:center; justify-content:center;
  padding:16px;
  background:rgba(4,6,10,.72);
  backdrop-filter:blur(6px);
}
.fw-cc-overlay[hidden]{ display:none !important; }
.fw-cc-dialog{
  width:min(520px, 100%);
  max-height:88vh;
  display:flex; flex-direction:column;
  background:var(--glass-bg);
  color:var(--text);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow-lg);
  padding:20px 22px 18px;
  outline:none;
}
.fw-cc-dialog h3{ margin:0 0 6px; font-size:16px; }
.fw-cc-overlay-sub{ margin:0 0 14px; font-size:13px; color:var(--text-dim); }
.fw-cc-bar{
  height:8px; border-radius:999px; overflow:hidden;
  background:var(--surface-2); border:1px solid var(--border-soft);
  margin-bottom:14px;
}
.fw-cc-bar-fill{
  height:100%; width:0;
  background:var(--accent);
  border-radius:inherit;
}
.fw-cc-overlay.is-pass .fw-cc-bar-fill{ background:var(--green, #22c55e); }
.fw-cc-overlay.is-fail .fw-cc-bar-fill{ background:#ef4444; }
.fw-cc-overlay-list{
  display:flex; flex-direction:column; gap:8px;
  overflow-y:auto; min-height:0; flex:1 1 auto;
  padding-right:2px;
}
.fw-cc-overlay-wait{ margin:4px 0 0; font-size:13px; color:var(--text-dim); }
html[data-theme="light"] .fw-cc-overlay{ background:rgba(241,245,249,.82); }
@media (max-width:720px){
  .fw-cc-dialog{ padding:16px; max-height:92vh; }
}

.fw-cc-foot{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  margin-top:16px;
  padding-top:14px;
  border-top:1px solid var(--border);
}
.fw-pay-strip{
  display:flex;
  align-items:center;
  gap:12px;
  flex:1;
  min-width:0;
  flex-wrap:wrap;
}
.fw-pay-franchise span{
  display:block;
  font-size:11px;
  letter-spacing:.4px;
  text-transform:uppercase;
  color:var(--text-faint);
}
.fw-pay-franchise b{ font-size:14px; }
.fw-pay-copy{
  margin:0;
  font-size:13px;
  color:var(--text-dim);
  max-width:560px;
  line-height:1.45;
}
.fw-pay-approved{
  background:rgba(34,197,94,.16);
  color:#86efac;
}
html[data-theme="light"] .fw-pay-approved{
  background:rgba(22,163,74,.12);
  color:#166534;
}
.fw-cc-live{ margin-top:16px; }
.fw-cc-run h4, .fw-cc-summary h4, .fw-cc-workflow h4, .fw-cc-hold h4{
  margin:16px 0 8px;
  font-size:15px;
}
.fw-cc-list{ display:flex; flex-direction:column; gap:8px; }
.fw-cc-item{
  display:grid;
  grid-template-columns:28px minmax(0,1fr);
  gap:10px;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:10px;
  background:var(--surface);
}
.fw-cc-item.is-wait{ opacity:.45; }
.fw-cc-item.is-in{ opacity:1; }
.fw-cc-passed{ border-color:rgba(34,197,94,.35); }
.fw-cc-failed{ border-color:rgba(239,68,68,.35); }
.fw-cc-manual{ border-color:rgba(245,158,11,.35); }
.fw-cc-mark{
  width:28px; height:28px; border-radius:999px;
  display:flex; align-items:center; justify-content:center;
  background:var(--surface-2); font-weight:700;
}
.fw-cc-passed .fw-cc-mark{ background:rgba(34,197,94,.16); color:#86efac; }
.fw-cc-failed .fw-cc-mark{ background:rgba(239,68,68,.16); color:#fca5a5; }
.fw-cc-copy b{ display:block; font-size:13px; }
.fw-cc-copy p{ margin:4px 0 0; font-size:12.5px; color:var(--text-dim); }
.fw-cc-concern{ display:inline-block; margin-top:6px; font-size:11px; color:var(--text-faint); }
.fw-cc-files{ display:flex; flex-wrap:wrap; gap:8px; margin-top:8px; }
.fw-cc-file{
  display:flex; align-items:center; gap:8px; min-width:0; max-width:100%;
  padding:6px 8px; border:1px solid var(--border); border-radius:8px; text-decoration:none; color:inherit;
}
.fw-cc-file img{ width:64px; height:48px; object-fit:cover; border-radius:6px; flex-shrink:0; }
.fw-cc-filename{ min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; }
.fw-cc-hold{
  padding:14px 16px;
  border:1px solid rgba(245,158,11,.35);
  background:rgba(245,158,11,.08);
  border-radius:12px;
}
.fw-cc-hold ul{ margin:8px 0 0; padding-left:18px; }
.fw-cc-returned{ margin-top:12px; }
.field.is-failed input,
.field.is-failed select,
.op-wiz-doc.is-failed{
  border-color:#f59e0b !important;
  box-shadow:0 0 0 3px rgba(245,158,11,.18);
}
@media (max-width:720px){
  .fw-applicant-modal{ width:calc(100% - 16px); }
  .fw-cc-filename{ max-width:140px; }
}

.fw-cc-status{
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:12px 16px;
  margin-top:14px;
  padding:14px 16px;
  border:1px solid var(--border);
  border-radius:12px;
  background:rgba(255,255,255,.02);
}
.fw-cc-status.is-active{ border-color:rgba(59,130,246,.4); background:rgba(59,130,246,.07); }
.fw-cc-status.is-failed{ border-color:rgba(239,68,68,.4); background:rgba(239,68,68,.07); }
.fw-cc-status-head{ display:flex; align-items:flex-start; gap:12px; min-width:0; flex:1 1 320px; }
.fw-cc-status-icon{
  width:30px; height:30px; flex-shrink:0;
  display:grid; place-items:center;
  border-radius:50%;
  background:rgba(148,163,184,.14);
  color:var(--text-dim);
  font-weight:800;
}
.fw-cc-status-icon svg{ width:16px; height:16px; }
.fw-cc-status.is-failed .fw-cc-status-icon{ background:rgba(239,68,68,.16); color:#fca5a5; }
.fw-cc-status-copy b{ display:block; font-size:13.5px; }
.fw-cc-status-copy span{ display:block; margin-top:3px; font-size:12.5px; color:var(--text-dim); line-height:1.5; }
.fw-cc-spin{
  display:inline-block;
  width:16px; height:16px;
  border:2px solid rgba(96,165,250,.3);
  border-top-color:#60a5fa;
  border-radius:50%;
  animation:fwCcSpin .8s linear infinite;
}
@keyframes fwCcSpin{ to{ transform:rotate(360deg); } }
@media (prefers-reduced-motion:reduce){ .fw-cc-spin{ animation-duration:2.4s; } }

@media (min-width:1101px){
  .fw-list-panel.has-cc-action .fw-list-head,
  .fw-list-panel.has-cc-action .fw-list-row{
    grid-template-columns:minmax(140px,1.15fr) minmax(110px,1fr) minmax(90px,.75fr) minmax(120px,1fr) minmax(100px,.85fr) minmax(120px,1fr) minmax(90px,.7fr) 184px;
  }
  .fw-list-panel.has-cc-action .fw-list-progress{ min-width:0; overflow:hidden; }
  .fw-list-panel.has-cc-action .fw-list-progress .track-progress-bar.mini{ max-width:48px; }
}
.fw-list-action{ display:flex; flex-direction:column; gap:6px; align-items:stretch; }
.fw-list-action .btn{ justify-content:center; }
.fw-cc-view-btn{ position:relative; }
.fw-cc-dot{ width:7px; height:7px; border-radius:50%; display:inline-block; margin-left:2px; }
.fw-cc-dot.is-active{ background:#60a5fa; box-shadow:0 0 0 3px rgba(96,165,250,.22); }
.fw-cc-dot.is-failed{ background:#ef4444; }
.fw-cc-modal{ width:min(720px, calc(100% - 24px)); }
.fw-cc-modal .modal-body{ max-height:70vh; overflow:auto; }
.fw-ccm-meta{ margin-bottom:16px; }
.fw-ccm-meta .badge{ display:inline-flex; width:auto; }
.fw-ccm-step{ border:1px solid var(--border); border-radius:12px; padding:12px 14px; margin-bottom:12px; }
.fw-ccm-step header{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:8px; }
.fw-ccm-step header b{ flex:1; font-size:13.5px; }
.fw-ccm-step-num{ font-size:10.5px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; color:var(--accent-bright); }
.fw-ccm-step ul, .fw-ccm-findings ul{ margin:0; padding:0; list-style:none; display:flex; flex-direction:column; gap:8px; }
.fw-ccm-check{ display:flex; gap:10px; align-items:flex-start; }
.fw-ccm-check b{ display:block; font-size:12.5px; }
.fw-ccm-check span:not(.fw-ccm-mark){ display:block; font-size:12px; color:var(--text-dim); margin-top:2px; }
.fw-ccm-mark{
  width:20px; height:20px; flex-shrink:0;
  display:grid; place-items:center;
  border-radius:50%;
  font-size:11px; font-weight:800;
  background:rgba(34,197,94,.16); color:#86efac;
}
.fw-ccm-check.is-failed .fw-ccm-mark{ background:rgba(239,68,68,.16); color:#fca5a5; }
.fw-ccm-findings{ padding:12px 14px; border:1px solid rgba(245,158,11,.35); background:rgba(245,158,11,.08); border-radius:12px; }
.fw-ccm-findings h4{ margin:0 0 8px; font-size:13px; }
.fw-ccm-findings li{ font-size:12.5px; padding-left:14px; position:relative; }
.fw-ccm-findings li::before{ content:''; position:absolute; left:0; top:.55em; width:5px; height:5px; border-radius:50%; background:#f59e0b; }
.fw-ccm-processing, .fw-ccm-error{ display:flex; gap:12px; align-items:flex-start; padding:14px 16px; border-radius:12px; }
.fw-ccm-processing{ border:1px solid rgba(59,130,246,.35); background:rgba(59,130,246,.07); }
.fw-ccm-error{ flex-direction:column; gap:4px; border:1px solid rgba(239,68,68,.35); background:rgba(239,68,68,.07); }
.fw-ccm-processing p, .fw-ccm-error p{ margin:4px 0 0; font-size:12.5px; color:var(--text-dim); }
.fw-ccm-note{ font-size:12.5px; color:var(--text-dim); margin:0; }
html[data-theme="light"] .fw-ccm-mark{ color:#15803d; }
html[data-theme="light"] .fw-ccm-check.is-failed .fw-ccm-mark,
html[data-theme="light"] .fw-cc-status.is-failed .fw-cc-status-icon{ color:#b91c1c; }
@media (max-width:720px){
  .fw-cc-modal .detail-grid{ grid-template-columns:1fr; }
}

.repo-page{ min-width:0; }
.repo-cat-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:14px;
  margin-bottom:22px;
}
.repo-cat{
  cursor:pointer;
  text-align:left;
  width:100%;
  min-height:0;
  color:inherit;
  font:inherit;
}
.repo-cat:focus{ outline:none; }
.repo-cat:focus-visible{
  outline:2px solid var(--chart-primary);
  outline-offset:3px;
}
.repo-cat.is-selected{
  border-color:var(--chart-primary);
  box-shadow:0 0 0 3px var(--chart-glow), 0 10px 24px rgba(0,0,0,.18);
}
.repo-cat .kpi-label{
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.repo-cat .kpi-value{
  font-size:28px;
  line-height:1.1;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
}
.repo-cat.tone-blue .kpi-icon{ background:rgba(56,189,248,.14); color:#7dd3fc; }
.repo-cat.tone-green .kpi-icon{ background:rgba(74,222,128,.14); color:#4ade80; }
.repo-cat.tone-amber .kpi-icon{ background:rgba(251,191,36,.16); color:#fbbf24; }
.repo-cat.tone-red .kpi-icon{ background:rgba(248,113,113,.14); color:#fca5a5; }
html[data-theme="light"] .repo-cat.tone-blue .kpi-icon{ background:rgba(3,105,161,.10); color:#0369a1; }
html[data-theme="light"] .repo-cat.tone-green .kpi-icon{ background:rgba(22,163,74,.10); color:#15803d; }
html[data-theme="light"] .repo-cat.tone-amber .kpi-icon{ background:rgba(180,83,9,.10); color:#b45309; }
html[data-theme="light"] .repo-cat.tone-red .kpi-icon{ background:rgba(185,28,28,.10); color:#b91c1c; }
.repo-table-panel{ padding:18px 20px; min-width:0; }
.repo-table-head{ display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin-bottom:12px; flex-wrap:wrap; }
.repo-table-head h2{ margin:0; font-size:16px; }
.repo-hint{ margin:4px 0; }
.repo-status, .repo-error, .repo-empty{ margin:8px 0; }
.repo-error{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; color:#fca5a5; }
.repo-error[hidden],
.repo-hint[hidden],
.repo-table-head[hidden],
.repo-status[hidden],
.repo-table-wrap[hidden]{ display:none !important; }
html[data-theme="light"] .repo-error{ color:#b91c1c; }
.repo-table-scroll{ overflow-x:auto; -webkit-overflow-scrolling:touch; }
.repo-table{
  table-layout:fixed;
  width:100%;
  min-width:720px;
  border-collapse:collapse;
}
.repo-table th,
.repo-table td{
  padding:8px 10px;
  vertical-align:middle;
  font-size:13px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.repo-table .repo-action{
  width:148px;
  white-space:nowrap;
  text-overflow:clip;
  overflow:visible;
}
.repo-ins-overlay{ z-index:240; align-items:stretch; }
.repo-ins-modal{
  max-width:min(920px, 100%);
  width:100%;
  margin:auto;
  max-height:min(88vh, 100%);
}
.repo-ins-head-copy{ min-width:0; padding-right:8px; }
.repo-ins-head-copy h3{ overflow-wrap:anywhere; word-break:break-word; }
.repo-ins-meta{
  margin:4px 0 0;
  font-size:12.5px;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.repo-list-scroll{ overflow-x:auto; -webkit-overflow-scrolling:touch; }
.repo-list-table{
  table-layout:fixed;
  width:100%;
  min-width:520px;
  border-collapse:collapse;
}
.repo-list-table th,
.repo-list-table td{
  padding:8px 10px;
  vertical-align:middle;
  font-size:13px;
}
.repo-list-table th:nth-child(2),
.repo-list-table td:nth-child(2){ width:108px; }
.repo-list-table th:nth-child(3),
.repo-list-table td:nth-child(3){ width:72px; }
.repo-list-table th:nth-child(4),
.repo-list-table td:nth-child(4){ width:132px; }
.repo-list-item{
  font-weight:650;
  white-space:normal;
  overflow-wrap:anywhere;
  word-break:break-word;
}
@media (max-width:1100px){
  .repo-cat-grid{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
}
@media (max-width:640px){
  .repo-cat-grid{ grid-template-columns:1fr; }
  .repo-ins-overlay{ padding:10px; }
  .ins-photo-overlay{ padding:10px; }
  .ins-photo-dialog img{ max-height:52vh; }
}

/* Web session guard */
html.session-checking body{ visibility:hidden; }
.overlay.idle-warn-overlay{ z-index:1000; }
.idle-warn-modal{ max-width:420px; }
.idle-warn-modal .modal-foot{ justify-content:flex-end; }

/* Driver accreditation payment */
.badge.dam-pay-chip{ margin-left:6px; background:rgba(245,158,11,.14); color:#fcd34d; border:1px solid rgba(245,158,11,.3); }
.badge.dam-pay-chip::before{ background:#fcd34d; }
html[data-theme="light"] .badge.dam-pay-chip{ background:#fef3c7; color:#92400e; border-color:rgba(217,119,6,.3); }
html[data-theme="light"] .badge.dam-pay-chip::before{ background:#d97706; }
.badge.dam-pay-chip{ white-space:nowrap; }
.dam-acc-cell .badge.dam-pay-chip{ display:flex; width:max-content; max-width:92px; margin:4px 0 0; padding:3px 8px; font-size:10.5px; gap:5px; white-space:normal; text-align:left; line-height:1.2; }
.op-drv-drop-row .btn-drv-pay{ border-radius:999px; }
.overlay.drv-pay-overlay,
.overlay.dam-receive-overlay{ z-index:260; }
.drv-pay-summary .dg-item b.mono{ letter-spacing:.02em; }
.drv-pay-methods{ display:grid; grid-template-columns:repeat(auto-fill, minmax(150px, 1fr)); gap:8px; margin-top:6px; }
.drv-pay-method{ display:flex; align-items:center; gap:8px; padding:10px 12px; border:1px solid var(--border); border-radius:999px; cursor:pointer; font-size:13px; }
.drv-pay-method input{ accent-color:var(--accent-bright, #60a5fa); }
.drv-pay-method:has(input:checked){ border-color:var(--accent-bright, #60a5fa); background:var(--accent-glow, rgba(96,165,250,.12)); }
.drv-pay-success{ text-align:center; padding:8px 0; }
.drv-pay-success .mono{ font-size:16px; font-weight:700; }
.dam-form-error{ color:#fca5a5; font-size:13px; margin:0 0 10px; }
html[data-theme="light"] .dam-form-error{ color:#b91c1c; }
.field .field-error[data-dam-field]{ margin-top:4px; }

/* Readability: stronger secondary text for older users */
:root{
  --text-dim:      #E3ECF8;
  --text-faint:    #BCCBE0;
}
html[data-theme="light"],
.op-comp-modal-light{
  --text-dim:      #0f172a;
  --text-faint:    #1e293b;
  --badge-gray-text: #1e293b;
}
input::placeholder,
textarea::placeholder{ color:var(--text-faint); opacity:1; }

/* Audit Trail (Main Admin) */
.audit-filters{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(170px, 1fr));
  gap:12px;
  align-items:end;
  padding:16px;
  margin:0 0 14px;
}
.audit-filters label{ display:flex; flex-direction:column; gap:5px; font-size:13px; font-weight:600; color:var(--text-dim); min-width:0; }
.audit-filters input,
.audit-filters .select-filter{
  font:inherit; font-size:14px; font-weight:500; color:var(--text);
  background:var(--surface); border:1px solid var(--border); border-radius:8px;
  padding:8px 10px; width:100%; min-width:0;
}
.audit-filters .hist-filter-actions{ grid-column:span 2; }
.audit-page .audit-table{ min-width:1360px; }
.audit-page .data-table td.audit-wrap{ white-space:normal; overflow-wrap:anywhere; vertical-align:top; }
.audit-page .data-table td{ vertical-align:top; font-size:13px; }
.audit-page .data-table th{ white-space:normal; vertical-align:bottom; line-height:1.3; }
.audit-sub{ display:block; font-size:12px; color:var(--text-faint); }
.audit-col-id{ width:96px; }
.audit-col-user{ width:190px; }
.audit-col-detail{ width:280px; }
.audit-col-ip{ width:120px; }
.audit-col-status{ width:96px; }
.audit-chain{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 0 14px; padding:12px 14px; border-radius:12px; background:#f4f7fb; border:1px solid var(--border-soft); }
.audit-chain p{ margin:0; font-size:14px; font-weight:650; color:#111; }
.audit-chain-ok{ color:#14532d; }
.audit-chain-bad{ color:#9b1c1c; }
.audit-chain-note{ color:#111; }
html[data-theme="dark"] .audit-chain{ background:#243352; }
html[data-theme="dark"] .audit-chain p,
html[data-theme="dark"] .audit-chain-note{ color:#f4f7fb; }
html[data-theme="dark"] .audit-chain-ok{ color:#b7f7c7; }
html[data-theme="dark"] .audit-chain-bad{ color:#ffc9c9; }
.audit-detail-btn{ margin-top:6px; }
.audit-detail label{ display:flex; flex-direction:column; gap:4px; margin:0 0 10px; font-size:14px; font-weight:650; color:var(--text-dim); }
.audit-detail input{ font-family:ui-monospace, monospace; width:100%; }
@media (max-width:720px){
  .audit-filters .hist-filter-actions{ grid-column:auto; }
}

/* Violation Management cards and tables */
.vm-page{ display:flex; flex-direction:column; gap:16px; }
.vm-cards{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:16px;
}
.vm-card{
  width:100%;
  text-align:left;
  cursor:pointer;
  border:1px solid var(--border);
  background:var(--surface);
  color:inherit;
  font:inherit;
}
.vm-card[aria-pressed="true"]{
  border-color:var(--accent, #38bdf8);
  box-shadow:0 0 0 1px var(--accent, #38bdf8);
}
.vm-hint, .vm-loading{ margin:8px 0 0; color:var(--text-dim); }
.vm-error{ display:flex; align-items:center; gap:12px; color:var(--text-dim); }
.vm-table-wrap{ overflow-x:auto; }
.vm-table{ min-width:920px; }
.vm-table th, .vm-table td{ vertical-align:middle; }
.vm-table .vm-sub{ display:block; font-size:12px; color:var(--text-faint); font-weight:500; }
.vm-pager{ display:flex; justify-content:space-between; align-items:center; gap:12px; margin-top:12px; }
@media (max-width:1100px){
  .vm-cards{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
}
@media (max-width:640px){
  .vm-cards{ grid-template-columns:minmax(0, 1fr); }
}

/* Standalone applicant/driver photo chip (inspection modals). Not used for Personal Information blocks. */
.applicant-photo{
  /* Do NOT set container-type here when nested in flex/grid — it can collapse height and paint over siblings. */
  margin:0 0 16px;
  position:relative;
  max-width:100%;
  min-width:0;
  height:auto;
  overflow:visible;
}
.applicant-photo-row{
  display:flex;
  align-items:center;
  gap:16px;
  min-width:0;
  /* Keep name beside the photo — never wrap onto a second row. */
  flex-wrap:nowrap;
}
.applicant-photo-frame{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:6px;
  flex:0 0 auto;
  position:relative;
}
.applicant-photo-btn{
  width:96px;
  height:96px;
  aspect-ratio:1 / 1;
  padding:0;
  border:1px solid var(--border);
  border-radius:12px;
  overflow:hidden;
  background:var(--bg-soft);
  cursor:pointer;
  flex:0 0 96px;
  position:relative;
  float:none;
}
.applicant-photo-btn img{ width:100%; height:100%; object-fit:cover; display:block; }
.applicant-photo-empty{
  width:96px;
  height:96px;
  aspect-ratio:1 / 1;
  flex:0 0 96px;
  border:1px solid var(--border);
  border-radius:12px;
  background:var(--bg-soft);
  color:var(--text-faint);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:4px;
  font-size:12px;
  line-height:1.25;
  text-align:center;
  padding:8px;
  box-sizing:border-box;
  position:relative;
  float:none;
  overflow:hidden;
}
.applicant-photo-empty svg{ width:22px; height:22px; }
.applicant-photo-caption{
  font-size:10px;
  font-weight:700;
  letter-spacing:.02em;
  color:var(--text-faint);
  text-align:center;
  line-height:1.2;
}
.applicant-photo-name{
  min-width:0;
  flex:1 1 160px;
  position:relative;
}
.applicant-photo-name span{ display:block; font-size:12.5px; font-weight:600; color:var(--text-dim); }
.applicant-photo-name strong{
  display:block;
  margin-top:2px;
  font-size:16px;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.applicant-photo-solo{ margin-bottom:0; }
.applicant-photo-solo .applicant-photo-row{ align-items:flex-start; }

/* City, Barangay, Street. Full width of the form grid, three equal columns. */
.addr-block{
  grid-column:1 / -1;
  width:100%;
  min-width:0;
  container-type:inline-size;
  container-name:addr;
}
.addr-block > .addr-block-label{ white-space:nowrap; }
.addr-block-no-group-label{
  gap:0;
}
.addr-block-no-group-label > .sr-only{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}
.addr-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:16px;
  width:100%;
  min-width:0;
}
.addr-grid > .field{ min-width:0; }
.addr-grid > .field > label{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.addr-opt{
  font-size:11px;
  font-weight:500;
  color:var(--text-faint);
}
.addr-block input{
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
}
@container addr (max-width: 600px){
  .addr-grid{ grid-template-columns:minmax(0, 1fr); }
}

/* ---- Philippine address picker (PSGC) ---- */
.ph-addr-fieldset{ border:1px solid var(--border); border-radius:12px; padding:12px 14px 14px; margin:0; min-width:0; grid-column:1 / -1; }
.ph-addr-fieldset.is-failed{ border-color:#ef4444; }
.ph-addr-fieldset > legend{ padding:0 6px; font-weight:700; font-size:15px; color:var(--text); }
.ph-addr-req{ color:#f87171; }
.ph-addr-legacy{ margin:2px 0 10px; font-size:14px; line-height:1.5; color:var(--text-dim); }
.ph-addr-grid{ display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:12px 14px; }
.ph-addr .ph-addr-field{ display:flex; flex-direction:column; gap:6px; margin:0; min-width:0; }
.ph-addr .ph-addr-field label{ font-size:14px; font-weight:600; }
.ph-addr .ph-addr-field select,
.ph-addr .ph-addr-field input{ min-height:46px; font-size:16px; width:100%; }
.ph-addr .ph-addr-search{ min-height:40px !important; font-size:15px !important; }
.ph-addr .ph-addr-field select:disabled{ opacity:.65; cursor:not-allowed; }
.ph-addr .ph-addr-street{ margin-top:12px; }
.ph-addr-opt{ font-weight:400; color:var(--text-faint); }
.ph-addr-status{ margin-top:8px; font-size:14px; min-height:0; }
.ph-addr-status.is-error{ display:flex; flex-wrap:wrap; align-items:center; gap:10px; padding:10px 12px; border-radius:10px; background:rgba(239,68,68,.12); border:1px solid rgba(239,68,68,.45); color:var(--text); }
.ph-addr[aria-busy="true"] select{ cursor:progress; }
@media (max-width:640px){ .ph-addr-grid{ grid-template-columns:1fr; } }

/* ---- Checked submit overlay ---- */
.submit-check{ position:fixed; inset:0; z-index:4000; display:flex; align-items:center; justify-content:center; padding:20px; background:rgba(6,12,24,.62); backdrop-filter:blur(2px); animation:fadeIn .15s ease; }
.submit-check-card{
  width:min(440px, 100%);
  max-width:100%;
  padding:26px 24px 22px;
  border-radius:16px;
  text-align:center;
  background:var(--bg, #18233F);
  border:1px solid var(--border);
  box-shadow:0 24px 60px rgba(0,0,0,.4);
  color:var(--text);
  display:flex;
  flex-direction:column;
  align-items:center;
}
.submit-check-card p{
  margin:14px 0 0;
  font-size:15px;
  line-height:1.55;
  font-weight:600;
  max-width:36ch;
  overflow-wrap:anywhere;
}
.submit-check-spinner{
  display:inline-block;
  width:44px;
  height:44px;
  flex:0 0 44px;
  border-radius:50%;
  border:4px solid rgba(148,163,184,.35);
  border-top-color:#60a5fa;
  animation:submitCheckSpin .8s linear infinite;
}
.submit-check-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  box-sizing:border-box;
  width:44px;
  height:44px;
  min-width:44px;
  min-height:44px;
  max-width:48px;
  max-height:48px;
  flex:0 0 44px;
  border-radius:50%;
  font-size:20px;
  line-height:1;
  font-weight:700;
  overflow:hidden;
  background:rgba(239,68,68,.16);
  color:#f87171;
}
.submit-check-icon svg{
  width:22px !important;
  height:22px !important;
  max-width:22px;
  max-height:22px;
  display:block;
  flex-shrink:0;
}
.submit-check.is-retry .submit-check-icon,
.submit-check.is-expired .submit-check-icon{ background:rgba(245,158,11,.16); color:#f59e0b; }
.submit-check.is-success .submit-check-card{ border-color:rgba(34,197,94,.28); }
.submit-check.is-success .submit-check-card p{ margin-top:0; font-size:15px; font-weight:550; color:var(--text); }
.submit-check-app-no{
  display:inline;
  font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight:700;
  font-size:1.05em;
  letter-spacing:.02em;
  color:var(--text);
  overflow-wrap:anywhere;
}
.submit-check-actions{ display:flex; flex-wrap:wrap; justify-content:center; gap:10px; margin-top:18px; width:100%; }
.submit-check-actions .btn{ min-height:44px; font-size:15px; }
.submit-check-actions .btn[disabled]{ opacity:.55; cursor:not-allowed; }
@media (max-width:480px){
  .submit-check{ padding:16px; }
  .submit-check-card{ padding:22px 18px 18px; }
  .submit-check-card p{ font-size:14px; max-width:none; }
}

.submit-success-alert{
  display:flex;
  align-items:flex-start;
  gap:12px;
  margin:0 0 20px;
  padding:16px 18px;
  border-radius:var(--radius);
  border:1px solid rgba(34,197,94,.38);
  background:rgba(34,197,94,.12);
  color:var(--text);
  position:relative;
}
.submit-success-alert > div{
  min-width:0;
  flex:1 1 auto;
}
.submit-success-alert strong{
  display:block;
  font-size:14px;
  font-weight:700;
  margin-bottom:4px;
}
.submit-success-alert > div > span{
  display:block;
  font-size:14px;
  line-height:1.5;
  color:var(--text);
  font-weight:600;
  overflow-wrap:anywhere;
}
.submit-success-alert-close{
  margin-left:auto;
  border:0;
  background:transparent;
  color:var(--text-dim);
  font-size:22px;
  line-height:1;
  cursor:pointer;
  padding:0 4px;
  flex:0 0 auto;
}
.submit-success-alert-close:hover{ color:var(--text); }
html[data-theme="light"] .submit-success-alert{
  background:rgba(22,163,74,.1);
  border-color:rgba(22,163,74,.28);
}
@keyframes submitCheckSpin{ to{ transform:rotate(360deg); } }
@media (prefers-reduced-motion: reduce){ .submit-check-spinner{ animation-duration:2.4s; } }

.ann-panel{ margin-bottom:18px; }
.ann-panel-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:8px; }
.ann-panel-head h2{ margin:0; font-size:16px; }
.ann-empty{ margin:0; color:var(--text-dim); }
.ann-list{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px; }
.ann-row{ width:100%; display:grid; grid-template-columns:auto 1fr auto auto; gap:10px; align-items:center; text-align:left; background:transparent; border:1px solid var(--border-soft); border-radius:12px; padding:8px 10px; color:inherit; cursor:pointer; }
.ann-row.is-urgent{ border-color:#e7b4b4; background:#fff1f1; }
.ann-row-title{ font-weight:650; }
.ann-row-meta,.ann-note,.ann-count{ color:var(--text-dim); font-size:12.5px; }
.ann-read{ font-size:12px; }
.ann-read.is-read{ opacity:.7; }
.ann-chip{ display:inline-flex; align-items:center; border-radius:999px; padding:2px 8px; font-size:12px; background:#eef2f6; color:#111; }
.ann-chip-urgent,.ann-status-cancelled{ background:#fde8e8; }
.ann-status-published{ background:#e7f6ec; }
.ann-status-scheduled{ background:#e8eefc; }
.ann-status-expired{ background:#eee; }
.ann-dialog{ max-width:1040px; }
.ann-dialog .table-wrap{ background:transparent; border:0; border-radius:0; box-shadow:none; backdrop-filter:none; }
.ann-dialog > .modal-foot{ justify-content:flex-end; }
.ann-dialog .modal-body{ padding-bottom:28px; }
.ann-head{ flex-direction:column; align-items:stretch; gap:12px; padding:18px 22px 14px; }
.ann-head-top{ display:flex; align-items:center; justify-content:space-between; gap:12px; }
.ann-head h3{ margin:0; }
.ann-tabs{ display:flex; gap:6px; }
.ann-tab{ border:1px solid var(--border-soft); background:transparent; border-radius:999px; padding:8px 14px; cursor:pointer; color:var(--text); font-size:14px; font-weight:650; }
.ann-tab.is-on{ background:var(--surface-2, #eef2f6); border-color:transparent; }
.ann-form{ display:flex; flex-direction:column; gap:14px; }
.ann-dialog .field,
.ann-dialog .ann-label,
.ann-dialog .field label,
.ann-dialog .ann-group legend,
.ann-dialog .ann-note,
.ann-dialog .ann-count,
.ann-dialog .ann-check{
  color:var(--text-dim);
  font-size:14px;
  font-weight:650;
}
.ann-dialog .ann-note,
.ann-dialog .ann-count,
.ann-dialog p{ margin:0; font-weight:600; }
.ann-dialog .field input::placeholder,
.ann-dialog .field textarea::placeholder{ color:#4b5563; opacity:1; }
html[data-theme="dark"] .ann-dialog .field input::placeholder,
html[data-theme="dark"] .ann-dialog .field textarea::placeholder{ color:#c5d0e0; }
.ann-group{ margin:0; padding:14px 16px; border:1px solid var(--border-soft); border-radius:14px; background:#f4f7fb; }
html[data-theme="dark"] .ann-group{ background:#243352; }
.ann-group legend{ padding:0 4px; font-size:14px; font-weight:700; }
.ann-picker{ display:flex; flex-direction:column; gap:8px; margin-top:8px; }
.ann-dates{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.ann-checks{ display:flex; flex-wrap:wrap; gap:10px 18px; }
.ann-check{ display:flex; gap:10px; align-items:center; margin:0; min-height:32px; font-size:16px; font-weight:650; cursor:pointer; }
.ann-check input{ width:22px; height:22px; margin:0; flex-shrink:0; accent-color:var(--green, #16803c); cursor:pointer; }
.ann-check input:focus-visible{ outline:2px solid #364B76; outline-offset:2px; }
.ann-file-input{
  position:absolute !important; width:1px !important; height:1px !important; padding:0 !important;
  margin:-1px !important; overflow:hidden !important; clip:rect(0,0,0,0) !important; border:0 !important;
}
.ann-file-btn{ align-self:flex-start; display:inline-flex; align-items:center; gap:8px; border-radius:999px; }
.ann-file-btn svg{ width:16px; height:16px; }
.ann-chips{ display:flex; flex-wrap:wrap; gap:6px; }
.ann-chips:empty,
.ann-results:empty,
.ann-files:empty,
.ann-errors:empty{ display:none; }
.ann-results{ display:flex; flex-direction:column; gap:4px; }
.ann-files{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px; }
.ann-files li{ display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.ann-files img{ width:36px; height:36px; object-fit:cover; border-radius:8px; }
.ann-table{ width:100%; border-collapse:collapse; font-size:13px; }
.ann-table th,.ann-table td{ text-align:left; padding:8px 8px; border-bottom:1px solid var(--border-soft); vertical-align:middle; white-space:nowrap; }
.ann-table td:first-child{ white-space:normal; }
.ann-errors{ color:#9b1c1c; margin:0 18px 8px; font-size:13px; }
.ann-review{ display:flex; flex-direction:column; gap:6px; }
.ann-review p{ margin:0; color:var(--text); }
.ann-copy{ white-space:normal; margin:10px 0 0; color:var(--text); line-height:1.5; }
html[data-theme="light"] .ann-panel,
html[data-theme="light"] .ann-dialog,
html[data-theme="light"] .ann-copy,
html[data-theme="light"] .ann-row-title{ color:#111; }
html[data-theme="dark"] .ann-row.is-urgent{ background:#3a2424; border-color:#6b3a3a; color:var(--text); }
@media (max-width:720px){
  .ann-row{ grid-template-columns:1fr; }
  .ann-dates{ grid-template-columns:1fr; }
  .ann-table{ display:block; overflow-x:auto; }
}

html{ overflow-x:clip; }
body.nav-open{ overflow:hidden; }
.pay-logo{ display:inline-flex; align-items:center; gap:8px; min-height:44px; }
.pay-logo-chip{ display:inline-flex; align-items:center; justify-content:center; flex:0 0 40px; width:40px; height:40px; padding:5px; background:#fff; border:1px solid rgba(24,35,63,.18); border-radius:50%; overflow:hidden; box-sizing:border-box; }
.pay-logo-sm .pay-logo-chip{ width:36px; height:36px; flex-basis:36px; }
.pay-logo-lg .pay-logo-chip{ width:48px; height:48px; flex-basis:48px; }
.pay-logo img{ width:100%; height:100%; max-width:none; object-fit:contain; object-position:center; display:block; }
.pay-logo-name{ font-size:14px; font-weight:700; color:inherit; }
.pay-logo-plain{ color:#18233F; }
.pay-choice-grid{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.pay-choice{ display:flex; min-height:44px; }
.pay-choice input{ position:absolute; opacity:0; width:1px; height:1px; }
.pay-choice .pay-logo{ width:100%; border:1px solid var(--border); border-radius:14px; padding:8px 10px; background:var(--surface); }
.pay-choice input:focus-visible + .pay-logo{ outline:2px solid #364B76; outline-offset:2px; }
.pay-choice input:checked + .pay-logo{ border-color:#16803c; box-shadow:0 0 0 2px rgba(22,128,60,.35); }
.topbar-search-open{ display:none; }
@media (max-width:767.98px){
  .topbar-search{ display:none; }
  .topbar-search.is-open{
    display:flex;
    position:fixed;
    left:var(--shell-gutter-x, 14px);
    right:var(--shell-gutter-x, 14px);
    top:calc(var(--topbar-h) + 8px);
    z-index:90;
    max-width:none;
  }
  .topbar-search-open{ display:inline-flex; }
}
@media (max-width:480px){
  .profile-chip span{ display:none; }
  .page-head{ flex-direction:column; align-items:stretch; }
  .page-head .actions, .page-head .btn{ width:100%; }
}
@media (max-width:640px){
  .overlay{ padding:0; align-items:stretch; }
  .modal{ width:100%; max-width:none; max-height:100dvh; height:100dvh; border-radius:0; }
  .modal-close{ width:44px; height:44px; }
  .table-wrap{ overflow-x:auto; }
  .table-wrap:not(.table-keep-scroll) table.data-table thead{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }
  .table-wrap:not(.table-keep-scroll) table.data-table,
  .table-wrap:not(.table-keep-scroll) table.data-table tbody,
  .table-wrap:not(.table-keep-scroll) table.data-table tr{ display:block; width:100%; min-width:0; }
  .table-wrap:not(.table-keep-scroll) table.data-table tr{ border:1px solid var(--border); border-radius:14px; margin:0 0 10px; padding:8px 12px; background:var(--surface); }
  .table-wrap:not(.table-keep-scroll) table.data-table td{ display:flex; justify-content:space-between; gap:8px; align-items:center; min-height:44px; border:0; white-space:normal; }
  .table-wrap:not(.table-keep-scroll) table.data-table td::before{ content:attr(data-label); font-weight:700; color:#111; margin-right:8px; }
  html[data-theme="dark"] .table-wrap:not(.table-keep-scroll) table.data-table td::before{ color:#f4f7fb; }
  /* Compliance Monitoring: keep percentage fully visible in stacked mobile cards */
  .cmp-page .table-wrap:not(.table-keep-scroll) table.data-table td[data-label="Compliance"],
  .cmp-page .table-wrap:not(.table-keep-scroll) table.data-table td.op-comp-score-cell,
  .compliance-page .table-wrap:not(.table-keep-scroll) table.data-table td[data-label="Compliance"],
  .compliance-page .table-wrap:not(.table-keep-scroll) table.data-table td.op-comp-score-cell{
    flex-wrap:wrap;
    align-items:flex-start;
    row-gap:6px;
  }
  .cmp-page .table-wrap:not(.table-keep-scroll) table.data-table td[data-label="Compliance"] .cmp-score-cell,
  .cmp-page .table-wrap:not(.table-keep-scroll) table.data-table td.op-comp-score-cell .cmp-score-cell,
  .compliance-page .table-wrap:not(.table-keep-scroll) table.data-table td[data-label="Compliance"] .cmp-score-cell,
  .compliance-page .table-wrap:not(.table-keep-scroll) table.data-table td.op-comp-score-cell .cmp-score-cell{
    flex:1 1 100%;
    width:100%;
    min-width:0;
  }
  .cmp-page .table-wrap:not(.table-keep-scroll) table.data-table,
  .cmp-page .table-wrap:not(.table-keep-scroll) table.cmp-operator-table,
  .cmp-page .table-wrap:not(.table-keep-scroll) table.cmp-table,
  .compliance-page .table-wrap:not(.table-keep-scroll) table.op-compliance-table{
    min-width:0 !important;
  }
  .cmp-page .dam-table-scroll{
    overflow-x:visible;
  }
  .cmp-page .dam-table-scroll table.cmp-operator-table{
    min-width:0 !important;
  }
  .cmp-page .dam-summary span{
    white-space:normal;
  }
  .modal.op-comp-modal,
  .modal.op-comp-modal-light{
    width:100%;
    max-width:none;
  }
  .op-comp-modal .modal-head h3,
  .op-comp-modal-light .modal-head h3{
    font-size:16px;
    line-height:1.35;
    overflow-wrap:anywhere;
  }
}
@media (max-width:425px){
  .compliance-detail-pct,
  .op-drv-modal .compliance-detail-pct{
    font-size:clamp(18px, 8vw, 24px);
  }
  .compliance-check-item{
    grid-template-columns:minmax(0, 1fr);
    gap:8px;
  }
  .compliance-check-mark{
    width:28px;
    height:28px;
  }
  .cmp-page .cmp-score-cell .compliance-detail-pct{
    font-size:12px;
  }
}
@media (max-width:1024px){
  .kpi-grid:not(.op-kpi-grid){ grid-template-columns:repeat(3, minmax(0, 1fr)); }
}
@media (max-width:767.98px){
  .kpi-grid:not(.op-kpi-grid){ grid-template-columns:repeat(2, minmax(0, 1fr)); }
}
@media (max-width:480px){
  .kpi-grid:not(.op-kpi-grid){ grid-template-columns:1fr; }
}
.zone-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:24px;
  padding:2px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  line-height:1.3;
  letter-spacing:.01em;
  white-space:nowrap;
}
.zone-pill-1,
.zone-pill-2,
.zone-pill-3,
.zone-pill-4{ border-style:solid; border-width:1px; }
.zone-pill-1{ background:rgba(239,68,68,.12); color:#b91c1c; border-color:rgba(239,68,68,.35); }
.zone-pill-2{ background:rgba(59,130,246,.12); color:#1d4ed8; border-color:rgba(59,130,246,.35); }
.zone-pill-3{ background:rgba(234,179,8,.16); color:#854d0e; border-color:rgba(234,179,8,.40); }
.zone-pill-4{ background:rgba(34,197,94,.12); color:#15803d; border-color:rgba(34,197,94,.35); }
html[data-theme="dark"] .zone-pill-1{ background:rgba(239,68,68,.16); color:#fca5a5; border-color:rgba(252,165,165,.40); }
html[data-theme="dark"] .zone-pill-2{ background:rgba(59,130,246,.16); color:#93c5fd; border-color:rgba(147,197,253,.40); }
html[data-theme="dark"] .zone-pill-3{ background:rgba(234,179,8,.16); color:#fde047; border-color:rgba(253,224,71,.40); }
html[data-theme="dark"] .zone-pill-4{ background:rgba(34,197,94,.16); color:#86efac; border-color:rgba(134,239,172,.40); }
.zone-pill-unknown{ background:transparent; color:var(--text-dim); border:0; padding:0; font-weight:600; }
.zone-filter{ display:flex; align-items:center; gap:8px; margin:0 0 12px; }
.zone-filter label{ display:flex; align-items:center; gap:8px; font-size:13px; font-weight:700; }
.zone-filter select{ min-height:40px; }
.req-photos{ margin:0; width:100%; container-type:inline-size; }
.req-photos-layout{
  display:grid;
  grid-template-columns:44px 12px 590px 12px 44px;
  align-items:center;
  justify-content:center;
  width:max-content;
  max-width:100%;
  margin:0 auto;
}
.req-photos-nav[data-req-prev]{ grid-column:1; grid-row:1; }
.req-photos-frame{ grid-column:3; grid-row:1; width:590px; max-width:590px; }
.req-photos-nav[data-req-next]{ grid-column:5; grid-row:1; }
.req-photos-bar{ grid-column:3; grid-row:2; }
.req-photos-hint{ grid-column:3; grid-row:3; }
.req-photos-stage{
  position:relative;
  width:100%;
  aspect-ratio:32 / 15;
  max-height:320px;
  background:var(--bg-soft, #1e293b);
  border:1.5px solid var(--border);
  border-radius:16px;
  overflow:hidden;
}
html[data-theme="light"] .req-photos-stage{ background:#eef2f6; }
.req-photos-slide{
  position:absolute;
  inset:0;
  opacity:0;
  z-index:0;
  transition:opacity var(--req-fade, 1500ms) ease-in-out;
  pointer-events:none;
}
.req-photos-slide.is-leaving{
  opacity:1;
  z-index:1;
  transition:none;
}
.req-photos-slide.is-active{ opacity:1; z-index:2; pointer-events:auto; }
.req-photos-open{
  display:block;
  width:100%;
  height:100%;
  padding:0;
  border:0;
  background:transparent;
  cursor:zoom-in;
}
.req-photos-open img{
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
}
.req-photos-nav{
  width:44px;
  height:44px;
  flex-shrink:0;
  padding:0;
}
.req-photos-nav svg{ width:20px; height:20px; }
.req-photos-nav:focus-visible{
  outline:2px solid var(--accent);
  outline-offset:2px;
}
.req-photos-count{
  margin:0;
  color:var(--text);
  font-size:12px;
  font-weight:700;
  line-height:1;
}
.req-photos-bar{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  margin-top:8px;
}
.req-photos-hint{
  margin:6px 0 0;
  text-align:center;
  font-size:12px;
  line-height:1.4;
  color:var(--text-dim);
}
.req-photos-dots{ display:flex; align-items:center; gap:4px; }
.req-photos .op-fm-peek-dot{
  width:28px;
  height:28px;
  border:0;
  background:transparent;
  box-shadow:none;
  border-radius:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.req-photos .op-fm-peek-dot::after{
  content:"";
  width:8px;
  height:8px;
  border-radius:50%;
  border:1.5px solid var(--border);
  background:var(--surface-2);
}
.req-photos .op-fm-peek-dot.is-active{
  width:28px;
  background:transparent;
  border:0;
  box-shadow:none;
}
.req-photos .op-fm-peek-dot.is-active::after{
  width:16px;
  border-radius:999px;
  background:var(--chart-primary, var(--green-bright, #7dd3fc));
  border-color:var(--chart-primary, var(--green, #38bdf8));
}
html[data-theme="light"] .req-photos .op-fm-peek-dot.is-active{
  background:transparent;
  border:0;
  box-shadow:none;
}
html[data-theme="light"] .req-photos .op-fm-peek-dot.is-active::after{
  background:linear-gradient(135deg, #93b4e0, #364B76);
  border-color:#18233F;
}
@media (pointer: coarse){
  .req-photos .op-fm-peek-dot,
  .req-photos .op-fm-peek-dot.is-active{ width:44px; height:44px; }
}
@container (max-width: 701px){
  .req-photos-layout{
    grid-template-columns:44px minmax(0, 1fr) 44px;
    column-gap:8px;
    row-gap:8px;
    width:min(100%, 590px);
  }
  .req-photos-frame{
    grid-column:1 / -1;
    grid-row:1;
    width:100%;
    max-width:590px;
  }
  .req-photos-nav[data-req-prev]{ grid-column:1; grid-row:2; }
  .req-photos-bar{ grid-column:2; grid-row:2; margin-top:0; }
  .req-photos-nav[data-req-next]{ grid-column:3; grid-row:2; }
  .req-photos-hint{ grid-column:1 / -1; grid-row:3; }
}
@media (max-width:720px){
  .req-photos-stage{ max-height:220px; }
}
@media (prefers-reduced-motion: reduce){
  .req-photos-slide,
  .req-photos-slide.is-leaving,
  .req-photos-slide.is-active{ transition:none; }
}

/* =========================================================
   Mobile shell polish — overflow, header, buttons, panels
   Shared across ALL authenticated roles via layouts.app
   ========================================================= */
:root{
  /* Content-only rail: gap after sidebar + matching right edge (header untouched) */
  --shell-page-inset: 28px;
  --shell-gutter-x: 20px;
  --shell-gutter-y: 20px;
  --shell-stack-gap: 12px;
  --shell-control-gap: 8px;
  --topbar-inline: 20px;
  --panel-pad-y: 12px;
  --panel-pad-x: 14px;
  --page-head-gap: 14px;
}
html, body{
  width:100%;
  max-width:100%;
  overflow-x:clip;
}
.app-shell,
.main-col,
.content{
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
}
.main-col{
  width:100%;
}
.topbar-right{
  gap:var(--shell-control-gap);
  margin-left:auto;
  padding-right:0;
  flex:0 0 auto;
  align-items:center;
}
.topbar-right .icon-btn,
.topbar-right .topbar-theme-btn,
.topbar-right .profile-chip,
.topbar-right .topbar-search-open,
.topbar .hamburger{
  flex-shrink:0;
}
.topbar-brand-mark{
  overflow:hidden;
}
.topbar-brand-mark .brand-logo,
.topbar-brand-mark .brand-logo-tdfro{
  display:block;
  margin:0 auto;
}

@media (max-width:1024px){
  :root{
    --shell-page-inset: 18px;
    --shell-gutter-x: 14px;
    --shell-gutter-y: 16px;
    --shell-stack-gap: 12px;
    --shell-control-gap: 8px;
    --topbar-inline: 14px;
    --panel-pad-y: 10px;
    --panel-pad-x: 12px;
    --page-head-gap: 12px;
  }
  .topbar{ gap:10px; }
  .topbar-brand{ gap:8px; }
  .topbar-brand-mark{
    width:40px;
    height:40px;
    flex:0 0 40px;
  }
  .topbar-brand-text b,
  .topbar-city-name{ font-size:15px; }
  .topbar-theme-btn{ margin-left:0; }
  .profile-chip{ padding:5px 10px 5px 5px; }
  .content{
    padding:
      var(--shell-gutter-y)
      max(var(--shell-page-inset), var(--shell-gutter-x), env(safe-area-inset-right, 0px))
      calc(48px + env(safe-area-inset-bottom, 0px))
      max(var(--shell-page-inset), var(--shell-gutter-x), env(safe-area-inset-left, 0px));
    width:100%;
    max-width:100%;
  }
}

/*
  Phones (<768px): completely hide "City of Ormoc" brand label.
  Keep the TDFRO logo mark. Expand header controls across full width.
*/
@media (max-width:767.98px){
  :root{
    --topbar-h:64px;
    --shell-page-inset: 12px;
    --shell-gutter-x: 12px;
    --shell-gutter-y: 14px;
    --shell-stack-gap: 10px;
    --panel-pad-y: 10px;
    --panel-pad-x: 12px;
    --shell-control-gap: 8px;
    --topbar-inline: 12px;
  }

  /* City label: remove from layout entirely (no truncate / no reserved width). */
  .app-shell .topbar .topbar-brand-text,
  .app-shell .topbar .topbar-city-label,
  .app-shell .topbar .topbar-brand-text.topbar-city-label,
  .app-shell .topbar [data-brand-city],
  .app-shell .topbar .topbar-city-name,
  .app-shell .topbar .topbar-city-sub,
  .app-shell .topbar .topbar-brand-text b,
  .app-shell .topbar .topbar-brand-text span{
    display:none !important;
    visibility:hidden !important;
    width:0 !important;
    height:0 !important;
    max-width:0 !important;
    max-height:0 !important;
    margin:0 !important;
    padding:0 !important;
    overflow:hidden !important;
    border:0 !important;
    clip:rect(0,0,0,0) !important;
    position:absolute !important;
    pointer-events:none !important;
  }

  .topbar{
    height:var(--topbar-h);
    gap:8px;
  }
  .topbar-brand{
    flex:0 0 auto;
    min-width:0;
    gap:0;
    max-width:44px;
  }
  .topbar-brand-mark{
    width:40px;
    height:40px;
    flex:0 0 40px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
  }
  .topbar-right{
    gap:var(--shell-control-gap);
    margin-left:auto;
    padding-right:0;
    max-width:100%;
  }
  .hamburger,
  .icon-btn,
  .topbar-theme-btn,
  .topbar-search-open{
    width:42px;
    height:42px;
    min-width:42px;
    min-height:42px;
  }
  .profile-chip{
    min-height:42px;
    padding:5px 8px 5px 5px;
  }
  .profile-chip .avatar{
    width:30px;
    height:30px;
  }

  .content{
    padding:
      var(--shell-gutter-y)
      max(var(--shell-page-inset), var(--shell-gutter-x), env(safe-area-inset-right, 0px))
      calc(48px + env(safe-area-inset-bottom, 0px))
      max(var(--shell-page-inset), var(--shell-gutter-x), env(safe-area-inset-left, 0px));
    width:100%;
    max-width:100%;
  }

  .page-head,
  .opm-page .page-head,
  .fw-page .page-head,
  .sw-page .page-head,
  .dam-operator-drivers-page .page-head,
  .vic-inspector-vehicles-page .page-head,
  .op-dashboard .page-head,
  .op-fm-head{
    flex-wrap:wrap;
    align-items:stretch;
    gap:var(--shell-stack-gap);
    margin-bottom:var(--shell-stack-gap);
    max-width:100%;
  }
  .page-head > div:first-child,
  .opm-page .page-head > div:first-child{
    min-width:0;
    flex:1 1 auto;
    max-width:100%;
  }
  .page-head h1,
  .op-dash-head h1,
  .op-fm-head h1{
    overflow-wrap:anywhere;
    word-break:break-word;
  }
  .page-head .actions,
  .opm-page .page-head .actions,
  .fw-page .page-head .actions,
  .sw-page .page-head .actions,
  .dam-operator-drivers-page .page-head .actions,
  .vic-inspector-vehicles-page .page-head .actions{
    width:100%;
    margin-left:0;
    flex-shrink:1;
    display:flex;
    flex-wrap:wrap;
    gap:var(--shell-control-gap);
  }
  .page-head .actions > .btn,
  .page-head .actions > a.btn{
    flex:1 1 auto;
    min-width:min(100%, 140px);
  }

  .panel,
  .form-card,
  .track-column,
  .driver-mgmt-panel,
  .kpi-card,
  .req-panel,
  .settings-operator-wrap,
  .settings-operator-wrap > .settings-nav,
  .settings-operator-wrap > .settings-content,
  .settings-operator-wrap > .settings-content > *,
  .op-dashboard,
  .op-fm-page,
  .grid-2,
  .kpi-grid{
    margin-inline:0;
    max-width:100%;
    min-width:0;
  }

  .form-actions{
    justify-content:stretch;
    gap:var(--shell-control-gap);
  }
  .form-actions > .btn{
    flex:1 1 auto;
    min-width:min(100%, 140px);
  }
  .modal-foot{
    gap:var(--shell-control-gap);
  }
  .modal-foot > .btn,
  .modal-foot-split > .btn{
    min-height:44px;
  }
  .detail-grid{ grid-template-columns:1fr; gap:12px; }

  /* Use content gutters only — avoid double horizontal padding on nested toolbars. */
  .driver-mgmt-filters,
  .toolbar,
  .opm-toolbar,
  .chip-actions,
  .hist-filter-actions{
    gap:var(--shell-control-gap);
    padding-left:0;
    padding-right:0;
    max-width:100%;
  }
  .driver-mgmt-filters{
    padding-left:12px;
    padding-right:12px;
  }
  .driver-mgmt-filters label,
  .driver-mgmt-filters .select-filter{
    min-width:0;
    flex:1 1 100%;
    max-width:100%;
  }
  .driver-mgmt-panel-head{
    flex-wrap:wrap;
    gap:10px;
    padding-left:12px;
    padding-right:12px;
  }
  .driver-mgmt-panel-actions{
    width:auto;
    max-width:100%;
    flex-wrap:nowrap;
    justify-content:flex-end;
    align-items:center;
    gap:8px;
  }
  .driver-mgmt-panel-actions .btn{
    min-height:40px;
    flex:0 0 auto;
    width:auto;
  }
  .settings-operator-wrap{ gap:var(--shell-stack-gap); }
  .settings-operator-wrap > .settings-nav{
    gap:6px;
  }
  .settings-operator-wrap > .settings-nav button{
    flex:1 1 auto;
    min-width:calc(50% - 6px);
    min-height:44px;
  }
  .dam-actions{
    flex-wrap:wrap;
    gap:var(--shell-control-gap);
  }
  .pay-choice-grid{ grid-template-columns:1fr; }
  .field{ gap:6px; max-width:100%; }
  .field label{ margin-bottom:0; }
  .field input,
  .field select,
  .field textarea{
    max-width:100%;
  }
  .overlay .modal,
  .overlay .modal-card{
    max-width:min(100vw, 100%);
  }
}

/* Tablet and up: restore "City of Ormoc" beside the logo. */
@media (min-width:768px){
  .app-shell .topbar .topbar-brand-text,
  .app-shell .topbar .topbar-city-label,
  .app-shell .topbar [data-brand-city]{
    display:block;
    visibility:visible;
    width:auto;
    height:auto;
    max-width:none;
    max-height:none;
    margin:0;
    padding:0;
    overflow:hidden;
    position:static;
    clip:auto;
    pointer-events:auto;
  }
  .app-shell .topbar .topbar-city-name,
  .app-shell .topbar .topbar-brand-text b{
    display:block;
    visibility:visible;
    width:auto;
    height:auto;
    max-width:100%;
    position:static;
    clip:auto;
  }
}
/* Full subtitle only when the shell has room (desktop). */
@media (min-width:1025px){
  .app-shell .topbar .topbar-city-sub,
  .app-shell .topbar .topbar-brand-text span{
    display:block;
    visibility:visible;
    width:auto;
    height:auto;
    max-width:100%;
    position:static;
    clip:auto;
  }
}

@media (max-width:480px){
  :root{
    --shell-page-inset: 12px;
    --shell-gutter-x: 12px;
    --shell-control-gap: 8px;
    --topbar-inline: 10px;
  }
  .topbar{ gap:6px; }
  .topbar-right{
    gap:var(--shell-control-gap);
  }
  .page-head h1{ font-size:19px; }
  .page-head:not(.op-dash-head) .actions > .btn,
  .page-head:not(.op-dash-head) .actions > a.btn,
  .form-actions > .btn{
    width:100%;
    min-width:0;
  }
  .op-dashboard-simple .op-dash-head .actions > .btn,
  .op-dashboard-simple .op-dash-head .actions > a.btn{
    flex:1 1 calc(50% - 6px);
    width:auto;
    min-width:0;
  }
  .modal-foot,
  .modal-foot-split{
    flex-direction:column-reverse;
    align-items:stretch;
  }
  .modal-foot > .btn,
  .modal-foot-split > .btn{
    width:100%;
    flex:1 1 auto;
  }
  .settings-operator-wrap > .settings-nav button{
    min-width:100%;
  }
  .overlay{ padding:0; }
}

@media (max-width:360px){
  :root{
    --shell-page-inset: 10px;
    --shell-gutter-x: 10px;
    --shell-control-gap: 6px;
    --topbar-inline: 8px;
  }
  .hamburger,
  .icon-btn,
  .topbar-theme-btn,
  .topbar-search-open{
    width:40px;
    height:40px;
    min-width:40px;
    min-height:40px;
  }
  .content{
    padding:
      14px
      max(var(--shell-page-inset), var(--shell-gutter-x), env(safe-area-inset-right, 0px))
      calc(40px + env(safe-area-inset-bottom, 0px))
      max(var(--shell-page-inset), var(--shell-gutter-x), env(safe-area-inset-left, 0px));
  }
  .btn{ font-size:12.5px; }
  .op-dashboard-simple .op-dash-head .actions > .btn,
  .op-dashboard-simple .op-dash-head .actions > a.btn{
    flex:1 1 100%;
    width:100%;
  }
}

/* =========================================================
   Operator dashboard — final responsive polish
   ========================================================= */
@media (max-width:767.98px){
  .op-dashboard-simple{
    gap:14px;
  }
  .op-dashboard-simple .op-dash-head{
    margin-bottom:2px;
  }
  .op-dashboard-simple .op-dash-head h1{
    font-size:clamp(1.125rem, 4.2vw, 1.35rem);
  }
  .op-dashboard-simple .op-dash-head p{
    font-size:12px;
  }
  .op-dashboard-simple .op-kpi-grid{
    gap:10px;
  }
  .op-dashboard-simple .op-panel{
    width:100%;
  }
  .op-dashboard-simple .op-panel .driver-mgmt-panel-head{
    padding:12px;
  }
}
@media (min-width:376px) and (max-width:430px){
  .op-dashboard-simple .op-dash-head .actions{
    width:100%;
  }
}
@media (min-width:768px) and (max-width:1024px){
  .op-dashboard-simple .op-kpi-grid{
    gap:12px;
  }
  .op-dashboard-simple .op-kpi-inner{
    flex-direction:column;
    align-items:flex-start;
  }
  .op-dashboard-simple .op-dash-head h1{
    font-size:1.25rem;
  }
}
@media (min-width:1025px){
  .op-dashboard-simple .op-kpi-grid{
    grid-template-columns:repeat(5, minmax(0, 1fr));
  }
}

/*
 * MTOP Application form ONLY — light-gray placeholders (#C0C0C0).
 * Beats global input::placeholder { color: var(--text-faint) } and
 * html[data-theme=light] .field input/select { color:#0a0f1a } via
 * ID/class specificity + !important + -webkit-text-fill-color.
 */
#opAppWizard .mtop-form .field input::-webkit-input-placeholder,
#opAppWizard .mtop-form .field textarea::-webkit-input-placeholder,
#opWizForm .mtop-form .field input::-webkit-input-placeholder,
#opWizForm .mtop-form .field textarea::-webkit-input-placeholder,
.official-form.mtop-form .field input::-webkit-input-placeholder,
.official-form.mtop-form .field textarea::-webkit-input-placeholder{
  color: #C0C0C0 !important;
  -webkit-text-fill-color: #C0C0C0 !important;
  opacity: 1 !important;
}
#opAppWizard .mtop-form .field input::-moz-placeholder,
#opAppWizard .mtop-form .field textarea::-moz-placeholder,
#opWizForm .mtop-form .field input::-moz-placeholder,
#opWizForm .mtop-form .field textarea::-moz-placeholder,
.official-form.mtop-form .field input::-moz-placeholder,
.official-form.mtop-form .field textarea::-moz-placeholder{
  color: #C0C0C0 !important;
  opacity: 1 !important;
}
#opAppWizard .mtop-form .field input:-ms-input-placeholder,
#opAppWizard .mtop-form .field textarea:-ms-input-placeholder,
#opWizForm .mtop-form .field input:-ms-input-placeholder,
#opWizForm .mtop-form .field textarea:-ms-input-placeholder,
.official-form.mtop-form .field input:-ms-input-placeholder,
.official-form.mtop-form .field textarea:-ms-input-placeholder{
  color: #C0C0C0 !important;
  opacity: 1 !important;
}
#opAppWizard .mtop-form .field input::placeholder,
#opAppWizard .mtop-form .field textarea::placeholder,
#opWizForm .mtop-form .field input::placeholder,
#opWizForm .mtop-form .field textarea::placeholder,
.official-form.mtop-form .field input::placeholder,
.official-form.mtop-form .field textarea::placeholder,
html[data-theme="light"] #opAppWizard .mtop-form .field input::placeholder,
html[data-theme="light"] #opAppWizard .mtop-form .field textarea::placeholder,
html[data-theme="light"] .official-form.mtop-form .field input::placeholder,
html[data-theme="light"] .official-form.mtop-form .field textarea::placeholder,
html[data-theme="dark"] #opAppWizard .mtop-form .field input::placeholder,
html[data-theme="dark"] #opAppWizard .mtop-form .field textarea::placeholder,
html[data-theme="dark"] .official-form.mtop-form .field input::placeholder,
html[data-theme="dark"] .official-form.mtop-form .field textarea::placeholder{
  color: #C0C0C0 !important;
  -webkit-text-fill-color: #C0C0C0 !important;
  opacity: 1 !important;
}
/*
 * MTOP Zone + Color selects only.
 * Drive color from the actual checked option (:has), not a sticky
 * data-placeholder-active attribute — that flag was staying on after
 * selection and kept selected values gray.
 * color-scheme:light keeps Windows/Chromium native select painting
 * from washing selected black text back to system gray.
 */
#opAppWizard .mtop-form .field select[name="route_id"],
#opAppWizard .mtop-form .field select[name="color_code"],
#opWizForm .mtop-form .field select[name="route_id"],
#opWizForm .mtop-form .field select[name="color_code"],
.official-form.mtop-form .field select[name="route_id"],
.official-form.mtop-form .field select[name="color_code"]{
  color-scheme: light;
}
#opAppWizard .mtop-form .field select[name="route_id"]:has(> option[value=""]:checked),
#opAppWizard .mtop-form .field select[name="color_code"]:has(> option[value=""]:checked),
#opWizForm .mtop-form .field select[name="route_id"]:has(> option[value=""]:checked),
#opWizForm .mtop-form .field select[name="color_code"]:has(> option[value=""]:checked),
.official-form.mtop-form .field select[name="route_id"]:has(> option[value=""]:checked),
.official-form.mtop-form .field select[name="color_code"]:has(> option[value=""]:checked),
html[data-theme="light"] #opAppWizard .mtop-form .field select[name="route_id"]:has(> option[value=""]:checked),
html[data-theme="light"] #opAppWizard .mtop-form .field select[name="color_code"]:has(> option[value=""]:checked),
html[data-theme="light"] .official-form.mtop-form .field select[name="route_id"]:has(> option[value=""]:checked),
html[data-theme="light"] .official-form.mtop-form .field select[name="color_code"]:has(> option[value=""]:checked),
html[data-theme="dark"] #opAppWizard .mtop-form .field select[name="route_id"]:has(> option[value=""]:checked),
html[data-theme="dark"] #opAppWizard .mtop-form .field select[name="color_code"]:has(> option[value=""]:checked),
html[data-theme="dark"] .official-form.mtop-form .field select[name="route_id"]:has(> option[value=""]:checked),
html[data-theme="dark"] .official-form.mtop-form .field select[name="color_code"]:has(> option[value=""]:checked){
  color: #C0C0C0 !important;
  -webkit-text-fill-color: #C0C0C0 !important;
}
#opAppWizard .mtop-form .field select[name="route_id"]:has(> option:checked:not([value=""])),
#opAppWizard .mtop-form .field select[name="color_code"]:has(> option:checked:not([value=""])),
#opWizForm .mtop-form .field select[name="route_id"]:has(> option:checked:not([value=""])),
#opWizForm .mtop-form .field select[name="color_code"]:has(> option:checked:not([value=""])),
.official-form.mtop-form .field select[name="route_id"]:has(> option:checked:not([value=""])),
.official-form.mtop-form .field select[name="color_code"]:has(> option:checked:not([value=""])),
html[data-theme="light"] #opAppWizard .mtop-form .field select[name="route_id"]:has(> option:checked:not([value=""])),
html[data-theme="light"] #opAppWizard .mtop-form .field select[name="color_code"]:has(> option:checked:not([value=""])),
html[data-theme="light"] .official-form.mtop-form .field select[name="route_id"]:has(> option:checked:not([value=""])),
html[data-theme="light"] .official-form.mtop-form .field select[name="color_code"]:has(> option:checked:not([value=""])),
html[data-theme="dark"] #opAppWizard .mtop-form .field select[name="route_id"]:has(> option:checked:not([value=""])),
html[data-theme="dark"] #opAppWizard .mtop-form .field select[name="color_code"]:has(> option:checked:not([value=""])),
html[data-theme="dark"] .official-form.mtop-form .field select[name="route_id"]:has(> option:checked:not([value=""])),
html[data-theme="dark"] .official-form.mtop-form .field select[name="color_code"]:has(> option:checked:not([value=""])){
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
}
#opAppWizard .mtop-form .field select[name="route_id"] > option[value=""],
#opAppWizard .mtop-form .field select[name="color_code"] > option[value=""],
#opWizForm .mtop-form .field select[name="route_id"] > option[value=""],
#opWizForm .mtop-form .field select[name="color_code"] > option[value=""],
.official-form.mtop-form .field select[name="route_id"] > option[value=""],
.official-form.mtop-form .field select[name="color_code"] > option[value=""]{
  color: #C0C0C0;
}
#opAppWizard .mtop-form .field select[name="route_id"] > option:not([value=""]),
#opAppWizard .mtop-form .field select[name="color_code"] > option:not([value=""]),
#opWizForm .mtop-form .field select[name="route_id"] > option:not([value=""]),
#opWizForm .mtop-form .field select[name="color_code"] > option:not([value=""]),
.official-form.mtop-form .field select[name="route_id"] > option:not([value=""]),
.official-form.mtop-form .field select[name="color_code"] > option:not([value=""]){
  color: #000000;
}
#opAppWizard .mtop-form .field input:not(:placeholder-shown),
#opAppWizard .mtop-form .field textarea:not(:placeholder-shown),
#opWizForm .mtop-form .field input:not(:placeholder-shown),
#opWizForm .mtop-form .field textarea:not(:placeholder-shown),
.official-form.mtop-form .field input:not(:placeholder-shown),
.official-form.mtop-form .field textarea:not(:placeholder-shown),
html[data-theme="light"] #opAppWizard .mtop-form .field input:not(:placeholder-shown),
html[data-theme="light"] #opAppWizard .mtop-form .field textarea:not(:placeholder-shown),
html[data-theme="light"] .official-form.mtop-form .field input:not(:placeholder-shown),
html[data-theme="light"] .official-form.mtop-form .field textarea:not(:placeholder-shown),
html[data-theme="dark"] #opAppWizard .mtop-form .field input:not(:placeholder-shown),
html[data-theme="dark"] #opAppWizard .mtop-form .field textarea:not(:placeholder-shown),
html[data-theme="dark"] .official-form.mtop-form .field input:not(:placeholder-shown),
html[data-theme="dark"] .official-form.mtop-form .field textarea:not(:placeholder-shown){
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
}


/* ── Cross-check 60s loading pop-up ──────────────────────────────────────── */
.fw-cc-run-modal{
  max-width:480px;
  width:min(94vw, 480px);
}
.fw-cc-run-pct{
  font-size:14px;
  font-weight:700;
  color:var(--accent);
}
.fw-cc-run-sub{
  margin:0 0 12px;
  font-size:13px;
  color:var(--text-dim);
  line-height:1.45;
}
.fw-cc-run-bar{
  width:100%;
  height:8px;
  border-radius:999px;
  background:rgba(148,163,184,.2);
  overflow:hidden;
  margin-bottom:14px;
}
.fw-cc-run-bar-fill{
  height:100%;
  background:var(--accent);
  border-radius:999px;
  transition:width .25s linear;
}
.fw-cc-run-list{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:8px;
  max-height:240px;
  overflow-y:auto;
}
.fw-cc-run-item{
  display:flex;
  align-items:center;
  gap:10px;
  font-size:13px;
  color:var(--text-faint);
}
.fw-cc-run-item.is-running{
  color:var(--text);
  font-weight:600;
}
.fw-cc-run-item.is-done{
  color:var(--text);
}
.fw-cc-run-dot{
  width:18px;
  height:18px;
  border-radius:50%;
  border:1.5px solid var(--border);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:11px;
  flex-shrink:0;
}
.fw-cc-run-item.is-running .fw-cc-run-dot{
  border-color:var(--accent);
  box-shadow:0 0 0 3px rgba(34,197,94,.16);
}
.fw-cc-run-item.is-done .fw-cc-run-dot{
  background:var(--accent);
  border-color:var(--accent);
  color:#ffffff;
}
.fw-cc-run-error{
  margin-top:12px;
  padding:10px 12px;
  border-radius:var(--radius-sm);
  border:1px solid rgba(239,68,68,.35);
  background:rgba(239,68,68,.08);
  font-size:13px;
  color:#fca5a5;
}
html[data-theme="light"] .fw-cc-run-error{
  color:#991b1b;
  background:#fef2f2;
  border-color:#fecaca;
}
@media (prefers-reduced-motion: reduce){
  .fw-cc-run-bar-fill{ transition:none; }
  .fw-cc-spin{ animation:none; }
}
