@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* ═══════════════════════════════════
   GARAGI STETIC CAR - Design System
   ═══════════════════════════════════ */

:root {
  --primary-black: #121212;
  --primary-orange: #FF6A00;
  --orange-hover: #ff8533;
  --orange-light: #ffaa66;
  --secondary-gray: #737070;
  --dark-gray: #1a1a1a;
  --light-gray: #2a2a2a;
  --border-gray: #333333;
  --text-light: #e5e5e5;
  --text-muted: #a0a0a0;
  --text-dark: #6b6b6b;
  --success: #22c55e;
  --warning: #fbbf24;
  --danger: #ef4444;
  --info: #3b82f6;
  --purple: #a855f7;
  --sidebar-width: 260px;
  --header-height: 70px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 12px 40px rgba(255, 106, 0, 0.2);
  --transition: all 0.3s ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--primary-black);
  color: var(--text-light);
  overflow-x: hidden;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

ul,
ol {
  list-style: none;
}

/* ───── LAYOUT ───── */
.app-wrapper {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-area {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.top-header {
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: fixed;
  top: 0;
  right: 0;
  left: var(--sidebar-width);
  z-index: 50;
}

.main-content {
  flex: 1;
  padding: 24px;
  margin-top: var(--header-height);
  animation: fadeInUp 0.5s ease-out;
}

/* ───── SIDEBAR ───── */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px;
}

.sidebar-logo-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--primary-orange), var(--orange-hover));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.sidebar-logo-text h1 {
  font-size: 1.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-orange), var(--orange-hover));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.sidebar-logo-text p {
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 3px;
  text-transform: uppercase;
}

.sidebar-nav {
  flex: 1;
  padding: 0 12px;
  overflow-y: auto;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--transition);
  margin-bottom: 4px;
}

.sidebar-nav a:hover {
  background: rgba(255, 106, 0, 0.1);
  color: var(--primary-orange);
}

.sidebar-nav a.active {
  background: var(--primary-orange);
  color: #fff;
  box-shadow: 0 4px 15px rgba(255, 106, 0, 0.3);
}

.sidebar-nav a svg,
.sidebar-nav a i {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
}

.sidebar-footer p {
  font-size: 0.7rem;
  color: var(--text-dark);
}

/* ───── HEADER ───── */
.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-left h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
}

.header-left p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  position: relative;
}

.header-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.notification-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: var(--primary-orange);
  border-radius: 50%;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-user-info {
  text-align: right;
}

.header-user-info strong {
  font-size: 0.85rem;
  color: #fff;
  display: block;
}

.header-user-info span {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.header-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary-orange), var(--orange-hover));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.sidebar-close-btn {
  display: none;
  position: absolute;
  top: 20px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  z-index: 101;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 99;
}

/* ───── CARDS ───── */
.glass-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.glass-card.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.stat-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-card .stat-info p:first-child {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-card .stat-info .stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  margin-top: 4px;
}

.stat-card .stat-info .stat-sub {
  font-size: 0.75rem;
  color: var(--text-dark);
  margin-top: 2px;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.stat-icon.orange {
  background: linear-gradient(135deg, var(--primary-orange), var(--orange-hover));
}

.stat-icon.green {
  background: var(--success);
}

.stat-icon.blue {
  background: var(--info);
}

.stat-icon.yellow {
  background: var(--warning);
}

.stat-icon.purple {
  background: var(--purple);
}

.stat-icon.red {
  background: var(--danger);
}

/* ───── GRID ───── */
.grid {
  display: grid;
  gap: 24px;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* ───── BUTTONS ───── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.88rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn svg,
.btn i {
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: var(--primary-orange);
  color: #fff;
}

.btn-primary:hover {
  background: var(--orange-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 106, 0, 0.3);
}

.btn-secondary {
  background: var(--light-gray);
  color: var(--text-light);
  border: 1px solid var(--border-gray);
}

.btn-secondary:hover {
  background: var(--border-gray);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
}

.btn-ghost {
  background: none;
  color: var(--text-muted);
  padding: 8px;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 8px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.btn-icon.edit:hover {
  color: var(--info);
  background: rgba(59, 130, 246, 0.1);
}

.btn-icon.delete:hover {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
}

/* ───── FORM ELEMENTS ───── */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-control,
.form-input,
.form-select {
  width: 100%;
  padding: 12px 16px;
  background: var(--light-gray);
  border: 1px solid var(--border-gray);
  border-radius: var(--radius);
  color: var(--text-light);
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  transition: var(--transition);
  outline: none;
}

.form-control:focus,
.form-input:focus,
.form-select:focus {
  border-color: var(--primary-orange);
  box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.1);
}

.form-control::placeholder,
.form-input::placeholder {
  color: var(--text-dark);
}

select.form-control,
select.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%236b6b6b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 36px;
}

select.form-control option,
select.form-select option {
  background: var(--dark-gray);
  color: var(--text-light);
}

textarea.form-control,
textarea.form-input {
  resize: vertical;
  min-height: 80px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.form-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-orange);
  cursor: pointer;
}

