﻿/* ===== NASHAAD CAR RENTAL MANAGEMENT SYSTEM  MAIN CSS ===== */
:root {
  --primary: #1317E7;
  --primary-light: #2f33ee;
  --primary-dark: #0d10c4;
  --secondary: #f97316;
  --secondary-light: #fb923c;
  --secondary-dark: #ea6e0a;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #d97706;
  --info: #0891b2;
  --teal: #0d9488;
  --purple: #7c3aed;
  --bg: #f0f4f8;
  --bg2: #ffffff;
  --sidebar-w: 250px;
  --header-h: 64px;
  --border: #e2e8f0;
  --text: #1e293b;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #64748b;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.12), 0 10px 10px -5px rgba(0, 0, 0, 0.06);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --transition: all .25s cubic-bezier(0.4, 0, 0.2, 1);
  --glass: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.2);
  --card-bg: #ffffff;
  --input-bg: #f8fafc;
  --header-bg: #ffffff;
  --loader-bg: #ffffff;
}

/* ===== DARK MODE ===== */
html.dark {
  --bg: #0f172a;
  /* Deep slate background */
  --bg2: #1e293b;
  /* Elevated card background */
  --card-bg: #1e293b;
  --border: #334155;
  /* Soft border that doesn't scream */
  --text: #f8fafc;
  /* Very bright text for titles */
  --text-primary: #e2e8f0;
  /* Clear readable text for body */
  --text-secondary: #94a3b8;
  /* Muted readable text */
  --text-muted: #64748b;
  --input-bg: #0f172a;
  /* Inputs same as app bg to sink them in */
  --header-bg: rgba(30, 41, 59, 0.95);
  /* Semi-transparent header */
  --loader-bg: #0f172a;
  --glass: rgba(30, 41, 59, 0.85);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.6), 0 4px 6px -2px rgba(0, 0, 0, 0.4);
  /* Adjusting primary colors slightly for better dark mode contrast */
  --primary: #4f46e5;
  /* Softer indigo */
  --primary-light: #6366f1;
  --primary-dark: #3730a3;
  --success: #22c55e;
  --danger: #ef4444;
}

/* Base resets for dark mode */
html.dark body {
  background: var(--bg);
  color: var(--text-primary);
}

html.dark .top-header {
  background: var(--header-bg);
  border-color: var(--border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

html.dark .sidebar {
  background: var(--bg2);
  border-color: var(--border);
}

html.dark .app-loader {
  background: var(--loader-bg);
  color: var(--text-primary);
}

html.dark .sidebar-nav .nav-item {
  color: var(--text-secondary);
}

html.dark .sidebar-nav .nav-item.active {
  background: rgba(79, 70, 229, 0.15);
  color: var(--primary-light);
}

html.dark .sidebar-nav .nav-item:hover:not(.active) {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

html.dark .sidebar-footer {
  border-color: var(--border);
}

html.dark .brand-name {
  color: var(--text);
}

html.dark .su-name {
  color: var(--text-primary);
}

/* Containers & Cards */
html.dark .dash-card,
html.dark .stat-card,
html.dark .modal-box,
html.dark .modal,
html.dark .card,
html.dark .complaint-card,
html.dark .table-container,
html.dark .filter-card,
html.dark .settings-card,
html.dark .upload-card,
html.dark .table-wrapper,
html.dark .main-content {
  background: var(--card-bg);
  border-color: var(--border);
}

html.dark .main-content {
  background: var(--bg);
}

html.dark .table-wrapper {
  box-shadow: var(--shadow);
}

/* Forms & Inputs */
html.dark .form-group input,
html.dark .form-group select,
html.dark .form-group textarea,
html.dark .form-control,
html.dark .filter-select,
html.dark .search-box input {
  background: var(--input-bg);
  border-color: var(--border);
  color: var(--text-primary);
}

html.dark .search-box {
  background: var(--input-bg);
  border-color: var(--border);
  color: var(--text-primary);
}

html.dark .search-box i {
  color: var(--text-secondary);
}

html.dark .form-group input::placeholder,
html.dark .form-group textarea::placeholder,
html.dark .search-box input::placeholder {
  color: var(--text-muted);
}

html.dark .form-group input:focus,
html.dark .form-group select:focus,
html.dark .form-group textarea:focus,
html.dark .search-box input:focus {
  border-color: var(--primary-light);
  background: var(--bg2);
}

html.dark .form-group label {
  color: var(--text-primary);
}

html.dark .form-section-title {
  color: var(--primary-light);
  border-bottom-color: var(--border);
}

/* Tables */
html.dark table {
  background: var(--card-bg);
}

html.dark table thead th {
  background: #0f172a;
  color: var(--text-secondary);
  border-bottom: 2px solid var(--border);
}

html.dark table tbody tr {
  border-color: var(--border);
  background: var(--card-bg);
}

html.dark table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

html.dark td,
html.dark th {
  color: var(--text-primary);
}

html.dark .empty-state-full {
  background: var(--card-bg);
}

/* Hero Stats Bar specific fixes */
html.dark .hero-stats-bar {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

html.dark .hero-value {
  color: var(--text);
}

html.dark .hero-label {
  color: var(--text-secondary);
}

html.dark .hd-lbl {
  color: var(--text-secondary);
}

html.dark .page-toolbar {
  background: var(--card-bg);
  border: 1px solid var(--border);
}

/* Buttons & Components */
html.dark .btn-secondary {
  background: #334155;
  color: #e2e8f0;
  border-color: #475569;
}

html.dark .btn-secondary:hover {
  background: #475569;
}

html.dark .btn-primary {
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.4);
}

html.dark .badge-status,
html.dark .status-badge {
  border-color: var(--border);
}

/* Menus & Dropdowns */
html.dark .notif-dropdown,
html.dark .profile-dropdown {
  background: var(--card-bg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

html.dark .notif-header {
  border-color: var(--border);
  color: var(--text-primary);
  background: var(--card-bg);
}

html.dark .notif-item {
  border-color: var(--border);
  background: var(--card-bg);
}

html.dark .notif-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

html.dark .ni-text {
  color: var(--text-primary);
}

html.dark .ni-time {
  color: var(--text-muted);
}

html.dark .profile-dropdown a {
  color: var(--text-primary);
  border-color: var(--border);
}

html.dark .profile-dropdown a:hover {
  background: rgba(255, 255, 255, 0.04);
}

/* Misc elements */
html.dark .header-date,
html.dark .page-title h2 {
  color: var(--text);
}

html.dark .header-btn {
  color: var(--text-secondary);
  background: var(--bg2);
  border-color: var(--border);
}

html.dark .header-btn:hover {
  background: var(--border);
  color: var(--text-primary);
}

html.dark .header-profile {
  color: var(--text-primary);
  background: var(--bg2);
  border-color: var(--border);
}

html.dark .hp-avatar {
  border: 2px solid var(--border);
}

html.dark .modal-header {
  border-color: var(--border);
  background: var(--card-bg);
}

html.dark .modal-body {
  background: var(--bg);
}

html.dark .modal-footer {
  border-color: var(--border);
  background: var(--card-bg);
}

/* Fix table hover forcing white bg */
html.dark .data-table tr:hover td {
  background: rgba(255, 255, 255, 0.04) !important;
}

/* Contract Print View - Force Light Mode Appearance for Paper */
html.dark .contract-print,
html.dark .print-wrapper,
html.dark .cp-container {
  background: #ffffff !important;
  color: #0f172a !important;
}

html.dark .contract-print *,
html.dark .print-wrapper *,
html.dark .cp-container * {
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

html.dark .contract-print .cp-title,
html.dark .contract-print h1,
html.dark .contract-print h2 {
  color: #1e3a8a !important;
  /* Keep the brand blue for headings */
}

html.dark .contract-print .badge,
html.dark .contract-print .status-badge {
  color: #000 !important;
}

html.dark .activity-item {
  border-color: var(--border);
}

html.dark .activity-item .ai-name {
  color: var(--text-primary);
}

html.dark .activity-item .ai-detail {
  color: var(--text-secondary);
}

html.dark .complaints-empty,
html.dark .empty-state {
  color: var(--text-secondary);
}

html.dark .login-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

html.dark .login-brand h1 {
  color: var(--primary-light);
}

html.dark .branch-tab {
  background: var(--card-bg);
  border-color: var(--border);
  color: var(--text-secondary);
}

html.dark .branch-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Badges */
html.dark .status-badge.active {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border-color: #3b82f6;
}

html.dark .status-badge.completed {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border-color: #22c55e;
}

html.dark .status-badge.overdue {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-color: #ef4444;
}

html.dark .status-badge.cancelled {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border-color: #64748b;
}

/* Dashboard specifics */
html.dark .ds-value,
html.dark .tv-name,
html.dark .ai-amount {
  color: var(--text);
}

html.dark .ds-label {
  color: var(--text-secondary);
}

html.dark .tv-item {
  border-color: var(--border);
}

html.dark .tv-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

html.dark .tv-history {
  border-color: var(--border);
  background: #0f172a;
}

html.dark .tv-history table th {
  background: #1e293b;
  color: #94a3b8;
}

html.dark .dashboard-grid #momBanner {
  border-color: #334155 !important;
}


/* Dark mode toggle button */
.dark-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dark-toggle:hover {
  background: var(--bg);
  color: var(--text);
}

html.dark .dark-toggle {
  color: #fbbf24;
}

html.dark .dark-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}


/* APP LOADER OVERLAY */
.app-loader {
  position: fixed;
  inset: 0;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  gap: 15px;
  transition: opacity 0.3s ease;
}

/* ”” Custom Scrollbar Premium Design ”” */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
  border: 1px solid #f1f5f9;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.05);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* For Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f1f5f9;
}

.table-wrapper::-webkit-scrollbar {
  height: 10px;
}

.table-wrapper::-webkit-scrollbar-thumb {
  background: #94a3b8;
}

.table-wrapper::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

.loader-spinner {
  width: 80px;
  height: 80px;
  background: url('../assets/img/nm-logo.jpg') no-repeat center center;
  background-size: contain;
  animation: pulse-logo 1.5s ease-in-out infinite;
  border: none;
}

@keyframes pulse-logo {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.8;
  }

  50% {
    transform: scale(1.15);
    opacity: 1;
  }
}

.loader-text {
  font-weight: 600;
  color: #1e293b;
  font-size: 1rem;
}


*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f1f5f9;
}

/* Custom Scrollbar Premium Design  */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
  border: 1px solid #f1f5f9;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

html {
  font-size: 15px;
  scroll-behavior: smooth;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

a {
  text-decoration: none;
  color: inherit
}

img {
  max-width: 100%;
  display: block
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  outline: none
}

input,
select,
textarea {
  font-family: inherit;
  outline: none
}

canvas {
  max-width: 100%
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px
}

::-webkit-scrollbar-track {
  background: #f1f5f9
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
  border: 2px solid #f1f5f9;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ===== LOGIN PAGE ===== */
.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-dark);
  overflow: hidden;
  position: relative
}

.login-bg {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #0d10c4 0%, #1317E7 50%, #2f33ee 100%)
}

.login-overlay {
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E")
}

.floating-cars {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none
}

.float-icon {
  position: absolute;
  font-size: 80px;
  color: rgba(255, 255, 255, .04);
  animation: floatCar 12s ease-in-out infinite
}

.icon-1 {
  top: 10%;
  left: 5%;
  animation-delay: 0s
}

.icon-2 {
  top: 60%;
  right: 8%;
  animation-delay: 4s;
  font-size: 120px
}

.icon-3 {
  bottom: 10%;
  left: 40%;
  animation-delay: 8s;
  font-size: 60px
}

@keyframes floatCar {

  0%,
  100% {
    transform: translateY(0) rotate(-5deg)
  }

  50% {
    transform: translateY(-20px) rotate(5deg)
  }
}

.login-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 460px;
  padding: 20px
}

