/* ==========================================================================
   DESIGN SYSTEM & STYLESHEET
   ບໍລິການເຮືອນເຊົ່າ (ທ່ານ ກ່າຍຢັມ ເຣີ) - ສາຂາ ຈອມມະນີ
   ========================================================================== */

/* --- CSS Variables / Design Tokens --- */
:root {
  /* Dark Theme (Default) - Deep Obsidian & Sapphire Shading */
  --bg-app: #070a13;
  --bg-sidebar: linear-gradient(180deg, #090e1a 0%, #0c1324 50%, #070a14 100%);
  --bg-card: linear-gradient(145deg, rgba(20, 31, 54, 0.8) 0%, rgba(11, 18, 33, 0.92) 100%);
  --bg-card-solid: #0f172a;
  --bg-card-hover: linear-gradient(145deg, rgba(28, 43, 75, 0.85) 0%, rgba(15, 24, 44, 0.95) 100%);
  --bg-input: linear-gradient(180deg, #0c1324 0%, #10192e 100%);
  --border-subtle: rgba(255, 255, 255, 0.085);
  --border-focus: #38bdf8;

  --text-main: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --primary: #38bdf8;         /* Vibrant Sapphire Sky */
  --primary-gradient: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
  --primary-glow: rgba(14, 165, 233, 0.35);

  --secondary: #818cf8;       /* Indigo */
  --secondary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);

  --success: #10b981;         /* Emerald */
  --success-bg: rgba(16, 185, 129, 0.15);
  --success-border: rgba(16, 185, 129, 0.3);

  --warning: #f59e0b;         /* Amber */
  --warning-bg: rgba(245, 158, 11, 0.15);
  --warning-border: rgba(245, 158, 11, 0.3);

  --danger: #ef4444;          /* Red */
  --danger-bg: rgba(239, 68, 68, 0.15);
  --danger-border: rgba(239, 68, 68, 0.3);

  --sidebar-w: 270px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 10px 28px -4px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  --shadow-glow: 0 0 25px rgba(14, 165, 233, 0.25);

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

/* --- Light Mode Tokens (Statistic Screen Reference) --- */
[data-theme="light"] {
  --bg-app: #f0f4f9;
  --bg-sidebar: linear-gradient(180deg, #0d5db8 0%, #0a4c99 50%, #083b79 100%);
  --bg-card: #ffffff;
  --bg-card-solid: #ffffff;
  --bg-card-hover: #ffffff;
  --bg-input: #ffffff;
  --border-subtle: #e2e8f0;
  --border-focus: #0b5ed7;

  --text-main: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;

  --primary: #0b5ed7;
  --primary-gradient: linear-gradient(135deg, #0d5db8 0%, #084298 100%);
  --primary-glow: rgba(13, 93, 184, 0.22);

  --secondary: #6366f1;
  --secondary-gradient: linear-gradient(135deg, #6366f1, #4f46e5);

  --success: #059669;
  --success-bg: rgba(5, 150, 105, 0.1);
  --success-border: rgba(5, 150, 105, 0.25);

  --warning: #d97706;
  --warning-bg: rgba(217, 119, 6, 0.1);
  --warning-border: rgba(217, 119, 6, 0.25);

  --danger: #dc2626;
  --danger-bg: rgba(220, 38, 38, 0.1);
  --danger-border: rgba(220, 38, 38, 0.25);

  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 25px -4px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.03);
  --shadow-glow: 0 4px 20px rgba(13, 93, 184, 0.15);
}

/* --- Base & Reset --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: inherit;
}

body {
  background-color: var(--bg-app);
  color: var(--text-main);
  font-family: 'Outfit', 'Noto Sans Lao', sans-serif;
  min-height: 100vh;
  display: flex;
  overflow-x: clip;
  background-image: 
    radial-gradient(ellipse 90% 50% at 50% -15%, rgba(30, 58, 138, 0.25), transparent 70%),
    radial-gradient(ellipse 60% 40% at 90% 15%, rgba(14, 165, 233, 0.12), transparent 60%),
    radial-gradient(ellipse 50% 35% at 5% 75%, rgba(99, 102, 241, 0.08), transparent 60%),
    linear-gradient(180deg, #070a13 0%, #0a0f1d 50%, #060912 100%);
  background-attachment: fixed;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* --- Sidebar --- */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--border-subtle);
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  padding: 28px 20px;
  z-index: 100;
  transition: all var(--transition-normal);
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
  padding: 0 8px;
}

.brand-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow);
  color: #fff;
}

.brand-icon-box i {
  width: 24px;
  height: 24px;
}

.brand-text-block h2 {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-main);
}

.brand-text-block p {
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 0.3px;
}

.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.nav-item i {
  width: 20px;
  height: 20px;
}

.nav-item:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
  color: #fff;
  background: var(--primary-gradient);
  box-shadow: 0 4px 15px var(--primary-glow);
  font-weight: 600;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.theme-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-main);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  border-color: var(--primary);
}

.theme-toggle-btn i {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.owner-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-muted);
}

.owner-avatar {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--secondary-gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

/* --- Main Layout --- */
.main-wrapper {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 30px 36px 60px;
  min-height: 100vh;
  max-width: 1400px;
}

/* --- Top Header Bar --- */
.top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 20px;
  flex-wrap: wrap;
}

.header-left h1 {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.header-left p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 3px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.cloud-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
}

.sync-dot.active {
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
}

/* --- Content Sections --- */
.content-section {
  display: none;
  animation: fadeIn 0.3s ease;
}

.content-section.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- KPI Summary Cards --- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.kpi-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--card-accent, var(--primary-gradient));
}

.kpi-card.income { --card-accent: var(--primary-gradient); }
.kpi-card.pending { --card-accent: linear-gradient(135deg, #f59e0b, #d97706); }
.kpi-card.expense { --card-accent: linear-gradient(135deg, #ef4444, #dc2626); }
.kpi-card.profit { --card-accent: linear-gradient(135deg, #10b981, #059669); }
.kpi-card.occupancy { --card-accent: var(--secondary-gradient); }

.kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.kpi-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.kpi-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.kpi-icon.cyan { background: rgba(6, 182, 212, 0.2); color: var(--primary); }
.kpi-icon.amber { background: var(--warning-bg); color: var(--warning); }
.kpi-icon.red { background: var(--danger-bg); color: var(--danger); }
.kpi-icon.green { background: var(--success-bg); color: var(--success); }
.kpi-icon.purple { background: rgba(139, 92, 246, 0.2); color: var(--secondary); }

.kpi-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.kpi-subtext {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* --- Filter Bar --- */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.filter-select, .form-input, .form-select {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  outline: none;
  transition: border-color var(--transition-fast);
}

.filter-select:focus, .form-input:focus, .form-select:focus {
  border-color: var(--border-focus);
}

/* --- Section Heading --- */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  margin-top: 10px;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title i {
  color: var(--primary);
  width: 22px;
  height: 22px;
}

/* --- 5 Rooms Quick Grid --- */
.rooms-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-bottom: 30px;
}

.room-quick-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all var(--transition-fast);
  position: relative;
}

.room-quick-card:hover {
  border-color: rgba(6, 182, 212, 0.4);
  transform: translateY(-2px);
}

.room-quick-card.add-room-card {
  border: 2px dashed rgba(56, 189, 248, 0.45) !important;
  background: rgba(56, 189, 248, 0.04) !important;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: all 0.25s ease;
  min-height: 220px;
}

.room-quick-card.add-room-card:hover {
  border-color: var(--color-primary) !important;
  background: rgba(56, 189, 248, 0.12) !important;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(56, 189, 248, 0.25);
}

.room-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.room-badge-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.room-icon-box {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: rgba(6, 182, 212, 0.15);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

.room-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.room-sub {
  font-size: 12px;
  color: var(--text-secondary);
}

.room-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
}

.room-pill i {
  width: 12px;
  height: 12px;
}

.room-pill.paid { background: var(--success-bg); color: var(--success); border: 1px solid var(--success-border); }
.room-pill.pending { background: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning-border); }
.room-pill.unbilled { background: rgba(148, 163, 184, 0.15); color: var(--text-secondary); border: 1px solid var(--border-subtle); }
.room-pill.vacant { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger-border); }
.room-pill.all { background: rgba(56, 189, 248, 0.15); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.35); }
.room-pill.clickable { cursor: pointer; transition: var(--transition-fast); user-select: none; }
.room-pill.clickable:hover { transform: translateY(-1px); filter: brightness(1.15); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15); }

.room-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 0;
  border-top: 1px dashed var(--border-subtle);
  border-bottom: 1px dashed var(--border-subtle);
}

.room-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
}

.stat-label {
  color: var(--text-secondary);
}

.stat-val {
  color: var(--text-main);
}

.room-stat-row.highlight {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid var(--border-subtle);
}

.room-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-card-action {
  flex: 1;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  transition: all var(--transition-fast);
}

.btn-card-action i {
  width: 14px;
  height: 14px;
}

.btn-card-action.primary {
  background: var(--primary);
  color: #fff;
}

.btn-card-action.primary:hover {
  background: #0891b2;
}

.btn-card-action.secondary {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
  border: 1px solid var(--success-border);
}

.btn-card-action.secondary:hover {
  background: rgba(16, 185, 129, 0.25);
}

.btn-card-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-card-icon i {
  width: 15px;
  height: 15px;
}

.btn-card-icon:hover {
  color: var(--text-main);
  border-color: var(--primary);
}

/* --- Charts Grid --- */
.charts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 30px;
}

.chart-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
}

.chart-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.chart-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.chart-canvas-box {
  position: relative;
  flex: 1;
  min-height: 280px;
}

.secondary-charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 30px;
}

/* --- Data Table Styling --- */
.table-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 30px;
}

.table-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-subtle);
  gap: 16px;
  flex-wrap: wrap;
}

.table-wrapper {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
}

.data-table th {
  background: rgba(0, 0, 0, 0.15);
  color: var(--text-secondary);
  font-weight: 600;
  padding: 10px 10px;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
  vertical-align: middle;
}