/* ───── SEARCH BAR ───── */
.search-bar {
  position: relative;
}

.search-bar svg,
.search-bar i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-bar input {
  padding-left: 44px;
}

/* ───── FILTERS BAR ───── */
.filters-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

/* ───── STATUS BADGES ───── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-confirmed,
.badge-completed,
.badge-paid,
.badge-success {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
}

.badge-pending,
.badge-open {
  background: rgba(251, 191, 36, 0.15);
  color: var(--warning);
}

.badge-in_progress,
.badge-partial {
  background: rgba(59, 130, 246, 0.15);
  color: var(--info);
}

.badge-cancelled,
.badge-refunded,
.badge-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

.badge-vip {
  background: rgba(251, 191, 36, 0.15);
  color: var(--warning);
}

/* ───── TABLES ───── */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.data-table thead th {
  padding: 14px 16px;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.data-table tbody tr {
  transition: var(--transition);
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.data-table tbody td {
  padding: 14px 16px;
  font-size: 0.88rem;
  color: var(--text-light);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

.data-table .actions {
  display: flex;
  gap: 4px;
}

/* ───── MODAL ───── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--dark-gray);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
  transform: translateY(30px) scale(0.95);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 24px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.modal-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px 24px;
}

/* ───── TOAST NOTIFICATIONS ───── */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  background: var(--dark-gray);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 16px 20px;
  min-width: 320px;
  max-width: 420px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  pointer-events: auto;
  animation: toastIn 0.4s ease;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.toast.toast-out {
  animation: toastOut 0.3s ease forwards;
}

.toast-success {
  border-left: 4px solid var(--success);
}

.toast-error {
  border-left: 4px solid var(--danger);
}

.toast-warning {
  border-left: 4px solid var(--warning);
}

.toast-info {
  border-left: 4px solid var(--info);
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: #fff;
  margin-bottom: 2px;
}

.toast-message {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px;
  line-height: 1;
  font-size: 1.1rem;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(100px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0;
    transform: translateX(100px);
  }
}

/* ───── PAGE HEADER ───── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.page-header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
}

.page-header p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ───── EMPTY STATE ───── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-state svg {
  width: 64px;
  height: 64px;
  color: var(--text-dark);
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 0.9rem;
  color: var(--text-dark);
  margin-bottom: 24px;
}

/* ───── LOGIN PAGE ───── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-black) 0%, var(--dark-gray) 50%, var(--primary-black) 100%);
  padding: 20px;
}

.login-container {
  width: 100%;
  max-width: 420px;
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
  animation: fadeInUp 0.6s ease;
}

.login-logo-icon {
  display: inline-flex;
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--primary-orange), var(--orange-hover));
  border-radius: var(--radius-lg);
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-bottom: 16px;
}

.login-logo h1 {
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-orange), var(--orange-hover));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-logo p {
  color: var(--text-muted);
  letter-spacing: 2px;
  font-size: 0.85rem;
}

.login-card {
  animation: fadeInUp 0.6s ease 0.15s both;
}

.login-card h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  margin-bottom: 24px;
}

.login-card .password-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

.login-card .password-toggle:hover {
  color: #fff;
}

.login-footer {
  text-align: center;
  margin-top: 20px;
}

.login-footer a {
  color: var(--primary-orange);
  font-weight: 500;
}

.login-footer a:hover {
  color: var(--orange-hover);
}

.demo-credentials {
  margin-top: 20px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
}

.demo-credentials p:first-child {
  font-size: 0.75rem;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.demo-credentials .creds {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.demo-credentials strong {
  color: var(--text-light);
}

/* ───── QUICK ACTIONS ───── */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.quick-action-btn {
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: none;
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
  font-family: 'Poppins', sans-serif;
}

.quick-action-btn svg {
  width: 32px;
  height: 32px;
  margin-bottom: 8px;
  transition: transform 0.3s ease;
}

.quick-action-btn p {
  font-size: 0.82rem;
  font-weight: 500;
  color: #fff;
}

.quick-action-btn:hover svg {
  transform: scale(1.15);
}

.quick-action-btn.orange {
  background: rgba(255, 106, 0, 0.12);
  border-color: rgba(255, 106, 0, 0.25);
  color: var(--primary-orange);
}

.quick-action-btn.orange:hover {
  background: rgba(255, 106, 0, 0.2);
}

.quick-action-btn.blue {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.25);
  color: var(--info);
}

.quick-action-btn.blue:hover {
  background: rgba(59, 130, 246, 0.2);
}

.quick-action-btn.green {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.25);
  color: var(--success);
}

.quick-action-btn.green:hover {
  background: rgba(34, 197, 94, 0.2);
}

.quick-action-btn.purple {
  background: rgba(168, 85, 247, 0.12);
  border-color: rgba(168, 85, 247, 0.25);
  color: var(--purple);
}

.quick-action-btn.purple:hover {
  background: rgba(168, 85, 247, 0.2);
}

/* ───── APPOINTMENT ITEM ───── */
.appointment-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 12px;
}