.login-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3)
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px
}

.logo-icon {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.login-brand h1 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  margin: 0
}

.login-brand span {
  font-size: .8rem;
  color: var(--text-muted)
}

.branch-selector {
  margin-bottom: 24px
}

.branch-selector>label {
  display: block;
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 8px
}

.branch-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap
}

.branch-tab {
  flex: 1;
  min-width: 80px;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  background: #fff;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: var(--transition);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.branch-tab:hover {
  border-color: var(--primary);
  color: var(--primary)
}

.branch-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff
}

.form-group {
  margin-bottom: 16px
}

.form-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .04em;
  transition: var(--transition)
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  color: var(--text);
  transition: var(--transition);
  background: #fff
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 45, 94, .1)
}

.password-wrapper {
  position: relative
}

.password-wrapper input {
  padding-right: 44px
}

.toggle-pw {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  color: var(--text-muted);
  padding: 4px
}

.btn-login {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  transition: var(--transition);
  margin-top: 8px
}

.btn-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(15, 45, 94, .35)
}

.login-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--danger);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  font-size: .85rem
}

.login-hint {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border)
}

.login-hint p {
  font-size: .78rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px
}

.demo-creds {
  display: flex;
  flex-direction: column;
  gap: 4px
}

.demo-creds span {
  font-size: .78rem;
  color: var(--text-muted);
  background: var(--bg);
  padding: 4px 8px;
  border-radius: 4px
}

/* ===== APP LAYOUT ===== */
.app-body {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
  overflow-y: visible;
}

/* SIDEBAR */
.sidebar {
  width: var(--sidebar-w);
  background: var(--primary-dark);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 200;
  transition: transform .3s ease;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.sidebar::-webkit-scrollbar {
  width: 5px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.4);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .08)
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px
}

.logo-icon-sm {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.logo-icon-sm img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-name {
  display: block;
  font-size: .95rem;
  font-weight: 700;
  color: #fff
}

.brand-sub {
  display: block;
  font-size: .68rem;
  color: rgba(255, 255, 255, .5)
}

.sidebar-close {
  background: none;
  color: rgba(255, 255, 255, .5);
  font-size: 1rem;
  display: none
}

.sidebar-branch {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px;
  background: rgba(255, 255, 255, .03);
  font-size: .8rem;
  color: var(--secondary-light);
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, .05);
}

.sidebar-nav {
  flex: 1;
  padding: 12px 8px;
  overflow-y: auto
}

.nav-section-label {
  font-size: .65rem;
  font-weight: 700;
  color: rgba(255, 255, 255, .3);
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: 16px 8px 4px
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, .7);
  font-size: .875rem;
  font-weight: 500;
  transition: var(--transition);
  margin-bottom: 2px
}

.nav-item:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff
}

.nav-item.active {
  background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
  color: #fff;
  font-weight: 600
}

.nav-item i {
  width: 18px;
  text-align: center;
  font-size: .95rem
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, .08)
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1
}

.su-avatar,
.hp-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--secondary), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .85rem;
  color: #fff;
  flex-shrink: 0
}

.su-name {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: #fff
}

/* Base Form Controls (Enhanced) - Consolidated */
.form-group {
  margin-bottom: 20px
}

.form-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  font-weight: 700;
  color: #475569;
  margin-bottom: 8px
}

.form-group label i {
  color: var(--primary);
  font-size: .95rem;
  opacity: .8
}

.form-group input,
.form-group select,
.form-group textarea,
.form-control {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 16px;
  background: #f8fafc;
  color: #1e293b;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(19, 23, 231, 0.08);
  background: #fff;
}

.su-role {
  display: block;
  font-size: .7rem;
  color: rgba(255, 255, 255, .5)
}

.btn-logout {
  background: rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .7);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  transition: var(--transition)
}

.btn-logout:hover {
  background: var(--danger);
  color: #fff
}

.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 8px
}

/* OVERLAY */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  z-index: 199
}

/* MAIN CONTENT */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin .3s ease;
  overflow-y: visible;
  position: relative;
}

/* TOP HEADER */
.top-header {
  height: var(--header-h);
  background: var(--header-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(8px);
}

.page-content {
  padding: 24px;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  flex-direction: column;
  background: var(--bg);
}


.header-left {
  display: flex;
  align-items: center;
  gap: 16px
}

.hamburger {
  background: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  padding: 6px;
  border-radius: 6px;
  display: none
}

.hamburger:hover {
  background: var(--bg);
  color: var(--text)
}

.page-title h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text)
}

.page-title span {
  font-size: .78rem;
  color: var(--text-muted)
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px
}

.header-date {
  font-size: .78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px
}

.header-btn {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: var(--transition)
}

.header-btn:hover {
  border-color: var(--primary);
  color: var(--primary)
}

.badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--danger);
}

/* ”” Custom UI Layouts ”” */
.dual-upload-premium {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-bottom: 24px;
}

@media (max-width: 500px) {
  .dual-upload-premium {
    grid-template-columns: 1fr;
  }
}

.perm-grid-premium {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.perm-card {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.perm-card:hover {
  border-color: var(--primary);
  background: #eff6ff;
}

.perm-card input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.upload-card {
  flex: 1;
  min-width: 120px;
}

.image-preview {
  aspect-ratio: 4/3;
  width: 100%;
  background: #f1f5f9;
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  color: #64748b;
  gap: 8px;
  overflow: hidden;
}

.image-preview:hover {
  border-color: var(--primary);
  background: #f8fafc;
  color: var(--primary);
}

.image-preview i {
  font-size: 1.5rem;
}

.image-preview span {
  font-size: 0.75rem;
  font-weight: 600;
}

.btn-action-sm {
  width: 100%;
  margin-top: 8px;
  padding: 8px;
  font-size: 0.75rem;
  border-radius: 8px;
  background: var(--bg2);
  border: 1px solid var(--border);
  font-weight: 600;
  cursor: pointer;
}

.notif-header button {
  background: none;
  background: var(--bg);
  color: var(--text)
}

.page-title h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text)
}

.page-title span {
  font-size: .78rem;
  color: var(--text-muted)
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px
}

.header-date {
  font-size: .78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px
}

.header-btn {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: var(--transition)
}

.header-btn:hover {
  border-color: var(--primary);
  color: var(--primary)
}

.badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--danger);
  color: #fff;
  font-size: .6rem;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center
}

.notif-btn {
  position: relative
}

/* ”” Custom UI Layouts ”” */
.dual-upload-premium {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-bottom: 24px;
}

@media (max-width: 500px) {
  .dual-upload-premium {
    grid-template-columns: 1fr;
  }
}

.perm-grid-premium {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.perm-card {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.perm-card:hover {
  border-color: var(--primary);
  background: #eff6ff;
}

.perm-card input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.upload-card {
  flex: 1;
  min-width: 120px;
}

.image-preview {
  aspect-ratio: 4/3;
  width: 100%;
  background: #f1f5f9;
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  color: #64748b;
  gap: 8px;
  overflow: hidden;
}

.image-preview:hover {
  border-color: var(--primary);
  background: #f8fafc;
  color: var(--primary);
}

.image-preview i {
  font-size: 1.5rem;
}

.image-preview span {
  font-size: 0.75rem;
  font-weight: 600;
}

.btn-action-sm {
  width: 100%;
  margin-top: 8px;
  padding: 8px;
  font-size: 0.75rem;
  border-radius: 8px;
  background: var(--bg2);
  border: 1px solid var(--border);
  font-weight: 600;
  cursor: pointer;
}

.notif-header button {
  background: none;
  color: var(--secondary);
  font-size: .78rem;
  font-weight: 500
}

.notif-item {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 12px;
  align-items: flex-start;
  transition: var(--transition);
}

.notif-item:hover {
  background: #f8fafc;
}

.notif-item>div:last-child {
  flex: 1;
  min-width: 0;
  /* Prevents text clipping in flex containers */
}

.notif-item:last-child {
  border: none
}

.notif-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  flex-shrink: 0
}

.notif-icon.warning {
  background: #fff7ed;
  color: var(--warning)
}

.notif-icon.danger {
  background: #fef2f2;
  color: var(--danger)
}

.notif-icon.success {
  background: #f0fdf4;
  color: var(--success)
}

.ni-text {
  font-size: .8rem;
  color: var(--text);
  line-height: 1.4
}

.ni-time {
  font-size: .7rem;
  color: var(--text-muted);
  margin-top: 2px
}

.notif-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: .85rem
}

