/* ── Umbrella PWA – Mobile-First Stylesheet ───────────────────────────────── */
:root {
  --navy: #0f172a;
  --navy-800: #1e293b;
  --teal: #0d9488;
  --teal-light: #14b8a6;
  --teal-glow: rgba(13, 148, 136, 0.15);
  --amber: #f59e0b;
  --amber-light: #fbbf24;
  --red: #ef4444;
  --orange: #f97316;
  --yellow: #eab308;
  --green: #22c55e;
  --blue: #3b82f6;
  --purple: #8b5cf6;
  --pink: #ec4899;
  --surface: #1e293b;
  --surface-2: #263548;
  --surface-3: #2d3f55;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.6);
  --topbar-h: 56px;
  --bottom-nav-h: 64px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ── Reset ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after {
  margin: 0; padding: 0; box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
html, body {
  height: 100%;
  /* Lock root scroll — the only scrollable element is .content-area */
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--navy);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button {
  background: none; border: none; cursor: pointer;
  color: inherit; font-family: inherit; font-size: inherit;
  -webkit-appearance: none; appearance: none;
}
input { -webkit-appearance: none; appearance: none; }

@keyframes umbrellaFloat {
  from { transform: translateY(0); }
  to { transform: translateY(-8px); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes spinOnce {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes typingPulse {
  0%, 80%, 100% { opacity: .2; transform: scale(.8); }
  40% { opacity: 1; transform: scale(1); }
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
@keyframes pulse-red {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}

/* ── App Shell ───────────────────────────────────────────────────────────────── */
#app {
  display: flex;
  flex-direction: column;
  /* Use small-viewport height so layout never extends under mobile browser chrome */
  height: 100svh;
  height: 100dvh;
  height: 100vh; /* legacy fallback */
  max-width: 100%;
  overflow: hidden;
  /* Prevent iOS rubber-band from shifting the whole shell */
  position: fixed;
  width: 100%;
  top: 0; left: 0;
}

/* ── Top Bar ─────────────────────────────────────────────────────────────────── */
.topbar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  height: var(--topbar-h);
  background: rgba(15, 23, 42, 0.97);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  /* Own compositing layer so topbar never causes shell reflow */
  will-change: transform;
  transform: translateZ(0);
}
.topbar-back {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: none;
  align-items: center; justify-content: center;
  color: var(--teal-light);
  font-size: 15px;
  background: var(--surface);
  border: 1px solid var(--border);
  flex-shrink: 0;
  transition: all .15s;
}
.topbar-back:active { background: var(--surface-2); }
.topbar-back.visible { display: flex; }
.topbar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 10px;
  transition: all .15s;
  flex-shrink: 0;
}
.topbar-logo:active { background: var(--surface); }
.logo-icon {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--teal), var(--teal-light));
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  box-shadow: 0 0 16px var(--teal-glow);
}
.logo-text {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 18px; font-weight: 800;
  background: linear-gradient(135deg, #f1f5f9, var(--teal-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.topbar-title, .topbar-page-title {
  font-size: 15px; font-weight: 700;
  color: var(--text);
  flex: 1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: none;
}
.topbar-title.visible, .topbar-page-title.visible { display: block; }
.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.loc-switch-btn, .loc-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 11px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 12px; font-weight: 600;
  color: var(--text-muted);
  max-width: 130px;
  overflow: hidden;
  transition: all .15s;
}
.loc-switch-btn:active, .loc-chip:active { background: var(--surface-2); color: var(--text); }
.loc-switch-btn i:first-child, .loc-chip i:first-child { color: var(--teal-light); font-size: 11px; flex-shrink: 0; }
.loc-switch-btn span, .loc-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif-btn, .icon-btn {
  position: relative;
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-size: 15px;
  flex-shrink: 0;
  transition: all .15s;
}
.notif-btn:active, .icon-btn:active { background: var(--surface-2); color: var(--text); }
/* icon-btn-sm for inline card actions */
.icon-btn-sm {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim);
  font-size: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  flex-shrink: 0;
  transition: all .15s;
}
.icon-btn-sm:active { color: var(--teal-light); background: var(--surface-3); }
.notif-dot {
  position: absolute;
  top: 7px; right: 7px;
  width: 8px; height: 8px;
  background: var(--red);
  border-radius: 50%;
  border: 2px solid var(--navy);
  display: none;
}
.notif-dot.show { display: block; animation: pulse-red 2s infinite; }

/* ── Layout ──────────────────────────────────────────────────────────────────── */
.main-wrapper {
  flex: 1;
  display: flex;
  overflow: hidden;
  /* Ensure wrapper never causes vertical overflow on the shell */
  min-height: 0;
}
.content-area {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 16px 0;
  /* Remove smooth scroll — causes visible movement on page switch */
  scroll-behavior: auto;
  -webkit-overflow-scrolling: touch;
  /* Prevent content area from influencing shell height */
  min-height: 0;
  /* GPU-accelerate scrolling layer to prevent jank */
  will-change: scroll-position;
  transform: translateZ(0);
}
.content-area::-webkit-scrollbar { width: 3px; }
.content-area::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 3px; }

/* ── Desktop Sidebar ─────────────────────────────────────────────────────────── */
.sidebar {
  width: 68px;
  flex-shrink: 0;
  background: rgba(15, 23, 42, 0.8);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0;
  gap: 4px;
}
.sidebar .nav-item {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3px;
  color: var(--text-dim);
  font-size: 17px;
  border: 1px solid transparent;
  transition: all .15s;
}
.sidebar .nav-item span { font-size: 8px; font-weight: 600; letter-spacing: .3px; }
.sidebar .nav-item:hover, .sidebar .nav-item:active {
  color: var(--text-muted);
  background: var(--surface);
}
.sidebar .nav-item.active {
  color: var(--teal-light);
  background: var(--teal-glow);
  border-color: rgba(13, 148, 136, 0.3);
}
.nav-spacer { flex: 1; }

/* ── Sidebar section label ───────────────────────────────────────────────────── */
.sidebar-section-label {
  width: 100%;
  max-width: 68px;
  padding: 8px 4px 2px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  pointer-events: none;
  user-select: none;
}

/* ── Bottom Nav (mobile) ─────────────────────────────────────────────────────── */
.bottom-nav {
  display: none;
  flex-shrink: 0;
  background: rgba(15, 23, 42, 0.98);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(20px);
  padding-bottom: var(--safe-bottom);
  /* Prevent bottom nav from triggering scroll/resize on the app shell */
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  /* Compositor layer — stops bottom nav repaints from jittering content */
  will-change: transform;
  transform: translateZ(0);
}
.bn-item {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3px;
  padding: 10px 4px;
  height: var(--bottom-nav-h);
  color: var(--text-dim);
  font-size: 18px;
  transition: all .15s;
  border-radius: 0;
  position: relative;
}
.bn-item span { font-size: 9px; font-weight: 600; letter-spacing: .3px; }
.bn-item::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 0; height: 2px;
  background: var(--teal-light);
  border-radius: 0 0 2px 2px;
  transition: width .2s;
}
.bn-item.active { color: var(--teal-light); }
.bn-item.active::before { width: 28px; }
.bn-item:active { background: rgba(255, 255, 255, 0.04); }

/* ── Pages ───────────────────────────────────────────────────────────────────── */
/* Pages: keep all in the layout but hide non-active ones.
   Using visibility+opacity instead of display:none prevents
   the full layout-reflow that causes mobile viewport jitter. */
.page {
  display: none;
  /* When hidden: out of paint but DO NOT change display on show –
     we re-show with display:block and a fast opacity fade only. */
}
.page.active {
  display: block;
  animation: fadeIn .15s ease;
  /* Promote to own compositor layer to avoid re-triggering
     any ancestor overflow/height recalculation */
  will-change: opacity;
}

/* ── Location Picker Card ────────────────────────────────────────────────────── */
.loc-picker-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px 14px;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}
.loc-picker-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--purple), var(--amber));
}
.loc-picker-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.loc-picker-label {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .8px;
  color: var(--text-muted);
}
.loc-count-badge {
  font-size: 11px; color: var(--text-dim);
  background: var(--surface-2);
  padding: 3px 10px;
  border-radius: 20px;
}
.umbrella-spin-btn {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 6px;
  padding: 10px;
  border-radius: 16px;
  margin: 0 auto 14px;
  width: fit-content;
  transition: transform .3s cubic-bezier(.34, 1.56, .64, 1);
}
.umbrella-spin-btn:active { transform: scale(0.95); }
.umbrella-spin-btn svg { display: block; }
.umbrella-spin-btn.spinning svg {
  animation: spinOnce .6s cubic-bezier(.34, 1.56, .64, 1) forwards;
}
.umbrella-hint-text {
  font-size: 10px; color: var(--text-dim);
  display: flex; align-items: center; gap: 4px;
}
.umbrella-hint-text::before {
  content: '\f01e';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: var(--teal-light);
  font-size: 9px;
}

/* Raindrops */
.raindrops-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.raindrop {
  display: flex; flex-direction: column;
  align-items: center; gap: 4px;
  padding: 6px;
  border-radius: 12px;
  opacity: .45;
  transition: all .25s;
  min-width: 52px;
  cursor: pointer;
}
.raindrop:active { background: var(--surface-2); transform: scale(0.95); }
.raindrop.active-drop { opacity: 1; }
.raindrop-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: white;
  border: 2px solid var(--border);
  box-shadow: var(--shadow);
  transition: all .25s;
}
.raindrop.active-drop .raindrop-avatar {
  border-color: var(--teal-light);
  box-shadow: 0 0 0 3px var(--teal-glow);
}
.raindrop-name {
  font-size: 10px; color: var(--text-dim); font-weight: 500;
  max-width: 56px; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.raindrop.active-drop .raindrop-name { color: var(--teal-light); }
.raindrop-inactive-tag {
  font-size: 8px; color: var(--text-dim);
  background: var(--surface-3);
  padding: 1px 5px; border-radius: 20px;
}

/* Dots */
.loc-dots-row {
  display: flex; gap: 7px;
  justify-content: center; flex-wrap: wrap;
}
.loc-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--surface-3);
  border: 2px solid transparent;
  transition: all .25s;
  cursor: pointer;
}
.loc-dot.active {
  background: var(--teal);
  border-color: var(--teal-light);
  transform: scale(1.35);
}
.loc-dot.inactive-loc { background: var(--text-dim); opacity: .35; }

