:root {
  --bg-base: #090e1a;
  --surface: rgba(15, 23, 42, 0.78);
  --surface-elevated: rgba(30, 41, 59, 0.85);
  --border: rgba(148, 163, 184, 0.18);
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --primary: #3b82f6;
  --emerald: #10b981;
  --amber: #f59e0b;
  --red: #ef4444;
  --radius: 14px;
}

[data-theme="neon"] {
  --bg-base: #050214;
  --surface: rgba(15, 10, 42, 0.84);
  --surface-elevated: rgba(34, 21, 74, 0.9);
  --border: rgba(168, 85, 247, 0.35);
  --primary: #a855f7;
  --emerald: #00f5d4;
}

[data-theme="light"] {
  --bg-base: #e2e8f0;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-elevated: rgba(241, 245, 249, 0.96);
  --border: rgba(15, 23, 42, 0.14);
  --text: #0f172a;
  --text-muted: #475569;
  --primary: #2563eb;
}

[data-theme="light"] .glass-panel {
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.92) 0%, rgba(241, 245, 249, 0.94) 100%);
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
}

.city-minimap {
  position: fixed;
  left: 78px;
  bottom: 18px;
  width: 220px;
  padding: 10px;
  border-radius: 14px;
  z-index: 30;
}
.minimap-hdr {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.minimap-grid {
  position: relative;
  width: 100%;
  height: 150px;
  background: rgba(15, 23, 42, 0.55);
  border-radius: 10px;
  border: 1px solid var(--border);
  overflow: hidden;
}
.minimap-dot {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 4px;
  transform: translate(-50%, -50%);
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.6);
  transition: transform 0.15s ease;
}
.minimap-dot:hover {
  transform: translate(-50%, -50%) scale(1.35);
  z-index: 5;
}

.exec-command-bar {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  width: min(640px, calc(100vw - 340px));
  z-index: 28;
}
.exec-command-bar input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  outline: none;
  font-size: 13px;
}

.agent-id-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
}
.agent-id-hdr {
  display: flex;
  align-items: center;
  gap: 10px;
}
.agent-avatar-badge {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.agent-id-bio {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: radial-gradient(circle at 50% 30%, #152038 0%, #090e1a 70%);
  color: var(--text);
  font-family: 'Inter', 'Cairo', system-ui, -apple-system, sans-serif;
}

.hidden { display: none !important; }
.muted { color: var(--text-muted); }
.small { font-size: 12px; }
.ar-sub { font-family: 'Cairo', sans-serif; font-size: 0.8em; color: var(--text-muted); margin-left: 8px; }

.glass-panel {
  background: linear-gradient(165deg, rgba(22, 33, 58, 0.84) 0%, rgba(11, 17, 32, 0.88) 100%);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: rgba(9, 14, 26, 0.4); }
::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.28); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(148, 163, 184, 0.48); }