/* ”” Notification Dashboard Summary (Glassmorphism + Dark Blue) ”” */
.notif-dash-summary {
  background: linear-gradient(135deg, #0d10c4 0%, #1317E7 50%, #2f33ee 100%);
  position: relative;
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nds-bg-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.nds-shape {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
}

.nds-shape-1 {
  width: 250px;
  height: 250px;
  bottom: -80px;
  right: -50px;
}

.nds-shape-2 {
  width: 150px;
  height: 150px;
  top: -50px;
  left: -20px;
  background: rgba(255, 255, 255, 0.06);
}

.nds-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 10px;
  padding: 20px 24px;
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.nds-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nds-num {
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1;
}

.nds-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.header-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  position: relative
}

.header-profile:hover {
  background: var(--bg)
}

.header-profile>span {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text)
}

.header-profile>i {
  font-size: .7rem;
  color: var(--text-muted)
}


.profile-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  min-width: 180px;
  display: none;
  z-index: 300;
  overflow: hidden
}

.profile-dropdown.show {
  display: block
}

.profile-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: .85rem;
  color: var(--text);
  transition: var(--transition)
}

.profile-dropdown a:hover {
  background: var(--bg)
}

.profile-dropdown hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 4px 0
}

/* PAGE CONTENT */
.page-content {
  padding: 24px;
  flex: 1
}

/* ===== HERO STATS BAR ===== */
.hero-stats-bar {
  display: flex;
  align-items: center;
  gap: 0;
  background: linear-gradient(135deg, #1317E7, #2f33ee);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 24px;
  color: #fff;
  box-shadow: 0 8px 32px rgba(19, 23, 231, .25);
  flex-wrap: wrap;
  gap: 20px;
  position: relative;
  overflow: hidden;
}

.hero-stats-bar::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
  pointer-events: none;
}

.hero-stats-bar::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: 30%;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .04);
  pointer-events: none;
}

/* Color Themes */
.hero-stats-bar.sapphire {
  background: linear-gradient(135deg, #0d10c4, #1317E7, #2f33ee);
  box-shadow: 0 8px 32px rgba(19, 23, 231, .3);
}

.hero-stats-bar.teal {
  background: linear-gradient(135deg, #0f766e, #0d9488, #14b8a6);
  box-shadow: 0 8px 32px rgba(13, 148, 136, .3);
}

.hero-stats-bar.indigo {
  background: linear-gradient(135deg, #3730a3, #4f46e5, #6366f1);
  box-shadow: 0 8px 32px rgba(79, 70, 229, .3);
}

.hero-stats-bar.ocean {
  background: linear-gradient(135deg, #0369a1, #0284c7, #0ea5e9);
  box-shadow: 0 8px 32px rgba(2, 132, 199, .3);
}

.hero-stats-bar.emerald {
  background: linear-gradient(135deg, #065f46, #059669, #10b981);
  box-shadow: 0 8px 32px rgba(5, 150, 105, .3);
}

.hero-stats-bar.crimson {
  background: linear-gradient(135deg, #991b1b, #dc2626, #ef4444);
  box-shadow: 0 8px 32px rgba(220, 38, 38, .3);
}

.hero-stats-bar.violet {
  background: linear-gradient(135deg, #5b21b6, #7c3aed, #8b5cf6);
  box-shadow: 0 8px 32px rgba(124, 58, 237, .3);
}

.hero-stats-bar.primary {
  background: linear-gradient(135deg, #0d10c4, #1317E7, #2f33ee);
  box-shadow: 0 8px 32px rgba(19, 23, 231, .3);
}

.hero-main {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
  min-width: 200px;
}

.hero-icon {
  font-size: 2.2rem;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .2));
  flex-shrink: 0;
}

.hero-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  opacity: .85;
}

.hero-value {
  font-size: 2rem;
  font-weight: 900;
  line-height: 1.1;
  margin: 0;
  letter-spacing: -.02em;
  color: #fff;
  white-space: nowrap;
}

.hero-details {
  display: flex;
  flex: 1;
  gap: 0;
  flex-wrap: wrap;
}

.hero-detail-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 0 20px;
  border-left: 1px solid rgba(255, 255, 255, .18);
  min-width: 130px;
}

.hero-detail-item:first-child {
  border-left: 1px solid rgba(255, 255, 255, .18);
}

.hd-val {
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
  white-space: nowrap;
}

.hd-val.success {
  color: #86efac;
}

.hd-val.danger {
  color: #fca5a5;
}

.hd-val.warning {
  color: #fcd34d;
}

.hd-val.info {
  color: #7dd3fc;
}

.hd-val.primary {
  color: #fff;
}

.hd-lbl {
  font-size: .68rem;
  font-weight: 600;
  opacity: .75;
  text-transform: uppercase;
  letter-spacing: .05em;
  white-space: nowrap;
}

/* ===== ACCENT-BG MODIFIER (colored icon background on stat cards) ===== */
.stat-card.accent-bg .stat-icon {
  background: rgba(255, 255, 255, 0) !important;
}

.stat-card.primary.accent-bg .stat-icon {
  background: rgba(19, 23, 231, .12) !important;
  color: var(--primary) !important;
}

.stat-card.success.accent-bg .stat-icon {
  background: rgba(22, 163, 74, .12) !important;
  color: var(--success) !important;
}

.stat-card.warning.accent-bg .stat-icon {
  background: rgba(217, 119, 6, .12) !important;
  color: var(--warning) !important;
}

.stat-card.danger.accent-bg .stat-icon {
  background: rgba(220, 38, 38, .12) !important;
  color: var(--danger) !important;
}

.stat-card.info.accent-bg .stat-icon {
  background: rgba(8, 145, 178, .12) !important;
  color: var(--info) !important;
}

.stat-card.teal.accent-bg .stat-icon {
  background: rgba(13, 148, 136, .12) !important;
  color: var(--teal) !important;
}

.stat-card.purple.accent-bg .stat-icon {
  background: rgba(124, 58, 237, .12) !important;
  color: var(--purple) !important;
}

.stat-card.indigo.accent-bg .stat-icon {
  background: rgba(79, 70, 229, .12) !important;
  color: #4f46e5 !important;
}

/* ===== MISSING COLOR CLASSES ===== */
.stat-card.indigo {
  border-color: #4f46e5;
}

.stat-card.indigo .stat-icon {
  background: #eef2ff;
  color: #4f46e5;
}

.stat-card.crimson {
  border-color: #dc2626;
}

.stat-card.crimson .stat-icon {
  background: #fef2f2;
  color: #dc2626;
}

.stat-card.violet {
  border-color: #7c3aed;
}

.stat-card.violet .stat-icon {
  background: #f5f3ff;
  color: #7c3aed;
}

.stat-card.ocean {
  border-color: #0284c7;
}

.stat-card.ocean .stat-icon {
  background: #f0f9ff;
  color: #0284c7;
}

.stat-card.emerald {
  border-color: #059669;
}

.stat-card.emerald .stat-icon {
  background: #ecfdf5;
  color: #059669;
}

.stat-card.sapphire {
  border-color: #1317E7;
}

.stat-card.sapphire .stat-icon {
  background: #eff6ff;
  color: #1317E7;
}

/* btn-success */
.btn-success {
  padding: 9px 18px;
  background: var(--success);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-success:hover {
  background: #15803d;
}

/* STATS GRID */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px
}

.stats-grid-4 {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr))
}

.stat-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow);
  border-left: 4px solid transparent;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .5));
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s ease;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.stat-card:hover::after {
  opacity: 1;
}

.stat-card.primary {
  border-color: var(--primary)
}

.stat-card.success {
  border-color: var(--success)
}

.stat-card.warning {
  border-color: var(--warning)
}

.stat-card.danger {
  border-color: var(--danger)
}

.stat-card.info {
  border-color: var(--info)
}

.stat-card.orange {
  border-color: var(--secondary)
}

.stat-card.teal {
  border-color: var(--teal)
}

.stat-card.purple {
  border-color: var(--purple)
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0
}

.stat-card.primary .stat-icon {
  background: #eff6ff;
  color: var(--primary)
}

.stat-card.success .stat-icon {
  background: #f0fdf4;
  color: var(--success)
}

.stat-card.warning .stat-icon {
  background: #fffbeb;
  color: var(--warning)
}

.stat-card.danger .stat-icon {
  background: #fef2f2;
  color: var(--danger)
}

.stat-card.info .stat-icon {
  background: #ecfeff;
  color: var(--info)
}

.stat-card.orange .stat-icon {
  background: #fff7ed;
  color: var(--secondary)
}

.stat-card.teal .stat-icon {
  background: #f0fdfa;
  color: var(--teal)
}

.stat-card.purple .stat-icon {
  background: #f5f3ff;
  color: var(--purple)
}

.stat-info {
  flex: 1
}

.stat-value {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1
}

.stat-label {
  display: block;
  font-size: .78rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 2px
}

.stat-trend {
  font-size: .72rem;
  color: var(--text-muted);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px
}

.stat-trend.up {
  color: var(--success)
}

.stat-trend.down {
  color: var(--danger)
}

/* DASHBOARD GRID */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px
}

.reports-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px
}

.dash-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow)
}

.chart-card {
  grid-column: 1
}

.donut-card {
  grid-column: 2
}

.activity-card {
  grid-column: 1
}

.alerts-card {
  grid-column: 2
}

.top-vehicles-card {
  grid-column: 1
}

.notif-btn {
  position: relative;
}

.notif-dropdown {
  position: absolute;
  top: calc(var(--header-h) + 8px);
  right: 0;
  width: 380px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(0, 0, 0, 0.05);
  display: none;
  z-index: 1001;
  overflow: hidden;
  animation: slideDownFade 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: top right;
}

