/* ============================================================
   MAIN.CSS — Design System 3J Automotivos
   Dark mode | Red & Black palette
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ---- CSS Variables ---- */
:root {
  --primary: #ffcc00;
  --primary-dark: #e6b800;
  --primary-light: #ffd633;
  --secondary: #2ec4b6;
  --accent: #f4a261;
  --success: #06d6a0;
  --warning: #ffd166;
  --danger: #e63946;
  --info: #48cae4;

  --bg-base: #0a0a0b;
  --bg-surface: #121214;
  --bg-card: #161619;
  --bg-card-hover: #1f1f24;
  --bg-input: #0f0f11;
  --bg-sidebar: #08080a;

  --border: #242429;
  --border-light: #2d2d33;

  --text-primary: #f1f3f7;
  --text-secondary: #a0a6b5;
  --text-muted: #646a7c;

  --sidebar-width: 260px;
  --header-height: 64px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow: 0 4px 24px rgba(0,0,0,0.6);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.5);
  --shadow-lg: 0 8px 48px rgba(0,0,0,0.8);

  --transition: all 0.2s ease;
}

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

html { font-size: 14px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  overflow: hidden;
  height: 100vh;
}

/* ============================================================
   LOGIN SCREEN
   ============================================================ */
#login-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0a0c18 0%, #12152a 50%, #1a0a0e 100%);
  z-index: 9999;
}

.login-bg-pattern {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 50%, rgba(255,204,0,0.08) 0%, transparent 50%),
                    radial-gradient(circle at 80% 20%, rgba(46,196,182,0.06) 0%, transparent 40%),
                    radial-gradient(circle at 60% 80%, rgba(244,162,97,0.05) 0%, transparent 40%);
}

.login-card {
  position: relative;
  width: 420px;
  background: rgba(30, 34, 53, 0.9);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,204,0,0.2);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  box-shadow: 0 0 60px rgba(255,204,0,0.15), var(--shadow-lg);
  animation: loginFadeIn 0.6s ease;
}

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

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo img {
  height: 80px;
  filter: drop-shadow(0 0 20px rgba(255,204,0,0.4));
}

.login-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 4px;
}

.login-subtitle {
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 32px;
  font-size: 0.85rem;
}

.login-card .form-group { margin-bottom: 20px; }
.login-card label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }

.login-card input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: var(--transition);
}

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

#login-btn {
  width: 100%;
  padding: 14px;
  font-size: 1rem;
  font-weight: 700;
  margin-top: 8px;
  letter-spacing: 0.5px;
}

.login-footer { text-align: center; margin-top: 24px; color: var(--text-muted); font-size: 0.8rem; }

/* ============================================================
   APP SHELL
   ============================================================ */
#app-shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ---- SIDEBAR ---- */
#app-sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: hidden;
  transition: var(--transition);
  position: relative;
  z-index: 100;
}

.sidebar-logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-logo img {
  height: 44px;
  flex-shrink: 0;
}

.sidebar-logo-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.sidebar-logo-text strong { display: block; color: var(--primary); font-size: 0.85rem; font-weight: 700; }

#sidebar-nav {
  flex: 1;
  list-style: none;
  padding: 12px 8px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
  margin-bottom: 2px;
  white-space: nowrap;
}

.nav-item:hover {
  background: rgba(255,204,0,0.08);
  color: var(--text-primary);
  transform: translateX(2px);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(255,204,0,0.2), rgba(255,204,0,0.1));
  color: var(--primary-light);
  border-left: 3px solid var(--primary);
  padding-left: 11px;
}

.nav-icon { font-size: 1.1rem; width: 24px; text-align: center; flex-shrink: 0; }

.sidebar-user {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.sidebar-user:hover { background: rgba(255,255,255,0.03); }

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: white;
  flex-shrink: 0;
}

.user-details { flex: 1; min-width: 0; }
.user-name { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { display: block; font-size: 0.72rem; color: var(--text-muted); }

.logout-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
  transition: var(--transition);
  flex-shrink: 0;
}
.logout-btn:hover { color: var(--danger); }

/* ---- MAIN AREA ---- */
#app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ---- TOP HEADER ---- */
#app-header {
  height: var(--header-height);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  flex-shrink: 0;
}

.hamburger-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 8px;
}

.header-search {
  flex: 1;
  max-width: 400px;
  position: relative;
}

.header-search input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 8px 16px 8px 38px;
  color: var(--text-primary);
  font-size: 0.85rem;
  transition: var(--transition);
}

.header-search input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255,204,0,0.1);
}

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

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

