/* ══════════════════════════════════════════════════════════════════
   CORNERSTONE BRAND TOKENS
   ══════════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --brand:    #2CC0ED;  /* PRIMARY blue */
  --brand2:   #1AADD4;
  --gold:     #FCDE41;  /* PRIMARY yellow */
  --gray:     #838488;  /* brand gray */
  --navy:     #1A3A5C;
  --red:      #E53E3E;
  --amber:    #E67E22;
  --green:    #27AE60;
  --white:    #FFFFFF;
  --bg:       #FFFFFF;
  --bg3:      #EEF7FC;
  --ink:      #1A3A5C;
  --text:     #3A5468;
  --text2:    #6D7B88;
  --mid:      #838488;
  --border:   #DDE8EE;
  --shadow:   0 2px 8px rgba(26,58,92,0.08);
  --shadow-md:0 4px 16px rgba(26,58,92,0.12);
  --radius:   10px;
  --font-body:   'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-brand:  'Outfit', sans-serif;
  --font-mono:   'JetBrains Mono', monospace;
  /* legacy aliases for JS rendering functions */
  --cyan:   #2CC0ED;
  --cyan2:  #1AADD4;
}
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  font-size: 13px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Cornerstone App Header ───────────────────────────────────── */
.app-header {
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  height: 64px;
  flex-shrink: 0;
  border-bottom: 3px solid var(--brand);
  box-shadow: 0 2px 8px rgba(44,192,237,0.10);
}
.brand { display: flex; align-items: center; gap: 16px; }
.brand-logo img { height: 40px; width: auto; display: block; }
.brand-divider { width: 1px; height: 32px; background: var(--border); flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; }
.brand-name {
  font-family: var(--font-brand); font-size: 13px; font-weight: 700;
  color: var(--gray); letter-spacing: 0.02em;
}
.brand-sub {
  font-size: 10px; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--brand); font-weight: 600; margin-top: 2px;
}
.header-right { display: flex; align-items: center; gap: 10px; }
.status-chip { font-size: 11px; color: var(--text2); letter-spacing: 0.04em; }

/* ── Tab Navigation ───────────────────────────────────────────── */
.tab-nav {
  background: var(--brand);
  display: flex; flex-shrink: 0; padding: 0 8px; gap: 2px;
  border-bottom: none;
  overflow-x: auto; scrollbar-width: none;
}
.tab-nav::-webkit-scrollbar { display: none; }
.tab {
  background: transparent; border: none; color: #FFFFFF; opacity: 0.78;
  padding: 10px 13px; font-family: var(--font-body); font-size: 11px;
  font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  cursor: pointer; transition: opacity 0.15s; display: flex; align-items: center;
  gap: 5px; white-space: nowrap; -webkit-font-smoothing: antialiased; flex-shrink: 0;
}
.tab:hover { opacity: 1; }
.tab.active {
  color: #4a4b4e; background: var(--white); border-radius: 6px 6px 0 0;
  font-weight: 800; opacity: 1; margin-bottom: -1px; padding-bottom: 11px;
  -webkit-font-smoothing: antialiased;
}
.tab-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 16px; padding: 0 5px; border-radius: 8px;
  font-size: 9px; font-weight: 800; line-height: 1;
  background: var(--red); color: var(--white);
}
.tab-badge.gold { background: var(--gold); color: #5a3e00; }

/* ── Action button ────────────────────────────────────────────── */
.btn-action {
  background: transparent; border: 1px solid rgba(44,192,237,0.4);
  color: var(--brand); padding: 5px 13px; border-radius: 5px;
  cursor: pointer; font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; transition: all 0.15s; font-family: var(--font-body);
}
.btn-action:hover { background: rgba(44,192,237,0.10); border-color: var(--brand); }

/* ── Preview banner ───────────────────────────────────────────── */
.preview-banner {
  background: rgba(252,222,65,0.15); border-bottom: 1px solid rgba(252,222,65,0.40);
  color: #6B5800; font-size: 11px; font-weight: 600; text-align: center; padding: 5px;
  letter-spacing: 0.04em; flex-shrink: 0;
}

/* ── Content & layout ─────────────────────────────────────────── */
.content { flex: 1; overflow-y: auto; padding: 18px 22px; background: var(--bg); }
.loading { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 280px; gap: 14px; color: var(--mid); }
.spinner { width: 32px; height: 32px; border: 3px solid var(--border); border-top-color: var(--brand); border-radius: 50%; animation: spin 0.75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Stat cards ───────────────────────────────────────────────── */
.stat-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 16px; }
.stat-card { background: var(--white); border-radius: 8px; padding: 15px 16px; box-shadow: var(--shadow); border-left: 4px solid var(--border); }
.stat-card.c-cyan  { border-left-color: var(--brand); }
.stat-card.c-gold  { border-left-color: var(--gold); }
.stat-card.c-red   { border-left-color: var(--red); }
.stat-card.c-amber { border-left-color: var(--amber); }
.stat-card.c-green { border-left-color: var(--green); }
.stat-card.c-navy  { border-left-color: var(--navy); }
.stat-label { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mid); margin-bottom: 7px; font-family: var(--font-brand); }
.stat-value { font-size: 30px; font-weight: 800; line-height: 1; color: var(--ink); font-family: var(--font-brand); }
.stat-card.c-red   .stat-value { color: var(--red); }
.stat-card.c-amber .stat-value { color: var(--amber); }
.stat-sub { font-size: 11px; color: var(--mid); margin-top: 5px; }