[data-theme="light"] .data-table th {
  background: rgba(0, 0, 0, 0.03);
}

.data-table td {
  padding: 10px 10px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-main);
  white-space: nowrap;
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background-color var(--transition-fast);
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

[data-theme="light"] .data-table tbody tr:hover {
  background: rgba(0, 0, 0, 0.02);
}

.badge-status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 600;
}

.badge-status.paid { background: var(--success-bg); color: var(--success); }
.badge-status.pending { background: var(--warning-bg); color: var(--warning); }
.badge-category {
  display: inline-block;
  padding: 3px 8px;
  background: rgba(6, 182, 212, 0.12);
  color: var(--primary);
  border-radius: var(--radius-sm);
  font-size: 12px;
}

/* Room Pill Badge */
.room-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  background: rgba(6, 182, 212, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.25);
  letter-spacing: 0.2px;
}
[data-theme="light"] .room-pill-badge {
  background: rgba(2, 132, 199, 0.1);
  color: #0284c7;
  border-color: rgba(2, 132, 199, 0.25);
}

/* Paid Date Timestamp Badge */
.paid-date-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #34d399;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 4px;
  padding: 2px 6px;
  margin-top: 4px;
  white-space: nowrap;
}
.paid-date-badge i {
  width: 12px;
  height: 12px;
  stroke-width: 2.2;
}
[data-theme="light"] .paid-date-badge {
  color: #059669;
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.2);
}

/* Table Actions & Distinct Color Buttons */
td.table-actions-cell,
td.table-actions {
  white-space: nowrap;
}

.table-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.btn-action-sm {
  width: 30px;
  height: 30px;
  min-width: 30px;
  padding: 0;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.btn-action-sm i {
  width: 14.5px;
  height: 14.5px;
  stroke-width: 2.2;
}

/* 1. View / Print: Cyan / Sky */
.btn-action-sm.view {
  background: rgba(6, 182, 212, 0.14);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}
.btn-action-sm.view:hover {
  background: #0ea5e9;
  color: #ffffff;
  border-color: #0284c7;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(14, 165, 233, 0.4);
}

/* 2. Edit: Violet / Purple */
.btn-action-sm.edit {
  background: rgba(168, 85, 247, 0.14);
  color: #c084fc;
  border: 1px solid rgba(192, 132, 252, 0.35);
}
.btn-action-sm.edit:hover {
  background: #a855f7;
  color: #ffffff;
  border-color: #9333ea;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(168, 85, 247, 0.4);
}

/* 3. Share: WhatsApp Green */
.btn-action-sm.share {
  background: rgba(34, 197, 94, 0.14);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.35);
}
.btn-action-sm.share:hover {
  background: #22c55e;
  color: #ffffff;
  border-color: #16a34a;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(34, 197, 94, 0.4);
}

/* 4. Pay: Emerald Green */
.btn-action-sm.pay {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.4);
}
.btn-action-sm.pay:hover {
  background: #10b981;
  color: #ffffff;
  border-color: #059669;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(16, 185, 129, 0.4);
}

/* 5. Unpay (Undo): Amber / Orange */
.btn-action-sm.unpay {
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.4);
}
.btn-action-sm.unpay:hover {
  background: #f59e0b;
  color: #ffffff;
  border-color: #d97706;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(245, 158, 11, 0.4);
}

/* 6. Delete: Red / Rose */
.btn-action-sm.delete {
  background: rgba(239, 68, 68, 0.14);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.35);
}
.btn-action-sm.delete:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(239, 68, 68, 0.4);
}

/* Light mode overrides for crystal clarity */
[data-theme="light"] .btn-action-sm.view {
  background: rgba(14, 165, 233, 0.1);
  color: #0284c7;
  border-color: rgba(2, 132, 199, 0.3);
}
[data-theme="light"] .btn-action-sm.edit {
  background: rgba(147, 51, 234, 0.1);
  color: #7c3aed;
  border-color: rgba(124, 58, 237, 0.3);
}
[data-theme="light"] .btn-action-sm.share {
  background: rgba(22, 163, 74, 0.1);
  color: #16a34a;
  border-color: rgba(22, 163, 74, 0.3);
}
[data-theme="light"] .btn-action-sm.pay {
  background: rgba(5, 150, 105, 0.12);
  color: #059669;
  border-color: rgba(5, 150, 105, 0.3);
}
[data-theme="light"] .btn-action-sm.unpay {
  background: rgba(217, 119, 6, 0.12);
  color: #d97706;
  border-color: rgba(217, 119, 6, 0.3);
}
[data-theme="light"] .btn-action-sm.delete {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
  border-color: rgba(220, 38, 38, 0.3);
}

/* --- Utility Billing Form & Calculator --- */
.billing-layout-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 24px;
  align-items: start;
}

.billing-side-column {
  position: -webkit-sticky;
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 26px;
}

.form-card-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-card-title i {
  color: var(--primary);
}

.form-group-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field.full-width {
  grid-column: 1 / -1;
}

.field-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.field-label i {
  width: 14px;
  height: 14px;
}

.field-note {
  font-size: 11px;
  color: var(--text-muted);
}

.meter-calc-box {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
}

[data-theme="light"] .meter-calc-box {
  background: rgba(0, 0, 0, 0.02);
}

.meter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.meter-title {
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.meter-subtotal-badge {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
}

/* Radio Switch */
.radio-toggle-group {
  display: flex;
  gap: 14px;
  margin-bottom: 10px;
}

.radio-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text-secondary);
}

/* --- Previous Month Benchmark Card & Hints --- */
.benchmark-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.benchmark-card:hover {
  border-color: rgba(6, 182, 212, 0.4);
}

.benchmark-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 14px;
}

.benchmark-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.benchmark-title i {
  color: var(--primary);
  width: 18px;
  height: 18px;
}

.benchmark-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}

.benchmark-room-badge {
  background: rgba(6, 182, 212, 0.12);
  color: var(--primary);
  border: 1px solid rgba(6, 182, 212, 0.3);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.benchmark-empty-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.5;
}

.benchmark-empty-box i {
  color: var(--primary);
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.benchmark-items-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.benchmark-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--border-subtle);
  transition: transform var(--transition-fast);
}

[data-theme="light"] .benchmark-item {
  background: rgba(0, 0, 0, 0.02);
}

.benchmark-item.elec {
  border-left: 4px solid var(--warning);
}

.benchmark-item.water {
  border-left: 4px solid var(--primary);
}

.benchmark-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.benchmark-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.benchmark-item.elec .benchmark-item-icon {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

.benchmark-item.water .benchmark-item-icon {
  background: rgba(6, 182, 212, 0.15);
  color: var(--primary);
}

.benchmark-item-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.benchmark-item-sub {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

.benchmark-item-val {
  font-size: 15px;
  font-weight: 700;
}

.benchmark-item.elec .benchmark-item-val {
  color: var(--warning);
}

.benchmark-item.water .benchmark-item-val {
  color: var(--primary);
}

.benchmark-summary-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-subtle);
  align-items: center;
}

.bm-summary-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bm-lbl {
  font-size: 11px;
  color: var(--text-muted);
}

.bm-val {
  font-size: 12px;
  font-weight: 600;
}

/* Inline Benchmark Badges inside Form Card */
.prev-month-inline-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: var(--text-secondary);
}

.prev-month-inline-hint.water {
  background: rgba(6, 182, 212, 0.08);
  border-color: rgba(6, 182, 212, 0.25);
}

.prev-month-inline-hint i {
  width: 14px;
  height: 14px;
}

.prev-month-inline-hint strong {
  color: var(--text-main);
}

/* Calculator Live Preview Card */
.calculator-preview-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.preview-bill-header {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.preview-grand-total {
  background: var(--primary-gradient);
  border-radius: var(--radius-md);
  padding: 18px;
  color: #fff;
  text-align: center;
  box-shadow: 0 4px 20px var(--primary-glow);
}

.preview-grand-total .label {
  font-size: 13px;
  font-weight: 500;
  opacity: 0.9;
}

.preview-grand-total .amount {
  font-size: 28px;
  font-weight: 800;
  margin-top: 4px;
}

.preview-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
}

.preview-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-secondary);
}

.preview-row.total-row {
  font-weight: 700;
  color: var(--text-main);
  padding-top: 8px;
  border-top: 1px dashed var(--border-subtle);
}

/* Landlord Financial Breakdown in Calculator */
.preview-owner-financial-card {
  background: rgba(6, 182, 212, 0.05);
  border: 1px solid rgba(6, 182, 212, 0.22);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all var(--transition-fast);
}

.owner-financial-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  border-bottom: 1px dashed rgba(6, 182, 212, 0.2);
  padding-bottom: 6px;
}
.owner-financial-title i {
  width: 14px;
  height: 14px;
}

.owner-financial-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
}

.owner-fin-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.owner-fin-item .fin-label {
  color: var(--text-secondary);
}

.owner-fin-item.profit {
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  padding-top: 6px;
  margin-top: 2px;
}
[data-theme="light"] .owner-fin-item.profit {
  border-top-color: rgba(0, 0, 0, 0.1);
}

.owner-fin-item.profit .fin-label {
  font-weight: 700;
  color: var(--text-main);
}

/* Auto-bill badge in expenses table */
.badge-auto-bill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  margin-left: 4px;
  white-space: nowrap;
}
.badge-auto-bill i {
  width: 11px;
  height: 11px;
}
[data-theme="light"] .badge-auto-bill {
  background: rgba(217, 119, 6, 0.1);
  color: #b45309;
  border-color: rgba(217, 119, 6, 0.25);
}

.form-actions-row {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

/* --- Buttons --- */
.btn-primary {
  background: var(--primary-gradient);
  color: #fff;
  border: none;
  padding: 11px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 15px var(--primary-glow);
  transition: all var(--transition-fast);
}

.btn-primary:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition-fast);
}

.btn-secondary:hover {
  border-color: var(--primary);
}

