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

:root {
  --bg: #0A0A0A;
  --surface: #111111;
  --card: #161616;
  --card-hover: #1C1C1C;
  --gold: #C9A84C;
  --gold-hover: #E8C96A;
  --gold-dim: rgba(201,168,76,0.10);
  --gold-glow: rgba(201,168,76,0.18);
  --text: #F5F5F5;
  --text-muted: #777777;
  --border: #1E1E1E;
  --border-hover: #2E2E2E;
  --success: #2ECC71;
  --danger: #E74C3C;
  --danger-dim: rgba(231,76,60,0.10);
  --sidebar-w: 256px;
}

html { scrollbar-width: thin; scrollbar-color: var(--gold) var(--surface); }
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 3px; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── TOP ACCENT LINE ─── */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold) 30%, var(--gold-hover) 50%, var(--gold) 70%, transparent);
  z-index: 999;
}

/* ─── SIDEBAR ─── */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  padding-top: 2px; /* account for top accent */
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.5rem 1.25rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.logo-mark {
  width: 40px; height: 40px;
  background: var(--gold);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; font-weight: 700; color: #0A0A0A;
  flex-shrink: 0;
  letter-spacing: -0.02em;
  box-shadow: 0 4px 16px rgba(201,168,76,0.3);
}

.logo-title { display: block; font-size: 0.9rem; font-weight: 600; letter-spacing: -0.02em; color: var(--text); }
.logo-sub { display: block; font-size: 0.68rem; color: var(--text-muted); margin-top: 1px; }

.sidebar-nav {
  list-style: none;
  padding: 1rem 0.75rem;
  flex: 1;
}

.sidebar-section-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  padding: 0.75rem 0.75rem 0.4rem;
  display: block;
  opacity: 0.6;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.18s ease;
  position: relative;
  margin-bottom: 1px;
  overflow: hidden;
}

.nav-link::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 2px;
  background: var(--gold);
  border-radius: 1px;
  transform: scaleY(0);
  transition: transform 0.18s ease;
}

.nav-link:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.nav-link:hover::before { transform: scaleY(0.5); opacity: 0.4; }
.nav-link.active { color: var(--gold); background: var(--gold-dim); }
.nav-link.active::before { transform: scaleY(1); }
.nav-link.active svg { stroke: var(--gold); }
.nav-link svg { flex-shrink: 0; opacity: 0.5; transition: opacity 0.18s; }
.nav-link:hover svg, .nav-link.active svg { opacity: 1; }

.sidebar-divider { height: 1px; background: var(--border); margin: 0.5rem 0.75rem; }

.sidebar-footer {
  padding: 1rem 1.25rem 1.25rem;
  border-top: 1px solid var(--border);
}

.user-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.user-avatar {
  width: 34px; height: 34px;
  background: var(--gold-dim);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 600; color: var(--gold);
  flex-shrink: 0;
  letter-spacing: -0.01em;
}

.user-name { display: block; font-size: 0.82rem; font-weight: 500; line-height: 1.2; }
.user-role {
  display: inline-block; font-size: 0.62rem;
  background: var(--gold-dim); color: var(--gold);
  padding: 1px 6px; border-radius: 3px; margin-top: 3px;
  font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em;
}

.logout-btn {
  width: 100%;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.5rem;
  border-radius: 7px;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.18s ease;
  letter-spacing: 0.01em;
}
.logout-btn:hover { border-color: var(--danger); color: var(--danger); background: var(--danger-dim); }

/* ─── MAIN CONTENT ─── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 2.25rem 2.5rem;
  background-image: radial-gradient(rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 28px 28px;
  min-height: 100vh;
}

/* ─── SECTIONS ─── */
.section { display: none; }
.section.active { display: block; animation: sectionFade 0.28s ease both; }

@keyframes sectionFade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1.75rem;
}

.section-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
  font-weight: 500;
}

.section-title {
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--text);
}

.header-right { display: flex; align-items: center; gap: 0.75rem; }

.date-badge {
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--card);
  border: 1px solid var(--border);
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  font-variant-numeric: tabular-nums;
}