/* ── Location Header Card ────────────────────────────────────────────────────── */
.loc-header-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}
.loc-header-card::after {
  content: '';
  position: absolute;
  top: -40px; right: -30px;
  width: 100px; height: 100px;
  background: var(--teal-glow);
  border-radius: 50%;
  pointer-events: none;
}
.loc-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 19px; font-weight: 800; line-height: 1.2;
}
.loc-subtitle {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 8px; margin-top: 4px;
}
.loc-nickname {
  font-size: 12px; color: var(--teal-light); font-weight: 600;
}
.loc-tag {
  font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 20px;
  background: var(--teal-glow);
  border: 1px solid rgba(13, 148, 136, .3);
  color: var(--teal-light);
}
.loc-tag-dim {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text-dim);
}
.loc-address {
  font-size: 12px; color: var(--text-muted);
  margin-top: 8px;
  display: flex; align-items: center; gap: 6px;
}
.loc-phone {
  font-size: 12px; color: var(--text-muted);
  margin-top: 4px;
  display: flex; align-items: center; gap: 6px;
}
.loc-badges {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 12px;
}
.status-badge {
  padding: 4px 11px; border-radius: 20px;
  font-size: 10px; font-weight: 700;
  letter-spacing: .5px; text-transform: uppercase; white-space: nowrap;
}
.badge-active { background: rgba(34,197,94,.12); color: #4ade80; border: 1px solid rgba(34,197,94,.25); }
.badge-inactive { background: rgba(100,116,139,.12); color: var(--text-dim); border: 1px solid var(--border); }
.badge-understaffed { background: rgba(239,68,68,.12); color: #f87171; border: 1px solid rgba(239,68,68,.25); }
.badge-overstaffed { background: rgba(245,158,11,.12); color: var(--amber-light); border: 1px solid rgba(245,158,11,.25); }
.badge-fully-staffed { background: rgba(34,197,94,.12); color: #4ade80; border: 1px solid rgba(34,197,94,.25); }

/* Stat row */
.loc-stats-row {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px; margin-top: 14px;
}
.stat-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 8px;
  text-align: center;
  cursor: pointer;
  transition: all .15s;
  position: relative;
}
.stat-card:active { background: var(--surface-3); transform: scale(0.97); }
.stat-card::after {
  content: '\f054';
  font-family: 'Font Awesome 6 Free'; font-weight: 900;
  position: absolute; right: 8px; top: 50%;
  transform: translateY(-50%);
  font-size: 9px; color: var(--text-dim);
}
.stat-num {
  font-size: 26px; font-weight: 800; line-height: 1;
}
.stat-label {
  font-size: 9px; color: var(--text-muted); font-weight: 600;
  margin-top: 4px; text-transform: uppercase; letter-spacing: .5px;
}
.stat-red { color: var(--red); }
.stat-orange { color: var(--orange); }
.stat-green { color: #4ade80; }

/* ── Overview Grid ───────────────────────────────────────────────────────────── */
.overview-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 10px; margin-bottom: 20px;
}
.ov-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  cursor: pointer;
  transition: all .15s;
  position: relative;
  overflow: hidden;
}
.ov-card:active { background: var(--surface-2); transform: scale(0.97); }
.ov-card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.ov-card-icon { font-size: 20px; }
.ov-card-arrow {
  width: 24px; height: 24px;
  border-radius: 8px;
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: var(--text-dim);
}
.ov-num {
  font-size: 32px; font-weight: 800; line-height: 1;
}
.ov-label {
  font-size: 11px; color: var(--text-muted); font-weight: 500;
  margin-top: 4px;
}
.ov-hint {
  font-size: 10px; color: var(--text-dim);
  margin-top: 6px;
  display: flex; align-items: center; gap: 4px;
}
.ov-hint::after {
  content: '\f054';
  font-family: 'Font Awesome 6 Free'; font-weight: 900;
  font-size: 8px;
}
.ov-red { color: var(--red); }
.ov-orange { color: var(--orange); }
.ov-teal { color: var(--teal-light); }
.ov-amber { color: var(--amber-light); }

/* ── Section Heads ───────────────────────────────────────────────────────────── */
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px; margin-top: 2px;
}
.section-title {
  font-size: 15px; font-weight: 700;
  display: flex; align-items: center; gap: 8px;
}
.section-title i { color: var(--teal-light); font-size: 13px; }
.section-btn {
  font-size: 11px; font-weight: 600; color: var(--teal-light);
  padding: 6px 12px;
  border-radius: 20px;
  background: var(--teal-glow);
  border: 1px solid rgba(13, 148, 136, .3);
  transition: all .15s;
}
.section-btn:active { background: rgba(13, 148, 136, .25); }