@keyframes slideDownFade {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.notif-dropdown.show {
  display: flex;
  flex-direction: column;
}

.notif-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
}

.notif-header span {
  font-weight: 800;
  font-size: 1rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

.notif-header button {
  background: none;
  border: none;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
  background: rgba(19, 23, 231, 0.08);
  padding: 4px 10px;
  border-radius: 12px;
  transition: all 0.2s;
}

.notif-header button:hover {
  background: var(--primary);
  color: #fff;
}

#notifList {
  max-height: 400px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  background: #fff;
}

#notifList::-webkit-scrollbar {
  width: 6px;
}

#notifList::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 6px;
}

.notif-item {
  display: flex;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: background 0.2s;
}

.notif-item:hover {
  background: #f8fafc;
}

.notif-item:last-child {
  border-bottom: none;
}

.notif-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  background: #f1f5f9;
  color: #64748b;
}

.notif-icon.danger {
  background: #fef2f2;
  color: #dc2626;
}

.notif-icon.warning {
  background: #fffbeb;
  color: #d97706;
}

.notif-icon.success {
  background: #f0fdf4;
  color: #16a34a;
}

.notif-icon.info {
  background: #eff6ff;
  color: #2563eb;
}

.ni-text {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 4px;
}

.ni-text strong {
  font-weight: 700;
  color: var(--text-dark);
}

.ni-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

.notif-empty {
  padding: 40px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.notif-empty i {
  font-size: 2.5rem;
  color: #cbd5e1;
  opacity: 0.5;
}

.notif-btn .badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #ef4444;
  color: white;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  border-radius: 50%;
  border: 2px solid #fff;
  padding: 0;
  animation: pulse-danger 2s infinite;
}

@keyframes pulse-danger {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }

  70% {
    box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

.top-header {
  height: var(--header-h);
  background: var(--header-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(8px);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .7rem;
  padding: 4px 10px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.status-badge {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: .75rem;
  font-weight: 700;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.status-badge.active,
.status-badge.success,
.status-badge.paid {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #dcfce7;
}

.status-badge.pending,
.status-badge.warning,
.status-badge.open {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fef3c7;
}

.status-badge.cancelled,
.status-badge.inactive,
.status-badge.overdue {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fee2e2;
}

.status-badge.info,
.status-badge.partial {
  background: #f0f9ff;
  color: #0369a1;
  border: 1px solid #e0f2fe;
}


.quick-actions-card {
  grid-column: 2
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px
}

.card-header h3 {
  font-size: .9rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px
}

.card-header h3 i {
  color: var(--primary)
}

.view-all {
  font-size: .78rem;
  color: var(--secondary);
  font-weight: 600
}

.view-all:hover {
  text-decoration: underline
}

.chart-controls {
  display: flex;
  gap: 6px
}

.chart-btn {
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  font-size: .75rem;
  font-weight: 600;
  background: #fff;
  color: var(--text-muted);
  transition: var(--transition)
}

.chart-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff
}

.donut-wrapper {
  display: flex;
  align-items: center;
  gap: 16px
}

.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 8px
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0
}

/* ACTIVITY LIST */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--border)
}

.ai-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: .85rem;
  flex-shrink: 0
}

.ai-info {
  flex: 1
}

.ai-name {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text)
}

.ai-detail {
  font-size: .75rem;
  color: var(--text-muted)
}

.ai-amount {
  font-size: .85rem;
  font-weight: 700;
  color: var(--success)
}

.ai-status {
  font-size: .7rem;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 600
}

/* ALERTS LIST */
.alerts-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto
}

.alert-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: #fff7ed;
  border: 1px solid #fed7aa
}

.alert-item .ai-icon {
  background: linear-gradient(135deg, var(--warning), var(--secondary))
}

.alert-days {
  font-size: .7rem;
  font-weight: 700;
  color: var(--danger);
  white-space: nowrap
}

/* TOP VEHICLES */
.top-vehicles-list {
  display: flex;
  flex-direction: column;
  gap: 8px
}

.tv-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px
}

.tv-rank {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  font-weight: 700;
  flex-shrink: 0
}

.tv-rank.gold {
  background: linear-gradient(135deg, #f59e0b, #d97706)
}

.tv-rank.silver {
  background: linear-gradient(135deg, #94a3b8, #64748b)
}

.tv-rank.bronze {
  background: linear-gradient(135deg, #b45309, #92400e)
}

.tv-name {
  flex: 1;
  font-size: .83rem;
  font-weight: 600
}

.tv-count {
  font-size: .78rem;
  color: var(--text-muted)
}

.tv-bar-wrap {
  width: 80px;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden
}

.tv-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 3px
}

/* TV History expand */
.tv-item-wrap {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: box-shadow .2s ease;
}

.tv-item-wrap:hover {
  box-shadow: var(--shadow);
}

.tv-clickable {
  cursor: pointer;
  border-radius: 0 !important;
  padding: 10px 12px;
  transition: background .15s;
  border-bottom: 1px solid transparent;
}

.tv-clickable:hover {
  background: #f8faff;
}

.tv-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  flex-shrink: 0;
}

.tv-revenue {
  font-size: .72rem;
  font-weight: 700;
  color: var(--primary);
}

.tv-chevron {
  font-size: .75rem;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform .25s ease;
  margin-left: 4px;
}

.tv-history {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease, opacity .25s ease;
  opacity: 0;
  background: #fafbff;
  border-top: 0px solid var(--border);
}

.tv-history.open {
  max-height: 500px;
  opacity: 1;
  border-top: 1px solid var(--border);
}

.tv-history tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background .1s;
}

.tv-history tbody tr:last-child {
  border-bottom: none;
}

.tv-history tbody tr:hover {
  background: #eff6ff;
}


/* QUICK ACTIONS */
.quick-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px
}

.qa-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 10px;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  background: #fff;
  color: var(--text-muted);
  font-size: .78rem;
  font-weight: 600;
  transition: var(--transition);
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .04);
}

.qa-btn i {
  font-size: 1.4rem;
  color: var(--primary);
  transition: var(--transition);
}

.qa-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(19, 23, 231, .04);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(19, 23, 231, .12);
}

.qa-btn:hover i {
  transform: scale(1.15);
}

/* EMPTY STATE */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  color: var(--text-muted);
  text-align: center;
  gap: 8px
}

.empty-state i {
  font-size: 2.5rem;
  opacity: .3
}

.empty-state p {
  font-size: .85rem
}

.success-state i {
  color: var(--success);
  opacity: .7
}

/* TOOLBAR */
.page-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  background: #fff;
  padding: 14px 16px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}


.page-content {
  padding: 24px;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  flex-direction: column;
  background: var(--bg);
}


.toolbar-left,
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  min-width: 220px
}

.search-box i {
  color: var(--text-muted);
  font-size: .85rem
}

.search-box input {
  background: none;
  border: none;
  font-size: .85rem;
  color: var(--text);
  width: 100%
}

.filter-select {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .83rem;
  color: var(--text);
  background: #fff;
  transition: var(--transition)
}

.filter-select:focus {
  border-color: var(--primary)
}

/* MINI STATS */
.mini-stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow)
}

.mini-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .83rem;
  font-weight: 500;
  color: var(--text-muted)
}

.ms-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0
}

.ms-dot.available {
  background: var(--success)
}

.ms-dot.rented {
  background: var(--warning)
}

.ms-dot.maintenance {
  background: var(--danger)
}

.mini-stat.total {
  color: var(--text);
  font-weight: 700;
  margin-left: auto
}

/* VEHICLE GRID */
.vehicle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px
}

.vehicle-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition)
}

.vehicle-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg)
}

.vc-image {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1)
}

.vc-image-placeholder {
  width: 100%;
  height: 160px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, .3);
  font-size: 3rem
}

.vc-body {
  padding: 16px
}

.vc-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 8px
}

.vc-model {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text)
}

.vc-year {
  font-size: .78rem;
  color: var(--text-muted)
}

.vc-plate {
  font-size: .78rem;
  font-weight: 600;
  color: var(--primary);
  background: #eff6ff;
  padding: 2px 8px;
  border-radius: 4px
}

.vc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px
}

.vc-meta span {
  font-size: .73rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px
}

.vc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between
}

.vc-price {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--primary)
}

.vc-price-label {
  font-size: .7rem;
  color: var(--text-muted);
  font-weight: 400
}

.vc-actions {
  display: flex;
  gap: 6px
}

/* STATUS BADGES */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 600
}

.status-badge.available {
  background: #f0fdf4;
  color: var(--success)
}

.status-badge.rented {
  background: #fffbeb;
  color: var(--warning)
}

.status-badge.maintenance {
  background: #fef2f2;
  color: var(--danger)
}

.status-badge.active {
  background: #eff6ff;
  color: var(--primary)
}

.status-badge.completed {
  background: #f0fdf4;
  color: var(--success)
}

.status-badge.overdue {
  background: #fef2f2;
  color: var(--danger)
}

.status-badge.cancelled {
  background: #f8fafc;
  color: var(--text-muted)
}

.status-badge.paid {
  background: #f0fdf4;
  color: var(--success)
}

.status-badge.pending {
  background: #fff7ed;
  color: var(--warning)
}

.status-badge.partial {
  background: #eff6ff;
  color: var(--info)
}

/* BUTTONS */
.btn-primary {
  padding: 9px 18px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition)
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 45, 94, .3)
}

.btn-secondary {
  padding: 9px 18px;
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition)
}

.btn-secondary:hover {
  background: var(--bg);
  border-color: var(--primary);
  color: var(--primary)
}

.btn-danger {
  padding: 9px 18px;
  background: var(--danger);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition)
}

.btn-danger:hover {
  background: #b91c1c
}

.btn-warning {
  padding: 9px 18px;
  background: var(--warning);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition)
}

.btn-sm {
  padding: 6px 12px;
  font-size: .78rem
}

.btn-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  transition: all 0.2s ease;
  cursor: pointer;
  flex-shrink: 0;
  border: 1px solid transparent;
}

.action-btns {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-start;
}