.refresh-btn, .add-btn {
  background: var(--gold-dim);
  border: 1px solid rgba(201,168,76,0.3);
  color: var(--gold);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s ease;
  letter-spacing: 0.01em;
}
.refresh-btn:hover, .add-btn:hover {
  background: var(--gold);
  color: #0A0A0A;
  border-color: var(--gold);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(201,168,76,0.2);
}

/* ─── SUMMARY BAR ─── */
.summary-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.summary-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  transition: all 0.18s ease;
  position: relative;
  overflow: hidden;
}
.summary-item::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0;
  transition: opacity 0.18s;
}
.summary-item:hover { border-color: var(--border-hover); transform: translateY(-1px); }
.summary-item:hover::after { opacity: 0.5; }

.summary-label {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.summary-value {
  display: block;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  line-height: 1;
}
.summary-value.danger { color: var(--danger); }

/* ─── OFFICE CARDS ─── */
.offices-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1.25rem;
}

.office-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.22s ease;
  animation: slideUp 0.5s ease both;
  position: relative;
  overflow: hidden;
}

.office-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold) 50%, transparent);
  opacity: 0;
  transition: opacity 0.22s;
}

.office-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4), 0 0 0 1px var(--gold);
  border-color: var(--gold);
  background: var(--card-hover);
}
.office-card:hover::before { opacity: 1; }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.office-card:nth-child(1) { animation-delay: 0ms; }
.office-card:nth-child(2) { animation-delay: 80ms; }
.office-card:nth-child(3) { animation-delay: 160ms; }
.office-card:nth-child(4) { animation-delay: 240ms; }
.office-card:nth-child(5) { animation-delay: 320ms; }

.office-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.office-name { font-size: 1rem; font-weight: 600; letter-spacing: -0.015em; line-height: 1.3; }
.office-location { font-size: 0.72rem; color: var(--text-muted); margin-top: 0.25rem; }

.status-badge {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  border-radius: 20px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}
.status-badge.on-track { background: rgba(46,204,113,0.10); color: var(--success); border: 1px solid rgba(46,204,113,0.2); }
.status-badge.at-risk { background: rgba(201,168,76,0.10); color: var(--gold); border: 1px solid rgba(201,168,76,0.25); }
.status-badge.behind { background: var(--danger-dim); color: var(--danger); border: 1px solid rgba(231,76,60,0.2); }

.kpi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.kpi-item { display: flex; flex-direction: column; }

.kpi-label {
  font-size: 0.63rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
  font-weight: 500;
}

.kpi-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.025em;
  line-height: 1.15;
}
.kpi-value.gold { color: var(--gold); }

.kpi-goal { font-size: 0.68rem; color: var(--text-muted); margin-top: 2px; font-variant-numeric: tabular-nums; }

.kpi-progress {
  height: 2px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  margin-top: 0.4rem;
  overflow: hidden;
}
.kpi-progress-bar {
  height: 100%;
  border-radius: 2px;
  width: 0%;
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  background: var(--gold);
}
.kpi-progress-bar.success { background: var(--success); }
.kpi-progress-bar.danger { background: var(--danger); }

.card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.card-detail-link {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: color 0.18s;
}
.office-card:hover .card-detail-link { color: var(--gold); }

/* ─── SKELETON LOADING ─── */
.skeleton {
  background: linear-gradient(90deg, var(--card) 25%, #1E1E1E 50%, var(--card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
  height: 1em;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  animation: slideUp 0.4s ease both;
}

/* ─── MISSED CALLS ─── */
.calls-list {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.calls-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.calls-count {
  font-size: 0.72rem;
  color: var(--text-muted);
  background: var(--border);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
}

.call-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--border);
  transition: all 0.18s ease;
  gap: 1rem;
}
.call-item:last-child { border-bottom: none; }
.call-item:hover { background: rgba(255,255,255,0.02); }

.call-left { display: flex; align-items: center; gap: 0.85rem; }

.call-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--danger-dim);
  border: 1px solid rgba(231,76,60,0.15);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.call-icon svg { stroke: var(--danger); }

