/**
 * Lotus dashboard — dark theme (charcoal + red/pink accents).
 * Active when body has .lotus-dashboard-dark (set from PHP on dashboard only).
 */
:root {
  --lotus-bg: #181818;
  --lotus-sidebar-bg: #30302e;
  --lotus-surface: #262626;
  --lotus-border: #333333;
  --lotus-text: #ffffff;
  --lotus-text-muted: #9e9e9e;
  --lotus-accent: #ef5350;
  --lotus-accent-strong: #d32f2f;
  --lotus-pink-soft: #ffebee;
  --lotus-success: #66bb6a;
}

body.lotus-dashboard-dark {
  background-color: var(--lotus-bg) !important;
  color: var(--lotus-text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Top gradient strip → flat charcoal */
body.lotus-dashboard-dark .min-height-300.bg-primary {
  background: var(--lotus-bg) !important;
  min-height: 0 !important;
  height: 0 !important;
  opacity: 0;
  pointer-events: none;
}

body.lotus-dashboard-dark .main-content {
  background-color: var(--lotus-bg) !important;
}

/* Sidenav */
body.lotus-dashboard-dark #sidenav-main {
  background-color: var(--lotus-sidebar-bg) !important;
  border: 1px solid var(--lotus-border) !important;
  box-shadow: none !important;
}

body.lotus-dashboard-dark #sidenav-main .navbar-brand,
body.lotus-dashboard-dark #sidenav-main .nav-link-text,
body.lotus-dashboard-dark #sidenav-main .nav-link {
  color: var(--lotus-text-muted) !important;
}

body.lotus-dashboard-dark #sidenav-main .sidenav-header .navbar-brand {
  color: var(--lotus-text) !important;
}

body.lotus-dashboard-dark #sidenav-main .icon-shape {
  background: var(--lotus-surface) !important;
}

body.lotus-dashboard-dark #sidenav-main .nav-link[data-bs-toggle="collapse"] .ni-shop {
  color: var(--lotus-accent) !important;
}

/* Active page — soft pink pill + red text (nested items only, not “Main” collapse header) */
body.lotus-dashboard-dark #sidenav-main .collapse .nav .nav-link.active {
  background-color: var(--lotus-pink-soft) !important;
  color: var(--lotus-accent-strong) !important;
  font-weight: 700 !important;
  border-radius: 10px !important;
  box-shadow: none !important;
}

body.lotus-dashboard-dark #sidenav-main .collapse .nav .nav-link:not(.active):hover {
  color: var(--lotus-text) !important;
  background-color: rgba(255, 255, 255, 0.06) !important;
  border-radius: 8px;
}

/* Section headers (Main, Manage, …) */
body.lotus-dashboard-dark #sidenav-main .nav-link[data-bs-toggle="collapse"] {
  background: transparent !important;
  color: var(--lotus-text-muted) !important;
  font-weight: 600 !important;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
}

body.lotus-dashboard-dark #sidenav-main hr.horizontal {
  border-color: var(--lotus-border) !important;
  opacity: 1;
}

/* Sidebar help card — Lotus accent */
body.lotus-dashboard-dark #sidenavCard {
  background: var(--lotus-pink-soft) !important;
  border: 1px solid rgba(211, 47, 47, 0.2) !important;
}

body.lotus-dashboard-dark #sidenavCard .docs-info h6,
body.lotus-dashboard-dark #sidenavCard .docs-info p {
  color: var(--lotus-accent-strong) !important;
}

body.lotus-dashboard-dark .sidenav-footer .btn-dark {
  background: transparent !important;
  border: 1px solid var(--lotus-border) !important;
  color: var(--lotus-text) !important;
}

/* Navbar / breadcrumb area */
body.lotus-dashboard-dark .navbar-main {
  background: transparent !important;
  box-shadow: none !important;
}

body.lotus-dashboard-dark .navbar-main .breadcrumb .text-white,
body.lotus-dashboard-dark .navbar-main .breadcrumb a {
  color: var(--lotus-text) !important;
}

body.lotus-dashboard-dark .navbar-main .breadcrumb .opacity-5 {
  opacity: 0.65 !important;
  color: var(--lotus-text-muted) !important;
}

body.lotus-dashboard-dark .navbar-main .breadcrumb-item.active {
  color: var(--lotus-text-muted) !important;
}