.btn-success {
  background: var(--success);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary-sm, .btn-outline-sm {
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  transition: all var(--transition-fast);
}

.btn-primary-sm {
  background: var(--primary);
  color: #fff;
}

.btn-outline-sm {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
}

.btn-outline-sm:hover {
  border-color: var(--primary);
}

/* --- Rooms Directory Grid --- */
.rooms-directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 22px;
}

.room-directory-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.room-dir-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.room-dir-number {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--primary-gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 800;
}

.room-dir-info {
  flex: 1;
}

.room-dir-title {
  font-size: 16px;
  font-weight: 700;
}

.room-dir-sub {
  font-size: 12px;
  color: var(--text-secondary);
}

.tenant-profile-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

[data-theme="light"] .tenant-profile-box {
  background: rgba(0, 0, 0, 0.03);
}

.tenant-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: rgba(6, 182, 212, 0.15);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tenant-details {
  flex: 1;
  font-size: 12.5px;
}

.tenant-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.tenant-phone, .tenant-date {
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}

.tenant-phone i, .tenant-date i {
  width: 12px;
  height: 12px;
}

.room-specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  font-size: 12.5px;
  padding: 10px 0;
  border-top: 1px dashed var(--border-subtle);
  border-bottom: 1px dashed var(--border-subtle);
}

.spec-item {
  display: flex;
  justify-content: space-between;
}

.spec-label { color: var(--text-secondary); }
.spec-val { color: var(--text-main); }

.room-history-summary {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
}

.room-dir-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
}

/* --- Google Drive Sync Page --- */
.drive-sync-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
}

.guide-step-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 16px 0;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.guide-step-item {
  display: flex;
  gap: 12px;
}

.step-num {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.code-box {
  background: #090d16;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  font-family: monospace;
  font-size: 12px;
  color: #38bdf8;
  max-height: 200px;
  overflow-y: auto;
  position: relative;
}

/* --- Modal Dialogs --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 650px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  transform: scale(0.95);
  transition: transform 0.2s ease;
}

.modal-overlay.open .modal-container {
  transform: scale(1);
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 17px;
  font-weight: 700;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
}

.btn-close-modal:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

/* --- Contract PDF Upload & Badges --- */
.contract-upload-dropzone {
  border: 2px dashed rgba(6, 182, 212, 0.4);
  background: rgba(6, 182, 212, 0.04);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.contract-upload-dropzone:hover {
  border-color: var(--primary);
  background: rgba(6, 182, 212, 0.08);
}

.contract-file-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid var(--success-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}

.btn-contract-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.4);
  color: var(--primary);
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.btn-contract-badge:hover {
  background: var(--primary);
  color: #ffffff;
}

.btn-contract-empty {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed var(--border-subtle);
  color: var(--text-muted);
  border-radius: var(--radius-full);
  font-size: 10.5px;
  cursor: pointer;
}

.btn-contract-empty:hover {
  color: var(--text-main);
  border-color: var(--primary);
}

/* --- ID Card & Family Book Multi-Photo Upload --- */
.idcard-upload-dropzone {
  border: 2px dashed rgba(168, 85, 247, 0.4);
  background: rgba(168, 85, 247, 0.04);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.idcard-upload-dropzone:hover {
  border-color: #a855f7;
  background: rgba(168, 85, 247, 0.08);
}

.idcard-thumbnails-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.idcard-thumb-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.idcard-thumb-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border-color: #a855f7;
}

.idcard-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.idcard-thumb-delete {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.9);
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  font-size: 11px;
  transition: all var(--transition-fast);
  z-index: 2;
}

.idcard-thumb-delete:hover {
  background: #dc2626;
  transform: scale(1.15);
}

.idcard-thumb-number {
  position: absolute;
  bottom: 2px;
  left: 2px;
  background: rgba(0, 0, 0, 0.75);
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  pointer-events: none;
}

/* Badge for ID card in table and cards */
.btn-idcard-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #c084fc;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.btn-idcard-badge:hover {
  background: #a855f7;
  color: #ffffff;
}

/* --- Gallery Lightbox Modal --- */
.gallery-viewer-stage {
  position: relative;
  width: 100%;
  height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #090d16;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.gallery-main-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: opacity 0.2s ease;
  user-select: none;
}

.gallery-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  z-index: 5;
}

.gallery-nav-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-50%) scale(1.1);
}

.gallery-nav-btn.prev {
  left: 12px;
}

.gallery-nav-btn.next {
  right: 12px;
}

.gallery-counter-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 5;
}

.gallery-thumb-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 4px 4px 4px;
  max-width: 100%;
}

.gallery-thumb-strip::-webkit-scrollbar {
  height: 4px;
}

.gallery-thumb-strip::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
}

.gallery-thumb-img {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  cursor: pointer;
  opacity: 0.55;
  border: 2px solid transparent;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.gallery-thumb-img:hover {
  opacity: 0.85;
}

.gallery-thumb-img.active {
  opacity: 1;
  border-color: #a855f7;
  transform: scale(1.05);
}

/* Vacant styling additions */
.tenant-avatar.vacant {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-subtle);
  color: var(--text-muted);
}

/* --- Invoice Modal Specific --- */
.invoice-modal-container {
  max-width: 850px;
}

.invoice-modal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
  gap: 10px;
  flex-wrap: wrap;
}

/* ==========================================================================
   OFFICIAL INVOICE PAPER STYLES (MATCHING LAO FORMAT + LAO QR)
   ========================================================================== */
.invoice-paper {
  background: #ffffff;
  color: #1e293b;
  padding: 36px 40px;
  border-radius: 4px;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.15);
  font-family: 'Outfit', 'Noto Sans Lao', sans-serif;
  line-height: 1.4;
}

.lao-national-header {
  text-align: center;
  margin-bottom: 16px;
}

.gov-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.gov-sub {
  font-size: 12.5px;
  color: #475569;
  font-weight: 500;
}

.header-divider {
  width: 140px;
  height: 2px;
  background: #0284c7;
  margin: 6px auto 0;
}

.invoice-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-top: 14px;
  padding-bottom: 14px;
  border-bottom: 2px solid #e2e8f0;
}

.company-name {
  font-size: 18px;
  font-weight: 800;
  color: #0369a1;
}

.company-address, .company-contact {
  font-size: 12.5px;
  color: #475569;
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.company-address i, .company-contact i {
  width: 14px;
  height: 14px;
  color: #0284c7;
}

.invoice-title-block {
  text-align: right;
}

.invoice-main-title {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.5px;
}

.invoice-sub-title {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 1px;
}

.invoice-meta-box {
  margin-top: 8px;
  font-size: 12px;
  color: #334155;
  background: #f8fafc;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.invoice-customer-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 16px 20px;
  margin: 18px 0;
}

.customer-label {
  font-size: 11.5px;
  font-weight: 700;
  color: #0284c7;
  text-transform: uppercase;
}

.customer-name {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  margin: 2px 0;
}

.room-highlight-box {
  text-align: center;
  background: #e0f2fe;
  padding: 8px 18px;
  border-radius: 8px;
  border: 1px solid #bae6fd;
}

.room-label {
  font-size: 11px;
  font-weight: 600;
  color: #0369a1;
}

.room-big-no {
  font-size: 20px;
  font-weight: 800;
  color: #0284c7;
}

.period-label {
  font-size: 11px;
  color: #475569;
  font-weight: 600;
}

.invoice-stamp {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.invoice-stamp.paid {
  background: #dcfce7;
  color: #15803d;
  border: 2px solid #86efac;
}

.invoice-stamp.pending {
  background: #fef3c7;
  color: #b45309;
  border: 2px solid #fde68a;
}

/* Invoice Line Items Table */
.invoice-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  font-size: 13px;
}

.invoice-table th {
  background: #0f172a;
  color: #ffffff;
  padding: 10px 12px;
  font-weight: 600;
  font-size: 12px;
}

.invoice-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  color: #1e293b;
}

.invoice-table tbody tr:nth-child(even) {
  background: #f8fafc;
}

.item-sub {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 2px;
}

.badge-unit {
  background: #e2e8f0;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 600;
}

.grand-total-row td {
  background: #0f172a !important;
  color: #ffffff !important;
  padding: 14px 16px;
}

.total-words {
  font-size: 14px;
}

.grand-price {
  font-size: 20px;
  font-weight: 800;
  color: #38bdf8;
}

/* Invoice Bottom Section (LAO QR + Terms & Signatures) */
.invoice-bottom-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
  margin-top: 14px;
}

.payment-qr-card {
  background: #f8fafc;
  border: 2px dashed #0284c7;
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}

.qr-badge {
  display: inline-block;
  background: #0284c7;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
}

.qr-sub {
  font-size: 10px;
  color: #64748b;
  margin-top: 2px;
}

.qr-wrapper {
  margin: 10px auto;
  width: 190px;
  height: 215px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.lao-qr-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qr-note {
  font-size: 10.5px;
  color: #334155;
  line-height: 1.3;
}

.terms-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 11.5px;
  color: #475569;
}

.terms-card h4 {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 6px;
}

.terms-card ul {
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.signatures-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 24px;
}

.signature-box {
  text-align: center;
  font-size: 12px;
  color: #475569;
}

.sign-space {
  height: 55px;
  border-bottom: 1px dotted #94a3b8;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 4px;
}

.owner-name-sign, .tenant-name-sign {
  font-weight: 600;
  color: #0f172a;
}

.sign-date {
  font-size: 11px;
  margin-top: 4px;
  color: #94a3b8;
}

.invoice-footer {
  text-align: center;
  margin-top: 20px;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
  font-size: 11px;
  color: #94a3b8;
}

/* --- Toast Notifications --- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast-item {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-main);
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transform: translateX(100%);
  opacity: 0;
  transition: all 0.3s ease;
}

.toast-item.show {
  transform: translateX(0);
  opacity: 1;
}

.toast-item.toast-success { border-left-color: var(--success); }
.toast-item.toast-error { border-left-color: var(--danger); }
.toast-item i { width: 18px; height: 18px; flex-shrink: 0; }
.toast-item.toast-success i { color: var(--success); }
.toast-item.toast-error i { color: var(--danger); }

/* --- Mobile Top App Header --- */
.mobile-top-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px 16px;
  background: var(--bg-sidebar);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 850;
  width: 100%;
}

