/* ============================================================
   DENTAL CLINIC MANAGEMENT SYSTEM — Enhanced Bootstrap 5 CSS
   ============================================================ */

:root {
  --primary:      #0d9488;
  --primary-dark: #0f766e;
  --primary-light:#ccfbf1;
  --primary-muted:#99f6e4;
  --accent:       #f97316;
  --ink:          #0f172a;
  --body-bg:      #f0f4f8;
  --sidebar-bg:   #0f172a;
  --sidebar-w:    220px;
  --header-h:     52px;
  --card-radius:  10px;
  --shadow-sm:    0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:    0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
  --shadow-lg:    0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);
}

/* ============================================================
   ZOOM-FIT: Scales the entire UI to look correct at 100% browser zoom
   Equivalent to the user previously having to set 90% zoom
   ============================================================ */

/* Base font size reduction — everything rem-based scales down automatically */
html {
  font-size: 14px !important;
}

/* Body stays readable */
body {
  font-size: 0.875rem !important; /* 12.25px at base 14 */
}

/* ── SIDEBAR tighter ── */
.sidebar-wrapper {
  width: 220px !important;
}
.main-container {
  padding-left: 220px !important;
}
.page-wrapper.pinned .main-container {
  padding-left: 64px !important;
}
@media (min-width: 1200px) {
  .page-wrapper.pinned:not(.sidebar-hovered) .sidebar-wrapper {
    width: 64px !important;
  }
}

/* Sidebar profile tighter */
.sidebar-profile {
  padding: 0.85rem 0.9rem !important;
}
.sidebar-avatar {
  width: 36px !important;
  height: 36px !important;
  font-size: 0.85rem !important;
}

/* Sidebar nav items */
.sidebar-menu > li > a {
  padding: 0.42rem 0.9rem 0.42rem 0.9rem !important;
  font-size: 0.8rem !important;
}
.sidebar-menu > li > a > i {
  width: 28px !important;
  height: 28px !important;
  font-size: 0.95rem !important;
  margin-right: 0.6rem !important;
}
.sidebar-menu .treeview-menu > li > a {
  padding: 0.35rem 0.75rem 0.35rem 3.3rem !important;
  font-size: 0.77rem !important;
}
.sidebar-section-label {
  padding: 0.7rem 1rem 0.25rem !important;
  font-size: 0.6rem !important;
}

/* ── HEADER tighter ── */
.app-header {
  height: 52px !important;
  padding: 0 1.25rem !important;
}
.app-hero-header {
  top: 52px !important;
  padding: 0.55rem 1.25rem !important;
}

/* Header elements */
.app-header .toggle-sidebar,
.app-header .pin-sidebar {
  width: 32px !important;
  height: 32px !important;
}
.app-brand .d-md-block .clinic-name-header,
.app-brand > div > div:first-child {
  font-size: 0.8rem !important;
}

/* ── APP BODY tighter ── */
.app-body {
  padding: 1.1rem 1.25rem !important;
}

/* ── PAGE HEADER smaller ── */
.page-header {
  padding: 1rem 1.25rem !important;
  margin-bottom: 1rem !important;
  border-radius: 8px !important;
}
.page-header h4 {
  font-size: 1rem !important;
  margin: 0 !important;
}
.page-header p {
  font-size: 0.78rem !important;
  margin: 0.15rem 0 0 !important;
}
.header-icon {
  width: 42px !important;
  height: 42px !important;
  font-size: 1.2rem !important;
  border-radius: 10px !important;
  flex-shrink: 0 !important;
}

/* ── CARDS tighter ── */
.card {
  border-radius: 10px !important;
}
.card-header {
  padding: 0.7rem 1rem !important;
  font-size: 0.82rem !important;
}
.card-title {
  font-size: 0.88rem !important;
}
.card-body {
  padding: 1rem !important;
}

/* ── TABLES tighter ── */
.table > thead > tr > th {
  padding: 0.65rem 0.85rem !important;
  font-size: 0.68rem !important;
}
.table > tbody > tr > td {
  padding: 0.6rem 0.85rem !important;
  font-size: 0.82rem !important;
}

/* ── BUTTONS smaller ── */
.btn {
  font-size: 0.8rem !important;
  padding: 0.38rem 0.85rem !important;
  border-radius: 7px !important;
}
.btn-sm {
  font-size: 0.74rem !important;
  padding: 0.26rem 0.6rem !important;
  border-radius: 6px !important;
}
.btn-lg {
  font-size: 0.9rem !important;
  padding: 0.55rem 1.1rem !important;
}
.btn-icon-only {
  width: 30px !important;
  height: 30px !important;
  padding: 0 !important;
}