body.lotus-dashboard-dark .sidenav-toggler-line {
  background-color: var(--lotus-text) !important;
}

/* Content area */
body.lotus-dashboard-dark .main-content > .container-fluid {
  background: var(--lotus-bg);
}

/* Cards */
body.lotus-dashboard-dark .card {
  background-color: var(--lotus-surface) !important;
  border: 1px solid var(--lotus-border) !important;
  box-shadow: none !important;
  border-radius: 12px !important;
}

body.lotus-dashboard-dark .card .card-header {
  background: transparent !important;
  border-bottom: 1px solid var(--lotus-border) !important;
}

body.lotus-dashboard-dark .card h6,
body.lotus-dashboard-dark .card .font-weight-bolder,
body.lotus-dashboard-dark .numbers h5 {
  color: var(--lotus-text) !important;
}

body.lotus-dashboard-dark .card .text-sm,
body.lotus-dashboard-dark .card .text-xs,
body.lotus-dashboard-dark .numbers p {
  color: var(--lotus-text-muted) !important;
}

body.lotus-dashboard-dark .text-dark,
body.lotus-dashboard-dark .badge .text-dark {
  color: var(--lotus-text) !important;
}

body.lotus-dashboard-dark .text-muted {
  color: var(--lotus-text-muted) !important;
}

/* Stat card icon wells */
body.lotus-dashboard-dark .icon-shape.bg-gradient-dark {
  background: linear-gradient(135deg, #3a3a3a, #1f1f1f) !important;
}

/* Links in cards */
body.lotus-dashboard-dark .card a:not(.btn) {
  color: var(--lotus-accent) !important;
}

body.lotus-dashboard-dark .card a:not(.btn):hover {
  color: #ff8a80 !important;
}

/* Success / growth text */
body.lotus-dashboard-dark .text-success {
  color: var(--lotus-success) !important;
}

body.lotus-dashboard-dark .text-danger {
  color: var(--lotus-accent) !important;
}

/* Form labels — default Argon/Bootstrap grays are unreadable on dark cards */
body.lotus-dashboard-dark label,
body.lotus-dashboard-dark .form-label,
body.lotus-dashboard-dark .form-control-label,
body.lotus-dashboard-dark .col-form-label,
body.lotus-dashboard-dark .form-check-label,
body.lotus-dashboard-dark .custom-control-label,
body.lotus-dashboard-dark legend {
  color: var(--lotus-text) !important;
}

/* Intentionally subdued labels */
body.lotus-dashboard-dark label.text-muted,
body.lotus-dashboard-dark .form-label.text-muted {
  color: var(--lotus-text-muted) !important;
}

/* Labels paired with switches / checkboxes inside cards */
body.lotus-dashboard-dark .form-check label,
body.lotus-dashboard-dark .form-switch label {
  color: var(--lotus-text) !important;
}

/* Floating labels (Bootstrap) */
body.lotus-dashboard-dark .form-floating > label {
  color: var(--lotus-text-muted) !important;
}

body.lotus-dashboard-dark .form-floating > .form-control:focus ~ label,
body.lotus-dashboard-dark .form-floating > .form-control:not(:placeholder-shown) ~ label,
body.lotus-dashboard-dark .form-floating > .form-select ~ label {
  color: var(--lotus-text) !important;
}

/* SweetAlert2 */
body.lotus-dashboard-dark .swal2-radio label,
body.lotus-dashboard-dark .swal2-checkbox label,
body.lotus-dashboard-dark .swal2-input-label {
  color: var(--lotus-text) !important;
}

/* DataTables “Show N entries” */
body.lotus-dashboard-dark .dataTable-wrapper .dataTable-top .dataTable-dropdown label {
  color: var(--lotus-text) !important;
}

/* Buttons */
body.lotus-dashboard-dark .btn.bg-gradient-secondary,
body.lotus-dashboard-dark .btn.btn-secondary {
  background: transparent !important;
  border: 1px solid var(--lotus-border) !important;
  color: var(--lotus-text) !important;
}

body.lotus-dashboard-dark .btn.bg-gradient-secondary:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: #555 !important;
  color: var(--lotus-text) !important;
}