/* Buttons & Inputs */
.btn {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: #fff;
  transition: transform 0.12s ease, opacity 0.15s ease, background 0.15s ease;
  font-family: inherit;
}
.btn:hover { opacity: 0.92; transform: translateY(-1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-primary { background: linear-gradient(135deg, #2563eb, #3b82f6); }
.btn-emerald { background: linear-gradient(135deg, #059669, #10b981); }
.btn-amber { background: linear-gradient(135deg, #d97706, #f59e0b); }
.btn-danger { background: linear-gradient(135deg, #dc2626, #ef4444); }
.btn-ghost { background: rgba(30, 41, 59, 0.7); border-color: var(--border); color: var(--text); }
.btn-full { width: 100%; padding: 11px; }

.icon-btn {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
}
.icon-btn:hover { background: rgba(51, 65, 85, 0.9); }

input, textarea, select {
  width: 100%;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  outline: none;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

/* Login Overlay */
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(30, 58, 138, 0.25), rgba(9, 14, 26, 0.96));
}
.login-card {
  width: 360px;
  padding: 28px;
  border-radius: 18px;
  text-align: center;
}
.login-icon { font-size: 40px; margin-bottom: 8px; }
.login-card h1 { margin: 0 0 6px; font-size: 22px; }
.login-card form { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.error-text { color: #f87171; font-size: 13px; margin-top: 10px; }
.warning-text { color: #fbbf24; font-size: 12px; margin-top: 10px; }

/* App Shell */
.app-shell { position: relative; width: 100%; height: 100%; }

/* Left Sidebar */
.left-sidebar {
  position: fixed;
  left: 14px;
  top: 76px;
  bottom: 14px;
  width: 54px;
  border-radius: 16px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px 6px;
}
.sidebar-top, .sidebar-bottom { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.side-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.side-btn svg { width: 20px; height: 20px; }
.side-btn:hover { background: rgba(51, 65, 85, 0.55); color: #fff; }
.side-btn.active { background: rgba(16, 185, 129, 0.18); border-color: rgba(16, 185, 129, 0.45); color: #34d399; }
.mini-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 99px;
}

/* Top HUD */
.top-hud {
  position: fixed;
  top: 14px;
  left: 14px;
  right: 14px;
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}
.top-hud > * { pointer-events: auto; }
.hud-brand { display: flex; align-items: center; gap: 10px; padding-left: 6px; }
.brand-title { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; }
.company-badge, .company-badge-select {
  background: rgba(59, 130, 246, 0.16);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #93c5fd;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 99px;
  width: auto;
  cursor: pointer;
}

.agent-speech-bubble {
  position: absolute;
  bottom: calc(100% + 5px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(16, 185, 129, 0.94);
  color: #04130e;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 8px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

.kanban-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  max-height: 430px;
  overflow-y: auto;
}
.kanban-col {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.kanban-col h4 {
  margin: 0 0 4px;
  font-size: 12.5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.kanban-card {
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
@media (max-width: 900px) {
  .kanban-board { grid-template-columns: repeat(2, 1fr); }
}
.hud-metrics {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 14px;
  flex-wrap: wrap;
}
.hud-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(30, 41, 59, 0.72);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 12px;
  color: var(--text);
}
.hud-pill-btn { cursor: pointer; }
.hud-pill-btn:hover { border-color: var(--primary); }
.count-badge {
  padding: 2px 7px;
  border-radius: 99px;
  font-weight: 700;
  font-size: 11px;
}
.count-badge.blue { background: rgba(59, 130, 246, 0.25); color: #93c5fd; }
.count-badge.amber { background: rgba(245, 158, 11, 0.25); color: #fcd34d; }

/* 3D Viewport & Floating Labels */
.viewport-wrap { position: fixed; inset: 0; z-index: 1; }
#officeCanvas { width: 100%; height: 100%; display: block; }
.labels-layer { position: fixed; inset: 0; pointer-events: none; z-index: 15; overflow: hidden; }

.zone-label {
  position: absolute;
  transform: translate(-50%, -50%);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(9, 14, 26, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.14);
  pointer-events: none;
  white-space: nowrap;
}

.agent-pill {
  position: absolute;
  transform: translate(-50%, -100%);
  pointer-events: auto;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 99px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(24, 35, 58, 0.88));
  backdrop-filter: blur(10px);
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  color: #f8fafc;
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.55);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.agent-pill[data-zone="management"] {
  border-color: rgba(245, 158, 11, 0.78);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.22), inset 0 0 10px rgba(245, 158, 11, 0.12);
}
.agent-pill[data-zone="hr"] {
  border-color: rgba(236, 72, 153, 0.78);
  box-shadow: 0 6px 20px rgba(236, 72, 153, 0.22), inset 0 0 10px rgba(236, 72, 153, 0.12);
}
.agent-pill[data-zone="learning"] {
  border-color: rgba(168, 85, 247, 0.78);
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.22), inset 0 0 10px rgba(168, 85, 247, 0.12);
}
.agent-pill[data-zone="marketing"] {
  border-color: rgba(20, 184, 166, 0.78);
  box-shadow: 0 6px 20px rgba(20, 184, 166, 0.22), inset 0 0 10px rgba(20, 184, 166, 0.12);
}
.agent-pill[data-zone="tech"] {
  border-color: rgba(59, 130, 246, 0.78);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.22), inset 0 0 10px rgba(59, 130, 246, 0.12);
}
.agent-pill[data-zone="dev"] {
  border-color: rgba(99, 102, 241, 0.78);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.22), inset 0 0 10px rgba(99, 102, 241, 0.12);
}
.agent-pill[data-zone="automation"] {
  border-color: rgba(6, 182, 212, 0.78);
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.22), inset 0 0 10px rgba(6, 182, 212, 0.12);
}
.agent-pill:hover { transform: translate(-50%, -108%) scale(1.06); z-index: 25; }
.agent-pill .pill-role { color: #cbd5e1; font-weight: 400; max-width: 85px; overflow: hidden; text-overflow: ellipsis; }

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.status-dot.idle { background: #10b981; box-shadow: 0 0 8px #10b981; }
.status-dot.working { background: #f59e0b; box-shadow: 0 0 10px #f59e0b; animation: pulseDot 1s infinite; }
.status-dot.approval { background: #3b82f6; box-shadow: 0 0 10px #3b82f6; animation: pulseDot 1.3s infinite; }
.status-dot.error { background: #ef4444; box-shadow: 0 0 10px #ef4444; }
@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.45); opacity: 0.65; }
}

.viewport-hint {
  position: fixed;
  bottom: 14px;
  left: 82px;
  z-index: 20;
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(15, 23, 42, 0.65);
  padding: 5px 12px;
  border-radius: 99px;
  border: 1px solid var(--border);
  pointer-events: none;
}

/* Slide-Over Drawers */
.drawer {
  position: fixed;
  top: 76px;
  right: 14px;
  bottom: 14px;
  width: 430px;
  max-width: calc(100vw - 88px);
  z-index: 50;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.agent-identity { display: flex; align-items: center; gap: 10px; }
.agent-avatar-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #10b981);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
}
.agent-title-row { display: flex; align-items: center; gap: 8px; }
.drawer-header-actions { display: flex; gap: 6px; }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.msg-bubble {
  max-width: 92%;
  padding: 11px 13px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.55;
  word-wrap: break-word;
}
.msg-bubble.user {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.45), rgba(59, 130, 246, 0.3));
  border: 1px solid rgba(59, 130, 246, 0.4);
}
.msg-bubble.model {
  align-self: flex-start;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid var(--border);
}
.msg-bubble pre {
  background: #060a14;
  padding: 10px;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 12px;
  direction: ltr;
  text-align: left;
}
.msg-bubble code { font-family: Consolas, monospace; background: rgba(0, 0, 0, 0.35); padding: 1px 4px; border-radius: 4px; }
.msg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}
.msg-action-btn {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 7px;
  padding: 3px 8px;
  font-size: 11px;
  cursor: pointer;
}
.msg-action-btn:hover { color: #fff; border-color: var(--primary); }

.source-links { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.source-chip {
  font-size: 11px;
  color: #93c5fd;
  background: rgba(37, 99, 235, 0.16);
  padding: 2px 8px;
  border-radius: 99px;
  text-decoration: none;
}

.inline-approval-card {
  margin: 0 12px 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(59, 130, 246, 0.45);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.inline-approval-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  font-weight: 600;
  color: #93c5fd;
}

.attachment-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px;
  background: rgba(37, 99, 235, 0.15);
  border-top: 1px solid var(--border);
  font-size: 12px;
}

.chat-input-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: rgba(9, 14, 26, 0.65);
}
.lang-select { width: auto; padding: 6px; font-size: 11px; }
.chat-input-bar textarea { flex: 1; resize: none; max-height: 110px; }
.btn-send { padding: 8px 12px; }
.voice-recording { background: rgba(239, 68, 68, 0.35) !important; border-color: #ef4444 !important; }

/* Approvals Queue */
.approvals-list { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.approval-card {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.approval-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-muted); }
.approval-card textarea { min-height: 90px; font-size: 12.5px; }
.approval-btns { display: flex; gap: 8px; }
.approval-btns .btn { flex: 1; }
.status-pill { font-size: 11px; padding: 2px 8px; border-radius: 99px; font-weight: 600; }
.status-pill.pending { background: rgba(59, 130, 246, 0.2); color: #93c5fd; }
.status-pill.approved { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; }
.status-pill.rejected { background: rgba(239, 68, 68, 0.2); color: #fca5a5; }

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(4, 7, 15, 0.72);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.modal-card {
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 18px;
  padding: 20px 22px;
}
.modal-md { max-width: 580px; }
.modal-lg { max-width: 760px; }
.modal-xl { max-width: 920px; }
.modal-xxl { max-width: 1120px; }

.dash-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.dash-kpi-card {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.88), rgba(15, 23, 42, 0.92));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dash-kpi-card .kpi-label { font-size: 11.5px; color: var(--text-muted); font-weight: 600; }
.dash-kpi-card strong { font-size: 22px; color: #f8fafc; }

.dash-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.dash-panel-box {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
}
.dash-panel-box h4 {
  margin: 0 0 10px;
  font-size: 13.5px;
  color: #e2e8f0;
}

.dept-bars-wrap { display: flex; flex-direction: column; gap: 9px; }
.dept-bar-row { display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
.dept-bar-head { display: flex; justify-content: space-between; align-items: center; }
.dept-bar-track { width: 100%; height: 8px; background: rgba(30, 41, 59, 0.9); border-radius: 99px; overflow: hidden; }
.dept-bar-fill { height: 100%; border-radius: 99px; transition: width 0.3s ease; }

.leader-list { display: flex; flex-direction: column; gap: 8px; max-height: 230px; overflow-y: auto; }
.leader-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(30, 41, 59, 0.75);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 11px;
  font-size: 12.5px;
}

.unified-dashboard-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.unified-dashboard-mode .tab-panel {
  display: block !important;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
}
.unified-dashboard-mode .tab-panel[data-panel="tabOverview"] {
  grid-column: 1 / -1;
}

.stats-donut-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.stats-legend {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12.5px;
  flex: 1;
}
.stats-legend-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
  margin-right: 6px;
}

@media (max-width: 860px) {
  .dash-2col, .unified-dashboard-mode { grid-template-columns: 1fr; }
}
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.modal-header h2 { margin: 0; font-size: 18px; }

.form-stack { display: flex; flex-direction: column; gap: 12px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.form-group label { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.form-actions-row { display: flex; gap: 10px; flex-wrap: wrap; }

.hr-ai-box {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 14px;
}
.hr-ai-box label { display: block; font-size: 12px; color: #fcd34d; margin-bottom: 8px; font-weight: 600; }
.hr-ai-row { display: flex; gap: 8px; }

.templates-box {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.28);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 14px;
}
.templates-box label { display: block; font-size: 12px; color: #93c5fd; margin-bottom: 8px; font-weight: 600; }

.leadership-box {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 14px;
}
.role-tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
  margin-top: 4px;
}
.role-tag.director { background: rgba(245, 158, 11, 0.22); color: #fcd34d; }
.role-tag.head { background: rgba(59, 130, 246, 0.22); color: #93c5fd; }

.zone-selector { display: flex; gap: 8px; flex-wrap: wrap; }
.zone-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 10px;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 13px;
}
.zone-chip input { width: auto; }

/* Directory & Meeting */
.directory-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.dir-card {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dir-card:hover { border-color: var(--primary); }

.chips-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.agent-select-chip {
  padding: 6px 12px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: rgba(30, 41, 59, 0.8);
  color: var(--text);
  cursor: pointer;
  font-size: 12.5px;
}
.agent-select-chip.selected { background: rgba(59, 130, 246, 0.3); border-color: #60a5fa; color: #fff; }
.meeting-actions { display: flex; gap: 10px; margin: 10px 0; flex-wrap: wrap; }
.meeting-transcript {
  margin-top: 12px;
  max-height: 360px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.meeting-step {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
}

/* Tabs & Schedules */
.tabs-bar { display: flex; gap: 8px; border-bottom: 1px solid var(--border); padding-bottom: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 7px 12px;
  border-radius: 9px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}
.tab-btn.active { background: rgba(16, 185, 129, 0.16); border-color: rgba(16, 185, 129, 0.45); color: #34d399; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.cron-box { background: rgba(15, 23, 42, 0.7); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; }
.cron-box label { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.copy-row { display: flex; gap: 8px; }

.schedules-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.schedule-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: rgba(30, 41, 59, 0.75);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
}
.add-schedule-box {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.add-schedule-box h4 { margin: 0; font-size: 13px; }

.metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.metric-card {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.metric-card span { font-size: 12px; color: var(--text-muted); }
.metric-card strong { font-size: 20px; }

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--primary);
  color: #fff;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 13px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

@media (max-width: 820px) {
  .hud-brand { display: none; }
  .drawer { width: calc(100vw - 82px); }
}
