/*
 * MedComply — Theme styles. Dark green theme scoped to .bg-dark only.
 * Other themes (bg-waves, bg-circles, bg-dots, bg-grammarly) use their own rules.
 */

/* ── Dark theme only ── */
body.bg-dark {
  background: #1f243c !important;
}
body.bg-dark, body.bg-dark * {
  color: white !important;
}

/* ── Dark theme nav ── */
body.bg-dark .topbar, body.bg-dark .nav-bar {
  background: rgba(0,0,0,0.15) !important;
  border-bottom-color: rgba(255,255,255,0.1) !important;
}

/* ── Dark: Cards ── */
body.bg-dark .card, body.bg-dark .dash-card, body.bg-dark .action-card, body.bg-dark .quick-card {
  background: rgba(255,255,255,0.12) !important;
  border-color: rgba(255,255,255,0.12) !important;
}
body.bg-dark .card *, body.bg-dark .dash-card *, body.bg-dark .action-card * {
  color: white !important;
}

/* ── Dark: Buttons ── */
body.bg-dark .btn-primary, body.bg-dark button.btn-primary, body.bg-dark a.btn-primary {
  background: linear-gradient(180deg, #0f3d22, #0a2e18) !important;
  color: white !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
}
body.bg-dark .btn-secondary {
  background: rgba(255,255,255,0.1) !important;
  color: white !important;
  border-color: rgba(255,255,255,0.25) !important;
}
body.bg-dark .btn-outline {
  color: white !important;
  border-color: rgba(255,255,255,0.3) !important;
}

/* ── Dark: Inputs ── */
body.bg-dark input, body.bg-dark select, body.bg-dark textarea,
body.bg-dark .input-field, body.bg-dark .widget-input, body.bg-dark .widget-select, body.bg-dark .widget-textarea,
body.bg-dark .filter-input, body.bg-dark .search-input {
  background: rgba(255,255,255,0.1) !important;
  color: white !important;
  border-color: rgba(255,255,255,0.2) !important;
}
body.bg-dark input::placeholder, body.bg-dark textarea::placeholder,
body.bg-dark .input-field::placeholder, body.bg-dark .widget-input::placeholder {
  color: rgba(255,255,255,0.45) !important;
}
body.bg-dark input:focus, body.bg-dark select:focus, body.bg-dark textarea:focus,
body.bg-dark .input-field:focus, body.bg-dark .widget-input:focus {
  border-color: rgba(255,255,255,0.5) !important;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.1) !important;
}

/* ── Dark: Tables ── */
body.bg-dark .records-table th, body.bg-dark .patients-table th {
  background: rgba(0,0,0,0.2) !important;
  color: white !important;
}
body.bg-dark .records-table td, body.bg-dark .patients-table td {
  border-bottom-color: rgba(255,255,255,0.08) !important;
}
body.bg-dark .records-table tbody tr:hover,
body.bg-dark .patients-table tbody tr:hover {
  background: rgba(255,255,255,0.06) !important;
}

/* ── Dark: Badges ── */
body.bg-dark .badge-success, body.bg-dark .status-active, body.bg-dark .status-sent {
  background: rgba(255,255,255,0.15) !important;
  color: white !important;
}
body.bg-dark .badge-warning, body.bg-dark .status-draft {
  background: rgba(255,200,50,0.2) !important;
  color: #ffe08a !important;
}
body.bg-dark .badge-danger, body.bg-dark .status-error, body.bg-dark .status-inactive {
  background: rgba(255,100,100,0.2) !important;
  color: #ffb3b3 !important;
}

/* ── Dark: Modals ── */
body.bg-dark .modal-content {
  background: #1f243c !important;
  border: 1px solid rgba(255,255,255,0.15) !important;
}