.mobile-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-brand-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(6, 182, 212, 0.3);
}

.mobile-brand-icon i {
  width: 19px;
  height: 19px;
}

.mobile-brand-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.2px;
}

.mobile-brand-sub {
  font-size: 10.5px;
  color: var(--primary);
  font-weight: 500;
}

.mobile-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-sync-btn, .mobile-theme-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.mobile-sync-btn {
  color: var(--primary);
}

.mobile-sync-btn:active, .mobile-theme-btn:active {
  transform: scale(0.92);
  background: rgba(6, 182, 212, 0.15);
}

/* --- Mobile Bottom Navigation --- */
.mobile-nav-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-sidebar);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-top: 1px solid var(--border-subtle);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
  z-index: 900;
  justify-content: space-around;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.mobile-nav-bar::-webkit-scrollbar {
  display: none;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 4px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  min-width: 44px;
  flex: 1 1 0;
  -webkit-tap-highlight-color: transparent;
}

.mobile-nav-item.highlight {
  color: var(--primary);
  font-weight: 700;
}

.mobile-nav-item.highlight i {
  color: var(--primary);
  transform: scale(1.1);
}

.mobile-form-actions {
  display: none;
}

.mobile-nav-item i {
  width: 19px;
  height: 19px;
  transition: transform 0.2s ease;
}

.mobile-nav-item:active {
  transform: scale(0.92);
}

.mobile-nav-item.active {
  color: var(--primary);
  font-weight: 700;
  background: rgba(6, 182, 212, 0.12);
}

.mobile-nav-item.active i {
  transform: translateY(-1px);
}

.mobile-nav-item.highlight {
  color: #ffffff;
  background: var(--primary-gradient);
  border-radius: var(--radius-md);
  box-shadow: 0 2px 10px rgba(6, 182, 212, 0.4);
}

.mobile-nav-item.highlight span {
  font-weight: 700;
}

/* --- Utilities & Helpers --- */
.text-primary { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger { color: var(--danger) !important; }
.text-muted { color: var(--text-muted) !important; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-mono { font-family: monospace; }
.spin { animation: spin 1s linear infinite; }

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   PRINT MEDIA QUERIES (CLEAN INVOICE PRINTING)
   ========================================================================== */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  .sidebar, .top-header, .mobile-top-header, .mobile-nav-bar, .modal-header, .invoice-modal-toolbar, .btn-modal-action, .toast-container {
    display: none !important;
  }

  .main-wrapper {
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
  }

  .modal-overlay {
    position: static !important;
    background: transparent !important;
    padding: 0 !important;
  }

  .modal-container {
    border: none !important;
    box-shadow: none !important;
    max-width: 100% !important;
    background: #ffffff !important;
  }

  .modal-body {
    padding: 0 !important;
    overflow: visible !important;
  }

  .invoice-paper {
    box-shadow: none !important;
    padding: 0 !important;
  }
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (iOS & ANDROID ENHANCEMENTS)
   ========================================================================== */
@media (max-width: 1024px) {
  .charts-grid, .secondary-charts-grid, .billing-layout-grid, .drive-sync-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar {
    display: none;
  }
  
  .mobile-top-header {
    display: flex;
  }

  .top-header {
    display: none;
  }

  .main-wrapper {
    margin-left: 0;
    padding: 0 0 calc(85px + env(safe-area-inset-bottom, 0px)) 0;
  }

  .content-section {
    padding: 14px 12px;
  }

  .mobile-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
  }

  .mobile-nav-bar {
    display: flex;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .kpi-card {
    padding: 14px 12px;
  }

  .kpi-value {
    font-size: 17px;
  }

  .kpi-title {
    font-size: 11.5px;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .filter-group {
    flex-wrap: wrap;
    width: 100%;
  }

  .filter-select, .form-input, .form-select {
    font-size: 16px !important; /* Prevents auto-zoom on iOS Safari */
  }

  .form-group-grid {
    grid-template-columns: 1fr;
  }

  .rooms-quick-grid {
    grid-template-columns: 1fr;
  }

  .rooms-directory-grid {
    grid-template-columns: 1fr;
  }

  /* Bottom sheet style modal on phones */
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .modal-container {
    width: 100%;
    max-width: 100%;
    border-radius: 20px 20px 0 0;
    max-height: 92vh;
    animation: slideUp 0.3s ease;
  }

  @keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }

  .invoice-modal-container {
    max-height: 95vh;
  }

  .invoice-modal-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .invoice-modal-toolbar > div {
    width: 100%;
  }

  .invoice-bottom-grid {
    grid-template-columns: 1fr;
  }

  .invoice-paper {
    padding: 18px 12px;
  }

  .invoice-top-row {
    flex-direction: column;
    gap: 14px;
  }

  .invoice-title-block {
    text-align: left;
  }

  .invoice-meta-box {
    margin-left: 0;
  }

  .invoice-customer-box {
    flex-direction: column;
    gap: 12px;
  }

  .room-highlight-box {
    text-align: left;
  }

  .signatures-row {
    flex-direction: column;
    gap: 20px;
  }

  .table-wrapper {
    -webkit-overflow-scrolling: touch;
    overflow-x: auto;
  }

  .data-table th, .data-table td {
    padding: 10px 8px;
    font-size: 12.5px;
  }
}

@media (max-width: 480px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   ROOM TYPE TAG & QUICK EDIT MODAL
   ========================================================================== */
.room-type-tag-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-sm);
  padding: 2.5px 8px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 3px;
  text-align: left;
  line-height: 1.3;
}

[data-theme="light"] .room-type-tag-btn {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.18);
  color: #475569;
}

.room-type-tag-btn:hover {
  background: rgba(6, 182, 212, 0.12);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.room-type-tag-btn .edit-pen-icon {
  width: 11px;
  height: 11px;
  opacity: 0.55;
  transition: opacity 0.2s;
  flex-shrink: 0;
}

.room-type-tag-btn:hover .edit-pen-icon {
  opacity: 1;
  color: var(--primary);
}

/* Preset Chips for Room Type Modal */
.preset-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  padding: 5px 12px;
  font-size: 12px;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

[data-theme="light"] .preset-chip {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #334155;
}

.preset-chip:hover {
  background: rgba(6, 182, 212, 0.2);
  border-color: var(--primary);
  color: var(--primary);
  transform: scale(1.03);
}

.preset-chip:active {
  transform: scale(0.97);
}

/* Dual Month Selector Group */
.month-selector-group {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
}

@media (max-width: 640px) {
  .month-selector-group {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ==========================================================================
   STATISTIC SCREEN LIGHT MODE (MATCHING USER'S ATTACHED DESIGN REFERENCE)
   Strictly Scoped to [data-theme="light"] - Dark Mode Remains 100% Intact
   ========================================================================== */

/* --- 1. Global App Body & Layout --- */
[data-theme="light"] body {
  background-color: #f0f4f9 !important;
  background-image: none !important;
  color: #0f172a !important;
}

[data-theme="light"] .main-wrapper {
  background-color: transparent !important;
}

/* --- 2. Royal Blue Sidebar Navigation --- */
[data-theme="light"] .sidebar {
  background: linear-gradient(180deg, #0d5db8 0%, #0a4c99 50%, #083b79 100%) !important;
  border-right: none !important;
  box-shadow: 4px 0 24px rgba(10, 76, 153, 0.15) !important;
}

[data-theme="light"] .brand-container {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
  padding-bottom: 20px !important;
  margin-bottom: 22px !important;
}

[data-theme="light"] .brand-icon-box {
  background: #052449 !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22) !important;
}

[data-theme="light"] .brand-icon-box i {
  color: #ef4444 !important; /* Coral red logo icon from mockup */
}

[data-theme="light"] .brand-text-block h2 {
  color: #ffffff !important;
  font-weight: 800 !important;
}

[data-theme="light"] .brand-text-block p {
  color: #93c5fd !important;
  font-weight: 600 !important;
}

/* Navigation label badge (Mockup "NAVIGATION <") */
.sidebar-collapse-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  color: rgba(255, 255, 255, 0.7);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  background: rgba(255, 255, 255, 0.08);
  padding: 3px 8px;
  border-radius: 6px;
}

.sidebar-collapse-badge i {
  width: 12px;
  height: 12px;
}

/* Sidebar Nav Items (Inactive) */
[data-theme="light"] .nav-item {
  color: rgba(255, 255, 255, 0.86) !important;
  border-radius: 12px !important;
  margin: 3px 0 !important;
  font-weight: 600 !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

[data-theme="light"] .nav-item i {
  color: rgba(255, 255, 255, 0.88) !important;
}

[data-theme="light"] .nav-item:hover {
  background: rgba(255, 255, 255, 0.14) !important;
  color: #ffffff !important;
  transform: translateX(3px) !important;
}

[data-theme="light"] .nav-item:hover i {
  color: #ffffff !important;
}

/* Active Nav Item - The Signature Floating Pure White Pill Card */
[data-theme="light"] .nav-item.active {
  background: #ffffff !important;
  color: #0b5ed7 !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.16), 0 2px 4px rgba(0, 0, 0, 0.08) !important;
  font-weight: 700 !important;
  transform: translateX(4px) !important;
}

[data-theme="light"] .nav-item.active i {
  color: #0b5ed7 !important;
}

/* Nav Item Counter Badge (Mockup red counter like MENU POINT 5) */
.nav-counter-badge {
  margin-left: auto;
  background: #ef4444;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 9999px;
  padding: 2px 7px;
  line-height: 1.2;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
}

/* Sidebar Footer in Light Mode */
[data-theme="light"] .sidebar-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
}

[data-theme="light"] .theme-toggle-btn {
  background: rgba(255, 255, 255, 0.12) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
  border-radius: 12px !important;
}

[data-theme="light"] .theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.22) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
}

[data-theme="light"] .theme-toggle-btn i {
  color: #fde047 !important; /* Yellow sun/moon icon */
}

[data-theme="light"] .owner-pill {
  background: rgba(0, 0, 0, 0.2) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 12px !important;
}

[data-theme="light"] .owner-pill div div:first-child {
  color: #ffffff !important;
}

[data-theme="light"] .owner-pill div div:last-child {
  color: #93c5fd !important;
}

[data-theme="light"] .owner-avatar {
  background: #ffffff !important;
  color: #0b5ed7 !important;
  font-weight: 800 !important;
}

/* --- 3. Top Header Bar & Mockup Action Widgets --- */
[data-theme="light"] .top-header {
  margin-bottom: 24px !important;
}

[data-theme="light"] .header-left h1 {
  color: #0f172a !important;
  font-size: 26px !important;
  font-weight: 800 !important;
  letter-spacing: -0.5px !important;
}

[data-theme="light"] .header-left p {
  color: #64748b !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
}

/* Header Pills (Indicators for, Clock, Notif, Profile) */
.header-indicator-pill,
.header-clock-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 9999px;
  font-size: 12.5px;
  font-weight: 600;
  transition: all 0.2s ease;
}

[data-theme="light"] .header-indicator-pill {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  color: #475569 !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04) !important;
}

[data-theme="light"] .header-indicator-pill i {
  color: #0b5ed7 !important;
  width: 15px;
  height: 15px;
}

[data-theme="light"] .header-clock-pill {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04) !important;
  font-weight: 800 !important;
  font-size: 14px !important;
  letter-spacing: 0.5px !important;
}