.btn-icon.edit {
  background: #f0f9ff;
  color: #0284c7;
  border-color: #e0f2fe;
}

.btn-icon.edit:hover {
  background: #0284c7;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.25);
}

.btn-icon.delete,
.btn-icon.del {
  background: #fff1f2;
  color: #e11d48;
  border-color: #ffe4e6;
}

.btn-icon.delete:hover,
.btn-icon.del:hover {
  background: #e11d48;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(225, 29, 72, 0.25);
}

.btn-icon.view {
  background: #f0fdf4;
  color: #16a34a;
  border-color: #dcfce7;
}

.btn-icon.view:hover {
  background: #16a34a;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(22, 163, 74, 0.25);
}

/* ===== EXECUTIVE TABLE DESIGN ===== */
.table-wrapper {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  overflow: hidden;
  margin-bottom: 30px;
  transition: box-shadow 0.3s ease;
}

.table-wrapper:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0;
}

.data-table th {
  background: #f8fafc;
  padding: 16px 24px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
}

.data-table td {
  padding: 16px 24px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  color: #1e293b;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.data-table tr {
  transition: all 0.2s ease;
}

.data-table tr:hover td {
  background: #f8fafc !important;
}

.data-table tr:last-child td {
  border-bottom: none;
}

/* User Info Cell (Avatar + Text) */
.user-info-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ui-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.ui-text {
  display: flex;
  flex-direction: column;
}

.ui-text .main-text {
  font-weight: 700;
  color: #1e293b;
  font-size: 0.9rem;
}

.ui-text .sub-text {
  font-size: 0.75rem;
  color: #94a3b8;
}

.action-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}



.btn-icon.print {
  background: #fff7ed;
  color: var(--secondary);
}

.btn-icon.print:hover {
  background: var(--secondary);
  color: #fff;
}

.btn-view-toggle {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text-muted);
  transition: var(--transition)
}

.btn-view-toggle.active,
.btn-view-toggle:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary)
}

.btn-upload {
  padding: 8px 16px;
  background: var(--bg);
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: .82rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition)
}

.btn-upload:hover {
  border-color: var(--primary);
  color: var(--primary)
}

.btn-upload-sm {
  padding: 6px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: .75rem;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition)
}

.btn-upload-sm:hover {
  border-color: var(--primary);
  color: var(--primary)
}

/* TABLE */
.table-wrapper {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  overflow-x: auto !important;
  margin-bottom: 24px;
  border: 1px solid #e2e8f0;
  position: relative;
  width: 100% !important;
  max-width: 100vw !important;
  display: block;
  /* Intentionally not important so JS can hide it */
  -webkit-overflow-scrolling: touch !important;
  transition: box-shadow 0.3s ease;
}

.table-wrapper:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
}

/* Ensure children don't cause layout shift */
.table-wrapper table {
  min-width: 950px !important;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 950px !important;
}

.data-table th {
  padding: 16px 20px;
  background: #f8fafc;
  color: #64748b;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
}

.data-table th:last-child {
  text-align: right;
}

.data-table td {
  padding: 16px 20px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  color: #1e293b;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.data-table tr {
  transition: all 0.2s ease;
}

.data-table tr:hover td {
  background: #f8fafc !important;
}

.data-table td:last-child {
  text-align: right;
  min-width: 90px;
  /* 2-col grid: 2*34px + gap */
  vertical-align: middle;
}

.data-table tr:last-child td {
  border: none;
}

.status-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 700;
  white-space: nowrap;
  display: inline-block;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.status-badge.active {
  background: #eff6ff;
  color: var(--primary);
}

.status-badge.completed {
  background: #f0fdf4;
  color: var(--success);
}

.status-badge.overdue {
  background: #fef2f2;
  color: var(--danger);
}

.status-badge.cancelled {
  background: #f8fafc;
  color: #64748b;
}

.status-badge.pending {
  background: #fff7ed;
  color: #d97706;
}

/* ”” Table Responsiveness & Mobile Optimization ”” */
@media (max-width: 768px) {
  .table-wrapper {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow-x: auto !important;
    margin-bottom: 24px;
    border: 1px solid var(--border);
    position: relative;
    width: 100% !important;
    max-width: 100vw !important;

    -webkit-overflow-scrolling: touch !important;
  }

  .data-table th,
  .data-table td {
    padding: 10px 10px;
    font-size: 0.75rem;
  }

  .data-table td {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Don't truncate action buttons */
  .data-table td:last-child {
    max-width: none;
    overflow: visible;
  }

  .user-info-cell .main-text,
  .vehicle-info-cell .main-text {
    font-size: 0.78rem;
  }
}

/* Indicating horizontal scroll with a subtle gradient hint */
.table-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 20px;
  background: linear-gradient(to left, rgba(255, 255, 255, 0.8), transparent);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

.table-wrapper.is-scrollable::after {
  opacity: 1;
}

.data-table .td-actions {
  display: grid;
  grid-template-columns: repeat(2, 34px);
  gap: 5px;
  justify-content: end;
  align-items: center;
}

.data-table .td-actions .btn-icon {
  width: 34px;
  height: 34px;
  font-size: .82rem;
}

.td-img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
  background: #f8fafc;
}

.td-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
  border: 2px solid #fff;
}

.table-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted)
}

.table-empty i {
  font-size: 2.5rem;
  opacity: .3;
  display: block;
  margin-bottom: 8px
}

/* MODALS  see enhanced definitions below (MODAL HELPERS section) */

.modal-lg {
  max-width: 720px
}

.modal-xl {
  max-width: 920px
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(-20px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

/* Old modal-header/body/footer  using enhanced definitions in MODAL HELPERS section */

.modal-header-actions {
  display: flex;
  gap: 8px;
  margin-right: 12px
}

.danger-header {
  background: linear-gradient(135deg, #fef2f2, #fff) !important
}

.danger-header h3 {
  color: var(--danger) !important
}

.danger-header h3 i {
  color: var(--danger)
}


.confirm-icon {
  text-align: center;
  font-size: 3rem;
  color: var(--warning);
  margin-bottom: 12px
}

.confirm-text {
  text-align: center;
  color: var(--text-muted);
  font-size: .9rem;
  line-height: 1.6
}

/* FORMS */
/* FORMS  (Moved to Enhanced Section at bottom) */

/* IMAGE UPLOAD */
.image-upload-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  transition: var(--transition)
}

.image-upload-section:hover {
  border-color: var(--primary)
}

.image-preview {
  width: 200px;
  height: 130px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: .78rem;
  overflow: hidden;
  cursor: pointer
}

.image-preview i {
  font-size: 2rem;
  opacity: .4
}

.image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover
}

.image-preview.small {
  width: 100px;
  height: 100px;
  border-radius: 50%
}

.dual-upload {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-bottom: 16px;
  flex-wrap: wrap
}

.upload-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px
}

/* PRICE CALCULATION BOX */
.price-calc-box {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  padding: 16px;
  margin: 12px 0
}

.calc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  font-size: .85rem;
  color: var(--text-muted)
}

.calc-row strong {
  color: var(--text)
}

.calc-row.total {
  border-top: 1px solid #bfdbfe;
  margin-top: 6px;
  padding-top: 10px;
  font-size: .95rem;
  font-weight: 700;
  color: var(--primary)
}

.calc-row.total strong {
  font-size: 1.1rem;
  color: var(--primary)
}

/* SIGNATURE CANVAS */
.signature-section {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin: 8px 0
}

.sig-block {
  flex: 1;
  min-width: 240px;
  display: flex;
  flex-direction: column;
  gap: 6px
}

.sig-block label {
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-muted)
}

.sig-block canvas {
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fafafa;
  cursor: crosshair;
  touch-action: none;
  width: 100%;
  max-width: 300px
}

.sig-actions {
  display: flex;
  gap: 6px
}

/* CUSTOMER SELECTED PREVIEW */
.selected-preview {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px
}

.preview-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  flex: 1;
  min-width: 200px;
  background: var(--bg)
}

.preview-card img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--border)
}

.preview-info strong {
  display: block;
  font-size: .83rem;
  font-weight: 700;
  color: var(--text)
}

.preview-info span {
  display: block;
  font-size: .75rem;
  color: var(--text-muted)
}

/* REPORTS */
.report-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: #fff;
  padding: 14px 16px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 20px
}

.rc-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap
}

.rc-group label {
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap
}

.period-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap
}

.period-tab {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  font-size: .78rem;
  font-weight: 600;
  background: #fff;
  color: var(--text-muted);
  transition: var(--transition)
}

.period-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff
}

/* BRANCHES */
.branches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 8px
}

.branch-overview-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden
}

.boc-header {
  padding: 20px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff
}

.boc-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px
}

.boc-header h3 i {
  font-size: 1.3rem;
  opacity: .8
}

.boc-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border)
}

.boc-stat {
  padding: 16px;
  background: #fff;
  text-align: center
}

.boc-stat-val {
  display: block;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary)
}

.boc-stat-lbl {
  display: block;
  font-size: .73rem;
  color: var(--text-muted)
}

/* USERS & ROLES */
.roles-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px
}

.role-badge-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: .78rem;
  font-weight: 600
}

.role-badge-info.superadmin {
  background: #fef3c7;
  color: #92400e
}

.role-badge-info.manager {
  background: #eff6ff;
  color: var(--primary)
}

.role-badge-info.staff {
  background: #f0fdf4;
  color: var(--success)
}

.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 700
}

.role-badge.superadmin {
  background: #fef3c7;
  color: #92400e
}

.role-badge.manager {
  background: #eff6ff;
  color: var(--primary)
}

.role-badge.staff {
  background: #f0fdf4;
  color: var(--success)
}

/* SETTINGS */
.settings-layout {
  display: flex;
  gap: 20px;
  align-items: flex-start
}

.settings-nav {
  width: 200px;
  flex-shrink: 0;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 8px;
  position: sticky;
  top: calc(var(--header-h) + 24px)
}

.sn-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: .84rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 2px
}

.sn-item:hover {
  background: var(--bg);
  color: var(--text)
}

