/* ===== THEME VARIABLES ===== */
:root {
  /* Common */
  --primary: #d4890f;
  --primary-hover: #f59e0b;
  --primary-rgb: 212, 137, 15;
  /* Light Mode (Default) */
  /* --bg-body: #f1f5f9;
  --bg-wrapper: #f8fafc;
  --bg-sidebar: #ffffff;
  --bg-topbar: rgba(255, 255, 255, 0.98);
  --bg-card: #ffffff;
  --bg-card-header: #f1f5f9;
  --bg-input: #ffffff;
  --bg-modal: #ffffff;
  --bg-panel: #f1f5f9;
  
  --border-color: rgba(0, 0, 0, 0.16);
  --border-light: rgba(0, 0, 0, 0.08);
  
  --text-main: #020617;
  --text-muted: #1e293b;
  --text-dim: #475569;
  --text-white: #ffffff;
  
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.05);
  --shadow-lg: 0 12px 24px rgba(0,0,0,0.08);
  
  --glass-bg: rgba(255, 255, 255, 0.8);
  --glass-border: rgba(0, 0, 0, 0.06); */
  /* }

body.dark-mode { */
  /* Dark Mode Overrides */
  --bg-body: #020617;
  --bg-wrapper: #0b1120;
  --bg-sidebar: #0f172a;
  --bg-topbar: rgba(15, 23, 42, 0.9);
  --bg-card: rgba(15, 23, 42, 0.8);
  --bg-card-header: rgba(30, 41, 59, 0.3);
  --bg-input: rgba(30, 41, 59, 0.6);
  --bg-modal: #0f172a;
  --bg-panel: rgba(255, 255, 255, 0.04);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.04);
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 25px 60px rgba(0, 0, 0, 0.5);
  --glass-bg: rgba(15, 23, 42, 0.85);
  --glass-border: rgba(255, 255, 255, 0.08);
}
/* ===== GLOBAL ===== */
* {
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
  margin: 0;
  padding: 0
}
body {
  background: var(--bg-body);
  color: var(--text-main);
  transition: background 0.3s, color 0.3s
}
body:has(.modal-overlay.show) {
  overflow: hidden;
}
:host, html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -moz-tab-size: 4;
  tab-size: 4;
  font-family: Inter, sans-serif;
  font-feature-settings: normal;
  font-variation-settings: normal;
  -webkit-tap-highlight-color: transparent;
}
button, input, optgroup, select, textarea {
  font-family: inherit;
  font-feature-settings: inherit;
  font-variation-settings: inherit;
  font-size: 100%;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
}
.text-main {
  color: var(--text-main)
}
.text-muted {
  color: var(--text-muted)
}
.text-dim {
  color: var(--text-dim)
}
.bg-panel {
  background: var(--bg-panel)
}
.border-color {
  border-color: var(--border-color)
}
/* ===== LOGIN PAGE ===== */
.login-page {
  min-height: 100dvh;
  background: linear-gradient(135deg, #020617 0%, #0f172a 50%, #1e1b4b 100%)
}
.login-bg-orbs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .3;
  animation: float 8s ease-in-out infinite
}
.orb-1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--primary), transparent);
  top: -100px;
  left: -100px;
  animation-delay: 0s
}
.orb-2 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, #6d28d9, transparent);
  bottom: -100px;
  right: -100px;
  animation-delay: 3s
}
.orb-3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, #0e7490, transparent);
  top: 50%;
  left: 50%;
  animation-delay: 6s
}
@keyframes float {
  0%,
  100% {
    transform: translateY(0) scale(1)
  }
  50% {
    transform: translateY(-10%) scale(1.2)
  }
}
.login-grid-overlay {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, .02) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .02) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none
}
.login-card {
  background: rgba(15, 23, 42, .85);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 20px;
  padding: 24px;
  backdrop-filter: blur(20px);
  box-shadow: 0 25px 60px rgba(0, 0, 0, .5)
}
@media(max-width:480px) {
  .login-card {
    padding: 24px 20px
  }
}
.logo-badge {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(var(--primary-rgb), .4)
}
.divider-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--primary-rgb), .4), transparent)
}
.form-label {
  display: block;
  color: var(--text-dim);
  font-size: .75rem;
  font-weight: 500;
  margin-bottom: 5px;
  letter-spacing: .03em;
  text-transform: uppercase
}
.input-wrapper {
  position: relative
}
.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: .85rem;
  z-index: 1
}
.form-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 10px 16px 10px 40px;
  color: var(--text-main);
  font-size: .85rem;
  transition: all .25s;
  outline: none
}
.form-input:focus {
  border-color: var(--primary);
  background: var(--bg-input);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .15)
}
.form-input::placeholder {
  color: var(--text-dim)
}
.form-select {
  appearance: none;
  cursor: pointer
}
.form-select option {
  background: var(--bg-card);
  color: var(--text-main)
}
.toggle-password {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #4b5563;
  cursor: pointer;
  font-size: .85rem;
  transition: color .2s
}
.toggle-password:hover {
  color: var(--primary)
}
.fp-toggle-pass {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  margin: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: .85rem;
  line-height: 1;
  transition: color .2s;
  -webkit-appearance: none;
  appearance: none;
}
.fp-toggle-pass:hover,
.fp-toggle-pass:focus {
  background: transparent;
  border: none;
  box-shadow: none;
  outline: none;
  color: var(--primary);
}
.fp-toggle-pass:active {
  color: var(--primary-hover, #e6a921);
}
.custom-checkbox {
  accent-color: var(--primary);
  width: 15px;
  height: 15px;
  cursor: pointer
}
.login-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  border: none;
  border-radius: 10px;
  padding: 11px;
  color: #fff;
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  transition: all .25s;
  letter-spacing: .02em
}
.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(var(--primary-rgb), .4)
}
.demo-creds {
  border-top: 1px solid rgba(255, 255, 255, .06);
  padding-top: 16px
}
.demo-btn {
  background: rgba(30, 41, 59, .6);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 8px;
  padding: 8px 12px;
  color: #94a3b8;
  font-size: .78rem;
  cursor: pointer;
  transition: all .2s;
  width: 100%
}
.demo-btn:hover {
  background: rgba(var(--primary-rgb), .15);
  border-color: rgba(var(--primary-rgb), .3);
  color: #e2e8f0
}
/* ===== SIDEBAR ===== */
.sidebar {
  width: 240px;
  min-height: 100vh;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 50;
  transition: all .3s ease
}
.sidebar.collapsed {
  width: 72px
}
.sidebar-logo {
  padding: 20px 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 12px
}
.sidebar-logo .logo-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  color: #fff
}
.sidebar-logo .logo-text {
  overflow: hidden;
  white-space: nowrap
}
.sidebar-logo .logo-text h2 {
  color: var(--text-main);
  font-weight: 700;
  font-size: .9rem;
  line-height: 1.2
}
.sidebar-logo .logo-text p {
  color: var(--text-muted);
  font-size: .7rem
}
.nav-section-label {
  padding: 16px 16px 6px;
  color: var(--text-dim);
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: .85rem;
  font-weight: 500;
  transition: all .2s;
  border-radius: 0;
  position: relative;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left
}
.nav-item:hover,
.nav-item.active {
  color: var(--primary);
  background: rgba(var(--primary-rgb), .08)
}
.nav-item.active {
  color: var(--primary)
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--primary);
  border-radius: 0 2px 2px 0
}
.nav-icon {
  width: 20px;
  min-width: 20px;
  font-size: .9rem;
  text-align: center
}
.nav-badge {
  margin-left: auto;
  background: #ef4444;
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 20px;
  min-width: 18px;
  text-align: center
}
.sidebar-footer {
  margin-top: auto;
  padding: 16px;
  border-top: 1px solid var(--border-color)
}
.user-card {
  display: flex;
  align-items: center;
  gap: 10px
}
.user-avatar {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  color: #fff;
  font-weight: 700
}
.user-info {
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
}
.user-info .name {
  color: var(--text-main);
  font-size: .82rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}