/* Tables */
body.lotus-dashboard-dark .table {
  color: var(--lotus-text);
}

body.lotus-dashboard-dark .table thead th {
  color: var(--lotus-text-muted) !important;
  border-color: var(--lotus-border) !important;
}

body.lotus-dashboard-dark .table tbody td {
  border-color: var(--lotus-border) !important;
}

body.lotus-dashboard-dark .table a {
  color: var(--lotus-accent) !important;
}

/* Chart canvas container */
body.lotus-dashboard-dark .chart {
  background: transparent;
}

/* Footer */
body.lotus-dashboard-dark .footer {
  background: var(--lotus-bg) !important;
}

body.lotus-dashboard-dark .footer .text-muted,
body.lotus-dashboard-dark .footer .nav-link {
  color: var(--lotus-text-muted) !important;
}

body.lotus-dashboard-dark .footer a.font-weight-bold {
  color: var(--lotus-accent) !important;
}

/* FullCalendar (dashboard agenda) */
body.lotus-dashboard-dark .fc .fc-toolbar-title,
body.lotus-dashboard-dark .fc .fc-col-header-cell-cushion,
body.lotus-dashboard-dark .fc .fc-daygrid-day-number,
body.lotus-dashboard-dark .fc .fc-list-day-text,
body.lotus-dashboard-dark .fc .fc-list-event-title {
  color: var(--lotus-text) !important;
}

body.lotus-dashboard-dark .fc-theme-standard td,
body.lotus-dashboard-dark .fc-theme-standard th {
  border-color: var(--lotus-border) !important;
}

body.lotus-dashboard-dark .fc .fc-button {
  background: var(--lotus-surface) !important;
  border-color: var(--lotus-border) !important;
  color: var(--lotus-text) !important;
}

body.lotus-dashboard-dark .fc .fc-button-primary:not(:disabled):active,
body.lotus-dashboard-dark .fc .fc-button-primary:not(:disabled).fc-button-active {
  background: var(--lotus-accent-strong) !important;
  border-color: var(--lotus-accent-strong) !important;
  color: #fff !important;
}

body.lotus-dashboard-dark .fc .fc-scrollgrid {
  border-color: var(--lotus-border) !important;
}

body.lotus-dashboard-dark .fc .fc-list-event:hover td {
  background: rgba(255, 255, 255, 0.05) !important;
}

/* Modal on dashboard */
body.lotus-dashboard-dark .modal-content {
  background: var(--lotus-surface) !important;
  border: 1px solid var(--lotus-border) !important;
  color: var(--lotus-text);
}

body.lotus-dashboard-dark .modal-header {
  border-bottom-color: var(--lotus-border) !important;
}

body.lotus-dashboard-dark .modal-title {
  color: var(--lotus-text) !important;
}

body.lotus-dashboard-dark .btn-close {
  filter: invert(1);
  opacity: 0.7;
}

/* ── Desktop font size improvements ──────────────────────────
   Argon's utility classes are designed for dense mobile UIs.
   On desktop these sizes are too small — bump them up.
   Applied only at ≥768px to leave mobile layout untouched.
────────────────────────────────────────────────────────────── */
@media (min-width: 768px) {
  /* Table headers and tiny labels */
  .text-xxs {
    font-size: 0.8rem !important;    /* was 0.65rem (~10px) → now ~13px */
  }

  /* Stat card labels, secondary text */
  .text-xs {
    font-size: 0.9rem !important;    /* was 0.75rem (~12px) → now ~14.4px */
  }

  /* Body copy, descriptions */
  .text-sm {
    font-size: 1rem !important;      /* was 0.875rem (~14px) → now 16px */
  }

  /* Stat card values (h6) */
  .card h6,
  .card .h6,
  .card .font-weight-bolder,
  .numbers h5 {
    font-size: 1.15rem !important;
  }

  /* Table cell text */
  .table td,
  .table th {
    font-size: 1rem !important;
  }

  /* Sidebar nav links */
  #sidenav-main .nav-link-text {
    font-size: 0.875rem !important;
  }

  /* Card header titles */
  .card .card-header h6,
  .card .card-header .h6 {
    font-size: 1rem !important;
  }

  /* Breadcrumb */
  .navbar-main .breadcrumb-item {
    font-size: 0.875rem !important;
  }
}
