/* driive Design System — app.css */

:root {
  --bg:          #FAFBFC;
  --card:        #FFFFFF;
  --text:        #1E293B;
  --text-muted:  #64748B;
  --text-light:  #94A3B8;
  --accent:      #f37021;
  --accent-dark: #d95b0b;
  --accent-lt:   #fff1e8;
  --navy:        #1E3A8A;
  --gold:        #F59E0B;
  --gold-lt:     #FEF3C7;
  --border:      #E2E8F0;
  --border-lt:   #F1F5F9;
  --red:         #EF4444;
  --red-lt:      #FEE2E2;
  --green:       #f37021;
  --green-lt:    #fff1e8;
  --radius-sm:   8px;
  --radius:      12px;
  --radius-lg:   16px;
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.04), 0 6px 24px rgba(0,0,0,0.03);
  --shadow:      0 4px 15px -3px rgba(243,112,33,0.20);
  --shadow-lg:   0 8px 25px -5px rgba(243,112,33,0.30);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

.app-logo {
  display: inline-block;
  width: auto;
  height: 36px;
  object-fit: contain;
}
.app-logo-sm { height: 28px; width: auto; object-fit: contain; }
.app-logo-lg { height: 46px; width: auto; object-fit: contain; }
.app-logo-email { display: block; width: 132px; height: auto; }

/* ─── Typography ──────────────────────────────────────────── */
.display { font-family: 'Playfair Display', serif; }

/* ─── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

/* ─── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover  { transform: translateY(-1px) scale(1.015); }
.btn:active { transform: translateY(0) scale(0.99); }

.btn-sm  { padding: 8px 16px;  font-size: 13px; }
.btn-md  { padding: 12px 24px; font-size: 14px; }
.btn-lg  { padding: 16px 32px; font-size: 16px; }
.btn-full { width: 100%; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow);
}
.btn-primary:hover { background: var(--accent-dark); box-shadow: var(--shadow-lg); }

.btn-gold {
  background: var(--gold);
  color: #fff;
  box-shadow: 0 4px 15px -3px rgba(245,158,11,0.30);
}
.btn-gold:hover { background: #D97706; }

.btn-secondary {
  background: var(--card);
  color: var(--text);
  border: 1.5px solid var(--border);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.btn-secondary:hover { background: var(--border-lt); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}
.btn-ghost:hover { background: var(--border-lt); }

.btn-danger {
  background: var(--red);
  color: #fff;
  box-shadow: 0 4px 15px -3px rgba(239,68,68,0.20);
}
.btn-danger:hover { background: #DC2626; }

.btn-whatsapp {
  background: rgba(243,112,33,0.08);
  color: #9a3a06;
  border: 1.5px solid #f37021;
  font-weight: 600;
}
.btn-whatsapp:hover { background: rgba(243,112,33,0.15); }

/* ─── Form Inputs ─────────────────────────────────────────── */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.input-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}
.bnk-input, .bnk-select {
  padding: 12px 16px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  background: var(--card);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}
.bnk-input:focus, .bnk-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(243,112,33,0.10);
}
.bnk-select { cursor: pointer; }

/* ─── Badges ──────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.badge-green  { background: var(--green-lt); color: #9a3a06; border: 1px solid #fed7aa; }
.badge-yellow { background: var(--gold-lt);  color: #92400E; border: 1px solid #FDE68A; }
.badge-red    { background: var(--red-lt);   color: #991B1B; border: 1px solid #FECACA; }
.badge-blue   { background: #DBEAFE;          color: #1E40AF; border: 1px solid #BFDBFE; }

/* ─── Range Slider ────────────────────────────────────────── */
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--border-lt);
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px; height: 24px;
  border-radius: 12px;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(243,112,33,0.35);
  border: 3px solid #fff;
}
input[type="range"]::-moz-range-thumb {
  width: 24px; height: 24px;
  border-radius: 12px;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(243,112,33,0.35);
  border: 3px solid #fff;
}