/* ── Dark: Links ── */
body.bg-dark a { color: #a8e6c3 !important; }
body.bg-dark a:hover { color: white !important; }
body.bg-dark .topbar-nav a.active {
  background: rgba(255,255,255,0.12) !important;
  color: white !important;
}
body.bg-dark .topbar-nav a:hover {
  background: rgba(255,255,255,0.08) !important;
}

/* ── Dark: Misc ── */
body.bg-dark .page-title, body.bg-dark .section-title { color: white !important; }
body.bg-dark .form-section-title { color: rgba(255,255,255,0.8) !important; border-bottom-color: rgba(255,255,255,0.15) !important; }
body.bg-dark .field-row:hover { background: rgba(255,255,255,0.06) !important; }
body.bg-dark .field-value-preview.empty { color: rgba(255,255,255,0.35) !important; }
body.bg-dark .widget-error { color: #ffb3b3 !important; }
body.bg-dark hr { border-color: rgba(255,255,255,0.1) !important; }

/* ══════════════════════════════════════════════════
   Grammarly-inspired theme — clean white/teal
   ══════════════════════════════════════════════════ */
body.bg-grammarly {
  background: #f5f5f5 !important;
  background-image: none !important;
  color: #1f243c !important;
}
body.bg-grammarly .nav-bar,
body.bg-grammarly nav {
  background: rgba(255,255,255,0.55) !important;
  backdrop-filter: saturate(180%) blur(16px) !important;
  -webkit-backdrop-filter: saturate(180%) blur(16px) !important;
  border-bottom: 1px solid rgba(255,255,255,0.35) !important;
}
body.bg-grammarly .nav-bar *,
body.bg-grammarly nav * {
  color: #1f243c !important;
}
body.bg-grammarly .logo-text,
body.bg-grammarly .nav-logo {
  color: #027e6f !important;
}
body.bg-grammarly .card,
body.bg-grammarly .action-card,
body.bg-grammarly .dashboard-grid > *,
body.bg-grammarly .quick-card {
  background: #ffffff !important;
  border: 1px solid #e8e9ed !important;
  box-shadow: none !important;
}
body.bg-grammarly .card *,
body.bg-grammarly .action-card *,
body.bg-grammarly .dashboard-grid > * *,
body.bg-grammarly .quick-card * {
  color: #1f243c !important;
}
body.bg-grammarly .btn-primary,
body.bg-grammarly button.btn-primary,
body.bg-grammarly a.btn-primary {
  background: #027e6f !important;
  color: white !important;
  box-shadow: none !important;
  border-radius: 6px !important;
}
body.bg-grammarly .btn-primary:hover {
  background: #0d8065 !important;
  filter: none !important;
}
body.bg-grammarly .btn-secondary {
  background: white !important;
  color: #027e6f !important;
  border-color: #027e6f !important;
}
body.bg-grammarly .btn-ghost {
  color: #4d536e !important;
}
body.bg-grammarly .input-field,
body.bg-grammarly input,
body.bg-grammarly select,
body.bg-grammarly textarea {
  background: white !important;
  border: 1px solid #e8e9ed !important;
  color: #1f243c !important;
  border-radius: 6px !important;
}
body.bg-grammarly .input-field:focus,
body.bg-grammarly input:focus {
  border-color: #027e6f !important;
  box-shadow: 0 0 0 3px rgba(2,126,111,0.15) !important;
}
body.bg-grammarly .badge-success {
  background: #e6f5f3 !important;
  color: #0d8065 !important;
}
body.bg-grammarly * {
  color: #1f243c;
}
body.bg-grammarly h1,
body.bg-grammarly h2,
body.bg-grammarly h3 {
  color: #1f243c !important;
}
body.bg-grammarly p,
body.bg-grammarly span,
body.bg-grammarly label {
  color: #4d536e !important;
}
body.bg-grammarly .elan-table thead th {
  background: #027e6f !important;
  color: white !important;
}
body.bg-grammarly .elan-table tbody tr:hover {
  background: #f0f7f6 !important;
}
