/* ============================================
   vita ERP - Kodnova Style Dark Theme
   ============================================ */

/* CSS Variables */
:root {
  /* Dark Theme Colors */
  --bg-primary: #1a1d21;
  --bg-secondary: #22262b;
  --bg-tertiary: #2a2f35;
  --bg-card: #262a30;
  --bg-hover: #2f343a;
  --bg-input: #1e2227;
  
  /* Text Colors */
  --text-primary: #ffffff;
  --text-secondary: #a0a4a8;
  --text-muted: #6c7278;
  --text-light: #8a8f94;
  
  /* Accent Colors */
  --accent-primary: #00d9ff;
  --accent-secondary: #00b8d9;
  --accent-green: #00d68f;
  --accent-red: #ff3d71;
  --accent-orange: #ffaa00;
  --accent-purple: #9c6ade;
  --accent-blue: #3366ff;
  
  /* Status Colors */
  --status-active: #00d68f;
  --status-inactive: #ff3d71;
  --status-warning: #ffaa00;
  --status-info: #00d9ff;
  
  /* Border */
  --border-color: #363b42;
  --border-light: #2f343a;
  
  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
  
  /* Spacing */
  --sidebar-width: 260px;
  --sidebar-collapsed-width: 70px;
  --header-height: 56px;
  
  /* Font */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.4s ease;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 14px;
}

body {
  font-family: var(--font-family);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  font-family: inherit;
}

input, select, textarea, button {
  font-family: inherit;
  font-size: inherit;
}

.hidden {
  display: none !important;
}

/* ============================================
   Login Screen
   ============================================ */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-primary) 0%, #0f1114 100%);
  position: relative;
  overflow: hidden;
}

.login-bg {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(0, 217, 255, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(0, 214, 143, 0.08) 0%, transparent 50%);
}

.login-particles {
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle, var(--accent-primary) 1px, transparent 1px),
    radial-gradient(circle, var(--accent-green) 1px, transparent 1px);
  background-size: 80px 80px, 60px 60px;
  background-position: 0 0, 30px 30px;
  opacity: 0.03;
}

.login-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: 2.5rem;
  background: var(--bg-secondary);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
}

.login-brand {
  text-align: center;
  margin-bottom: 2rem;
}

.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}

.logo-text {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent-primary);
  letter-spacing: -1px;
}

.logo-badge {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-green));
  color: var(--bg-primary);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  margin-left: 4px;
}

.login-brand p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

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

.login-form label {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
}

.input-icon {
  position: relative;
}

.input-icon i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
}

.input-icon input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

.input-icon input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(0, 217, 255, 0.15);
}

.input-icon input::placeholder {
  color: var(--text-muted);
}

.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-primary);
}

.form-check label {
  color: var(--text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
}

.login-hint {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: var(--bg-primary);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 217, 255, 0.3);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-hover);
}

.btn-accent {
  background: var(--accent-primary);
  color: var(--bg-primary);
  font-weight: 600;
}

.btn-accent:hover {
  background: var(--accent-secondary);
}

.btn-outline-accent {
  background: transparent;
  color: var(--accent-primary);
  border: 1px solid var(--accent-primary);
}

.btn-outline-accent:hover {
  background: rgba(0, 217, 255, 0.1);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.85rem;
}

.btn-icon {
  padding: 8px 10px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-secondary);
}

.btn-icon:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* ============================================
   Top Header
   ============================================ */
.top-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 1000;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sidebar-toggle {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.2rem;
  padding: 8px;
  border-radius: 6px;
  transition: var(--transition-fast);
}

.sidebar-toggle:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

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

.brand-text {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent-primary);
  letter-spacing: -0.5px;
}

.brand-badge {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-green));
  color: var(--bg-primary);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
}

.header-company {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--bg-tertiary);
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
}

.header-company:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.header-company i:first-child {
  color: var(--accent-primary);
}

.header-center {
  display: flex;
  align-items: center;
  gap: 20px;
}