/* ── FORMS tighter ── */
.form-control, .form-select {
  font-size: 0.82rem !important;
  padding: 0.42rem 0.75rem !important;
  border-radius: 7px !important;
}
.form-control-sm, .form-select-sm {
  font-size: 0.76rem !important;
  padding: 0.3rem 0.6rem !important;
}
.form-label {
  font-size: 0.76rem !important;
  margin-bottom: 0.28rem !important;
}
.input-group-text {
  font-size: 0.82rem !important;
  padding: 0.42rem 0.7rem !important;
}

/* ── BADGES ── */
.badge {
  font-size: 0.68rem !important;
  padding: 0.25em 0.55em !important;
}

/* ── BREADCRUMB ── */
.breadcrumb-item a,
.breadcrumb-item span,
.breadcrumb-active {
  font-size: 0.78rem !important;
}
.breadcrumb-item i {
  font-size: 1rem !important;
}

/* ── MODAL ── */
.modal-title { font-size: 0.92rem !important; }
.modal-header { padding: 0.85rem 1.1rem !important; }
.modal-body   { padding: 0.85rem 1.1rem !important; }
.modal-footer { padding: 0.7rem 1.1rem !important; }
.modal-content { border-radius: 12px !important; }

/* ── FILTER PANEL ── */
.filter-panel {
  padding: 1rem !important;
  margin-bottom: 1rem !important;
  border-radius: 10px !important;
}
.filter-panel .filter-title {
  font-size: 0.82rem !important;
  margin-bottom: 0.75rem !important;
}

/* ── STAT CARDS ── */
.stat-card { padding: 1rem !important; }
.stat-value { font-size: 1.5rem !important; }
.stat-label { font-size: 0.74rem !important; }
.stat-icon  { width: 40px !important; height: 40px !important; font-size: 1.1rem !important; }

/* ── REPORT KPI ── */
.report-kpi-card { padding: 0.9rem !important; }
.report-kpi-card .kpi-value { font-size: 1.45rem !important; }
.report-kpi-card .kpi-label { font-size: 0.72rem !important; }

/* ── NAV TABS ── */
.nav-tabs .nav-link {
  font-size: 0.8rem !important;
  padding: 0.5rem 0.9rem !important;
}
.nav-pills .nav-link {
  font-size: 0.8rem !important;
  padding: 0.45rem 0.85rem !important;
}

/* ── SECTION HEADER in reports ── */
.section-header {
  font-size: 0.82rem !important;
  padding: 0.6rem 0.9rem !important;
  margin: 0.75rem 0 0.5rem !important;
}

/* ── DROPDOWN MENUS ── */
.dropdown-item {
  font-size: 0.8rem !important;
  padding: 0.45rem 0.85rem !important;
}
.dropdown-menu {
  border-radius: 10px !important;
  font-size: 0.82rem !important;
}

/* ── PROGRESS ── */
.progress { height: 5px !important; }

/* ── FOOTER ── */
.app-footer {
  font-size: 0.74rem !important;
  padding: 0.55rem 1.25rem !important;
}

/* ── DataTables ── */
.dataTables_wrapper .dataTables_filter input {
  font-size: 0.8rem !important;
  padding: 0.35rem 0.7rem !important;
}
.dataTables_wrapper .dataTables_length select {
  font-size: 0.8rem !important;
  padding: 0.3rem 0.6rem !important;
}
.dataTables_wrapper .dataTables_info {
  font-size: 0.74rem !important;
}

/* ── PAGE HERO HEADER ── */
.app-hero-header .breadcrumb {
  font-size: 0.78rem !important;
}

/* ── ROW GUTTERS ── */
.app-body .row.gx-3 { --bs-gutter-x: 0.85rem !important; }
.app-body .mb-4 { margin-bottom: 0.9rem !important; }
.app-body .mb-3 { margin-bottom: 0.75rem !important; }

/* ── TOASTR ── */
#toast-container > div {
  font-size: 0.8rem !important;
  padding: 0.65rem 0.9rem !important;
}

/* ── WELCOME CARD (dentist dashboard) ── */
.bg-2 h2 { font-size: 1.25rem !important; }
.bg-2 h5 { font-size: 0.88rem !important; }
.bg-2 h6 { font-size: 0.76rem !important; }

/* ── Auth pages stay full-size (standalone, not zoomed) ── */
/* Login and register don't use .page-wrapper so they're unaffected */


