/* ═══════════════════════════════════════════════════════
   AutoTaller Pro - Global Styles
   Design System: Dark theme with amber accent
═══════════════════════════════════════════════════════ */

:root {
  /* Color Palette */
  --brand-primary: #F59E0B;      /* amber-500 */
  --brand-primary-dark: #D97706; /* amber-600 */
  --brand-primary-light: #FCD34D;/* amber-300 */
  --brand-accent: #3B82F6;       /* blue-500 */
  --brand-accent-dark: #2563EB;
  --brand-success: #10B981;
  --brand-warning: #F59E0B;
  --brand-danger: #EF4444;
  --brand-info: #6366F1;

  /* Dark Theme */
  --bg-base: #0F1117;
  --bg-surface: #1A1D27;
  --bg-surface-2: #22263A;
  --bg-hover: #2A2F47;
  --border-color: rgba(255,255,255,0.07);
  --border-color-strong: rgba(255,255,255,0.12);

  /* Text */
  --text-primary: #F1F5F9;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;

  /* Sidebar */
  --sidebar-width: 240px;
  --sidebar-bg: #12151F;
  --sidebar-border: rgba(255,255,255,0.06);

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.5);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 30px rgba(245,158,11,0.15);

  /* Border radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;

  /* Status Colors */
  --status-recibido: #64748B;
  --status-diagnostico: #8B5CF6;
  --status-cotizacion: #F59E0B;
  --status-reparacion: #3B82F6;
  --status-pruebas: #06B6D4;
  --status-terminado: #10B981;
  --status-entregado: #6366F1;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  font-size: 14px;
  line-height: 1.6;
}

/* ── Screens ── */
.screen {
  display: none;
  min-height: 100vh;
}

.screen.active {
  display: flex;
}

/* ═══════════════════════════════════════════════════════
   LANDING PAGE
═══════════════════════════════════════════════════════ */
#screen-landing {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 100vh;
  padding: 2rem;
  background: radial-gradient(ellipse at 30% 20%, rgba(245,158,11,0.08) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 80%, rgba(59,130,246,0.08) 0%, transparent 50%),
              var(--bg-base);
}

.landing-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

/* Animated grid lines */
.landing-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(245,158,11,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245,158,11,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
  0% { transform: translateY(0); }
  100% { transform: translateY(60px); }
}

.landing-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  animation: fadeInDown 0.6s ease;
}

.brand-icon {
  font-size: 3.5rem;
  animation: rotateSlow 10s linear infinite;
  display: block;
  filter: drop-shadow(0 0 20px rgba(245,158,11,0.5));
}

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

.brand-name {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}

.brand-tagline {
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 400;
  margin-top: 0.25rem;
}

.login-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.5rem;
  width: 100%;
  animation: fadeInUp 0.7s ease 0.2s both;
}

.login-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color-strong);
  border-radius: var(--radius-xl);
  padding: 2rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand-primary), transparent);
  opacity: 0;
  transition: var(--transition);
}

#card-client::before {
  background: linear-gradient(90deg, transparent, var(--brand-accent), transparent);
}

.login-card:hover {
  border-color: rgba(245,158,11,0.3);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), 0 0 40px rgba(245,158,11,0.08);
}

.login-card:hover::before { opacity: 1; }

#card-client:hover {
  border-color: rgba(59,130,246,0.3);
  box-shadow: var(--shadow-lg), 0 0 40px rgba(59,130,246,0.08);
}

.login-card-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  background: rgba(245,158,11,0.12);
  border: 1px solid rgba(245,158,11,0.2);
}

.client-icon {
  background: rgba(59,130,246,0.12) !important;
  border-color: rgba(59,130,246,0.2) !important;
}

.login-card h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.login-card p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

.login-hint {
  margin-top: 1rem !important;
  font-size: 0.8rem !important;
  color: var(--text-muted) !important;
  text-align: center;
  background: rgba(255,255,255,0.03);
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-color-strong);
}