.call-number { font-size: 0.92rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.call-meta { font-size: 0.72rem; color: var(--text-muted); margin-top: 0.15rem; }

.call-right { display: flex; align-items: center; gap: 0.65rem; flex-shrink: 0; }

.call-office {
  font-size: 0.7rem;
  background: var(--gold-dim);
  color: var(--gold);
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  font-weight: 500;
  border: 1px solid rgba(201,168,76,0.15);
}

.call-status {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.18s ease;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.call-status.pending { background: var(--danger-dim); color: var(--danger); border-color: rgba(231,76,60,0.2); }
.call-status.called-back { background: rgba(46,204,113,0.08); color: var(--success); border-color: rgba(46,204,113,0.2); }
.call-status:hover { transform: scale(1.04); }

/* ─── NOTES ─── */
.notes-toolbar { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; flex-wrap: wrap; }

.office-filter-btn {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.38rem 0.85rem;
  border-radius: 20px;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.18s ease;
  font-weight: 500;
}
.office-filter-btn:hover { border-color: var(--border-hover); color: var(--text); }
.office-filter-btn.active { background: var(--gold-dim); border-color: rgba(201,168,76,0.4); color: var(--gold); }

.notes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }

.note-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 2px solid var(--border);
  border-radius: 12px;
  padding: 1.1rem 1.15rem;
  transition: all 0.18s ease;
  animation: slideUp 0.4s ease both;
}
.note-card:hover {
  background: var(--card-hover);
  border-left-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}
.note-card.pinned { border-left-color: var(--gold); }

.note-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.65rem; }
.note-office { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.09em; color: var(--gold); font-weight: 600; }
.note-pin-label { font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.note-pin-label.active { color: var(--gold); }
.note-content { font-size: 0.88rem; line-height: 1.6; color: var(--text); margin-bottom: 0.85rem; }
.note-footer { display: flex; justify-content: space-between; align-items: center; }
.note-meta { font-size: 0.7rem; color: var(--text-muted); }
.note-delete { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 0.72rem; transition: color 0.18s; padding: 0.2rem 0.4rem; border-radius: 4px; font-family: 'Inter', sans-serif; }
.note-delete:hover { color: var(--danger); background: var(--danger-dim); }

/* ─── AI BRIEFING ─── */
.briefing-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 3rem 2rem;
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.briefing-card::before {
  content: '';
  position: absolute;
  top: -60px; left: 50%;
  transform: translateX(-50%);
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(201,168,76,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.briefing-placeholder { max-width: 320px; }
.briefing-icon {
  width: 56px; height: 56px;
  background: var(--gold-dim);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.25rem;
}
.briefing-icon svg { stroke: var(--gold); opacity: 0.7; }
.briefing-placeholder h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.5rem; letter-spacing: -0.01em; }
.briefing-placeholder p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; }
.briefing-connect-btn {
  display: inline-block;
  margin-top: 1.5rem;
  background: var(--gold-dim);
  border: 1px solid rgba(201,168,76,0.3);
  color: var(--gold);
  padding: 0.55rem 1.25rem;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s ease;
}
.briefing-connect-btn:hover { background: var(--gold); color: #0A0A0A; transform: translateY(-1px); }

/* ─── TOAST NOTIFICATIONS ─── */
.toast-container {
  position: fixed;
  bottom: 1.5rem; right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 9999;
}

.toast {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: 10px;
  padding: 0.75rem 1.1rem;
  font-size: 0.85rem;
  color: var(--text);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  animation: toastIn 0.3s ease both;
  max-width: 300px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px) scale(0.95); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(20px); max-height: 0; padding: 0; margin: 0; }
}
.toast.out { animation: toastOut 0.3s ease both; }