.sn-item.active {
  background: var(--primary);
  color: #fff
}

.settings-content {
  flex: 1;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px
}

.settings-tab {
  display: none
}

.settings-tab.active {
  display: block
}

.settings-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border)
}

.settings-footer {
  padding-top: 16px;
  border-top: 1px solid var(--border);
  margin-top: 16px;
  display: flex;
  justify-content: flex-end
}

.backup-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 16px
}

.backup-card {
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center
}

.backup-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #eff6ff;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem
}

.backup-icon.warning-icon {
  background: #fffbeb;
  color: var(--warning)
}

.backup-icon.danger-icon {
  background: #fef2f2;
  color: var(--danger)
}

.backup-card h4 {
  font-size: .9rem;
  font-weight: 700
}

.backup-card p {
  font-size: .78rem;
  color: var(--text-muted)
}

.danger-card {
  border-color: #fecaca
}

.last-backup {
  font-size: .78rem;
  color: var(--text-muted);
  padding: 10px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  margin-top: 8px
}

.notif-settings {
  display: flex;
  flex-direction: column;
  gap: 16px
}

.notif-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm)
}

.notif-setting-row div {
  flex: 1;
  padding-right: 16px
}

.notif-setting-row strong {
  display: block;
  font-size: .85rem;
  font-weight: 700;
  margin-bottom: 2px
}

.notif-setting-row p {
  font-size: .78rem;
  color: var(--text-muted);
  margin: 0
}

.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: #cbd5e1;
  border-radius: 24px;
  cursor: pointer;
  transition: var(--transition)
}

.toggle-slider:before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: var(--transition)
}

.toggle-switch input:checked+.toggle-slider {
  background: var(--primary)
}

.toggle-switch input:checked+.toggle-slider:before {
  transform: translateX(20px)
}

/* CONTRACT PRINT */
.contract-print {
  font-family: 'Inter', sans-serif;
  max-width: 800px;
  margin: 0 auto;
  color: #1e293b
}

.cp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  background: linear-gradient(135deg, #0f2d5e, #1a4080);
  color: #fff;
  border-radius: 0
}

.cp-logo {
  display: flex;
  align-items: center;
  gap: 12px
}

.cp-logo-icon {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, .2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem
}

/* CONTRACT PRINTING  Consolidated in Enhanced Section at bottom */

/* logo shown in print contracts */
.cp-logo-img {
  max-height: 80px;
  max-width: 200px;
  display: block;
  margin-bottom: 4px;
}

/* terms & conditions inside contract printout */
.cp-terms {
  font-size: .65rem;
  line-height: 1.3;
  margin: 16px 0;
  text-align: justify;
}

.cp-terms ol {
  padding-left: 18px;
  margin: 8px 0;
}

.cp-terms ol li {
  margin: 4px 0;
}

/* RECEIPT */
.receipt-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden
}

.receipt-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  padding: 20px;
  text-align: center
}

.receipt-header h2 {
  font-size: 1.1rem;
  font-weight: 800
}

.receipt-header span {
  font-size: .8rem;
  opacity: .8
}

.receipt-body {
  padding: 20px
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: .85rem
}

.receipt-row:last-child {
  border: none;
  font-weight: 700;
  font-size: .95rem;
  color: var(--primary)
}

.receipt-footer {
  background: var(--bg);
  padding: 16px;
  text-align: center;
  font-size: .75rem;
  color: var(--text-muted)
}

/* TOAST NOTIFICATIONS */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: .85rem;
  font-weight: 500;
  min-width: 260px;
  max-width: 340px;
  pointer-events: all;
  animation: toastIn .3s ease;
  background: #fff;
  border-left: 4px solid var(--primary)
}

.toast.success {
  border-color: var(--success)
}

.toast.error {
  border-color: var(--danger)
}

.toast.warning {
  border-color: var(--warning)
}

.toast i {
  font-size: 1rem
}

.toast.success i {
  color: var(--success)
}

.toast.error i {
  color: var(--danger)
}

.toast.warning i {
  color: var(--warning)
}

.toast.info i {
  color: var(--primary)
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(40px)
  }

  to {
    opacity: 1;
    transform: translateX(0)
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateX(0)
  }

  to {
    opacity: 0;
    transform: translateX(40px)
  }
}

/* RESPONSIVE */
@media(max-width:1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr
  }

  .chart-card,
  .donut-card,
  .activity-card,
  .alerts-card,
  .top-vehicles-card,
  .quick-actions-card {
    grid-column: 1
  }

  .reports-grid {
    grid-template-columns: 1fr
  }
}

/* MODAL HELPERS */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  overflow-y: auto;
}

.modal-overlay.show {
  display: flex !important;
  animation: fadeIn 0.3s ease;
}

.modal,
.modal-box {
  background: var(--bg2);
  border-radius: 20px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  box-shadow: var(--shadow-xl);
  position: relative;
  border: 1px solid var(--glass-border);
  transform: translateY(20px);
  transition: transform 0.3s ease;
  overflow-y: auto;
  overflow-x: hidden;
}

.modal-overlay.show .modal,
.modal-overlay.show .modal-box {
  transform: translateY(0);
}

.modal-md {
  max-width: 750px;
}

.modal-lg {
  max-width: 1100px;
}

.modal-sm {
  max-width: 400px;
}

.modal-xl {
  max-width: 1250px;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-radius: 20px 20px 0 0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}

.modal-close:hover {
  background: var(--danger);
  color: #fff;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: #f8fafc;
  border-radius: 0 0 20px 20px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@media(max-width:768px) {
  .sidebar {
    transform: translateX(-100%)
  }

  .sidebar.open {
    transform: translateX(0)
  }

  .sidebar-overlay.show {
    display: block
  }

  .sidebar-close,
  .hamburger {
    display: flex !important
  }

  .main-content {
    margin-left: 0
  }

  .page-content {
    padding: 16px
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr
  }

  .form-grid {
    grid-template-columns: 1fr
  }

  .form-full {
    grid-column: 1
  }

  .header-date {
    display: none
  }

  .settings-layout {
    flex-direction: column
  }

  .settings-nav {
    width: 100%;
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px
  }

  .sn-item {
    flex: 1;
    min-width: 120px;
    justify-content: center
  }

  .vehicle-grid {
    grid-template-columns: 1fr
  }

  .branches-grid {
    grid-template-columns: 1fr
  }

  .cp-grid {
    grid-template-columns: 1fr
  }

  .cp-sig-row {
    flex-direction: column;
    gap: 20px
  }

  .modal {
    max-width: 100% !important;
    max-height: 95vh
  }

  .signature-section {
    flex-direction: column
  }

  .dual-upload {
    flex-direction: row
  }

  .toolbar-left,
  .toolbar-right {
    width: 100%
  }

  .page-toolbar {
    flex-direction: column;
    align-items: stretch
  }
}

@media(max-width:480px) {
  .stats-grid {
    grid-template-columns: 1fr
  }

  .login-card {
    padding: 24px
  }

  .branch-tabs {
    flex-direction: column
  }

  .branch-tab {
    min-width: 100%
  }

  .quick-actions-grid {
    grid-template-columns: 1fr 1fr
  }

  .notif-dropdown {
    right: 0;
    width: calc(100vw - 32px)
  }

  /* hero bar on smallest screens */
  .hero-stats-bar {
    padding: 16px;
  }

  .hero-details {
    grid-template-columns: 1fr 1fr;
    display: grid;
    gap: 10px;
  }

  .hero-detail-item {
    border-left: none;
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 8px;
    padding: 8px 10px;
    min-width: unset;
  }

  .hero-value {
    font-size: 1.3rem;
  }

  .hd-val {
    font-size: 1rem;
  }
}

/* ===== SETTINGS CARDS ===== */
.settings-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow)
}

.settings-card-header {
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border)
}

.settings-card-header h3 {
  font-size: .95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px
}

.settings-card-header h3 i {
  color: var(--primary)
}

.danger-zone {
  border-color: #fecaca;
  background: #fffafa
}

.form-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 16px;
  margin-top: 12px;
  border-top: 1px solid var(--border)
}

/* ===== BACKUP SECTION ===== */
.backup-section {
  display: flex;
  flex-direction: column;
  gap: 16px
}

.backup-block {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  flex-wrap: wrap
}

.backup-block .backup-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0
}

.backup-block .backup-icon.export {
  background: #eff6ff;
  color: var(--primary)
}

.backup-block .backup-icon.import {
  background: #f0fdf4;
  color: var(--success)
}

.backup-block div {
  flex: 1;
  min-width: 160px
}

.backup-block h4 {
  font-size: .9rem;
  font-weight: 700;
  margin-bottom: 2px
}

.backup-block p {
  font-size: .8rem;
  color: var(--text-muted);
  margin: 0
}

/* ===== NOTIFICATION SETTINGS ===== */
.notif-settings-list {
  display: flex;
  flex-direction: column;
  gap: 12px
}

.ns-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  gap: 16px
}

.ns-title {
  font-size: .88rem;
  font-weight: 700;
  margin-bottom: 2px
}

.ns-desc {
  font-size: .78rem;
  color: var(--text-muted);
  margin: 0
}

.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  display: inline-block
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute
}

.toggle-track {
  position: absolute;
  inset: 0;
  background: #cbd5e1;
  border-radius: 24px;
  cursor: pointer;
  transition: var(--transition)
}

.toggle-track:before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: var(--transition);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .2)
}

.toggle-switch input:checked+.toggle-track {
  background: var(--primary)
}

.toggle-switch input:checked+.toggle-track:before {
  transform: translateX(20px)
}

/* ===== BRANCH STATS GRID ===== */
.boc-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border)
}

/* ===== PRINT STYLES ===== */
@media print {

  .sidebar,
  .top-header,
  .page-toolbar,
  .modal-header,
  .btn-primary,
  .btn-secondary,
  .btn-danger,
  .modal-footer,
  .modal-close,
  .modal-header-actions {
    display: none !important
  }

  .modal-overlay {
    position: static !important;
    background: none !important;
    padding: 0 !important
  }

  .modal {
    box-shadow: none !important;
    max-height: none !important
  }

  body {
    background: #fff !important
  }

  .main-content {
    margin: 0 !important
  }
}