/* ── BODY & BASE ── */
body {
  background: var(--body-bg) !important;
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  color: #334155;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ============================================================
   LAYOUT
   ============================================================ */
.page-wrapper { margin: 0; }
.main-container { padding: 0 0 0 var(--sidebar-w); transition: padding-left .25s ease; }

/* ── HEADER ── */
.app-header {
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0;
  height: var(--header-h);
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 1020;
  box-shadow: var(--shadow-sm);
}
.app-header .toggle-sidebar,
.app-header .pin-sidebar {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  width: 38px; height: 38px;
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #64748b;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.app-header .toggle-sidebar:hover,
.app-header .pin-sidebar:hover { background: #f1f5f9 !important; color: var(--primary); }
.app-header .toggle-sidebar i,
.app-header .pin-sidebar i { color: inherit !important; font-size: 1.1rem; background: transparent !important; }

/* Search */
.app-header .search-container { position: relative; }
.app-header .search-container .form-control {
  border-radius: 30px !important;
  border: 1px solid #e2e8f0 !important;
  background: #f8fafc !important;
  padding-left: 38px !important;
  min-width: 220px;
  transition: all .2s;
  height: 38px;
}
.app-header .search-container .form-control:focus {
  background: #fff !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(13,148,136,.12) !important;
}
.app-header .search-container i {
  left: 12px; top: 50%; transform: translateY(-50%);
  color: #94a3b8 !important; font-size: .95rem !important;
}

/* ── SIDEBAR ── */
.sidebar-wrapper {
  background: var(--sidebar-bg) !important;
  width: var(--sidebar-w);
  position: fixed;
  top: var(--header-h);
  left: 0; bottom: 0;
  z-index: 101;
  transition: left .3s ease, width .3s ease;
  box-shadow: 4px 0 20px rgba(0,0,0,.12);
  overflow-y: auto;
}

/* Sidebar profile */
.sidebar-profile {
  padding: 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: .5rem;
}
.sidebar-avatar {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 3px 10px rgba(13,148,136,.4);
}
.profile-name { color: #f1f5f9 !important; font-weight: 600; }
.sidebar-clinic-badge {
  background: rgba(13,148,136,.15);
  border: 1px solid rgba(13,148,136,.3);
  color: #5eead4;
}

/* Section labels */
.sidebar-section-label {
  color: rgba(255,255,255,.3) !important;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .9rem 1.2rem .3rem;
  list-style: none;
}

/* Nav items */
.sidebar-menu > li > a {
  padding: .55rem 1rem .55rem 1.1rem;
  border-left: 3px solid transparent;
  color: rgba(255,255,255,.65) !important;
  font-size: .875rem;
  display: flex; align-items: center;
  border-radius: 0 8px 8px 0;
  margin-right: .5rem;
  transition: all .2s;
}
.sidebar-menu > li > a > i {
  font-size: 1.05rem;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  margin-right: .75rem;
  flex-shrink: 0;
  background: rgba(255,255,255,.07) !important;
  color: rgba(255,255,255,.65) !important;
  transition: all .2s;
}
.sidebar-menu > li:hover > a,
.sidebar-menu > li.active > a {
  color: #fff !important;
  background: rgba(13,148,136,.2) !important;
  border-left-color: var(--primary) !important;
}
.sidebar-menu > li:hover > a > i,
.sidebar-menu > li.active > a > i {
  background: var(--primary) !important;
  color: #fff !important;
}
.sidebar-menu > li.current-page > a {
  color: #5eead4 !important;
  background: rgba(13,148,136,.25) !important;
  border-left-color: #5eead4 !important;
}
.sidebar-menu > li.current-page > a > i {
  background: var(--primary) !important;
  color: #fff !important;
}

/* Treeview dropdown */
.sidebar-menu .treeview-menu > li > a {
  padding: .45rem 1rem .45rem 3.8rem;
  color: rgba(255,255,255,.55) !important;
  font-size: .82rem;
  display: block;
  border-radius: 6px;
  margin: 1px .5rem;
  transition: all .15s;
}
.sidebar-menu .treeview-menu > li > a:hover { color: #5eead4 !important; background: rgba(255,255,255,.06) !important; }
.sidebar-menu .treeview-menu > li > a.active-sub { color: #5eead4 !important; }

/* Treeview arrow */
.sidebar-menu > li.treeview:after { color: rgba(255,255,255,.3) !important; }

/* Logout */
.logout-link { color: #fca5a5 !important; }
.logout-link:hover { color: #f87171 !important; background: rgba(239,68,68,.15) !important; border-left-color: #f87171 !important; }

/* Sidebar contact */
.sidebar-contact {
  background: rgba(13,148,136,.2) !important;
  margin: 1rem;
  border-radius: 10px;
  color: #94a3b8 !important;
  border: 1px solid rgba(13,148,136,.25);
}
.sidebar-contact h5 { color: #e2e8f0 !important; }

/* ── APP CONTAINER ── */
.app-container { padding: 0; }
.app-hero-header {
  background: #fff;
  padding: .75rem 1.5rem;
  position: sticky;
  top: var(--header-h);
  z-index: 99;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: var(--shadow-sm);
}
.app-body {
  padding: 1.5rem;
  min-height: calc(100vh - 130px);
  background: var(--body-bg);
}
.app-footer {
  font-size: .8rem;
  color: #94a3b8;
  padding: .75rem 1.5rem;
  background: #fff;
  border-top: 1px solid #f1f5f9;
  margin: 0;
  box-shadow: none !important;
}

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb { margin: 0; }
.breadcrumb-item i { color: var(--primary); font-size: 1.2rem; }
.breadcrumb-item a { color: #64748b; font-size: .875rem; text-decoration: none; }
.breadcrumb-item a:hover { color: var(--primary); }
.breadcrumb-active { color: var(--primary) !important; font-weight: 600; font-size: .875rem; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  border: 0 !important;
  border-radius: var(--card-radius) !important;
  box-shadow: var(--shadow-sm) !important;
  background: #fff;
  transition: box-shadow .2s;
}
.card:hover { box-shadow: var(--shadow-md) !important; }
.card-header {
  background: #fff !important;
  border-bottom: 1px solid #f1f5f9 !important;
  border-radius: var(--card-radius) var(--card-radius) 0 0 !important;
  padding: 1rem 1.25rem;
  font-weight: 600;
  color: var(--ink);
}
.card-title { font-weight: 700; color: #0f172a; font-size: 1rem; }

/* Stat Cards */
.stat-card {
  background: #fff;
  border-radius: var(--card-radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--primary);
  transition: transform .2s, box-shadow .2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-card.danger  { border-left-color: #ef4444; }
.stat-card.warning { border-left-color: #f59e0b; }
.stat-card.success { border-left-color: #10b981; }
.stat-card.info    { border-left-color: #3b82f6; }
.stat-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  background: var(--primary-light); color: var(--primary);
}
.stat-icon.danger  { background: #fee2e2; color: #ef4444; }
.stat-icon.warning { background: #fef3c7; color: #f59e0b; }
.stat-icon.success { background: #d1fae5; color: #10b981; }
.stat-icon.info    { background: #dbeafe; color: #3b82f6; }
.stat-value { font-size: 1.75rem; font-weight: 800; color: #0f172a; line-height: 1; }
.stat-label { font-size: .8rem; color: #64748b; font-weight: 500; margin-top: .25rem; }

/* ============================================================
   TABLES
   ============================================================ */
.table {
  --bs-table-hover-bg: #f8fafc;
  --bs-table-border-color: #f1f5f9;
}
.table thead th {
  background: #f8fafc !important;
  color: #475569;
  font-weight: 700;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: .85rem 1rem;
  border-bottom: 2px solid #e2e8f0 !important;
  white-space: nowrap;
}
.table tbody td {
  padding: .75rem 1rem;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  font-size: .875rem;
}
.table tbody tr:hover { background: #f8fafc; }
.table tbody tr:last-child td { border-bottom: 0; }

/* DataTables overrides */
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  padding: .4rem .75rem !important;
  font-size: .875rem;
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
  border-radius: 8px !important;
  margin: 0 2px !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  border-radius: 8px !important;
  font-weight: 500;
  font-size: .875rem;
  padding: .45rem .95rem;
  transition: all .2s;
  box-shadow: none !important;
}
.btn-primary {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
}
.btn-primary:hover {
  background: var(--primary-dark) !important;
  border-color: var(--primary-dark) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(13,148,136,.3) !important;
}
.btn-success { color: #fff !important; }
.btn-danger  { color: #fff !important; }
.btn-outline-primary {
  border-color: var(--primary) !important;
  color: var(--primary) !important;
}
.btn-outline-primary:hover {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
}
.btn-sm { padding: .3rem .7rem !important; font-size: .8rem !important; }
.btn-icon-only {
  width: 36px; height: 36px;
  padding: 0 !important;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px !important;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-control, .form-select {
  border-radius: 8px !important;
  border: 1.5px solid #e2e8f0 !important;
  background: #fafbfc !important;
  color: #0f172a !important;
  font-size: .875rem;
  transition: border-color .15s, box-shadow .15s;
  padding: .5rem .85rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(13,148,136,.12) !important;
  background: #fff !important;
  outline: none;
}
.form-label {
  font-weight: 600;
  font-size: .82rem;
  color: #475569;
  margin-bottom: .35rem;
  letter-spacing: .01em;
}
.input-group-text {
  border-radius: 8px 0 0 8px !important;
  background: #f1f5f9 !important;
  border: 1.5px solid #e2e8f0 !important;
  color: #64748b;
}
.input-group .form-control { border-radius: 0 8px 8px 0 !important; }
.input-group .form-control:first-child { border-radius: 8px !important; }
.input-group-text + .form-control { border-radius: 0 8px 8px 0 !important; }

.form-section-title {
  font-size: .95rem;
  font-weight: 700;
  color: var(--primary);
  display: flex; align-items: center; gap: .5rem;
  padding-bottom: .6rem;
  border-bottom: 2px solid var(--primary-light);
  margin-bottom: 1rem;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge { font-size: .75rem; font-weight: 600; border-radius: 6px; padding: .3em .6em; }
.badge-status {
  padding: .3em .75em;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 600;
}
.badge-status.active    { background: #d1fae5; color: #065f46; }
.badge-status.inactive  { background: #fee2e2; color: #991b1b; }
.badge-status.pending   { background: #fef3c7; color: #92400e; }
.badge-status.paid      { background: #d1fae5; color: #065f46; }
.badge-status.unpaid    { background: #fee2e2; color: #991b1b; }
.badge-status.partial   { background: #dbeafe; color: #1e40af; }

/* ============================================================
   MODALS
   ============================================================ */
.modal-content {
  border-radius: 16px !important;
  border: 0 !important;
  box-shadow: 0 20px 60px rgba(0,0,0,.15) !important;
}
.modal-header {
  border-bottom: 1px solid #f1f5f9 !important;
  padding: 1.25rem 1.5rem !important;
  border-radius: 16px 16px 0 0 !important;
}
.modal-title { font-weight: 700; font-size: 1.05rem; color: #0f172a; }
.modal-footer { border-top: 1px solid #f1f5f9 !important; padding: 1rem 1.5rem !important; }
.btn-close { box-shadow: none !important; opacity: .6; }
.btn-close:hover { opacity: 1; }

/* ============================================================
   ALERTS & NOTIFICATIONS
   ============================================================ */
.alert { border-radius: 10px !important; border: 0 !important; font-size: .875rem; padding: .85rem 1.1rem; }
.alert-success { background: #d1fae5; color: #065f46; }
.alert-danger   { background: #fee2e2; color: #991b1b; }
.alert-warning  { background: #fef3c7; color: #92400e; }
.alert-info     { background: #dbeafe; color: #1e40af; }
.alert i { margin-right: .5rem; }

/* ============================================================
   PAGE HEADERS
   ============================================================ */
.page-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--card-radius);
  padding: 1.5rem;
  color: #fff;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: '';
  position: absolute; top: -40%; right: -10%;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: rgba(255,255,255,.05);
  pointer-events: none;
}
.page-header h4 { color: #fff; font-weight: 700; margin: 0; font-size: 1.25rem; }
.page-header p  { color: rgba(255,255,255,.75); margin: .25rem 0 0; font-size: .875rem; }
.page-header .header-icon {
  width: 52px; height: 52px;
  background: rgba(255,255,255,.15);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: #fff;
  flex-shrink: 0;
}

/* ============================================================
   NAV TABS (forms)
   ============================================================ */
.nav-tabs { border-bottom: 2px solid #e2e8f0 !important; }
.nav-tabs .nav-link {
  border: none !important;
  color: #64748b;
  font-weight: 500;
  padding: .65rem 1.1rem;
  border-radius: 0;
  font-size: .875rem;
  transition: color .2s;
}
.nav-tabs .nav-link:hover { color: var(--primary); background: transparent !important; border-bottom: 2px solid #e2e8f0 !important; }
.nav-tabs .nav-link.active {
  color: var(--primary) !important;
  background: transparent !important;
  border-bottom: 2px solid var(--primary) !important;
  font-weight: 600;
}

/* ============================================================
   SEARCH / FILTER PANELS
   ============================================================ */
.filter-panel {
  background: #fff;
  border-radius: var(--card-radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
  border: 1px solid #f1f5f9;
}
.filter-panel .filter-title {
  font-size: .9rem;
  font-weight: 700;
  color: #0f172a;
  display: flex; align-items: center; gap: .5rem;
  margin-bottom: 1rem;
}

/* ============================================================
   REPORT PAGES
   ============================================================ */
.report-header-bar {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-radius: var(--card-radius) var(--card-radius) 0 0;
  padding: 1.25rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
}
.report-header-bar h5 { color: #fff; font-weight: 700; margin: 0; }
.report-kpi-card {
  background: #fff;
  border-radius: var(--card-radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--primary);
  text-align: center;
}
.report-kpi-card .kpi-value { font-size: 1.75rem; font-weight: 800; color: var(--primary); }
.report-kpi-card .kpi-label { font-size: .8rem; color: #64748b; font-weight: 500; margin-top: .2rem; }

/* Section headers inside reports */
.section-header {
  background: #f8fafc !important;
  border-left: 4px solid var(--primary) !important;
  padding: .75rem 1.1rem !important;
  border-radius: 0 8px 8px 0;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
  transition: background .15s;
  display: flex; align-items: center; gap: .5rem;
  margin: 1rem 0 .75rem;
}
.section-header:hover { background: var(--primary-light) !important; }
.section-header i { color: var(--primary); }

/* Print styles for reports */
@media print {
  .sidebar-wrapper, .app-header, .app-hero-header,
  .app-footer, .btn, .filter-panel, .no-print { display: none !important; }
  .main-container { padding-left: 0 !important; }
  .app-body { padding: 0 !important; background: #fff !important; }
  .card { box-shadow: none !important; border: 1px solid #dee2e6 !important; }
}

/* ============================================================
   DASHBOARD WIDGETS
   ============================================================ */
.welcome-card {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: var(--card-radius);
  padding: 1.75rem;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.welcome-card::after {
  content: '\f15b';
  font-family: 'remixicon';
  position: absolute; right: 1.5rem; bottom: -1rem;
  font-size: 8rem; opacity: .06; line-height: 1;
}
.welcome-card h3 { color: #fff; font-weight: 700; font-size: 1.4rem; }
.welcome-card p  { color: rgba(255,255,255,.8); font-size: .9rem; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1199.98px) {
  .sidebar-wrapper { left: -270px; }
  .main-container  { padding-left: 0; }
  .page-wrapper.toggled .sidebar-wrapper {
    left: 0;
    box-shadow: 5px 0 30px rgba(0,0,0,.2);
  }
}
@media (max-width: 767.98px) {
  .app-body { padding: 1rem; }
  .app-hero-header { padding: .5rem 1rem; }
  .stat-value { font-size: 1.4rem; }
}

/* ============================================================
   PINNED / COLLAPSED SIDEBAR
   ============================================================ */
.page-wrapper.pinned .main-container { padding-left: 74px; }
@media (min-width: 1200px) {
  .page-wrapper.pinned:not(.sidebar-hovered) .sidebar-wrapper { width: 74px; }
  .page-wrapper.pinned:not(.sidebar-hovered) .sidebar-wrapper .menu-text,
  .page-wrapper.pinned:not(.sidebar-hovered) .sidebar-wrapper .treeview.active .treeview-menu,
  .page-wrapper.pinned:not(.sidebar-hovered) .sidebar-wrapper li.treeview:after,
  .page-wrapper.pinned:not(.sidebar-hovered) .sidebar-wrapper .sidebar-contact,
  .page-wrapper.pinned:not(.sidebar-hovered) .sidebar-wrapper .sidebar-section-label,
  .page-wrapper.pinned:not(.sidebar-hovered) .sidebar-wrapper .sidebar-clinic-badge,
  .page-wrapper.pinned:not(.sidebar-hovered) .sidebar-wrapper .profile-name { display: none !important; }
}

/* ============================================================
   INVOICE / PAYMENT PAGES
   ============================================================ */
.invoice-box {
  background: #fff;
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-md);
  padding: 2rem;
}
.invoice-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; border-radius: var(--card-radius); padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.invoice-total { font-size: 1.5rem; font-weight: 800; color: var(--primary); }
.invoice-line { border-bottom: 1px dashed #e2e8f0; padding: .5rem 0; }

/* ============================================================
   STATUS COLORS (table text)
   ============================================================ */
.status-paid         { color: #059669; font-weight: 600; }
.status-pending      { color: #d97706; font-weight: 600; }
.status-partially_paid { color: #3b82f6; font-weight: 600; }
.status-cancelled    { color: #dc2626; font-weight: 600; }

/* Day-sorting buttons */
.day-sorting .btn { border-radius: 20px !important; padding: .25rem .75rem !important; font-size: .8rem !important; }
.day-sorting .btn.btn-primary { background: var(--primary) !important; border-color: var(--primary) !important; }

/* ============================================================
   TREEVIEW MENU (active sidebar items)
   ============================================================ */
.sidebarMenuScroll { height: calc(100vh - 200px); overflow-y: auto; overflow-x: hidden; }

/* ============================================================
   TOASTR OVERRIDES
   ============================================================ */
.toast-success { background-color: var(--primary) !important; }

/* ============================================================
   MISC UTILITIES
   ============================================================ */
.cursor-pointer { cursor: pointer; }
.text-primary-custom { color: var(--primary) !important; }
.bg-primary-custom { background: var(--primary) !important; }
.border-primary-custom { border-color: var(--primary) !important; }
.rounded-xl { border-radius: var(--card-radius) !important; }
.shadow-custom { box-shadow: var(--shadow-md) !important; }

/* Clickable rows */
.clickable-row { cursor: pointer; transition: background .15s; }
.clickable-row:hover { background: #f0fdfa !important; }

/* Empty state */
.empty-state { text-align: center; padding: 3rem 1.5rem; color: #94a3b8; }
.empty-state i { font-size: 3.5rem; color: #cbd5e1; display: block; margin-bottom: .75rem; }
.empty-state p { font-size: .9rem; }

/* ============================================================
   ENHANCEMENT PASS — Additional Polish
   ============================================================ */

/* ── Inter font everywhere ── */
body, .form-control, .form-select, .btn, .table, .card, .modal-content {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif !important;
}

/* ── Improved table header ── */
.table > thead > tr > th {
  font-family: 'Inter', sans-serif !important;
  font-size: .72rem !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #64748b !important;
  background: #f8fafc !important;
  padding: .9rem 1rem !important;
  border-bottom: 2px solid #e2e8f0 !important;
  white-space: nowrap;
  vertical-align: middle !important;
}
.table > tbody > tr > td {
  padding: .75rem 1rem !important;
  vertical-align: middle !important;
  border-bottom: 1px solid #f1f5f9 !important;
  font-size: .875rem;
  color: #334155;
}
.table > tbody > tr:hover > td { background: #f8fafc; }
.table > tbody > tr:last-child > td { border-bottom: 0 !important; }

/* ── Card improvements ── */
.card {
  border-radius: 12px !important;
  overflow: hidden;
}
.card-header {
  padding: 1rem 1.25rem !important;
  font-size: .9rem;
  font-weight: 600;
}
.card-body { padding: 1.25rem !important; }

/* ── Button refinements ── */
.btn {
  font-weight: 500 !important;
  letter-spacing: .01em;
  transition: all .18s ease !important;
}
.btn:focus { box-shadow: 0 0 0 3px rgba(13,148,136,.2) !important; }
.btn-primary:focus { box-shadow: 0 0 0 3px rgba(13,148,136,.3) !important; }
.btn-danger:focus  { box-shadow: 0 0 0 3px rgba(239,68,68,.3) !important; }

/* Action button group in tables */
.btn-table-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 8px;
  border: 1.5px solid;
  background: transparent;
  transition: all .15s;
  cursor: pointer;
  font-size: .85rem;
}
.btn-table-action.btn-accept { border-color: #10b981; color: #10b981; }
.btn-table-action.btn-accept:hover { background: #10b981; color: #fff; }
.btn-table-action.btn-edit { border-color: #3b82f6; color: #3b82f6; }
.btn-table-action.btn-edit:hover { background: #3b82f6; color: #fff; }
.btn-table-action.btn-reject { border-color: #ef4444; color: #ef4444; }
.btn-table-action.btn-reject:hover { background: #ef4444; color: #fff; }
.btn-table-action.btn-view { border-color: #8b5cf6; color: #8b5cf6; }
.btn-table-action.btn-view:hover { background: #8b5cf6; color: #fff; }

/* ── Form section dividers ── */
.form-divider {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 1.5rem 0 1rem;
  color: #64748b;
  font-size: .82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.form-divider::before, .form-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}
.form-divider i { color: var(--primary); font-size: .95rem; }

/* ── Progress bar (form wizard) ── */
.progress { border-radius: 20px !important; height: 6px !important; background: #e2e8f0 !important; }
.progress-bar { background: linear-gradient(90deg, var(--primary), #14b8a6) !important; border-radius: 20px !important; }

/* ── Nav pills (tabs on forms) ── */
.nav-pills .nav-link {
  border-radius: 8px !important;
  font-weight: 500;
  font-size: .875rem;
  color: #64748b;
  padding: .55rem 1rem;
  transition: all .2s;
}
.nav-pills .nav-link.active {
  background: var(--primary) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(13,148,136,.3);
}
.nav-pills .nav-link:hover:not(.active) {
  background: #f1f5f9;
  color: var(--primary);
}

/* ── Dropzone ── */
.dropzone {
  border: 2px dashed #cbd5e1 !important;
  border-radius: 12px !important;
  background: #f8fafc !important;
  transition: border-color .2s, background .2s;
}
.dropzone:hover, .dropzone.dz-drag-hover {
  border-color: var(--primary) !important;
  background: var(--primary-light) !important;
}

/* ── Invoice / Financial cards ── */
.summary-card {
  border-radius: 12px !important;
  border: 0 !important;
  box-shadow: var(--shadow-sm) !important;
}
.kpi-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* ── Appointment status badges ── */
.badge-pending   { background: #fef3c7 !important; color: #92400e !important; }
.badge-confirmed { background: #d1fae5 !important; color: #065f46 !important; }
.badge-cancelled { background: #fee2e2 !important; color: #991b1b !important; }
.badge-completed { background: #dbeafe !important; color: #1e40af !important; }

/* ── Dashboard welcome card ── */
.bg-2 {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 60%, #134e4a 100%) !important;
  border-radius: 12px !important;
}
.bg-2 h6 { color: rgba(255,255,255,.75) !important; font-size: .85rem !important; }
.bg-2 h2 { color: #fff !important; font-size: 1.5rem !important; font-weight: 700 !important; }
.bg-2 h5 { color: rgba(255,255,255,.85) !important; font-size: 1rem !important; }
.bg-2 p  { color: rgba(255,255,255,.7) !important; }

/* ── Search container in header (override old styles) ── */
.app-header .search-container .form-control {
  border-radius: 30px !important;
  border: 1.5px solid #e2e8f0 !important;
  background: #f8fafc !important;
  padding: .4rem .9rem .4rem 2.3rem !important;
  min-width: 220px;
  height: 38px;
  font-size: .875rem;
}

/* ── Sidebar scrollbar ── */
.sidebar-wrapper::-webkit-scrollbar { width: 4px; }
.sidebar-wrapper::-webkit-scrollbar-track { background: transparent; }
.sidebar-wrapper::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 2px; }

/* ── Tooltip & Popover ── */
.tooltip-inner { border-radius: 6px !important; font-size: .78rem !important; }

/* ── Loading skeletons ── */
.skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: 6px;
}
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Clinic settings form ── */
.clinic-logo-preview {
  width: 80px; height: 80px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid #e2e8f0;
}
.logo-upload-area {
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  background: #f8fafc;
}
.logo-upload-area:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

/* ── Treeview submenu indicator ── */
.sidebar-menu > li.treeview:after {
  content: "\ea6e" !important; /* ri-arrow-right-s-line */
  font-family: 'remixicon' !important;
  color: rgba(255,255,255,.35) !important;
  font-size: .85rem !important;
  top: 12px !important;
  right: 12px !important;
}
.sidebar-menu > li.treeview.active:after {
  transform: rotate(90deg) !important;
  color: rgba(255,255,255,.6) !important;
}

/* ── Responsive table containers ── */
.table-wrapper {
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

/* ── Form check custom styling ── */
.form-check-input:checked {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
}
.form-check-input:focus {
  box-shadow: 0 0 0 3px rgba(13,148,136,.15) !important;
  border-color: var(--primary) !important;
}

/* ── Input with icon wrapper ── */
.input-icon-group { position: relative; }
.input-icon-group .input-icon {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  color: #94a3b8; font-size: .95rem;
  pointer-events: none; z-index: 2;
}
.input-icon-group .form-control { padding-left: 38px !important; }

/* ── Alert banner ── */
.alert-banner {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-radius: 10px;
  padding: .85rem 1.25rem;
  font-size: .875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: .75rem;
}
.alert-banner i { font-size: 1.2rem; flex-shrink: 0; }

/* ── Pagination ── */
.page-link {
  border-radius: 8px !important;
  border: 1px solid #e2e8f0 !important;
  color: #475569 !important;
  font-size: .82rem;
  padding: .45rem .75rem;
  margin: 0 2px;
  transition: all .15s;
}
.page-link:hover { background: #f1f5f9 !important; color: var(--primary) !important; }
.page-item.active .page-link {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
  box-shadow: 0 4px 10px rgba(13,148,136,.3);
}

/* ── DataTable overrides ── */
table.dataTable thead th,
table.dataTable thead td {
  padding: .9rem 1rem !important;
  border-bottom: 2px solid #e2e8f0 !important;
}
.dataTables_wrapper .dataTables_filter input {
  border-radius: 8px !important;
  padding: .4rem .85rem !important;
  border: 1.5px solid #e2e8f0 !important;
  font-size: .875rem !important;
  background: #f8fafc !important;
  transition: border-color .15s;
}
.dataTables_wrapper .dataTables_filter input:focus {
  border-color: var(--primary) !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(13,148,136,.12) !important;
}
.dataTables_wrapper .dataTables_length select {
  border-radius: 8px !important;
  border: 1.5px solid #e2e8f0 !important;
  padding: .35rem .75rem !important;
  background: #f8fafc !important;
}
.dataTables_wrapper .dataTables_info { font-size: .8rem !important; color: #94a3b8 !important; }
.dataTables_wrapper .dataTables_paginate { padding-top: .75rem !important; }

/* ── Toastr ── */
.toast-success { background: var(--primary) !important; }
.toast-info    { background: #3b82f6 !important; }
.toast-warning { background: #f59e0b !important; }
.toast-error   { background: #ef4444 !important; }
#toast-container > div {
  border-radius: 10px !important;
  box-shadow: 0 10px 25px rgba(0,0,0,.15) !important;
  font-size: .875rem !important;
  font-weight: 500 !important;
}

/* ── Modal sizes ── */
.modal-dialog-wide { max-width: 900px; }

/* ── Sticky breadcrumb offset ── */
.app-hero-header {
  top: 60px !important; /* matches --header-h */
}

/* ── Footer ── */
.app-footer {
  padding: .75rem 1.5rem !important;
  background: #fff !important;
  border-top: 1px solid #f1f5f9 !important;
  font-size: .8rem !important;
  color: #94a3b8 !important;
  box-shadow: none !important;
}
