:root{
  --background:#f6f7fb;
  --panel:#ffffff;
  --border:#e7ebf3;
  --text:#182230;
  --muted:#6b7787;

  --primary:#0b6bff;
  --warning:#ffb020;
  --success:#1fbd6b;
  --danger:#e5484d;

  --radius:16px;
  --radius-sm:12px;
  --shadow:0 10px 24px rgba(16,24,40,.08);

  --text-xs:12px;
  --text-sm:13px;
  --text-md:14px;
  --text-lg:18px;
  --text-xl:22px;

  --space-1:8px;
  --space-2:16px;
  --space-3:24px;

  --font:ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}

html[data-theme="dark"]{
  --background:#0b0f16;
  --panel:#111827;
  --border:rgba(255,255,255,.10);
  --text:#f3f5f7;
  --muted:rgba(243,245,247,.68);

  --primary:#2f7dff;
  --warning:#ffb020;
  --success:#37e28d;
  --danger:#ff5b61;

  --shadow:0 18px 42px rgba(0,0,0,.45);
}

*{box-sizing:border-box}
/* html,body{height:100%} */
[hidden]{display:none !important;}
body{
  margin:0;
  font-family:var(--font);
  color:var(--text);
  background:var(--background);
  font-size:var(--text-md);
}
a{color:inherit}

.app-shell{display:flex; min-height:100dvh; position:relative;}
.auth-shell{min-height:100vh; display:grid; place-items:center; padding:var(--space-3);}
.layout-auth{
  background:
    radial-gradient(900px 500px at 20% 15%, rgba(11,107,255,.12), transparent 60%),
    radial-gradient(900px 500px at 80% 85%, rgba(31,189,107,.10), transparent 62%),
    var(--background);
}

.sidebar{
  width:272px;
  color:#eaf2ff;
  padding:18px 14px;
  position:sticky;
  top:0;
  /* height:100dvh; */
  display:flex;
  flex-direction:column;
  position:relative;
  background:
    radial-gradient(800px 280px at 40% 0%, rgba(47,125,255,.20), transparent 60%),
    linear-gradient(180deg, rgba(14, 22, 34, .96), rgba(9, 14, 22, .98));
  border-right:1px solid rgba(255,255,255,.08);
}
.brand{display:flex; gap:12px; align-items:center; padding:8px 10px; margin-bottom:12px;}
.logo{
  width:40px;
  height:40px;
  border-radius:12px;
  background:rgba(255,255,255,.06);
  display:grid;
  place-items:center;
  color:#eaf2ff;
  border:1px solid rgba(255,255,255,.08);
}
.brand-name{font-weight:900; letter-spacing:.2px; font-size:14px}
.brand-sub{font-size:12px; opacity:.75}
.nav,.nav-secondary{display:flex; flex-direction:column; gap:6px; padding:8px;}
.nav-secondary{margin-top:auto;}
.nav-link{
  padding:10px 12px;
  border-radius:12px;
  text-decoration:none;
  color:#eaf2ff;
  opacity:.92;
  display:flex;
  align-items:center;
  gap:10px;
  border:1px solid transparent;
  min-height:44px;
}
.nav-ico{
  width:22px;
  opacity:.9;
  display:grid;
  place-items:center;
}
.nav-ico svg{display:block}
.nav-link:hover{background:rgba(255,255,255,.08)}
.nav-link.active{
  background:linear-gradient(90deg, rgba(47,125,255,.22), rgba(47,125,255,.08));
  border-color:rgba(47,125,255,.22);
  opacity:1;
}
.nav-link--subtle{opacity:.78}

body.sidebar-collapsed .app-shell{padding-left:86px;}
body.sidebar-collapsed .sidebar{
  width:86px;
  padding:18px 10px;
  position:fixed;
  left:0;
  top:0;
  z-index:40;
}
/* body.sidebar-collapsed .brand{justify-content:center; gap:12px;} */
body.sidebar-collapsed .brand-text{opacity:0; width:0; overflow:hidden; pointer-events:none;}
body.sidebar-collapsed .nav-link{justify-content:center; padding:10px; gap:0;}
body.sidebar-collapsed .nav-label{opacity:0; width:0; overflow:hidden; pointer-events:none;}

body.sidebar-collapsed .sidebar:hover{width:272px; padding:18px 14px;}
body.sidebar-collapsed .sidebar:hover .brand-text{opacity:1; width:auto; pointer-events:auto;}
body.sidebar-collapsed .sidebar:hover .nav-link{justify-content:flex-start; padding:10px 12px; gap: 10px;}
body.sidebar-collapsed .sidebar:hover .nav-label{opacity:1; width:auto; pointer-events:auto;}

.sidebar{transition:width .18s ease, padding .18s ease;position: sticky; top: 0; height: 100vh;}
.brand-text,.nav-label{transition:opacity .12s ease;}

.main{flex:1; padding:18px 18px 28px; min-width:0; min-height:100dvh;}
.page{max-width:1400px; margin:0 auto; display:grid; gap:var(--space-2);}
.dash{max-width:1250px;}

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:14px 16px;
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  position:sticky;
  top:16px;
  z-index:30;
}

/* Dashboard (light) */
html[data-theme="light"] .layout-app[data-page="dashboard"]{
  background:
    radial-gradient(1000px 700px at 15% 10%, rgba(11,107,255,.06), transparent 60%),
    radial-gradient(900px 600px at 85% 0%, rgba(192,85,255,.05), transparent 55%),
    var(--background);
}
html[data-theme="light"] .layout-app[data-page="dashboard"] .main{padding-top:26px;}
html[data-theme="light"] .layout-app[data-page="dashboard"] .topbar{
  background:rgba(255,255,255,.82);
  border-color:rgba(231,235,243,.9);
  box-shadow:0 18px 42px rgba(16,24,40,.12);
  position:sticky;
  top:16px;
  z-index:30;
  backdrop-filter:blur(10px);
}
html[data-theme="light"] .layout-app[data-page="dashboard"] .breadcrumb{color:var(--muted);}
html[data-theme="light"] .layout-app[data-page="dashboard"] .page-title{color:var(--text);}
html[data-theme="light"] .layout-app[data-page="dashboard"] .topbar-search{
  background:#fff;
  border-color:var(--border);
  color:var(--muted);
}
html[data-theme="light"] .layout-app[data-page="dashboard"] .topbar-search .input{color:var(--text);}
html[data-theme="light"] .layout-app[data-page="dashboard"] .btn.ghost{
  background:#fff;
  border-color:var(--border);
  color:var(--text);
}
html[data-theme="light"] .layout-app[data-page="dashboard"] .btn.primary{
  box-shadow:0 12px 26px rgba(11,107,255,.25);
}