.login-hint strong { color: var(--brand-primary); }

/* ═══════════════════════════════════════════════════════
   FORMS & INPUTS
═══════════════════════════════════════════════════════ */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 0.7rem 1rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-color-strong);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  transition: var(--transition);
  outline: none;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(245,158,11,0.15);
  background: rgba(255,255,255,0.06);
}

input::placeholder, textarea::placeholder {
  color: var(--text-muted);
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
  padding-right: 2.5rem;
}

select option { background: var(--bg-surface-2); }

textarea { resize: vertical; min-height: 80px; }

.radio-group {
  display: flex;
  gap: 1rem;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-weight: 400 !important;
  text-transform: none !important;
  color: var(--text-primary) !important;
  letter-spacing: 0 !important;
}

.radio-label input[type="radio"] {
  width: auto;
  accent-color: var(--brand-primary);
}

/* ═══════════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-sm);
  border: none;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark));
  color: #000;
  box-shadow: 0 4px 15px rgba(245,158,11,0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(245,158,11,0.4);
  filter: brightness(1.1);
}

.btn-accent {
  background: linear-gradient(135deg, var(--brand-accent), var(--brand-accent-dark));
  color: #fff;
  box-shadow: 0 4px 15px rgba(59,130,246,0.3);
}

.btn-accent:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(59,130,246,0.4);
  filter: brightness(1.1);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color-strong);
}

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

.btn-danger {
  background: linear-gradient(135deg, var(--brand-danger), #DC2626);
  color: #fff;
}

.btn-full { width: 100%; }

.btn-arrow {
  transition: transform 0.2s ease;
}

.btn:hover .btn-arrow {
  transform: translateX(3px);
}

.btn-logout {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: transparent;
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: var(--radius-sm);
  color: #EF4444;
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
  justify-content: center;
}

.btn-logout:hover {
  background: rgba(239,68,68,0.1);
  border-color: rgba(239,68,68,0.5);
}

.btn-logout-sm {
  padding: 0.4rem 0.9rem;
  background: transparent;
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: var(--radius-sm);
  color: #EF4444;
  font-family: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-logout-sm:hover {
  background: rgba(239,68,68,0.1);
}

/* ═══════════════════════════════════════════════════════
   ADMIN LAYOUT
═══════════════════════════════════════════════════════ */
#screen-admin {
  flex-direction: row;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 100;
  transition: var(--transition);
}

.sidebar-header {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid var(--sidebar-border);
}

.sidebar-logo {
  font-size: 1.8rem;
  filter: drop-shadow(0 0 8px rgba(245,158,11,0.4));
}

.sidebar-title {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand-primary);
}

.sidebar-role {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
  width: 100%;
}

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

.nav-item.active {
  background: rgba(245,158,11,0.12);
  color: var(--brand-primary);
  border: 1px solid rgba(245,158,11,0.2);
}

.nav-icon { font-size: 1.1rem; }

.sidebar-footer {
  padding: 1rem 0.75rem;
  border-top: 1px solid var(--sidebar-border);
}

/* ── Admin Main ── */
.admin-main {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.admin-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15,17,23,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 0 1.5rem;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}

.header-breadcrumb {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-time {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.admin-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark));
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

/* ── Sections ── */
.admin-section {
  display: none;
  padding: 2rem;
  flex-direction: column;
  gap: 1.5rem;
  animation: fadeInUp 0.3s ease;
}

.admin-section.active {
  display: flex;
}

.section-title h2 {
  font-size: 1.5rem;
  font-weight: 700;
}

.section-title p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 0.2rem;
}

/* ── Cards ── */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: var(--transition);
}