.appointment-item:last-child {
  margin-bottom: 0;
}

.appointment-item .left strong {
  font-size: 0.92rem;
  color: #fff;
  display: block;
}

.appointment-item .left span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.appointment-item .right {
  text-align: right;
}

.appointment-item .right .time {
  font-weight: 600;
  color: var(--primary-orange);
  font-size: 0.9rem;
  display: block;
  margin-bottom: 4px;
}

/* ───── CUSTOMER / VEHICLE / SERVICE CARDS ───── */
.entity-card {
  display: flex;
  flex-direction: column;
}

.entity-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.entity-card-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.entity-card-avatar {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary-orange), var(--orange-hover));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.entity-card-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.entity-card-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.entity-card-details {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.entity-card-details .detail-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.entity-card-details .detail-row svg {
  width: 16px;
  height: 16px;
  color: var(--primary-orange);
  flex-shrink: 0;
}

.entity-card-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.entity-card-stats .stat-item {
  text-align: center;
}

.entity-card-stats .stat-item .value {
  font-size: 1.3rem;
  font-weight: 700;
}

.entity-card-stats .stat-item .value.orange {
  color: var(--primary-orange);
}

.entity-card-stats .stat-item .value.green {
  color: var(--success);
}

.entity-card-stats .stat-item .value.blue {
  color: var(--info);
}

.entity-card-stats .stat-item .label {
  font-size: 0.7rem;
  color: var(--text-dark);
  margin-top: 2px;
}

.entity-card-notes {
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.entity-card-actions {
  display: flex;
  gap: 8px;
}

.entity-card-actions .btn {
  flex: 1;
}

/* ───── TABS ───── */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  overflow-x: auto;
}

.tab {
  padding: 12px 20px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 0.88rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
}

.tab:hover {
  color: var(--text-light);
}

.tab.active {
  color: var(--primary-orange);
  border-bottom-color: var(--primary-orange);
}

.tab-content {
  display: none;
  animation: fadeInUp 0.3s ease;
}

.tab-content.active {
  display: block;
}

/* ───── TOGGLE SWITCH ───── */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  cursor: pointer;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border-gray);
  border-radius: 20px;
  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-orange);
}

.toggle-switch input:checked+.toggle-slider::before {
  transform: translateX(20px);
}