/* ===== ENHANCED FORM GRID & MODALS ===== */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

.form-full {
  grid-column: span 2;
}

.form-group-flex {
  display: flex;
  gap: 15px;
  align-items: flex-end;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-group label i {
  color: var(--primary);
  opacity: 0.8;
}

.form-group input,
.form-group select,
.form-group textarea,
.form-control {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 16px;
  background: #f8fafc;
  color: #1e293b;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.form-control:focus {
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(19, 23, 231, 0.1);
  outline: none;
}

.modal-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
}

.modal-header h3 {
  color: #fff !important;
}

.modal-close {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.modal-close:hover {
  background: var(--danger);
  color: #fff;
}

@media (max-width: 640px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== MODERN UI ENRICHMENT (PREMIUM COMPONENTS) ===== */

/* Navigation Tabs & Page Navbar */
.page-navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  padding: 12px 20px;
  border-radius: 12px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border);
}

.nav-tabs,
.branch-tabs {
  display: flex;
  gap: 8px;
}

.nav-tab-btn,
.branch-tab {
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #64748b;
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.nav-tab-btn:hover,
.branch-tab:hover {
  background: #f1f5f9;
  color: var(--primary);
}

.nav-tab-btn.active,
.branch-tab.active {
  background: #f0f7ff;
  color: var(--primary);
  border-color: rgba(19, 23, 231, 0.15);
  box-shadow: 0 2px 8px rgba(19, 23, 231, 0.05);
}

.nav-tab-btn i,
.branch-tab i {
  font-size: 1rem;
  opacity: 0.8;
}

/* Premium Buttons */
.btn-outline {
  background: #fff;
  border: 2px solid #e2e8f0;
  color: #475569;
  padding: 9px 18px;
  border-radius: 10px;
  font-size: .85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #f0f7ff;
}

/* Asset/Premium Cards (Radio Selection) */
.radio-premium,
.radio-card {
  border: 2px solid #e2e8f0;
  background: #fff;
  border-radius: 16px;
  padding: 18px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}

.radio-premium:hover,
.radio-card:hover {
  border-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.radio-premium.active,
.radio-card.active {
  border-color: var(--primary);
  background: #f0f7ff;
  box-shadow: 0 0 0 1px var(--primary);
}

.radio-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #64748b;
  transition: all 0.2s;
  flex-shrink: 0;
}

.radio-premium.active .radio-icon,
.radio-card.active .radio-icon {
  background: var(--primary);
  color: #fff;
}

.radio-content {
  flex: 1;
  text-align: left;
}

.radio-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #1e293b;
  margin-bottom: 2px;
  display: block;
}

.radio-desc {
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.4;
  display: block;
}

/* Modal Headers & Previews */
.preview-card-premium {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 20px;
}

.preview-card-premium img {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  border: 2px solid #f1f5f9;
}

.preview-label {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 3px;
  display: block;
}

/* Notice & Alerts */
.notice-premium {
  background: #e0f2fe;
  border-left: 5px solid #0284c7;
  padding: 16px 20px;
  border-radius: 12px;
  margin: 20px 0;
  display: flex;
  gap: 14px;
  align-items: center;
  color: #0369a1;
}

.notice-premium i {
  font-size: 1.4rem;
}

/* Price Analysis Box */
.price-analysis-premium,
.price-calc-box,
.price-summary-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px;
  margin: 24px 0;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.02);
}

.analysis-header {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 16px;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 8px;
}

.analysis-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.analysis-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.analysis-item .label {
  font-size: 0.68rem;
  color: #94a3b8;
  text-transform: uppercase;
  font-weight: 700;
}

.analysis-item strong {
  font-size: 1.1rem;
  color: #1e293b;
  font-weight: 800;
}

.analysis-item.total strong {
  color: var(--primary);
  font-size: 1.4rem;
}

.calc-row,
.price-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 0.9rem;
  color: #475569;
}

.calc-row.total,
.price-row.total {
  border-top: 1px solid #e2e8f0;
  padding-top: 12px;
  margin-top: 12px;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--primary);
}

/* ‚¬‚¬ FORM SECTION TITLES ‚¬‚¬ */
.form-section-title {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 30px 0 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 2px solid #f1f5f9;
  padding-bottom: 8px;
}

.form-section-title i {
  font-size: 1rem;
}

/* ‚¬‚¬ ENHANCED FORM CONTROLS ‚¬‚¬ */
/* Form Responsive rules merged below */

/* ‚¬‚¬ CONTRACT PRINTING ‚¬‚¬ */
.contract-print {
  font-family: 'Inter', sans-serif;
  color: #1e293b;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px 30px;
  background: #fff;
  font-size: 0.81rem;
}

.cp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 2px solid var(--primary);
  padding-bottom: 15px;
  margin-bottom: 20px;
}

.cp-logo {
  display: flex;
  align-items: center;
  gap: 15px;
}

.cp-logo-img {
  height: 48px;
  object-fit: contain;
}

.cp-logo-text h2 {
  margin: 0;
  color: var(--primary-dark);
  font-size: 1.2rem;
  font-weight: 800;
}

.cp-logo-text span {
  font-size: 0.85rem;
  color: #64748b;
}

.cp-contract-no {
  text-align: right;
  background: var(--primary);
  color: #fff;
  padding: 16px 24px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 12px rgba(19, 23, 231, 0.2);
}

.cp-contract-no strong {
  font-size: 1.3rem;
  letter-spacing: 0.05em;
}

.cp-section {
  margin-bottom: 15px;
}

.cp-section-title {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--primary);
  border-bottom: 1.5px solid #f1f5f9;
  padding-bottom: 6px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cp-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.cp-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cp-field label {
  font-size: 0.7rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cp-field span {
  font-size: 0.88rem;
  font-weight: 600;
  color: #1e293b;
}

.cp-total {
  background: #f8fafc;
  border-radius: 12px;
  padding: 15px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
  border: 1px solid #e2e8f0;
}

.cp-total-label {
  font-weight: 800;
  font-size: 1.1rem;
  color: #1e293b;
}

.cp-total-val {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--primary);
}

.cp-terms {
  font-size: 0.75rem;
  color: #475569;
  line-height: 1.6;
  margin-top: 40px;
  background: #f8fafc;
  padding: 24px;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
}

.cp-sig-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 60px;
  text-align: center;
}

.cp-sig-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.sig-line {
  width: 100%;
  border-top: 2px solid #e2e8f0;
}

.cp-sig-block span {
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
}

.cp-footer {
  text-align: center;
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 20px;
  border-top: 1px dashed #f1f5f9;
  padding-top: 15px;
}

@page {
  size: A4;
  margin: 10mm;
}