.card:hover {
  border-color: var(--border-color-strong);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.card-header h3 {
  font-size: 1rem;
  font-weight: 600;
}

/* ── Content Grid ── */
.content-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.card-wide {
  overflow: hidden;
}

/* ── Stats Grid ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: var(--transition);
  cursor: default;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-color-strong);
  box-shadow: var(--shadow-md);
}

.stat-icon {
  font-size: 2rem;
  width: 52px; height: 52px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.stat-icon.amber { background: rgba(245,158,11,0.15); }
.stat-icon.blue  { background: rgba(59,130,246,0.15); }
.stat-icon.green { background: rgba(16,185,129,0.15); }
.stat-icon.purple{ background: rgba(139,92,246,0.15); }

.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.2rem;
}

/* ── Dashboard Grid ── */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

/* ── Tables ── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.03);
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-color);
}

.data-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
  vertical-align: middle;
}

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

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

/* ── Status Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-recibido   { background: rgba(100,116,139,0.2); color: #94A3B8; }
.badge-diagnostico{ background: rgba(139,92,246,0.2); color: #A78BFA; }
.badge-cotizacion { background: rgba(245,158,11,0.2); color: #FCD34D; }
.badge-reparacion { background: rgba(59,130,246,0.2); color: #93C5FD; }
.badge-pruebas    { background: rgba(6,182,212,0.2); color: #67E8F9; }
.badge-terminado  { background: rgba(16,185,129,0.2); color: #6EE7B7; }
.badge-entregado  { background: rgba(99,102,241,0.2); color: #A5B4FC; }

.badge-nueva  { background: rgba(16,185,129,0.15); color: #6EE7B7; border: 1px solid rgba(16,185,129,0.3); }
.badge-usada  { background: rgba(245,158,11,0.15); color: #FCD34D; border: 1px solid rgba(245,158,11,0.3); }

.badge-disponible   { background: rgba(16,185,129,0.15); color: #6EE7B7; }
.badge-agotado      { background: rgba(239,68,68,0.15);  color: #FCA5A5; }
.badge-bajo-stock   { background: rgba(245,158,11,0.15); color: #FCD34D; }

/* ── Vehicle Cards ── */
.vehicles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  padding: 0.25rem;
}

.vehicle-card {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: var(--transition);
  cursor: pointer;
}

.vehicle-card:hover {
  border-color: var(--border-color-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.vehicle-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  gap: 0.5rem;
}

.vehicle-card-title {
  font-size: 1rem;
  font-weight: 700;
}

.vehicle-card-plate {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

.vehicle-card-client {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.vehicle-card-issue {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  border-left: 3px solid var(--border-color-strong);
  margin-bottom: 0.75rem;
}

.vehicle-card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.btn-sm {
  padding: 0.4rem 0.9rem;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

/* ── Status Filters ── */
.status-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-chip {
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  transition: var(--transition);
  font-family: inherit;
}

.filter-chip:hover, .filter-chip.active {
  background: var(--brand-primary);
  color: #000;
  border-color: var(--brand-primary);
}

/* ── Search Input ── */
.search-input {
  padding: 0.5rem 1rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.85rem;
  min-width: 200px;
}

.search-input:focus {
  border-color: var(--brand-primary);
  outline: none;
}

.filter-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.filter-select {
  width: auto;
  min-width: 130px;
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  font-size: 0.85rem;
}

/* ── Quotes ── */
.quote-card {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 0.75rem;
  transition: var(--transition);
}

.quote-card:hover {
  border-color: var(--border-color-strong);
}

.quote-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  gap: 0.75rem;
}

.quote-amount {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--brand-primary);
}

.quote-vehicle {
  font-weight: 600;
  font-size: 0.95rem;
}

.quote-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.quote-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  line-height: 1.6;
}

/* ── Upload Area ── */
.upload-area {
  border: 2px dashed var(--border-color-strong);
  border-radius: var(--radius-md);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: rgba(255,255,255,0.02);
}

.upload-area:hover {
  border-color: var(--brand-primary);
  background: rgba(245,158,11,0.04);
}

.upload-icon { font-size: 2rem; margin-bottom: 0.5rem; }

.upload-area p {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.upload-hint {
  font-size: 0.75rem !important;
  color: var(--text-muted) !important;
  margin-top: 0.25rem;
}

#upload-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.preview-thumb {
  width: 80px; height: 80px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--border-color);
}

