/* BOSH theme -- "Navy enterprise", chosen by the owner on 2026-09-30.
 *
 * Loaded after each page's own styles, so it restyles the shell and the common pieces
 * without touching page logic. Colours that carry meaning in inline styles (a green Verify,
 * a red Reject) are left alone: only the sidebar uses !important on colour.
 *
 * Icons: Tabler Icons, MIT licence, https://tabler.io/icons -- inlined below as masks so the
 * app does not download an icon font.
 */

:root{
  --navy:#0F1B2D; --navy-2:#16243A; --navy-3:#1C2B44; --navy-line:#22324D;
  --navy-text:#C7D2E3; --navy-dim:#7F8FA8; --accent:#3B82F6;
  --m-ptw:#2563EB; --m-tbm:#6366F1; --m-safety:#16A34A; --m-defect:#DC2626; --m-quality:#7C3AED;
  --ico-home:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' %3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M5 4h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-6a1 1 0 0 1 1 -1' /%3E%3Cpath d='M5 16h4a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1' /%3E%3Cpath d='M15 12h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-6a1 1 0 0 1 1 -1' /%3E%3Cpath d='M15 4h4a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1' /%3E%3C/svg%3E");
  --ico-ptw:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' %3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M14 3v4a1 1 0 0 0 1 1h4' /%3E%3Cpath d='M5 8v-3a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2h-5' /%3E%3Cpath d='M6 14m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0' /%3E%3Cpath d='M4.5 17l-1.5 5l3 -1.5l3 1.5l-1.5 -5' /%3E%3C/svg%3E");
  --ico-tbm:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' %3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M18 8a3 3 0 0 1 0 6' /%3E%3Cpath d='M10 8v11a1 1 0 0 1 -1 1h-1a1 1 0 0 1 -1 -1v-5' /%3E%3Cpath d='M12 8h0l4.524 -3.77a.9 .9 0 0 1 1.476 .692v12.156a.9 .9 0 0 1 -1.476 .692l-4.524 -3.77h-8a1 1 0 0 1 -1 -1v-4a1 1 0 0 1 1 -1h8' /%3E%3C/svg%3E");
  --ico-safety:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' %3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M11.46 20.846a12 12 0 0 1 -7.96 -14.846a12 12 0 0 0 8.5 -3a12 12 0 0 0 8.5 3a12 12 0 0 1 -.09 7.06' /%3E%3Cpath d='M15 19l2 2l4 -4' /%3E%3C/svg%3E");
  --ico-defect:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' %3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M7 10h3v-3l-3.5 -3.5a6 6 0 0 1 8 8l6 6a2 2 0 0 1 -3 3l-6 -6a6 6 0 0 1 -8 -8l3.5 3.5' /%3E%3C/svg%3E");
  --ico-quality:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' %3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2' /%3E%3Cpath d='M9 3m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v0a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z' /%3E%3Cpath d='M9 14l2 2l4 -4' /%3E%3C/svg%3E");
  --ico-admin:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' %3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z' /%3E%3Cpath d='M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0' /%3E%3C/svg%3E");
  --ico-logout:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' %3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M14 8v-2a2 2 0 0 0 -2 -2h-7a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7a2 2 0 0 0 2 -2v-2' /%3E%3Cpath d='M9 12h12l-3 -3' /%3E%3Cpath d='M18 15l3 -3' /%3E%3C/svg%3E");
  --ico-bell:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' %3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M10 5a2 2 0 1 1 4 0a7 7 0 0 1 4 6v3a4 4 0 0 0 2 3h-16a4 4 0 0 0 2 -3v-3a7 7 0 0 1 4 -6' /%3E%3Cpath d='M9 17v1a3 3 0 0 0 6 0v-1' /%3E%3C/svg%3E");
  --ico-rain:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' %3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M7 18a4.6 4.4 0 0 1 0 -9a5 4.5 0 0 1 11 2h1a3.5 3.5 0 0 1 0 7' /%3E%3Cpath d='M11 13v2m0 3v2m4 -5v2m0 3v2' /%3E%3C/svg%3E");
  --ico-chev:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' %3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M9 6l6 6l-6 6' /%3E%3C/svg%3E");
  --ico-users:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' %3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M9 7m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0' /%3E%3Cpath d='M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2' /%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75' /%3E%3Cpath d='M21 21v-2a4 4 0 0 0 -3 -3.85' /%3E%3C/svg%3E");
}
:root:not([data-theme="dark"]){
  --primary:#2563EB; --primary-dark:#1D4ED8;
  --ink:#0F1B2D; --text:#0F1B2D; --muted:#64748B;
  --bg:#F4F6FA; --card:#FFFFFF; --card-bg:#FFFFFF;
  --line:#E2E8F0; --border:#E2E8F0;
  --radius:10px;
  --shadow:0 1px 2px rgba(15,27,45,.06);
}