/* ─── MODAL ─── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 500;
  backdrop-filter: blur(6px);
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  width: 100%;
  max-width: 460px;
  animation: modalIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 1.25rem; letter-spacing: -0.01em; }

.modal-select, .modal-textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  margin-bottom: 0.9rem;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
  appearance: none;
}
.modal-select:focus, .modal-textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.08);
}
.modal-textarea { min-height: 120px; resize: vertical; line-height: 1.55; }

.modal-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  cursor: pointer;
}
.modal-check input { accent-color: var(--gold); cursor: pointer; width: 15px; height: 15px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 0.65rem; }

.btn-primary {
  background: var(--gold);
  color: #0A0A0A;
  border: none;
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}
.btn-primary:hover { background: var(--gold-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(201,168,76,0.25); }

.btn-secondary {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.18s ease;
}
.btn-secondary:hover { border-color: var(--border-hover); color: var(--text); }

/* ─── EMPTY STATE ─── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
  text-align: center;
}
.empty-state svg { margin-bottom: 1rem; opacity: 0.25; }
.empty-state p { font-size: 0.9rem; font-weight: 500; color: var(--text); margin-bottom: 0.4rem; }
.empty-state span { font-size: 0.8rem; }

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .summary-bar { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .sidebar {
    width: 100%; height: auto; position: relative;
    border-right: none; border-bottom: 1px solid var(--border);
    padding-top: 2px;
  }
  .sidebar-nav { display: flex; flex-direction: row; overflow-x: auto; padding: 0.5rem; flex: unset; }
  .sidebar-section-label, .sidebar-divider, .sidebar-footer { display: none; }
  .main-content { margin-left: 0; padding: 1.25rem; }
  .summary-bar { grid-template-columns: repeat(2, 1fr); }
  .offices-grid { grid-template-columns: 1fr; }
  .section-title { font-size: 1.25rem; }
}

/* ─── MTD PROGRESS BAR ─── */
.mtd-bar {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
}
.mtd-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  font-weight: 500;
}
.mtd-track {
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  position: relative;
  overflow: visible;
}
.mtd-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-hover));
  border-radius: 3px;
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  width: 0%;
}
.mtd-today-marker {
  position: absolute;
  top: -4px;
  width: 2px;
  height: 14px;
  background: var(--gold);
  border-radius: 1px;
  box-shadow: 0 0 8px rgba(201,168,76,0.6);
  transform: translateX(-50%);
}
.mtd-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
}
.mtd-tick {
  font-size: 0.62rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.mtd-tick.active { color: var(--gold); font-weight: 600; }

/* ─── CALENDAR ─── */
.calendar-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.cal-day-header {
  padding: 0.65rem 0.5rem;
  text-align: center;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.01);
}

.cal-day {
  min-height: 80px;
  padding: 0.5rem;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
  cursor: default;
  position: relative;
}
.cal-day:nth-child(7n) { border-right: none; }
.cal-day:hover { background: rgba(255,255,255,0.02); }

.cal-day.empty { background: rgba(0,0,0,0.2); }
.cal-day.today { background: rgba(201,168,76,0.06); }
.cal-day.today::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gold);
}

.cal-num {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.cal-day.today .cal-num {
  color: var(--gold);
  font-weight: 700;
}

.cal-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-top: 4px;
}

.cal-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
}
.cal-dot.on-track { background: var(--success); }
.cal-dot.at-risk { background: var(--gold); }
.cal-dot.behind { background: var(--danger); }
.cal-dot.today-dot { background: var(--gold); border: 1px solid var(--gold-hover); }