/* ── Progress Gallery ── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.gallery-item {
  background: var(--bg-surface-2);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: var(--transition);
  cursor: pointer;
}

.gallery-item:hover {
  transform: scale(1.02);
  border-color: var(--border-color-strong);
  box-shadow: var(--shadow-md);
}

.gallery-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

.gallery-caption {
  padding: 0.75rem;
}

.gallery-caption .vehicle-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
}

.gallery-caption .gallery-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.gallery-caption .gallery-date {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

/* ── Activity Feed ── */
.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.activity-item {
  display: flex;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border-color);
  animation: fadeInLeft 0.3s ease;
}

.activity-item:last-child { border-bottom: none; }

.activity-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
  box-shadow: 0 0 8px currentColor;
}

.activity-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.activity-text strong { color: var(--text-primary); }

.activity-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* ── Status Chart ── */
.status-chart-bars {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chart-bar-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.chart-label {
  width: 90px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.chart-bar-bg {
  flex: 1;
  height: 10px;
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.chart-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.chart-count {
  width: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  text-align: right;
}

/* ═══════════════════════════════════════════════════════
   CLIENT PANEL
═══════════════════════════════════════════════════════ */
#screen-client {
  flex-direction: column;
}

.client-header {
  background: var(--sidebar-bg);
  border-bottom: 1px solid var(--sidebar-border);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

.client-header-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--brand-primary);
}

.client-brand-name {
  font-size: 1.1rem;
}

.client-header-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.client-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ── Vehicle Status Card ── */
.client-vehicle-card {
  background: linear-gradient(135deg, var(--bg-surface), var(--bg-surface-2));
  border: 1px solid var(--border-color-strong);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.vehicle-status-header {
  padding: 1.75rem 2rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.vehicle-info-main h2 {
  font-size: 1.4rem;
  font-weight: 700;
}

#cv-vehicle-plate {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.status-badge-large {
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
}

/* ── Progress Steps ── */
.vehicle-status-progress {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
}

.progress-steps {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: max-content;
}

.progress-step {
  display: flex;
  align-items: center;
  gap: 0;
}

.step-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border-color-strong);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem;
  color: var(--text-muted);
  background: var(--bg-base);
  position: relative;
  flex-shrink: 0;
  transition: var(--transition);
}

.step-dot.done {
  background: var(--brand-success);
  border-color: var(--brand-success);
  color: #fff;
}

.step-dot.current {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #000;
  transform: scale(1.15);
  box-shadow: 0 0 0 4px rgba(245,158,11,0.2);
}

.step-label {
  position: absolute;
  top: 36px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  white-space: nowrap;
  color: var(--text-muted);
  font-weight: 600;
}

.step-dot.current .step-label { color: var(--brand-primary); }
.step-dot.done .step-label { color: var(--brand-success); }

.step-line {
  height: 2px;
  width: 50px;
  background: var(--border-color-strong);
  flex-shrink: 0;
  transition: var(--transition);
}

.step-line.done { background: var(--brand-success); }

.vehicle-issue {
  padding: 1.25rem 2rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ── Client Actions ── */
.client-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.client-action-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-color-strong);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-family: inherit;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition);
}

.client-action-btn:hover {
  transform: translateY(-2px);
  border-color: var(--brand-primary);
  box-shadow: 0 8px 25px rgba(245,158,11,0.15);
}

.client-action-btn.call-btn:hover {
  border-color: var(--brand-success);
  box-shadow: 0 8px 25px rgba(16,185,129,0.15);
}

.action-btn-icon {
  font-size: 1.8rem;
}

/* ── Client Sections ── */
.client-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.client-section-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.client-section-header h3 {
  font-size: 1rem;
  font-weight: 700;
}