@media print {
  body {
    background: white !important;
  }

  .main-content,
  .top-header,
  .sidebar,
  .toolbar,
  .filters,
  .btn-primary,
  .modal-close,
  .app-loader,
  .sidebar-overlay {
    display: none !important;
  }

  .contract-print {
    padding: 0;
    margin: 0;
    width: 100%;
    max-width: 100%;
  }

  .cp-total {
    background: #f1f5f9 !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}

/* ==========================================================
   Ÿš FULL SYSTEM RESPONSIVENESS BOOSTER
   Optimized for Phones, Tablets, and Small Laptops
   ========================================================== */

@media (max-width: 992px) {
  .hero-stats-bar {
    padding: 24px 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    border-radius: 16px;
  }

  .hero-main {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 16px;
    min-width: unset;
  }

  .hero-details {
    width: 100%;
  }

  .hero-detail-item {
    flex: 1;
    padding: 0 16px;
    border-left: none;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
  }

  .hero-detail-item:last-child {
    border-right: none;
  }
}

@media (max-width: 768px) {
  .hero-detail-item {
    flex: 0 0 calc(50% - 16px);
    width: 50%;
    padding: 12px 10px;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .hero-detail-item:nth-child(odd) {
    border-right: 1px solid rgba(255, 255, 255, 0.08);
  }

  .hero-detail-item:nth-last-child(-n+2) {
    border-bottom: none;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .top-header {
    padding: 0 16px;
  }

  .header-date {
    display: none;
  }

  .header-right {
    gap: 8px;
  }

  .page-navbar {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 12px;
    border-radius: 12px;
  }

  .nav-tabs {
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
  }

  .nav-tab-btn {
    flex: 1;
    min-width: 130px;
    justify-content: center;
    font-size: 0.8rem;
    padding: 10px 12px;
  }

  .nav-actions {
    display: flex;
    gap: 8px;
    width: 100%;
    border-top: 1px solid #f1f5f9;
    padding-top: 12px;
  }

  .nav-actions button {
    flex: 1;
    justify-content: center;
    white-space: nowrap;
    font-size: 0.75rem;
  }
}

@media (max-width: 576px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .page-toolbar {
    padding: 0;
    background: transparent;
    border: none;
  }

  .toolbar-left,
  .toolbar-right {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .search-box {
    width: 100%;
  }

  .btn-primary {
    width: 100%;
    justify-content: center;
  }

  .hero-detail-item {
    flex: 1 1 100%;
    width: 100%;
    padding: 12px 0;
    border: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
  }

  .hero-detail-item:last-child {
    border-bottom: none !important;
  }

  .modal-lg,
  .modal-xl {
    width: 100%;
    margin: 0;
    max-height: 100vh;
    border-radius: 0;
  }

  .modal-body {
    padding: 16px;
    overflow-y: auto;
  }

  .nav-tab-btn {
    min-width: calc(50% - 6px);
  }

  .page-title h2 {
    font-size: 0.9rem;
  }

  .page-title span {
    font-size: 0.7rem;
  }

  /* Radical Fix: Right-align on mobile to prevent left-side clipping */
  /* Radical Fix: Fixed position on smaller screens to prevent any clipping */
  .notif-dropdown {
    position: fixed !important;
    top: 64px !important;
    /* Right below header */
    right: 12px !important;
    left: 12px !important;
    width: auto !important;
    max-width: 400px !important;
    margin: 0 auto !important;
    transform: none !important;
    z-index: 100000 !important;
    border-radius: 20px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4) !important;
    background: #fff !important;
    display: none;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
  }

  .notif-dropdown.show {
    display: flex;
  }

  .notif-item {
    padding: 18px 20px !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 15px !important;
    min-width: 0 !important;
    align-items: flex-start !important;
    text-align: left !important;
  }

  .notif-icon {
    width: 36px !important;
    height: 36px !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
  }

  .ni-text {
    flex: 1 !important;
    min-width: 0 !important;
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
    color: var(--text) !important;
    white-space: normal !important;
    word-break: break-word !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .notif-header {
    background: #f8fafc !important;
    padding: 15px 20px !important;
    border-bottom: 2px solid #f1f5f9 !important;
  }
}

/* Fix for mobile image overflow and general containers */
img {
  max-width: 100%;
  height: auto;
}

.main-content {
  min-width: 0;
  width: 100%;
}

.page-content {
  overflow-x: hidden;
}

/* Enhanced Scrolling for Mobile Tables - Ensuring consistency */
.table-wrapper {
  mask-image: linear-gradient(to right, rgba(0, 0, 0, 1) 95%, rgba(0, 0, 0, 0));
  -webkit-mask-image: linear-gradient(to right, rgba(0, 0, 0, 1) 95%, rgba(0, 0, 0, 0));
}

/* ==========================================================
   Ÿš SYSTEM-WIDE RESPONSIVE MOBILE TABLES (TABLE -> CARDS)
   ========================================================== */
@media (max-width: 768px) {

  .data-table,
  .data-table thead,
  .data-table tbody,
  .data-table th,
  .data-table td,
  .data-table tr {
    display: block;
  }

  .data-table thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }

  .data-table tr {
    margin-bottom: 16px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
    position: relative;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
  }

  .data-table tr:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    transform: translateY(-2px);
  }

  .data-table td {
    border: none !important;
    border-bottom: 1px solid #f1f5f9 !important;
    padding: 10px 0 !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    gap: 16px;
    text-align: right;
  }

  .data-table td:last-child {
    border-bottom: none !important;
    padding-bottom: 0 !important;
    justify-content: flex-end;
  }

  .data-table td:first-child {
    padding-top: 0 !important;
  }

  /* Pseudo element for label inserted via JS later */
  .data-table td::before {
    content: attr(data-label);
    font-weight: 700;
    color: #64748b;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-align: left;
    white-space: nowrap;
  }

  .table-wrapper {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
    mask-image: none;
    -webkit-mask-image: none;
  }
}


/* Fix for overlapping card headers and filters */
.card-header {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  align-items: center !important;
  justify-content: space-between !important;
  height: auto !important;
  min-height: 44px;
}

.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

@media (max-width: 576px) {
  .card-header h3 {
    width: 100%;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 8px;
    margin-bottom: 4px;
  }

  .header-actions {
    width: 100%;
    gap: 6px;
  }

  .header-actions>*:not(.btn-sm) {
    flex: 1;
    min-width: calc(50% - 6px);
  }

  .header-actions .btn-sm {
    width: 100%;
    justify-content: center;
  }
}


/* Premium Image Upload */
.image-upload-premium {
  border: 2px dashed #cbd5e1;
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: #fbfcfe;
  margin-bottom: 24px;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  min-height: 160px;
}

.image-upload-premium:hover {
  border-color: var(--primary);
  background: #f0f7ff;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(19, 23, 231, 0.05);
}

.image-preview-box {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 12px;
  width: 100%;
}

.icon-placeholder {
  font-size: 2.8rem;
  color: #94a3b8;
  transition: all 0.3s ease;
}

.image-upload-premium:hover .icon-placeholder {
  color: var(--primary);
  transform: scale(1.1);
}

.upload-trigger-text {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px;
}

.upload-trigger-text strong {
  font-size: 1.05rem;
  color: #1e293b;
  font-weight: 700;
}

.upload-trigger-text span {
  font-size: 0.8rem;
  color: #64748b;
  font-weight: 500;
}

/* Updated Contract Print Styles with Auto-Pagination */
.contract-print .cp-section,
.contract-print .cp-total,
.contract-print .cp-sig-row {
  page-break-inside: avoid !important;
  break-inside: avoid !important;
}

.contract-print .cp-sig-row {
  display: flex !important;
  justify-content: space-between !important;
  gap: 10px !important;
  margin-top: 40px !important;
  text-align: center !important;
}

.contract-print .cp-sig-block {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 6px !important;
}

.contract-print .sig-line {
  width: 100% !important;
  border-bottom: 2px solid #334155 !important;
  height: 40px !important;
  margin-bottom: 6px !important;
}

.contract-print .cp-sig-block span {
  font-size: 0.62rem !important;
  font-weight: 800 !important;
  color: #1e293b !important;
  text-transform: uppercase !important;
  letter-spacing: 0.02em !important;
}

.cp-section-title {
  color: #1317E7 !important;
  border-bottom: 2px solid #f1f5f9 !important;
  padding-bottom: 4px !important;
  margin-bottom: 12px !important;
  font-weight: 800 !important;
}

.contract-print {
  font-family: 'Inter', sans-serif !important;
  color: #0f172a !important;
}

/* Vehicle Image Gallery */
.gallery-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
  gap: 12px !important;
  width: 100% !important;
  padding: 8px !important;
}

.gallery-item {
  position: relative !important;
  aspect-ratio: 4/3 !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  border: 2px solid #f1f5f9 !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
}

.gallery-item:hover {
  border-color: var(--primary) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 10px 15px -3px rgba(19, 23, 231, 0.15) !important;
}

.gallery-item img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.img-remove {
  position: absolute !important;
  top: 6px !important;
  right: 6px !important;
  background: rgba(239, 68, 68, 0.95) !important;
  color: white !important;
  border: none !important;
  width: 24px !important;
  height: 24px !important;
  border-radius: 50% !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  z-index: 10 !important;
}

.img-remove:hover {
  background: #ef4444 !important;
  transform: scale(1.1) !important;
}

.gallery-add {
  aspect-ratio: 4/3 !important;
  background: #f8fafc !important;
  border: 2px dashed #cbd5e1 !important;
  border-radius: 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #64748b !important;
  cursor: pointer !important;
  font-size: 1.8rem !important;
  transition: all 0.2s ease !important;
}

.gallery-add:hover {
  background: #eff6ff !important;
  border-color: var(--primary) !important;
  color: var(--primary) !important;
}

/* Image Comparison in Contract Document */
.contract-comparison-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 16px !important;
  margin-top: 16px !important;
}

.id-view-box {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  padding: 12px !important;
  display: flex !important;
  flex-direction: column !important;
}

.id-view-box .id-card-img {
  width: 100% !important;
  aspect-ratio: 3/2 !important;
  object-fit: contain !important;
  border-radius: 8px !important;
  background: #fff !important;
  border: 1px solid #f1f5f9 !important;
}

.id-view-label {
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  color: #64748b !important;
  text-transform: uppercase !important;
  margin-bottom: 8px !important;

  letter-spacing: 0.05em !important;
}

/* Force-Fix for Notification Clipping Mobile */
@media (max-width: 600px) {
  #notifDropdown {
    position: fixed !important;
    top: 75px !important;
    right: 15px !important;
    left: 15px !important;
    width: auto !important;
    max-width: none !important;
    z-index: 999999 !important;
    background: white !important;
    border: 2px solid #1317E7 !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5) !important;
    border-radius: 12px !important;
    transform: none !important;
  }

  .notif-item {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  .ni-text strong {
    display: inline-block !important;
    margin-left: 0 !important;
  }
}

/* ===== OVERRIDE ALL EXTERNAL TABLES ===== */
.page-content .table-wrapper {
  background: #ffffff !important;
  border-radius: 16px !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
  overflow-x: auto !important;
  margin-top: 15px !important;
  margin-bottom: 30px !important;
}

.page-content .data-table {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  margin: 0 !important;
  background: #fff !important;
}

.page-content .data-table th {
  background: #f8fafc !important;
  border-bottom: 2px solid #e2e8f0 !important;
  font-weight: 800 !important;
  color: #475569 !important;
  padding: 18px 24px !important;
  font-size: 0.75rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  text-align: left !important;
}

.page-content .data-table td {
  padding: 18px 24px !important;
  border-bottom: 1px solid #f1f5f9 !important;
  font-weight: 500 !important;
  color: #1e293b !important;
  vertical-align: middle !important;
  transition: all 0.2s ease !important;
  background: #fff !important;
}

.page-content .data-table tr:hover td {
  background: #eff6ff !important;
}

.page-content .data-table tr:last-child td {
  border-bottom: none !important;
}

/* ===== ROLE BADGES ===== */
.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
}

.role-badge.superadmin {
  background: #fef2f2;
  color: #dc2626;
}

.role-badge.manager {
  background: #fefce8;
  color: #ca8a04;
}

.role-badge.staff {
  background: #eff6ff;
  color: #2563eb;
}

.role-badge.worker {
  background: #f5f3ff;
  color: #7c3aed;
}

.role-badge.receptionist {
  background: #ecfeff;
  color: #0891b2;
}

/* ”” VENDOR MODULE: STAT CARDS & STATEMENT ”” */
.vendor-stat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition);
}

.vendor-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.v-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.v-stat-info h4 {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
}

.v-stat-info .v-val {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
  margin-top: 2px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 30px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.badge.income {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.badge.expense {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

#vendorLedgerBody tr td {
  vertical-align: middle;
  padding: 12px 10px;
  position: relative;
}

#vendorLedgerBody tr:hover {
  background: #f8fafc;
}

/* Fixed badge to avoid absolute positioning conflicts */
.v-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.v-badge.income {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.v-badge.expense {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.vendor-stat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition);
  min-width: 0;
}

.v-stat-info {
  overflow: hidden;
}

.v-stat-info .v-val {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}