.cal-legend {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.5rem 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.cal-legend .cal-dot { margin-right: 4px; display: inline-block; vertical-align: middle; }

/* ─── EMBED FRAMES ─── */
.embed-frame-wrap {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  height: 680px;
  background: var(--card);
}

.embed-frame {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  color-scheme: dark;
}

/* ─── VIDEO HUDDLE ─── */
.huddle-offices {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.huddle-office-btn {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.1rem;
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: left;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.huddle-office-btn:hover {
  border-color: var(--gold);
  background: var(--card-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201,168,76,0.1);
}
.huddle-icon {
  width: 38px; height: 38px;
  background: rgba(201,168,76,0.08);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.huddle-icon svg { stroke: var(--gold); }
.huddle-name { font-size: 0.85rem; font-weight: 500; line-height: 1.3; }
.huddle-sub { font-size: 0.7rem; color: var(--text-muted); margin-top: 2px; }

/* ─── VAULTS ─── */
.vault-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.vault-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: var(--text);
  transition: all 0.18s ease;
}
.vault-card:hover {
  border-color: var(--gold);
  background: var(--card-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201,168,76,0.1);
}
.vault-icon {
  width: 44px; height: 44px;
  background: var(--gold-dim);
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.vault-icon svg { stroke: var(--gold); }
.vault-name { font-size: 0.9rem; font-weight: 600; letter-spacing: -0.01em; }
.vault-url { font-size: 0.72rem; color: var(--text-muted); margin-top: 3px; }
.vault-arrow {
  margin-left: auto;
  color: var(--text-muted);
  opacity: 0;
  transition: opacity 0.18s, transform 0.18s;
  flex-shrink: 0;
}
.vault-card:hover .vault-arrow { opacity: 1; transform: translateX(3px); }

/* ─── AI CHAT WIDGET ─── */
.ai-chat-toggle {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  background: var(--gold);
  color: #0A0A0A;
  border: none;
  border-radius: 28px;
  padding: 0.7rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  z-index: 800;
  box-shadow: 0 4px 24px rgba(201,168,76,0.35);
  transition: all 0.2s ease;
  letter-spacing: 0.01em;
}
.ai-chat-toggle:hover { background: var(--gold-hover); transform: translateY(-2px); box-shadow: 0 8px 32px rgba(201,168,76,0.4); }
.ai-chat-toggle.active { background: #1C1C1C; color: var(--gold); border: 1px solid var(--gold); }
.ai-toggle-label { white-space: nowrap; }

.ai-chat-widget {
  position: fixed;
  bottom: 5.5rem;
  right: 1.75rem;
  width: 380px;
  max-height: 560px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6), 0 0 0 1px rgba(201,168,76,0.1);
  display: flex;
  flex-direction: column;
  z-index: 799;
  overflow: hidden;
  transform: scale(0.92) translateY(16px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: bottom right;
}
.ai-chat-widget.open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: all;
}

.ai-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--border);
  background: rgba(201,168,76,0.04);
  flex-shrink: 0;
}
.ai-chat-header-left { display: flex; align-items: center; gap: 0.7rem; }
.ai-chat-avatar {
  width: 36px; height: 36px;
  background: var(--gold);
  color: #0A0A0A;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 700;
  flex-shrink: 0;
}
.ai-chat-title { font-size: 0.9rem; font-weight: 600; letter-spacing: -0.01em; }
.ai-chat-status { display: flex; align-items: center; gap: 0.3rem; font-size: 0.68rem; color: var(--text-muted); margin-top: 1px; }
.ai-status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); box-shadow: 0 0 6px var(--success); display: inline-block; }

.ai-chat-close {
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; padding: 0.3rem; border-radius: 6px;
  transition: all 0.15s; display: flex; align-items: center;
}
.ai-chat-close:hover { background: rgba(255,255,255,0.06); color: var(--text); }

.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.ai-msg { display: flex; }
.ai-msg.user { justify-content: flex-end; }
.ai-msg.ai { justify-content: flex-start; }

.ai-msg-bubble {
  max-width: 85%;
  padding: 0.65rem 0.9rem;
  border-radius: 12px;
  font-size: 0.875rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}
.ai-msg.user .ai-msg-bubble {
  background: var(--gold);
  color: #0A0A0A;
  border-bottom-right-radius: 4px;
  font-weight: 500;
}
.ai-msg.ai .ai-msg-bubble {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text);
  border-bottom-left-radius: 4px;
}
.ai-msg.error .ai-msg-bubble { background: var(--danger-dim); border-color: rgba(231,76,60,0.2); color: var(--danger); }

/* Typing indicator */
.typing-dots { display: flex; gap: 4px; align-items: center; padding: 2px 0; }
.typing-dots span {
  width: 6px; height: 6px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typingBounce 1.2s infinite ease-in-out;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

.ai-chat-input-wrap {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  background: rgba(0,0,0,0.1);
}

.ai-chat-input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.6rem 0.85rem;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  outline: none;
  resize: none;
  line-height: 1.45;
  transition: border-color 0.18s;
  max-height: 120px;
}
.ai-chat-input:focus { border-color: var(--gold); }
.ai-chat-input::placeholder { color: var(--text-muted); }

.ai-chat-send {
  background: var(--gold);
  border: none;
  color: #0A0A0A;
  width: 36px; height: 36px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.18s;
  flex-shrink: 0;
}
.ai-chat-send:hover { background: var(--gold-hover); transform: scale(1.05); }

@media (max-width: 480px) {
  .ai-chat-widget { width: calc(100vw - 2rem); right: 1rem; }
  .ai-chat-toggle { right: 1rem; bottom: 1rem; }
}

