/* =====================================================================
   AInBox Healthcare Intelligence Platform — Brand CSS
   Mirrors the look-and-feel of the AInBox Analytics Platform screenshots
   ===================================================================== */

/* ---------- Typography ---------- */
body, .content-wrapper, .main-sidebar, .main-header,
.box, .box-header, .box-body, .nav-link, .card, .card-body,
.bs4dash-sidebar, button, input, select, textarea {
  font-family: 'Calibri', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif !important;
}

/* RTL support placeholder — toggled via class .rtl on body in Phase 5 */
body.rtl,
body.rtl .content-wrapper,
body.rtl .main-header {
  direction: rtl;
  font-family: 'Cairo', 'Amiri', 'Segoe UI', sans-serif !important;
}
body.rtl .main-sidebar { right: 0; left: auto; }
body.rtl .content-wrapper { margin-right: 250px; margin-left: 0; }

/* ---------- Header ---------- */
.main-header.navbar {
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.main-header .brand-link {
  background: #1e3a8a !important;
  border-bottom: 4px solid #f97316 !important;
  color: white !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px;
}

/* Orange accent bar under the header */
.main-header.navbar::after {
  content: "";
  display: block;
  height: 3px;
  background: #f97316;
  position: absolute;
  left: 0; right: 0; bottom: -3px;
}

/* ---------- Sidebar (navy with white text, orange active) ---------- */
.main-sidebar, .main-sidebar .sidebar {
  background: #1e3a8a !important;
}
.main-sidebar .nav-link {
  color: rgba(255,255,255,0.85) !important;
  font-size: 14px !important;
  padding: 10px 16px !important;
  border-left: 3px solid transparent;
  transition: all 0.15s ease;
}
.main-sidebar .nav-link:hover {
  background: rgba(255,255,255,0.06) !important;
  color: white !important;
  border-left-color: #f97316;
}
.main-sidebar .nav-link.active,
.main-sidebar .nav-item.active > .nav-link {
  background: #3b82f6 !important;
  color: white !important;
  font-weight: 600 !important;
  border-left: 4px solid #f97316;
}
.main-sidebar .nav-icon { width: 20px; }
.main-sidebar .sidebar-header {
  color: rgba(255,255,255,0.5) !important;
  font-size: 10px !important;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 14px 16px 6px 16px !important;
  background: transparent !important;
}

/* ---------- Body / content wrapper ---------- */
.content-wrapper {
  background: #f8fafc !important;
}

/* ---------- Cards ---------- */
.card {
  border-radius: 6px !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03) !important;
  margin-bottom: 16px;
}

/* Primary (blue) card header — used for Summary card */
.card.bg-primary > .card-header,
.card .card-header.bg-primary,
.bs4card.bg-primary > .card-header {
  background: #1e3a8a !important;
  color: white !important;
  border-bottom: 1px solid #1e3a8a !important;
  font-weight: 600 !important;
}

/* Warning (orange) card header — used for Filters card */
.card.bg-warning > .card-header,
.card .card-header.bg-warning,
.bs4card.bg-warning > .card-header {
  background: #f97316 !important;
  color: white !important;
  border-bottom: 1px solid #f97316 !important;
  font-weight: 600 !important;
}

.card-header .card-title { color: inherit !important; }
.card-header .card-tools .btn-tool {
  color: white !important;
  opacity: 0.85;
}
.card-header .card-tools .btn-tool:hover { opacity: 1; }

/* ---------- Lens header band ---------- */
.lens-header-band {
  background: #1e3a8a;
  color: white;
  padding: 20px 28px;
  border-radius: 6px;
  margin-bottom: 18px;
  border-bottom: 4px solid #f97316;
  box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}
.lens-header-band h2 {
  margin: 0;
  color: white;
  font-weight: 600;
  font-size: 22px;
}
.lens-header-band .subtitle {
  color: rgba(255,255,255,0.85);
  margin-top: 6px;
  font-size: 14px;
}

/* ---------- AI Assistant rail ---------- */
.sample-question:hover {
  background: #fff7ed !important;
  border-left-color: #f97316 !important;
  cursor: pointer;
  transform: translateX(2px);
  transition: all 0.12s ease;
}
.ready-dot {
  animation: pulse-ready 2s ease-in-out infinite;
}
@keyframes pulse-ready {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.45; }
}

/* ---------- Buttons ---------- */
.btn {
  font-size: 13px !important;
  border-radius: 4px !important;
  transition: all 0.12s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 2px 4px rgba(0,0,0,0.08); }

/* ---------- Tables (DT) ---------- */
table.dataTable thead th {
  background: #f1f5f9 !important;
  color: #1e3a8a !important;
  font-weight: 600 !important;
  border-bottom: 2px solid #1e3a8a !important;
}
table.dataTable tbody tr:hover { background: #fff7ed !important; }

/* Cream-highlighted total row in summary tables (Phase 5 will mark
   the row with class="total-row") */
table.dataTable tbody tr.total-row {
  background: #fff7ed !important;
  font-weight: 600 !important;
  color: #1e3a8a !important;
}

/* ---------- Feature cards on home page ---------- */
.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08) !important;
  transition: all 0.15s ease;
}

/* ---------- Footer ---------- */
.main-footer {
  background: white !important;
  border-top: 1px solid #e2e8f0 !important;
  font-size: 12px !important;
  padding: 12px 24px !important;
}

/* ---------- Notifications ---------- */
.shiny-notification {
  border-left: 4px solid #1e3a8a !important;
  background: white !important;
  color: #0f172a !important;
  border-radius: 4px !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12) !important;
}
.shiny-notification-message { border-left-color: #1e3a8a !important; }
.shiny-notification-warning { border-left-color: #f97316 !important; }
.shiny-notification-error   { border-left-color: #dc2626 !important; }
