/* HSE Tracker Modern Theme
   Lightweight professional UI layer. Keeps existing markup and behavior intact. */
:root{
  --modern-ink:#102a43;
  --modern-ink-2:#243b53;
  --modern-muted:#627d98;
  --modern-brand:#0f766e;
  --modern-brand-2:#0b5f59;
  --modern-accent:#2563eb;
  --modern-bg:#f4f7fb;
  --modern-surface:#ffffff;
  --modern-surface-2:#f8fafc;
  --modern-line:#d9e2ec;
  --modern-success:#15803d;
  --modern-danger:#b42318;
  --modern-radius:16px;
  --modern-shadow:0 8px 24px rgba(16,42,67,.07);
  --modern-shadow-lg:0 18px 45px rgba(16,42,67,.13);
}

html[data-theme="brand"] body{
  background:var(--modern-bg)!important;
  background-image:none!important;
  color:var(--modern-ink)!important;
  font-size:13px;
}
html[data-theme="brand"] .bg-blob{display:none!important;}
html[data-theme="brand"] *,html[data-theme="brand"] *::before,html[data-theme="brand"] *::after{
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}
html[data-theme="brand"] .wrap{max-width:1180px;padding:18px 16px 34px;}

/* Header */
html[data-theme="brand"] header{
  background:var(--modern-surface)!important;
  border:1px solid var(--modern-line)!important;
  border-radius:var(--modern-radius)!important;
  box-shadow:var(--modern-shadow)!important;
  position:relative;
  overflow:hidden;
}
html[data-theme="brand"] header::before{
  height:3px!important;
  background:linear-gradient(90deg,var(--modern-brand),var(--modern-accent))!important;
  border-radius:0!important;
}
html[data-theme="brand"] .brand h1{color:var(--modern-ink)!important;letter-spacing:-.2px;}
html[data-theme="brand"] .brand p{color:var(--modern-muted)!important;}
html[data-theme="brand"] .brand .logo,
html[data-theme="brand"] .login-box .lg-logo{
  box-shadow:0 4px 12px rgba(16,42,67,.08)!important;
  border:1px solid var(--modern-line)!important;
}
html[data-theme="brand"] .who{
  background:#e7f6f4!important;color:var(--modern-brand-2)!important;border:1px solid #b7e3de!important;
}

/* Login */
html[data-theme="brand"] #loginScrim{
  background:linear-gradient(145deg,#eef7f7,#f4f7fb 55%,#edf3ff)!important;
}
html[data-theme="brand"] .login-box{
  background:var(--modern-surface)!important;
  border:1px solid var(--modern-line)!important;
  border-radius:22px!important;
  box-shadow:var(--modern-shadow-lg)!important;
}
html[data-theme="brand"] .login-box h1{color:var(--modern-ink)!important;}
html[data-theme="brand"] .login-box .lg-sub{color:var(--modern-muted)!important;}