.header-clock {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.header-date {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ---- CONTENT AREA ---- */
#main-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

/* ============================================================
   PAGE STRUCTURE
   ============================================================ */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

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

.page-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ============================================================
   STAT CARDS (Dashboard)
   ============================================================ */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  cursor: default;
}

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

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

.stat-icon { font-size: 1.8rem; margin-bottom: 12px; display: block; }
.stat-value { font-size: 1.6rem; font-weight: 800; color: var(--text-primary); line-height: 1; margin-bottom: 6px; }
.stat-label { font-size: 0.78rem; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-trend { font-size: 0.78rem; color: var(--success); margin-top: 8px; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
}

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

.card-header h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.card-body { padding: 20px; }

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

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

/* ============================================================
   DATA TABLES
   ============================================================ */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.data-table thead {
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
}

.data-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--text-primary);
  vertical-align: middle;
}

.data-table tbody tr { transition: var(--transition); }
.data-table tbody tr:hover { background: rgba(255,255,255,0.02); }
.data-table tbody tr:last-child td { border-bottom: none; }

.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.actions-cell { white-space: nowrap; }

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.badge-success { background: rgba(6,214,160,0.15); color: #06d6a0; }
.badge-warning { background: rgba(255,209,102,0.15); color: #ffd166; }
.badge-danger { background: rgba(230,57,70,0.15); color: #ff6b78; }
.badge-info { background: rgba(72,202,228,0.15); color: #48cae4; }
.badge-secondary { background: rgba(255,255,255,0.08); color: var(--text-secondary); }
.badge-primary { background: rgba(255,204,0,0.15); color: var(--primary-light); }
.badge-orange { background: rgba(244,162,97,0.15); color: #f4a261; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #0a0a0b;
  box-shadow: 0 2px 12px rgba(255,204,0,0.3);
}
.btn-primary:hover { background: linear-gradient(135deg, var(--primary-light), var(--primary)); transform: translateY(-1px); box-shadow: 0 4px 20px rgba(255,204,0,0.4); }

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: rgba(255,204,0,0.05); }

.btn-danger {
  background: rgba(230,57,70,0.15);
  color: var(--danger);
  border: 1px solid rgba(230,57,70,0.3);
}
.btn-danger:hover { background: var(--danger); color: white; }

.btn-success {
  background: rgba(6,214,160,0.15);
  color: var(--success);
  border: 1px solid rgba(6,214,160,0.3);
}
.btn-success:hover { background: var(--success); color: #0a2a20; }

.btn-warning {
  background: rgba(255,209,102,0.15);
  color: var(--warning);
  border: 1px solid rgba(255,209,102,0.3);
}
.btn-warning:hover { background: var(--warning); color: #1a1200; }

.btn-info {
  background: rgba(72,202,228,0.15);
  color: var(--info);
  border: 1px solid rgba(72,202,228,0.3);
}
.btn-info:hover { background: var(--info); color: #0a2030; }

.btn-sm { padding: 6px 12px; font-size: 0.78rem; }
.btn-lg { padding: 12px 24px; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; }

.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  color: var(--text-secondary);
}
.btn-icon:hover { background: rgba(255,255,255,0.06); color: var(--text-primary); }
.btn-icon-danger:hover { background: rgba(230,57,70,0.12); color: var(--danger); }
.btn-icon-success:hover { background: rgba(6,214,160,0.12); color: var(--success); }
.btn-icon-info:hover { background: rgba(72,202,228,0.12); color: var(--info); }

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-grid .span-2 { grid-column: span 2; }
.form-grid .span-3 { grid-column: span 3; }

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

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="tel"],
input[type="url"],
select,
textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 0.88rem;
  font-family: inherit;
  transition: var(--transition);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255,204,0,0.12);
}

select option { background: var(--bg-surface); }
textarea { resize: vertical; min-height: 80px; }

.form-control {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text-primary);
  font-size: 0.85rem;
  transition: var(--transition);
}

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

/* ============================================================
   SEARCH & FILTERS
   ============================================================ */
.search-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search-input-wrap input { padding-left: 36px; }

.search-input-wrap::before {
  content: '🔍';
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8rem;
}

.filter-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-select {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text-primary);
  font-size: 0.83rem;
  cursor: pointer;
}

/* Status tabs & Tab groups */
.status-tabs, .tab-group {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px;
  flex-wrap: wrap;
  width: fit-content;
}

.status-tab, .tab-btn {
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-secondary);
  background: none;
  border: none;
  white-space: nowrap;
}