/* ─── Toggle Switch ───────────────────────────────────────── */
.toggle-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
}
.toggle-track {
  width: 48px; height: 26px;
  border-radius: 13px;
  background: var(--border);
  cursor: pointer;
  position: relative;
  transition: background 0.25s;
  flex-shrink: 0;
  margin-left: 12px;
  border: none;
  padding: 0;
}
.toggle-track.on { background: var(--accent); }
.toggle-thumb {
  width: 20px; height: 20px;
  border-radius: 10px;
  background: #fff;
  position: absolute;
  top: 3px; left: 3px;
  transition: left 0.25s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  pointer-events: none;
}
.toggle-track.on .toggle-thumb { left: 25px; }

/* ─── Condition Pills ─────────────────────────────────────── */
.condition-pill {
  flex: 1;
  padding: 10px 8px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'DM Sans', sans-serif;
  text-align: center;
}
.condition-pill.active {
  border-color: var(--accent);
  background: var(--accent-lt);
  color: var(--accent-dark);
}

/* ─── Step Indicator ──────────────────────────────────────── */
.step-dot {
  width: 28px; height: 28px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  background: var(--border);
  color: var(--text-muted);
  transition: all 0.3s;
  flex-shrink: 0;
}
.step-dot.active, .step-dot.done { background: var(--accent); color: #fff; }
.step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  transition: background 0.3s;
  margin: 0 8px;
}
.step-line.done { background: var(--accent); }

/* ─── Upload Zones ────────────────────────────────────────── */
.upload-slot {
  border: 2px dashed var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  background: rgba(241,245,249,0.4);
  transition: all 0.2s;
  padding: 16px 8px;
  aspect-ratio: 1;
  position: relative;
}
.upload-slot:hover, .upload-slot.has-file {
  border-color: var(--accent);
  background: var(--accent-lt);
}
.upload-slot input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.upload-slot-wide { aspect-ratio: auto; padding: 20px; }

/* ─── Progress Bar ────────────────────────────────────────── */
.progress-bar { height: 8px; border-radius: 4px; background: var(--border-lt); overflow: hidden; }
.progress-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), #ff9a4f);
  transition: width 0.5s ease;
}

/* ─── Alert / Callout ─────────────────────────────────────── */
.callout {
  padding: 16px 20px;
  border-radius: var(--radius);
  border-left: 4px solid var(--accent);
  background: var(--accent-lt);
  font-size: 14px;
  color: var(--text);
}

/* ─── Tables ──────────────────────────────────────────────── */
.bnk-table { width: 100%; border-collapse: collapse; }
.bnk-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.bnk-table td {
  padding: 14px 16px;
  font-size: 14px;
  color: var(--text);
  border-bottom: 1px solid var(--border-lt);
}
.bnk-table tr:last-child td { border-bottom: none; }
.bnk-table tr:hover td { background: rgba(243,112,33,0.03); }

/* ─── Stat Card ───────────────────────────────────────────── */
.stat-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}
.stat-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

/* ─── Animations ──────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.8); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

.animate-fade-up  { animation: fadeInUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.animate-scale-in { animation: scaleIn  0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.animate-pulse    { animation: pulse 2s ease-in-out infinite; }

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }

/* ─── Notifications / Toast ───────────────────────────────── */
#toast-container {
  position: fixed;
  top: 20px; right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  padding: 14px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  background: var(--text);
  color: #fff;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  animation: fadeInUp 0.3s ease both;
  max-width: 340px;
}
.toast.success { background: var(--accent); }
.toast.error   { background: var(--red); }

/* ─── Lightbox ────────────────────────────────────────────── */
.lightbox-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex; align-items: center; justify-content: center;
  z-index: 9000;
  backdrop-filter: blur(8px);
  cursor: pointer;
}
.lightbox-inner {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.lightbox-inner img { max-width: 100%; max-height: 85vh; display: block; }

/* ─── Admin Sidebar ───────────────────────────────────────── */
.admin-sidebar {
  width: 240px;
  background: var(--card);
  border-right: 1px solid var(--border);
  transition: width 0.3s cubic-bezier(0.4,0,0.2,1);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: sticky;
  top: 0;
}
.admin-sidebar.collapsed { width: 64px; }
.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.15s;
  text-decoration: none;
  white-space: nowrap;
  margin-bottom: 2px;
}
.admin-nav-item:hover, .admin-nav-item.active {
  background: var(--accent-lt);
  color: var(--accent-dark);
  font-weight: 600;
}