.user-info .role-badge {
  font-size: .68rem;
  color: var(--text-muted)
}
.sidebar.collapsed .logo-text,
.sidebar.collapsed .nav-item span:not([class]),
.sidebar.collapsed .user-info {
  display: none
}
.sidebar.collapsed .nav-section-label {
  padding-inline: 5px;
  text-align: center
}
.sidebar.collapsed .nav-item {
  justify-content: center;
  padding: 10px;
  gap: 6px
}
.sidebar.collapsed .nav-badge {
  margin-left: initial;
}
.sidebar.collapsed .nav-icon {
  width: auto;
  margin: 0
}
/* ===== MAIN LAYOUT ===== */
.main-wrapper {
  margin-left: 240px;
  min-height: 100vh;
  background: var(--bg-wrapper);
  transition: all .3s ease
}
.main-wrapper.sidebar-collapsed {
  margin-left: 72px
}
.topbar {
  background: var(--bg-topbar);
  border-bottom: 1px solid var(--border-color);
  padding: 0 24px;
  height: 70px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(10px);
  gap: 20px
}
.topbar-left {
  display: flex;
  align-items: center
}
.topbar-title-wrapper {
  flex: 1
}
.sidebar-toggle {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .2s;
  margin-right: 15px
}
.sidebar-toggle:hover {
  background: rgba(var(--primary-rgb), .1);
  color: var(--primary)
}
.page-title {
  color: var(--text-main);
  font-size: 1rem;
  font-weight: 600
}
.page-breadcrumb {
  color: var(--text-muted);
  font-size: .7rem;
  margin-top: 2px
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px
}
.js-branch-name {
  display: inline-block;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  max-width: 100px;
}
.topbar-btn {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .2s;
  position: relative
}
.topbar-btn:hover {
  background: rgba(var(--primary-rgb), .1);
  color: var(--primary)
}
.theme-icon-light {
  display: none
}
body.dark-mode .theme-icon-dark {
  display: none
}
body.dark-mode .theme-icon-light {
  display: block
}
.notif-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
  border: 2px solid var(--bg-topbar)
}
.page-content {
  padding: 24px
}
/* ===== STAT CARDS ===== */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 20px 80px 20px 20px;
  position: relative;
  overflow: hidden;
  transition: all .25s;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  box-shadow: var(--shadow-sm)
}
.stat-card:not(.card-icon) {
  padding-right: 20px;
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md)
}
.stat-card .card-icon {
  top: 50%;
  right: 20px;
  width: 48px;
  height: 48px;
  min-width: 48px;
  position: absolute;
  transform: translateY(-50%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem
}
.stat-card .card-label {
  color: var(--text-muted);
  font-size: .8rem;
  font-weight: 500;
  order: 1
}
.stat-card .card-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1;
  width: 100%;
  margin-top: 12px;
  order: 2
}
.stat-card .card-change {
  font-size: .75rem;
  font-weight: 600;
  margin-top: 8px;
  width: 100%;
  order: 3
}
.stat-card .card-change.up {
  color: #10b981
}
.stat-card .card-change.down {
  color: #ef4444
}
.stat-card .card-bg {
  position: absolute;
  left: -10px;
  top: -10px;
  font-size: 4.5rem;
  opacity: .03;
  pointer-events: none
}
/* ICON THEMES */
.icon-gold {
  background: rgba(var(--primary-rgb), .1);
  color: var(--primary)
}
.icon-blue {
  background: rgba(59, 130, 246, .1);
  color: #3b82f6
}
.icon-red {
  background: rgba(239, 68, 68, .1);
  color: #ef4444
}
.icon-green {
  background: rgba(16, 185, 129, .1);
  color: #10b981
}
.icon-purple {
  background: rgba(139, 92, 246, .1);
  color: #8b5cf6
}
.icon-cyan {
  background: rgba(6, 182, 212, .1);
  color: #06b6d4
}
.icon-slate {
  background: rgba(71, 85, 105, 0.25);
  color: #94a3b8
}
/* ===== TABLES ===== */
.data-table {
  width: 100%;
  border-collapse: collapse
}
.data-table thead tr {
  border-bottom: 1px solid var(--border-color)
}
.data-table thead th {
  padding: 12px;
  color: var(--text-dim);
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  text-align: left;
  white-space: nowrap
}
.data-table tbody tr {
  border-bottom: 1px solid var(--border-light);
  transition: background .2s
}
.data-table tbody tr:hover {
  background: var(--bg-panel)
}
.data-table tbody td {
  padding: 12px;
  font-size: .75rem;
  vertical-align: middle;
  white-space: nowrap
}
.data-table.v2 tbody td {
  padding-block: 8px;
}
.data-table tbody td:not([class*="text"]) {
  color: var(--text-muted)
}
.data-table tbody td .name-cell {
  color: var(--text-main);
  font-weight: 600
}
.hidden {
  display: none !important
}
/* ===== DATERANGEPICKER DARK MODE ===== */
.daterangepicker {
  background-color: #0f172a !important;
  border: 1px solid rgba(255, 255, 255, .1) !important;
  color: #e2e8f0 !important;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, .5) !important
}
.daterangepicker .calendar-table {
  background-color: #0f172a !important;
  border: none !important
}
.daterangepicker .calendar-table td,
.daterangepicker .calendar-table th {
  background-color: #0f172a !important;
  color: #e2e8f0 !important
}
.daterangepicker td.available:hover,
.daterangepicker th.available:hover {
  background-color: #1e293b !important;
  color: #f59e0b !important
}
.daterangepicker td.off,
.daterangepicker td.off.end-date,
.daterangepicker td.off.in-range,
.daterangepicker td.off.start-date {
  background-color: transparent !important;
  color: #475569 !important;
  opacity: .5 !important
}
.daterangepicker td.in-range {
  background-color: rgba(212, 137, 15, .1) !important;
  color: #e2e8f0 !important
}
.daterangepicker td.active,
.daterangepicker td.active:hover {
  background-color: #d4890f !important;
  color: #fff !important
}
.daterangepicker .drp-buttons {
  border-top: 1px solid rgba(255, 255, 255, .1) !important;
  background-color: #0f172a !important
}
.daterangepicker .drp-selected {
  color: #94a3b8 !important
}
.daterangepicker .drp-buttons .btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  height: 32px;
  border-radius: 6px !important;
  font-size: .78rem !important;
  opacity: 1 !important;
  visibility: visible !important;
}
.daterangepicker .drp-buttons .applyBtn {
  background: #d4890f !important;
  border-color: #d4890f !important;
  color: #fff !important;
}
.daterangepicker .drp-buttons .cancelBtn {
  background: #1e293b !important;
  border: 1px solid rgba(255, 255, 255, .16) !important;
  color: #e2e8f0 !important;
}
.daterangepicker .ranges li {
  background-color: transparent !important;
  color: #94a3b8 !important
}
.daterangepicker .ranges li:hover {
  background-color: #1e293b !important;
  color: #f59e0b !important
}
.daterangepicker .ranges li.active {
  background-color: #d4890f !important;
  color: #fff !important
}
.daterangepicker select.monthselect,
.daterangepicker select.yearselect {
  background: #1e293b !important;
  border: 1px solid rgba(255, 255, 255, .1) !important;
  color: #e2e8f0 !important
}
.daterangepicker .calendar-table .next span,
.daterangepicker .calendar-table .prev span {
  border-color: #e2e8f0 !important
}
.daterangepicker:after,
.daterangepicker:before {
  display: none
}
/* ===== BADGES ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .03em
}
.badge-success {
  background: rgba(16, 185, 129, .1);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, .15)
}
.badge-warning {
  background: rgba(245, 158, 11, .1);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, .15)
}
.badge-danger {
  background: rgba(239, 68, 68, .1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, .15)
}
.badge-info {
  background: rgba(59, 130, 246, .1);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, .15)
}
.badge-purple {
  background: rgba(139, 92, 246, .1);
  color: #8b5cf6;
  border: 1px solid rgba(139, 92, 246, .15)
}
.badge-gray {
  background: rgba(100, 116, 139, .1);
  color: #64748b;
  border: 1px solid rgba(100, 116, 139, .15)
}
/* ===== CARDS ===== */
.panel-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm)
}
.panel-card-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-card-header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 55px
}
.panel-card-header h3 {
  color: var(--text-main);
  font-size: .9rem;
  font-weight: 600
}
.panel-card-body {
  padding: 16px
}
/* ===== BUTTONS ===== */
.btn {
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 14px;
  border-radius: 6px;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
  white-space: nowrap;
  border: none;
  gap: 6px;
}
.btn i {
  margin-right: 0 !important
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #fff;
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), .3)
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(var(--primary-rgb), .4)
}
.btn-secondary {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  color: var(--text-muted)
}
.btn-secondary:hover {
  background: rgba(var(--primary-rgb), .05);
  color: var(--primary);
  border-color: rgba(var(--primary-rgb), .2)
}
.btn-danger {
  background: rgba(239, 68, 68, .1);
  border: 1px solid rgba(239, 68, 68, .2);
  color: #ef4444
}
.btn-danger:hover {
  background: rgba(239, 68, 68, .15)
}
.btn-success {
  background: rgba(16, 185, 129, .1);
  border: 1px solid rgba(16, 185, 129, .2);
  color: #10b981
}
.btn-success:hover {
  background: rgba(16, 185, 129, .15)
}
.btn-warning {
  background: rgba(245, 158, 11, .1);
  border: 1px solid rgba(245, 158, 11, .15);
  color: #d97706
}
.btn-warning:hover {
  background: rgba(245, 158, 11, .15)
}
.btn-sm {
  padding: 4px 8px;
  font-size: .7rem;
  border-radius: 4px;
  height: 26px
}
.btn-icon {
  width: 26px;
  height: 26px;
  padding: 0;
  justify-content: center;
  font-size: .75rem
}
/* ===== FORMS ===== */
.form-control,
.dateRange_box {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 5px 12px;
  color: var(--text-main);
  font-size: .8rem;
  transition: all .25s;
  outline: none;
  font-family: 'Inter', sans-serif;
  height: 36px
}
.dateRange_box {
  width: auto;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  gap: 6px;
  min-height: 36px;
  height: auto;
}
.dateRange_box > span {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.15;
}
.dateRange_box .date-range-line {
  display: block;
  white-space: nowrap;
}
.dateRange_box i.fas.fa-chevron-down {
  font-size: 12px;
  color: #fff;
}
textarea.form-control {
  resize: none;
  height: 80px
}
select.form-control {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
  padding-right: 2.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  box-sizing: border-box;
}
body.dark-mode select.form-control {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
}
.form-control:focus,
.dateRange_box:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .1)
}
.form-control::placeholder {
  color: var(--text-dim)
}
.form-control option {
  background: var(--bg-card);
  color: var(--text-main)
}
.form-control[type="date"]::-webkit-calendar-picker-indicator,
.form-control[type="month"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.6
}
body.dark-mode .form-control[type="date"]::-webkit-calendar-picker-indicator,
body.dark-mode .form-control[type="month"]::-webkit-calendar-picker-indicator {
  filter: invert(1)
}
.form-label-sm {
  display: block;
  color: var(--text-muted);
  font-size: .8rem;
  font-weight: 500;
  margin-bottom: 4px;
  letter-spacing: .02em
}
.input-group {
  display: flex;
  gap: 0
}
.input-group .form-control {
  border-radius: 6px 0 0 6px
}
.input-group .btn {
  border-radius: 0 6px 6px 0
}
/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s
}
body.dark-mode .modal-overlay {
  background: rgba(0, 0, 0, .7)
}
.modal-overlay.show {
  opacity: 1;
  pointer-events: all
}
.modal {
  background: var(--bg-modal);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(.95) translateY(20px);
  transition: transform .3s ease, opacity .3s ease;
  opacity: 0;
  box-shadow: var(--shadow-lg)
}
.modal-overlay.show .modal {
  transform: scale(1) translateY(0);
  opacity: 1
}
.modal-header {
  top: 0;
  left: 0;
  width: 100%;
  position: sticky;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-modal);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  z-index: 9;
}
.modal-header h4 {
  color: var(--text-main);
  font-weight: 700;
  font-size: 1rem
}
.modal-close {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .2s
}
.modal-close:hover {
  background: rgba(239, 68, 68, .1);
  color: #ef4444
}
.modal-body {
  padding: 20px 20px
}
.modal-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px
}
/* ===== ALERTS ===== */
.alert {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: .85rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px
}
.alert-success {
  background: rgba(16, 185, 129, .1);
  border: 1px solid rgba(16, 185, 129, .2);
  color: #10b981
}
.alert-warning {
  background: rgba(245, 158, 11, .1);
  border: 1px solid rgba(245, 158, 11, .2);
  color: #d97706
}
.alert-danger {
  background: rgba(239, 68, 68, .1);
  border: 1px solid rgba(239, 68, 68, .2);
  color: #ef4444
}
.alert-info {
  background: rgba(59, 130, 246, .1);
  border: 1px solid rgba(59, 130, 246, .2);
  color: #3b82f6
}
/* ===== TABS ===== */
.tabs-nav {
  display: flex;
  gap: 4px;
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none
}
.tabs-nav::-webkit-scrollbar {
  display: none
}
.tab-btn {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: .75rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .2s;
  background: none;
  border: none;
  white-space: nowrap;
  height: auto;
  flex-shrink: 0
}
.tab-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #fff;
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), .3)
}
.tab-btn:not(.active):hover {
  color: var(--text-main);
  background: var(--border-light)
}
.tab-pane {
  display: none
}
.tab-pane.active {
  display: block
}
/* ===== SEARCH & FILTER ===== */
.search-box {
  position: relative
}
.search-box i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-42%);
  color: var(--text-dim);
  font-size: .85rem
}
.search-box input {
  padding-left: 36px
}
/* ===== PROGRESS ===== */
.progress-bar {
  height: 6px;
  background: var(--border-color);
  border-radius: 10px;
  overflow: hidden
}
.progress-fill {
  height: 100%;
  border-radius: 10px;
  transition: width .5s ease
}
/* ===== TIMELINE ===== */
.timeline {
  position: relative;
  padding-left: 24px
}
.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-color)
}
.timeline-item {
  position: relative;
  padding-bottom: 20px
}
.timeline-dot {
  position: absolute;
  left: -24px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--bg-card);
  z-index: 1;
  background: var(--primary)
}
.timeline-content {
  color: var(--text-muted);
  font-size: .82rem
}
.timeline-title {
  color: var(--text-main);
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 2px
}
.timeline-time {
  color: var(--text-dim);
  font-size: .72rem
}
/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 5px;
  height: 5px
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, .02)
}
body.dark-mode ::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, .02)
}
::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, .1);
  border-radius: 10px
}
body.dark-mode ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .1)
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(var(--primary-rgb), .4)
}
/* ===== RESPONSIVE ===== */
@media(max-width:1400px) {
  .stat-card {
    padding: 18px 70px 18px 16px
  }
  .stat-card .card-icon {
    width: 45px;
    height: 45px;
    min-width: 45px;
    font-size: 1rem;
    right: 16px
  }
  .stat-card .card-label {
    font-size: .75rem
  }
  .stat-card .card-value {
    font-size: 1.3rem
  }
}
@media(max-width:1200px) {
  .sidebar {
    transform: translateX(-100%);
    width: 240px !important;
  }
  .sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2);
  }
  body.dark-mode .sidebar.mobile-open {
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5);
  }
  .sidebar .logo-text,
  .sidebar .nav-item span:not(.nav-icon),
  .sidebar .nav-badge,
  .sidebar .user-info {
    display: block !important;
  }
  .sidebar .nav-item {
    justify-content: flex-start !important;
    padding: 10px 16px !important;
  }
  .sidebar .nav-icon {
    width: 20px !important;
    margin: 0 !important;
  }
  .main-wrapper {
    margin-left: 0 !important
  }
}
/* ===== MOBILE SIDEBAR OVERLAY ===== */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  z-index: 49;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.sidebar-overlay.show {
  display: block;
}
@media(max-width:768px) {
  html {
    font-size: 15px
  }
  .topbar {
    height: auto;
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 12px
  }
  .topbar-left {
    order: 1
  }
  .topbar-right {
    order: 2;
    margin-left: auto
  }
  .topbar-title-wrapper {
    order: 3;
    margin: 0 -16px;
    padding-top: 12px;
    padding-inline: 16px;
    border-top: 1px solid var(--border-color);
    flex: 1 1 calc(100% + 32px);
    width: calc(100% + 32px);
  }
  .page-content {
    padding: 16px 16px 24px
  }
  .panel-card-header {
    flex-wrap: wrap;
    gap: 8px
  }
  .modal {
    display: flex;
    align-items: stretch;
    flex-direction: column;
    width: 100% !important;
    max-width: 100% !important;
    max-height: 100dvh;
    border-radius: 0;
    height: 100dvh;
    border: none;
    margin: 0;
  }
  .modal-header {
    padding: 12px 15px
  }
  .modal-body {
    flex: 1;
    padding: 15px
  }
  .modal-footer {
    padding: 12px 15px
  }
  .form-control, .dateRange_box {
    padding: 5px 10px;
    height: 32px;
  }
  .search-box {
    width: 100%;
  }
  .search-box input {
    width: 100% !important;
  }
  .btn {
    padding: 2px 14px;
    height: 32px;
  }
  .stat-card .card-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    right: 12px;
  }
  .stat-card {
    padding: 16px 64px 16px 15px;
    border-radius: 12px;
  }
  .stat-card:not(.card-icon) {
    padding-right: 15px;
  }
  .form-label-sm {
    font-size: .7rem;
    margin-bottom: 3px;
  }
  .dateRange_box {
    width: 180px;
  }
  .dateRange_box span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
  }
}
/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px)
  }
  to {
    opacity: 1;
    transform: translateY(0)
  }
}
.fade-in {
  animation: fadeInUp .4s ease forwards
}
.delay-1 {
  animation-delay: .1s
}
.delay-2 {
  animation-delay: .2s
}
.delay-3 {
  animation-delay: .3s
}
.delay-4 {
  animation-delay: .4s
}
.delay-5 {
  animation-delay: .5s
}
/* ===== PERMISSION TOGGLE ===== */
.perm-toggle {
  position: relative;
  width: 40px;
  height: 22px;
  cursor: pointer
}
.perm-toggle input {
  opacity: 0;
  width: 0;
  height: 0
}
.perm-slider {
  position: absolute;
  inset: 0;
  background: var(--border-color);
  border-radius: 20px;
  transition: .3s
}
.perm-slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: .3s;
  opacity: .5
}
.perm-toggle input:checked+.perm-slider {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover))
}
.perm-toggle input:checked+.perm-slider::before {
  transform: translateX(18px);
  opacity: 1
}
/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-dim)
}
.empty-state i {
  font-size: 3rem;
  margin-bottom: 12px;
  display: block;
  opacity: .3
}
.empty-state p {
  font-size: .85rem
}
/* ===== DROPDOWN MENU ===== */
.dropdown {
  position: relative
}
.dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  min-width: 180px;
  padding: 6px;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: all .2s;
  box-shadow: var(--shadow-md);
  max-height: 200px;
  overflow: auto;
}
.dropdown-menu.show {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0)
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  color: var(--text-muted);
  font-size: .82rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none
}
.dropdown-item:hover {
  background: var(--bg-panel);
  color: var(--text-main)
}
.dropdown-item.danger:hover {
  background: rgba(239, 68, 68, .1);
  color: #ef4444
}
.dropdown-divider {
  height: 1px;
  background: var(--border-color);
  margin: 4px 0
}
/* ===== CHART PLACEHOLDER ===== */
.chart-placeholder {
  background: var(--bg-panel);
  border-radius: 12px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: .8rem;
  border: 1px dashed var(--border-color)
}
/* ===== POPUP SPECIFIC STYLES ===== */
/* Booking Modal Services Toggle */
.service-toggle {
  cursor: pointer;
  display: block
}
.service-toggle input {
  display: none
}
.svc-card {
  height: 100%;
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px 10px;
  text-align: center;
  font-size: .8rem;
  color: var(--text-muted);
  transition: all .2s;
  display: flex;
  flex-direction: column;
  align-items: center
}
.service-toggle input:checked+.svc-card {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--text-white);
}
.service-toggle input:checked+.svc-card i {
  color: var(--text-white)
}
/* Payment Modal Method Options */
.pay-method-opt {
  cursor: pointer;
  display: block
}
.pay-method-opt input {
  display: none
}
.pay-opt-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 12px 10px;
  text-align: center;
  font-size: .78rem;
  color: var(--text-muted);
  transition: all .2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px
}
.pay-opt-card span {
  display: block;
  line-height: 1.2
}
.pay-method-opt input:checked+.pay-opt-card {
  background: rgba(var(--primary-rgb), .1);
  border-color: rgba(var(--primary-rgb), .4);
  color: var(--primary)
}
.pax-passport-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
/* dashboard.css – extra dashboard-specific styles */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px
}
.toast-item {
  background: #1e293b;
  border-left: 3px solid;
  border-radius: 10px;
  padding: 12px 18px;
  font-size: .83rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
  opacity: 0;
  transform: translateX(20px);
  transition: all .3s;
  min-width: 240px
}
.toast-item.show {
  opacity: 1;
  transform: translateX(0)
}
.pay-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .04)
}
.pay-item:first-child {
  padding-top: 0
}
.pay-item:last-child {
  border-bottom: none;
  padding-bottom: 0
}
.pay-item-info {
  flex: 1;
  min-width: 0
}
.pay-method {
  font-size: .75rem;
  color: #64748b;
  display: flex;
  align-items: center
}
.pay-amount {
  flex-shrink: 0;
  font-weight: 700;
  color: #34d399;
  font-size: .9rem;
  text-align: right;
  white-space: nowrap
}
.recent-payments-panel .panel-card-body {
  display: flex;
  flex-direction: column;
  min-height: 0
}
.recent-payments-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto
}
.branch-bar-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px
}
.branch-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .8rem;
  margin-bottom: 4px
}
@keyframes shake {
  0%, 100% {
    transform: translateX(0)
  }
  25% {
    transform: translateX(-6px)
  }
  75% {
    transform: translateX(6px)
  }
}
.shake {
  animation: shake .4s ease
}

/* Custom Service Checkbox Pills */
.service-checkbox-pill {
  cursor: pointer;
  display: inline-block;
  user-select: none;
}
.service-checkbox-pill input.hide-default-checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  overflow: hidden;
}
.service-pill-box {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 500;
  transition: all 0.2s ease;
  min-height: 36px;
}
.service-checkbox-pill input:checked + .service-pill-box {
  background: rgba(212, 137, 15, 0.15);
  border-color: var(--primary);
  color: var(--text-main);
  box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.1);
}
.service-checkbox-pill input:checked + .service-pill-box i {
  color: var(--primary);
}
.service-checkbox-pill:hover .service-pill-box {
  border-color: rgba(var(--primary-rgb), 0.5);
  background: rgba(255, 255, 255, 0.02);
}

/* Keep report date validation from moving compact filter controls. */
.report-date-error-wrap {
  position: relative;
}

.report-date-error-wrap .field-error-msg {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 5;
  margin-top: 2px;
  white-space: nowrap;
}
