/* ============================================================
   Bodylogic Hub — main.css — CLEAN REWRITE
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --teal:       #2BA882;
  --teal-mid:   #1D9E75;
  --teal-light: #E1F5EE;
  --burg:       #4A1E2E;
  --burg-light: #f5e8ec;
  --amber:      #EF9F27;
  --amber-light:#fef9c3;
  --border:     #e0e0e0;
  --gray-light: #f5f5f5;
  --white:      #ffffff;
  --radius:     8px;
  --radius-sm:  5px;
  --radius-lg:  12px;
  --sidebar-w:  280px;
  --nav-h:      54px;
  --nav-h-mobile: 62px;
}

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #111;
  background: #fff;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
}

img { max-width: 100%; display: block; }
a { color: var(--teal); text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: 15px; color: #111; }

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn-primary {
  background: var(--teal); color: #fff; border: none;
  border-radius: var(--radius); padding: 12px 20px;
  font-size: 15px; font-weight: 600; cursor: pointer;
}
.btn-primary:hover { background: var(--teal-mid); }
.btn-primary:disabled { background: #ccc; cursor: default; }
.btn-ghost {
  background: #fff; color: #111; border: 1.5px solid #ccc;
  border-radius: var(--radius); padding: 10px 18px;
  font-size: 14px; font-weight: 500;
}
.btn-danger {
  background: var(--burg-light); color: var(--burg);
  border: 1px solid #c8748a; border-radius: var(--radius);
  padding: 9px 16px; font-size: 14px; font-weight: 500;
}
.btn-full { width: 100%; }
.pill { padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; border: none; cursor: pointer; }
.pill-reply   { background: var(--teal-light); color: var(--teal-mid); }
.pill-resolve { background: var(--teal); color: #fff; }

/* ── FORMS ───────────────────────────────────────────────── */
.form-field { margin-bottom: 14px; }
.form-field label { display: block; font-size: 13px; font-weight: 800; color: var(--teal-mid); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.form-field input,
.form-field textarea,
.form-field select {
  width: 100%; border: 1.5px solid #ccc; border-radius: var(--radius);
  padding: 10px 12px; font-size: 15px; background: var(--gray-light); color: #111;
}
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus { outline: none; border-color: var(--teal); background: #fff; }
.form-field textarea { resize: none; }

/* Chips */
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.chip {
  padding: 6px 11px; border-radius: 20px; border: 1.5px solid #bbb;
  font-size: 12px; font-weight: 600; color: #111; background: #fff;
  cursor: pointer; transition: all 0.12s; user-select: none; white-space: nowrap;
}
/* Day chips — force all 7 onto one line */
#sb-day-chips { flex-wrap: nowrap; gap: 4px; }
#sb-day-chips .chip { padding: 6px 8px; font-size: 11px; }
.chip.on { background: var(--teal); color: #fff; border-color: var(--teal); }
.chip.burg-on { background: var(--burg); color: #fff; border-color: var(--burg); }

/* ── ALERTS ──────────────────────────────────────────────── */
.alert { padding: 12px 16px; border-radius: var(--radius); font-size: 14px; margin-bottom: 14px; font-weight: 500; }
.alert-error   { background: var(--burg-light); color: var(--burg); border: 1px solid #c8748a; }
.alert-success { background: var(--teal-light); color: var(--teal-mid); border: 1px solid var(--teal); }
.alert-warn    { background: var(--amber-light); color: #856404; border: 1px solid var(--amber); }

/* ── BADGES ──────────────────────────────────────────────── */
.badge { font-size: 11px; padding: 3px 8px; border-radius: 10px; font-weight: 600; }
.badge-pending { background: var(--amber-light); color: #856404; }
.badge-alert   { background: var(--burg-light); color: var(--burg); }
.badge-new     { background: var(--teal-light); color: var(--teal-mid); }
.badge-gray    { background: var(--gray-light); color: #555; }

/* ── LOGIN ───────────────────────────────────────────────── */
.login-body { background: #f0f4f8; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-wrap { width: 100%; max-width: 400px; }
.login-card { background: #fff; border-radius: var(--radius-lg); padding: 40px 32px 32px; box-shadow: 0 4px 20px rgba(0,0,0,0.1); }
.login-logo { text-align: center; margin-bottom: 32px; }
.login-logo img { height: auto; max-height: 60px; max-width: 240px; width: auto; margin: 0 auto; object-fit: contain; display: block; }
.login-sub { font-size: 12px; color: #666; letter-spacing: 1px; text-transform: uppercase; margin-top: 6px; }
.forgot-link { display: block; text-align: center; font-size: 14px; color: var(--teal); margin-top: 12px; }
.login-footer { text-align: center; font-size: 13px; color: #888; margin-top: 32px; }

/* ── OVERLAYS ────────────────────────────────────────────── */
.overlay-full { position: fixed; inset: 0; z-index: 1000; background: #fff; overflow-y: auto; }

/* First login */
.first-login-wrap { display: flex; flex-direction: column; min-height: 100vh; }
.first-hdr { background: var(--burg); padding: 32px 20px 24px; text-align: center; }
.first-logo { height: 34px; width: auto; margin: 0 auto 8px; display: block; }
.first-welcome-sub { font-size: 22px; font-weight: 700; color: #fff; letter-spacing: 0.01em; }
.first-body { padding: 24px 20px; flex: 1; }
.first-name { font-size: 18px; font-weight: 600; color: #111; margin-bottom: 8px; }
.first-desc { font-size: 15px; color: #444; margin-bottom: 24px; line-height: 1.5; }
.step-list { margin-bottom: 24px; }
.step-item { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; opacity: 0.5; }
.step-item.done, .step-item.active { opacity: 1; }
.step-num { width: 26px; height: 26px; border-radius: 50%; background: var(--gray-light); color: #555; font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px; }
.step-item.done .step-num { background: var(--teal-light); color: var(--teal-mid); }
.step-item.active .step-num { background: var(--teal); color: #fff; }
.step-text { font-size: 14px; color: #111; line-height: 1.4; }
.step-text span { color: #555; font-size: 13px; }
.setup-card { max-width: 440px; margin: 0 auto; padding: 36px 28px; }
.setup-hdr { text-align: center; margin-bottom: 28px; }
.setup-logo { height: 30px; width: auto; margin: 0 auto; }
.setup-card h2 { font-size: 22px; font-weight: 600; margin-bottom: 10px; color: #111; }
.setup-desc { font-size: 15px; color: #444; margin-bottom: 22px; line-height: 1.5; }
.pw-rules { background: var(--teal-light); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 18px; }
.pr-title { font-size: 11px; font-weight: 700; color: var(--teal-mid); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.8px; }
.pw-rule { font-size: 13px; color: #555; padding: 2px 0; }
.pw-rule::before { content: '○ '; font-size: 10px; }
.pw-rule.met { color: var(--teal); }
.pw-rule.met::before { content: '✓ '; }

/* Greeting */
.greeting-overlay { background: #fff; display: flex; align-items: center; justify-content: center; }
.greeting-wrap { text-align: center; padding: 40px 28px; max-width: 420px; width: 100%; }
.greeting-logo { height: auto; width: auto; max-height: 50px; max-width: 300px; object-fit: contain; margin: 0 auto 32px; display: block; }
.greeting-text { font-size: 26px; font-weight: 600; color: #111; margin-bottom: 8px; line-height: 1.3; }
.greeting-date { font-size: 16px; color: #555; margin-bottom: 28px; }
.greeting-shift { background: var(--teal-light); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 28px; }
.gs-label { font-size: 11px; color: var(--teal-mid); font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 4px; }
.gs-val { font-size: 16px; color: var(--teal-mid); font-weight: 600; }

/* Announcement takeover */
.takeover-wrap { display: flex; flex-direction: column; min-height: 100vh; }
.takeover-hdr { background: var(--burg); padding: 22px 18px; }
.takeover-label { font-size: 11px; color: rgba(255,255,255,0.7); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 8px; }
.takeover-title { font-size: 20px; font-weight: 600; color: #fff; line-height: 1.3; margin-bottom: 6px; }
.takeover-meta { font-size: 13px; color: rgba(255,255,255,0.6); }
.takeover-body { padding: 18px; flex: 1; font-size: 15px; line-height: 1.7; color: #111; }
.takeover-scroll-hint { text-align: center; font-size: 13px; color: #888; padding: 8px; }
.takeover-footer { padding: 16px 18px; border-top: 1px solid var(--border); background: #fff; position: sticky; bottom: 0; }
.ack-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; cursor: pointer; }
.ack-check { width: 22px; height: 22px; border-radius: 5px; border: 2px solid var(--teal); display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; }
.ack-check.checked { background: var(--teal); color: #fff; }
.ack-label { font-size: 14px; color: #111; font-weight: 500; }

/* ── APP SHELL ───────────────────────────────────────────── */
.app-body { overflow: hidden; height: 100vh; }


/* Desktop nav */
.desktop-nav {
  display: none;
  height: var(--nav-h);
  background: #fff;
  border-bottom: 2.5px solid var(--teal);
  align-items: center;
  padding: 0 24px;
  gap: 8px;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
}
.dn-logo { flex-shrink: 0; display: flex; align-items: center; margin-right: 20px; }
.dn-logo-full  { height: 28px; width: auto; min-width: unset; max-width: unset; flex-shrink: 0; display: block; }
.dn-logo-small { height: 32px; width: auto; min-width: unset; max-width: unset; flex-shrink: 0; display: none; }
@media (max-width: 1024px) {
  .dn-logo-full  { display: none; }
  .dn-logo-small { display: block; }
}
@media (max-width: 767px) {
  .dn-logo-full  { display: none; }
  .dn-logo-small { display: none; }
}
.dn-links { display: flex; gap: 4px; flex: 1; }
.dn-link {
  color: #111; font-size: 14px; font-weight: 500;
  padding: 7px 13px; border-radius: var(--radius-sm);
  transition: all 0.12s;
}
.dn-link:hover { background: var(--gray-light); }
.dn-link.active { background: var(--teal-light); color: var(--teal-mid); font-weight: 700; }
.nav-badge {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--burg); color: #fff;
  font-size: 10px; font-weight: 700;
  width: 18px; height: 18px; border-radius: 50%;
  margin-left: 4px; vertical-align: middle;
}
.dn-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.dn-user { display: flex; align-items: center; gap: 8px; font-size: 15px; color: #111; font-weight: 600; }
.user-av { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 11px; font-weight: 700; }
.signout-link { font-size: 13px; color: #555; }

/* App layout — sidebar RIGHT */
.app-layout { display: flex; height: 100vh; padding-top: 0; padding-bottom: calc(var(--nav-h-mobile) + env(safe-area-inset-bottom)); overflow: hidden; position: fixed; width: 100%; }
.app-content { flex: 1; overflow-y: scroll; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.app-section { display: none; min-height: 100%; }
.app-section.active { display: block; padding-bottom: calc(var(--nav-h-mobile) + env(safe-area-inset-bottom) + 16px); }

/* Sidebar — RIGHT side */
.pinned-sidebar {
  width: var(--sidebar-w);
  border-left: 3px solid var(--teal);
  background: #fff;
  display: none;
  flex-direction: column;
  overflow: hidden;
  box-shadow: -3px 0 12px rgba(0,0,0,0.06);
}
.pinned-sidebar.visible { display: flex; }

/* Sidebar cream background and tab bubbles */
.pinned-sidebar { background: #f0f4f8 !important; }
.ps-header { flex-shrink: 0; background: #f0f4f8; border-bottom: 2px solid var(--border); display: flex; }
.ps-tab {
  flex: 1; padding: 14px 4px; font-size: 12px; font-weight: 800;
  color: #666; background: #fff; border: none;
  cursor: pointer; transition: all 0.15s; text-align: center;
  letter-spacing: 1px; text-transform: uppercase;
  position: relative;
}
.ps-tab.active { color: #111; background: #f0f4f8; }
.ps-tab:hover:not(.active) { background: #f7f7f7; color: #333; }
.ps-tab:first-child { border-right: 1px solid var(--border); }
.ps-panel { display: none; flex-direction: column; flex: 1; overflow: hidden; }
.ps-panel.active { display: flex; }
.ps-feed { flex: 1; overflow-y: auto; padding: 12px; }
#ps-calllog { overflow-y: auto; padding: 12px; flex-direction: column; }
#ps-calllog.active { display: flex; }
.ps-compose {
  border-top: 1px solid var(--border); padding: 10px;
  display: flex; align-items: flex-end; gap: 8px;
  background: #fff; flex-shrink: 0; transition: background 0.2s;
}

.ps-compose.replying { background: var(--teal) !important; }
.ps-compose.replying textarea { background: #fff !important; border-color: rgba(255,255,255,0.6) !important; color: #111 !important; }
.ps-compose.replying textarea::placeholder { color: #999 !important; }
.ps-compose.replying .ps-send-btn { background: #fff !important; color: var(--teal) !important; }
#ps-reply-bar + .ps-compose { border-top: none; }
.ps-compose textarea {
  flex: 1; border: 1.5px solid #ccc; border-radius: var(--radius);
  padding: 8px 10px; font-size: 14px; color: #111; resize: none;
  background: var(--gray-light); min-height: 36px; max-height: 80px;
}
.ps-compose textarea:focus { outline: none; border-color: var(--teal); background: #fff; }
.ps-send-btn {
  width: 34px; height: 34px; border-radius: 50%; background: var(--teal);
  border: none; color: #fff; font-size: 18px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}

/* Mobile bottom nav */
.mobile-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: calc(var(--nav-h-mobile) + env(safe-area-inset-bottom)); background: #fff;
  border-top: 1px solid var(--border); display: flex; z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}
.mn-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer; padding: 6px 2px 4px; -webkit-tap-highlight-color: transparent; }
.mn-icon { font-size: 20px; line-height: 1; }
.mn-icon-wrap { position: relative; }
.mn-label { font-size: 10px; color: #666; font-weight: 500; }
.mn-item.active .mn-label { color: var(--teal); font-weight: 700; }
.mn-badge { position: absolute; top: -4px; right: -6px; width: 15px; height: 15px; background: var(--burg); border-radius: 50%; color: #fff; font-size: 9px; display: flex; align-items: center; justify-content: center; }

/* ── PAGE HEADERS ────────────────────────────────────────── */
.page-hdr {
  padding: 14px 18px 10px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; background: #fff; z-index: 10;
}
.page-hdr h2 { font-size: 20px; font-weight: 700; color: #111; }
.page-hdr .btn-sm { background: var(--teal); color: #fff; border: none; border-radius: 6px; padding: 7px 14px; font-size: 13px; font-weight: 600; }
.sec-label { padding: 10px 18px 5px; font-size: 12px; font-weight: 700; color: #333; letter-spacing: 0.8px; text-transform: uppercase; }

/* ── SCHEDULE ────────────────────────────────────────────── */
.view-toggle { display: flex; margin: 10px 14px 8px; background: var(--gray-light); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.vt-btn { flex: 1; text-align: center; font-size: 14px; font-weight: 600; padding: 8px 0; color: #333; background: none; border: none; cursor: pointer; }
.vt-btn.active { background: var(--teal); color: #fff; border-radius: var(--radius-sm); }
.week-bar { display: flex; align-items: center; justify-content: space-between; padding: 8px 18px 6px; }
.week-label { font-size: 16px; font-weight: 700; color: #111; }
.week-nav-btns { display: flex; gap: 6px; }
.week-nav-btn { width: 30px; height: 30px; border-radius: var(--radius-sm); background: var(--gray-light); border: 1px solid var(--border); font-size: 16px; color: #333; display: flex; align-items: center; justify-content: center; cursor: pointer; }

/* 3-day view */
.three-day-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 0 14px 14px; }
.td-col { display: flex; flex-direction: column; border-radius: 12px; border: 1.5px solid #e0e0e0; overflow: hidden; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.05); }
.td-hdr { text-align: center; padding: 12px 8px 10px; background: #f2f2f2; border-bottom: 1.5px solid #e0e0e0; }
.td-day-label { font-size: 12px; color: #666; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; }
.td-day-num { font-size: 32px; font-weight: 700; color: #111; line-height: 1.15; }
.td-body { display: flex; flex-direction: column; gap: 8px; padding: 10px; }
.shift-card { border-radius: 10px; padding: 14px 10px; font-weight: 700; text-align: center; line-height: 1.3; cursor: pointer; }
.shift-card .sh-type { font-size: 13px; font-weight: 500; opacity: 0.9; margin-top: 4px; }
.shift-card.open { background: #f5f5f5; color: #bbb; border: 1px dashed #ddd; padding: 20px 10px; }

/* Week view */
.week-grid-hdr { display: none; }
.week-cells { display: grid; grid-template-columns: repeat(7, 1fr); padding: 0 14px 14px; gap: 12px; }
.wc { border-radius: 10px; overflow: hidden; min-height: 240px; background: #fff; border: 1.5px solid #e0e0e0; display: flex; flex-direction: column; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.wc-hdr { text-align: center; padding: 10px 4px 8px; background: #f2f2f2; border-bottom: 1.5px solid #e0e0e0; }
.wc-dow { font-size: 11px; color: #555; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.wc-num { font-size: 22px; color: #111; font-weight: 700; line-height: 1.2; margin-top: 2px; }
.wc-body { padding: 8px 6px; display: flex; flex-direction: column; gap: 6px; }
.wsb { border-radius: 7px; padding: 9px 6px; margin: 0; font-weight: 700; text-align: center; cursor: pointer; line-height: 1.3; }
.wsb .wsb-name { font-size: 12px; font-weight: 700; }
.wsb .wsb-type { font-size: 11px; font-weight: 500; opacity: 0.9; margin-top: 2px; }

/* Month view cells */
.week-cells.month-grid { gap: 7px; }
.week-cells.month-grid .wc { min-height: 90px; border-radius: 7px; border: 1px solid #e8e8e8; }
.week-cells.month-grid .wc-hdr { padding: 8px 4px 6px; }
.week-cells.month-grid .wc-num { font-size: 15px; }
.week-cells.month-grid .wc-dow { display: none; }
.week-cells.month-grid .wsb { padding: 4px 4px; border-radius: 5px; }
.week-cells.month-grid .wsb .wsb-name { font-size: 11px; }
.week-cells.month-grid .wsb .wsb-type { font-size: 10px; }

/* Day-of-week colors — Mon through Sun */
/* Mon — purple */
.dow-mon { border-color: #9b87e8 !important; }
.dow-mon .td-hdr, .dow-mon .wc-hdr { background: #f3f0ff; border-bottom-color: #9b87e8 !important; }
.dow-mon.today .td-day-num, .dow-mon.today .wc-num { color: #9b87e8; }
.dow-mon.today { border-width: 3px !important; }

/* Tue — blue */
.dow-tue { border-color: #60b8e8 !important; }
.dow-tue .td-hdr, .dow-tue .wc-hdr { background: #f0f9ff; border-bottom-color: #60b8e8 !important; }
.dow-tue.today .td-day-num, .dow-tue.today .wc-num { color: #60b8e8; }
.dow-tue.today { border-width: 3px !important; }

/* Wed — green */
.dow-wed { border-color: #4db87a !important; }
.dow-wed .td-hdr, .dow-wed .wc-hdr { background: #f0fdf4; border-bottom-color: #4db87a !important; }
.dow-wed.today .td-day-num, .dow-wed.today .wc-num { color: #4db87a; }
.dow-wed.today { border-width: 3px !important; }

/* Thu — amber */
.dow-thu { border-color: #d4a030 !important; }
.dow-thu .td-hdr, .dow-thu .wc-hdr { background: #fffbeb; border-bottom-color: #d4a030 !important; }
.dow-thu.today .td-day-num, .dow-thu.today .wc-num { color: #d4a030; }
.dow-thu.today { border-width: 3px !important; }

/* Fri — red */
.dow-fri { border-color: #e05555 !important; }
.dow-fri .td-hdr, .dow-fri .wc-hdr { background: #fff4f4; border-bottom-color: #e05555 !important; }
.dow-fri.today .td-day-num, .dow-fri.today .wc-num { color: #e05555; }
.dow-fri.today { border-width: 3px !important; }

/* Sat — teal */
.dow-sat { border-color: #1D9E75 !important; }
.dow-sat .td-hdr, .dow-sat .wc-hdr { background: #f0fdf8; border-bottom-color: #1D9E75 !important; }
.dow-sat.today .td-day-num, .dow-sat.today .wc-num { color: #1D9E75; }
.dow-sat.today { border-width: 3px !important; }

/* Sun — slate */
.dow-sun { border-color: #8896aa !important; }
.dow-sun .td-hdr, .dow-sun .wc-hdr { background: #f4f6f9; border-bottom-color: #8896aa !important; }
.dow-sun.today .td-day-num, .dow-sun.today .wc-num { color: #8896aa; }
.dow-sun.today { border-width: 3px !important; }

/* hub-badge removed */

/* Mobile top bar */
.mobile-top-bar { display: none; }
@media (max-width: 767px) {
  .mobile-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f2f2f2;
    border-bottom: 1px solid #e0e0e0;
    padding: 5px 14px;
    min-height: 36px;
    position: sticky;
    top: 0;
    z-index: 50;
  }
  .mtb-left { display: flex; align-items: center; gap: 7px; }
  .mtb-av { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 8px; font-weight: 700; flex-shrink: 0; }
  .mtb-name { font-size: 12px; font-weight: 600; color: #444; }
  .mtb-right { display: flex; align-items: center; gap: 14px; }
  .mtb-icon { position: relative; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
  .mtb-icon svg { width: 18px; height: 18px; stroke: #777; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .mtb-badge { position: absolute; top: 1px; right: 1px; width: 12px; height: 12px; border-radius: 50%; background: #e05555; border: 1.5px solid #f2f2f2; display: flex; align-items: center; justify-content: center; font-size: 7px; font-weight: 700; color: #fff; }
  .mtb-signout { font-size: 11px; color: #555; text-decoration: none; padding: 4px 0; font-weight: 600; }
  .mtb-icon.active svg { stroke: #2BA882; }
}

/* Mobile compact schedule header */
.sched-add-icon { display: none; }
.sched-add-full { display: inline-flex; }
.sched-hdr-left { display: flex; align-items: center; gap: 10px; }
.sched-hdr-nav-mobile { display: none; }
.sched-today-mobile { display: none !important; }
.sched-row2 { display: flex; align-items: stretch; justify-content: space-between; padding: 6px 18px 24px; gap: 12px; }
.sched-row2 .view-toggle { margin: 0; min-width: 340px; }
.sched-row2 .vt-btn { padding: 8px 20px; font-size: 14px; }
.sched-row2-right { display: flex; align-items: stretch; gap: 8px; }
.sched-date-group { display: flex; align-items: stretch; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--gray-light); }
.sched-date-group .week-nav-btn { background: transparent; border: none; border-radius: 0; width: 32px; height: 100%; min-height: 36px; font-size: 16px; color: #333; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.sched-date-group .week-nav-btn:first-child { border-right: 1px solid var(--border); }
.sched-date-group .week-nav-btn:last-child { border-left: 1px solid var(--border); }
.sched-date-group .week-label { font-size: 15px; font-weight: 700; color: #111; min-width: 90px; text-align: center; display: flex; align-items: center; justify-content: center; padding: 0 8px; background: #fff; }
.today-nav-btn { font-size: 14px; font-weight: 600; padding: 8px 16px; background: transparent; border: 1px solid var(--border); border-radius: var(--radius-sm); color: #2BA882; cursor: pointer; white-space: nowrap; display: flex; align-items: center; }

@media (max-width: 767px) {
  .page-hdr { padding: 10px 14px 8px; border-bottom: none; display: flex; align-items: center; justify-content: space-between; }
  .sched-add-full { display: none !important; }
  .sched-add-icon {
    display: flex;
    width: 30px; height: 30px;
    border-radius: 50%;
    background: #2BA882;
    color: #fff;
    font-size: 22px;
    font-weight: 300;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    line-height: 1;
    padding: 0;
  }
  .sched-row2 {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 14px 8px;
    border-bottom: 1px solid #eee;
  }
  .sched-row2 .view-toggle { margin: 0; flex: 1; min-width: 0; }
  .sched-row2 .vt-btn { padding: 6px 0; font-size: 12px; }
  .sched-row2 { align-items: center; }
  .sched-row2-right { display: none; }
  .sched-hdr-nav-mobile { display: flex; align-items: center; gap: 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--gray-light); }
  .sched-hdr-nav-mobile .week-nav-btn { width: 26px !important; height: 30px !important; font-size: 13px !important; border: none !important; background: var(--gray-light) !important; border-radius: 0 !important; }
  .sched-hdr-nav-mobile .week-nav-btn:first-child { border-right: 1px solid var(--border) !important; }
  .sched-hdr-nav-mobile .week-nav-btn:last-child { border-left: 1px solid var(--border) !important; }
  .sched-hdr-nav-mobile .week-label { font-size: 11px !important; font-weight: 600; color: #555; min-width: 58px; text-align: center; background: #fff !important; display: flex; align-items: center; justify-content: center; padding: 0 6px; }
  .sched-today-mobile { display: flex !important; font-size: 12px !important; padding: 6px 10px !important; }
  .sched-row2 .view-toggle { min-width: 0; flex: 1; max-width: 72%; }
  .sched-row2-right { display: none !important; }
  .sched-hdr-nav .week-label { font-size: 11px !important; font-weight: 600; color: #555; white-space: nowrap; min-width: 58px; text-align: center; }
  .sched-hdr-nav .week-nav-btn { width: 26px !important; height: 26px !important; font-size: 13px !important; }
  .page-hdr .sched-hdr-nav .today-nav-btn { font-size: 10px !important; padding: 0 7px !important; }
}



/* Mobile week view — stacked rows with horizontal chips */
@media (max-width: 767px) {
  .week-cells:not(.month-grid) {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 0 14px 14px;
  }
  .week-cells:not(.month-grid) .wc {
    flex-direction: row;
    min-height: 0;
    align-items: stretch;
    border-radius: 10px;
  }
  .week-cells:not(.month-grid) .wc-hdr {
    flex-shrink: 0;
    width: 54px;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 4px;
    border-bottom: none;
    border-right: 1.5px solid #e0e0e0;
    background: #f2f2f2;
  }
  .wc.today .wc-hdr { border-right-color: inherit; }
  .dow-mon .wc-hdr { border-right-color: #9b87e8; }
  .dow-tue .wc-hdr { border-right-color: #60b8e8; }
  .dow-wed .wc-hdr { border-right-color: #4db87a; }
  .dow-thu .wc-hdr { border-right-color: #d4a030; }
  .dow-fri .wc-hdr { border-right-color: #e05555; }
  .dow-sat .wc-hdr { border-right-color: #1D9E75; }
  .dow-sun .wc-hdr { border-right-color: #8896aa; }
  .wc-dow { font-size: 10px; }
  .wc-num { font-size: 20px; }
  .week-cells:not(.month-grid) .wc-body {
    display: flex;
    flex-direction: row;
    gap: 6px;
    padding: 8px;
    overflow-x: auto;
    flex: 1;
    scrollbar-width: none;
  }
  .week-cells:not(.month-grid) .wc-body::-webkit-scrollbar { display: none; }
  .week-cells:not(.month-grid) .wsb {
    flex-shrink: 0;
    padding: 8px 10px;
    border-radius: 8px;
    align-self: center;
  }
  .wsb .wsb-name { font-size: 12px; }
  .wsb .wsb-type { font-size: 10px; }
}

/* Month today — tint header, color number, no colored border */
.week-cells.month-grid .wc.today { border: 2.5px solid #e0e0e0; }
.week-cells.month-grid .dow-mon.today .wc-num { color: #9b87e8; }
.week-cells.month-grid .dow-tue.today .wc-num { color: #60b8e8; }
.week-cells.month-grid .dow-wed.today .wc-num { color: #4db87a; }
.week-cells.month-grid .dow-thu.today .wc-num { color: #d4a030; }
.week-cells.month-grid .dow-fri.today .wc-num { color: #e05555; }
.week-cells.month-grid .dow-sat.today .wc-num { color: #1D9E75; }
.week-cells.month-grid .dow-sun.today .wc-num { color: #8896aa; }

/* Draft bar */
.draft-bar { background: var(--amber-light); border: 1px solid var(--amber); border-radius: var(--radius); padding: 8px 14px; margin: 0 14px 10px; display: flex; align-items: center; justify-content: space-between; font-size: 14px; color: #856404; font-weight: 500; }
.draft-bar button { background: var(--teal); color: #fff; border: none; border-radius: 6px; padding: 5px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }

/* Color legend */
.color-legend { display: flex; flex-wrap: wrap; gap: 10px; padding: 10px 18px; }
.legend-item { display: flex; align-items: center; gap: 5px; font-size: 13px; color: #333; font-weight: 500; }
.legend-dot { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }

/* ── MY SHIFT ────────────────────────────────────────────── */
.shift-tag { display: inline-block; background: var(--teal-light); color: var(--teal-mid); font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 10px; margin-top: 4px; }
.section-tabs { display: flex; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.section-tabs::-webkit-scrollbar { display: none; }
.stab { flex-shrink: 0; padding: 12px 14px; font-size: 14px; font-weight: 600; color: #444; background: none; border: none; border-bottom: 3px solid transparent; cursor: pointer; white-space: nowrap; }
.stab.active { color: var(--teal); border-bottom-color: var(--teal); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── DESK LOG ────────────────────────────────────────────── */
.log-feed { padding: 14px 24px; }
.log-date-divider { text-align: center; font-size: 12px; color: #666; margin: 8px 0 10px; position: relative; }
.log-date-divider::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--border); }
.log-date-divider span { background: #fff; padding: 0 10px; position: relative; }
.log-entry { margin-bottom: 12px; }
.le-row { display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; }
.le-name { font-size: 15px; font-weight: 700; color: var(--teal); white-space: nowrap; }
.le-text { font-size: 15px; color: #111; line-height: 1.6; }
.le-meta { display: flex; align-items: center; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.le-time { font-size: 12px; color: #666; }
.log-replies { margin-top: 6px; margin-left: 12px; padding-left: 10px; border-left: 2px solid var(--teal-light); }
.reply-entry { margin-bottom: 6px; }
.re-name { font-size: 13px; font-weight: 700; color: var(--teal-mid); }
.re-text { font-size: 13px; color: #222; }
.re-time { font-size: 11px; color: #666; margin-top: 2px; }
.resolved-collapsed { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: #f0fdf8; border-radius: var(--radius-sm); margin-bottom: 8px; cursor: pointer; border: 1px solid #c0e8d5; transition: background 0.15s; }
.resolved-collapsed:hover { background: #e0f5ec; }
.rc-icon { font-size: 12px; color: var(--teal); flex-shrink: 0; }
.rc-text { font-size: 12px; color: #555; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.compose-bar { border-top: 1px solid var(--border); padding: 12px 24px; display: flex; align-items: flex-end; gap: 10px; background: #fff; position: sticky; bottom: 0; flex-shrink: 0; }
.compose-bar textarea { flex: 1; border: 1.5px solid #ccc; border-radius: var(--radius); padding: 10px 14px; font-size: 15px; resize: none; background: var(--gray-light); min-height: 48px; max-height: 120px; color: #111; }
.compose-send { width: 38px; height: 38px; border-radius: 50%; background: var(--teal); border: none; color: #fff; font-size: 18px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; cursor: pointer; }
.reply-to-bar { background: #f0fdf8; border-left: 3px solid var(--teal); padding: 6px 12px; margin: 0 18px 6px; border-radius: 0 6px 6px 0; font-size: 13px; color: var(--teal-mid); display: flex; align-items: center; justify-content: space-between; font-weight: 500; }
.cancel-reply { color: #888; cursor: pointer; font-size: 14px; }

/* ── DIRECTORY ───────────────────────────────────────────── */
.dir-list { padding: 0 18px; }
.dir-item { border-bottom: 1px solid #f0f0f0; }
.dir-item:last-child { border-bottom: none; }
.dir-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.dir-name-btn { font-size: 15px; font-weight: 600; color: #111; cursor: pointer; flex: 1; }
.dir-actions { display: flex; gap: 6px; flex-shrink: 0; }
.d-btn { width: 34px; height: 32px; border-radius: 6px; border: 1.5px solid #2BA882; background: none; color: #111; display: flex; align-items: center; justify-content: center; font-size: 16px; text-decoration: none; cursor: pointer; font-weight: 700; }
.d-btn.call  { background: var(--teal-light); border-color: var(--teal); }
.d-btn.text  { background: #f0fdf8; border-color: var(--teal); }
.d-btn.email { background: var(--teal-light); border-color: var(--teal); }
.dir-detail { background: #f9fffe; border-radius: var(--radius); padding: 10px 12px; margin-bottom: 10px; border: 1px solid #e0f5ec; }
.dd-row { display: flex; align-items: center; gap: 12px; padding: 4px 0; }
.dd-label { font-size: 13px; color: #888; font-weight: 500; min-width: 44px; flex-shrink: 0; }
.dd-val { font-size: 14px; color: var(--teal); font-weight: 600; }
.imp-ic { width: 32px; height: 32px; border-radius: 8px; background: var(--burg-light); display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; }

/* ── ANNOUNCEMENTS ───────────────────────────────────────── */
.ann-list { padding: 0 18px; }
.ann-item { border-bottom: 1px solid #f0f0f0; padding: 14px 0; cursor: pointer; }
.ann-item:last-child { border-bottom: none; }
.ann-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.ann-title { font-size: 15px; font-weight: 600; color: #111; flex: 1; line-height: 1.4; }
.ann-meta { font-size: 13px; color: #444; }

/* ── REPORTS ─────────────────────────────────────────────── */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 0 18px 14px; }
@media (max-width: 480px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
.stat-card { background: var(--gray-light); border-radius: var(--radius); padding: 12px; border: 1px solid var(--border); }
.stat-num { font-size: 26px; font-weight: 700; line-height: 1; margin-bottom: 4px; }
.stat-label { font-size: 12px; color: #444; font-weight: 500; }
.chart-section { padding: 0 18px 14px; }
.chart-label { font-size: 12px; font-weight: 700; color: #333; letter-spacing: 0.8px; text-transform: uppercase; margin-bottom: 10px; }
.stacked-bar-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.sbar-day { font-size: 12px; color: #333; width: 30px; text-align: right; flex-shrink: 0; font-weight: 600; }
.sbar-track { flex: 1; height: 18px; border-radius: 4px; overflow: hidden; display: flex; }
.sbar-seg { height: 100%; }
.seg-booked { background: var(--teal); }
.seg-nobook { background: var(--burg); }
.seg-later  { background: var(--amber); }
.seg-other  { background: #d4d4d4; }
.sbar-val { font-size: 12px; color: #333; width: 22px; font-weight: 600; }
.legend-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.export-btn { display: block; width: calc(100% - 36px); margin: 0 18px 10px; background: #fff; border: 1.5px solid var(--teal); border-radius: var(--radius); padding: 12px; font-size: 14px; font-weight: 600; color: var(--teal); text-align: center; cursor: pointer; }
.export-btn.burg { border-color: var(--burg); color: var(--burg); }

/* ── ADMIN ───────────────────────────────────────────────── */
.admin-section { margin-bottom: 22px; }
.admin-section-hdr { padding: 12px 18px 8px; display: flex; align-items: center; justify-content: space-between; }
.admin-section-hdr h3 { font-size: 16px; font-weight: 700; color: #111; }
.staff-item { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid #f0f0f0; }
.staff-av { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.staff-info { flex: 1; }
.staff-name { font-size: 15px; font-weight: 700; color: #111; }
.staff-meta { font-size: 13px; color: #444; margin-top: 1px; }
.staff-edit-panel { background: #f9fffe; border-radius: var(--radius); padding: 14px; margin: 0 18px 12px; border: 1px solid #e0f5ec; }
.edit-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--border); }
.edit-row:last-child { border-bottom: none; }
.er-label { font-size: 14px; color: #333; font-weight: 500; }
.er-val { font-size: 14px; color: #111; }
.toggle { width: 36px; height: 22px; border-radius: 11px; background: var(--teal); position: relative; cursor: pointer; border: none; flex-shrink: 0; transition: background 0.2s; }
.toggle::after { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; background: #fff; top: 2px; right: 2px; transition: right 0.2s; }
.toggle.off { background: #ddd; }
.toggle.off::after { right: auto; left: 2px; }
.color-swatch { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--border); cursor: pointer; }
.setting-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-bottom: 1px solid #f0f0f0; }
.setting-label { font-size: 15px; color: #111; font-weight: 500; }
.setting-sub { font-size: 13px; color: #444; margin-top: 2px; }
.setting-action { font-size: 13px; color: var(--teal); cursor: pointer; font-weight: 600; }

/* ── SEARCH ──────────────────────────────────────────────── */
.search-bar { padding: 10px 18px 6px; }
.search-bar input { width: 100%; border: 1.5px solid #ccc; border-radius: var(--radius); padding: 10px 14px; font-size: 15px; background: var(--gray-light); color: #111; }

/* ── SCRIPTS ─────────────────────────────────────────────── */
.cat-list { padding: 0 18px; }
.cat-item { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid #f0f0f0; cursor: pointer; }
.cat-item:last-child { border-bottom: none; }
.cat-ic { width: 38px; height: 38px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.cat-name { font-size: 15px; font-weight: 600; color: #111; flex: 1; }
.cat-count { font-size: 13px; color: #444; }
.script-item { padding: 12px 0; border-bottom: 1px solid #f0f0f0; cursor: pointer; }
.script-item:last-child { border-bottom: none; }
.si-q { font-size: 15px; font-weight: 600; color: #111; margin-bottom: 3px; line-height: 1.3; }
.si-preview { font-size: 13px; color: #444; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.script-detail { padding: 18px; }
.sd-q { font-size: 18px; font-weight: 700; color: #111; margin-bottom: 14px; line-height: 1.4; }
.sd-answer { font-size: 15px; color: #111; line-height: 1.8; white-space: pre-line; }
.sd-tip { background: var(--teal-light); border-radius: var(--radius); padding: 12px 14px; margin-top: 16px; }
.tip-label { font-size: 11px; font-weight: 700; color: var(--teal-mid); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 5px; }
.tip-text { font-size: 14px; color: var(--teal-mid); line-height: 1.6; }
.suggest-bar { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: #f9fffe; border-top: 1px solid #e0f5ec; cursor: pointer; }
.suggest-ic { width: 34px; height: 34px; border-radius: 50%; background: var(--teal-light); display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.suggest-label { font-size: 14px; font-weight: 600; color: var(--teal); }
.suggest-sub { font-size: 12px; color: #444; }

/* ── COVERAGE ────────────────────────────────────────────── */
.action-sheet { background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--border); overflow: hidden; margin-bottom: 12px; }
.as-item { padding: 16px 18px; border-bottom: 1px solid #f0f0f0; display: flex; align-items: center; gap: 14px; cursor: pointer; }
.as-item:last-child { border-bottom: none; }
.as-item:hover { background: var(--gray-light); }
.as-ic { width: 38px; height: 38px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.as-ic.t { background: var(--teal-light); }
.as-ic.b { background: var(--burg-light); }
.as-label { font-size: 15px; font-weight: 600; color: #111; }
.as-sub { font-size: 13px; color: #444; }
.confirm-wrap { min-height: 400px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 36px 28px; text-align: center; }
.confirm-ic { width: 64px; height: 64px; border-radius: 50%; background: var(--teal-light); display: flex; align-items: center; justify-content: center; font-size: 28px; margin-bottom: 18px; }
.confirm-title { font-size: 18px; font-weight: 700; color: #111; margin-bottom: 10px; }
.confirm-sub { font-size: 15px; color: #444; line-height: 1.6; margin-bottom: 22px; }
.confirm-tag { background: var(--burg-light); color: var(--burg); font-size: 14px; font-weight: 600; padding: 8px 18px; border-radius: 20px; display: inline-block; margin-bottom: 22px; }
.staff-select-list { margin-bottom: 14px; }
.ss-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f0f0f0; cursor: pointer; }
.ss-item:last-child { border-bottom: none; }
.ss-av { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.ss-name { font-size: 15px; color: #111; flex: 1; font-weight: 500; }
.ss-check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 12px; }
.ss-check.on { background: var(--teal); border-color: var(--teal); color: #fff; }

/* ── PRODUCT CHECK ───────────────────────────────────────── */
.check-item { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-bottom: 1px solid #f0f0f0; }
.check-item:last-child { border-bottom: none; }
.ci-name { font-size: 15px; color: #111; flex: 1; font-weight: 500; }
.ci-btns { display: flex; gap: 8px; }
.ci-btn { width: 38px; height: 34px; border-radius: var(--radius-sm); border: 1.5px solid #ccc; background: var(--gray-light); font-size: 15px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.ci-btn.yes { background: var(--teal-light); border-color: var(--teal); }
.ci-btn.no  { background: var(--burg-light); border-color: var(--burg); }

/* ── PENDING REQUESTS ────────────────────────────────────── */
.pending-card { background: var(--gray-light); border-radius: var(--radius); padding: 14px; margin-bottom: 10px; border: 1px solid var(--border); }
.pc-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px; }
.pc-name { font-size: 15px; font-weight: 700; color: #111; }
.pc-detail { font-size: 14px; color: #333; margin-bottom: 6px; }
.pc-cover { font-size: 14px; color: var(--teal); font-weight: 600; margin-bottom: 10px; }
.pc-actions { display: flex; gap: 8px; }
.pc-btn { flex: 1; padding: 9px 4px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: #fff; font-size: 13px; font-weight: 600; cursor: pointer; text-align: center; color: #111; }
.pc-btn.approve { background: var(--teal); color: #fff; border-color: var(--teal); }
.pc-btn.deny    { background: var(--burg-light); color: var(--burg); border-color: #c8748a; }

/* ── MISC ────────────────────────────────────────────────── */
.loading { text-align: center; padding: 48px 20px; color: #444; font-size: 15px; }
.loading::before { content: ''; display: block; width: 28px; height: 28px; border: 3px solid var(--border); border-top-color: var(--teal); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto 12px; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { text-align: center; padding: 52px 20px; color: #444; font-size: 15px; line-height: 1.6; }
.empty-state .empty-icon { font-size: 36px; margin-bottom: 12px; }
.back-btn { font-size: 16px; color: var(--teal); cursor: pointer; margin-right: 8px; background: none; border: none; }
.text-center { text-align: center; }
.divider { border: none; border-top: 1px solid var(--border); margin: 12px 0; }
.hidden { display: none !important; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.p-14  { padding: 14px; }

/* Shift sheet / builder overlays */
#shift-sheet, #builder-sheet { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; }
#shift-sheet-inner, #builder-inner { position: relative; width: 100%; max-width: 480px; background: #fff; border-radius: 16px; max-height: 85vh; overflow-y: auto; padding: 28px; box-shadow: 0 20px 60px rgba(0,0,0,0.25); }

/* Mobile shift sheet — slides up from bottom (must be after desktop rules) */
@media (max-width: 767px) {
  #shift-sheet, #builder-sheet { align-items: flex-end !important; }
  #shift-sheet-inner, #builder-inner {
    max-height: 80vh !important;
    padding: 20px 20px calc(var(--nav-h-mobile) + env(safe-area-inset-bottom) + 24px) !important;
    border-radius: 16px 16px 0 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-y: scroll !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: none;
  }
}

/* Staff editor */
#staff-editor { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; padding: 16px; }
#staff-editor-inner { position: relative; width: 100%; max-width: 520px; max-height: 85vh; overflow-y: auto; background: #fff; border-radius: 16px; padding: 20px; box-shadow: 0 20px 60px rgba(0,0,0,0.25); }


/* ── Checklist ─────────────────────────────────────────────── */
.cl-shift-options { display: flex; flex-direction: column; gap: 8px; }
.cl-shift-option { border: 1.5px solid #e0e0e0; border-radius: 10px; padding: 13px 16px; cursor: pointer; display: flex; align-items: center; gap: 12px; transition: all 0.15s; }
.cl-shift-option.selected { border-color: var(--teal); background: #f0fdf8; }
.cl-radio { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #ccc; flex-shrink: 0; transition: all 0.15s; }
.cl-shift-option.selected .cl-radio { border-color: var(--teal); background: var(--teal); }
.cl-shift-label { font-size: 14px; font-weight: 600; color: #111; }

.cl-card { background: #fff; border-radius: 12px; overflow: hidden; border: 1px solid #f0f0f0; }
.cl-card-hdr { padding: 11px 18px; border-bottom: 1px solid #f0f0f0; display: flex; align-items: center; justify-content: space-between; }
.cl-card-title { font-size: 12px; font-weight: 700; color: #333; text-transform: uppercase; letter-spacing: 0.06em; }
.cl-card-footer { padding: 11px 18px; border-top: 1px solid #f0f0f0; display: flex; align-items: center; justify-content: space-between; }

.cl-item { display: flex; align-items: flex-start; gap: 8px; padding: 10px 18px; border-bottom: 1px solid #f8f8f8; cursor: pointer; transition: background 0.1s; }
.cl-item:last-child { border-bottom: none; }
.cl-item:hover { background: #fafafa; }
.cl-check { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #ddd; flex-shrink: 0; margin-top: 1px; display: flex; align-items: center; justify-content: center; font-size: 10px; color: #fff; transition: all 0.15s; }
.cl-item.done .cl-check { background: var(--teal); border-color: var(--teal); }
.cl-num { font-size: 11px; font-weight: 700; color: #999; min-width: 18px; flex-shrink: 0; margin-top: 2px; }
.cl-item.done .cl-num { color: var(--teal); }
.cl-text { font-size: 13px; color: #111; line-height: 1.4; }
.cl-item.done .cl-text { color: #aaa; text-decoration: line-through; }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (min-width: 768px) {
  .desktop-nav { display: flex; }
  .mobile-nav  { display: none; }
  .mobile-top-bar { display: none !important; }
  .app-layout  { padding-top: var(--nav-h); padding-bottom: 0; flex-direction: row; top: 0; height: 100vh; }
  .pinned-sidebar.visible { display: flex; }
  .login-body { background: #f0f4f8; }
}
@media (max-width: 767px) {
  .desktop-nav    { display: none; }
  .pinned-sidebar { display: none !important; }
  .app-layout { top: 0; height: 100vh; flex-direction: column; padding-top: 0; }
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #ddd; border-radius: 2px; }

/* ── USER DROPDOWN ───────────────────────────────────────── */
.dn-user-wrap { position: relative; }
.dn-user-btn {
  display: flex; align-items: center; gap: 8px;
  background: none; border: none; cursor: pointer;
  font-size: 15px; color: #111; font-weight: 600; padding: 4px 8px;
  border-radius: var(--radius-sm);
}
.dn-user-btn:hover { background: var(--gray-light); }
.dn-caret { font-size: 11px; color: #666; }
.dn-user-menu {
  display: none;
  position: absolute; top: calc(100% + 6px); right: 0;
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  min-width: 140px; z-index: 200;
}
.dn-user-menu.open { display: block; }
.dn-menu-item {
  display: block; padding: 11px 16px;
  font-size: 14px; color: #111; font-weight: 500;
  border-bottom: 1px solid #f0f0f0;
}
.dn-menu-item:last-child { border-bottom: none; }
.dn-menu-item:hover { background: var(--gray-light); }

/* Announcement action buttons */
.ann-actions { display: flex; gap: 10px; margin-top: 20px; justify-content: flex-start; }
.ann-actions .btn-ghost { flex: none; padding: 8px 18px; font-size: 13px; }
.ann-actions .btn-danger { flex: none; padding: 8px 18px; font-size: 13px; }

/* ── CHAT / DESK LOG ────────────────────────────────────── */
.chat-thread {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  background: #fff;
}
.chat-msg { margin-bottom: 14px; }
.chat-date-divider {
  text-align: center;
  font-size: 12px;
  color: #888;
  margin: 12px 0 8px;
  position: relative;
}
.chat-date-divider::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 50%;
  border-top: 1px solid #e0e0e0;
}
.chat-date-divider span {
  background: #f5f7fa;
  padding: 0 10px;
  position: relative;
}
.chat-msg-wrap {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-bottom: 4px;
}
.chat-bubble-right { flex-direction: row-reverse; }
.chat-bubble-left  { flex-direction: row; }
.chat-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: #fff;
  flex-shrink: 0; margin-bottom: 18px;
}
.chat-bubble-inner { display: flex; flex-direction: column; max-width: 70%; }
.chat-sender { font-size: 12px; font-weight: 700; color: #555; margin-bottom: 3px; padding-left: 4px; }
.chat-bubble {
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.5;
  color: #111;
  word-break: break-word;
}
.chat-bubble.mine {
  background: var(--teal);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-bubble.theirs {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-bottom-left-radius: 4px;
}
.chat-bubble.resolved-bubble {
  background: #e8f5e9;
  border: 1px solid #c8e6c9;
  color: #555;
  cursor: pointer;
  font-style: italic;
}
.chat-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
  padding: 0 4px;
}
.chat-bubble-right .chat-meta { flex-direction: row-reverse; }
.chat-time { font-size: 11px; color: #aaa; }
.chat-action-btn {
  font-size: 13px;
  color: var(--teal);
  background: none;
  border: 1.5px solid var(--teal);
  border-radius: 20px;
  cursor: pointer;
  padding: 4px 12px;
  font-weight: 600;
  transition: all 0.12s;
}
.chat-action-btn:hover { background: var(--teal-light); }
.chat-action-btn.resolved { color: #888; border-color: #ddd; }
.chat-action-btn.resolved:hover { background: #f5f5f5; }
.chat-replies {
  margin-top: 6px;
  padding-left: 10px;
  border-left: 2px solid #e0e0e0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.chat-reply-indicator {
  background: #f0fdf8;
  border-left: 3px solid var(--teal);
  border-top: 1px solid var(--border);
  padding: 8px 16px;
  font-size: 13px;
  color: var(--teal-mid);
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.chat-reply-cancel { background: none; border: none; color: #888; cursor: pointer; font-size: 14px; }


.chat-compose {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 12px 16px;
  background: #fff;
  border-top: 1px solid var(--border);
  transition: background 0.2s;
}
.chat-compose.replying { background: var(--teal); }
.chat-compose.replying textarea { background: rgba(255,255,255,0.2); border-color: rgba(255,255,255,0.4); color: #fff; }
.chat-compose.replying textarea::placeholder { color: rgba(255,255,255,0.7); }
.chat-compose.replying .chat-send-btn { background: #fff; color: var(--teal); }
.chat-compose textarea {
  flex: 1;
  border: 1.5px solid #ccc;
  border-radius: 22px;
  padding: 10px 16px;
  font-size: 15px;
  resize: none;
  background: #f5f7fa;
  min-height: 42px;
  max-height: 120px;
  color: #111;
  line-height: 1.4;
}
.chat-compose textarea:focus { outline: none; border-color: var(--teal); background: #fff; }
.chat-send-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--teal);
  border: none;
  color: #fff;
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

/* Sidebar chat style */
.ps-feed .chat-bubble { font-size: 14px; }
.ps-feed .chat-sender { font-size: 12px; }
.ps-feed .chat-bubble-inner { max-width: 90%; }

/* ── DOCS ────────────────────────────────────────────────── */
.doc-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background 0.1s;
}
.doc-item:hover { background: #fafafa; }
.doc-item:last-child { border-bottom: none; }
.doc-icon { font-size: 24px; flex-shrink: 0; }
.doc-info { flex: 1; }
.doc-title { font-size: 15px; font-weight: 600; color: #111; margin-bottom: 3px; }
.doc-meta { font-size: 13px; color: #666; }
.doc-arrow { font-size: 20px; color: #ccc; }

/* Desk log section layout on desktop */
#section-log.active {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
  padding-bottom: 0 !important;
}
#section-log.active .chat-thread {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
#section-log.active .chat-compose-wrap {
  position: static;
  flex-shrink: 0;
  background: #fff;
  border-top: 1px solid var(--border);
}

@media (max-width: 768px) {
  #section-log.active {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    height: 100%;
    display: flex;
    flex-direction: column;
  }
  #section-log.active .chat-thread {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 16px;
  }
  #section-log.active .chat-compose-wrap {
    position: static;
    flex-shrink: 0;
    padding-bottom: calc(var(--nav-h-mobile) + env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid var(--border);
  }
}

/* Sidebar compose reply state */

.chat-compose.replying textarea { background: #fff !important; border-color: rgba(255,255,255,0.6) !important; color: #111 !important; }

/* ── PRODUCT CHECK HEADERS ───────────────────────────────── */
.ci-header {
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--teal);
  padding: 16px 18px 6px;
  border-top: 1px solid #f0f0f0;
  margin-top: 4px;
}
.ci-header:first-child { border-top: none; margin-top: 0; }

/* ── PUSH NOTIFICATION ADMIN ─────────────────────────────── */
.push-type-row {
  border: 1px solid #f0f0f0;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
  background: #fafafa;
}
.ptr-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.ptr-label {
  font-size: 14px;
  font-weight: 600;
  color: #111;
}
.ptr-details {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #eee;
}
.ptr-details.ptr-disabled {
  opacity: 0.4;
  pointer-events: none;
}
.ptr-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  cursor: pointer;
  font-size: 13px;
  color: #444;
}
.ptr-opt input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--teal); cursor: pointer; }

/* Toggle switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #ccc;
  border-radius: 22px;
  transition: .2s;
}
.toggle-slider:before {
  content: "";
  position: absolute;
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: .2s;
}
.toggle-switch input:checked + .toggle-slider { background: var(--teal); }
.toggle-switch input:checked + .toggle-slider:before { transform: translateX(18px); }

.form-select {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 14px;
  background: #fff;
  color: #111;
  appearance: auto;
}

/* ── PRODUCT CHECK ROOM TABS ─────────────────────────────── */
.pc-room-tabs {
  display: flex;
  justify-content: center;
  padding: 14px 14px 12px;
  background: #f7f7f7;
  border-bottom: 1px solid #ebebeb;
}
.pc-room-tabs-inner {
  display: flex;
  background: #e4e4e4;
  border-radius: 10px;
  padding: 3px;
  gap: 3px;
}
.pc-room-tab {
  padding: 8px 28px;
  background: none;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #888;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.pc-room-tab.active {
  background: #fff;
  color: var(--teal);
  box-shadow: 0 1px 4px rgba(0,0,0,0.10);
}
.pc-room-panel { display: none; }
.pc-room-panel.active { display: block; }

/* ── PRODUCT CHECK BUTTONS (X left, ✓ right, separate) ───── */
.ci-btns {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.ci-btn {
  width: 42px;
  height: 38px;
  border-radius: 9px;
  border: 1.5px solid #ddd;
  background: #f5f5f5;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  color: #ccc;
}
.ci-btn.active-yes {
  background: #1a9e6e;
  border-color: #1a9e6e;
  color: #fff;
}
.ci-btn.active-no {
  background: #d92b2b;
  border-color: #d92b2b;
  color: #fff;
}
.ci-btn.ci-no:not(.active-no)  { border-color: #f5c0c0; color: #e08080; }
.ci-btn.ci-yes:not(.active-yes){ border-color: #b8e8d4; color: #80c8a8; }

/* ── PRODUCT CHECK REPORT CARDS ──────────────────────────── */
.pc-report-card {
  border: 1px solid #f0f0f0;
  border-radius: 12px;
  padding: 14px;
  margin: 10px 14px;
  background: #fff;
}
.pc-report-card.pc-report-missing {
  border-color: #ffd0d0;
  background: #fff8f8;
}
.pc-report-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.pc-report-alert {
  font-size: 12px;
  font-weight: 700;
  color: #d92b2b;
  background: #ffd0d0;
  padding: 4px 10px;
  border-radius: 20px;
  flex-shrink: 0;
}
.pc-report-ok {
  font-size: 12px;
  font-weight: 700;
  color: #1a9e6e;
  background: #d4f4e8;
  padding: 4px 10px;
  border-radius: 20px;
  flex-shrink: 0;
}
.pc-report-missing-list {
  background: #fff0f0;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
}
.pc-report-notes {
  font-size: 13px;
  color: #555;
  background: #f9f9f9;
  border-radius: 8px;
  padding: 8px 12px;
  margin-top: 6px;
}

/* ── DIRECTORY ───────────────────────────────────────────── */
.hub-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: var(--teal);
  background: rgba(43,168,130,0.12);
  border: 1px solid rgba(43,168,130,0.3);
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 5px;
  vertical-align: middle;
  letter-spacing: 0.03em;
}
.dir-cat-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #E1F5EE !important;
  color: #0F6E56 !important;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 16px;
  margin: 12px 0 4px;
  border-radius: 6px;
}
.dir-cat-label * { color: #0F6E56 !important; }
.dir-cat-edit {
  width: 28px;
  height: 28px;
  border-radius: 5px;
  border: 1.5px solid #2BA882;
  background: none;
  color: #0F6E56 !important;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dir-cat-edit svg { stroke: #0F6E56 !important; }
.dir-cat-edit:hover { background: rgba(255,255,255,0.25); }

/* ── MODAL ───────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}
.modal-box {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
}
.modal-hdr {
  font-size: 17px;
  font-weight: 700;
  color: #111;
  margin-bottom: 16px;
}

/* ── CALL LOG CHIP FIXES ─────────────────────────────────── */
.chip {
  border-radius: 6px !important;
  font-size: 13px !important;
  padding: 6px 12px !important;
}
#ms-day-chips,
#sb-day-chips {
  flex-wrap: wrap;
  gap: 5px;
}
#ms-day-chips .chip,
#sb-day-chips .chip {
  flex: none;
  min-width: 44px;
  text-align: center;
}

/* ── PRODUCT LIST DRAG HANDLE ────────────────────────────── */
.prod-item-drag {
  cursor: grab;
  color: #ccc;
  font-size: 16px;
  padding: 0 4px;
  user-select: none;
  flex-shrink: 0;
}
.prod-item-drag:active { cursor: grabbing; }
.prod-item-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 0;
  border-bottom: 0.5px solid #f5f5f5;
}
.prod-item-row.dragging {
  opacity: 0.4;
  background: #f0faf6;
}
.prod-item-row.drag-over {
  border-top: 2px solid var(--teal);
}

/* ── DESK LOG BUTTON COLOR FIX ──────────────────────────── */
.chat-action-btn.delete-btn {
  color: #888;
  border-color: #ddd;
}
.chat-action-btn.delete-btn:hover { background: #f5f5f5; color: #555; }

.d-btn svg { stroke: #111 !important; }

/* ── ADMIN MOBILE-ONLY TABS ──────────────────────────────── */
.admin-mobile-only { display: none; }
@media (max-width: 767px) {
  .admin-mobile-only { display: block; }
}

/* Admin checklist editor */
.cl-admin-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: #fff; border: 1px solid #eee; border-radius: 8px; margin-bottom: 4px; cursor: grab; user-select: none; }
.cl-admin-item input { user-select: text; cursor: text; }
.cl-drag { color: #ccc; font-size: 16px; cursor: grab; flex-shrink: 0; }
.cl-order { font-size: 11px; font-weight: 700; color: #ccc; min-width: 18px; }
.cl-admin-item input { flex: 1; border: none; font-size: 13px; color: #111; outline: none; background: none; }
.cl-del { background: none; border: none; color: #ddd; font-size: 20px; cursor: pointer; flex-shrink: 0; line-height: 1; padding: 0; }
.cl-del:hover { color: #e05555; }

/* ============================================================
   Scripts section
   ============================================================ */
/* Header tabs */
.scr-hdr-right { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.scr-tab { padding:5px 14px; font-size:13px; font-weight:500; border-radius:20px; border:0.5px solid var(--border); background:var(--white); color:#333; cursor:pointer; transition:all .15s; }
.scr-tab.on { background:var(--teal); border-color:var(--teal); color:#fff; }
.scr-tab:hover:not(.on) { background:var(--gray-light); }

/* Layout */
.scr-body { display:flex; gap:0; align-items:flex-start; position:relative; }
.scr-panel { width:20%; background:var(--white); border:0.5px solid var(--border); border-radius:12px 0 0 12px; overflow:hidden; align-self:flex-start; flex-shrink:0; position:sticky; top:16px; }
.scr-phdr { padding:8px 12px; border-bottom:0.5px solid var(--border); font-size:11px; font-weight:500; color:#444; text-transform:uppercase; letter-spacing:.06em; background:var(--gray-light); }
.scr-phdr-general { border-top:0.5px solid var(--border); }
.scr-add-card-wrap { padding:10px 12px; border-top:0.5px solid var(--border); }
.scr-add-card-btn { width:100%; padding:8px; font-size:12px; font-weight:500; color:#fff; background:var(--teal); border:none; border-radius:6px; cursor:pointer; letter-spacing:.03em; }
.scr-ci { display:flex; align-items:center; justify-content:space-between; padding:9px 12px; border-bottom:0.5px solid var(--border); cursor:pointer; transition:background .1s; }
.scr-ci:hover { background:var(--gray-light); }
.scr-ci:last-child { border-bottom:none; }
.scr-ci.active { background:#E1F5EE; border-left:2px solid var(--teal); }
.scr-ci.active .scr-cn { color:#085041; font-weight:500; }
.scr-ci.active .scr-ca { color:var(--teal); }
.scr-cn { font-size:13px; color:#111; }
.scr-ca { font-size:12px; color:#444; }

/* Card drawer — slides out from panel */
.scr-card-drawer { width:0; overflow:hidden; transition:width .2s ease; background:var(--gray-light); border-top:0.5px solid var(--border); border-bottom:0.5px solid var(--border); align-self:stretch; }
.scr-card-drawer.open { width:38%; border-left:0.5px solid var(--border); border-right:0.5px solid var(--border); }
.scr-drawer-hdr { display:flex; align-items:flex-start; justify-content:space-between; padding:14px 16px; border-bottom:0.5px solid var(--border); position:sticky; top:0; background:var(--gray-light); }
.scr-drawer-hdr h3 { font-size:18px; font-weight:500; margin:0; color:var(--teal); }
.scr-mx { background:none; border:none; cursor:pointer; color:#333; font-size:22px; line-height:1; padding:0; flex-shrink:0; }
.scr-bg { display:none; }
.scr-drawer-body { padding:12px 14px; overflow-y:auto; max-height:calc(100vh - 200px); background:var(--gray-light); }
.scr-drawer-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px 16px; margin-bottom:12px; background:var(--white); border-radius:8px; padding:12px; border:0.5px solid var(--border); }
.scr-ms { font-size:10px; font-weight:500; color:#0F6E56; text-transform:uppercase; letter-spacing:.07em; margin:0 0 5px; }
.scr-ml { margin:0; padding-left:13px; }
.scr-ml li { font-size:13px; color:#111; line-height:1.65; }
.scr-mr { background:#E1F5EE; border-radius:8px; padding:10px 12px; font-size:13px; color:#085041; line-height:1.6; margin-top:4px; }
.scr-mrl { font-size:10px; font-weight:500; color:#2BA882; text-transform:uppercase; letter-spacing:.07em; margin:0 0 4px; }
.scr-mw { background:#FFF8E6; border:0.5px solid #F0C040; border-radius:7px; padding:8px 12px; font-size:12px; color:#7A5C00; line-height:1.6; margin-top:8px; }
.scr-mn { font-size:12px; color:#333; margin-top:8px; padding-top:6px; border-top:0.5px solid var(--border); }

/* Viewer */
.scr-viewer { flex:1; border:0.5px solid var(--border); border-left:none; border-radius:0 12px 12px 0; overflow:hidden; transition:opacity .2s; }
.scr-viewer.card-open { opacity:0.55; pointer-events:none; }
.scr-vhdr { padding:10px 20px; border-bottom:0.5px solid var(--border); background:var(--gray-light); font-size:12px; color:#444; letter-spacing:.03em; }
.scr-vbody { padding:16px 20px; }

/* Phase headers */
.scr-phase { font-size:20px; font-weight:500; color:#111; margin:28px 0 16px; padding-bottom:10px; border-bottom:2.5px solid var(--teal); }
.scr-phase:first-child { margin-top:0; }

/* Timeline */
.scr-timeline { position:relative; padding-left:44px; }
.scr-timeline::before { content:''; position:absolute; left:14px; top:8px; bottom:8px; width:2px; background:var(--teal); opacity:.25; }
.scr-step { position:relative; margin-bottom:22px; }
.scr-step-dot { position:absolute; left:-30px; top:4px; width:18px; height:18px; border-radius:50%; background:var(--white); border:2px solid var(--teal); display:flex; align-items:center; justify-content:center; font-size:10px; font-weight:500; color:var(--teal); flex-shrink:0; }
.scr-sl { font-size:11px; font-weight:500; color:var(--teal); text-transform:uppercase; letter-spacing:.07em; margin-bottom:5px; }
.scr-script { background:var(--gray-light); border-left:3px solid var(--teal); border-radius:0 6px 0 0; padding:10px 14px; font-size:15px; color:#111; line-height:1.65; font-style:italic; }
.scr-note { font-size:14px; color:#085041; line-height:1.55; padding:7px 13px 8px 36px; background:#F0FAF6; border-radius:0 0 6px 6px; margin-left:36px; position:relative; }
.scr-note::before { content:'→'; position:absolute; left:14px; top:8px; font-size:14px; color:#0F6E56; font-weight:500; }
.scr-req { background:#FFF3CD; border:0.5px solid #BA7517; border-radius:0 0 6px 6px; padding:9px 14px; font-size:14px; color:#412402; margin-left:36px; line-height:1.7; }
.scr-req-lbl { font-size:10px; font-weight:500; text-transform:uppercase; letter-spacing:.07em; color:#633806; margin-bottom:5px; }
.scr-express-wrap { margin-top:10px; margin-left:20px; margin-bottom:14px; padding-top:10px; border-top:0.5px solid #9FE1CB; }
.scr-express-lbl { font-size:11px; font-weight:500; color:#2BA882; text-transform:uppercase; letter-spacing:.07em; margin-bottom:6px; display:flex; align-items:center; gap:6px; }
.scr-express-pill { font-size:11px; font-weight:500; color:#085041; background:#E1F5EE; padding:2px 8px; border-radius:20px; text-transform:uppercase; letter-spacing:.07em; }
.scr-express-script { font-size:15px; color:#111; line-height:1.65; font-style:italic; margin-bottom:5px; }
.scr-express-note { font-size:13px; color:#085041; line-height:1.5; }

/* Branch */
.scr-branch { margin:8px 0; padding:11px 14px; border-radius:8px; border:0.5px solid var(--border); background:var(--gray-light); }
.scr-bl { font-size:10px; font-weight:500; color:#333; text-transform:uppercase; letter-spacing:.07em; margin-bottom:8px; }
.scr-bo { display:flex; flex-direction:column; gap:5px; }
.scr-bop { padding:9px 13px; border:0.5px solid var(--border); border-radius:7px; font-size:14px; color:#111; background:var(--white); display:flex; align-items:center; justify-content:space-between; cursor:pointer; transition:all .15s; }
.scr-bop:hover { border-color:var(--teal); background:#E1F5EE; color:#085041; }
.scr-bop.selected { border-color:var(--teal); background:#E1F5EE; color:#085041; font-weight:500; }
.scr-bop span { font-size:12px; color:#444; }
.scr-bop.selected span { color:#0F6E56; }

/* Path sections — hidden until selected */
.scr-path-section .scr-pb { display:none; }
.scr-path-section .scr-timeline { display:none; margin-left:20px; padding-left:44px; border-left:2px dashed #9FE1CB; }
.scr-path-section .scr-branch { display:none; }
.scr-path-section.visible .scr-pb { display:flex; }
.scr-path-section.visible .scr-timeline { display:block; }
.scr-path-section.visible .scr-branch { display:block; }
.scr-pb { display:flex; align-items:center; gap:10px; margin:20px 0 12px; }
.scr-pb-line { flex:1; height:0.5px; background:var(--border); }
.scr-ph { font-size:17px; font-weight:500; color:#111; white-space:nowrap; }
.scr-pt { font-size:11px; font-weight:500; color:#fff; background:var(--teal); padding:2px 10px; border-radius:20px; margin-left:8px; }

/* Edit mode */
.scr-edit-btn { padding:5px 14px; font-size:13px; border-radius:8px; border:0.5px solid var(--teal); color:var(--teal); background:var(--white); cursor:pointer; transition:all .15s; }
.scr-edit-btn.active { background:var(--teal); color:#fff; }
.scr-edit-phase-input, .scr-edit-label, .scr-edit-blabel, .scr-edit-badge, .scr-edit-card-name, .scr-edit-path-name, .scr-edit-path-tag, .scr-edit-bopt-label, .scr-edit-bopt-dest { font-size:14px; border:0.5px solid var(--border); border-radius:6px; padding:5px 8px; background:var(--gray-light); color:#111; width:100%; margin-bottom:4px; }
.scr-edit-textarea, .scr-edit-note, .scr-edit-req, .scr-edit-card { width:100%; font-size:13px; border:0.5px solid var(--border); border-radius:6px; padding:6px 8px; background:var(--gray-light); color:#111; resize:vertical; margin-bottom:4px; line-height:1.6; }
.scr-edit-phase-input { font-size:18px; font-weight:500; }
.scr-save-btn { margin-top:6px; padding:5px 14px; font-size:12px; background:var(--teal); color:#fff; border:none; border-radius:6px; cursor:pointer; }

@media (max-width: 768px) {
  .scr-body { flex-direction:column; }
  .scr-panel { width:100%; border-radius:12px 12px 0 0; }
  .scr-card-drawer.open { width:100%; border-left:none; border-right:none; border-top:0.5px solid var(--border); }
  .scr-viewer { border-left:0.5px solid var(--border); border-top:none; border-radius:0 0 12px 12px; }
  .scr-drawer-grid { grid-template-columns:1fr; }
  .compose-bar { padding-bottom: calc(12px + var(--nav-h-mobile) + env(safe-area-inset-bottom)); }
}
}