.section-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.client-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  padding: 1.25rem 1.5rem;
}

/* ── Quote Detail ── */
.quote-detail {
  padding: 1.5rem;
}

.quote-detail-amount {
  font-size: 2rem;
  font-weight: 800;
  color: var(--brand-primary);
  margin-bottom: 0.25rem;
}

.quote-detail-title {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.quote-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.875rem;
}

.quote-detail-row:last-child { border-bottom: none; }

.quote-detail-key { color: var(--text-muted); }
.quote-detail-val { font-weight: 600; }

/* ── Recommendations ── */
.recommendations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  padding: 1.25rem 1.5rem;
}

.rec-card {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  transition: var(--transition);
}

.rec-card:hover {
  border-color: var(--brand-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.rec-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.rec-card-name {
  font-weight: 700;
  font-size: 0.9rem;
}

.rec-card-category {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.rec-card-compat {
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: rgba(255,255,255,0.04);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.5rem;
  margin: 0.5rem 0;
}

.rec-card-price {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--brand-primary);
  margin-top: 0.5rem;
}

/* ═══════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
═══════════════════════════════════════════════════════ */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-color-strong);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 280px;
  max-width: 380px;
  pointer-events: all;
  box-shadow: var(--shadow-lg);
  animation: slideInRight 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toast.toast-exit {
  animation: slideOutRight 0.25s ease forwards;
}

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

.toast-text {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  flex: 1;
}

.toast.toast-success { border-left: 3px solid var(--brand-success); }
.toast.toast-error   { border-left: 3px solid var(--brand-danger); }
.toast.toast-info    { border-left: 3px solid var(--brand-accent); }
.toast.toast-warning { border-left: 3px solid var(--brand-warning); }

/* ═══════════════════════════════════════════════════════
   MODAL
═══════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn 0.2s ease;
}

.modal-overlay.hidden { display: none; }

.modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color-strong);
  border-radius: var(--radius-xl);
  padding: 2rem;
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  animation: scaleIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* ═══════════════════════════════════════════════════════
   EMPTY STATES
═══════════════════════════════════════════════════════ */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
}

.empty-state-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.5; }
.empty-state h4 { color: var(--text-secondary); margin-bottom: 0.5rem; }
.empty-state p { font-size: 0.85rem; }

/* ═══════════════════════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════════════════════ */
@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}

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

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-10px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideOutRight {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(40px); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

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

.pulse { animation: pulse 2s infinite; }

/* ═══════════════════════════════════════════════════════
   SCROLLBAR
═══════════════════════════════════════════════════════ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border-color-strong);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .content-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .admin-main {
    margin-left: 0;
  }

  .menu-toggle {
    display: block;
  }

  .brand-name {
    font-size: 1.8rem;
  }

  .login-cards {
    grid-template-columns: 1fr;
  }

  .client-actions-row {
    grid-template-columns: 1fr 1fr;
  }

  .admin-section {
    padding: 1.25rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .client-actions-row {
    grid-template-columns: 1fr;
  }

  .vehicle-status-header {
    flex-direction: column;
  }
}

/* ── Misc Utilities ── */
.text-primary    { color: var(--brand-primary) !important; }
.text-success    { color: var(--brand-success) !important; }
.text-danger     { color: var(--brand-danger) !important; }
.text-muted      { color: var(--text-muted) !important; }
.fw-bold         { font-weight: 700 !important; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }

/* inventory stock indicator */
.stock-low  { color: var(--brand-danger); font-weight: 700; }
.stock-ok   { color: var(--brand-success); }
.stock-warn { color: var(--brand-warning); }

.no-results {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.action-btn-group {
  display: flex;
  gap: 0.4rem;
}

.btn-icon {
  width: 32px; height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: transparent;
  cursor: pointer;
  font-size: 0.85rem;
  transition: var(--transition);
}

.btn-icon:hover {
  background: var(--bg-hover);
  border-color: var(--border-color-strong);
}
