/* ─────────────────────────────────────────────
   SAREE VAULT — WEB APP STYLESHEET
───────────────────────────────────────────── */
:root {
  --primary: #a855f7;
  --primary-dark: #7c3aed;
  --primary-light: #c084fc;
  --accent-green: #10b981;
  --accent-gold: #f59e0b;
  --accent-blue: #3b82f6;
  --accent-red: #ef4444;
  --bg: #0a0a0f;
  --bg2: #0f0f1a;
  --bg3: #141420;
  --card: rgba(255,255,255,0.05);
  --card-hover: rgba(255,255,255,0.08);
  --border: rgba(255,255,255,0.08);
  --border2: rgba(255,255,255,0.14);
  --text: #f0f0f8;
  --text-muted: rgba(240,240,248,0.55);
  --text-faint: rgba(240,240,248,0.3);
  --sidebar-w: 240px;
  --topbar-h: 60px;
  --radius: 14px;
  --radius-sm: 10px;
  --font: 'Outfit', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(168,85,247,0.3); border-radius: 3px; }
input, select, textarea, button { font-family: var(--font); }

/* ── SCREENS ── */
.screen { position: fixed; inset: 0; display: none; }
.screen.active { display: flex; }

/* ══════════════════════════════════════
   LOGIN
══════════════════════════════════════ */
#screen-login {
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 40% 30%, #2d1854 0%, #1a0a2e 50%, #0a0a0f 100%);
}
.login-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.login-glow {
  position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: 0.5;
}
.g1 { width: 400px; height: 400px; background: radial-gradient(circle, rgba(168,85,247,0.3), transparent); top: -100px; left: -100px; }
.g2 { width: 300px; height: 300px; background: radial-gradient(circle, rgba(236,72,153,0.2), transparent); bottom: -80px; right: -80px; }
.login-box {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 32px;
  gap: 0;
}
.login-logo { font-size: 3.5rem; margin-bottom: 12px; }
.login-title { font-size: 1.6rem; font-weight: 800; color: var(--text); }
.login-sub { font-size: 0.88rem; color: var(--text-muted); margin-top: 6px; margin-bottom: 32px; }
.pin-dots {
  display: flex; gap: 18px; margin-bottom: 8px;
}
.pin-dot {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 2px solid rgba(255,255,255,0.2);
  transition: all 0.2s;
}
.pin-dot.filled {
  background: var(--primary-light);
  border-color: var(--primary);
  box-shadow: 0 0 12px rgba(168,85,247,0.5);
}
.pin-dot.error { background: #ef4444; border-color: #ef4444; }
.pin-error { height: 20px; font-size: 0.8rem; color: #ef4444; font-weight: 600; margin-bottom: 24px; }
.keypad {
  display: grid;
  grid-template-columns: repeat(3, 80px);
  gap: 12px;
  margin-bottom: 24px;
}
.key {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: white;
  font-size: 1.4rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  display: flex; align-items: center; justify-content: center;
}
.key:hover { background: rgba(168,85,247,0.2); border-color: rgba(168,85,247,0.4); }
.key:active { transform: scale(0.9); background: rgba(168,85,247,0.35); }
.key-empty { background: transparent; border-color: transparent; pointer-events: none; }
.key-back { font-size: 1.1rem; }
.login-hints { font-size: 0.75rem; color: var(--text-faint); }

/* ══════════════════════════════════════
   APP LAYOUT
══════════════════════════════════════ */
#screen-app { flex-direction: row; }

/* SIDEBAR */
.sidebar {
  width: var(--sidebar-w);
  height: 100%;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: transform 0.3s ease;
  z-index: 200;
}
.sidebar-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 16px 16px;
  border-bottom: 1px solid var(--border);
}
.sidebar-logo { font-size: 1.4rem; }
.sidebar-title { font-size: 1.05rem; font-weight: 700; flex: 1; }
.sidebar-close { display: none; background: none; border: none; color: var(--text-muted); font-size: 1rem; cursor: pointer; padding: 4px; }
.sidebar-role-badge {
  margin: 12px 16px;
  padding: 6px 12px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.role-admin { background: rgba(168,85,247,0.2); color: var(--primary-light); border: 1px solid rgba(168,85,247,0.3); }
.role-user  { background: rgba(59,130,246,0.2); color: #93c5fd; border: 1px solid rgba(59,130,246,0.3); }
.role-customer { background: rgba(16,185,129,0.2); color: #6ee7b7; border: 1px solid rgba(16,185,129,0.3); }
.sidebar-nav {
  flex: 1;
  padding: 8px 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 0;
  transition: all 0.2s;
  position: relative;
}
.nav-item:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.nav-item.active {
  color: var(--primary-light);
  background: rgba(168,85,247,0.1);
  border-left: 3px solid var(--primary);
  padding-left: 17px;
}
.nav-icon { font-size: 1.1rem; }
.sidebar-footer { padding: 16px; border-top: 1px solid var(--border); }
.btn-logout {
  width: 100%;
  padding: 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-logout:hover { color: var(--accent-red); border-color: rgba(239,68,68,0.3); background: rgba(239,68,68,0.08); }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 150; }

/* MAIN WRAP */
.main-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
}

/* TOPBAR */
.topbar {
  height: var(--topbar-h);
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 12px;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}
.menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
}
.topbar-title {
  font-size: 1.1rem;
  font-weight: 700;
  flex: 1;
  color: var(--text);
}
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.sync-status { font-size: 0.75rem; color: var(--text-muted); }
.btn-icon-round {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--primary);
  border: none;
  color: white;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  line-height: 1;
}
.btn-icon-round:hover { background: var(--primary-light); transform: scale(1.05); }

/* CONTENT */
.content {
  flex: 1;
  overflow-y: auto;
  padding: 24px 24px 32px;
}
.page { display: none; }
.page.active { display: block; }

/* ══════════════════════════════════════
   STATS GRID
══════════════════════════════════════ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--c, var(--primary));
}
.stat-card:hover { border-color: var(--c, var(--primary)); transform: translateY(-2px); }
.stat-label { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px; }
.stat-value { font-size: 1.6rem; font-weight: 800; color: var(--text); letter-spacing: -0.02em; }

/* ══════════════════════════════════════
   SAREE CARDS
══════════════════════════════════════ */
.section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.saree-list { display: flex; flex-direction: column; gap: 10px; }
.saree-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.saree-card:hover { background: var(--card-hover); border-color: var(--border2); transform: translateX(2px); }
.saree-color {
  width: 10px; height: 40px;
  border-radius: 4px;
  flex-shrink: 0;
}
.saree-main { flex: 1; min-width: 0; }
.saree-id { font-size: 0.88rem; font-weight: 700; color: var(--text); }
.saree-meta { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.saree-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.saree-cost { font-size: 0.9rem; font-weight: 700; color: var(--text); }
.saree-profit { font-size: 0.75rem; color: var(--accent-green); font-weight: 600; }
.status-badge {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge-STOCK    { background: rgba(59,130,246,0.2); color: #93c5fd; border: 1px solid rgba(59,130,246,0.3); }
.badge-SOLD     { background: rgba(16,185,129,0.2); color: #6ee7b7; border: 1px solid rgba(16,185,129,0.3); }
.badge-RESERVED { background: rgba(245,158,11,0.2); color: #fcd34d; border: 1px solid rgba(245,158,11,0.3); }
.badge-DAMAGED  { background: rgba(239,68,68,0.2); color: #fca5a5; border: 1px solid rgba(239,68,68,0.3); }

/* ══════════════════════════════════════
   FILTER BAR
══════════════════════════════════════ */
.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.search-input {
  flex: 1;
  min-width: 200px;
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}
.search-input:focus { border-color: var(--primary); }
.search-input::placeholder { color: var(--text-faint); }
.filter-select {
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text);
  font-size: 0.85rem;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}
.filter-select:focus { border-color: var(--primary); }
.filter-select option { background: #1a1a2e; }
.result-count { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 10px; }

/* ══════════════════════════════════════
   TRIPS
══════════════════════════════════════ */
.page-action-bar { margin-bottom: 20px; }
.trips-list { display: flex; flex-direction: column; gap: 12px; }
.trip-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 16px;
}
.trip-card:hover { background: var(--card-hover); border-color: rgba(168,85,247,0.3); }
.trip-icon { font-size: 1.8rem; }
.trip-info { flex: 1; }
.trip-name { font-size: 1rem; font-weight: 700; color: var(--text); }
.trip-meta { font-size: 0.8rem; color: var(--text-muted); margin-top: 3px; }
.trip-count { font-size: 0.82rem; font-weight: 700; color: var(--primary-light); }

/* ══════════════════════════════════════
   CATALOG GRID
══════════════════════════════════════ */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.catalog-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 280px;
}
.catalog-card:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: 0 8px 24px rgba(168,85,247,0.2); }
.catalog-card-image-box {
  position: relative;
  width: 100%;
  height: 180px;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.catalog-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.catalog-card-no-img {
  font-size: 2.5rem;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  justify-content: center;
}
.catalog-card-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid rgba(255,255,255,0.1);
}
.catalog-card-footer {
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex-grow: 1;
}
.catalog-card-id {
  color: #00d4ff;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.catalog-card-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.3;
}

/* ══════════════════════════════════════
   ANALYTICS
══════════════════════════════════════ */
.analytics-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.analytics-stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.analytics-stat.highlight { border-color: rgba(168,85,247,0.3); background: rgba(168,85,247,0.07); }
.as-label { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px; }
.as-value { font-size: 1.5rem; font-weight: 800; }
.as-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  margin-top: 6px;
  background: rgba(16,185,129,0.2);
  color: #6ee7b7;
}
.status-bars { display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px; }
.status-bar-item { display: flex; align-items: center; gap: 12px; }
.status-bar-label { font-size: 0.82rem; font-weight: 600; width: 80px; }
.status-bar-track { flex: 1; height: 8px; background: rgba(255,255,255,0.08); border-radius: 4px; overflow: hidden; }
.status-bar-fill { height: 100%; border-radius: 4px; transition: width 0.8s ease; }
.status-bar-count { font-size: 0.8rem; color: var(--text-muted); width: 40px; text-align: right; }
.simulator-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.sim-row { display: flex; flex-direction: column; gap: 8px; }
.sim-row label { font-size: 0.88rem; color: var(--text-muted); }
.sim-row label strong { color: var(--text); }
.sim-row input[type=range] { width: 100%; accent-color: var(--primary); }
.sim-result {
  display: flex;
  gap: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.sim-result strong { color: var(--text); font-weight: 800; }
.profit-text { color: var(--accent-green) !important; }

/* ══════════════════════════════════════
   SETTINGS
══════════════════════════════════════ */
.settings-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
}
.settings-section-title { font-size: 1rem; font-weight: 700; margin-bottom: 16px; color: var(--primary-light); }
.settings-desc { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 12px; line-height: 1.6; }
.settings-status { font-size: 0.82rem; margin-top: 10px; color: var(--accent-green); }
.danger-card { border-color: rgba(239,68,68,0.25); background: rgba(239,68,68,0.05); }
.danger-title { color: #fca5a5 !important; }

/* ══════════════════════════════════════
   FORMS
══════════════════════════════════════ */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }
.form-input {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
  resize: vertical;
}
.form-input:focus { border-color: var(--primary); }
.form-input option { background: #1a1a2e; }
.form-input::placeholder { color: var(--text-faint); }
.btn-row { display: flex; gap: 10px; }
.btn-full { width: 100%; }
.search-row { display: flex; gap: 10px; }

/* ══════════════════════════════════════
   BUTTONS
══════════════════════════════════════ */
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-secondary {
  background: rgba(255,255,255,0.07);
  color: var(--text-muted);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-secondary:hover { color: var(--text); background: rgba(255,255,255,0.1); }
.btn-danger {
  background: rgba(239,68,68,0.15);
  color: #fca5a5;
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-danger:hover { background: rgba(239,68,68,0.25); }
.btn-back {
  background: none;
  border: none;
  color: var(--primary-light);
  font-size: 0.88rem;
  cursor: pointer;
  padding: 0;
  margin-bottom: 20px;
  display: inline-block;
}

/* ══════════════════════════════════════
   SELL PAGE
══════════════════════════════════════ */
.success-banner {
  text-align: center;
  padding: 48px 24px;
  background: var(--card);
  border: 1px solid rgba(16,185,129,0.3);
  border-radius: var(--radius);
}
.success-icon { font-size: 3rem; margin-bottom: 12px; }
.success-banner h3 { font-size: 1.4rem; font-weight: 800; color: var(--accent-green); margin-bottom: 8px; }
.success-banner p { color: var(--text-muted); margin-bottom: 24px; }
.detail-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 20px;
}
.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--border);
}
.detail-row:last-child { border-bottom: none; }
.detail-row-label { color: var(--text-muted); }
.detail-row-value { font-weight: 600; }
.page-desc { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 12px; }

/* ══════════════════════════════════════
   MODALS
══════════════════════════════════════ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #12121e;
  border: 1px solid var(--border2);
  border-radius: 20px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,0.7);
  animation: modal-in 0.2s ease;
}
.modal-wide { max-width: 640px; }
@keyframes modal-in {
  from { transform: scale(0.95) translateY(10px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 1.05rem; font-weight: 700; }
.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s;
}
.modal-close:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.modal-body { padding: 20px 24px 24px; }
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
  flex-wrap: wrap;
}
.modal-actions .btn-danger { margin-right: auto; }

/* TRIP DETAIL */
.trip-detail-meta {
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.8;
}
.type-section { margin-bottom: 20px; }
.type-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(168,85,247,0.08);
  border: 1px solid rgba(168,85,247,0.2);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  cursor: pointer;
}
.type-header-name { font-weight: 700; font-size: 0.95rem; }
.type-header-count { font-size: 0.78rem; color: var(--primary-light); }

/* ══════════════════════════════════════
   SYNC / LOADING
══════════════════════════════════════ */
.sync-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(168,85,247,0.1);
  border: 1px solid rgba(168,85,247,0.25);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  margin-bottom: 20px;
  font-size: 0.85rem;
  color: var(--primary-light);
}
.sync-spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(168,85,247,0.3);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.empty-state-icon { font-size: 2.5rem; margin-bottom: 12px; }

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .analytics-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    transform: translateX(-100%);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close { display: block; }
  .sidebar-overlay.open { display: block; }
  .menu-btn { display: flex; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .content { padding: 16px 16px 24px; }
  .catalog-grid { grid-template-columns: 1fr 1fr; }
  .analytics-cards { grid-template-columns: 1fr; }
  .btn-row { flex-direction: column; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .keypad { grid-template-columns: repeat(3, 70px); }
  .key { width: 70px; height: 70px; font-size: 1.2rem; }
  .catalog-grid { grid-template-columns: 1fr; }
  .sim-result { flex-direction: column; gap: 8px; }
}

/* ══════════════════════════════════════
   SAREE PHOTOS (NEW)
   ══════════════════════════════════════ */
.saree-card-thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg3);
  border: 1px solid var(--border);
}
.saree-card-no-thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--bg3);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--text-faint);
  flex-shrink: 0;
}
.modal-photos-container {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
  min-height: 20px;
}
.modal-photo-wrapper {
  position: relative;
  width: 70px;
  height: 70px;
}
.modal-photo-img {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border);
}
.modal-photo-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-red);
  color: white;
  border: none;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
  font-weight: bold;
}
.modal-photo-remove:hover { transform: scale(1.1); }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