/* ───── LOADER ───── */
.loader {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-gray);
  border-top-color: var(--primary-orange);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ───── PAGINATION ───── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.pagination .page-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--light-gray);
  border: 1px solid var(--border-gray);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-family: 'Poppins', sans-serif;
  transition: var(--transition);
}

.pagination .page-btn:hover {
  border-color: var(--primary-orange);
  color: var(--primary-orange);
}

.pagination .page-btn.active {
  background: var(--primary-orange);
  border-color: var(--primary-orange);
  color: #fff;
}

/* ───── COLOR DOTS ───── */
.color-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  border: 2px solid rgba(255, 255, 255, 0.2);
  vertical-align: middle;
  margin-right: 6px;
}

/* ───── CHARTS ───── */
.chart-container {
  position: relative;
  height: 300px;
}

/* ───── ANIMATIONS ───── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.5s ease;
}

.animate-fade-in-up {
  animation: fadeInUp 0.5s ease;
}

.animate-slide-left {
  animation: slideInLeft 0.5s ease;
}

.stagger-1 {
  animation-delay: 0.05s;
  animation-fill-mode: both;
}

.stagger-2 {
  animation-delay: 0.1s;
  animation-fill-mode: both;
}

.stagger-3 {
  animation-delay: 0.15s;
  animation-fill-mode: both;
}

.stagger-4 {
  animation-delay: 0.2s;
  animation-fill-mode: both;
}

.stagger-5 {
  animation-delay: 0.25s;
  animation-fill-mode: both;
}

/* ───── SCROLLBAR ───── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-gray);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-gray);
}

/* ───── UTILITIES ───── */
.text-orange {
  color: var(--primary-orange) !important;
}

.text-green {
  color: var(--success) !important;
}

.text-red {
  color: var(--danger) !important;
}

.text-blue {
  color: var(--info) !important;
}

.text-yellow {
  color: var(--warning) !important;
}

.text-muted {
  color: var(--text-muted) !important;
}

.text-white {
  color: #fff !important;
}

.text-center {
  text-align: center !important;
}

.text-right {
  text-align: right !important;
}

.text-sm {
  font-size: 0.8rem !important;
}

.text-xs {
  font-size: 0.72rem !important;
}

.font-bold {
  font-weight: 700 !important;
}

.mt-0 {
  margin-top: 0 !important;
}

.mt-1 {
  margin-top: 8px !important;
}

.mt-2 {
  margin-top: 16px !important;
}

.mt-3 {
  margin-top: 24px !important;
}

.mb-0 {
  margin-bottom: 0 !important;
}

.mb-1 {
  margin-bottom: 8px !important;
}

.mb-2 {
  margin-bottom: 16px !important;
}

.mb-3 {
  margin-bottom: 24px !important;
}

.gap-1 {
  gap: 8px !important;
}

.gap-2 {
  gap: 16px !important;
}

.gap-3 {
  gap: 24px !important;
}

.d-flex {
  display: flex !important;
}

.d-grid {
  display: grid !important;
}

.d-none {
  display: none !important;
}

.align-center {
  align-items: center !important;
}

.justify-between {
  justify-content: space-between !important;
}

.flex-1 {
  flex: 1 !important;
}

.w-100 {
  width: 100% !important;
}

.overflow-auto {
  overflow-x: auto;
}

/* ───── RESPONSIVE ───── */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-close-btn {
    display: flex;
  }

  .sidebar-overlay.active {
    display: block;
  }

  .main-area {
    margin-left: 0;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .header-left>div:first-child {
    display: none;
  }

  .top-header {
    left: 0;
  }
}

@media (max-width: 768px) {
  .main-content {
    padding: 16px;
  }

  .grid-4,
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .filters-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .entity-card-stats {
    grid-template-columns: repeat(3, 1fr);
  }

  .header-user-info {
    display: none;
  }

  .modal {
    margin: 10px;
    max-height: 95vh;
  }

  .quick-actions {
    grid-template-columns: 1fr 1fr;
  }

  .data-table {
    font-size: 0.82rem;
  }

  .data-table thead th,
  .data-table tbody td {
    padding: 10px 12px;
  }
}

@media (max-width: 480px) {
  .quick-actions {
    grid-template-columns: 1fr;
  }

  .entity-card-stats {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}