/* ─── Drag & Drop Zone ────────────────────────────────────── */
.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}
.dropzone.dragover {
  border-color: var(--accent);
  background: var(--accent-lt);
}

/* ─── Selection ───────────────────────────────────────────── */
::selection { background: var(--accent-lt); color: var(--text); }

/* ─── Admin Mobile Bar ────────────────────────────────────── */
.admin-mobile-bar {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  height: 56px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 101;
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}
.admin-mobile-menu-btn {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  cursor: pointer;
  font-size: 18px;
  flex-shrink: 0;
  color: var(--text);
}

/* ─── Sidebar Overlay (mobile) ────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.45);
  z-index: 99;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.active { display: block; }

/* ─── New-app Badge ───────────────────────────────────────── */
.new-app-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px; height: 20px;
  border-radius: 10px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 0 5px;
  margin-left: auto;
  flex-shrink: 0;
  animation: pulse 2s ease-in-out infinite;
}

/* ─── Nav label (hidden when sidebar collapsed) ───────────── */
.admin-sidebar.collapsed .nav-label { display: none; }

/* ─── Table scroll wrapper ────────────────────────────────── */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ─── Calendar Grid ───────────────────────────────────────── */
.cal-grid { border-collapse: collapse; width: 100%; min-width: 640px; }
.cal-grid th {
  padding: 10px 8px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.cal-grid td {
  padding: 4px;
  vertical-align: top;
  border: 1px solid var(--border-lt);
  min-width: 120px;
}
.cal-grid .cal-time {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  padding: 8px 10px;
  background: var(--border-lt);
  text-align: right;
  min-width: 56px;
}
.cal-cell {
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 12px;
  min-height: 52px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}
.cal-empty { background: transparent; }
.cal-empty:hover { background: var(--border-lt); }
.cal-available { background: var(--green-lt); border: 1px solid #fed7aa; }
.cal-booked    { background: var(--gold-lt);  border: 1px solid #FDE68A; }
.cal-add-btn {
  font-size: 11px;
  color: var(--text-muted);
  background: none;
  border: 1px dashed var(--border);
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
  width: 100%;
  transition: all 0.15s;
}
.cal-add-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-lt); }

/* ─── Bulk action bar ─────────────────────────────────────── */
.bulk-bar {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius);
  margin-bottom: 8px;
  animation: fadeInUp 0.2s ease;
}
.bulk-bar.visible { display: flex; }

/* ─── Status change banner ────────────────────────────────── */
.status-change-banner {
  padding: 14px 20px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent-lt), #E0F2FE);
  border: 1.5px solid var(--accent);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

/* ─── Document checklist card ─────────────────────────────── */
.doc-check-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-lt);
}
.doc-check-item:last-child { border-bottom: none; }

/* ─── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  /* ── Admin mobile sidebar ── */
  .admin-mobile-bar { display: flex; }
  .admin-main { padding-top: 68px !important; }

  .admin-sidebar {
    position: fixed !important;
    z-index: 100;
    height: 100vh;
    width: 260px !important;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
  }
  .admin-sidebar.mobile-open { transform: translateX(0); }
  .admin-sidebar.collapsed   { width: 260px !important; }

  /* ── Stat card grids → 2 columns on mobile ── */
  .stat-grid-4 { grid-template-columns: 1fr 1fr !important; }
  .stat-grid-3 { grid-template-columns: 1fr 1fr !important; }

  /* ── Table horizontal scroll ── */
  .table-scroll { overflow-x: auto; }

  /* ── Admin main padding ── */
  .admin-px { padding-left: 16px !important; padding-right: 16px !important; }

  /* ── Hide columns on mobile ── */
  .hide-mobile { display: none !important; }

  /* ── Customer dashboard ── */
  .dash-grid-2 { grid-template-columns: 1fr !important; }

  /* ── Prevent iOS auto-zoom on inputs/selects ── */
  .bnk-input, .bnk-select, input, select, textarea { font-size: 16px !important; }
}