[data-theme="light"] .header-clock-pill i {
  color: #64748b !important;
  width: 15px;
  height: 15px;
}

.header-icon-btn,
.header-profile-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  position: relative;
  transition: all 0.2s ease;
}

[data-theme="light"] .header-icon-btn,
[data-theme="light"] .header-profile-btn {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  color: #475569 !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04) !important;
}

[data-theme="light"] .header-icon-btn:hover,
[data-theme="light"] .header-profile-btn:hover {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  transform: translateY(-1px) !important;
}

[data-theme="light"] .header-profile-btn {
  color: #0b5ed7 !important;
}

.notification-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  position: absolute;
  top: 7px;
  right: 7px;
  border: 2px solid #ffffff;
}

[data-theme="light"] .cloud-status-badge {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  color: #334155 !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04) !important;
  font-weight: 600 !important;
}

/* Primary Header Action Button (Red Pill Button from Mockup "Show") */
[data-theme="light"] .top-header .btn-primary,
[data-theme="light"] .btn-header-action {
  background: linear-gradient(135deg, #e53935 0%, #c62828 100%) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 9999px !important;
  padding: 9px 22px !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 16px rgba(229, 57, 53, 0.35) !important;
  transition: all 0.2s ease !important;
}

[data-theme="light"] .top-header .btn-primary:hover,
[data-theme="light"] .btn-header-action:hover {
  background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%) !important;
  box-shadow: 0 6px 20px rgba(229, 57, 53, 0.45) !important;
  transform: translateY(-1px) !important;
}

/* --- 4. Mockup "DATA IN NUMBERS" Progress Strip --- */
.data-numbers-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  padding: 12px 20px;
  border-radius: 14px;
  transition: all 0.2s ease;
  flex-wrap: wrap;
  gap: 12px;
}

[data-theme="light"] .data-numbers-banner {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03) !important;
}

.banner-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.banner-tag {
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.banner-date {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  background: #f1f5f9;
  padding: 3px 10px;
  border-radius: 6px;
}

.banner-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.banner-label {
  font-size: 12.5px;
  color: #64748b;
  font-weight: 600;
}

.banner-pct {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
}

.banner-bar-track {
  width: 140px;
  height: 8px;
  background: #e2e8f0;
  border-radius: 9999px;
  overflow: hidden;
}

.banner-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #0b5ed7, #06b6d4);
  border-radius: 9999px;
  transition: width 0.4s ease;
}

/* --- 5. The Top 4 (+1) Colored KPI Summary Cards ("Analytics characteristic") --- */
[data-theme="light"] .kpi-grid {
  gap: 18px !important;
  margin-bottom: 28px !important;
}

[data-theme="light"] .kpi-card {
  border: none !important;
  border-radius: 16px !important;
  padding: 22px 24px !important;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease !important;
}

[data-theme="light"] .kpi-card::before {
  display: none !important; /* Hide line accent in favor of solid gradient */
}

[data-theme="light"] .kpi-card:hover {
  transform: translateY(-3px) !important;
}

/* Card Sequence via CSS Order matching Mockup Layout */
[data-theme="light"] .kpi-card.pending { order: 1; }
[data-theme="light"] .kpi-card.occupancy { order: 2; }
[data-theme="light"] .kpi-card.income { order: 3; }
[data-theme="light"] .kpi-card.expense { order: 4; }
[data-theme="light"] .kpi-card.profit { order: 5; }