/* ─── HUDDLE PREP ─── */
.section-desc { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 1.5rem; }

.huddle-prep-offices {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.huddle-prep-btn {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.1rem;
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: left;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.huddle-prep-btn:hover {
  border-color: var(--gold);
  background: var(--card-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201,168,76,0.1);
}
.huddle-prep-arrow { margin-left: auto; opacity: 0; transition: opacity 0.18s, transform 0.18s; color: var(--gold); }
.huddle-prep-btn:hover .huddle-prep-arrow { opacity: 1; transform: translateX(3px); }

.huddle-agenda-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.huddle-agenda-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
  background: rgba(201,168,76,0.03);
}
.agenda-title { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; }

.agenda-kpi-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-bottom: 1px solid var(--border);
}
.agenda-kpi-item {
  padding: 1rem 1.25rem;
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
}
.agenda-kpi-item:last-child { border-right: none; }

.agenda-body { padding: 1.5rem; display: flex; flex-direction: column; gap: 1.25rem; }

.agenda-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
}
.agenda-block.agenda-opener { border-left: 3px solid var(--gold); }
.agenda-block.agenda-closer { border-left: 3px solid var(--success); }
.agenda-block.agenda-key-metric { border-left: 3px solid var(--gold); background: rgba(201,168,76,0.05); }

.agenda-block-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.6rem;
}
.agenda-block p { font-size: 0.9rem; line-height: 1.6; color: var(--text); }

.agenda-wins { list-style: none; padding: 0; }
.agenda-wins li {
  font-size: 0.88rem;
  color: var(--text);
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 0.6rem;
}
.agenda-wins li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--success); flex-shrink: 0; }
.agenda-wins li:last-child { border-bottom: none; }

.agenda-focus-list { display: flex; flex-direction: column; gap: 0.85rem; }
.agenda-focus-item { display: flex; gap: 1rem; align-items: flex-start; }
.agenda-focus-num {
  width: 26px; height: 26px;
  background: var(--gold-dim);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 700; color: var(--gold);
  flex-shrink: 0; margin-top: 2px;
}
.agenda-focus-body { flex: 1; }
.agenda-focus-topic { font-size: 0.88rem; font-weight: 600; margin-bottom: 0.3rem; }
.agenda-focus-point { font-size: 0.85rem; color: var(--text-muted); line-height: 1.55; margin-bottom: 0.4rem; }
.agenda-action { font-size: 0.8rem; background: var(--card); border: 1px solid var(--border); padding: 0.4rem 0.75rem; border-radius: 6px; display: flex; gap: 0.5rem; }
.agenda-action-label { color: var(--gold); font-weight: 600; white-space: nowrap; }

.agenda-metric-value { font-size: 1.1rem; font-weight: 600; color: var(--gold); margin-top: 0.25rem; }

.huddle-notes-section { padding: 1.5rem; border-top: 1px solid var(--border); }

/* ─── HR RESOURCES ─── */
.hr-office-tabs { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; flex-wrap: wrap; }

.hr-categories { display: flex; flex-direction: column; gap: 1.5rem; }

.hr-category-block {}

.hr-category-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 0.75rem;
  padding-left: 2px;
}

.hr-resources-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0.85rem; }

.hr-resource-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  transition: all 0.18s ease;
}
.hr-resource-card:hover { border-color: var(--border-hover); background: var(--card-hover); }

.hr-resource-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.5rem; gap: 0.5rem; }
.hr-resource-title { font-size: 0.88rem; font-weight: 600; flex: 1; }
.hr-resource-link {
  font-size: 0.72rem; color: var(--gold);
  background: var(--gold-dim); border: 1px solid rgba(201,168,76,0.2);
  padding: 0.2rem 0.55rem; border-radius: 4px; text-decoration: none;
  white-space: nowrap; transition: all 0.15s;
}
.hr-resource-link:hover { background: var(--gold); color: #0A0A0A; }
.hr-resource-content { font-size: 0.82rem; color: var(--text-muted); line-height: 1.55; margin-bottom: 0.6rem; }
.hr-resource-meta { font-size: 0.68rem; color: var(--text-muted); }

.hr-empty { text-align: center; padding: 3rem; color: var(--text-muted); }
.hr-empty p { font-size: 0.9rem; margin-bottom: 1rem; }

@media print {
  .sidebar, .ai-chat-toggle, .ai-chat-widget, .toast-container { display: none !important; }
  .main-content { margin-left: 0 !important; }
  .huddle-notes-section, .huddle-prep-offices { display: none !important; }
}

/* ─── MTD MONTH HEADER ─── */
.mtd-month-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}
.mtd-month-name {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}
.mtd-month-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ─── AR SUMMARY ─── */
.summary-bar { grid-template-columns: repeat(5, 1fr); }