.year-selector select {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
}

.header-link {
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
}

.header-link:hover {
  color: var(--accent-primary);
}

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

.header-search {
  position: relative;
}

.header-search i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.header-search input {
  width: 200px;
  padding: 8px 12px 8px 36px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  transition: var(--transition-fast);
}

.header-search input:focus {
  outline: none;
  border-color: var(--accent-primary);
  width: 260px;
}

.header-notifications {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  transition: var(--transition-fast);
}

.header-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.header-btn.whats-new {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-green));
  color: var(--bg-primary);
  border: none;
  font-weight: 600;
}

.header-btn.quick-actions {
  background: var(--accent-orange);
  color: var(--bg-primary);
  border: none;
  font-weight: 600;
}

.notification-count {
  background: var(--accent-red);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  background: var(--bg-tertiary);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.header-user:hover {
  background: var(--bg-hover);
}

.user-avatar {
  width: 32px;
  height: 32px;
  background: var(--accent-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-primary);
  font-size: 0.9rem;
}

.user-name {
  color: var(--text-primary);
  font-weight: 500;
}

.header-date {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.header-date i {
  color: var(--accent-primary);
}

/* ============================================
   App Layout
   ============================================ */
.app {
  min-height: 100vh;
}

.app-body {
  display: flex;
  padding-top: var(--header-height);
}

/* ============================================
   Sidebar
   ============================================ */
.sidebar {
  position: fixed;
  top: var(--header-height);
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 900;
  transition: var(--transition-normal);
}

.sidebar::-webkit-scrollbar {
  width: 4px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 2px;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
}

/* Nav Item */
.nav-item {
  margin: 2px 8px;
}

.nav-item > a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  color: var(--text-secondary);
  border-radius: 8px;
  transition: var(--transition-fast);
}

.nav-item > a:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav-item.active > a {
  background: rgba(0, 217, 255, 0.1);
  color: var(--accent-primary);
}

.nav-item > a i {
  width: 20px;
  font-size: 1rem;
  text-align: center;
}

/* Nav Group */
.nav-group {
  margin: 2px 8px;
}

.nav-group-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  color: var(--text-secondary);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.nav-group-header:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav-group-header i:first-child {
  width: 20px;
  font-size: 1rem;
  text-align: center;
}

.nav-group-header span {
  flex: 1;
}

.group-arrow {
  font-size: 0.7rem;
  transition: var(--transition-fast);
}

.nav-group.open .group-arrow {
  transform: rotate(90deg);
}

.nav-group.open > .nav-group-header {
  color: var(--accent-primary);
}

.nav-group-content {
  display: none;
  padding-left: 20px;
}

.nav-group.open .nav-group-content {
  display: block;
}

.nav-group-content .nav-item > a {
  padding: 8px 16px;
  font-size: 0.9rem;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-primary);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-details {
  display: flex;
  flex-direction: column;
}

.user-details .user-name {
  font-size: 0.9rem;
  font-weight: 500;
}

.user-details .user-role {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.btn-logout {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.btn-logout:hover {
  background: var(--accent-red);
  border-color: var(--accent-red);
  color: white;
}

/* ============================================
   Main Content
   ============================================ */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: calc(100vh - var(--header-height));
  padding: 20px;
  background: var(--bg-primary);
  transition: var(--transition-normal);
}

/* Page */
.page {
  display: none;
}

.page.active {
  display: block;
}

/* Page Breadcrumb */
.page-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 20px;
}

.page-breadcrumb i {
  font-size: 0.7rem;
}

.page-breadcrumb span:last-child:not(.erp-demo-badge) {
  color: var(--text-primary);
}

.erp-demo-badge {
  margin-left: auto;
  background: var(--bg-tertiary);
  padding: 4px 12px;
  border-radius: 4px;
  color: var(--text-secondary);
  font-size: 0.8rem;
}

/* Page Header */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.page-header h1 {
  font-size: 1.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
}

.page-header h1 i {
  color: var(--accent-primary);
}

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

/* ============================================
   Dashboard Stats
   ============================================ */
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--border-color);
}