/* 1. Card 1 (Left): Vibrant Crimson Red Gradient (Pending / Debt) */
[data-theme="light"] .kpi-card.pending {
  background: linear-gradient(135deg, #e53935 0%, #c62828 100%) !important;
  box-shadow: 0 10px 24px rgba(229, 57, 53, 0.28) !important;
}

/* 2. Card 2: Deep Royal Navy Blue Gradient (Occupancy / Rooms) */
[data-theme="light"] .kpi-card.occupancy {
  background: linear-gradient(135deg, #0d47a1 0%, #082d64 100%) !important;
  box-shadow: 0 10px 24px rgba(13, 71, 161, 0.28) !important;
}

/* 3. Card 3: Sky Blue / Azure Gradient (Total Revenue) */
[data-theme="light"] .kpi-card.income {
  background: linear-gradient(135deg, #0288d1 0%, #01579b 100%) !important;
  box-shadow: 0 10px 24px rgba(2, 136, 209, 0.28) !important;
}

/* 4. Card 4: Slate Gray / Steel Gradient (Total Expenses) */
[data-theme="light"] .kpi-card.expense {
  background: linear-gradient(135deg, #64748b 0%, #475569 100%) !important;
  box-shadow: 0 10px 24px rgba(100, 116, 139, 0.24) !important;
}

/* 5. Card 5: Emerald Green Gradient (Net Profit) */
[data-theme="light"] .kpi-card.profit {
  background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
  box-shadow: 0 10px 24px rgba(5, 150, 105, 0.26) !important;
}

/* KPI Card Text & Numeric Values (White on Bold Gradients) */
[data-theme="light"] .kpi-card .kpi-title {
  color: rgba(255, 255, 255, 0.92) !important;
  font-weight: 700 !important;
  font-size: 13px !important;
}

[data-theme="light"] .kpi-card .kpi-value,
[data-theme="light"] .kpi-card .kpi-value.text-primary,
[data-theme="light"] .kpi-card .kpi-value.text-warning,
[data-theme="light"] .kpi-card .kpi-value.text-danger,
[data-theme="light"] .kpi-card .kpi-value.text-success {
  color: #ffffff !important;
  font-weight: 800 !important;
  font-size: 26px !important;
  letter-spacing: -0.5px !important;
}

[data-theme="light"] .kpi-card .kpi-subtext {
  color: rgba(255, 255, 255, 0.85) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
}

/* Translucent Icon Tiles inside Colored KPI Cards */
[data-theme="light"] .kpi-card .kpi-icon {
  background: rgba(255, 255, 255, 0.22) !important;
  color: #ffffff !important;
  border-radius: 12px !important;
  width: 40px !important;
  height: 40px !important;
}

[data-theme="light"] .kpi-card .kpi-icon i {
  color: #ffffff !important;
}

/* --- 6. Mockup "Effectivity indicators" Row --- */
.effectivity-section {
  margin-bottom: 28px;
}

.effectivity-header {
  margin-bottom: 14px;
}

.effectivity-title {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
}

.effectivity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.effectivity-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px 14px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.effectivity-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.eff-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.eff-icon.blue { background: #eff6ff; color: #0b5ed7; }
.eff-icon.green { background: #ecfdf5; color: #059669; }
.eff-icon.red { background: #fef2f2; color: #dc2626; }
.eff-icon.amber { background: #fffbeb; color: #d97706; }
.eff-icon.purple { background: #f5f3ff; color: #7c3aed; }

.eff-val {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.5px;
}

.eff-sub {
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
}

/* --- 7. Filter Bar in Light Mode (Mockup Rounded Pills) --- */
[data-theme="light"] .filter-bar {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  box-shadow: 0 3px 14px rgba(15, 23, 42, 0.04) !important;
  padding: 14px 20px !important;
}

[data-theme="light"] .filter-select {
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 9999px !important;
  color: #1e293b !important;
  padding: 7px 18px !important;
  font-weight: 600 !important;
}

[data-theme="light"] .filter-label {
  color: #475569 !important;
  font-weight: 700 !important;
}

[data-theme="light"] .btn-primary-sm {
  background: #0b5ed7 !important;
  border-radius: 9999px !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  box-shadow: 0 3px 10px rgba(11, 94, 215, 0.25) !important;
}

[data-theme="light"] .btn-outline-sm {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 9999px !important;
  color: #334155 !important;
  font-weight: 600 !important;
}

/* --- 8. 5 Rooms Quick Status Grid in Light Mode --- */
[data-theme="light"] .room-quick-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04) !important;
}

[data-theme="light"] .room-quick-card:hover {
  border-color: #0b5ed7 !important;
  box-shadow: 0 8px 24px rgba(11, 94, 215, 0.12) !important;
  transform: translateY(-2px) !important;
}

[data-theme="light"] .room-icon-box {
  background: #eff6ff !important;
  color: #0b5ed7 !important;
  border-radius: 12px !important;
  font-weight: 800 !important;
  font-size: 15px !important;
}

[data-theme="light"] .room-title {
  color: #0f172a !important;
  font-weight: 700 !important;
}

[data-theme="light"] .room-sub {
  color: #64748b !important;
}

[data-theme="light"] .room-card-body {
  border-top-color: #f1f5f9 !important;
  border-bottom-color: #f1f5f9 !important;
}

[data-theme="light"] .stat-label {
  color: #64748b !important;
}

[data-theme="light"] .stat-val {
  color: #0f172a !important;
}

[data-theme="light"] .btn-card-icon {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #64748b !important;
  border-radius: 10px !important;
}

[data-theme="light"] .btn-card-icon:hover {
  color: #0b5ed7 !important;
  border-color: #0b5ed7 !important;
}

/* --- 9. Charts Grid in Light Mode --- */
[data-theme="light"] .chart-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04) !important;
}

[data-theme="light"] .chart-title {
  color: #0f172a !important;
  font-weight: 700 !important;
}

/* --- 10. Tables (Statistic Screen & Bottom Data Records Screen) --- */
[data-theme="light"] .table-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04) !important;
}

[data-theme="light"] .table-header-row {
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .data-table th {
  background: #f8fafc !important;
  color: #64748b !important;
  font-weight: 700 !important;
  font-size: 12.5px !important;
  border-bottom: 1px solid #e2e8f0 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.3px !important;
}

[data-theme="light"] .data-table td {
  border-bottom: 1px solid #f1f5f9 !important;
  color: #1e293b !important;
}

[data-theme="light"] .data-table tbody tr:hover {
  background: #f8fafc !important;
}

/* Status Badges */
[data-theme="light"] .badge-status.paid,
[data-theme="light"] .room-pill.paid {
  background: #ecfdf5 !important;
  color: #059669 !important;
  border: 1px solid #a7f3d0 !important;
  border-radius: 9999px !important;
  font-weight: 700 !important;
}

[data-theme="light"] .badge-status.pending,
[data-theme="light"] .room-pill.pending {
  background: #fef2f2 !important;
  color: #dc2626 !important;
  border: 1px solid #fecaca !important;
  border-radius: 9999px !important;
  font-weight: 700 !important;
}

[data-theme="light"] .room-pill.unbilled {
  background: #fffbeb !important;
  color: #b45309 !important;
  border: 1px solid #fde68a !important;
  border-radius: 9999px !important;
  font-weight: 700 !important;
}

[data-theme="light"] .room-pill.vacant {
  background: #f8fafc !important;
  color: #64748b !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 9999px !important;
  font-weight: 700 !important;
}

[data-theme="light"] .room-pill-badge {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  border: 1px solid #bfdbfe !important;
  border-radius: 9999px !important;
  font-weight: 700 !important;
}

/* --- 11. Modals, Forms & Mobile Header --- */
[data-theme="light"] .modal-content,
[data-theme="light"] .modal-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.16) !important;
}

[data-theme="light"] .form-input,
[data-theme="light"] .form-select,
[data-theme="light"] .form-textarea {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
  border-radius: 10px !important;
}

[data-theme="light"] .form-input:focus,
[data-theme="light"] .form-select:focus,
[data-theme="light"] .form-textarea:focus {
  border-color: #0b5ed7 !important;
  box-shadow: 0 0 0 3px rgba(11, 94, 215, 0.15) !important;
}

[data-theme="light"] .form-label {
  color: #334155 !important;
  font-weight: 600 !important;
}

[data-theme="light"] .mobile-top-header {
  background: #0d5db8 !important;
  color: #ffffff !important;
  border-bottom: none !important;
}

/* ==========================================================================
   DEEP OBSIDIAN & SAPPHIRE SHADING SYSTEM (DARK MODE)
   Ultra-modern, sleek & luxurious shading across all screens & components
   ========================================================================== */

/* --- 1. Global App Body & Layout (Dark Mode) --- */
[data-theme="dark"] body {
  background-color: #070a13 !important;
  background-image: 
    radial-gradient(ellipse 90% 50% at 50% -15%, rgba(30, 58, 138, 0.28), transparent 70%),
    radial-gradient(ellipse 60% 40% at 90% 15%, rgba(14, 165, 233, 0.15), transparent 60%),
    radial-gradient(ellipse 50% 35% at 5% 75%, rgba(99, 102, 241, 0.09), transparent 60%),
    linear-gradient(180deg, #070a13 0%, #0a0f1e 50%, #060912 100%) !important;
  background-attachment: fixed !important;
  color: #f1f5f9 !important;
}

[data-theme="dark"] .main-wrapper {
  background-color: transparent !important;
}

/* Custom Sleek Dark Scrollbar */
[data-theme="dark"] ::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
[data-theme="dark"] ::-webkit-scrollbar-track {
  background: #070a13;
}
[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: rgba(30, 58, 138, 0.45);
  border-radius: 9999px;
  border: 2px solid #070a13;
}
[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: #0284c7;
}

/* --- 2. Midnight & Deep Sapphire Sidebar Navigation --- */
[data-theme="dark"] .sidebar {
  background: linear-gradient(180deg, #090e1a 0%, #0c1324 50%, #070a14 100%) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 6px 0 32px rgba(0, 0, 0, 0.55), inset -1px 0 0 rgba(255, 255, 255, 0.03) !important;
}

[data-theme="dark"] .brand-container {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  padding-bottom: 20px !important;
  margin-bottom: 22px !important;
}

[data-theme="dark"] .brand-icon-box {
  background: linear-gradient(135deg, #1e40af 0%, #0284c7 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  box-shadow: 0 4px 18px rgba(2, 132, 199, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
}

[data-theme="dark"] .brand-icon-box i {
  color: #ffffff !important;
}

[data-theme="dark"] .brand-text-block h2 {
  color: #ffffff !important;
  font-weight: 800 !important;
  letter-spacing: -0.3px !important;
}

[data-theme="dark"] .brand-text-block p {
  color: #38bdf8 !important;
  font-weight: 600 !important;
}

[data-theme="dark"] .sidebar-collapse-badge {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #94a3b8 !important;
}

/* Sidebar Nav Items (Inactive) */
[data-theme="dark"] .nav-item {
  color: rgba(255, 255, 255, 0.78) !important;
  border-radius: 12px !important;
  margin: 3px 0 !important;
  font-weight: 600 !important;
  border: 1px solid transparent !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

[data-theme="dark"] .nav-item i {
  color: rgba(255, 255, 255, 0.75) !important;
  transition: color 0.2s ease !important;
}

[data-theme="dark"] .nav-item:hover {
  background: linear-gradient(90deg, rgba(30, 58, 138, 0.32) 0%, rgba(14, 165, 233, 0.1) 100%) !important;
  border-color: rgba(56, 189, 248, 0.22) !important;
  color: #ffffff !important;
  transform: translateX(3px) !important;
}

[data-theme="dark"] .nav-item:hover i {
  color: #38bdf8 !important;
}

/* Active Nav Item - Sapphire Floating Glass Pill with Shading Glow */
[data-theme="dark"] .nav-item.active {
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 50%, #1e40af 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 6px 22px rgba(37, 99, 235, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
  border: 1px solid rgba(147, 197, 253, 0.35) !important;
  font-weight: 700 !important;
  transform: translateX(4px) !important;
}

[data-theme="dark"] .nav-item.active i {
  color: #ffffff !important;
}

[data-theme="dark"] .nav-counter-badge {
  background: #ef4444 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.5) !important;
}

/* Sidebar Footer in Dark Mode */
[data-theme="dark"] .sidebar-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .theme-toggle-btn {
  background: linear-gradient(145deg, rgba(22, 34, 58, 0.8) 0%, rgba(12, 19, 34, 0.9) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
  border-radius: 12px !important;
}

[data-theme="dark"] .theme-toggle-btn:hover {
  border-color: rgba(56, 189, 248, 0.4) !important;
  box-shadow: 0 4px 16px rgba(14, 165, 233, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

[data-theme="dark"] .theme-toggle-btn i {
  color: #fde047 !important;
}

[data-theme="dark"] .owner-pill {
  background: linear-gradient(145deg, rgba(16, 25, 45, 0.75) 0%, rgba(9, 14, 26, 0.85) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
  border-radius: 12px !important;
}

[data-theme="dark"] .owner-pill div div:first-child {
  color: #ffffff !important;
}

[data-theme="dark"] .owner-pill div div:last-child {
  color: #38bdf8 !important;
}

[data-theme="dark"] .owner-avatar {
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.4) !important;
}

/* --- 3. Top Header Bar & Shaded Widgets (Dark Mode) --- */
[data-theme="dark"] .top-header {
  margin-bottom: 24px !important;
}

[data-theme="dark"] .header-left h1 {
  color: #f8fafc !important;
  font-size: 26px !important;
  font-weight: 800 !important;
  letter-spacing: -0.5px !important;
}

[data-theme="dark"] .header-left p {
  color: #94a3b8 !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
}

[data-theme="dark"] .header-indicator-pill,
[data-theme="dark"] .header-clock-pill,
[data-theme="dark"] .header-icon-btn,
[data-theme="dark"] .header-profile-btn,
[data-theme="dark"] .cloud-status-badge {
  background: linear-gradient(145deg, rgba(20, 31, 54, 0.85) 0%, rgba(11, 18, 33, 0.95) 100%) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #cbd5e1 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
}

[data-theme="dark"] .header-indicator-pill i {
  color: #38bdf8 !important;
}

[data-theme="dark"] .header-clock-pill {
  color: #f8fafc !important;
  font-weight: 800 !important;
  font-size: 14px !important;
  letter-spacing: 0.5px !important;
}

[data-theme="dark"] .header-clock-pill i {
  color: #94a3b8 !important;
}

[data-theme="dark"] .header-icon-btn:hover,
[data-theme="dark"] .header-profile-btn:hover {
  background: linear-gradient(145deg, rgba(28, 43, 75, 0.9) 0%, rgba(15, 25, 46, 0.98) 100%) !important;
  border-color: rgba(56, 189, 248, 0.35) !important;
  box-shadow: 0 6px 18px rgba(14, 165, 233, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  transform: translateY(-1px) !important;
}

[data-theme="dark"] .header-profile-btn {
  color: #38bdf8 !important;
}

[data-theme="dark"] .cloud-status-badge {
  font-weight: 600 !important;
}

/* Primary Header Action Button (Coral-Ruby Pill with Shading Glow) */
[data-theme="dark"] .top-header .btn-primary,
[data-theme="dark"] .btn-header-action {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(254, 202, 202, 0.25) !important;
  border-radius: 9999px !important;
  padding: 9px 22px !important;
  font-weight: 700 !important;
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

[data-theme="dark"] .top-header .btn-primary:hover,
[data-theme="dark"] .btn-header-action:hover {
  background: linear-gradient(135deg, #f87171 0%, #ef4444 50%, #dc2626 100%) !important;
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
  transform: translateY(-2px) !important;
}

/* --- 4. "DATA IN NUMBERS" Progress Strip (Dark Mode) --- */
[data-theme="dark"] .data-numbers-banner {
  background: linear-gradient(145deg, rgba(19, 29, 52, 0.85) 0%, rgba(10, 16, 30, 0.95) 100%) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
  border-radius: 16px !important;
}

[data-theme="dark"] .banner-tag {
  color: #f8fafc !important;
}

[data-theme="dark"] .banner-date {
  color: #94a3b8 !important;
  background: linear-gradient(180deg, #0d1526 0%, #111a30 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .banner-label {
  color: #94a3b8 !important;
}

[data-theme="dark"] .banner-pct {
  color: #f8fafc !important;
}

[data-theme="dark"] .banner-bar-track {
  background: rgba(0, 0, 0, 0.4) !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4) !important;
}

[data-theme="dark"] .banner-bar-fill {
  background: linear-gradient(90deg, #2563eb 0%, #06b6d4 50%, #10b981 100%) !important;
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.5) !important;
}

/* --- 5. The Top 5 Jewel-Tone KPI Summary Cards (Deep Shading) --- */
[data-theme="dark"] .kpi-grid {
  gap: 18px !important;
  margin-bottom: 28px !important;
}

[data-theme="dark"] .kpi-card {
  border-radius: 16px !important;
  padding: 22px 24px !important;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease !important;
  position: relative !important;
  overflow: hidden !important;
}

[data-theme="dark"] .kpi-card::before {
  display: none !important;
}

[data-theme="dark"] .kpi-card:hover {
  transform: translateY(-4px) !important;
}

/* Card Sequence via CSS Order matching Layout */
[data-theme="dark"] .kpi-card.pending { order: 1; }
[data-theme="dark"] .kpi-card.occupancy { order: 2; }
[data-theme="dark"] .kpi-card.income { order: 3; }
[data-theme="dark"] .kpi-card.expense { order: 4; }
[data-theme="dark"] .kpi-card.profit { order: 5; }

/* 1. Card 1 (Left): Deep Ruby Crimson Shading (Pending / Debt) */
[data-theme="dark"] .kpi-card.pending {
  background: linear-gradient(140deg, #dc2626 0%, #b91c1c 45%, #7f1d1d 100%) !important;
  box-shadow: 0 12px 28px rgba(185, 28, 28, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
  border: 1px solid rgba(248, 113, 113, 0.35) !important;
}
[data-theme="dark"] .kpi-card.pending:hover {
  box-shadow: 0 16px 36px rgba(185, 28, 28, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.45) !important;
}

/* 2. Card 2: Deep Royal Sapphire Shading (Occupancy / Rooms) */
[data-theme="dark"] .kpi-card.occupancy {
  background: linear-gradient(140deg, #1d4ed8 0%, #1e3a8a 50%, #0f172a 100%) !important;
  box-shadow: 0 12px 28px rgba(29, 78, 216, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
  border: 1px solid rgba(96, 165, 250, 0.35) !important;
}
[data-theme="dark"] .kpi-card.occupancy:hover {
  box-shadow: 0 16px 36px rgba(29, 78, 216, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.45) !important;
}

/* 3. Card 3: Electric Azure / Ocean Shading (Total Revenue) */
[data-theme="dark"] .kpi-card.income {
  background: linear-gradient(140deg, #0284c7 0%, #0369a1 50%, #0c4a6e 100%) !important;
  box-shadow: 0 12px 28px rgba(2, 132, 199, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
}
[data-theme="dark"] .kpi-card.income:hover {
  box-shadow: 0 16px 36px rgba(2, 132, 199, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.45) !important;
}

/* 4. Card 4: Titanium Slate / Steel Shading (Total Expenses) */
[data-theme="dark"] .kpi-card.expense {
  background: linear-gradient(140deg, #475569 0%, #334155 50%, #1e293b 100%) !important;
  box-shadow: 0 12px 28px rgba(30, 41, 59, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
  border: 1px solid rgba(148, 163, 184, 0.3) !important;
}
[data-theme="dark"] .kpi-card.expense:hover {
  box-shadow: 0 16px 36px rgba(30, 41, 59, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
}

/* 5. Card 5: Deep Emerald Jade Shading (Net Profit) */
[data-theme="dark"] .kpi-card.profit {
  background: linear-gradient(140deg, #059669 0%, #047857 50%, #064e3b 100%) !important;
  box-shadow: 0 12px 28px rgba(5, 150, 105, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
  border: 1px solid rgba(52, 211, 153, 0.35) !important;
}
[data-theme="dark"] .kpi-card.profit:hover {
  box-shadow: 0 16px 36px rgba(5, 150, 105, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.45) !important;
}

/* KPI Card Text & Numeric Values */
[data-theme="dark"] .kpi-card .kpi-title {
  color: rgba(255, 255, 255, 0.92) !important;
  font-weight: 700 !important;
  font-size: 13px !important;
}

[data-theme="dark"] .kpi-card .kpi-value,
[data-theme="dark"] .kpi-card .kpi-value.text-primary,
[data-theme="dark"] .kpi-card .kpi-value.text-warning,
[data-theme="dark"] .kpi-card .kpi-value.text-danger,
[data-theme="dark"] .kpi-card .kpi-value.text-success {
  color: #ffffff !important;
  font-weight: 800 !important;
  font-size: 26px !important;
  letter-spacing: -0.5px !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
}

[data-theme="dark"] .kpi-card .kpi-subtext {
  color: rgba(255, 255, 255, 0.85) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
}

/* Translucent Icon Tiles inside Colored KPI Cards */
[data-theme="dark"] .kpi-card .kpi-icon {
  background: rgba(255, 255, 255, 0.18) !important;
  color: #ffffff !important;
  border-radius: 12px !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 4px 10px rgba(0, 0, 0, 0.2) !important;
  width: 40px !important;
  height: 40px !important;
}

[data-theme="dark"] .kpi-card .kpi-icon i {
  color: #ffffff !important;
}

/* --- 6. Effectivity Indicators (Dark Mode Shading) --- */
[data-theme="dark"] .effectivity-title {
  color: #f8fafc !important;
}

[data-theme="dark"] .effectivity-card {
  background: linear-gradient(145deg, rgba(20, 31, 54, 0.8) 0%, rgba(11, 18, 33, 0.9) 100%) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  border-radius: 14px !important;
}

[data-theme="dark"] .eff-val {
  color: #f8fafc !important;
}

[data-theme="dark"] .eff-sub {
  color: #94a3b8 !important;
}

/* --- 7. Filter Bar in Dark Mode (Shaded Glass Pill) --- */
[data-theme="dark"] .filter-bar {
  background: linear-gradient(145deg, rgba(20, 31, 54, 0.85) 0%, rgba(11, 18, 33, 0.95) 100%) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 16px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  padding: 14px 20px !important;
}

[data-theme="dark"] .filter-select {
  background: linear-gradient(180deg, #0d1526 0%, #111a30 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 9999px !important;
  color: #f8fafc !important;
  padding: 7px 18px !important;
  font-weight: 600 !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] .filter-label {
  color: #cbd5e1 !important;
  font-weight: 700 !important;
}

[data-theme="dark"] .btn-primary-sm {
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%) !important;
  border-radius: 9999px !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  border: 1px solid rgba(147, 197, 253, 0.25) !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}

[data-theme="dark"] .btn-outline-sm {
  background: linear-gradient(145deg, rgba(20, 31, 54, 0.8) 0%, rgba(11, 18, 33, 0.9) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 9999px !important;
  color: #f1f5f9 !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

/* --- 8. 5 Rooms Quick Status & Directory Cards in Dark Mode --- */
[data-theme="dark"] .room-quick-card,
[data-theme="dark"] .room-directory-card {
  background: linear-gradient(145deg, rgba(20, 31, 54, 0.82) 0%, rgba(11, 18, 33, 0.94) 100%) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 16px !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

[data-theme="dark"] .room-quick-card:hover,
[data-theme="dark"] .room-directory-card:hover {
  border-color: rgba(56, 189, 248, 0.45) !important;
  box-shadow: 0 14px 34px rgba(14, 165, 233, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  transform: translateY(-3px) !important;
}

[data-theme="dark"] .room-icon-box,
[data-theme="dark"] .room-dir-number {
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.5) 0%, rgba(14, 165, 233, 0.25) 100%) !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  color: #38bdf8 !important;
  border-radius: 12px !important;
  font-weight: 800 !important;
  font-size: 15px !important;
  box-shadow: 0 2px 10px rgba(14, 165, 233, 0.25) !important;
}

[data-theme="dark"] .room-title,
[data-theme="dark"] .room-dir-title {
  color: #f8fafc !important;
  font-weight: 700 !important;
}

[data-theme="dark"] .room-sub,
[data-theme="dark"] .room-dir-sub {
  color: #94a3b8 !important;
}

[data-theme="dark"] .room-card-body {
  border-top-color: rgba(255, 255, 255, 0.08) !important;
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .stat-label {
  color: #94a3b8 !important;
}

[data-theme="dark"] .stat-val {
  color: #f8fafc !important;
}

[data-theme="dark"] .btn-card-icon {
  background: linear-gradient(145deg, rgba(20, 31, 54, 0.85) 0%, rgba(11, 18, 33, 0.95) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #cbd5e1 !important;
  border-radius: 10px !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25) !important;
}

[data-theme="dark"] .btn-card-icon:hover {
  color: #38bdf8 !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.35) !important;
}

/* Tenant profile box in customers screen */
[data-theme="dark"] .tenant-profile-box {
  background: linear-gradient(145deg, rgba(14, 22, 39, 0.8) 0%, rgba(8, 13, 24, 0.9) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
  border-radius: 12px !important;
}

/* --- 9. Charts Grid in Dark Mode (Ultra-Modern Shaded Containers) --- */
[data-theme="dark"] .chart-card {
  background: linear-gradient(150deg, rgba(20, 31, 56, 0.85) 0%, rgba(10, 16, 32, 0.95) 100%) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
  border-radius: 20px !important;
  box-shadow: 
    0 18px 45px -8px rgba(0, 0, 0, 0.65), 
    inset 0 1px 0 rgba(255, 255, 255, 0.16), 
    inset 0 -1px 0 rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(56, 189, 248, 0.05) !important;
  transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1) !important;
  position: relative !important;
  overflow: hidden !important;
}

[data-theme="dark"] .chart-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.5), rgba(129, 140, 248, 0.4), transparent);
  pointer-events: none;
}

[data-theme="dark"] .chart-card:hover {
  border-color: rgba(56, 189, 248, 0.35) !important;
  box-shadow: 
    0 24px 55px -6px rgba(0, 0, 0, 0.75), 
    inset 0 1px 0 rgba(255, 255, 255, 0.25), 
    0 0 30px rgba(56, 189, 248, 0.18) !important;
  transform: translateY(-3px) !important;
}

[data-theme="dark"] .chart-title {
  color: #ffffff !important;
  font-weight: 800 !important;
  font-size: 15.5px !important;
  letter-spacing: -0.3px !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4) !important;
}

[data-theme="dark"] .chart-card-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  padding-bottom: 15px !important;
  margin-bottom: 18px !important;
}

[data-theme="dark"] .chart-canvas-box canvas {
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.38));
}

/* --- 10. Tables (Dark Mode Shaded Glass) --- */
[data-theme="dark"] .table-card {
  background: linear-gradient(145deg, rgba(20, 31, 54, 0.85) 0%, rgba(11, 18, 33, 0.95) 100%) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 16px !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .table-header-row {
  background: transparent !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .data-table th {
  background: linear-gradient(180deg, #131c33 0%, #0f1729 100%) !important;
  color: #94a3b8 !important;
  font-weight: 700 !important;
  font-size: 12.5px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.3px !important;
}

[data-theme="dark"] .data-table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  color: #f1f5f9 !important;
}

[data-theme="dark"] .data-table tbody tr:hover {
  background: linear-gradient(90deg, rgba(30, 58, 138, 0.22) 0%, rgba(14, 165, 233, 0.06) 100%) !important;
}

/* Status Badges in Dark Mode (Jewel Tones with Glow) */
[data-theme="dark"] .badge-status.paid,
[data-theme="dark"] .room-pill.paid {
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.28) 0%, rgba(16, 185, 129, 0.16) 100%) !important;
  color: #34d399 !important;
  border: 1px solid rgba(52, 211, 153, 0.45) !important;
  border-radius: 9999px !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.25) !important;
}

[data-theme="dark"] .badge-status.pending,
[data-theme="dark"] .room-pill.pending {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.28) 0%, rgba(239, 68, 68, 0.16) 100%) !important;
  color: #f87171 !important;
  border: 1px solid rgba(248, 113, 113, 0.45) !important;
  border-radius: 9999px !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 10px rgba(239, 68, 68, 0.25) !important;
}

[data-theme="dark"] .room-pill.unbilled {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.28) 0%, rgba(245, 158, 11, 0.16) 100%) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(251, 191, 36, 0.45) !important;
  border-radius: 9999px !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.25) !important;
}

[data-theme="dark"] .room-pill.vacant {
  background: linear-gradient(135deg, rgba(71, 85, 105, 0.28) 0%, rgba(51, 65, 85, 0.16) 100%) !important;
  color: #94a3b8 !important;
  border: 1px solid rgba(148, 163, 184, 0.3) !important;
  border-radius: 9999px !important;
  font-weight: 700 !important;
}

[data-theme="dark"] .room-pill-badge {
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.35) 0%, rgba(14, 165, 233, 0.18) 100%) !important;
  color: #60a5fa !important;
  border: 1px solid rgba(96, 165, 250, 0.35) !important;
  border-radius: 9999px !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2) !important;
}

/* Action Buttons in Dark Mode Tables */
[data-theme="dark"] .btn-action-sm.view {
  background: rgba(59, 130, 246, 0.18) !important;
  border-color: rgba(59, 130, 246, 0.4) !important;
  color: #60a5fa !important;
}
[data-theme="dark"] .btn-action-sm.view:hover {
  background: rgba(59, 130, 246, 0.3) !important;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.4) !important;
}

[data-theme="dark"] .btn-action-sm.edit {
  background: rgba(245, 158, 11, 0.18) !important;
  border-color: rgba(245, 158, 11, 0.4) !important;
  color: #fbbf24 !important;
}
[data-theme="dark"] .btn-action-sm.edit:hover {
  background: rgba(245, 158, 11, 0.3) !important;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.4) !important;
}

[data-theme="dark"] .btn-action-sm.share {
  background: rgba(16, 185, 129, 0.18) !important;
  border-color: rgba(16, 185, 129, 0.4) !important;
  color: #34d399 !important;
}
[data-theme="dark"] .btn-action-sm.share:hover {
  background: rgba(16, 185, 129, 0.3) !important;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4) !important;
}

[data-theme="dark"] .btn-action-sm.pay {
  background: rgba(16, 185, 129, 0.18) !important;
  border-color: rgba(16, 185, 129, 0.4) !important;
  color: #34d399 !important;
}
[data-theme="dark"] .btn-action-sm.pay:hover {
  background: rgba(16, 185, 129, 0.3) !important;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4) !important;
}

[data-theme="dark"] .btn-action-sm.unpay {
  background: rgba(239, 68, 68, 0.18) !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
  color: #f87171 !important;
}
[data-theme="dark"] .btn-action-sm.unpay:hover {
  background: rgba(239, 68, 68, 0.3) !important;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.4) !important;
}

[data-theme="dark"] .btn-action-sm.delete {
  background: rgba(239, 68, 68, 0.18) !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
  color: #f87171 !important;
}
[data-theme="dark"] .btn-action-sm.delete:hover {
  background: rgba(239, 68, 68, 0.3) !important;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.4) !important;
}

/* --- 11. Form Cards, Calculator & Benchmark Previews --- */
[data-theme="dark"] .form-card,
[data-theme="dark"] .benchmark-card,
[data-theme="dark"] .calculator-preview-card,
[data-theme="dark"] .preview-owner-financial-card {
  background: linear-gradient(145deg, rgba(20, 31, 54, 0.82) 0%, rgba(11, 18, 33, 0.94) 100%) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 16px !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .form-card-title {
  color: #f8fafc !important;
}

[data-theme="dark"] .idcard-upload-dropzone {
  background: linear-gradient(145deg, rgba(14, 22, 39, 0.6) 0%, rgba(8, 13, 24, 0.8) 100%) !important;
  border: 2px dashed rgba(56, 189, 248, 0.35) !important;
  border-radius: 14px !important;
}

[data-theme="dark"] .idcard-upload-dropzone:hover {
  border-color: #38bdf8 !important;
  background: linear-gradient(145deg, rgba(20, 31, 54, 0.8) 0%, rgba(12, 19, 34, 0.9) 100%) !important;
}

/* --- 12. Modals, Forms & Inputs (Dark Mode Shading) --- */
[data-theme="dark"] .modal-content,
[data-theme="dark"] .modal-card {
  background: linear-gradient(150deg, #10192e 0%, #0a1020 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

[data-theme="dark"] .form-input,
[data-theme="dark"] .form-select,
[data-theme="dark"] .form-textarea {
  background: linear-gradient(180deg, #0c1324 0%, #10192e 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  color: #f8fafc !important;
  border-radius: 10px !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.35) !important;
  transition: all 0.2s ease !important;
}

[data-theme="dark"] .form-input:focus,
[data-theme="dark"] .form-select:focus,
[data-theme="dark"] .form-textarea:focus {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25), inset 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

[data-theme="dark"] .form-label {
  color: #cbd5e1 !important;
  font-weight: 600 !important;
}

/* --- 13. Mobile Header & Navigation (Dark Mode) --- */
[data-theme="dark"] .mobile-top-header {
  background: linear-gradient(180deg, #090e1a 0%, #0c1322 100%) !important;
  color: #ffffff !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4) !important;
}

[data-theme="dark"] .mobile-bottom-nav {
  background: linear-gradient(180deg, #0c1322 0%, #070a14 100%) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5) !important;
}

[data-theme="dark"] .mobile-nav-item.active {
  color: #38bdf8 !important;
}

/* --- 14. Toast Notifications in Dark Mode --- */
[data-theme="dark"] .toast {
  background: linear-gradient(145deg, rgba(20, 31, 54, 0.95) 0%, rgba(11, 18, 33, 0.98) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
}

/* --- Multi-Location & Room Management Extensions --- */
.room-location-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--primary);
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.25);
  padding: 3px 8px;
  border-radius: 6px;
  margin-top: 4px;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-theme="dark"] .room-location-tag {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.28);
  color: #38bdf8;
}

.room-branch-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #8b5cf6;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.25);
  padding: 2px 7px;
  border-radius: 5px;
}

[data-theme="dark"] .room-branch-badge {
  color: #c084fc;
  background: rgba(192, 132, 252, 0.15);
  border-color: rgba(192, 132, 252, 0.3);
}

.btn-danger-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.4);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-danger-outline:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.room-count-pill {
  display: inline-flex;
  align-items: center;
  background: rgba(6, 182, 212, 0.15);
  color: var(--primary);
  border-radius: 9999px;
  padding: 2px 10px;
  font-size: 13px;
  font-weight: 700;
  margin-left: 6px;
}

[data-theme="dark"] .room-count-pill {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
}

.room-location-line {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #64748b;
  margin-top: 3px;
}

[data-theme="dark"] .room-location-line {
  color: #94a3b8;
}