.ar-highlight { position: relative; }
.ar-value { color: var(--text) !important; }
.ar-sub {
  display: block;
  font-size: 0.68rem;
  margin-top: 0.3rem;
  font-variant-numeric: tabular-nums;
}

/* ─── AR ON OFFICE CARDS ─── */
.ar-row {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}
.ar-row-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.5rem;
}
.ar-total-val {
  font-size: 1rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--text);
}

.ar-aging-bar {
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  background: rgba(255,255,255,0.04);
  margin-bottom: 0.4rem;
}
.ar-aging-seg {
  height: 100%;
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.seg-0-30   { background: var(--success); }
.seg-31-60  { background: var(--gold); }
.seg-61-90  { background: #E67E22; }
.seg-over-90 { background: var(--danger); }

.ar-aging-labels {
  display: flex;
  justify-content: space-between;
}
.ar-seg-label {
  font-size: 0.62rem;
  color: var(--text-muted);
  font-weight: 500;
}
.ar-seg-label.seg-0-30-label   { color: var(--success); }
.ar-seg-label.seg-31-60-label  { color: var(--gold); }
.ar-seg-label.seg-61-90-label  { color: #E67E22; }
.ar-seg-label.seg-over-90-label { color: var(--text-muted); }
.ar-seg-label.ar-danger { color: var(--danger) !important; font-weight: 700; }

/* ─── MORNING BRIEF ─── */
.morning-brief-wrap { margin-bottom: 1.75rem; }

.morning-brief-loading {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;
}
.brief-loading-inner {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.brief-pulse {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--gold);
  animation: pulseDot 1.4s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.6); opacity: 0.4; }
}

.morning-brief-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.brief-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: rgba(201,168,76,0.04);
}
.brief-header-left { display: flex; align-items: center; gap: 0.85rem; }

.brief-ai-badge {
  width: 38px; height: 38px;
  background: var(--gold);
  color: #0A0A0A;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(201,168,76,0.25);
}

.brief-title {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.brief-meta { font-size: 0.7rem; color: var(--text-muted); margin-top: 2px; }

.brief-overall {
  padding: 0.9rem 1.5rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  line-height: 1.55;
  font-style: italic;
}

.brief-offices-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0;
  border-bottom: 1px solid var(--border);
}

.brief-office-card {
  padding: 1.1rem 1.25rem;
  border-right: 1px solid var(--border);
  transition: background 0.18s;
  position: relative;
  overflow: hidden;
}
.brief-office-card:last-child { border-right: none; }
.brief-office-card:hover { background: rgba(255,255,255,0.02); }
.brief-office-card.priority {
  background: rgba(201,168,76,0.04);
  border-top: 2px solid var(--gold);
}

.priority-flag {
  position: absolute;
  top: 0; right: 0;
  background: var(--gold);
  color: #0A0A0A;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-bottom-left-radius: 6px;
}

.brief-office-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
  gap: 0.5rem;
}
.brief-office-name {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  flex: 1;
}

.brief-focus {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0.65rem;
}

.brief-topics {
  list-style: none;
  padding: 0;
  margin-bottom: 0.75rem;
}
.brief-topics li {
  font-size: 0.8rem;
  color: var(--text);
  padding: 0.25rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  line-height: 1.4;
}
.brief-topics li::before {
  content: '';
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
  margin-top: 6px;
}
.brief-topics li:last-child { border-bottom: none; }