/* Dashboard (dark) */
html[data-theme="dark"] .layout-app[data-page="dashboard"]{
  background:
    radial-gradient(1000px 700px at 15% 10%, rgba(47,125,255,.18), transparent 60%),
    radial-gradient(900px 600px at 85% 0%, rgba(192,85,255,.12), transparent 55%),
    linear-gradient(180deg, #0b0f16, #06080c);
}
html[data-theme="dark"] .layout-app[data-page="dashboard"] .main{padding-top:26px;}
html[data-theme="dark"] .layout-app[data-page="dashboard"] .topbar{
  background:rgba(17, 24, 39, .72);
  border-color:rgba(255,255,255,.10);
  box-shadow:0 18px 42px rgba(0,0,0,.45);
  position:sticky;
  top:16px;
  z-index:30;
  backdrop-filter:blur(10px);
}
html[data-theme="dark"] .layout-app[data-page="dashboard"] .breadcrumb{color:rgba(255,255,255,.70);}
html[data-theme="dark"] .layout-app[data-page="dashboard"] .page-title{color:#fff;}
html[data-theme="dark"] .layout-app[data-page="dashboard"] .topbar-search{
  background:rgba(255,255,255,.06);
  border-color:rgba(255,255,255,.12);
  color:rgba(255,255,255,.70);
}
html[data-theme="dark"] .layout-app[data-page="dashboard"] .topbar-search .input{color:#fff;}
html[data-theme="dark"] .layout-app[data-page="dashboard"] .btn.ghost{
  background:rgba(255,255,255,.06);
  border-color:rgba(255,255,255,.12);
  color:#fff;
}
html[data-theme="dark"] .layout-app[data-page="dashboard"] .btn.primary{box-shadow:0 12px 26px rgba(47,125,255,.25);}

html[data-theme="dark"] .dash-stat,
html[data-theme="dark"] .dash-panel{
  background:
    radial-gradient(900px 320px at 50% 0%, rgba(47,125,255,.12), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border-color:rgba(255,255,255,.10);
  box-shadow:0 26px 60px rgba(0,0,0,.45);
  color:#fff;
}
html[data-theme="dark"] .dash-stat-label,
html[data-theme="dark"] .dash-stat-sub,
html[data-theme="dark"] .dash-item-sub,
html[data-theme="dark"] .dash-bar-pct,
html[data-theme="dark"] .dash-alert-body,
html[data-theme="dark"] .dash-wo-prog,
html[data-theme="dark"] .dash-wo-sub{
  color:rgba(255,255,255,.70);
}
html[data-theme="dark"] .dash-item{background:rgba(255,255,255,.04); border-color:rgba(255,255,255,.10);}
html[data-theme="dark"] .dash-bar-track{background:rgba(47,125,255,.20);}
html[data-theme="dark"] .dash-link{color:#7db0ff;}
html[data-theme="dark"] .dash-wo{background:rgba(255,255,255,.04); border-color:rgba(255,255,255,.10);}
html[data-theme="dark"] .dash-wo-track{background:rgba(47,125,255,.20);}
html[data-theme="dark"] .dash-alert{background:rgba(255,255,255,.04); border-color:rgba(255,255,255,.10);}

/* Fleet Management (Aircraft) */
html[data-theme="dark"] .layout-app[data-page="aircraft"]{
  background:
    radial-gradient(900px 600px at 15% 0%, rgba(47,125,255,.16), transparent 60%),
    radial-gradient(900px 600px at 85% 0%, rgba(255,122,26,.10), transparent 55%),
    radial-gradient(900px 700px at 50% 100%, rgba(31,189,107,.10), transparent 62%),
    linear-gradient(180deg, #0b0f16, #06080c);
}
html[data-theme="dark"] .layout-app[data-page="aircraft"] .topbar{
  background:rgba(17, 24, 39, .72);
  border-color:rgba(255,255,255,.08);
  box-shadow:0 18px 42px rgba(0,0,0,.45);
  backdrop-filter:blur(10px);
}
html[data-theme="dark"] .layout-app[data-page="aircraft"] .breadcrumb{color:rgba(255,255,255,.70);}
html[data-theme="dark"] .layout-app[data-page="aircraft"] .page-title{color:#fff;}
html[data-theme="dark"] .layout-app[data-page="aircraft"] .topbar-search{
  background:rgba(255,255,255,.06);
  border-color:rgba(255,255,255,.10);
  color:rgba(255,255,255,.70);
}
html[data-theme="dark"] .layout-app[data-page="aircraft"] .topbar-search .input{color:#fff;}
html[data-theme="dark"] .layout-app[data-page="aircraft"] .btn.ghost{border-color:rgba(255,255,255,.14); color:#fff;}
html[data-theme="dark"] .layout-app[data-page="aircraft"] .user-btn{background:rgba(255,255,255,.06); border-color:rgba(255,255,255,.12); color:#fff;}
html[data-theme="dark"] .layout-app[data-page="aircraft"] .avatar{background:rgba(47,125,255,.18); color:#cfe1ff;}
html[data-theme="dark"] .layout-app[data-page="aircraft"] .user-role,.layout-app[data-page="aircraft"] .chev{color:rgba(255,255,255,.70);}
html[data-theme="dark"] .layout-app[data-page="aircraft"] .menu{background:rgba(17, 24, 39, .98); border-color:rgba(255,255,255,.10);}
html[data-theme="dark"] .layout-app[data-page="aircraft"] .menu-item{color:#fff;}
html[data-theme="dark"] .layout-app[data-page="aircraft"] .menu-item:hover{background:rgba(255,255,255,.08);}

.ac-shell{display:grid; gap:14px;}
.ac-toolbar{display:flex; gap:10px; align-items:center;}
.ac-filterbar{
  display:grid;
  grid-template-columns: 1fr auto;
  gap:12px;
  align-items:center;
}
.ac-search{
  display:flex;
  align-items:center;
  gap:10px;
  height:44px;
  padding:0 12px;
  border-radius:14px;
  border:1px solid var(--border);
  background:var(--panel);
  color:var(--muted);
}
.ac-search .input{
  border:0;
  outline:none;
  height:100%;
  width:100%;
  padding:0;
  background:transparent;
  color:var(--text);
}
.ac-search .input::placeholder{color:#98a4b3;}
.layout-app[data-page="aircraft"] .icon-btn{
  background:var(--panel);
  border-color:var(--border);
  color:var(--text);
}
.layout-app[data-page="aircraft"] .select{
  background:var(--panel);
  border-color:var(--border);
  color:var(--text);
}
.layout-app[data-page="aircraft"] .select option{color:var(--text);}

html[data-theme="dark"] .ac-search{
  border-color:rgba(255,255,255,.10);
  background:rgba(255,255,255,.06);
  color:rgba(255,255,255,.70);
}
html[data-theme="dark"] .ac-search .input{color:#fff;}
html[data-theme="dark"] .ac-search .input::placeholder{color:rgba(255,255,255,.55);}
html[data-theme="dark"] .layout-app[data-page="aircraft"] .icon-btn{
  background:rgba(255,255,255,.06);
  border-color:rgba(255,255,255,.12);
  color:#fff;
}
html[data-theme="dark"] .layout-app[data-page="aircraft"] .select{
  background:rgba(255,255,255,.06);
  border-color:rgba(255,255,255,.12);
  color:#fff;
}
html[data-theme="dark"] .layout-app[data-page="aircraft"] .select option{color:var(--text);}
.ac-status{display:flex; align-items:center; gap:10px;}

.ac-grid{display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:16px;}
.ac-card{
  width:100%;
  border:1px solid var(--border);
  border-radius:18px;
  background:var(--panel);
  box-shadow:var(--shadow);
  padding:16px 16px 14px;
  color:var(--text);
  cursor:pointer;
  text-align:left;
}
html[data-theme="dark"] .ac-card{
  border-color:rgba(255,255,255,.10);
  background:
    radial-gradient(900px 300px at 20% 0%, rgba(47,125,255,.10), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  box-shadow:0 26px 60px rgba(0,0,0,.45);
  color:#fff;
}
.ac-card:hover{border-color:rgba(11,107,255,.28);}
html[data-theme="dark"] .ac-card:hover{border-color:rgba(47,125,255,.28); background:linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.03));}
.ac-card-top{display:flex; align-items:flex-start; justify-content:space-between; gap:12px;}
.ac-ico{
  width:40px; height:40px;
  border-radius:12px;
  border:1px solid rgba(47,125,255,.22);
  background:rgba(47,125,255,.12);
  color:#7db0ff;
  display:grid;
  place-items:center;
  flex:0 0 auto;
}
.ac-title{display:grid; gap:2px; margin-right:auto; padding-top:2px;}
.ac-reg{font-weight:900; font-size:18px; letter-spacing:.2px;}
.ac-type{font-size:13px; color:rgba(255,255,255,.70); font-weight:800;}
html[data-theme="light"] .ac-type{color:var(--muted);}

.ac-badge{
  display:inline-flex; align-items:center; gap:8px;
  height:24px; padding:0 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.25);
  font-weight:900;
  font-size:12px;
  white-space:nowrap;
}
.ac-badge.success{border-color:rgba(31,189,107,.35); background:rgba(31,189,107,.12); color:#37e28d;}
.ac-badge.warning{border-color:rgba(255,176,32,.40); background:rgba(255,176,32,.14); color:#ffd27b;}
.ac-badge.danger{border-color:rgba(229,72,77,.40); background:rgba(229,72,77,.16); color:#ff8b8f;}

.ac-card-mid{
  margin-top:14px;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:14px 18px;
  padding:14px 0;
}
.ac-pair{display:grid; gap:4px;}
.ac-label{font-size:12px; color:var(--muted); font-weight:800;}
.ac-value{font-weight:900; font-size:13px; color:var(--text);}
html[data-theme="dark"] .ac-label{color:rgba(255,255,255,.62);}
html[data-theme="dark"] .ac-value{color:rgba(255,255,255,.90);}

.ac-card-foot{
  border-top:1px solid rgba(255,255,255,.08);
  padding-top:12px;
}
.ac-next{display:flex; align-items:center; gap:10px; color:var(--muted); font-weight:800; font-size:13px;}
.ac-next b{color:var(--text); font-weight:900;}
html[data-theme="dark"] .ac-next{color:rgba(255,255,255,.74);}
html[data-theme="dark"] .ac-next b{color:#fff;}

.modal-panel.ac-modal{
  width:min(760px, 100%);
  background:rgba(10, 14, 20, .98);
  border-color:rgba(255,255,255,.10);
  box-shadow:0 30px 90px rgba(0,0,0,.60);
  color:#fff;
}
.ac-modal-head{
  padding:16px 16px 10px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}
.ac-modal-h1{font-weight:900; font-size:28px; letter-spacing:-.3px; color:#fff;}
.ac-modal-right{display:flex; align-items:center; gap:10px;}
.tabs.ac-tabs{
  margin:6px 16px 0;
  background:rgba(255,255,255,.06);
  border-color:rgba(255,255,255,.10);
}
.tabs.ac-tabs .tab{color:rgba(255,255,255,.80);}
.tabs.ac-tabs .tab.active{background:rgba(255,255,255,.10); color:#fff;}
.ac-modal-body{padding:16px;}
.ac-kv-grid{display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:14px 20px; padding-top:10px;}
.ac-kv{display:grid; gap:4px;}
.ac-k{font-size:12px; color:rgba(255,255,255,.62); font-weight:800;}
.ac-v{font-size:15px; font-weight:900; color:#fff;}
.ac-modal-foot{padding:16px; display:flex; align-items:center; justify-content:flex-end; gap:10px; border-top:1px solid rgba(255,255,255,.08);}

.ac-stack{display:grid; gap:12px; padding-top:10px;}
.ac-highlight{
  border-radius:16px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.06);
  padding:16px;
}
.ac-highlight--primary{
  background:rgba(47,125,255,.18);
  border-color:rgba(47,125,255,.28);
}
.ac-highlight-label{font-size:12px; color:rgba(255,255,255,.72); font-weight:900;}
.ac-highlight-value{font-size:18px; font-weight:900; color:#fff; margin-top:4px;}
.ac-subcard{
  border-radius:16px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.04);
  padding:14px;
}
.ac-subcard-title{font-weight:900; color:#fff; margin-bottom:10px;}
.ac-history{display:grid;}
.ac-history-row{
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:12px 0;
  border-top:1px solid rgba(255,255,255,.08);
}
.ac-history-row:first-child{border-top:0;}
.ac-history-title{color:rgba(255,255,255,.80); font-weight:800;}
.ac-history-date{color:#fff; font-weight:900;}

.ac-docs{display:grid; gap:10px; padding-top:10px;}
.ac-doc-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  border:1px solid rgba(255,255,255,.10);
  border-radius:14px;
  background:rgba(255,255,255,.04);
  padding:14px;
}
.ac-doc-name{font-weight:900; color:#fff;}

.ac-form-grid{display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:12px;}
html[data-theme="dark"] .layout-app[data-page="aircraft"] .ac-modal .input,
html[data-theme="dark"] .layout-app[data-page="aircraft"] .ac-modal .select{
  background:rgba(255,255,255,.06);
  border-color:rgba(255,255,255,.12);
  color:#fff;
}
html[data-theme="dark"] .layout-app[data-page="aircraft"] .ac-modal .input::placeholder{color:rgba(255,255,255,.55);}
html[data-theme="dark"] .layout-app[data-page="aircraft"] .ac-modal .label{color:rgba(255,255,255,.68);}

.ac-shell--detail{padding-top:6px;}
.ac-detail-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.ac-detail-title{display:grid; gap:4px; min-width:260px;}
.ac-detail-h1{font-weight:900; font-size:26px; color:#fff;}
.ac-detail-sub{color:rgba(255,255,255,.70); font-weight:800; font-size:13px;}
.ac-detail-right{display:flex; gap:10px; align-items:center; flex-wrap:wrap;}
.ac-detail-body{padding:2px 0 0;}

@media (max-width: 1100px){
  .ac-grid{grid-template-columns:1fr;}
}
@media (max-width: 860px){
  .ac-filterbar{grid-template-columns:1fr;}
  .ac-form-grid{grid-template-columns:1fr;}
  .ac-kv-grid{grid-template-columns:1fr;}
}

.dash-kpis{display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:16px; margin-top:10px;}
.dash-stat{
  padding:18px;
  border-radius:18px;
  border:1px solid var(--border);
  background:
    radial-gradient(700px 280px at 50% 0%, rgba(11,107,255,.08), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,255,255,.85));
  box-shadow:0 24px 48px rgba(16,24,40,.12);
  color:var(--text);
  min-height:116px;
  display:grid;
  gap:10px;
  cursor:pointer;
}
.dash-stat:hover{border-color:rgba(11,107,255,.28);}
.dash-stat-top{display:flex; align-items:flex-start; justify-content:space-between; gap:12px;}
.dash-stat-label{font-size:14px; color:var(--muted);}
.dash-stat-ico{
  width:46px; height:46px;
  border-radius:12px;
  display:grid; place-items:center;
  font-size:18px;
  border:1px solid rgba(231,235,243,.9);
  background:rgba(255,255,255,.9);
}
.dash-stat[data-tone="blue"] .dash-stat-ico{color:#2f7dff; background:rgba(47,125,255,.10); border-color:rgba(47,125,255,.18);}
.dash-stat[data-tone="orange"] .dash-stat-ico{color:#ff7a1a; background:rgba(255,122,26,.10); border-color:rgba(255,122,26,.18);}
.dash-stat[data-tone="purple"] .dash-stat-ico{color:#c055ff; background:rgba(192,85,255,.10); border-color:rgba(192,85,255,.18);}
.dash-stat[data-tone="red"] .dash-stat-ico{color:#ff3d4a; background:rgba(255,61,74,.10); border-color:rgba(255,61,74,.18);}
.dash-stat-value{font-size:34px; font-weight:900; letter-spacing:-.6px;}
.dash-stat-sub{font-size:13px; color:var(--muted);}

.dash-row3{display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:16px; margin-top:12px;}
.dash-wide{margin-top:16px;}
.dash-panel{
  padding:18px;
  border-radius:18px;
  border:1px solid var(--border);
  background:
    radial-gradient(900px 320px at 50% 0%, rgba(11,107,255,.06), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,255,255,.85));
  box-shadow:0 26px 52px rgba(16,24,40,.12);
  color:var(--text);
  min-height:320px;
}
.dash-panel--wide{min-height:auto; padding:22px;}
.dash-panel-head{display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:14px;}
.dash-panel-title{font-weight:900; font-size:16px;}
.dash-link{color:#0b6bff; text-decoration:none; font-weight:900; font-size:13px;}
.dash-link:hover{text-decoration:underline;}

.dash-bars{display:grid; gap:16px; margin-top:6px;}
.dash-bar{display:grid; gap:8px;}
.dash-bar-top{display:flex; justify-content:space-between; align-items:center; gap:10px;}
.dash-bar-val{font-weight:900;}
.dash-bar-label{color:var(--muted); font-weight:900;}
.dash-bar-track{height:8px; border-radius:999px; background:rgba(11,107,255,.12); overflow:hidden;}
.dash-bar-fill{height:100%; background:#0b6bff;}
.dash-bar-pct{font-size:12px; color:var(--muted); justify-self:end;}

.dash-list{display:grid; gap:14px;}
.dash-item{display:flex; justify-content:space-between; gap:12px; padding:10px 10px; border-radius:14px; border:1px solid var(--border); background:rgba(255,255,255,.75);}
.dash-item-title{font-weight:900;}
.dash-item-sub{font-size:13px; color:var(--muted); margin-top:4px;}
.dash-item-side{display:grid; justify-items:end; gap:6px;}
.dash-pill{
  display:inline-flex; align-items:center; height:24px; padding:0 10px;
  border-radius:999px; background:rgba(255,255,255,.9);
  border:1px solid var(--border);
  font-weight:900; font-size:12px;
}
.dash-dim{color:rgba(107,119,135,.9); font-weight:800;}

.dash-alerts{display:grid; gap:12px;}
.dash-alert{
  border-radius:14px;
  border:1px solid var(--border);
  padding:12px 12px;
  background:rgba(255,255,255,.75);
}
.dash-alert-top{display:flex; align-items:center; gap:10px;}
.dash-alert-dot{width:12px; height:12px; border-radius:999px; border:2px solid rgba(24,34,48,.20);}
.dash-alert-title{font-weight:900;}
.dash-alert-body{margin-top:6px; font-size:13px; color:var(--muted);}
.dash-alert[data-kind="danger"]{background:rgba(229,72,77,.18); border-color:rgba(229,72,77,.28);}
.dash-alert[data-kind="danger"] .dash-alert-dot{border-color:rgba(229,72,77,.70);}
.dash-alert[data-kind="warning"]{background:rgba(255,176,32,.14); border-color:rgba(255,176,32,.26);}
.dash-alert[data-kind="warning"] .dash-alert-dot{border-color:rgba(255,176,32,.75);}
.dash-alert[data-kind="orange"]{background:rgba(255,122,26,.16); border-color:rgba(255,122,26,.26);}
.dash-alert[data-kind="orange"] .dash-alert-dot{border-color:rgba(255,122,26,.75);}
.dash-alert[data-kind="success"]{background:rgba(31,189,107,.16); border-color:rgba(31,189,107,.26);}
.dash-alert[data-kind="success"] .dash-alert-dot{border-color:rgba(31,189,107,.75);}

.dash-wo-list{display:grid; gap:14px;}
.dash-wo{
  border-radius:16px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.80);
  padding:14px 14px;
}
.dash-wo:hover{border-color:rgba(11,107,255,.35); background:rgba(255,255,255,.95);}
.dash-wo-top{display:flex; justify-content:space-between; gap:16px; flex-wrap:wrap;}
.dash-wo-title{display:flex; align-items:center; gap:10px; font-weight:900; font-size:16px;}
.dash-wo-sub{color:var(--muted); font-size:13px; margin-top:4px;}
.dash-wo-side{display:grid; gap:6px; justify-items:end; text-align:right;}
.dash-wo-job{font-weight:900;}
.dash-wo-prog{display:flex; justify-content:space-between; align-items:center; margin-top:12px; font-size:13px; color:var(--muted);}
.dash-wo-track{height:8px; border-radius:999px; background:rgba(11,107,255,.12); overflow:hidden; margin-top:8px;}
.dash-wo-fill{height:100%; background:#0b6bff;}

.dash-tag{
  height:24px; padding:0 10px;
  display:inline-flex; align-items:center;
  border-radius:999px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.9);
  font-size:12px; font-weight:900;
  color:var(--text);
}
.dash-tag.primary{background:rgba(11,107,255,.12); border-color:rgba(11,107,255,.20); color:#103b9c;}
.dash-tag.danger{background:rgba(229,72,77,.10); border-color:rgba(229,72,77,.20); color:#9b1c21;}
.dash-tag.warning{background:rgba(255,176,32,.10); border-color:rgba(255,176,32,.22); color:#8a5200;}
.dash-tag.neutral{background:rgba(255,255,255,.9); border-color:var(--border); color:var(--text);}

@media (max-width: 1200px){
  .dash-kpis{grid-template-columns:repeat(2, minmax(0, 1fr));}
  .dash-row3{grid-template-columns:1fr;}
}

@media (max-width: 920px){
  .dash-kpis{grid-template-columns:1fr;}
}
.topbar-left{display:grid; gap:2px}
.breadcrumb{font-size:var(--text-xs); color:var(--muted); letter-spacing:.3px}
.page-title{font-size:var(--text-lg); font-weight:900}
.topbar-right{display:flex; align-items:center; gap:12px; flex-wrap:wrap; justify-content:flex-end;}
.topbar-search{
  height:40px;
  min-width:320px;
  padding:0 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background:#fff;
  display:flex;
  align-items:center;
  gap:8px;
  color:var(--muted);
}
.topbar-search .input{border:0; outline:none; height:100%; width:100%; padding:0; background:transparent; color:var(--text);}
.topbar-actions{display:flex; align-items:center; gap:10px; flex-wrap:wrap;}

.card{
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:14px;
}
.card-title{font-weight:900; font-size:12px; letter-spacing:.55px; color:var(--muted); margin:0 0 10px;}

.kpi-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:14px;
}
.kpi-card{
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:14px;
  display:grid;
  gap:10px;
}
.kpi-top{display:flex; align-items:flex-start; justify-content:space-between; gap:10px;}
.kpi-label{font-weight:900; color:var(--muted); font-size:12px; letter-spacing:.45px; text-transform:uppercase;}
.trend{
  font-size:12px;
  font-weight:900;
  padding:4px 8px;
  border-radius:999px;
  border:1px solid var(--border);
  background:#fff;
  color:var(--muted);
}
.trend.up{color:#0f7a45; background:rgba(31,189,107,.10); border-color:rgba(31,189,107,.22);}
.trend.down{color:#9b1c21; background:rgba(229,72,77,.10); border-color:rgba(229,72,77,.22);}
.kpi-value{font-size:28px; font-weight:900; letter-spacing:-.2px;}
.kpi-sub{font-size:12px; color:var(--muted);}
.kpi-split{display:grid; grid-template-columns:1fr 1fr; gap:10px;}
.kpi-split-item{border:1px solid var(--border); border-radius:14px; padding:10px; background:#fff;}
.kpi-mini-label{font-size:12px; color:var(--muted); font-weight:900;}
.kpi-mini-value{font-size:16px; font-weight:900; margin-top:4px;}

.widget-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
.panel-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
  flex-wrap:wrap;
}
.panel-sub{font-size:12px; color:var(--muted); margin-top:-2px;}
.panel-filters{display:flex; gap:10px; align-items:center; flex-wrap:wrap; justify-content:flex-end;}
.panel-filters .input{min-width:240px;}

.btn{
  height:40px;
  padding:0 14px;
  border-radius:12px;
  border:1px solid transparent;
  font-weight:800;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  text-decoration:none;
  white-space:nowrap;
}
.btn.primary{background:var(--primary); color:#fff;}
.btn.secondary{background:#eef3ff; color:#2346a3; border-color:#dbe6ff;}
.btn.ghost{background:transparent; border-color:var(--border); color:var(--text);}
.btn:hover{filter:brightness(.98)}
.btn:active{transform:translateY(1px)}
.icon-btn{
  width:36px; height:36px; border-radius:12px;
  border:1px solid var(--border); background:#fff; cursor:pointer;
  display:grid; place-items:center;
}

.badge{
  display:inline-flex; align-items:center;
  height:22px; padding:0 10px;
  border-radius:999px;
  border:1px solid var(--border);
  font-size:12px; font-weight:900;
  background:#f6f7fb;
}
.badge.success{background:rgba(31,189,107,.12); border-color:rgba(31,189,107,.25); color:#0f7a45;}
.badge.warning{background:rgba(255,176,32,.14); border-color:rgba(255,176,32,.30); color:#8a5200;}
.badge.danger{background:rgba(229,72,77,.12); border-color:rgba(229,72,77,.25); color:#9b1c21;}
.badge.neutral{background:#f6f7fb; color:var(--muted);}

.input,.select{
  height:40px;
  border-radius:12px;
  border:1px solid var(--border);
  padding:0 12px;
  background:#fff;
  color:var(--text);
  font-size:var(--text-md);
}
.input:focus,.select:focus{
  outline:none;
  border-color:rgba(11,107,255,.35);
  box-shadow:0 0 0 4px rgba(11,107,255,.10);
}
.input.is-invalid{
  border-color:rgba(229,72,77,.45);
  box-shadow:0 0 0 4px rgba(229,72,77,.10);
}
.input::placeholder{color:#98a4b3}
.field{display:grid; gap:6px}
.label{font-size:var(--text-xs); color:var(--muted); font-weight:800;}
.form-grid{display:grid; grid-template-columns:1fr 1fr; gap:12px}

.filterbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.chips{display:flex; gap:8px; flex-wrap:wrap}
.chip{
  height:30px;
  padding:0 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background:#fff;
  font-weight:900;
  font-size:12px;
  cursor:pointer;
}
.chip.active{border-color:#dbe6ff; background:#eef3ff; color:#2346a3}

.tabs{display:flex; gap:8px; background:#f3f5fb; border:1px solid var(--border); border-radius:999px; padding:4px;}
.tab{
  border:0; background:transparent;
  padding:8px 12px; border-radius:999px;
  cursor:pointer; font-weight:900; color:#37506a;
}
.tab.active{background:#fff; color:var(--text); box-shadow:0 1px 8px rgba(16,24,40,.10)}

.tabs.ui-tabs{
  background:rgba(0,0,0,.03);
  border-color:var(--border);
}
html[data-theme="dark"] .tabs.ui-tabs{
  background:rgba(255,255,255,.06);
  border-color:rgba(255,255,255,.10);
}
html[data-theme="dark"] .tabs.ui-tabs .tab{color:rgba(255,255,255,.80);}
html[data-theme="dark"] .tabs.ui-tabs .tab.active{background:rgba(255,255,255,.10); color:#fff; box-shadow:none;}

.table-wrap{overflow:auto; border:1px solid var(--border); border-radius:14px; background:#fff;}
.table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  font-size:var(--text-sm);
}
.table th,.table td{padding:12px 12px; border-bottom:1px solid var(--border); text-align:left; white-space:nowrap;}
.table th{font-size:12px; color:var(--muted); letter-spacing:.4px; font-weight:900; background:#f8fafc;}
.table tr[data-href]{cursor:pointer}
.table tr[data-href]:hover td{background:#f6f9ff}
.table.is-sticky thead th{position:sticky; top:0; z-index:1;}
.table td:last-child,.table th:last-child{text-align:right}

.empty-state{
  padding:34px 18px;
  display:grid;
  place-items:center;
  text-align:center;
  gap:10px;
  color:var(--muted);
}
.empty-state .empty-title{color:var(--text); font-weight:900; font-size:16px}
.skeleton{
  position:relative;
  overflow:hidden;
  background:#eef1f7;
  border-radius:12px;
}
.skeleton::after{
  content:"";
  position:absolute; inset:0;
  transform:translateX(-100%);
  background:linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent);
  animation:shimmer 1.2s infinite;
}
@keyframes shimmer{100%{transform:translateX(100%)}}

.overlay{
  position:fixed; inset:0;
  background:rgba(11,18,32,.45);
  backdrop-filter:blur(4px);
  z-index:80;
}
.modal{position:fixed; inset:0; display:grid; place-items:center; z-index:90; padding:24px;}
.modal-panel{
  width:min(720px, 100%);
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  overflow:hidden;
}
.modal-head,.modal-foot{padding:14px 16px; display:flex; align-items:center; justify-content:space-between; gap:12px;}
.modal-head{border-bottom:1px solid var(--border);}
.modal-title{font-weight:900; font-size:16px}
.modal-body{padding:16px;}

.drawer{
  position:fixed; top:0; right:0;
  width:min(420px, 92vw);
  height:100vh;
  background:var(--panel);
  border-left:1px solid var(--border);
  box-shadow:var(--shadow);
  z-index:95;
  display:flex;
  flex-direction:column;
}
.drawer-head{padding:14px 16px; border-bottom:1px solid var(--border); display:flex; align-items:center; justify-content:space-between;}
.drawer-title{font-weight:900; font-size:16px}
.drawer-body{padding:16px; overflow:auto;}

.toast-host{position:fixed; right:16px; bottom:16px; z-index:120; display:grid; gap:10px; width:min(360px, calc(100vw - 32px));}
.toast{
  background:rgba(17, 24, 39, .92);
  color:#fff;
  border-radius:14px;
  padding:12px 12px;
  box-shadow:0 10px 24px rgba(16,24,40,.22);
  display:flex; align-items:flex-start; justify-content:space-between; gap:10px;
}
.toast-title{font-weight:900}
.toast-sub{font-size:12px; opacity:.86; margin-top:2px}
.toast .toast-x{border:0; background:transparent; color:#fff; cursor:pointer; font-size:16px; line-height:1}

.user-btn{
  height:40px;
  border-radius:999px;
  border:1px solid var(--border);
  background:#fff;
  padding:0 10px 0 6px;
  display:flex;
  align-items:center;
  gap:10px;
  cursor:pointer;
}
.avatar{width:32px; height:32px; border-radius:999px; background:#eef3ff; color:#2346a3; display:grid; place-items:center; font-weight:900; font-size:12px}
.user-meta{display:grid; line-height:1.05; text-align:left}
.user-name{font-weight:900; font-size:13px}
.user-role{font-size:12px; color:var(--muted)}
.chev{color:var(--muted)}
.menu{
  position:absolute;
  margin-top:8px;
  right:0;
  width:220px;
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:14px;
  box-shadow:var(--shadow);
  overflow:hidden;
  padding:6px;
}
.user-menu{position:relative;}
.menu-item{
  display:flex;
  width:100%;
  padding:10px 10px;
  border-radius:12px;
  text-decoration:none;
  border:0;
  background:transparent;
  cursor:pointer;
  text-align:left;
  font-weight:800;
  color:var(--text);
}
.menu-item:hover{background:#f6f7fb}
.menu-item.danger{color:var(--danger)}
.menu-sep{height:1px; background:var(--border); margin:6px;}

.grid{
  display:grid;
  grid-template-columns: 340px repeat(3, minmax(220px, 1fr));
  gap:14px;
}
.card-left{grid-row: span 2;}
.card-wide{grid-column: span 3;}
.big{font-size:28px; font-weight:900; margin:8px 0 14px;}
.kv{display:grid; gap:10px;}
.kv span{display:block; color:var(--muted); font-size:12px;}
.kv b{display:block; font-size:14px;}
.chart-placeholder{
  height:220px;
  border:1px dashed #cfd7e6;
  border-radius:14px;
  display:grid;
  place-items:center;
  color:var(--muted);
  background:#fafbff;
}
.list{display:grid; gap:10px;}
.list-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:14px;
}
.list-row b{font-size:14px}

.planning{border:1px solid var(--border); border-radius:14px; overflow:hidden; background:#fff;}
.planning-head{
  display:grid; grid-template-columns: 220px repeat(18, 1fr);
  background:#f8fafc; border-bottom:1px solid var(--border);
}
.day{padding:10px 8px; font-size:12px; color:var(--muted); border-left:1px solid var(--border);}
.lane-label{padding:10px 12px; font-weight:900; font-size:12px; color:var(--muted);}
.planning-row{display:grid; grid-template-columns: 220px 1fr; border-bottom:1px solid var(--border);}
.lane{position:relative; min-height:64px; border-left:1px solid var(--border);}
.bar{
  position:absolute; top:12px; height:40px;
  border-radius:12px; background:rgba(255,176,32,.14);
  border:2px solid rgba(255,176,32,.70); padding:6px 10px;
}
.bar-title{font-weight:900; font-size:12px;}
.bar-sub{font-size:11px; color:var(--muted);}

.tasks{display:grid; gap:10px;}
.task{
  display:flex; justify-content:space-between; gap:14px;
  padding:12px; border:1px solid var(--border); border-radius:16px;
}
.task-left{display:flex; gap:12px; align-items:center;}
.pill{
  padding:6px 10px; border-radius:999px; background:#eef3ff; color:#2a4ea6;
  font-weight:900; font-size:12px;
}
.task-title{font-weight:900;}
.task-sub{font-size:12px; color:var(--muted); margin-top:2px;}
.task-meta{display:flex; gap:16px; align-items:center; flex-wrap:wrap; justify-content:flex-end;}
.task-meta span{display:block; font-size:11px; color:var(--muted)}
.task-meta b{display:block; font-size:13px}

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

/* Fleet Synthesis (FS v1.0) */
.help{font-size:12px; color:var(--muted);}
.fs-head{display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:12px;}
.fs-title{font-weight:900; font-size:18px;}
.fs-sub{color:var(--muted); font-size:13px; margin-top:2px;}
.fs-inline-actions{display:flex; align-items:center; gap:10px;}
.fs-filters{display:grid; gap:14px;}
.fs-filter-row{display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:12px;}
.fs-actions{display:flex; justify-content:flex-end; gap:10px; margin-top:4px; flex-wrap:wrap;}
.fs-predef-actions{display:flex; gap:10px; align-items:center; justify-content:space-between; flex-wrap:wrap; margin-bottom:12px;}
.fs-predef-table .table td:last-child,.fs-predef-table .table th:last-child{text-align:right;}
.btn.fs-mini{height:32px; padding:0 10px; border-radius:10px; font-size:12px;}
.btn.fs-mini.danger{color:var(--danger); border-color:rgba(229,72,77,.25);}

.fs-switch{display:inline-flex; align-items:center; gap:8px; cursor:pointer;}
.fs-switch input{display:none;}
.fs-switch-ui{
  width:42px; height:24px; border-radius:999px;
  border:1px solid var(--border);
  background:#fff;
  position:relative;
}
.fs-switch-ui::after{
  content:"";
  width:18px; height:18px; border-radius:999px;
  background:#cbd5e1;
  position:absolute; top:2px; left:2px;
  transition:left .14s ease, background .14s ease;
}
.fs-switch input:checked + .fs-switch-ui{border-color:rgba(11,107,255,.25); background:rgba(11,107,255,.10);}
.fs-switch input:checked + .fs-switch-ui::after{left:22px; background:var(--primary);}

/* Maintenance Schedule (Workpack Planning) */
html[data-theme="dark"] .layout-app[data-page="workpack_planning"]{
  background:
    radial-gradient(900px 600px at 15% 0%, rgba(47,125,255,.16), transparent 60%),
    radial-gradient(900px 600px at 85% 0%, rgba(192,85,255,.10), transparent 55%),
    linear-gradient(180deg, #0b0f16, #06080c);
}
html[data-theme="dark"] .layout-app[data-page="workpack_planning"] .topbar{
  background:rgba(17, 24, 39, .72);
  border-color:rgba(255,255,255,.08);
  box-shadow:0 18px 42px rgba(0,0,0,.45);
  backdrop-filter:blur(10px);
}
html[data-theme="dark"] .layout-app[data-page="workpack_planning"] .breadcrumb{color:rgba(255,255,255,.70);}
html[data-theme="dark"] .layout-app[data-page="workpack_planning"] .page-title{color:#fff;}
html[data-theme="dark"] .layout-app[data-page="workpack_planning"] .topbar-search{
  background:rgba(255,255,255,.06);
  border-color:rgba(255,255,255,.12);
  color:rgba(255,255,255,.70);
}
html[data-theme="dark"] .layout-app[data-page="workpack_planning"] .topbar-search .input{color:#fff;}

.wp-shell{display:grid; gap:14px;}
.wp-toolbar{display:flex; align-items:center; gap:10px; flex-wrap:wrap;}
.wp-grid{display:grid; grid-template-columns:1fr 380px; gap:14px; align-items:start;}
.wp-week{padding:0; overflow:hidden;}
.wp-week-head{
  padding:16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  border-bottom:1px solid var(--border);
}
html[data-theme="dark"] .wp-week-head{border-bottom-color:rgba(255,255,255,.08);}
.wp-week-title{display:flex; align-items:center; gap:10px; font-weight:1000;}
.wp-week-ico{width:22px; height:22px; display:grid; place-items:center;}
.wp-week-controls{display:flex; align-items:center; gap:10px; flex-wrap:wrap; justify-content:flex-end;}
.wp-week-range{font-weight:900; font-size:14px;}
.wp-week-date{width:160px; height:38px;}

.wp-timeline{padding:14px 16px 16px;}
.wp-head{
  display:grid;
  grid-template-columns: 220px 1fr;
  gap:0;
  align-items:stretch;
  border:1px solid var(--border);
  border-radius:16px;
  overflow:hidden;
  background:var(--panel);
}
html[data-theme="dark"] .wp-head{
  border-color:rgba(255,255,255,.10);
  background:rgba(255,255,255,.04);
}
.wp-head-label{background:rgba(0,0,0,.02);}
html[data-theme="dark"] .wp-head-label{background:rgba(0,0,0,.25);}
.wp-days{display:grid; grid-template-columns:repeat(7, minmax(0, 1fr));}
.wp-day{
  padding:12px 10px;
  border-left:1px solid var(--border);
  display:grid;
  gap:4px;
  text-align:center;
  color:var(--text);
}
html[data-theme="dark"] .wp-day{border-left-color:rgba(255,255,255,.10); color:#fff;}
.wp-day-name{font-size:12px; color:var(--muted); font-weight:900;}
html[data-theme="dark"] .wp-day-name{color:rgba(255,255,255,.70);}
.wp-day-num{font-size:14px; font-weight:1000;}
.wp-day.is-today{background:rgba(11,107,255,.08);}
html[data-theme="dark"] .wp-day.is-today{background:rgba(47,125,255,.16);}

.wp-body{margin-top:10px; display:grid; gap:10px;}
.wp-row{
  display:grid;
  grid-template-columns:220px 1fr;
  gap:0;
  border:1px solid var(--border);
  border-radius:16px;
  overflow:hidden;
  background:var(--panel);
}
html[data-theme="dark"] .wp-row{
  border-color:rgba(255,255,255,.10);
  background:rgba(255,255,255,.04);
}
.wp-row-label{
  padding:12px 12px;
  font-weight:900;
  font-size:12px;
  color:var(--muted);
  background:rgba(0,0,0,.02);
}
html[data-theme="dark"] .wp-row-label{color:rgba(255,255,255,.70); background:rgba(0,0,0,.25);}
.wp-row-lane{
  position:relative;
  border-left:1px solid var(--border);
  background:
    repeating-linear-gradient(
      to right,
      transparent 0%,
      transparent calc((100% / 7) - 1px),
      rgba(0,0,0,.06) calc((100% / 7) - 1px),
      rgba(0,0,0,.06) calc(100% / 7)
    );
}
html[data-theme="dark"] .wp-row-lane{
  border-left-color:rgba(255,255,255,.10);
  background:
    repeating-linear-gradient(
      to right,
      transparent 0%,
      transparent calc((100% / 7) - 1px),
      rgba(255,255,255,.08) calc((100% / 7) - 1px),
      rgba(255,255,255,.08) calc(100% / 7)
    );
}

.wp-bar{
  position:absolute;
  height:46px;
  padding:8px 10px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background:linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.05));
  box-shadow:0 18px 38px rgba(0,0,0,.16);
  color:var(--text);
  cursor:pointer;
  text-align:left;
  overflow:hidden;
}
html[data-theme="dark"] .wp-bar{
  border-color:rgba(255,255,255,.10);
  background:linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04));
  box-shadow:0 22px 48px rgba(0,0,0,.45);
  color:#fff;
}
.wp-bar:hover{transform:translateY(-1px); box-shadow:0 24px 52px rgba(0,0,0,.20);}
html[data-theme="dark"] .wp-bar:hover{box-shadow:0 30px 68px rgba(0,0,0,.55);}
.wp-bar:focus{outline:2px solid rgba(11,107,255,.35); outline-offset:2px;}
.wp-bar-top{display:flex; align-items:center; gap:8px; justify-content:space-between;}
.wp-bar-reg{font-weight:1000; font-size:12px; flex:1; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.wp-bar-sub{margin-top:4px; font-size:12px; color:var(--muted); font-weight:800; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
html[data-theme="dark"] .wp-bar-sub{color:rgba(255,255,255,.70);}
.wp-dot{width:8px; height:8px; border-radius:999px; flex:0 0 auto;}
.wp-dot.red{background:#ff4d4f;}
.wp-dot.orange{background:#ffb020;}
.wp-dot.yellow{background:#facc15;}
.wp-dot.blue{background:#2f7dff;}
.wp-pill{
  height:22px;
  padding:0 10px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  font-weight:1000;
  font-size:12px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.03);
  color:var(--text);
  flex:0 0 auto;
}
html[data-theme="dark"] .wp-pill{background:rgba(0,0,0,.24); color:#fff; border-color:rgba(255,255,255,.12);}
.wp-pill.primary{border-color:rgba(47,125,255,.35); background:rgba(47,125,255,.16); color:#cfe1ff;}
.wp-pill.purple{border-color:rgba(192,85,255,.35); background:rgba(192,85,255,.14); color:#edd3ff;}
.wp-pill.success{border-color:rgba(31,189,107,.35); background:rgba(31,189,107,.12); color:#aef5d2;}
html[data-theme="light"] .wp-pill.primary{color:#103b9c;}
html[data-theme="light"] .wp-pill.purple{color:#5b21b6;}
html[data-theme="light"] .wp-pill.success{color:#0f7a45;}

.wp-bar.is-left-clipped{border-top-left-radius:6px; border-bottom-left-radius:6px;}
.wp-bar.is-right-clipped{border-top-right-radius:6px; border-bottom-right-radius:6px;}

.wp-upcoming{padding:16px;}
.wp-upcoming-list{display:grid; gap:10px; margin-top:10px;}
.wp-up-item{
  width:100%;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:14px;
  border-radius:16px;
  border:1px solid var(--border);
  background:var(--panel);
  cursor:pointer;
  text-align:left;
}
html[data-theme="dark"] .wp-up-item{border-color:rgba(255,255,255,.10); background:rgba(255,255,255,.04); color:#fff;}
.wp-up-item:hover{border-color:rgba(11,107,255,.22);}
.wp-up-left{display:flex; gap:10px; align-items:flex-start;}
.wp-up-reg{font-weight:1000;}
.wp-up-sub{margin-top:4px; color:var(--muted); font-weight:800;}
html[data-theme="dark"] .wp-up-sub{color:rgba(255,255,255,.70);}
.wp-up-meta{margin-top:6px; display:grid; gap:4px; font-size:12px; color:var(--muted); font-weight:800;}
html[data-theme="dark"] .wp-up-meta{color:rgba(255,255,255,.70);}

.wp-all{display:grid; gap:10px; margin-top:10px;}
.wp-list-item{
  width:100%;
  display:grid;
  grid-template-columns:4px 1fr;
  gap:14px;
  padding:14px;
  border-radius:18px;
  border:1px solid var(--border);
  background:var(--panel);
  cursor:pointer;
  text-align:left;
}
html[data-theme="dark"] .wp-list-item{border-color:rgba(255,255,255,.10); background:rgba(255,255,255,.04); color:#fff;}
.wp-list-item:hover{border-color:rgba(11,107,255,.22);}
.wp-list-strip{border-radius:999px;}
.wp-list-strip.red{background:#ff4d4f;}
.wp-list-strip.orange{background:#ffb020;}
.wp-list-strip.yellow{background:#facc15;}
.wp-list-strip.blue{background:#2f7dff;}
.wp-list-top{display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap;}
.wp-list-title{font-weight:1000;}
.wp-list-pills{display:flex; gap:10px; align-items:center; flex-wrap:wrap; justify-content:flex-end;}
.wp-list-sub{margin-top:6px; color:var(--muted); font-weight:800;}
html[data-theme="dark"] .wp-list-sub{color:rgba(255,255,255,.70);}
.wp-list-meta{margin-top:10px; display:flex; gap:14px; flex-wrap:wrap; color:var(--muted); font-size:12px; font-weight:900;}
html[data-theme="dark"] .wp-list-meta{color:rgba(255,255,255,.70);}

/* Schedule detail */
.wp-detail-badges{display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-bottom:12px;}
.wp-detail-grid{display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:12px 20px;}
.wp-detail-kv{display:grid; gap:4px;}
.wp-detail-k{font-size:12px; color:var(--muted); font-weight:900;}
html[data-theme="dark"] .wp-detail-k{color:rgba(255,255,255,.70);}
.wp-detail-v{font-size:14px; font-weight:900;}
.wp-detail-sections{margin-top:12px;}
.wp-detail-section{margin-top:10px;}
.wp-detail-card{border:1px solid var(--border); border-radius:16px; padding:14px; background:var(--panel);}
html[data-theme="dark"] .wp-detail-card{border-color:rgba(255,255,255,.10); background:rgba(255,255,255,.04); color:#fff;}
.wp-detail-row{display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap;}
.wp-detail-meta{margin-top:10px;}

@media (max-width: 1100px){
  .wp-grid{grid-template-columns:1fr;}
}
@media (max-width: 920px){
  .wp-head,.wp-row{grid-template-columns:1fr;}
  .wp-head-label,.wp-row-label{display:none;}
  .wp-detail-grid{grid-template-columns:1fr;}
}

.fs-summary{display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin:6px 0 12px;}
.fs-sum-pill{
  display:inline-flex; align-items:center; gap:8px;
  height:34px; padding:0 12px;
  border-radius:999px;
  border:1px solid var(--border);
  background:#fff;
  font-weight:900;
}
.fs-sum-pill[data-alarm="red"]{border-color:rgba(229,72,77,.30); background:rgba(229,72,77,.08);}
.fs-sum-pill[data-alarm="orange"]{border-color:rgba(255,176,32,.35); background:rgba(255,176,32,.10);}
.fs-sum-pill[data-alarm="green"]{border-color:rgba(31,189,107,.28); background:rgba(31,189,107,.08);}
.fs-sum-meta{font-size:12px; color:var(--muted);}
.fs-dot{
  width:10px; height:10px; border-radius:999px;
  background:#94a3b8;
}
.fs-sum-pill[data-alarm="red"] .fs-dot{background:var(--danger);}
.fs-sum-pill[data-alarm="orange"] .fs-dot{background:var(--warning);}
.fs-sum-pill[data-alarm="green"] .fs-dot{background:var(--success);}

.fs-cell{
  width:100%;
  border:0;
  background:transparent;
  padding:0;
  cursor:pointer;
  display:flex;
  justify-content:flex-start;
}
.fs-pill{
  display:inline-flex; align-items:center; gap:8px;
  height:26px; padding:0 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background:#fff;
  font-weight:900;
  font-size:12px;
}
.fs-pill[data-alarm="red"]{border-color:rgba(229,72,77,.30); background:rgba(229,72,77,.08);}
.fs-pill[data-alarm="orange"]{border-color:rgba(255,176,32,.35); background:rgba(255,176,32,.10);}
.fs-pill[data-alarm="green"]{border-color:rgba(31,189,107,.28); background:rgba(31,189,107,.08);}
.fs-pill[data-alarm="red"] .fs-dot{background:var(--danger);}
.fs-pill[data-alarm="orange"] .fs-dot{background:var(--warning);}
.fs-pill[data-alarm="green"] .fs-dot{background:var(--success);}

.fs-details-head{
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:12px;
  align-items:start;
  margin-bottom:12px;
}
.fs-details-left{display:flex; gap:10px; align-items:center; flex-wrap:wrap;}
.fs-details-mid{min-width:0;}
.fs-details-title{font-weight:900; font-size:16px;}
.fs-details-tools{display:flex; gap:10px; align-items:center; justify-content:space-between; flex-wrap:wrap; margin-top:10px;}
.fs-search{min-width:280px; flex:1;}
.fs-toolgroup{display:flex; gap:10px; align-items:center;}
.fs-wp-actions{display:flex; gap:10px; align-items:center; justify-content:flex-end; flex-wrap:wrap;}

.fs-spinner{
  position:sticky;
  top:12px;
  margin-top:10px;
  justify-self:end;
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.85);
  color:var(--muted);
  font-size:12px;
  font-weight:900;
}

.fs-freeze .fs-sticky-col{
  position:sticky;
  background:#fff;
  z-index:3;
  border-right:1px solid var(--border);
}
.fs-freeze thead .fs-sticky-col{z-index:6; background:#f8fafc;}

.muted{color:var(--muted); font-size:12px;}

.popover{
  position:absolute;
  z-index:110;
  width:min(360px, calc(100vw - 24px));
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:14px;
  box-shadow:var(--shadow);
  padding:8px;
}
.popover-title{font-weight:900; font-size:12px; color:var(--muted); letter-spacing:.4px; padding:6px 8px;}
.popover-item{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  border:0;
  background:transparent;
  padding:10px 10px;
  border-radius:12px;
  cursor:pointer;
  text-align:left;
  font-weight:900;
}
.popover-item:hover{background:#f6f7fb;}

.fs-filter-pop{padding:6px 8px 8px;}
.fs-filter-grid{display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:10px;}
.fs-filter-pop-actions{display:flex; justify-content:flex-end; gap:10px; margin-top:12px; flex-wrap:wrap;}

.fs-wp-list{display:grid; gap:10px;}
.fs-wp-card{
  width:100%;
  border:1px solid var(--border);
  border-radius:14px;
  background:#fff;
  padding:12px;
  cursor:pointer;
  text-align:left;
}
.fs-wp-card:hover{border-color:rgba(11,107,255,.28); background:#f6f9ff;}
.fs-wp-top{display:flex; justify-content:space-between; gap:10px; align-items:center; margin-bottom:6px;}

@media (max-width: 980px){
  .fs-filter-row{grid-template-columns:1fr;}
  .fs-filter-grid{grid-template-columns:1fr;}
  .fs-details-head{grid-template-columns:1fr;}
  .fs-search{min-width:0;}
}

/* Work Orders */
html[data-theme="dark"] .layout-app[data-page="work_orders"]{
  background:
    radial-gradient(900px 600px at 15% 0%, rgba(47,125,255,.16), transparent 60%),
    radial-gradient(900px 600px at 85% 0%, rgba(192,85,255,.10), transparent 55%),
    linear-gradient(180deg, #0b0f16, #06080c);
}

html[data-theme="dark"] .layout-app[data-page="work_orders"] .topbar{
  background:rgba(17, 24, 39, .72);
  border-color:rgba(255,255,255,.08);
  box-shadow:0 18px 42px rgba(0,0,0,.45);
  backdrop-filter:blur(10px);
}
html[data-theme="dark"] .layout-app[data-page="work_orders"] .breadcrumb{color:rgba(255,255,255,.70);}
html[data-theme="dark"] .layout-app[data-page="work_orders"] .page-title{color:#fff;}
html[data-theme="dark"] .layout-app[data-page="work_orders"] .topbar-search{
  background:rgba(255,255,255,.06);
  border-color:rgba(255,255,255,.12);
  color:rgba(255,255,255,.70);
}
html[data-theme="dark"] .layout-app[data-page="work_orders"] .topbar-search .input{color:#fff;}
html[data-theme="dark"] .layout-app[data-page="work_orders"] .btn.ghost{border-color:rgba(255,255,255,.14); color:#fff;}

.wo-shell{display:grid; gap:14px;}
.wo-shell--detail{padding-top:6px;}
.wo-detail-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.wo-detail-title{display:grid; gap:4px; min-width:260px;}
.wo-detail-h1{font-weight:900; font-size:26px; color:#fff;}
.wo-detail-sub{color:rgba(255,255,255,.70); font-weight:800; font-size:13px;}
.wo-detail-right{display:flex; gap:10px; align-items:center; flex-wrap:wrap;}
.wo-detail-body{padding:2px 0 0;}
.tabs.wo-tabs{
  display:flex;
  gap:16px;
  padding:14px 0;
  border-bottom:1px solid var(--border);
  overflow-x:auto;
}
.tabs.wo-tabs .tab{
  padding:10px 0;
  position:relative;
  cursor:pointer;
  border:none;
  background:none;
  color:var(--muted);
  font-weight:800;
  font-size:14px;
  white-space:nowrap;
  transition:color 150ms;
}
.tabs.wo-tabs .tab:hover{color:var(--text);}
.tabs.wo-tabs .tab.active{color:var(--primary); border-bottom:2px solid var(--primary); padding-bottom:8px;}
.wo-panel{display:grid; gap:16px; padding:16px 0;}
.wo-kv-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));
  gap:16px;
}
.wo-kv-grid>div{display:grid; gap:4px;}
.wo-kv-grid span{font-size:13px; color:var(--muted);}
.wo-kv-grid b{color:var(--text); font-weight:600;}
.wo-desc{display:grid; gap:8px;}
.wo-desc-label{font-size:13px; color:var(--muted); font-weight:800;}
.wo-desc-text{color:var(--text); line-height:1.5;}
.wo-toolbar{display:flex; align-items:center; gap:10px;}
.wo-filterbar{display:grid; grid-template-columns:1fr auto; gap:12px; align-items:center;}
.wo-search{
  display:flex; align-items:center; gap:10px;
  height:44px;
  padding:0 12px;
  border-radius:14px;
  border:1px solid var(--border);
  background:var(--panel);
  color:var(--muted);
}
.wo-search .input{
  border:0; outline:none;
  height:100%; width:100%;
  padding:0;
  background:transparent;
  color:var(--text);
}
.wo-selects{display:flex; gap:10px; align-items:center;}

html[data-theme="dark"] .wo-search{
  border-color:rgba(255,255,255,.10);
  background:rgba(255,255,255,.06);
  color:rgba(255,255,255,.70);
}
html[data-theme="dark"] .wo-search .input{color:#fff;}
html[data-theme="dark"] .wo-search .input::placeholder{color:rgba(255,255,255,.55);}
html[data-theme="dark"] .layout-app[data-page="work_orders"] .select{
  background:rgba(255,255,255,.06);
  border-color:rgba(255,255,255,.12);
  color:#fff;
}
html[data-theme="dark"] .layout-app[data-page="work_orders"] .select option{color:var(--text);}

.wo-list{display:grid; gap:14px;}
.wo-card{
  width:100%;
  border:1px solid var(--border);
  border-radius:18px;
  background:var(--panel);
  box-shadow:var(--shadow);
  padding:16px;
  color:var(--text);
  cursor:pointer;
  text-align:left;
}
html[data-theme="dark"] .wo-card{
  border-color:rgba(255,255,255,.10);
  background:
    radial-gradient(900px 320px at 20% 0%, rgba(47,125,255,.10), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  box-shadow:0 26px 60px rgba(0,0,0,.45);
  color:#fff;
}
.wo-card-top{display:flex; align-items:flex-start; justify-content:space-between; gap:16px; flex-wrap:wrap;}
.wo-title{display:flex; align-items:center; gap:12px; flex-wrap:wrap;}
.wo-number{font-weight:900; font-size:18px;}
.wo-pills{display:flex; gap:10px; flex-wrap:wrap;}
.wo-pill{
  height:24px;
  padding:0 10px;
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  border:1px solid var(--border);
  background:#f6f7fb;
  color:var(--text);
  font-weight:900;
  font-size:12px;
}
html[data-theme="dark"] .wo-pill{border-color:rgba(255,255,255,.12); background:rgba(0,0,0,.25); color:#fff;}
.wo-pill.primary{border-color:rgba(47,125,255,.35); background:rgba(47,125,255,.16); color:#cfe1ff;}
.wo-pill.orange{border-color:rgba(255,176,32,.40); background:rgba(255,176,32,.16); color:#ffd9a3;}
.wo-pill.danger{border-color:rgba(229,72,77,.40); background:rgba(229,72,77,.16); color:#ffb3b6;}
.wo-pill.success{border-color:rgba(31,189,107,.35); background:rgba(31,189,107,.12); color:#aef5d2;}
.wo-pill.neutral{background:#f6f7fb; color:var(--muted);}
html[data-theme="dark"] .wo-pill.neutral{background:rgba(255,255,255,.06); color:#fff;}
.wo-pill.purple{border-color:rgba(192,85,255,.35); background:rgba(192,85,255,.14); color:#edd3ff;}

html[data-theme="light"] .wo-pill.neutral{color:#4b5563;}
html[data-theme="light"] .wo-pill.primary{color:#103b9c;}
html[data-theme="light"] .wo-pill.orange{color:#8a4b00;}
html[data-theme="light"] .wo-pill.danger{color:#9b1c21;}
html[data-theme="light"] .wo-pill.success{color:#0f7a45;}

.wo-hours{display:flex; gap:10px; align-items:stretch; flex-wrap:wrap; justify-content:flex-end;}
.wo-hours-box{
  border:1px solid var(--border);
  border-radius:14px;
  background:var(--panel);
  padding:10px 12px;
  min-width:120px;
}
html[data-theme="dark"] .wo-hours-box{border-color:rgba(255,255,255,.10); background:rgba(255,255,255,.04);}
.wo-hours-label{font-size:12px; color:var(--muted); font-weight:900;}
html[data-theme="dark"] .wo-hours-label{color:rgba(255,255,255,.70);}
.wo-hours-val{font-size:16px; font-weight:900; margin-top:4px;}

.wo-meta{margin-top:10px;}
html[data-theme="dark"] .wo-meta{color:rgba(255,255,255,.86);}
.wo-line{display:flex; gap:8px; align-items:center; margin-top:6px;}
.wo-dim{color:var(--muted);}
html[data-theme="dark"] .wo-dim{color:rgba(255,255,255,.68);}
.wo-grid{display:flex; gap:24px; flex-wrap:wrap; margin-top:8px;}
.wo-kv{display:flex; gap:8px; align-items:center;}
.wo-k{color:var(--muted);}
html[data-theme="dark"] .wo-k{color:rgba(255,255,255,.68);}
.wo-desc{margin-top:10px; color:var(--muted); line-height:1.35;}
html[data-theme="dark"] .wo-desc{color:rgba(255,255,255,.70);}

.wo-progress{margin-top:12px;}
.wo-prog-head{display:flex; align-items:center; justify-content:space-between; gap:12px; color:var(--muted); font-weight:900; font-size:12px;}
html[data-theme="dark"] .wo-prog-head{color:rgba(255,255,255,.75);}
.wo-track{height:8px; border-radius:999px; background:rgba(11,107,255,.12); overflow:hidden; margin-top:8px;}
html[data-theme="dark"] .wo-track{background:rgba(47,125,255,.20);}
.wo-fill{height:100%; background:var(--primary);}

.modal-panel.wo-modal{
  width:min(760px, 100%);
  background:var(--panel);
  border-color:var(--border);
  box-shadow:var(--shadow);
  color:var(--text);
}
html[data-theme="dark"] .modal-panel.wo-modal{
  background:rgba(10, 14, 20, .98);
  border-color:rgba(255,255,255,.10);
  color:#fff;
  box-shadow:0 30px 90px rgba(0,0,0,.60);
}
.wo-modal-head{
  padding:16px 16px 10px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}
.wo-modal-h1{font-weight:900; font-size:26px; letter-spacing:-.3px;}
.wo-modal-sub{margin-top:6px; color:var(--muted); font-weight:800;}
html[data-theme="dark"] .wo-modal-sub{color:rgba(255,255,255,.70);}
.wo-modal-right{display:flex; align-items:center; gap:10px; flex-wrap:wrap;}
.tabs.wo-tabs{margin:6px 16px 0;}
html[data-theme="dark"] .tabs.wo-tabs{background:rgba(255,255,255,.06); border-color:rgba(255,255,255,.10);}
html[data-theme="dark"] .tabs.wo-tabs .tab{color:rgba(255,255,255,.80);}
html[data-theme="dark"] .tabs.wo-tabs .tab.active{background:rgba(255,255,255,.10); color:#fff;}
.wo-modal-body{padding:16px;}
.wo-modal-foot{padding:16px; display:flex; align-items:center; justify-content:flex-end; gap:10px; border-top:1px solid var(--border);}
html[data-theme="dark"] .wo-modal-foot{border-top-color:rgba(255,255,255,.08);}

.wo-kv-grid{display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:14px 20px; padding-top:10px;}
.wo-kv2{display:grid; gap:4px;}
.wo-k2{font-size:12px; color:var(--muted); font-weight:900;}
html[data-theme="dark"] .wo-k2{color:rgba(255,255,255,.70);}
.wo-v2{font-size:15px; font-weight:900;}
.wo-desc-label{font-size:12px; font-weight:900; color:var(--muted); margin-top:14px;}
html[data-theme="dark"] .wo-desc-label{color:rgba(255,255,255,.70);}
.wo-desc-text{margin-top:8px; line-height:1.35;}
.wo-prog{margin-top:14px;}
.wo-prog-top{display:flex; justify-content:space-between; align-items:center; gap:12px;}
.wo-prog-label{font-size:12px; font-weight:900; color:var(--muted);}
html[data-theme="dark"] .wo-prog-label{color:rgba(255,255,255,.70);}
.wo-prog-pct{font-weight:900;}

.wo-items{display:grid; gap:10px; padding-top:12px;}
.wo-item{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:14px;
  border-radius:14px;
  border:1px solid var(--border);
  background:var(--panel);
}
html[data-theme="dark"] .wo-item{border-color:rgba(255,255,255,.10); background:rgba(255,255,255,.04);}
.wo-item-left{display:flex; gap:12px; align-items:center;}
.wo-item-right{display:flex; gap:10px; align-items:center; flex-wrap:wrap; justify-content:flex-end;}
.wo-item-ico{width:28px; height:28px; display:grid; place-items:center; border-radius:10px; background:rgba(11,107,255,.10);}
html[data-theme="dark"] .wo-item-ico{background:rgba(47,125,255,.18);}
.wo-item-title{font-weight:900;}
.wo-item-sub{font-size:12px; color:var(--muted); margin-top:4px;}
html[data-theme="dark"] .wo-item-sub{color:rgba(255,255,255,.65);}

.wo-subactions{display:flex; justify-content:flex-end; gap:10px; margin-top:6px; margin-bottom:8px; flex-wrap:wrap;}

.wo-form-grid{display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:12px;}
html[data-theme="dark"] .modal-panel.wo-modal .input,
html[data-theme="dark"] .modal-panel.wo-modal .select{
  background:rgba(255,255,255,.06);
  border-color:rgba(255,255,255,.12);
  color:#fff;
}
html[data-theme="dark"] .modal-panel.wo-modal .input::placeholder{color:rgba(255,255,255,.55);}
html[data-theme="dark"] .modal-panel.wo-modal .label{color:rgba(255,255,255,.68);}
html[data-theme="dark"] .modal-panel.wo-modal textarea.input{height:auto; min-height:120px; padding:12px;}
html[data-theme="light"] .modal-panel.wo-modal textarea.input{height:auto; min-height:120px; padding:12px;}

.wo-parts-search{margin-top:4px;}
.wo-parts-list{display:grid; gap:10px; padding-top:12px;}
.wo-part-row{
  display:grid;
  grid-template-columns: 18px 1fr auto;
  gap:12px;
  align-items:center;
  padding:12px;
  border-radius:14px;
  border:1px solid var(--border);
  background:var(--panel);
  cursor:pointer;
}
html[data-theme="dark"] .wo-part-row{border-color:rgba(255,255,255,.10); background:rgba(255,255,255,.04);}
.wo-part-row input{width:16px; height:16px;}
.wo-part-top{display:flex; gap:10px; align-items:center; flex-wrap:wrap;}
.wo-part-sub{margin-top:4px;}
.wo-part-stock{text-align:right;}

.wo-part-metrics{display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:12px; margin-top:14px;}
.wo-metric{
  border:1px solid var(--border);
  border-radius:14px;
  background:var(--panel);
  padding:12px;
}
html[data-theme="dark"] .wo-metric{border-color:rgba(255,255,255,.10); background:rgba(255,255,255,.04);}
.wo-metric-label{font-size:12px; font-weight:900; color:var(--muted);}
html[data-theme="dark"] .wo-metric-label{color:rgba(255,255,255,.70);}
.wo-metric-val{font-size:18px; font-weight:900; margin-top:6px;}

@media (max-width: 920px){
  .wo-filterbar{grid-template-columns:1fr;}
  .wo-form-grid{grid-template-columns:1fr;}
  .wo-kv-grid{grid-template-columns:1fr;}
  .wo-part-metrics{grid-template-columns:1fr;}
}

/* Inspections */
html[data-theme="dark"] .layout-app[data-page="inspections"]{
  background:
    radial-gradient(900px 600px at 15% 0%, rgba(47,125,255,.16), transparent 60%),
    radial-gradient(900px 600px at 85% 0%, rgba(255,176,32,.10), transparent 55%),
    linear-gradient(180deg, #0b0f16, #06080c);
}

html[data-theme="dark"] .layout-app[data-page="inspections"] .topbar{
  background:rgba(17, 24, 39, .72);
  border-color:rgba(255,255,255,.08);
  box-shadow:0 18px 42px rgba(0,0,0,.45);
  backdrop-filter:blur(10px);
}
html[data-theme="dark"] .layout-app[data-page="inspections"] .breadcrumb{color:rgba(255,255,255,.70);}
html[data-theme="dark"] .layout-app[data-page="inspections"] .page-title{color:#fff;}
html[data-theme="dark"] .layout-app[data-page="inspections"] .topbar-search{
  background:rgba(255,255,255,.06);
  border-color:rgba(255,255,255,.12);
  color:rgba(255,255,255,.70);
}
html[data-theme="dark"] .layout-app[data-page="inspections"] .topbar-search .input{color:#fff;}

.insp-shell{display:grid; gap:14px;}
.insp-toolbar{display:flex; align-items:center; gap:10px; flex-wrap:wrap;}
.insp-stats{display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:14px;}
.insp-stat{padding:18px;}
.insp-stat-top{display:flex; align-items:flex-start; justify-content:space-between; gap:12px;}
.insp-stat-label{font-size:12px; color:var(--muted); font-weight:900;}
.insp-stat-value{margin-top:6px; font-weight:1000; font-size:28px; letter-spacing:-.4px;}
.insp-stat-ico{
  width:44px; height:44px;
  border-radius:14px;
  display:grid; place-items:center;
  background:rgba(47,125,255,.12);
  border:1px solid rgba(47,125,255,.18);
  color:var(--primary);
  flex:0 0 auto;
  font-weight:1000;
}
.insp-stat-ico.warn{background:rgba(255,176,32,.14); border-color:rgba(255,176,32,.22); color:var(--warning);}
.insp-stat-ico.orange{background:rgba(255,106,0,.12); border-color:rgba(255,106,0,.20); color:#ff6a00;}
.insp-stat-ico.danger{background:rgba(229,72,77,.12); border-color:rgba(229,72,77,.22); color:var(--danger);}

.insp-filterbar{display:grid; grid-template-columns:1fr 220px; gap:12px; align-items:center;}
.insp-search{
  display:flex; align-items:center; gap:10px;
  height:44px;
  padding:0 12px;
  border-radius:14px;
  border:1px solid var(--border);
  background:var(--panel);
  color:var(--muted);
}
.insp-search .input{
  border:0; outline:none;
  height:100%; width:100%;
  padding:0;
  background:transparent;
  color:var(--text);
}
html[data-theme="dark"] .insp-search{
  border-color:rgba(255,255,255,.10);
  background:rgba(255,255,255,.06);
  color:rgba(255,255,255,.70);
}
html[data-theme="dark"] .insp-search .input{color:#fff;}
html[data-theme="dark"] .insp-search .input::placeholder{color:rgba(255,255,255,.55);}
html[data-theme="dark"] .layout-app[data-page="inspections"] .select{
  background:rgba(255,255,255,.06);
  border-color:rgba(255,255,255,.12);
  color:#fff;
}
html[data-theme="dark"] .layout-app[data-page="inspections"] .select option{color:var(--text);}

.insp-list{display:grid; gap:14px;}
.insp-card{
  width:100%;
  border:1px solid var(--border);
  border-radius:18px;
  background:var(--panel);
  box-shadow:var(--shadow);
  padding:18px;
  cursor:pointer;
  text-align:left;
  color:var(--text);
}
html[data-theme="dark"] .insp-card{
  border-color:rgba(255,255,255,.10);
  background:
    radial-gradient(900px 320px at 20% 0%, rgba(47,125,255,.10), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  box-shadow:0 26px 60px rgba(0,0,0,.45);
  color:#fff;
}
.insp-card:hover{border-color:rgba(11,107,255,.22);}
.insp-card-left{display:flex; gap:14px; align-items:flex-start;}
.insp-ok{
  width:18px; height:18px;
  border-radius:999px;
  background:rgba(31,189,107,.16);
  border:1px solid rgba(31,189,107,.30);
  color:var(--success);
  display:grid; place-items:center;
  font-size:12px; font-weight:1000;
  margin-top:4px;
}
html[data-theme="dark"] .insp-ok{background:rgba(31,189,107,.18); color:#1fbd6b; border-color:rgba(31,189,107,.32);}
.insp-card-top{display:flex; align-items:center; justify-content:flex-start; gap:12px; flex-wrap:wrap;}
.insp-num{font-weight:1000; font-size:18px; letter-spacing:-.2px;}
.insp-pills{display:flex; gap:10px; align-items:center; flex-wrap:wrap;}
.insp-air{margin-top:6px; color:var(--muted); font-weight:800;}
html[data-theme="dark"] .insp-air{color:rgba(255,255,255,.70);}
.insp-meta{
  margin-top:14px;
  display:flex;
  align-items:flex-end;
  gap:28px;
  flex-wrap:wrap;
}
.insp-meta > div{min-width:140px;}
.insp-meta b{display:block; margin-top:2px;}

.insp-modal .wo-modal-body{max-height:62vh; overflow:auto;}
.insp-kv-grid{display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:14px 20px; padding-top:10px;}
.insp-findings{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:12px;
  margin-top:16px;
}
.insp-findings.is-hidden{display:none;}
.insp-find-card{
  border-radius:16px;
  border:1px solid rgba(255,106,0,.18);
  background:linear-gradient(180deg, rgba(255,106,0,.12), rgba(255,106,0,.05));
  padding:14px;
}
html[data-theme="dark"] .insp-find-card{
  border-color:rgba(255,255,255,.10);
  background:rgba(0,0,0,.18);
}
.insp-find-card.danger{border-color:rgba(229,72,77,.22); background:linear-gradient(180deg, rgba(229,72,77,.12), rgba(229,72,77,.05));}
html[data-theme="dark"] .insp-find-card.danger{background:rgba(0,0,0,.18);}
.insp-find-k{font-size:12px; font-weight:900; color:var(--muted);}
html[data-theme="dark"] .insp-find-k{color:rgba(255,255,255,.70);}
.insp-find-v{margin-top:8px; font-size:28px; font-weight:1000; color:#ff6a00;}
.insp-find-card.danger .insp-find-v{color:var(--danger);}

.insp-items{display:grid; gap:10px; margin-top:16px;}
.insp-items-head{display:flex; justify-content:flex-end; margin-bottom:2px;}
.insp-item{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px;
  border-radius:16px;
  border:1px solid var(--border);
  background:var(--panel);
  cursor:pointer;
  text-align:left;
  appearance:none;
}
html[data-theme="dark"] .insp-item{border-color:rgba(255,255,255,.10); background:rgba(255,255,255,.04); color:#fff;}
.insp-item-left{display:flex; gap:12px; align-items:flex-start;}
.insp-item-ico{
  width:22px; height:22px;
  border-radius:999px;
  display:grid; place-items:center;
  background:rgba(47,125,255,.14);
  border:1px solid rgba(47,125,255,.22);
  color:var(--primary);
  font-weight:1000;
  flex:0 0 auto;
  margin-top:2px;
}
.insp-item-ico.orange{background:rgba(255,176,32,.14); border-color:rgba(255,176,32,.22); color:var(--warning);}
.insp-item-ico.danger{background:rgba(229,72,77,.12); border-color:rgba(229,72,77,.22); color:var(--danger);}
.insp-item-ico.neutral{background:rgba(148,163,184,.14); border-color:rgba(148,163,184,.22); color:#94a3b8;}
.insp-item-title{font-weight:1000;}
.insp-item-inline{margin-left:10px; display:inline-flex; gap:8px; align-items:center; flex-wrap:wrap;}
.insp-item-meta{margin-top:6px; display:flex; gap:10px; flex-wrap:wrap; align-items:center;}
.insp-item-note{margin-top:6px; font-size:12px; color:var(--muted); font-weight:800;}
html[data-theme="dark"] .insp-item-note{color:rgba(255,255,255,.70);}
.insp-item-pill{height:28px;}

.insp-chip{
  height:22px;
  padding:0 10px;
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  border:1px solid rgba(148,163,184,.24);
  background:rgba(148,163,184,.10);
  font-size:12px;
  font-weight:1000;
  color:var(--text);
}
html[data-theme="dark"] .insp-chip{border-color:rgba(255,255,255,.12); background:rgba(0,0,0,.22); color:#fff;}
.insp-chip.ok{border-color:rgba(31,189,107,.28); background:rgba(31,189,107,.12); color:var(--success);}
html[data-theme="dark"] .insp-chip.ok{color:#1fbd6b;}

@media (max-width: 1100px){
  .insp-stats{grid-template-columns:repeat(2, minmax(0, 1fr));}
}
@media (max-width: 920px){
  .insp-stats{grid-template-columns:1fr;}
  .insp-filterbar{grid-template-columns:1fr;}
  .insp-meta{gap:14px;}
  .insp-meta > div{min-width:120px;}
  .insp-kv-grid{grid-template-columns:1fr;}
  .insp-findings{grid-template-columns:1fr;}
}

/* Parts Inventory */
.btn-ico{display:inline-grid; place-items:center; width:18px; height:18px; margin-right:8px; font-weight:900;}
.hint{color:var(--muted); font-size:12px; font-weight:700;}

.pi-shell{display:grid; gap:16px;}
.pi-toolbar{display:flex; gap:10px; align-items:center; flex-wrap:wrap;}
.pi-stats{display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:14px;}
.pi-stat{padding:18px;}
.pi-stat-top{display:flex; align-items:flex-start; justify-content:space-between; gap:12px;}
.pi-stat-label{font-size:12px; color:var(--muted); font-weight:900;}
.pi-stat-value{margin-top:6px; font-weight:1000; font-size:28px; letter-spacing:-.4px;}
.pi-stat-sub{margin-top:6px; font-size:12px; color:var(--muted); font-weight:800;}
.pi-stat-ico{
  width:44px; height:44px;
  border-radius:14px;
  display:grid; place-items:center;
  background:rgba(11,107,255,.10);
  border:1px solid rgba(11,107,255,.18);
  color:var(--primary);
  flex:0 0 auto;
}
.pi-stat-ico.danger{background:rgba(229,72,77,.12); border-color:rgba(229,72,77,.22); color:var(--danger);}
.pi-stat-ico.success{background:rgba(31,189,107,.12); border-color:rgba(31,189,107,.22); color:var(--success);}

.pi-alert{
  border-radius:18px;
  border:1px solid rgba(229,72,77,.18);
  background:linear-gradient(180deg, rgba(229,72,77,.12), rgba(229,72,77,.05));
}
html[data-theme="dark"] .pi-alert{
  border-color:rgba(229,72,77,.28);
  background:linear-gradient(180deg, rgba(76, 18, 22, .92), rgba(35, 9, 12, .70));
}
.pi-alert-head{display:grid; gap:8px; padding:18px;}
.pi-alert-title{display:flex; align-items:center; gap:10px; font-weight:1000;}
.pi-alert-ico{display:inline-grid; place-items:center; width:22px; height:22px; border-radius:10px; background:rgba(229,72,77,.12); color:var(--danger);}
html[data-theme="dark"] .pi-alert-title{color:#fff;}
html[data-theme="dark"] .pi-alert-sub{color:rgba(255,255,255,.75);}
.pi-low-list{display:grid; gap:10px; padding:0 18px 18px;}
.pi-low-item{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:14px;
  border-radius:16px;
  border:1px solid rgba(229,72,77,.16);
  background:rgba(0,0,0,.02);
  cursor:pointer;
  text-align:left;
}
html[data-theme="dark"] .pi-low-item{border-color:rgba(255,255,255,.08); background:rgba(0,0,0,.18); color:#fff;}
.pi-low-item:hover{border-color:rgba(229,72,77,.30);}
.pi-low-number{font-weight:1000;}
.pi-low-desc{margin-top:4px; font-size:12px; color:var(--muted);}
html[data-theme="dark"] .pi-low-desc{color:rgba(255,255,255,.70);}
.pi-low-metric{text-align:right;}
.pi-low-metric-val{font-weight:1000; color:var(--danger);}
html[data-theme="dark"] .pi-low-metric-val{color:#ffb3b6;}
.pi-low-metric-sub{font-size:12px; color:var(--muted); margin-top:4px;}
html[data-theme="dark"] .pi-low-metric-sub{color:rgba(255,255,255,.70);}

.pi-filterbar{display:grid; grid-template-columns:1fr auto; gap:12px; align-items:center;}
.pi-search{
  display:flex; align-items:center; gap:10px;
  height:44px;
  padding:0 12px;
  border-radius:14px;
  border:1px solid var(--border);
  background:var(--panel);
  color:var(--muted);
}
.pi-search .input{
  border:0; outline:none;
  height:100%; width:100%;
  padding:0;
  background:transparent;
  color:var(--text);
}
.pi-selects{display:flex; gap:10px; align-items:center; flex-wrap:wrap; justify-content:flex-end;}

html[data-theme="dark"] .pi-search{
  border-color:rgba(255,255,255,.10);
  background:rgba(255,255,255,.06);
  color:rgba(255,255,255,.70);
}
html[data-theme="dark"] .pi-search .input{color:#fff;}
html[data-theme="dark"] .pi-search .input::placeholder{color:rgba(255,255,255,.55);}
html[data-theme="dark"] .layout-app[data-page="materials"] .select{
  background:rgba(255,255,255,.06);
  border-color:rgba(255,255,255,.12);
  color:#fff;
}
html[data-theme="dark"] .layout-app[data-page="materials"] .select option{color:var(--text);}

.pi-stock{display:grid; gap:6px; min-width:140px;}
.pi-stock-top{font-size:12px; color:var(--muted); font-weight:900;}
html[data-theme="dark"] .pi-stock-top{color:rgba(255,255,255,.70);}
.pi-stock-bar{
  height:8px;
  border-radius:999px;
  background:rgba(11,107,255,.12);
  overflow:hidden;
}
html[data-theme="dark"] .pi-stock-bar{background:rgba(47,125,255,.18);}
.pi-stock-bar span{display:block; height:100%; background:var(--primary); border-radius:999px;}

.pi-row-btn{height:32px; padding:0 12px;}

.modal-panel.pi-modal{max-width:720px;}
.pi-modal-title{font-weight:1000; font-size:22px;}
.pi-modal-sub{margin-top:6px; color:var(--muted); font-weight:800;}
html[data-theme="dark"] .pi-modal-sub{color:rgba(255,255,255,.70);}
.pi-detail-grid{display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:14px 20px;}
.pi-kv{display:grid; gap:4px;}
.pi-k{font-size:12px; color:var(--muted); font-weight:900;}
html[data-theme="dark"] .pi-k{color:rgba(255,255,255,.70);}
.pi-v{font-size:15px; font-weight:900;}
.pi-metrics{display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:12px; margin-top:14px;}
.pi-metric{
  border:1px solid var(--border);
  border-radius:14px;
  background:var(--panel);
  padding:12px;
}
html[data-theme="dark"] .pi-metric{border-color:rgba(255,255,255,.10); background:rgba(255,255,255,.04);}
.pi-metric-k{font-size:12px; color:var(--muted); font-weight:900;}
html[data-theme="dark"] .pi-metric-k{color:rgba(255,255,255,.70);}
.pi-metric-v{font-size:18px; font-weight:1000; margin-top:6px;}

@media (max-width: 980px){
  .pi-stats{grid-template-columns:1fr;}
}
@media (max-width: 920px){
  .pi-filterbar{grid-template-columns:1fr;}
  .pi-detail-grid{grid-template-columns:1fr;}
  .pi-metrics{grid-template-columns:1fr;}
}

.auth-card{
  width:min(420px, 100%);
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:20px;
}
.auth-head{display:flex; align-items:center; gap:12px;}
.auth-mark{
  width:44px; height:44px;
  border-radius:14px;
  display:grid; place-items:center;
  background:rgba(11,107,255,.10);
  color:var(--primary);
  border:1px solid rgba(11,107,255,.18);
}
.auth-brand{display:grid; gap:2px;}
.auth-brand .auth-title{margin:0;}
.auth-brand .auth-sub{margin:0;}
.auth-title{font-weight:900; font-size:20px}
.auth-sub{color:var(--muted); font-size:13px}
.auth-meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.checkbox{
  display:flex;
  gap:10px;
  align-items:center;
  color:var(--muted);
  font-size:13px;
  user-select:none;
}
.checkbox input{width:16px; height:16px;}
.link{
  color:#2346a3;
  text-decoration:none;
  font-weight:900;
  font-size:13px;
}
.link:hover{text-decoration:underline}
.auth-footer{
  margin-top:12px;
  text-align:center;
  font-size:12px;
  color:var(--muted);
}

@media (max-width: 1200px){
  .kpi-grid{grid-template-columns:repeat(2, minmax(0, 1fr));}
  .grid{grid-template-columns:1fr;}
  .card-left,.card-wide{grid-column:auto; grid-row:auto;}
  .topbar-search{min-width:220px;}
}

@media (max-width: 920px){
  .kpi-grid{grid-template-columns:1fr;}
  .sidebar{display:none;}
  .main{padding:14px;}
  .topbar{border-radius:14px;}
}