/* ── Concern Cards ───────────────────────────────────────────────────────────── */
.concern-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid;
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all .15s;
}
.concern-card:active { background: var(--surface-2); }
.concern-red    { border-left-color: var(--red); }
.concern-orange { border-left-color: var(--orange); }
.concern-yellow { border-left-color: var(--yellow); }
.concern-green  { border-left-color: var(--green); }
.concern-blue   { border-left-color: var(--blue); }
.concern-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px;
}
.concern-badge {
  font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: .4px;
}
.concern-badge-red    { background: rgba(239,68,68,.18); color: #f87171; }
.concern-badge-orange { background: rgba(249,115,22,.18); color: #fb923c; }
.concern-badge-yellow { background: rgba(234,179,8,.18); color: #fbbf24; }
.concern-badge-green  { background: rgba(34,197,94,.18); color: #4ade80; }
.concern-badge-blue   { background: rgba(59,130,246,.18); color: #60a5fa; }
.concern-row2 {
  display: flex; align-items: center; gap: 8px;
}
.concern-cat {
  font-size: 10px; color: var(--text-dim);
  background: var(--surface-2);
  padding: 1px 7px; border-radius: 20px;
}
.concern-chevron {
  font-size: 11px; color: var(--text-dim);
  transition: transform .2s;
}
.concern-chevron.open { transform: rotate(180deg); }
.expand-icon { font-size: 11px; color: var(--text-dim); transition: transform .2s; }
.expand-icon.open { transform: rotate(180deg); }
.concern-title {
  font-size: 14px; font-weight: 600; line-height: 1.4;
  margin-bottom: 0;
}
.concern-body {
  display: none;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  animation: fadeIn .2s ease;
}
.concern-body.open { display: block; }
.concern-detail { font-size: 13px; color: var(--text-muted); line-height: 1.6; }
.concern-meta {
  display: flex; align-items: center; gap: 10px;
  margin-top: 8px; font-size: 11px; color: var(--text-dim);
}
.concern-actions {
  display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap;
}
.concern-btn {
  padding: 8px 14px; border-radius: 20px;
  font-size: 12px; font-weight: 600;
  display: flex; align-items: center; gap: 6px;
  transition: all .15s;
  cursor: pointer;
}
.concern-btn:active { transform: scale(0.97); }
.concern-btn-primary {
  background: var(--teal);
  color: white;
}
.concern-btn-primary:active { background: var(--teal-light); }
.concern-btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.concern-btn-ghost:active { background: var(--surface-2); }

/* ── Special Notes ───────────────────────────────────────────────────────────── */
.note-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px; margin-bottom: 10px;
}
.note-card { display: flex; align-items: flex-start; gap: 10px; }
.note-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.note-body { flex: 1; min-width: 0; }
.note-label {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .7px;
  color: var(--text-dim); margin-bottom: 4px;
}
.note-val { font-size: 13px; font-weight: 600; line-height: 1.5; }
.note-content { font-size: 13px; line-height: 1.6; }

/* ── Checklists ──────────────────────────────────────────────────────────────── */
.checklist-tabs {
  display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap;
}
.checklist-tab {
  padding: 8px 16px; border-radius: 20px;
  font-size: 13px; font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all .15s;
}
.checklist-tab.active {
  background: var(--teal-glow);
  border-color: rgba(13, 148, 136, .4);
  color: var(--teal-light);
}
.checklist-tab:active { background: var(--surface-2); }
.progress-wrap {
  background: var(--surface-2);
  border-radius: 20px; height: 8px;
  margin-bottom: 6px; overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--teal-light));
  border-radius: 20px;
  transition: width .4s ease;
}
.progress-label {
  font-size: 12px; color: var(--text-muted); margin-bottom: 14px;
}
.checklist-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all .15s;
  min-height: 52px;
}
.checklist-item:active { background: var(--surface-2); }
.checklist-item.done { opacity: .55; }
.check-circle {
  width: 24px; height: 24px; flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.check-circle.checked {
  background: var(--teal);
  border-color: var(--teal);
}
.check-circle.checked::after {
  content: '';
  display: block;
  width: 5px; height: 9px;
  border: 2px solid white;
  border-top: none; border-left: none;
  transform: rotate(45deg);
  margin-top: -2px;
}
.check-text { font-size: 13px; font-weight: 500; flex: 1; line-height: 1.4; }
.check-text.done { text-decoration: line-through; color: var(--text-dim); }
.daily-day-label {
  font-size: 11px; font-weight: 700;
  color: var(--teal-light);
  text-transform: uppercase; letter-spacing: .8px;
  margin: 14px 0 8px;
}
.daily-day-label.today-label { color: var(--amber-light); }

/* ── Inventory ───────────────────────────────────────────────────────────────── */
.inv-section-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .7px; color: var(--text-dim);
  margin: 14px 0 8px;
}
.inv-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px; margin-bottom: 8px;
}
.inv-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 8px;
}
.inv-name-wrap { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.inv-name { font-size: 14px; font-weight: 600; flex: 1; }
.inv-cat {
  font-size: 9px; padding: 2px 7px;
  border-radius: 20px; font-weight: 700; flex-shrink: 0;
}
.cat-chemicals { background: rgba(239,68,68,.12); color: #f87171; }
.cat-cleaning  { background: rgba(59,130,246,.12); color: #60a5fa; }
.cat-safety    { background: rgba(34,197,94,.12);  color: #4ade80; }
.cat-food      { background: rgba(245,158,11,.12); color: var(--amber-light); }
.inv-status {
  font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 20px; flex-shrink: 0;
}
.status-ok  { background: rgba(34,197,94,.12);  color: #4ade80; }
.status-low { background: rgba(249,115,22,.12);  color: #fb923c; }
.status-out { background: rgba(239,68,68,.18);   color: #f87171; }
.inv-bar-wrap {
  background: var(--surface-2);
  border-radius: 20px; height: 7px;
  overflow: hidden; margin-bottom: 8px;
}
.inv-bar-fill {
  height: 100%; border-radius: 20px;
  transition: width .5s ease;
}
.bar-ok  { background: linear-gradient(90deg, var(--teal), #4ade80); }
.bar-low { background: linear-gradient(90deg, var(--orange), var(--amber)); }
.bar-out { background: var(--red); width: 100% !important; }
.inv-bottom {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--text-muted);
}
.out-text { color: var(--red); font-weight: 700; }
.inv-action-btn {
  padding: 6px 12px; border-radius: 20px;
  font-size: 11px; font-weight: 600;
  background: rgba(249, 115, 22, .12);
  border: 1px solid rgba(249, 115, 22, .25);
  color: #fb923c;
  display: flex; align-items: center; gap: 5px;
  transition: all .15s;
}
.inv-action-btn:active { background: rgba(249, 115, 22, .22); }

/* ── Team ────────────────────────────────────────────────────────────────────── */
.team-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all .15s;
  min-height: 68px;
}
.team-card:active { background: var(--surface-2); }
.team-avatar, .team-av {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: white;
  flex-shrink: 0;
}
.team-info { flex: 1; min-width: 0; }
.team-name { font-size: 14px; font-weight: 600; }
.team-role { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.team-right { text-align: right; flex-shrink: 0; }
.team-shoutouts, .shoutout-count {
  font-size: 12px; font-weight: 700; color: var(--amber-light);
  display: flex; align-items: center; gap: 4px; justify-content: flex-end;
}
.team-attendance { font-size: 11px; margin-top: 2px; }
.team-chevron { color: var(--text-dim); font-size: 12px; flex-shrink: 0; }

/* ── Shoutouts ───────────────────────────────────────────────────────────────── */
.shoutout-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px; margin-bottom: 10px;
  position: relative; overflow: hidden;
}
.shoutout-card::before {
  content: '\2605';
  position: absolute; right: 14px; top: 10px;
  font-size: 22px; opacity: .12; pointer-events: none;
}
.shoutout-from-to { font-size: 12px; color: var(--text-dim); margin-bottom: 6px; }
.shoutout-name { color: var(--teal-light); font-weight: 600; }
.shoutout-msg {
  font-size: 14px; font-weight: 500;
  line-height: 1.5; font-style: italic;
}
.shoutout-footer {
  display: flex; align-items: center; gap: 12px;
  margin-top: 10px; font-size: 11px; color: var(--text-dim); flex-wrap: wrap;
}
.shoutout-like-btn {
  margin-left: auto;
  font-size: 11px; font-weight: 600;
  padding: 5px 12px; border-radius: 20px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: flex; align-items: center; gap: 5px;
  transition: all .15s;
}
.shoutout-like-btn:active { background: rgba(239, 68, 68, .1); color: #f87171; border-color: rgba(239,68,68,.3); }

/* ── Shopping ────────────────────────────────────────────────────────────────── */
.buyer-group-header {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 6px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; font-weight: 700;
}
.buyer-urgent {
  font-size: 10px; font-weight: 700;
  background: rgba(239,68,68,.15);
  color: #f87171;
  padding: 2px 8px; border-radius: 20px;
}
.shopping-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px; margin-bottom: 7px;
  display: flex; align-items: center; gap: 12px;
}
.shop-urgency-dot {
  width: 10px; height: 10px;
  border-radius: 50%; flex-shrink: 0;
}
.shop-high   { background: var(--red); }
.shop-medium { background: var(--orange); }
.shop-low    { background: var(--green); }
.shop-info { flex: 1; min-width: 0; }
.shop-name { font-size: 13px; font-weight: 600; }
.shop-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.shop-qty { font-size: 13px; font-weight: 700; color: var(--teal-light); white-space: nowrap; }
.shop-check-btn {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--text-dim);
  flex-shrink: 0;
  transition: all .15s;
}
.shop-check-btn:active { background: var(--surface-3); }

/* ── Alerts ──────────────────────────────────────────────────────────────────── */
/* reuses concern-card styles */

/* ── Empty States ────────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 36px 20px;
  color: var(--text-dim);
}
.empty-icon { font-size: 36px; margin-bottom: 10px; }
.empty-text { font-size: 14px; font-weight: 500; }

/* ── Location Sheet ──────────────────────────────────────────────────────────── */
.sheet-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.sheet-overlay.active {
  opacity: 1;
  pointer-events: all;
}
.location-sheet {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--navy-800);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 20px 20px 0 0;
  z-index: 301;
  transform: translateY(100%);
  transition: transform .35s cubic-bezier(.34, 1.1, .64, 1);
  max-height: 82dvh;
  display: flex; flex-direction: column;
  padding-bottom: var(--safe-bottom);
}
.location-sheet.open { transform: translateY(0); }
.sheet-handle {
  width: 36px; height: 4px;
  background: var(--surface-3);
  border-radius: 2px;
  margin: 10px auto 6px;
  flex-shrink: 0;
}
.sheet-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 18px 14px;
  flex-shrink: 0;
}
.sheet-title {
  font-size: 16px; font-weight: 700;
}
.sheet-close-btn {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--text-muted);
  transition: all .15s;
}
.sheet-close-btn:active { background: var(--surface-2); }
.sheet-list {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 14px 14px;
}
.sheet-loc-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all .15s;
  background: var(--surface);
  min-height: 68px;
}
.sheet-loc-item:active { background: var(--surface-2); transform: scale(0.99); }
.sheet-loc-item.active-loc {
  border-color: rgba(13, 148, 136, .4);
  background: var(--teal-glow);
}
.sheet-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: white;
  flex-shrink: 0;
}
.sheet-loc-info { flex: 1; min-width: 0; }
.sheet-loc-name { font-size: 14px; font-weight: 700; }
.sheet-loc-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.sheet-badges { display: flex; flex-wrap: wrap; gap: 4px; }
.sheet-badge {
  font-size: 9px; font-weight: 700;
  padding: 2px 7px; border-radius: 20px;
}
.sheet-badge-red    { background: rgba(239,68,68,.15); color: #f87171; }
.sheet-badge-orange { background: rgba(249,115,22,.15); color: #fb923c; }
.sheet-badge-teal   { background: var(--teal-glow); color: var(--teal-light); border: 1px solid rgba(13,148,136,.3); }

/* ── Aria Panel ──────────────────────────────────────────────────────────────── */
.aria-fab {
  position: fixed;
  bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 12px);
  right: 16px;
  width: 52px; height: 52px;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--teal), var(--purple));
  border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: white;
  box-shadow: 0 4px 20px rgba(13, 148, 136, .5);
  z-index: 200;
  transition: all .25s;
}
.aria-fab:active { transform: scale(0.92); }
.aria-panel {
  position: fixed;
  bottom: 0; right: 0;
  width: min(400px, 100vw);
  height: min(540px, 82dvh);
  background: var(--navy-800);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 20px 20px 0 0;
  display: flex; flex-direction: column;
  z-index: 250;
  transform: translateY(100%);
  transition: transform .35s cubic-bezier(.34, 1.1, .64, 1);
  box-shadow: var(--shadow-lg);
}
.aria-panel.open { transform: translateY(0); }
.aria-header {
  padding: 12px 16px 14px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
  flex-shrink: 0;
}
.aria-avatar {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--teal), var(--purple));
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: white;
  box-shadow: 0 0 16px var(--teal-glow);
}
.aria-title { font-size: 15px; font-weight: 700; }
.aria-subtitle { font-size: 11px; color: var(--teal-light); font-weight: 600; }
.aria-close-btn {
  margin-left: auto;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--text-muted);
  transition: all .15s;
}
.aria-close-btn:active { background: var(--surface-2); }
.aria-messages {
  flex: 1; overflow-y: auto;
  padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
  -webkit-overflow-scrolling: touch;
}
.msg-bubble {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px; line-height: 1.6;
}
.msg-user {
  background: var(--teal); color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.msg-aria {
  background: var(--surface-2); color: var(--text);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  border: 1px solid var(--border);
}
.aria-chips {
  display: flex; flex-wrap: wrap; gap: 6px;
  align-self: flex-start;
}
.aria-chip {
  font-size: 11px; padding: 6px 12px;
  border-radius: 20px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all .15s; white-space: nowrap;
}
.aria-chip:active { background: var(--teal-glow); border-color: rgba(13,148,136,.4); color: var(--teal-light); }
.aria-typing { display: flex; gap: 4px; align-items: center; padding: 8px 12px; }
.typing-dot {
  width: 6px; height: 6px;
  background: var(--text-dim); border-radius: 50%;
  animation: typingPulse 1.2s infinite;
}
.typing-dot:nth-child(2) { animation-delay: .2s; }
.typing-dot:nth-child(3) { animation-delay: .4s; }
.aria-input-row {
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  display: flex; gap: 8px; flex-shrink: 0;
  padding-bottom: max(10px, var(--safe-bottom));
}
.aria-input {
  flex: 1;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--text);
  font-size: 16px; /* prevents iOS zoom */
  outline: none;
  font-family: inherit;
}
.aria-input:focus { border-color: var(--teal); }
.aria-send-btn {
  width: 44px; height: 44px;
  background: var(--teal);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: white;
  flex-shrink: 0;
  transition: all .15s;
}
.aria-send-btn:active { background: var(--teal-light); transform: scale(0.95); }

/* ═══════════════════════════════════════════════════════════════════════════════
   MISSING BUTTON / UTILITY CLASSES (app.js uses these names)
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Primary button */
.primary-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--teal); color: white;
  border: none; border-radius: 10px;
  padding: 8px 14px; font-size: 12px; font-weight: 700;
  cursor: pointer; white-space: nowrap;
  transition: all .15s; flex-shrink: 0;
}
.primary-btn:active { background: var(--teal-light); transform: scale(0.97); }

/* Ghost button */
.ghost-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; color: var(--text-muted);
  border: 1px solid var(--border); border-radius: 10px;
  padding: 8px 14px; font-size: 12px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  transition: all .15s; flex-shrink: 0;
}
.ghost-btn:active { background: var(--surface-2); color: var(--text); }