.brief-action {
  font-size: 0.75rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.4rem 0.65rem;
  display: flex;
  gap: 0.5rem;
  line-height: 1.4;
  color: var(--text-muted);
}
.brief-action-label {
  color: var(--gold);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.brief-closing {
  padding: 0.85rem 1.5rem;
  font-size: 0.82rem;
  color: var(--gold);
  font-weight: 500;
  font-style: italic;
}

@media (max-width: 900px) {
  .brief-offices-row { grid-template-columns: 1fr 1fr; }
  .brief-office-card { border-bottom: 1px solid var(--border); }
}
@media (max-width: 600px) {
  .brief-offices-row { grid-template-columns: 1fr; }
}

/* ─── TODO LIST ─── */
.todo-status-tabs { display: flex; gap: 0.5rem; margin-bottom: 1.25rem; }
.todo-filter-wrap { display: flex; align-items: center; }

.todo-list { display: flex; flex-direction: column; gap: 0.5rem; }

.todo-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  transition: all 0.18s ease;
  animation: slideUp 0.3s ease both;
}
.todo-item:hover { background: var(--card-hover); border-color: var(--border-hover); }
.todo-item.todo-urgent { border-left-color: var(--danger); }
.todo-item.todo-high { border-left-color: var(--gold); }
.todo-item.done { opacity: 0.55; }
.todo-item.done:hover { opacity: 0.75; }

.todo-check {
  width: 22px; height: 22px;
  border-radius: 6px;
  border: 2px solid var(--border-hover);
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 1px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.18s ease;
  color: white;
}
.todo-check:hover { border-color: var(--success); background: rgba(46,204,113,0.1); }
.todo-check.checked { background: var(--success); border-color: var(--success); }

.todo-body { flex: 1; min-width: 0; }

.todo-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.3rem;
  flex-wrap: wrap;
}
.todo-title { font-size: 0.9rem; font-weight: 500; line-height: 1.35; }
.todo-done-text { text-decoration: line-through; color: var(--text-muted); }

.todo-tags { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; flex-shrink: 0; }

.todo-priority-badge {
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.18rem 0.5rem;
  border-radius: 4px;
  background: rgba(255,255,255,0.05);
  color: var(--text-muted);
}
.todo-urgent .todo-priority-badge { background: var(--danger-dim); color: var(--danger); }
.todo-high .todo-priority-badge { background: var(--gold-dim); color: var(--gold); }

.todo-overdue {
  font-size: 0.62rem;
  font-weight: 600;
  background: var(--danger-dim);
  color: var(--danger);
  padding: 0.18rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.todo-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0.4rem;
}

.todo-meta-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.todo-assigned, .todo-due, .todo-created {
  font-size: 0.7rem;
  color: var(--text-muted);
}
.todo-assigned { color: var(--text); font-weight: 500; }
.todo-due { font-variant-numeric: tabular-nums; }
.overdue-text { color: var(--danger) !important; }

.todo-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}
.todo-action-btn {
  width: 30px; height: 30px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.18s;
}
.todo-action-btn:hover { border-color: var(--gold); color: var(--gold); background: var(--gold-dim); }
.todo-action-btn.active { border-color: var(--gold); color: var(--gold); background: var(--gold-dim); }
.todo-action-btn.delete:hover { border-color: var(--danger); color: var(--danger); background: var(--danger-dim); }

/* ─── TODO IMPROVEMENTS ─── */
.todo-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.todo-status-tabs { display: flex; gap: 0.5rem; }
.todo-list-inner { display: flex; flex-direction: column; gap: 0.5rem; }

.todo-group { margin-bottom: 1.5rem; }
.todo-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.todo-group-name { font-size: 0.82rem; font-weight: 600; color: var(--gold); text-transform: uppercase; letter-spacing: 0.08em; }
.todo-group-count { font-size: 0.72rem; color: var(--text-muted); background: var(--card); border: 1px solid var(--border); padding: 0.15rem 0.5rem; border-radius: 10px; }

.todo-assigned-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  padding: 0.15rem 0.5rem;
  border-radius: 5px;
}
.todo-unassigned { font-size: 0.72rem; color: var(--text-muted); font-style: italic; }

.todo-status-chip {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: rgba(255,255,255,0.04);
  color: var(--text-muted);
}
.todo-status-chip.in-progress { background: var(--gold-dim); color: var(--gold); }

.todo-due {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