.stat-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 12px;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
}

.stat-label {
  font-size: 1rem;
  font-weight: 600;
  align-self: flex-end;
  margin-bottom: 4px;
}

.stat-sublabel {
  font-size: 0.85rem;
  color: var(--text-secondary);
  align-self: flex-end;
  margin-bottom: 4px;
}

.stat-icon {
  margin-left: auto;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--text-muted);
}

.stat-details {
  display: flex;
  gap: 16px;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.stat-details span span {
  color: var(--text-primary);
  font-weight: 500;
}

.stat-footer {
  display: flex;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 0.8rem;
}

.stat-footer span:last-child {
  color: var(--text-primary);
  font-weight: 600;
}

/* Stat Colors */
.stat-personnel .stat-value,
.stat-personnel .stat-label {
  color: var(--accent-primary);
}

.stat-service .stat-value,
.stat-service .stat-label {
  color: var(--accent-red);
}

.stat-vehicle .stat-value,
.stat-vehicle .stat-label {
  color: var(--accent-green);
}

.stat-occupancy .stat-value,
.stat-occupancy .stat-label {
  color: var(--accent-purple);
}

/* ============================================
   Dashboard Grid
   ============================================ */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.dashboard-card {
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
}

.card-header h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

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

.card-body {
  padding: 20px;
}

/* Dashboard Map */
.dashboard-map {
  height: 350px;
  border-radius: 8px;
  background: var(--bg-tertiary);
}

.map-footer {
  margin-top: 12px;
  text-align: center;
}

.vita-drive {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.vita-drive i {
  color: var(--accent-primary);
  margin-right: 6px;
}

/* Daily Operations */
.daily-card .card-header {
  padding: 12px 16px;
}

.daily-operations-list {
  min-height: 350px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 350px;
  color: var(--text-muted);
}

.empty-dots {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.empty-dots .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.empty-dots .dot:first-child {
  background: var(--text-muted);
}

.empty-dots .dot:last-child {
  background: var(--accent-green);
}

/* Info Tip */
.info-tip {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 16px 20px;
  border: 1px solid var(--border-color);
  display: flex;
  gap: 16px;
}

.tip-badge {
  background: var(--accent-orange);
  color: var(--bg-primary);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  height: fit-content;
}

.tip-content p:first-child {
  font-weight: 600;
  margin-bottom: 4px;
}

.tip-content p:last-child {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ============================================
   Forms
   ============================================ */
.form-input, .form-select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  transition: var(--transition-fast);
}

.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(0, 217, 255, 0.15);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input-sm {
  padding: 6px 10px;
  font-size: 0.85rem;
}

.form-select-sm {
  padding: 6px 10px;
  font-size: 0.85rem;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}

.form-row {
  display: flex;
  gap: 16px;
}

.form-row .form-group {
  flex: 1;
}

.form-group.full-width {
  flex: 1 1 100%;
}

.form-group small {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

/* ============================================
   Data Tables
   ============================================ */
.data-filters {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-group {
  min-width: 180px;
}

.filter-group input,
.filter-group select {
  width: 100%;
}

.filter-btn {
  white-space: nowrap;
}

.data-table-container {
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead {
  background: var(--bg-tertiary);
}

.data-table th {
  padding: 14px 16px;
  text-align: left;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.9rem;
}

.data-table tbody tr:hover {
  background: var(--bg-hover);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table .select-all,
.data-table input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-primary);
}

.table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-tertiary);
}

.pagination-info {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-number {
  padding: 4px 12px;
  background: var(--accent-primary);
  color: var(--bg-primary);
  border-radius: 4px;
  font-weight: 600;
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.status-badge.active {
  background: rgba(0, 214, 143, 0.15);
  color: var(--status-active);
}

.status-badge.inactive {
  background: rgba(255, 61, 113, 0.15);
  color: var(--status-inactive);
}

.status-badge.warning {
  background: rgba(255, 170, 0, 0.15);
  color: var(--status-warning);
}

.status-badge.maintenance {
  background: rgba(255, 170, 0, 0.15);
  color: var(--status-warning);
}

/* Action Buttons */
.action-btns {
  display: flex;
  gap: 4px;
}

.action-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 6px;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.action-btn:hover {
  background: var(--accent-primary);
  color: var(--bg-primary);
}

.action-btn.delete:hover {
  background: var(--accent-red);
}

/* ============================================
   Live Tracking
   ============================================ */
.tracking-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  height: calc(100vh - 200px);
}

.tracking-sidebar {
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.vehicle-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
}

.vehicle-list-header h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
}

.vehicle-list-header h4 i {
  color: var(--accent-primary);
}

.vehicle-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.vehicle-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.vehicle-list-item:hover {
  background: var(--bg-hover);
}

.vehicle-list-item.active {
  background: rgba(0, 217, 255, 0.1);
}

.vehicle-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.vehicle-status-dot.online {
  background: var(--status-active);
  box-shadow: 0 0 8px var(--status-active);
}

.vehicle-status-dot.offline {
  background: var(--text-muted);
}

.vehicle-status-dot.moving {
  background: var(--accent-primary);
  box-shadow: 0 0 8px var(--accent-primary);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.vehicle-info {
  flex: 1;
  min-width: 0;
}

.vehicle-plate {
  font-weight: 600;
  color: var(--text-primary);
}

.vehicle-driver {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.tracking-map-container {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.tracking-map {
  height: 100%;
  min-height: 500px;
}

.map-legend {
  position: absolute;
  bottom: 16px;
  left: 16px;
  background: var(--bg-secondary);
  padding: 12px 16px;
  border-radius: 8px;
  display: flex;
  gap: 16px;
  z-index: 500;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.legend-color {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-color.online {
  background: var(--status-active);
}

.legend-color.offline {
  background: var(--text-muted);
}

.legend-color.moving {
  background: var(--accent-primary);
}

/* ============================================
   Routes Page
   ============================================ */
.routes-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  height: calc(100vh - 250px);
}

.routes-list-panel {
  overflow: hidden;
}

.routes-map-panel {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.routes-map {
  height: 100%;
  min-height: 400px;
}

.routes-list {
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  padding: 16px;
  height: 100%;
  overflow-y: auto;
}

/* ============================================
   Customers Grid
   ============================================ */
.customers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.customer-card {
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: var(--transition-fast);
}

.customer-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

.customer-header {
  padding: 20px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
}

.customer-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.customer-type {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.customer-body {
  padding: 16px 20px;
}

.customer-stat {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
}

.customer-stat:last-child {
  border-bottom: none;
}

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

.customer-stat-value {
  font-weight: 600;
}

.customer-footer {
  padding: 12px 20px;
  display: flex;
  gap: 8px;
  border-top: 1px solid var(--border-color);
}

/* ============================================
   Settings
   ============================================ */
.settings-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  background: var(--bg-card);
  padding: 4px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.settings-tab {
  flex: 1;
  padding: 12px 20px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--text-secondary);
  font-weight: 500;
  transition: var(--transition-fast);
}

.settings-tab:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.settings-tab.active {
  background: var(--accent-primary);
  color: var(--bg-primary);
}

.settings-content {
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  padding: 24px;
}

.settings-panel {
  display: none;
}

.settings-panel.active {
  display: block;
}

.settings-section {
  margin-bottom: 32px;
}

.settings-section:last-child {
  margin-bottom: 0;
}

.settings-section h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-section h3 i {
  color: var(--accent-primary);
}

.section-desc {
  color: var(--text-muted);
  margin-bottom: 16px;
}

.settings-actions {
  margin-top: 24px;
}

.arvento-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 12px;
  background: var(--bg-tertiary);
  border-radius: 8px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.status-dot.online {
  background: var(--status-active);
}

.status-dot.offline {
  background: var(--text-muted);
}

/* ============================================
   Expense Summary
   ============================================ */
.expense-summary {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.summary-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--border-color);
  text-align: center;
}

.summary-card i {
  font-size: 1.5rem;
  color: var(--accent-primary);
  margin-bottom: 8px;
}

.summary-card .summary-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.summary-card .summary-label {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.summary-card.total {
  background: var(--accent-primary);
}

.summary-card.total i,
.summary-card.total .summary-value,
.summary-card.total .summary-label {
  color: var(--bg-primary);
}

/* ============================================
   Coming Soon
   ============================================ */
.coming-soon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

.coming-soon i {
  font-size: 4rem;
  margin-bottom: 16px;
  color: var(--accent-primary);
  opacity: 0.5;
}

.coming-soon p {
  font-size: 1.1rem;
}

/* ============================================
   Modal
   ============================================ */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  background: var(--bg-secondary);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

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

.modal-header h2 {
  font-size: 1.25rem;
}

.modal-close {
  width: 36px;
  height: 36px;
  background: var(--bg-tertiary);
  border: none;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.modal-close:hover {
  background: var(--accent-red);
  color: white;
}

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

/* ============================================
   Toast
   ============================================ */
.toast-container {
  position: fixed;
  top: calc(var(--header-height) + 16px);
  right: 16px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  min-width: 300px;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.toast.success {
  border-left: 4px solid var(--status-active);
}

.toast.error {
  border-left: 4px solid var(--status-inactive);
}

.toast.warning {
  border-left: 4px solid var(--status-warning);
}

.toast.info {
  border-left: 4px solid var(--status-info);
}

.toast-icon {
  font-size: 1.2rem;
}

.toast.success .toast-icon {
  color: var(--status-active);
}

.toast.error .toast-icon {
  color: var(--status-inactive);
}

.toast.warning .toast-icon {
  color: var(--status-warning);
}

.toast.info .toast-icon {
  color: var(--status-info);
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-weight: 600;
  margin-bottom: 2px;
}

.toast-message {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

.toast-close:hover {
  color: var(--text-primary);
}

/* ============================================
   Leaflet Map Customization
   ============================================ */
.leaflet-container {
  background: var(--bg-tertiary) !important;
  font-family: var(--font-family);
}

.leaflet-popup-content-wrapper {
  background: var(--bg-secondary);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.leaflet-popup-content {
  color: var(--text-primary);
  margin: 12px 16px;
}

.leaflet-popup-tip {
  background: var(--bg-secondary);
}

.custom-vehicle-marker {
  background: var(--accent-primary);
  border: 3px solid white;
  border-radius: 50%;
  width: 36px !important;
  height: 36px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--bg-primary);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.custom-vehicle-marker.offline {
  background: var(--text-muted);
}

.custom-vehicle-marker.moving {
  animation: markerPulse 2s infinite;
}

@keyframes markerPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(0, 217, 255, 0.4);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(0, 217, 255, 0);
  }
}

/* ============================================
   Badge
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  background: var(--accent-primary);
  color: var(--bg-primary);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 12px;
}

.badge-primary {
  background: var(--accent-primary);
}

.badge-success {
  background: var(--status-active);
}

.badge-danger {
  background: var(--status-inactive);
}

.badge-warning {
  background: var(--status-warning);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1400px) {
  .dashboard-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .expense-summary {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1200px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  
  .routes-layout,
  .tracking-layout {
    grid-template-columns: 1fr;
  }
  
  .tracking-sidebar {
    max-height: 300px;
  }
}

@media (max-width: 992px) {
  .sidebar {
    transform: translateX(-100%);
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .header-center,
  .header-notifications {
    display: none;
  }
}

@media (max-width: 768px) {
  .dashboard-stats {
    grid-template-columns: 1fr;
  }
  
  .header-search {
    display: none;
  }
  
  .expense-summary {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .form-row {
    flex-direction: column;
  }
  
  .settings-tabs {
    flex-wrap: wrap;
  }
}