/* ── Cards ────────────────────────────────────────────────────── */
.card { background: var(--white); border-radius: 8px; box-shadow: var(--shadow); overflow: hidden; margin-bottom: 14px; }
.card-header {
  background: var(--gray); color: var(--white);
  padding: 9px 16px; font-size: 11px; font-family: var(--font-brand);
  font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  display: flex; align-items: center; justify-content: space-between;
}
.card-header .accent { color: var(--gold); font-weight: 400; text-transform: none; font-size: 11px; }
.card-body { padding: 14px 16px; }

/* ── Charts ───────────────────────────────────────────────────── */
.chart-row { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; margin-bottom: 14px; }
.chart-wrap { position: relative; height: 260px; }
.chart-wrap-lg { position: relative; height: 290px; }

/* ── Tables ───────────────────────────────────────────────────── */
.dtable { width: 100%; border-collapse: collapse; }
.dtable th { text-align: left; font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mid); padding: 7px 10px; border-bottom: 2px solid var(--border); background: var(--bg3); white-space: nowrap; font-family: var(--font-brand); }
.dtable td { padding: 8px 10px; border-bottom: 1px solid var(--border); font-size: 12px; vertical-align: middle; }
.dtable tr:last-child td { border-bottom: none; }
.dtable tr:hover td { background: var(--bg3); }
.bar-cell { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.bar-track { flex: 1; height: 7px; background: var(--border); border-radius: 3px; overflow: hidden; max-width: 90px; }
.bar-fill { height: 100%; border-radius: 3px; transition: width 0.5s ease; background: var(--brand); }
.bar-fill.amber { background: var(--amber); }
.bar-fill.red   { background: var(--red); }
.bar-num { font-weight: 700; font-size: 13px; min-width: 24px; text-align: right; }

/* ── Pills ────────────────────────────────────────────────────── */
.pill { display: inline-block; padding: 2px 7px; border-radius: 8px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
.pill-cyan   { background: rgba(44,192,237,0.12);  color: #0285a8; }
.pill-navy   { background: rgba(26,58,92,0.1);     color: var(--navy); }
.pill-red    { background: rgba(229,62,62,0.1);    color: var(--red); }
.pill-amber  { background: rgba(230,126,34,0.12);  color: #92610a; }
.pill-green  { background: rgba(39,174,96,0.1);    color: var(--green); }
.pill-gold   { background: rgba(252,222,65,0.20);  color: #8a7800; }
.pill-gray   { background: rgba(131,132,136,0.1);  color: var(--mid); }

/* ── Filters ──────────────────────────────────────────────────── */
.filter-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.filter-row label { font-size: 10px; font-weight: 700; color: var(--mid); text-transform: uppercase; letter-spacing: 0.06em; }
.filter-row select, .filter-row input[type=text] { padding: 5px 10px; border: 1px solid var(--border); border-radius: 5px; font-size: 12px; color: var(--ink); background: var(--white); font-family: var(--font-body); }
.filter-row select:focus, .filter-row input:focus { outline: none; border-color: var(--brand); }

/* ── Capital Watch ────────────────────────────────────────────── */
.cap-bldg { border: 1px solid var(--border); border-radius: 8px; margin-bottom: 10px; overflow: hidden; }
.cap-bldg-head { background: var(--gray); color: var(--white); padding: 9px 16px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; user-select: none; transition: background 0.15s; }
.cap-bldg-head:hover { background: #6d6e72; }
.cap-bldg-name { font-size: 12px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; font-family: var(--font-brand); }
.cap-bldg-count { font-size: 12px; color: var(--gold); font-weight: 700; }
.cap-trade-row { padding: 9px 16px; border-bottom: 1px solid var(--border); display: grid; grid-template-columns: 190px 52px 1fr; align-items: center; gap: 14px; }
.cap-trade-row:last-child { border-bottom: none; }
.cap-trade-name { font-size: 12px; font-weight: 600; }
.cap-trade-count { font-size: 14px; font-weight: 800; color: var(--amber); text-align: center; }
.cap-examples { font-size: 11px; color: var(--mid); font-style: italic; }

/* ── Days chips ───────────────────────────────────────────────── */
.days-chip { display: inline-block; padding: 2px 8px; border-radius: 8px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.days-chip.crit    { background: rgba(229,62,62,0.12);   color: var(--red); }
.days-chip.warn    { background: rgba(230,126,34,0.12);  color: #92610a; }
.days-chip.ok      { background: rgba(39,174,96,0.1);    color: var(--green); }
.days-chip.unknown { background: var(--border); color: var(--mid); }
.alert-urgent td { background: rgba(229,62,62,0.035) !important; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.empty { text-align: center; padding: 48px 20px; color: var(--mid); }
.empty .icon { font-size: 38px; margin-bottom: 10px; }
.empty p { font-size: 13px; }

/* ── Legacy badge alias (kept for any non-nav usage) ─────────── */
.badge { display: inline-block; font-size: 9px; font-weight: 800; padding: 1px 5px; border-radius: 8px; line-height: 1.4; background: var(--red); color: var(--white); }
.badge.gold { background: var(--gold); color: #5a3e00; }

/* ── Date range buttons ─────────────────────────────────────── */
.dr-btn { font-family: var(--font-body); font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 6px; border: 1.5px solid var(--border); background: var(--white); color: var(--text); cursor: pointer; transition: all 0.15s; }
.dr-btn:hover { border-color: var(--brand); color: var(--brand); }
.dr-btn.active { background: var(--brand); border-color: var(--brand); color: var(--white); }

/* ── Collapsible activity sections ──────────────────────────── */
.sec-wrap { margin-bottom: 12px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); }
.sec-toggle { display: flex; align-items: center; justify-content: space-between; padding: 11px 16px; cursor: pointer; user-select: none; background: var(--bg3); transition: background 0.15s; border-left: 4px solid transparent; }
.sec-toggle:hover { background: #dff0f9; }
.sec-toggle-left { display: flex; align-items: center; gap: 10px; }
.sec-toggle-title { font-family: var(--font-brand); font-size: 13px; font-weight: 800; color: var(--ink); }
.sec-toggle-sub { font-size: 11px; color: var(--mid); }
.sec-toggle-arrow { font-size: 11px; color: var(--mid); transition: transform 0.2s; display: inline-block; }
.sec-toggle-arrow.open { transform: rotate(90deg); }
.sec-body { display: none; padding: 14px 16px 4px; }
.sec-body.open { display: block; }
/* checkbox column in tables */
.dtable td.chk, .dtable th.chk { width: 28px; text-align: center; padding: 4px 2px; }
.dtable td.chk input[type=checkbox] { cursor: pointer; width: 14px; height: 14px; accent-color: var(--brand); }
tr.checked-off { opacity: 0.45; text-decoration: line-through; }

/* ══ PRIORITY FEED ════════════════════════════════════════════ */
.pf-section {
  border-radius: 8px; margin-bottom: 10px; overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid var(--border);
}
.pf-header {
  display: flex; align-items: center; gap: 12px; padding: 11px 16px;
  cursor: pointer; user-select: none; transition: opacity 0.15s;
}
.pf-header:hover { opacity: 0.88; }
.pf-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.pf-title { font-family: var(--font-brand); font-size: 12px; font-weight: 800;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--white); flex: 1; }
.pf-count { font-size: 11px; color: rgba(255,255,255,0.85); font-weight: 600; white-space: nowrap; }
.pf-arrow { font-size: 11px; color: rgba(255,255,255,0.7); transition: transform 0.2s; }
.pf-arrow.open { transform: rotate(90deg); }
.pf-body { background: var(--white); border-top: 1px solid rgba(0,0,0,0.08); display: none; }
.pf-body.open { display: block; }
.pf-item {
  display: flex; align-items: flex-start; gap: 10px; padding: 9px 16px;
  border-bottom: 1px solid var(--border); font-size: 12px;
}
.pf-item:last-child { border-bottom: none; }
.pf-item input[type=checkbox] { margin-top: 2px; cursor: pointer; flex-shrink: 0; }
.pf-item-main { flex: 1; min-width: 0; }
.pf-item-label { font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-item-sub { font-size: 11px; color: var(--mid); margin-top: 2px; }
.pf-item-meta { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.pf-empty { padding: 14px 16px; font-size: 12px; color: var(--mid); font-style: italic; }
/* ══ MAP / BUILDING GRID ══════════════════════════════════════ */
.bldg-map { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 0 4px; }
.bldg-tile {
  border-radius: 8px; padding: 12px 14px; min-width: 90px; text-align: center;
  cursor: pointer; border: 2px solid transparent; transition: transform 0.15s;
}
.bldg-tile:hover { transform: translateY(-2px); }
.bldg-tile-name { font-family: var(--font-brand); font-size: 11px; font-weight: 800;
  letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 4px; }
.bldg-tile-count { font-size: 22px; font-weight: 800; font-family: var(--font-brand); line-height: 1; }
.bldg-tile-open { font-size: 10px; margin-top: 3px; font-weight: 600; }
.heat-low  { background: rgba(44,192,237,0.10); border-color: rgba(44,192,237,0.25); color: #0285a8; }
.heat-mid  { background: rgba(252,222,65,0.18); border-color: rgba(252,222,65,0.45); color: #7a6200; }
.heat-high { background: rgba(230,126,34,0.15); border-color: rgba(230,126,34,0.40); color: #92500a; }
.heat-crit { background: rgba(229,62,62,0.12);  border-color: rgba(229,62,62,0.35);  color: var(--red); }
/* ══ ALL ACTIVITY JUMP NAV ════════════════════════════════════ */
.jump-nav {
  display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap;
  background: var(--bg3); border-radius: 8px; padding: 10px 14px;
  border: 1px solid var(--border);
}
.jump-nav a {
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--brand); text-decoration: none; padding: 5px 12px;
  border: 1px solid rgba(44,192,237,0.3); border-radius: 20px;
  transition: all 0.15s;
}
.jump-nav a:hover { background: var(--brand); color: var(--white); }
.section-anchor { scroll-margin-top: 12px; }
/* ══ SCHEDULED TAB ════════════════════════════════════════════ */
.sched-section { margin-bottom: 20px; }
.sched-section-title {
  font-family: var(--font-brand); font-size: 12px; font-weight: 800;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--mid);
  padding: 0 0 8px; border-bottom: 2px solid var(--border); margin-bottom: 12px;
  display: flex; align-items: center; justify-content: space-between;
}
.sched-empty {
  text-align: center; padding: 32px 20px; color: var(--mid);
  background: var(--bg3); border-radius: 8px; border: 1px dashed var(--border);
}
.sched-empty .icon { font-size: 32px; margin-bottom: 8px; }
.integration-badge {
  display: inline-flex; align-items: center; gap: 5px; font-size: 10px;
  font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  background: rgba(44,192,237,0.10); color: var(--brand); border: 1px solid rgba(44,192,237,0.3);
  border-radius: 10px; padding: 2px 9px;
}
/* ══ GUIDES TAB ═══════════════════════════════════════════════ */
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 14px; margin-bottom: 20px; }
.guide-card {
  background: var(--white); border-radius: 8px; box-shadow: var(--shadow);
  overflow: hidden; border-top: 3px solid var(--brand);
}
.guide-card-head { padding: 12px 14px 8px; }
.guide-card-title { font-family: var(--font-brand); font-size: 13px; font-weight: 800; color: var(--ink); }
.guide-card-sub { font-size: 11px; color: var(--mid); margin-top: 2px; }
.guide-card-body { padding: 0 14px 12px; font-size: 12px; color: var(--text); line-height: 1.6; }
/* ══ INSPECTIONS TAB ══════════════════════════════════════════ */
.insp-type { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em; padding: 2px 8px; border-radius: 8px; white-space: nowrap; }
.insp-type.city   { background: rgba(26,58,92,0.10);    color: var(--navy); }
.insp-type.fire   { background: rgba(229,62,62,0.10);   color: var(--red); }
.insp-type.s8     { background: rgba(39,174,96,0.10);   color: var(--green); }
.insp-type.movein { background: rgba(44,192,237,0.10);  color: #0285a8; }
.insp-type.other  { background: rgba(131,132,136,0.10); color: var(--mid); }
.insp-result.pass { color: var(--green); font-weight: 700; }
.insp-result.fail { color: var(--red);   font-weight: 700; }
.insp-result.pending { color: var(--amber); font-weight: 700; }
/* ══ UNIT PROFILE MODAL ═══════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(26,58,92,0.45); z-index: 1000;
  display: flex; align-items: center; justify-content: center;
}
.modal-box {
  background: var(--white); border-radius: 14px; box-shadow: 0 8px 40px rgba(26,58,92,0.22);
  width: 860px; max-width: 96vw; max-height: 88vh;
  display: flex; flex-direction: column; overflow: hidden;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px 12px; border-bottom: 3px solid var(--brand); flex-shrink: 0;
}
.modal-title { font-family: var(--font-brand); font-size: 16px; font-weight: 800; color: var(--ink); }
.modal-close {
  background: none; border: none; font-size: 20px; cursor: pointer;
  color: var(--mid); line-height: 1; padding: 4px 8px; border-radius: 6px;
}
.modal-close:hover { background: var(--bg3); color: var(--ink); }
.modal-body { overflow-y: auto; padding: 18px 22px; flex: 1; }
.modal-tabs { display: flex; gap: 2px; border-bottom: 2px solid var(--border); margin-bottom: 14px; }
.modal-tab {
  padding: 7px 14px; font-size: 11px; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; cursor: pointer; border: none; background: none;
  color: var(--mid); border-bottom: 2px solid transparent; margin-bottom: -2px;
}
.modal-tab.active { color: var(--brand); border-bottom-color: var(--brand); }
.profile-stat-row { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.profile-stat { background: var(--bg3); border-radius: 8px; padding: 10px 14px; min-width: 110px; text-align: center; }
.profile-stat-val { font-family: var(--font-mono); font-size: 18px; font-weight: 700; color: var(--ink); }
.profile-stat-lbl { font-size: 10px; color: var(--mid); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 3px; }
.punch-priority-header {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px; margin: 10px 0 4px;
  border-radius: 6px; font-size: 12px; font-weight: 700;
}
/* ══ ASSETS TAB ══════════════════════════════════════════════ */
.life-bar-wrap { display: flex; align-items: center; gap: 8px; min-width: 130px; }
.life-bar-track { flex: 1; height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; max-width: 80px; }
.life-bar-fill { height: 100%; border-radius: 4px; transition: width 0.4s ease; }
.life-bar-fill.good { background: var(--green); }
.life-bar-fill.fair { background: var(--brand); }
.life-bar-fill.warn { background: var(--amber); }
.life-bar-fill.crit { background: var(--red); }
.cond-badge { display: inline-block; padding: 2px 8px; border-radius: 8px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
.cond-badge.good { background: rgba(39,174,96,0.12);  color: var(--green); }
.cond-badge.fair { background: rgba(44,192,237,0.12);  color: #0285a8; }
.cond-badge.poor { background: rgba(230,126,34,0.15);  color: #92610a; }
.cond-badge.eol  { background: rgba(229,62,62,0.12);   color: var(--red); }
.cond-badge.unk  { background: rgba(131,132,136,0.12); color: var(--mid); }
.asset-bldg-header {
  background: var(--gray); color: var(--white); padding: 10px 16px;
  font-family: var(--font-brand); font-size: 12px; font-weight: 800;
  letter-spacing: 0.07em; text-transform: uppercase;
  display: flex; justify-content: space-between; align-items: center;
  cursor: pointer; user-select: none; transition: background 0.15s;
}
.asset-bldg-header:hover { background: #6d6e72; }
.asset-cat-header {
  background: var(--bg3); padding: 7px 16px 7px 24px;
  font-size: 11px; font-weight: 700; color: var(--mid);
  letter-spacing: 0.06em; text-transform: uppercase; font-family: var(--font-brand);
  border-bottom: 1px solid var(--border); border-top: 1px solid var(--border);
}
/* ══ SEASONAL CALENDAR ════════════════════════════════════════ */
.cal-month-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.cal-month-chip {
  padding: 5px 13px; border-radius: 20px; font-size: 11px; font-weight: 700;
  border: 2px solid transparent; cursor: default; transition: all 0.15s;
}
.cal-month-chip.now     { background: var(--brand); color: var(--white); border-color: var(--brand); }
.cal-month-chip.soon    { background: rgba(44,192,237,0.12); color: #0285a8; border-color: rgba(44,192,237,0.3); }
.cal-month-chip.upcoming{ background: var(--bg3); color: var(--text); border-color: var(--border); }
.cal-month-chip.future  { background: transparent; color: var(--text2); border-color: var(--border); opacity: 0.65; }
.cal-task-row {
  display: grid; grid-template-columns: 1fr 120px 130px 80px;
  gap: 10px; align-items: center; padding: 10px 16px;
  border-bottom: 1px solid var(--border); transition: background 0.1s;
}
.cal-task-row:last-child { border-bottom: none; }
.cal-task-row:hover { background: var(--bg3); }
.cal-task-row.due-now  { background: rgba(252,222,65,0.08); border-left: 4px solid var(--gold); padding-left: 12px; }
.cal-task-row.due-soon { background: rgba(44,192,237,0.04); border-left: 4px solid var(--brand); padding-left: 12px; }
.cal-task-row.past     { background: rgba(229,62,62,0.05);  border-left: 4px solid var(--red); padding-left: 12px; }
.cal-due-badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
.cal-due-badge.now      { background: rgba(252,222,65,0.30); color: #7a6200; }
.cal-due-badge.soon     { background: rgba(44,192,237,0.15); color: #0285a8; }
.cal-due-badge.past     { background: rgba(229,62,62,0.12);  color: var(--red); }
.cal-due-badge.upcoming { background: var(--bg3); color: var(--mid); }
/* ══ KNOWLEDGE BASE (GUIDES) ══════════════════════════════════ */
.kb-search-row { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.kb-search-input { flex: 1; min-width: 180px; padding: 8px 12px; border: 1.5px solid var(--border); border-radius: 8px; font-size: 13px; font-family: var(--font-body); color: var(--ink); transition: border-color 0.15s; }
.kb-search-input:focus { outline: none; border-color: var(--brand); }
.kb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.kb-card { background: var(--white); border-radius: 10px; box-shadow: var(--shadow); overflow: hidden; border: 1px solid var(--border); display: flex; flex-direction: column; transition: box-shadow 0.15s; }
.kb-card:hover { box-shadow: var(--shadow-md); }
.kb-card-header { padding: 12px 14px 8px; border-bottom: 1px solid var(--border); }
.kb-card-title { font-family: var(--font-brand); font-size: 13px; font-weight: 800; color: var(--ink); margin-bottom: 3px; }
.kb-card-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.kb-card-body { padding: 10px 14px; font-size: 12px; color: var(--text); line-height: 1.6; flex: 1; }
.kb-card-steps { margin: 8px 0 0; padding-left: 16px; font-size: 12px; color: var(--text); }
.kb-card-steps li { margin-bottom: 3px; }
.kb-card-media { padding: 0 14px 12px; }
.kb-card-media a { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--brand); font-weight: 600; text-decoration: none; }
.kb-card-media a:hover { text-decoration: underline; }
.kb-card-footer { padding: 8px 14px; border-top: 1px solid var(--border); font-size: 10px; color: var(--mid); display: flex; justify-content: space-between; align-items: center; }
/* Add-entry modal */
.guide-form label { display: block; font-size: 11px; font-weight: 700; color: var(--mid); text-transform: uppercase; letter-spacing: 0.06em; margin: 12px 0 4px; }
.guide-form input[type=text], .guide-form select, .guide-form textarea { width: 100%; padding: 8px 10px; border: 1.5px solid var(--border); border-radius: 7px; font-family: var(--font-body); font-size: 12px; color: var(--ink); transition: border-color 0.15s; }
.guide-form input:focus, .guide-form select:focus, .guide-form textarea:focus { outline: none; border-color: var(--brand); }
.guide-form textarea { min-height: 100px; resize: vertical; }
.speech-btn { background: var(--bg3); border: 1.5px solid var(--border); border-radius: 7px; padding: 6px 12px; font-size: 11px; font-weight: 700; color: var(--mid); cursor: pointer; transition: all 0.15s; display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; }
.speech-btn:hover { border-color: var(--brand); color: var(--brand); }
.speech-btn.listening { background: rgba(229,62,62,0.1); border-color: var(--red); color: var(--red); animation: pulse 1s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.6; } }
/* ── File drop zone (inspections + guides upload) ─────────── */
.file-drop-zone {
  border: 2px dashed var(--border); border-radius: 8px; padding: 20px 16px;
  text-align: center; cursor: pointer; background: var(--bg3);
  transition: border-color 0.15s, background 0.15s; margin-top: 4px;
}
.file-drop-zone:hover, .file-drop-zone.dragover {
  border-color: var(--brand); background: rgba(44,192,237,0.06);
}
.insp-result-pass    { background: #EBF8F0; color: #1A7A3E; }
.insp-result-cond    { background: #FFF8E1; color: #8B6914; }
.insp-result-fail    { background: #FFF0F0; color: #C0392B; }
.insp-result-pending { background: #F4F4F5; color: #838488; }

/* ── Property selector (header) ──────────────────────────────── */
.prop-selector-wrap { display: flex; align-items: center; gap: 8px; }
.prop-selector-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--mid); white-space: nowrap;
}
#propertySelect {
  font-family: var(--font-body); font-size: 12px; font-weight: 600;
  color: var(--ink); background: var(--white);
  border: 1.5px solid var(--border); border-radius: 6px;
  padding: 5px 28px 5px 10px; cursor: pointer; max-width: 220px;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23838488'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center;
}
#propertySelect:focus { outline: none; border-color: var(--brand); }
#propertySelect:disabled { opacity: 0.55; cursor: default; }
.prop-info-strip {
  font-size: 10px; color: var(--mid); letter-spacing: 0.03em;
  white-space: nowrap; font-family: var(--font-mono);
}