.status-tab:hover, .tab-btn:hover { color: var(--text-primary); background: rgba(255,255,255,0.04); }
.status-tab.active, .tab-btn.active { background: var(--primary); color: #0a0a0b; box-shadow: 0 2px 8px rgba(255,204,0,0.3); }

/* ============================================================
   MODALS
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.3s ease;
}

.modal-box.modal-lg { max-width: 900px; }
.modal-box.modal-xl { max-width: 1100px; }
.modal-box.modal-fullscreen { max-width: 95vw; max-height: 95vh; width: 95vw; }

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

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

.modal-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.modal-close:hover { background: rgba(230,57,70,0.12); color: var(--danger); }

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

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

/* ---- Confirm Modal ---- */
.confirm-box {
  max-width: 380px;
  text-align: center;
  padding: 32px 24px;
}

.confirm-icon { font-size: 2.5rem; margin-bottom: 16px; }
.confirm-box h3 { font-size: 1.1rem; margin-bottom: 12px; }
.confirm-box p { color: var(--text-secondary); margin-bottom: 24px; font-size: 0.9rem; }
.confirm-actions { display: flex; gap: 12px; justify-content: center; }

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  max-width: 360px;
  opacity: 0;
  transform: translateX(40px);
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: all;
}

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

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

.toast-icon { font-size: 1rem; flex-shrink: 0; }

/* ============================================================
   LOADING
   ============================================================ */
.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.spinning {
  animation: spin 1s linear infinite;
  display: inline-flex !important;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state span { font-size: 3rem; display: block; margin-bottom: 16px; opacity: 0.6; }
.empty-state p { font-size: 0.9rem; max-width: 300px; margin: 0 auto 20px; }

/* ============================================================
   PRODUCT IMAGE
   ============================================================ */
.product-thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--bg-input);
}

.product-thumb-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--text-muted);
}

.image-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}
.image-upload-area:hover { border-color: var(--primary); background: rgba(255,204,0,0.03); }

.image-preview {
  width: 120px;
  height: 120px;
  border-radius: var(--radius);
  object-fit: cover;
  margin: 0 auto;
  display: block;
}

/* ============================================================
   SETTINGS GRID
   ============================================================ */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.category-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 0.85rem;
}

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

/* ============================================================
   OS SPECIFIC
   ============================================================ */
.os-section {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

.os-section-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary-light);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.os-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.os-total-final {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--success);
}

/* ============================================================
   QUICK ACTION CARDS
   ============================================================ */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
}

.quick-action-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  color: var(--text-primary);
}

.quick-action-card:hover {
  border-color: var(--primary);
  background: rgba(255,204,0,0.06);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(255,204,0,0.15);
}

.quick-action-card span { font-size: 2rem; display: block; margin-bottom: 8px; }
.quick-action-card p { font-size: 0.78rem; font-weight: 600; color: var(--text-secondary); }

/* ============================================================
   FINANCIAL BARS
   ============================================================ */
.payment-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.payment-bar-label { font-size: 0.8rem; color: var(--text-secondary); width: 110px; flex-shrink: 0; }
.payment-bar-track { flex: 1; background: rgba(255,255,255,0.06); border-radius: 4px; height: 8px; overflow: hidden; }
.payment-bar-fill { height: 100%; border-radius: 4px; transition: width 0.5s ease; }
.payment-bar-value { font-size: 0.8rem; font-weight: 600; color: var(--text-primary); width: 100px; text-align: right; }

/* ============================================================
   REPORT CARDS
   ============================================================ */
.report-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.report-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.report-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--secondary); }
.report-card span { font-size: 2.2rem; display: block; margin-bottom: 12px; }
.report-card h4 { font-size: 0.9rem; font-weight: 600; margin-bottom: 8px; }
.report-card p { font-size: 0.75rem; color: var(--text-muted); }

/* ============================================================
   PRINT PREVIEW BUTTON
   ============================================================ */
.print-area {
  background: white;
  color: black;
  padding: 20px;
  border-radius: var(--radius);
  margin-top: 16px;
}

/* ============================================================
   UTILITIES
   ============================================================ */
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.font-bold { font-weight: 700; }
.font-mono { font-family: monospace; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.gap-2 { gap: 8px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }

code { background: rgba(255,255,255,0.07); padding: 2px 6px; border-radius: 4px; font-size: 0.82rem; }

hr { border: none; border-top: 1px solid var(--border); margin: 16px 0; }

.divider { height: 1px; background: var(--border); margin: 20px 0; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .hamburger-btn { display: block; }
  
  #app-sidebar {
    position: fixed;
    left: -280px;
    top: 0;
    bottom: 0;
    z-index: 200;
  }
  
  #app-sidebar.open { left: 0; box-shadow: 4px 0 40px rgba(0,0,0,0.5); }
  
  #main-content { padding: 16px; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: span 1; }
  .settings-grid { grid-template-columns: 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .modal-box { max-width: 100%; max-height: 100vh; border-radius: 0; }
}

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