/* Small button variants */
.btn-sm {
  display: inline-flex; align-items: center; gap: 5px;
  border-radius: 8px;
  padding: 6px 11px; font-size: 11px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  transition: all .15s; flex-shrink: 0;
  border: 1px solid var(--border);
}
.btn-sm:active { transform: scale(0.97); }
.btn-teal { background: var(--teal-glow); color: var(--teal-light); border-color: rgba(13,148,136,.35); }
.btn-teal:active { background: rgba(13,148,136,.25); }
.btn-ghost { background: var(--surface-2); color: var(--text-muted); }
.btn-ghost:active { background: var(--surface-3); color: var(--text); }
.btn-orange { background: rgba(249,115,22,.12); color: #fb923c; border-color: rgba(249,115,22,.3); }
.btn-orange:active { background: rgba(249,115,22,.22); }
.btn-red { background: rgba(239,68,68,.12); color: #f87171; border-color: rgba(239,68,68,.3); }
.btn-red:active { background: rgba(239,68,68,.22); }
.btn-purple { background: rgba(139,92,246,.12); color: #a78bfa; border-color: rgba(139,92,246,.3); }

/* Full-width add button */
.add-btn-full {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  width: 100%;
  background: var(--surface);
  border: 1px dashed rgba(13,148,136,.4);
  border-radius: var(--radius-sm);
  padding: 12px; font-size: 13px; font-weight: 600;
  color: var(--teal-light);
  cursor: pointer; margin-top: 8px;
  transition: all .15s;
}
.add-btn-full:active { background: var(--teal-glow); }

/* Filter chips */
.filter-row {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.filter-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 13px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 12px; font-weight: 600; color: var(--text-muted);
  cursor: pointer; transition: all .15s;
}
.filter-chip.active {
  background: var(--teal-glow);
  border-color: rgba(13,148,136,.4);
  color: var(--teal-light);
}
.filter-chip:active { background: var(--surface-2); }
.urgency-dot {
  width: 8px; height: 8px; border-radius: 50%; display: inline-block;
}
.urgency-dot.red    { background: var(--red); }
.urgency-dot.orange { background: var(--orange); }
.urgency-dot.yellow { background: var(--yellow); }
.urgency-dot.green  { background: var(--green); }

/* Tab row */
.tab-row {
  display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap;
}
.tab {
  padding: 8px 16px; border-radius: 20px;
  font-size: 13px; font-weight: 600;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-muted); cursor: pointer; transition: all .15s;
}
.tab.active {
  background: var(--teal-glow); border-color: rgba(13,148,136,.4);
  color: var(--teal-light);
}
.tab:active { background: var(--surface-2); }

/* Section head + title */
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px; flex-wrap: wrap; gap: 6px;
}
.section-title {
  font-size: 14px; font-weight: 700;
  display: flex; align-items: center; gap: 7px;
}
.section-title i { color: var(--teal-light); font-size: 13px; }
.section-label {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .8px;
  color: var(--text-muted);
}
.section-btn {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600; color: var(--teal-light);
  padding: 5px 10px; border-radius: 8px;
  background: var(--teal-glow); border: 1px solid rgba(13,148,136,.3);
  cursor: pointer; transition: all .15s;
}
.section-btn:active { background: rgba(13,148,136,.25); }
.badge-count {
  font-size: 11px; color: var(--text-dim);
  background: var(--surface-2); padding: 3px 10px; border-radius: 20px;
}

/* ── Status Badges ───────────────────────────────────────────────────────────── */
.status-badge {
  font-size: 10px; font-weight: 700;
  padding: 3px 9px; border-radius: 20px; white-space: nowrap;
}
.badge-active    { background: rgba(34,197,94,.15);  color: #4ade80; }
.badge-inactive  { background: rgba(100,116,139,.15); color: var(--text-dim); }
.badge-understaffed { background: rgba(239,68,68,.15); color: #f87171; }
.badge-overstaffed  { background: rgba(249,115,22,.15); color: #fb923c; }
.badge-fully-staffed { background: rgba(34,197,94,.15); color: #4ade80; }
.badge-open  { background: rgba(249,115,22,.15); color: #fb923c; }
.badge-blue  { background: rgba(59,130,246,.15); color: #60a5fa; }
.badge-purple { background: rgba(139,92,246,.15); color: #a78bfa; }
.badge-teal  { background: var(--teal-glow); color: var(--teal-light); }
.badge-orange { background: rgba(249,115,22,.15); color: #fb923c; }
.badge-gold  { background: rgba(234,179,8,.18); color: #fbbf24; border: 1px solid rgba(234,179,8,.35); }

/* Role badges */
.role-badge {
  font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 20px;
}

/* Category pill */
.cat-tag, .cat-pill {
  font-size: 10px; padding: 2px 8px;
  border-radius: 20px; font-weight: 700; flex-shrink: 0;
}
.cat-chemicals,.cat-chemicals2 { background: rgba(239,68,68,.12); color: #f87171; }
.cat-cleaning   { background: rgba(59,130,246,.12); color: #60a5fa; }
.cat-safety     { background: rgba(34,197,94,.12); color: #4ade80; }
.cat-food       { background: rgba(245,158,11,.12); color: var(--amber-light); }
.cat-other      { background: var(--surface-2); color: var(--text-dim); }

/* Inventory status badge (used in inv-item) */
.inv-status-badge { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 20px; }

/* Location tag (used in concern cards, maintenance, incidents) */
.loc-mini-tag, .loc-alert-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 600;
  background: var(--surface-2); color: var(--text-dim);
  padding: 2px 8px; border-radius: 20px;
}
.loc-tag { font-size: 10px; font-weight: 600; background: rgba(59,130,246,.12); color: #60a5fa; padding: 2px 7px; border-radius: 20px; }
.loc-tag-off { background: rgba(100,116,139,.12); color: var(--text-dim); }

/* ── Modal ───────────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 400;
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal {
  position: fixed; left: 50%; top: 50%;
  transform: translate(-50%, -50%) scale(.96);
  width: min(92vw, 520px);
  max-height: 88dvh;
  background: var(--navy-800);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  z-index: 401;
  opacity: 0; pointer-events: none;
  transition: all .25s cubic-bezier(.34, 1.1, .64, 1);
  display: flex; flex-direction: column;
}
.modal.open {
  opacity: 1; pointer-events: all;
  transform: translate(-50%, -50%) scale(1);
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 18px 14px; flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}
.modal-title {
  font-size: 16px; font-weight: 700;
}
.modal-body {
  flex: 1; overflow-y: auto;
  padding: 16px 18px;
  -webkit-overflow-scrolling: touch;
}
.modal-footer {
  display: flex; gap: 8px; justify-content: flex-end;
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

/* ── Forms ───────────────────────────────────────────────────────────────────── */
.form-fields { display: flex; flex-direction: column; gap: 12px; }
.form-row { display: flex; flex-direction: column; gap: 5px; }
.form-label {
  font-size: 12px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .5px;
}
.req { color: var(--red); }
.form-input {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 13px;
  color: var(--text); font-family: inherit; font-size: 14px;
  width: 100%; outline: none;
  transition: border-color .15s;
  -webkit-appearance: none;
}
.form-input:focus { border-color: var(--teal); }
.form-textarea { min-height: 90px; resize: vertical; }
.checkbox-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: var(--teal); cursor: pointer;
}

/* ── Toast ───────────────────────────────────────────────────────────────────── */
.toast-container {
  position: fixed; bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 10px);
  left: 50%; transform: translateX(-50%);
  z-index: 500; display: flex; flex-direction: column; gap: 6px;
  width: min(92vw, 380px); pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 9px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13px; font-weight: 600;
  background: var(--navy-800);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  transform: translateY(12px); opacity: 0;
  transition: all .3s cubic-bezier(.34, 1.2, .64, 1);
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast-success { border-left: 3px solid var(--teal); }
.toast-success i { color: var(--teal); }
.toast-error { border-left: 3px solid var(--red); }
.toast-error i { color: var(--red); }
.toast-warning { border-left: 3px solid var(--amber); }
.toast-warning i { color: var(--amber); }

/* ── Boot Loader ─────────────────────────────────────────────────────────────── */
.boot-loader {
  position: fixed; inset: 0;
  background: var(--navy);
  z-index: 9999;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px;
  transition: opacity .4s;
}
.boot-icon { font-size: 48px; }
.boot-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 28px; font-weight: 800;
  background: linear-gradient(135deg, #f1f5f9, var(--teal-light));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.boot-sub { font-size: 13px; color: var(--text-dim); }

/* ── Two-col grid ────────────────────────────────────────────────────────────── */
.two-col-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin-bottom: 16px;
}
@media (max-width: 640px) { .two-col-grid { grid-template-columns: 1fr; } }

/* ── Maintenance cards ───────────────────────────────────────────────────────── */
.mnt-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px; margin-bottom: 10px;
}
.mnt-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 8px; margin-bottom: 8px; flex-wrap: wrap;
}
.mnt-urgency-row { display: flex; gap: 6px; flex-wrap: wrap; }
.urgency-pill {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700;
  padding: 4px 10px; border-radius: 20px;
}
.urgency-pill.red    { background: rgba(239,68,68,.15); color: #f87171; }
.urgency-pill.orange { background: rgba(249,115,22,.15); color: #fb923c; }
.urgency-pill.yellow { background: rgba(234,179,8,.15); color: #fbbf24; }
.mnt-title { font-size: 14px; font-weight: 700; margin-bottom: 5px; }
.mnt-desc { font-size: 13px; color: var(--text-muted); line-height: 1.5; margin-bottom: 10px; }
.mnt-footer {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 11px; color: var(--text-dim);
}
.mnt-assigned {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--teal-glow); color: var(--teal-light);
  border-radius: 20px; padding: 3px 10px; font-size: 11px; font-weight: 600;
}
.mnt-status-badge {
  margin-left: auto; font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 20px;
}
.mnt-mini-card {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 7px;
}
.mnt-mini-info { flex: 1; min-width: 0; }
.mnt-mini-title { font-size: 13px; font-weight: 600; }
.mnt-mini-meta { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.mnt-urgency-label {
  font-size: 10px; font-weight: 700;
  padding: 3px 9px; border-radius: 20px;
}
.mnt-urgency-label.red    { background: rgba(239,68,68,.15); color: #f87171; }
.mnt-urgency-label.orange { background: rgba(249,115,22,.15); color: #fb923c; }
.mnt-urgency-label.yellow { background: rgba(234,179,8,.15); color: #fbbf24; }

/* ── Incidents ───────────────────────────────────────────────────────────────── */
.incident-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px; margin-bottom: 10px;
}
.incident-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 8px; flex-wrap: wrap;
}
.incident-title { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.incident-desc { font-size: 13px; color: var(--text-muted); line-height: 1.5; margin-bottom: 10px; }
.incident-footer {
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; color: var(--text-dim); flex-wrap: wrap;
}
.sev-badge {
  font-size: 10px; font-weight: 700;
  padding: 3px 9px; border-radius: 20px;
}
.sev-green  { background: rgba(34,197,94,.15); color: #4ade80; }
.sev-orange { background: rgba(249,115,22,.15); color: #fb923c; }
.sev-red    { background: rgba(239,68,68,.15); color: #f87171; }
.inc-type-badge {
  font-size: 10px; font-weight: 600;
  background: var(--surface-2); color: var(--text-muted);
  padding: 2px 8px; border-radius: 20px;
}
.inc-status { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 20px; }
.ems-badge {
  background: rgba(239,68,68,.12); color: #f87171;
  font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 20px;
}

/* ── Equipment ───────────────────────────────────────────────────────────────── */
.equip-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px; margin-bottom: 10px;
}
.equip-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 8px; margin-bottom: 10px;
}
.equip-name { font-size: 14px; font-weight: 700; }
.equip-brand { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.equip-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.equip-field { display: flex; flex-direction: column; gap: 2px; }
.ef-label { font-size: 10px; color: var(--text-dim); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.ef-val { font-size: 13px; font-weight: 600; }
.ef-val.overdue { color: var(--red); }

/* ── Poll cards ──────────────────────────────────────────────────────────────── */
.poll-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px; margin-bottom: 12px;
}
.poll-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 8px; margin-bottom: 8px;
}
.poll-q { font-size: 14px; font-weight: 700; flex: 1; }
.poll-meta {
  display: flex; gap: 10px; flex-wrap: wrap;
  font-size: 11px; color: var(--text-dim); margin-bottom: 12px;
}
.poll-options { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.poll-opt { }
.poll-opt-top {
  display: flex; justify-content: space-between;
  font-size: 12px; font-weight: 600; margin-bottom: 4px;
}
.poll-pct { color: var(--teal-light); }
.poll-bar-wrap {
  background: var(--surface-2); border-radius: 20px; height: 7px; overflow: hidden; margin-bottom: 3px;
}
.poll-bar-fill { height: 100%; background: linear-gradient(90deg, var(--teal), var(--teal-light)); border-radius: 20px; transition: width .4s; }
.poll-votes { font-size: 10px; color: var(--text-dim); }
.poll-footer { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }

/* ── Events / Schedule ───────────────────────────────────────────────────────── */
.event-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px; margin-bottom: 8px;
  display: flex; gap: 12px; align-items: flex-start;
}
.event-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; margin-top: 4px;
}
.event-dot.mandatory { background: var(--red); }
.event-dot.optional  { background: var(--green); }
.event-info { flex: 1; min-width: 0; }
.event-title { font-size: 14px; font-weight: 700; margin-bottom: 5px; }
.event-meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 11px; color: var(--text-dim); }
.event-notes { font-size: 12px; color: var(--text-muted); margin-top: 6px; line-height: 1.5; }
.event-type-badge {
  font-size: 10px; font-weight: 700; flex-shrink: 0;
  background: var(--surface-2); color: var(--text-dim);
  padding: 3px 9px; border-radius: 20px; white-space: nowrap; height: fit-content;
}

/* ── Shifts ──────────────────────────────────────────────────────────────────── */
.shift-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 8px;
  display: flex; gap: 12px; align-items: center;
}
.shift-time { flex-shrink: 0; }
.shift-date { font-size: 11px; color: var(--text-dim); }
.shift-hours { font-size: 13px; font-weight: 700; }
.shift-info { flex: 1; min-width: 0; }
.shift-role { font-size: 13px; font-weight: 600; }
.shift-assigned { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.shift-open { font-size: 12px; color: var(--amber); font-weight: 600; margin-top: 2px; }
.shift-right { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.shift-badge { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 20px; }

/* ── User / Team list rows ───────────────────────────────────────────────────── */
/* ── User Card — clean vertical layout, no text collision ─────── */
.user-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Top row: avatar | name+email | action icon buttons */
.user-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-av {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: white; flex-shrink: 0;
}
.user-card-name-block {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.user-name {
  font-size: 14px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-email {
  font-size: 11px; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 1px;
}
.user-card-actions {
  display: flex; gap: 6px; align-items: center; flex-shrink: 0;
}
.icon-btn-sm {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; border: none; cursor: pointer;
  background: var(--surface-2); color: var(--text-muted);
  transition: background .15s, color .15s;
}
.icon-btn-sm:active { transform: scale(.93); }
.btn-teal-icon { background: rgba(13,148,136,.15); color: var(--teal-light); }
.btn-teal-icon:active { background: rgba(13,148,136,.3); }
.btn-red-icon  { background: rgba(239,68,68,.12); color: #f87171; }
.btn-red-icon:active  { background: rgba(239,68,68,.25); }

/* Badge row */
.user-card-badges {
  display: flex; flex-wrap: wrap; align-items: center; gap: 5px;
}
.user-position-tag {
  font-size: 10px; font-weight: 600;
  padding: 2px 8px; border-radius: 20px;
  background: rgba(255,255,255,.06);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* Meta row: joined · last active · shoutouts */
.user-card-meta {
  display: flex; gap: 12px; flex-wrap: wrap;
  font-size: 11px; color: var(--text-dim);
}
.user-card-meta span {
  display: flex; align-items: center; gap: 4px;
}

/* Legacy selectors kept for backwards compat */
.user-info { flex: 1; min-width: 0; }
.user-meta { display: flex; flex-direction: column; gap: 2px; }
.user-actions { display: flex; gap: 6px; align-items: center; }

/* Mini avatar used in shift/maintenance assigned rows */
.mini-av {
  width: 22px; height: 22px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; color: white; flex-shrink: 0;
}

/* Shopping list: app.js uses .shop-item, .shop-dot, .check-btn, .buyer-header, .urgent-pill */
.shop-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 7px;
  display: flex; align-items: center; gap: 12px;
}
.shop-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.shop-high   { background: var(--red); }
.shop-medium { background: var(--orange); }
.shop-low    { background: var(--green); }
.buyer-header {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 6px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; font-weight: 700;
}
.urgent-pill {
  font-size: 10px; font-weight: 700;
  background: rgba(239,68,68,.15); color: #f87171;
  padding: 2px 8px; border-radius: 20px;
}
.check-btn {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--text-dim); flex-shrink: 0; cursor: pointer;
  transition: all .15s;
}
.check-btn:active { background: rgba(34,197,94,.15); color: #4ade80; }

/* Shoutout: app.js uses .sho-from-to, .sho-name, .sho-msg, .sho-footer, .like-btn */
.sho-from-to { font-size: 12px; color: var(--text-dim); margin-bottom: 6px; }
.sho-name { color: var(--teal-light); font-weight: 600; }
.sho-msg { font-size: 14px; font-weight: 500; line-height: 1.5; font-style: italic; }
.sho-footer { display: flex; align-items: center; gap: 12px; margin-top: 10px; font-size: 11px; color: var(--text-dim); flex-wrap: wrap; }
.like-btn { margin-left: auto; padding: 5px 12px; border-radius: 20px; border: 1px solid var(--border); color: var(--text-muted); display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; transition: all .15s; }
.like-btn:active { background: rgba(239,68,68,.1); color: #f87171; }

/* Critical tag on checklist */
.crit-tag {
  display: inline-block; font-size: 9px; font-weight: 700;
  background: rgba(239,68,68,.12); color: #f87171;
  padding: 1px 6px; border-radius: 20px; margin-left: 6px;
}
.daily-label {
  font-size: 12px; font-weight: 700; color: var(--teal-light);
  text-transform: uppercase; letter-spacing: .7px; margin: 14px 0 8px;
}
.daily-label.today { color: var(--amber-light); }

/* Settings page */
.settings-section {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; margin-bottom: 14px;
}
.settings-section-title {
  font-size: 14px; font-weight: 700; margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.settings-section-title i { color: var(--teal-light); }
.settings-form { display: flex; flex-direction: column; gap: 12px; }
.plan-card {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px;
}
.plan-name { font-size: 16px; font-weight: 700; color: var(--teal-light); }
.plan-details { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.plan-price { font-size: 22px; font-weight: 800; margin-top: 10px; }
.toggle-list { display: flex; flex-direction: column; gap: 8px; }
.toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; padding: 10px 0; border-bottom: 1px solid var(--border);
}
.toggle-switch {
  width: 44px; height: 26px; border-radius: 13px;
  background: var(--surface-3); border: 1px solid var(--border);
  position: relative; cursor: pointer; transition: background .2s;
  flex-shrink: 0;
}
.toggle-switch.active { background: var(--teal); border-color: var(--teal); }
.toggle-thumb {
  position: absolute; top: 2px; left: 2px;
  width: 20px; height: 20px; border-radius: 50%;
  background: white; transition: transform .2s;
}
.toggle-switch.active .toggle-thumb { transform: translateX(18px); }

/* Typing dots (Aria) */
.td {
  width: 7px; height: 7px; background: var(--text-dim); border-radius: 50%;
  animation: typingPulse 1.2s infinite;
}
.td:nth-child(2) { animation-delay: .2s; }
.td:nth-child(3) { animation-delay: .4s; }

/* Inventory name group and inv-vendor */
.inv-name-group { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.inv-vendor { font-size: 11px; color: var(--text-dim); display: flex; align-items: center; gap: 4px; }
.inv-qty { font-size: 12px; color: var(--text-muted); }
.out-label { font-size: 12px; color: var(--red); font-weight: 700; }
.inv-cat-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .7px; color: var(--text-dim); margin: 14px 0 8px;
}
.cat-pill { font-size: 9px; padding: 2px 7px; border-radius: 20px; font-weight: 700; flex-shrink: 0; }
.cat-chemicals { background: rgba(239,68,68,.12); color: #f87171; }
.cat-cleaning  { background: rgba(59,130,246,.12); color: #60a5fa; }
.cat-safety    { background: rgba(34,197,94,.12); color: #4ade80; }
.cat-other     { background: var(--surface-2); color: var(--text-dim); }

/* Loc header card */
.loc-header-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; margin-bottom: 14px;
}
.loc-hd-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.loc-hd-info { flex: 1; min-width: 0; }
.loc-name { font-size: 17px; font-weight: 800; }
.loc-subtitle { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 3px; }
.loc-nick { font-size: 12px; color: var(--text-muted); font-style: italic; }
.loc-meta-row { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }
.loc-meta-row span { display: flex; align-items: center; gap: 5px; }
.loc-meta-row i { color: var(--teal-light); font-size: 10px; }
.loc-badges-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.edit-loc-btn {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--surface-2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--text-muted); flex-shrink: 0; cursor: pointer; transition: all .15s;
}
.edit-loc-btn:active { color: var(--teal-light); background: var(--surface-3); }
.toggle-status-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px; border-radius: 8px;
  font-size: 11px; font-weight: 600;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-muted); cursor: pointer; transition: all .15s; margin-left: auto;
}
.toggle-status-btn:active { background: var(--surface-3); }
.stat-grid {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 8px;
}
.stat-card {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px; text-align: center; cursor: pointer; transition: all .15s;
}
.stat-card:active { background: var(--surface-3); transform: scale(0.97); }
.stat-num { font-size: 20px; font-weight: 800; line-height: 1; }
.stat-num.red { color: var(--red); }
.stat-num.green { color: var(--green); }
.stat-num.orange { color: var(--orange); }
.stat-num.blue { color: var(--blue); }
.stat-label { font-size: 9px; color: var(--text-dim); font-weight: 600; margin-top: 3px; }

/* Overview grid */
.overview-grid {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-bottom: 14px;
}
@media (max-width: 400px) { .overview-grid { grid-template-columns: repeat(2,1fr); } }
.ov-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px; cursor: pointer; transition: all .15s;
  display: flex; flex-direction: column; gap: 4px;
}
.ov-card:active { background: var(--surface-2); transform: scale(0.97); }
.ov-top { display: flex; align-items: center; justify-content: space-between; }
.ov-icon { font-size: 18px; }
.ov-arrow { font-size: 9px; color: var(--text-dim); }
.ov-num { font-size: 22px; font-weight: 800; }
.color-teal   { color: var(--teal-light); }
.color-red    { color: var(--red); }
.color-orange { color: var(--orange); }
.color-amber  { color: var(--amber-light); }
.color-purple { color: var(--purple); }
.color-green  { color: var(--green); }
.ov-label { font-size: 11px; font-weight: 700; color: var(--text-muted); }
.ov-hint  { font-size: 9px; color: var(--text-dim); }

/* Inactive location tag on raindrop */
.inactive-tag {
  font-size: 8px; background: var(--surface-3); color: var(--text-dim);
  padding: 1px 5px; border-radius: 20px;
}
.inactive-loc { opacity: .4; }

/* ── Location Admin Cards ────────────────────────────────────────────────────── */
.admin-loc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  transition: border-color .15s;
}
.admin-loc-card:hover { border-color: rgba(13, 148, 136, .25); }
.admin-loc-header {
  display: flex; align-items: flex-start; gap: 12px;
  margin-bottom: 12px;
}
.admin-loc-av {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: white;
  flex-shrink: 0;
}
.admin-loc-info { flex: 1; min-width: 0; }
.admin-loc-name {
  font-size: 15px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.admin-loc-nick {
  font-size: 11px; color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.admin-loc-details {
  margin-bottom: 12px;
  display: flex; flex-direction: column; gap: 4px;
}
.detail-row {
  font-size: 12px; color: var(--text-muted);
  display: flex; align-items: center; gap: 6px;
  line-height: 1.5;
}
.detail-row i { color: var(--teal-light); font-size: 10px; flex-shrink: 0; }

/* Stat chips strip */
.admin-loc-stats {
  display: flex; gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.admin-stat {
  display: flex; flex-direction: column;
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  min-width: 52px; flex: 1;
}
.admin-stat-link {
  cursor: pointer;
  transition: all .15s;
}
.admin-stat-link:active {
  background: var(--surface-3);
  transform: scale(0.97);
  border-color: var(--teal);
}
.admin-stat-num {
  font-size: 18px; font-weight: 800;
  line-height: 1;
}
.admin-stat-num.red    { color: var(--red); }
.admin-stat-num.orange { color: var(--orange); }
.admin-stat-num.green  { color: var(--green); }
.admin-stat-label {
  font-size: 9px; color: var(--text-dim);
  font-weight: 600; letter-spacing: .3px;
  margin-top: 3px; text-transform: uppercase;
  text-align: center;
}

/* CTA row */
.admin-loc-cta-row {
  display: flex; gap: 8px;
  margin-bottom: 10px;
}
.admin-primary-btn {
  flex: 1;
  background: var(--teal);
  color: white;
  border: none; border-radius: var(--radius-sm);
  padding: 11px 16px;
  font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  transition: all .15s;
  cursor: pointer;
}
.admin-primary-btn:active { background: var(--teal-light); transform: scale(0.98); }
.admin-secondary-btn {
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 13px; font-weight: 600;
  display: flex; align-items: center; gap: 6px;
  transition: all .15s;
  cursor: pointer;
  white-space: nowrap;
}
.admin-secondary-btn:active { background: var(--surface-3); color: var(--text); }

/* Action strip */
.admin-loc-actions {
  display: flex; gap: 6px;
  flex-wrap: wrap;
}
.btn-ghost-danger { color: var(--red) !important; border-color: rgba(239,68,68,.3) !important; }
.btn-ghost-danger:active { background: rgba(239,68,68,.1) !important; }

/* Assign maintenance modal */
.assign-mnt-info {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 14px;
}
.assign-mnt-title { font-size: 14px; font-weight: 700; }
.assign-mnt-meta { font-size: 12px; color: var(--text-muted); margin-top: 3px; }

/* ── Responsive ──────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .sidebar { display: none; }
  .bottom-nav { display: flex; }
  .aria-fab { right: 14px; }
  .loc-switch-btn span, .loc-chip span { max-width: 80px; }
  .content-area {
    /* Extra 72px to clear the ARIA FAB above the bottom nav */
    padding-bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 76px);
  }
  .admin-loc-cta-row { flex-wrap: wrap; }
  .admin-primary-btn { padding: 13px; }
  .loc-admin-hero { padding: 14px; }
  .loc-add-big-btn { font-size: 13px; }
}
@media (min-width: 641px) {
  .bottom-nav { display: none; }
  .aria-fab { bottom: 24px; right: 24px; }
}

/* ═══════════════════════════════════════════════════════════════════
   LOCATION ADMIN — HERO HEADER & ADD BUTTON
═══════════════════════════════════════════════════════════════════ */
.loc-admin-hero {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  background: linear-gradient(135deg, rgba(13,148,136,.18) 0%, rgba(99,102,241,.12) 100%);
  border: 1px solid rgba(13,148,136,.25);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 14px;
}
.loc-admin-hero-left {
  display: flex; align-items: center; gap: 12px;
  min-width: 0;
}
.loc-admin-hero-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--teal), var(--purple));
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: white;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(13,148,136,.4);
}
.loc-admin-hero-title {
  font-size: 15px; font-weight: 800;
  color: var(--text);
}
.loc-admin-hero-sub {
  font-size: 11px; color: var(--teal-light);
  margin-top: 2px; font-weight: 600;
}

/* Big "Add Location" button */
.loc-add-big-btn {
  display: flex; align-items: center; gap: 8px;
  background: var(--teal);
  color: white;
  border: none; border-radius: 12px;
  padding: 11px 18px;
  font-size: 13px; font-weight: 800;
  cursor: pointer;
  white-space: nowrap; flex-shrink: 0;
  box-shadow: 0 4px 18px rgba(13,148,136,.45);
  transition: all .18s;
  letter-spacing: .2px;
}
.loc-add-big-btn:active { background: var(--teal-light); transform: scale(0.97); box-shadow: none; }
.loc-add-big-btn i { font-size: 13px; }

/* Search bar */
.loc-admin-search-bar {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 14px;
  transition: border-color .15s;
}
.loc-admin-search-bar:focus-within { border-color: var(--teal); }
.loc-admin-search-input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text); font-size: 13px; font-family: inherit;
}
.loc-admin-search-input::placeholder { color: var(--text-dim); }

/* Inactive location card */
.admin-loc-card.admin-loc-inactive {
  opacity: 0.72;
  border-left-color: var(--border) !important;
}
.admin-loc-ribbon {
  background: var(--surface-3); color: var(--text-dim);
  font-size: 9px; font-weight: 800; letter-spacing: 1.5px;
  padding: 3px 10px; border-radius: 6px 6px 0 0;
  margin: -12px -12px 10px;
  text-align: center;
}

/* Admin edit + delete buttons */
.admin-edit-btn {
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; gap: 6px;
  transition: all .15s; cursor: pointer;
  white-space: nowrap;
}
.admin-edit-btn:active { background: var(--surface-3); color: var(--teal-light); border-color: var(--teal); }
.admin-delete-btn {
  background: transparent;
  color: var(--red);
  border: 1px solid rgba(239,68,68,.25);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13px;
  display: flex; align-items: center;
  transition: all .15s; cursor: pointer;
}
.admin-delete-btn:active { background: rgba(239,68,68,.12); border-color: var(--red); }

/* Unassigned manager warning */
.unassigned-warn { color: var(--red); font-size: 12px; }

/* ── Sheet "Add Location" button ───────────────────────────────── */
.sheet-add-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--teal);
  color: white; border: none; border-radius: 10px;
  padding: 7px 13px; font-size: 12px; font-weight: 700;
  cursor: pointer; white-space: nowrap;
  box-shadow: 0 2px 12px rgba(13,148,136,.4);
  transition: all .15s;
}
.sheet-add-btn:active { background: var(--teal-light); transform: scale(0.96); }

/* ── ARIA FAB — improved ───────────────────────────────────────── */
.aria-fab svg { display: block; }

@media (max-width: 640px) {
  .loc-admin-hero { flex-direction: column; align-items: flex-start; }
  .loc-add-big-btn { width: 100%; justify-content: center; }
  .admin-loc-cta-row { flex-direction: row; flex-wrap: wrap; }
  .admin-delete-btn { margin-left: auto; }
}

/* ═══════════════════════════════════════════════════════════════════
   BROADCAST MAINTENANCE + NEW FEATURES CSS
═══════════════════════════════════════════════════════════════════ */

/* Broadcast alert button in header */
.broadcast-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(239,68,68,.15);
  color: #f87171;
  border: 1px solid rgba(239,68,68,.3);
  border-radius: 10px;
  padding: 8px 13px; font-size: 12px; font-weight: 700;
  cursor: pointer; white-space: nowrap; flex-shrink: 0;
  transition: all .15s;
}
.broadcast-btn:active { background: rgba(239,68,68,.25); }

/* Broadcast warning block inside modal */
.broadcast-warning {
  display: flex; align-items: flex-start; gap: 12px;
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.25);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 13px; line-height: 1.5; color: var(--text-muted);
}
.broadcast-warning i { color: #f87171; font-size: 16px; flex-shrink: 0; margin-top: 1px; }

/* ── Inventory expiry indicators ──────────────────────────────── */
.inv-expiry {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700;
  padding: 3px 8px; border-radius: 6px;
  margin-bottom: 5px;
}
.expiry-ok    { color: var(--text-dim); background: var(--surface-2); }
.expiry-warn  { color: var(--amber); background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.2); }
.expiry-critical { color: var(--orange); background: rgba(249,115,22,.12); border: 1px solid rgba(249,115,22,.3); animation: pulse-red 2s infinite; }
.expiry-today { color: var(--red); background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.3); animation: pulse-red 1.5s infinite; }
.expiry-expired { color: white; background: var(--red); }

/* Inventory item with impending expiry */
.inv-item-expiring {
  border-left: 3px solid var(--orange) !important;
}

/* Expiry alert banner */
.expiry-banner {
  display: flex; align-items: center; gap: 10px;
  background: rgba(249,115,22,.12);
  border: 1px solid rgba(249,115,22,.3);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px; color: var(--orange);
  margin-bottom: 12px;
}
.expiry-banner i { flex-shrink: 0; }

/* Inventory tools row (copy/import buttons) */
.inv-tools-row {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 14px;
}

/* ── Template preview ──────────────────────────────────────────── */
.tmpl-preview {
  margin-top: 12px;
}
.tmpl-preview-inner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex; flex-direction: column; gap: 8px;
  max-height: 200px; overflow-y: auto;
}
.tmpl-cat-row {
  display: flex; gap: 8px; align-items: flex-start;
  font-size: 12px; line-height: 1.5;
}
.tmpl-cat-badge {
  flex-shrink: 0;
  background: var(--teal-glow);
  color: var(--teal-light);
  border: 1px solid rgba(13,148,136,.2);
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 10px; font-weight: 700;
  white-space: nowrap;
}
.tmpl-cat-items { color: var(--text-muted); }
.tmpl-count {
  font-size: 11px; color: var(--teal-light);
  font-weight: 700; border-top: 1px solid var(--border);
  padding-top: 8px; margin-top: 4px;
}

/* Location nick badge for snack shack */
.loc-nick-badges {
  display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px;
}

/* ── Role Hierarchy Guide Card ─────────────────────────────────── */
.role-guide-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 14px;
}
.role-guide-title {
  font-size: 12px; font-weight: 700;
  color: var(--text-muted); text-transform: uppercase;
  letter-spacing: .04em; margin-bottom: 10px;
  display: flex; align-items: center; gap: 6px;
}
.role-guide-grid {
  display: flex; flex-direction: column; gap: 7px;
}
.role-guide-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text-muted);
}
.role-guide-item .role-badge {
  flex-shrink: 0; min-width: 80px; text-align: center;
  text-transform: capitalize;
}

/* ═══════════════════════════════════════════════════════════════════════
   TIMESHEETS
═══════════════════════════════════════════════════════════════════════ */
.ts-summary-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px;
}
.ts-summary-item { display: flex; flex-direction: column; align-items: center; min-width: 56px; }
.ts-summary-num { font-size: 22px; font-weight: 800; color: var(--text); }
.ts-summary-lbl { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.ts-pending-num { color: #f59e0b; }
.ts-flag-num { color: #ef4444; }
.ts-export-btn { margin-left: auto; background: var(--teal-glow); border: 1px solid var(--teal-dim); color: var(--teal-light); padding: 8px 14px; border-radius: var(--radius-sm); font-size: 12px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.ts-export-btn:hover { background: var(--teal-dim); }

.ts-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.ts-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; flex-wrap: wrap; gap: 8px; }
.ts-user-info { display: flex; align-items: center; gap: 10px; }
.ts-avatar { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; color: #fff; flex-shrink: 0; }
.ts-user-name { font-size: 14px; font-weight: 700; color: var(--text); }
.ts-meta { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.ts-total-hrs { font-size: 20px; font-weight: 800; color: var(--teal-light); }
.ts-ot { color: #f59e0b; }
.ts-status-badge { padding: 3px 8px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.ts-badge-pending { background: rgba(245,158,11,.15); color: #f59e0b; }
.ts-badge-approved { background: rgba(74,222,128,.15); color: #4ade80; }
.ts-badge-flagged { background: rgba(239,68,68,.15); color: #f87171; }
.ts-entries { border-top: 1px solid var(--border); padding-top: 10px; margin-bottom: 10px; }
.ts-day-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,.04); font-size: 12px; }
.ts-day-label { font-weight: 700; color: var(--text-muted); width: 32px; flex-shrink: 0; }
.ts-time { color: var(--text); flex: 1; }
.ts-break { color: var(--text-dim); font-size: 11px; }
.ts-day-hrs { font-weight: 700; color: var(--teal-light); min-width: 30px; text-align: right; }
.ts-note { font-size: 12px; color: #f59e0b; background: rgba(245,158,11,.08); border: 1px solid rgba(245,158,11,.2); border-radius: var(--radius-sm); padding: 7px 10px; margin-bottom: 8px; }
.ts-actions { display: flex; gap: 8px; }
.ts-btn { padding: 6px 12px; border-radius: var(--radius-sm); font-size: 12px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 5px; border: 1px solid transparent; }
.ts-approve { background: rgba(74,222,128,.12); color: #4ade80; border-color: rgba(74,222,128,.25); }
.ts-approve:hover { background: rgba(74,222,128,.2); }
.ts-flag { background: rgba(245,158,11,.12); color: #f59e0b; border-color: rgba(245,158,11,.25); }
.ts-flag:hover { background: rgba(245,158,11,.2); }
.ts-delete { background: rgba(239,68,68,.08); color: #f87171; border-color: rgba(239,68,68,.2); margin-left: auto; }
.ts-delete:hover { background: rgba(239,68,68,.15); }
/* Timesheet submission form */
.ts-day-entries { padding: 4px 0 8px; }
.ts-day-entry { display: grid; grid-template-columns: 60px 1fr; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.ts-day-entry-label { font-size: 12px; font-weight: 700; color: var(--text-muted); }
.ts-day-date { font-size: 10px; color: var(--text-dim); font-weight: 400; }
.ts-day-entry-inputs { display: flex; gap: 6px; flex-wrap: wrap; }
.ts-in { flex: 1; min-width: 90px; font-size: 12px; padding: 6px 8px; }

/* ═══════════════════════════════════════════════════════════════════════
   CERTIFICATIONS
═══════════════════════════════════════════════════════════════════════ */
.cert-summary-bar { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.cert-sum-item { flex: 1; min-width: 80px; border-radius: var(--radius); padding: 14px; text-align: center; border: 1px solid var(--border); }
.cert-sum-num { font-size: 26px; font-weight: 800; }
.cert-sum-lbl { font-size: 11px; color: var(--text-muted); margin-top: 2px; display: flex; align-items: center; justify-content: center; gap: 4px; }
.cert-sum-valid { background: rgba(74,222,128,.06); }
.cert-sum-valid .cert-sum-num { color: #4ade80; }
.cert-sum-expiring { background: rgba(245,158,11,.06); }
.cert-sum-expiring .cert-sum-num { color: #f59e0b; }
.cert-sum-expired { background: rgba(239,68,68,.06); }
.cert-sum-expired .cert-sum-num { color: #f87171; }

.cert-user-group { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 14px; overflow: hidden; }
.cert-user-header { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--surface-high); border-bottom: 1px solid var(--border); }
.cert-user-av { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; color: #fff; flex-shrink: 0; }
.cert-user-name { font-size: 14px; font-weight: 700; color: var(--text); flex: 1; }
.cert-add-btn { padding: 5px 10px; background: var(--teal-glow); color: var(--teal-light); border: 1px solid var(--teal-dim); border-radius: var(--radius-sm); font-size: 11px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 4px; }
.cert-add-btn:hover { background: var(--teal-dim); }
.cert-list { padding: 6px 0; }
.cert-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border-bottom: 1px solid var(--border); gap: 8px; }
.cert-row:last-child { border-bottom: none; }
.cert-row-left { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.cert-icon { font-size: 16px; flex-shrink: 0; }
.cert-icon.cert-valid { color: #4ade80; }
.cert-icon.cert-expiring { color: #f59e0b; }
.cert-icon.cert-expired { color: #f87171; }
.cert-type { font-size: 13px; font-weight: 600; color: var(--text); }
.cert-issuer { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.cert-row-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.cert-badge { padding: 3px 8px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.cert-badge.cert-valid { background: rgba(74,222,128,.15); color: #4ade80; }
.cert-badge.cert-expiring { background: rgba(245,158,11,.15); color: #f59e0b; }
.cert-badge.cert-expired { background: rgba(239,68,68,.15); color: #f87171; }
.cert-days-str { font-size: 11px; color: var(--text-dim); }
.cert-del-btn { width: 28px; height: 28px; border-radius: 6px; background: rgba(239,68,68,.08); color: #f87171; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 11px; }
.cert-del-btn:hover { background: rgba(239,68,68,.18); }

/* ═══════════════════════════════════════════════════════════════════════
   CHEMICAL LOG
═══════════════════════════════════════════════════════════════════════ */
.chl-header-cards { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chl-hcard { flex: 1; min-width: 70px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; text-align: center; }
.chl-hcard-warn { border-color: rgba(239,68,68,.4); background: rgba(239,68,68,.06); }
.chl-hcard-flag { border-color: rgba(245,158,11,.4); background: rgba(245,158,11,.06); }
.chl-hcard-val { font-size: 22px; font-weight: 800; color: var(--text); }
.chl-hcard-warn .chl-hcard-val { color: #f87171; }
.chl-hcard-flag .chl-hcard-val { color: #f59e0b; }
.chl-hcard-lbl { font-size: 10px; color: var(--text-muted); margin-top: 2px; }
.chl-ranges-card { background: var(--surface-high); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; }
.chl-ranges-title { font-size: 11px; color: var(--text-muted); font-weight: 600; }
.chl-ranges-grid { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.chl-range-item { display: flex; flex-direction: column; gap: 2px; }
.chl-range-lbl { font-size: 11px; color: var(--text-dim); }
.chl-range-val { font-size: 12px; font-weight: 700; color: var(--teal-light); }
.chl-table-wrap { overflow-x: auto; }
.chl-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.chl-table thead tr { background: var(--surface-high); }
.chl-table th { padding: 8px 10px; text-align: left; font-size: 11px; font-weight: 700; color: var(--text-muted); border-bottom: 1px solid var(--border); white-space: nowrap; }
.chl-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); color: var(--text); vertical-align: middle; }
.chl-row-flag { background: rgba(245,158,11,.04); }
.chl-cell { }
.chl-out { color: #f87171; font-weight: 700; background: rgba(239,68,68,.08); }
.chl-status-badge { padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.chl-ok { background: rgba(74,222,128,.12); color: #4ade80; }
.chl-flagged { background: rgba(245,158,11,.12); color: #f59e0b; }
.chl-notes { max-width: 160px; color: var(--text-muted); font-style: italic; }

/* ═══════════════════════════════════════════════════════════════════════
   DOCUMENTS
═══════════════════════════════════════════════════════════════════════ */
.doc-section-label { font-size: 11px; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: .06em; margin: 12px 0 8px; display: flex; align-items: center; gap: 6px; }
.doc-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.doc-card-left { display: flex; align-items: flex-start; gap: 12px; flex: 1; min-width: 0; }
.doc-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--teal-glow); border: 1px solid var(--teal-dim); display: flex; align-items: center; justify-content: center; font-size: 17px; color: var(--teal-light); flex-shrink: 0; }
.doc-title { font-size: 14px; font-weight: 700; color: var(--text); }
.doc-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.doc-notes { font-size: 12px; color: var(--text-dim); margin-top: 4px; font-style: italic; }
.doc-loc-tag { font-size: 11px; color: var(--text-dim); margin-top: 4px; display: flex; align-items: center; gap: 4px; }
.doc-card-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.doc-view-btn { padding: 6px 12px; background: var(--teal-glow); color: var(--teal-light); border: 1px solid var(--teal-dim); border-radius: var(--radius-sm); font-size: 12px; font-weight: 600; text-decoration: none; display: flex; align-items: center; gap: 5px; }
.doc-view-btn:hover { background: var(--teal-dim); }
.doc-no-file { font-size: 11px; color: var(--text-dim); display: flex; align-items: center; gap: 4px; }
.doc-pin-btn { width: 30px; height: 30px; border-radius: 6px; background: rgba(139,92,246,.1); color: #a78bfa; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 12px; }
.doc-pin-btn:hover { background: rgba(139,92,246,.2); }
.doc-del-btn { width: 30px; height: 30px; border-radius: 6px; background: rgba(239,68,68,.08); color: #f87171; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 11px; }
.doc-del-btn:hover { background: rgba(239,68,68,.18); }

/* ═══════════════════════════════════════════════════════════════════════
   PERSONA PICKER
═══════════════════════════════════════════════════════════════════════ */
.persona-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 1100;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.persona-overlay.active { opacity: 1; pointer-events: all; }

.persona-panel {
  position: fixed; top: 0; right: -360px; width: 340px; max-width: 95vw;
  height: 100dvh; background: var(--surface-high);
  border-left: 1px solid var(--border); z-index: 1101;
  display: flex; flex-direction: column; transition: right .25s cubic-bezier(.4,0,.2,1);
  box-shadow: -8px 0 32px rgba(0,0,0,.4);
}
.persona-panel.open { right: 0; }

.persona-panel-header {
  padding: 20px 18px 14px; border-bottom: 1px solid var(--border); position: relative;
}
.persona-panel-title {
  font-size: 16px; font-weight: 800; color: var(--text);
  display: flex; align-items: center; gap: 8px; margin-bottom: 4px;
}
.persona-panel-sub { font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.persona-close-btn { position: absolute; top: 16px; right: 14px; }

.persona-panel-body { flex: 1; overflow-y: auto; padding: 10px 10px 24px; }

.persona-group-label {
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-dim); padding: 10px 8px 4px;
}

.persona-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 10px; border-radius: var(--radius-sm); border: none;
  background: transparent; cursor: pointer; text-align: left;
  transition: background .15s; margin-bottom: 2px;
}
.persona-item:hover { background: var(--surface); }
.persona-active { background: var(--teal-glow) !important; border: 1px solid var(--teal-dim); }

.persona-av {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px; color: #fff;
}
.persona-info { flex: 1; min-width: 0; }
.persona-name { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.persona-you { font-size: 10px; color: var(--teal-light); font-weight: 600; }
.persona-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.persona-pos { font-size: 11px; color: var(--text-muted); }
.persona-loc { font-size: 11px; color: var(--text-dim); display: flex; align-items: center; gap: 3px; }
.persona-check { color: var(--teal-light); font-size: 14px; flex-shrink: 0; }

/* Topbar avatar chip color transition */
/* ── Persona switcher button in topbar ───────────────────────────────────── */
.persona-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 10px 5px 5px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--teal-dim);
  color: var(--text);
  cursor: pointer;
  transition: all .15s;
  max-width: 160px;
}
.persona-btn:hover { background: var(--teal-glow); border-color: var(--teal-light); }
.persona-btn-av {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--teal); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; flex-shrink: 0;
  transition: background .3s;
}
.persona-btn-label {
  display: flex; flex-direction: column; align-items: flex-start; min-width: 0;
}
.persona-btn-name {
  font-size: 12px; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 90px;
}
.persona-btn-role {
  font-size: 10px; color: var(--teal-light); font-weight: 600; text-transform: capitalize;
}
/* legacy alias */
.avatar-chip { transition: background .3s, color .3s; }

/* ═══════════════════════════════════════════════════════════════════════
   MY HOURS PAGE
═══════════════════════════════════════════════════════════════════════ */
.my-hours-summary {
  display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px;
}
.mh-sum-card {
  flex: 1; min-width: 80px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px; text-align: center;
}
.mh-sum-num { font-size: 24px; font-weight: 800; color: var(--text); }
.mh-sum-lbl { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.mh-approved .mh-sum-num { color: #4ade80; }
.mh-pending .mh-sum-num { color: #f59e0b; }
.ts-card-flagged { border-color: rgba(239,68,68,.35); background: rgba(239,68,68,.03); }
.ts-approved-note { font-size: 12px; color: #4ade80; display: flex; align-items: center; gap: 5px; padding-top: 4px; }
.my-cert-alert {
  background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.3);
  border-radius: var(--radius); padding: 12px 14px; margin-bottom: 14px;
  font-size: 13px; color: #f59e0b; display: flex; align-items: center; gap: 8px; font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════════════
   MY SCHEDULE PAGE
═══════════════════════════════════════════════════════════════════════ */
.my-sched-section { margin-bottom: 20px; }
.my-sched-label {
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-dim); margin-bottom: 8px; display: flex; align-items: center; gap: 6px;
}
.my-sched-empty { font-size: 13px; color: var(--text-muted); padding: 12px; text-align: center; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); }

.my-shift-card {
  display: flex; align-items: center; gap: 12px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 8px;
}
.my-shift-date { text-align: center; min-width: 44px; flex-shrink: 0; }
.my-shift-day { font-size: 11px; font-weight: 800; text-transform: uppercase; color: var(--teal-light); }
.my-shift-full { font-size: 10px; color: var(--text-dim); margin-top: 1px; }
.my-shift-info { flex: 1; min-width: 0; }
.my-shift-time { font-size: 13px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 5px; }
.my-shift-loc { font-size: 12px; color: var(--text-muted); margin-top: 3px; display: flex; align-items: center; gap: 4px; }
.my-shift-badge { padding: 3px 8px; border-radius: 20px; font-size: 11px; font-weight: 600; flex-shrink: 0; }
.my-shift-confirmed { background: rgba(74,222,128,.12); color: #4ade80; }
.my-bid-btn {
  padding: 6px 12px; background: var(--teal-glow); color: var(--teal-light);
  border: 1px solid var(--teal-dim); border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 700; cursor: pointer; display: flex; align-items: center; gap: 5px; flex-shrink: 0;
}
.my-bid-btn:hover { background: var(--teal-dim); }

.my-event-card {
  display: flex; align-items: flex-start; gap: 12px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 8px;
}
.my-event-icon { font-size: 18px; color: #8b5cf6; flex-shrink: 0; padding-top: 2px; }
.my-event-title { font-size: 14px; font-weight: 700; color: var(--text); }
.my-event-meta { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.my-event-req { color: #f59e0b; font-weight: 700; }
.my-event-notes { font-size: 12px; color: var(--text-dim); margin-top: 4px; font-style: italic; }

/* ══════════════════════════════════════════════════════════════════════════════
   ROLE-DIFFERENTIATED HOME — Staff & Maintenance portals
   ══════════════════════════════════════════════════════════════════════════════ */

/* Role home panels — JS controls display: block / none directly */
.role-home { display: none; } /* JS overrides this inline */

/* Role-based body theming */
body[data-role="staff"]       { --role-accent: #3b82f6; --role-accent-dim: rgba(59,130,246,.15); --role-accent-glow: rgba(59,130,246,.08); }
body[data-role="maintenance"] { --role-accent: #f97316; --role-accent-dim: rgba(249,115,22,.15);  --role-accent-glow: rgba(249,115,22,.08); }
body[data-role="manager"],
body[data-role="admin"],
body[data-role="owner"]       { --role-accent: #0d9488; --role-accent-dim: rgba(13,148,136,.15);  --role-accent-glow: rgba(13,148,136,.08); }

/* ── Staff / Maintenance Hero Card ────────────────────────────────────────── */
.staff-hero-card, .maint-hero-card {
  background: linear-gradient(135deg, var(--surface-high) 0%, var(--surface) 100%);
  border: 1px solid var(--role-accent, var(--teal-dim));
  border-radius: 18px;
  padding: 20px;
  margin: 0 0 16px;
  box-shadow: 0 4px 24px var(--role-accent-glow, rgba(0,0,0,.2));
}
.staff-hero-top {
  display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 18px;
}
.staff-hero-greeting {
  font-size: 18px; font-weight: 800; color: var(--text); margin-bottom: 4px;
}
.staff-hero-loc {
  font-size: 12px; color: var(--text-muted);
}
.staff-av {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; color: #fff; flex-shrink: 0;
}

/* Clock row */
.staff-clock-row {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface); border-radius: 12px; padding: 14px 16px;
  margin-bottom: 14px;
}
.staff-clock-status { display: flex; align-items: center; gap: 12px; }
.clock-dot {
  width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0;
}
.clock-dot.clock-in  { background: #22c55e; box-shadow: 0 0 8px rgba(34,197,94,.5); }
.clock-dot.clock-out { background: var(--text-dim); }
.clock-status-label { font-size: 13px; font-weight: 700; color: var(--text); }
.clock-time-since   { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.clock-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px;
  font-size: 13px; font-weight: 700; cursor: pointer;
  border: none; transition: all .15s;
}
.clock-btn-in  { background: #22c55e; color: #fff; }
.clock-btn-in:hover  { background: #16a34a; }
.clock-btn-out { background: #ef4444; color: #fff; }
.clock-btn-out:hover { background: #dc2626; }

.staff-shift-today {
  font-size: 12px; color: var(--text-muted); padding-top: 6px;
  display: flex; align-items: center; gap: 6px;
}
.staff-shift-today.muted { opacity: .6; }
.staff-shift-today strong { color: var(--text); }

/* ── Stats Row ─────────────────────────────────────────────────────────────── */
.staff-stats-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px;
}
.staff-stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 14px 10px; text-align: center;
  cursor: pointer; transition: all .15s;
}
.staff-stat-card:hover { background: var(--surface-high); border-color: var(--role-accent, var(--teal-dim)); }
.staff-stat-card.staff-stat-warn  { border-color: #f97316; background: rgba(249,115,22,.07); }
.staff-stat-card.staff-stat-urgent{ border-color: #ef4444; background: rgba(239,68,68,.07); }
.staff-stat-num { font-size: 22px; font-weight: 900; color: var(--text); line-height: 1; margin-bottom: 6px; }
.staff-stat-lbl { font-size: 10px; color: var(--text-muted); font-weight: 600; line-height: 1.3; }

/* ── Staff Sections ─────────────────────────────────────────────────────────── */
.staff-section {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 14px; margin-bottom: 12px;
}
.staff-section-warn { border-color: #f97316; background: rgba(249,115,22,.05); }
.staff-section-hdr {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 12px;
}
.staff-count-badge {
  background: var(--role-accent, var(--teal)); color: #fff;
  font-size: 10px; font-weight: 800; padding: 2px 7px;
  border-radius: 20px; margin-left: 4px;
}
.staff-empty-row {
  font-size: 13px; color: var(--text-muted);
  display: flex; align-items: center; gap: 8px; padding: 6px 0;
}

/* Tasks list */
.staff-tasks-list { display: flex; flex-direction: column; gap: 6px; }
.staff-task-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; background: var(--bg); border-radius: 10px;
  cursor: pointer; transition: background .12s;
}
.staff-task-row:hover { background: var(--surface-high); }
.staff-task-check { color: var(--text-dim); font-size: 16px; flex-shrink: 0; }
.staff-task-name  { font-size: 13px; color: var(--text); }
.task-crit { font-size: 10px; background: #ef4444; color: #fff; padding: 1px 5px; border-radius: 4px; margin-left: 6px; }
.staff-see-all-btn {
  background: none; border: none; color: var(--role-accent, var(--teal-light));
  font-size: 12px; font-weight: 700; cursor: pointer; padding: 8px 0 0;
}

/* Cert alerts */
.staff-cert-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.staff-cert-row:last-child { border-bottom: none; }
.staff-cert-name { flex: 1; color: var(--text); font-weight: 600; }
.staff-cert-date { color: var(--text-muted); }
.cert-mini-badge {
  font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 6px;
}
.cert-mini-badge.cert-expired      { background: rgba(239,68,68,.2);  color: #ef4444; }
.cert-mini-badge.cert-expiring_soon { background: rgba(234,179,8,.2); color: #eab308; }
.cert-mini-badge.cert-expiring     { background: rgba(234,179,8,.2);  color: #eab308; }

/* Shoutout cards */
.staff-shoutout-card {
  display: flex; align-items: center; gap: 12px;
  padding: 10px; background: var(--bg); border-radius: 10px; margin-bottom: 8px;
}
.shout-from-av {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: #fff; flex-shrink: 0;
}
.shout-body { flex: 1; min-width: 0; }
.shout-from { font-size: 11px; color: var(--text-muted); margin-bottom: 3px; }
.shout-msg  { font-size: 13px; color: var(--text); font-style: italic; }
.shout-emoji { font-size: 20px; flex-shrink: 0; }

/* ── Maintenance Queue Rows ─────────────────────────────────────────────────── */
.maint-queue-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px; background: var(--bg); border-radius: 10px; margin-bottom: 8px;
}
.maint-q-urgency {
  width: 4px; height: 40px; border-radius: 2px; flex-shrink: 0;
}
.maint-q-body { flex: 1; min-width: 0; }
.maint-q-title { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.maint-q-meta  { font-size: 11px; color: var(--text-muted); }
.maint-done-btn {
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(34,197,94,.15); border: 1px solid rgba(34,197,94,.3);
  color: #22c55e; font-size: 13px; cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.maint-done-btn:hover { background: #22c55e; color: #fff; }