body{
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  background:var(--bg);
}
.blueprint{ background-image:none !important; }
.hazard{ display:none !important; }

/* ---------- Sidebar ---------- */
.sidebar{ background:var(--navy) !important; border-right:none !important; }
.sidebar-head{ padding:18px 18px 14px !important; border-bottom:1px solid var(--navy-line); }
.sidebar .logo{
  color:#fff !important; font-size:1.2rem !important; font-weight:600 !important;
  letter-spacing:.6px; text-align:left !important;
  display:flex; align-items:center; gap:10px; margin:0 !important;
}
.sidebar .logo::before{
  content:"B"; width:30px; height:30px; border-radius:7px; flex:none;
  background:var(--primary); color:#fff; font-size:1rem; font-weight:700;
  display:inline-flex; align-items:center; justify-content:center;
}
.sidebar .nav{ padding:10px 0 !important; }
.nav-item{
  color:var(--navy-text) !important; background:none !important;
  font-weight:500 !important; font-size:.93rem !important;
  border-radius:0 !important; margin:0 !important; gap:12px !important;
  padding:11px 18px 11px 15px !important;
  border-left:3px solid transparent !important;
}
.nav-item:hover{ background:var(--navy-2) !important; color:#fff !important; }
.nav-item.current{ background:var(--navy-3) !important; color:#fff !important; border-left-color:var(--accent) !important; }
.nav-badge{ background:#EF4444 !important; font-weight:600 !important; }
.sidebar-foot{ color:var(--navy-dim) !important; border-top:1px solid var(--navy-line) !important; font-weight:500 !important; }
.soon{ background:transparent !important; border-color:var(--navy-line) !important; color:var(--navy-dim) !important; }

/* ---------- Icons: the emoji is hidden and a line icon drawn in its place ---------- */
.nav-ico, .act-need .an-ico{
  width:20px !important; height:20px !important; border-radius:0 !important;
  font-size:0 !important; color:inherit; flex-shrink:0;
  background:currentColor !important;
  -webkit-mask:var(--ico, var(--ico-chev)) center / 20px 20px no-repeat;
          mask:var(--ico, var(--ico-chev)) center / 20px 20px no-repeat;
}
.c-home{ --ico:var(--ico-home); }
.c-ptw{ --ico:var(--ico-ptw); }
.c-tbm{ --ico:var(--ico-tbm); }
.c-safety{ --ico:var(--ico-safety); }
.c-defect{ --ico:var(--ico-defect); }
.c-quality{ --ico:var(--ico-quality); }
.c-admin{ --ico:var(--ico-admin); }
.nav-item[onclick*="doLogout"] .nav-ico{ --ico:var(--ico-logout); }
/* Outside the sidebar the same icons sit in navy on white. */
.admin-head .nav-ico, .module-card .nav-ico{
  color:var(--navy); width:28px !important; height:28px !important;
  -webkit-mask-size:28px 28px; mask-size:28px 28px;
}

/* ---------- Top bar ---------- */
.topbar{ background:#fff !important; border-bottom:1px solid var(--line) !important; box-shadow:none !important; }
.hamburger{ color:var(--navy) !important; }
.avatar{ background:var(--navy) !important; animation:none !important; }
#avatarBtn:hover, .pf-photo:hover{ animation:none !important; }

/* ---------- Surfaces ---------- */
.welcome-card, .action-card, .dash-stat, .dash-table-wrap, .form-card,
.login-card, .setup-card, .module-card{
  box-shadow:var(--shadow) !important;
  border:1px solid var(--line);
  border-radius:var(--radius) !important;
}
.welcome-body h1{ font-weight:600 !important; }
.section-title{
  font-size:.74rem !important; font-weight:600 !important;
  letter-spacing:.08em !important; color:var(--muted) !important;
}

/* ---------- Buttons and fields (inline colours still win: Verify stays green) ---------- */
/* Only shape and weight: a page's coloured variants (a red Reject, a green Verify) keep
   their colours, and the default gradient picks up the new blue from --primary. */
.btn{ color:#fff; border-radius:8px; box-shadow:none; font-weight:600; }
.btn:hover{ filter:brightness(.95); }
.btn-ghost{ background:#fff; color:var(--ink); border:1px solid var(--line); }
.field label{ font-weight:600 !important; }
.field input, .field select, .field textarea{ border-width:1px !important; border-radius:8px !important; background:#fff; }
.field input:focus, .field select:focus, .field textarea:focus{
  border-color:var(--primary) !important; box-shadow:0 0 0 3px rgba(37,99,235,.15);
}
.msg{ font-weight:500 !important; border-radius:8px !important; }

/* ---------- Dashboard ---------- */
.chip{ font-weight:600 !important; background:#F1F5F9 !important; color:#334155 !important; border-color:#E2E8F0 !important; }
.chip.company{ background:#EFF6FF !important; color:#1D4ED8 !important; border-color:#DBEAFE !important; }
.dash-wx, .mobile-wx-banner{ font-weight:600 !important; border-radius:8px !important; box-shadow:none !important; }

.dash-stat{ text-align:left !important; padding:12px 14px !important; animation:none !important; }
.dash-stat:hover{ transform:none !important; box-shadow:var(--shadow) !important; }
.dash-stat b{ font-weight:600 !important; font-size:1.55rem !important; }
.dash-stat span{ font-weight:500 !important; text-transform:none !important; letter-spacing:0 !important; font-size:.78rem !important; }

.act-need{
  box-shadow:var(--shadow) !important; border:1px solid var(--line) !important;
  border-left:3px solid var(--primary) !important; border-radius:8px !important;
  padding:12px 14px !important;
}
.act-need:hover{ border-color:#CBD5E1 !important; }
.act-need .an-id{ font-weight:600 !important; }
.act-need .an-sub{ font-weight:500 !important; }
.act-need .an-go{ font-weight:600 !important; }
.act-need[onclick*="ptw.html"]{ border-left-color:var(--m-ptw) !important; }
.act-need[onclick*="ptw.html"] .an-ico{ --ico:var(--ico-ptw); color:var(--m-ptw); }
.act-need[onclick*="tbm.html"]{ border-left-color:var(--m-tbm) !important; }
.act-need[onclick*="tbm.html"] .an-ico{ --ico:var(--ico-tbm); color:var(--m-tbm); }
.act-need[onclick*="safety.html"]{ border-left-color:var(--m-safety) !important; }
.act-need[onclick*="safety.html"] .an-ico{ --ico:var(--ico-safety); color:var(--m-safety); }
.act-need[onclick*="defect.html"]{ border-left-color:var(--m-defect) !important; }
.act-need[onclick*="defect.html"] .an-ico{ --ico:var(--ico-defect); color:var(--m-defect); }
.act-need[onclick*="quality.html"]{ border-left-color:var(--m-quality) !important; }
.act-need[onclick*="quality.html"] .an-ico{ --ico:var(--ico-quality); color:var(--m-quality); }

.dash-table th{ background:var(--navy) !important; font-weight:600 !important; }

.kpi-row{ display:grid; grid-template-columns:repeat(4, 1fr); gap:10px; margin:4px 0 6px; }
.kpi-row:empty{ display:none; }
.kpi{ background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:12px 14px; box-shadow:var(--shadow); }
.kpi-n{ font-size:1.6rem; font-weight:600; line-height:1.1; }
.kpi-l{ font-size:.78rem; color:var(--muted); font-weight:500; margin-top:3px; }
@media (max-width:600px){ .kpi-row{ grid-template-columns:repeat(2, 1fr); } }
#dashModuleSelect{ font-weight:600 !important; font-size:1rem !important; }

/* ---------- Admin ---------- */
.tab{ font-weight:600 !important; }
.tab.current{ color:var(--primary) !important; border-color:var(--primary) !important; }

@media (prefers-reduced-motion: reduce){ *{ animation:none !important; transition:none !important; } }