/* Surfaces and cards */
html[data-theme="brand"] .card,
html[data-theme="brand"] .staff-card,
html[data-theme="brand"] .empdlg-card,
html[data-theme="brand"] .stat-card,
html[data-theme="brand"] .action-card{
  background:var(--modern-surface)!important;
  border:1px solid var(--modern-line)!important;
  box-shadow:var(--modern-shadow)!important;
}
html[data-theme="brand"] .card{border-radius:var(--modern-radius)!important;}
html[data-theme="brand"] .card h2{color:var(--modern-ink)!important;}
html[data-theme="brand"] .card h2 .ic{background:#e7f6f4!important;color:var(--modern-brand)!important;}
html[data-theme="brand"] .stat-card,
html[data-theme="brand"] .stat{border-radius:14px!important;}
html[data-theme="brand"] .stat-card:hover,
html[data-theme="brand"] .stat:hover,
html[data-theme="brand"] .action-card:hover,
html[data-theme="brand"] .staff-card:hover{transform:translateY(-2px)!important;box-shadow:var(--modern-shadow-lg)!important;}
html[data-theme="brand"] .action-card.active{border-color:#7ccfc7!important;box-shadow:0 12px 30px rgba(15,118,110,.14)!important;}

/* Navigation */
html[data-theme="brand"] .tabs,
html[data-theme="brand"] .subtabs{
  gap:8px!important;
}
html[data-theme="brand"] .tabs .tab,
html[data-theme="brand"] .subtabs .subtab{
  background:var(--modern-surface)!important;
  color:var(--modern-muted)!important;
  border:1px solid var(--modern-line)!important;
  border-radius:12px!important;
  box-shadow:none!important;
  transition:background .16s ease,color .16s ease,border-color .16s ease!important;
}
html[data-theme="brand"] .tabs .tab:hover,
html[data-theme="brand"] .subtabs .subtab:hover{border-color:#9bc9c5!important;color:var(--modern-brand)!important;transform:none!important;}
html[data-theme="brand"] .tabs .tab.active,
html[data-theme="brand"] .subtabs .subtab.active{
  background:var(--modern-brand)!important;color:#fff!important;border-color:var(--modern-brand)!important;
  box-shadow:0 6px 16px rgba(15,118,110,.2)!important;
}

/* Controls */
html[data-theme="brand"] .btn,
html[data-theme="brand"] button,
html[data-theme="brand"] .gseg{
  font-family:inherit;
}
html[data-theme="brand"] .btn{
  border-radius:11px!important;
  border:1px solid var(--modern-line)!important;
  background:var(--modern-surface)!important;
  color:var(--modern-ink-2)!important;
  box-shadow:none!important;
}
html[data-theme="brand"] .btn:hover{border-color:#8cc9c3!important;color:var(--modern-brand-2)!important;transform:translateY(-1px)!important;}
html[data-theme="brand"] .btn-acc,
html[data-theme="brand"] .btn-green{
  background:var(--modern-brand)!important;color:#fff!important;border-color:var(--modern-brand)!important;
}
html[data-theme="brand"] .btn-red{color:var(--modern-danger)!important;}
html[data-theme="brand"] input,
html[data-theme="brand"] select,
html[data-theme="brand"] textarea{
  background:var(--modern-surface)!important;
  color:var(--modern-ink)!important;
  border:1px solid var(--modern-line)!important;
  border-radius:11px!important;
  box-shadow:none!important;
}
html[data-theme="brand"] input:focus,
html[data-theme="brand"] select:focus,
html[data-theme="brand"] textarea:focus{
  border-color:var(--modern-brand)!important;
  box-shadow:0 0 0 3px rgba(15,118,110,.13)!important;
}

/* Tables and data */
html[data-theme="brand"] table{background:var(--modern-surface)!important;border:1px solid var(--modern-line)!important;border-radius:12px!important;}
html[data-theme="brand"] th{background:#eef6f6!important;color:var(--modern-ink-2)!important;border-bottom:1px solid #c9dedc!important;}
html[data-theme="brand"] td{border-bottom:1px solid #e8eef3!important;color:var(--modern-ink-2)!important;}
html[data-theme="brand"] tr:hover td{background:#f2faf9!important;}
html[data-theme="brand"] .dash-box,
html[data-theme="brand"] details.coll,
html[data-theme="brand"] .grp-seg{background:var(--modern-surface-2)!important;border-color:var(--modern-line)!important;}
html[data-theme="brand"] .dash-bars .b{background:linear-gradient(180deg,var(--modern-accent),var(--modern-brand))!important;}
html[data-theme="brand"] .gseg.active{background:var(--modern-brand)!important;box-shadow:none!important;}

/* Search, alerts and drawer */
html[data-theme="brand"] .global-search input{background:var(--modern-surface)!important;border:1px solid var(--modern-line)!important;box-shadow:none!important;}
html[data-theme="brand"] .gs-results{background:var(--modern-surface)!important;border:1px solid var(--modern-line)!important;box-shadow:var(--modern-shadow-lg)!important;}
html[data-theme="brand"] .gs-item:hover,
html[data-theme="brand"] .gs-item:focus-visible{background:#eef8f7!important;}
html[data-theme="brand"] #settingsDrawer{background:var(--modern-surface)!important;}
html[data-theme="brand"] #settingsDrawer .dr-head{background:var(--modern-brand)!important;}
html[data-theme="brand"] .toast{background:var(--modern-ink)!important;border-radius:11px!important;}

/* Motion: light and respectful */
html[data-theme="brand"] .card,
html[data-theme="brand"] .stat,
html[data-theme="brand"] .staff-card{animation:none!important;}
@media(prefers-reduced-motion:reduce){
  html[data-theme="brand"] *,html[data-theme="brand"] *::before,html[data-theme="brand"] *::after{animation:none!important;transition:none!important;}
}
@media(max-width:640px){
  html[data-theme="brand"] .wrap{padding:12px 10px 24px;}
  html[data-theme="brand"] header{border-radius:14px!important;}
  html[data-theme="brand"] .card{padding:14px!important;border-radius:14px!important;}
  html[data-theme="brand"] .tabs{gap:6px!important;}
  html[data-theme="brand"] .tabs .tab{min-width:calc(50% - 3px)!important;}
}

/* Collapsible bottom shortcuts */
html[data-theme="brand"] .bottom-nav{
  position:fixed!important;
  right:16px!important;
  left:16px!important;
  bottom:16px!important;
  z-index:1200!important;
  display:flex!important;
  flex-wrap:nowrap!important;
  gap:8px!important;
  padding:10px!important;
  background:rgba(255,255,255,.96)!important;
  border:1px solid var(--modern-line)!important;
  border-radius:18px!important;
  box-shadow:0 14px 34px rgba(16,42,67,.16)!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  transition:transform .22s ease,opacity .22s ease!important;
}
html[data-theme="brand"] .bottom-nav .nav-item{
  flex:0 0 auto!important;
  min-width:78px!important;
  min-height:52px!important;
  border:1px solid transparent!important;
  border-radius:12px!important;
  background:transparent!important;
  color:var(--modern-muted)!important;
  white-space:nowrap!important;
}
html[data-theme="brand"] .bottom-nav .nav-item.active{
  background:#e7f6f4!important;
  border-color:#b7e3de!important;
  color:var(--modern-brand-2)!important;
}
html[data-theme="brand"] #bottomNavToggle{
  display:flex!important;
  position:fixed!important;
  right:22px!important;
  bottom:96px!important;
  z-index:1210!important;
  width:34px!important;
  height:34px!important;
  align-items:center!important;
  justify-content:center!important;
  border:1px solid var(--modern-line)!important;
  border-radius:50%!important;
  background:var(--modern-brand)!important;
  color:#fff!important;
  box-shadow:0 8px 20px rgba(15,118,110,.28)!important;
  cursor:pointer!important;
  font-size:17px!important;
  line-height:1!important;
}
html[data-theme="brand"] #bottomNavToggle:hover{transform:translateY(-1px)!important;}
html[data-theme="brand"] body.nav-collapsed .bottom-nav{
  transform:translateY(calc(100% + 34px))!important;
  opacity:.08!important;
  pointer-events:none!important;
}
html[data-theme="brand"] body.nav-collapsed #bottomNavToggle{bottom:16px!important;}
@media(max-width:640px){
  html[data-theme="brand"] .bottom-nav{right:10px!important;left:10px!important;bottom:10px!important;}
  html[data-theme="brand"] #bottomNavToggle{right:16px!important;bottom:88px!important;}
  html[data-theme="brand"] body.nav-collapsed #bottomNavToggle{bottom:10px!important;}
}

/* Bottom shortcuts removed from the visible interface */
html[data-theme="brand"] .bottom-nav,
html[data-theme="brand"] #bottomNavToggle{display:none!important;}