/* ============================================================
   AMALIYOT TIZIMI — Premium CSS
   amaliyot.uyutqi.uz
   ============================================================ */

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

:root {
  --primary: #6c63ff;
  --primary-dark: #574fd4;
  --primary-glow: rgba(108, 99, 255, 0.35);
  --secondary: #ff6b9d;
  --success: #22d3a0;
  --warning: #f59e0b;
  --danger: #f43f5e;
  --info: #38bdf8;

  --bg: #0d0e1a;
  --bg-card: rgba(255,255,255,0.04);
  --bg-card-hover: rgba(255,255,255,0.07);
  --border: rgba(255,255,255,0.09);
  --border-active: rgba(108,99,255,0.5);

  --text: #f1f0ff;
  --text-muted: #8b8bad;
  --text-dim: #5a5a7a;

  --sidebar-w: 240px;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 40px var(--primary-glow);
}

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

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

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

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }

/* ============================================================
   SCREENS
   ============================================================ */
.screen { display: none; }
.screen.active { display: block; }

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(108,99,255,0.18) 0%, transparent 70%),
              radial-gradient(ellipse 60% 50% at 80% 100%, rgba(255,107,157,0.12) 0%, transparent 60%),
              var(--bg);
}

.login-box {
  width: 100%;
  max-width: 420px;
  padding: 48px 40px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 24px;
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow);
  position: relative;
  z-index: 2;
}

.login-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 32px;
  gap: 12px;
}

.logo-circle {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  color: white;
  box-shadow: 0 8px 24px var(--primary-glow);
}

.login-logo h1 {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-logo p {
  color: var(--text-muted);
  font-size: 0.875rem;
  text-align: center;
}

/* ---- Decorative blobs ---- */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}
.blob-1 { width: 500px; height: 500px; background: rgba(108,99,255,0.12); top: -200px; right: -150px; }
.blob-2 { width: 400px; height: 400px; background: rgba(255,107,157,0.1); bottom: -100px; left: -100px; }

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  padding: 12px 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(108,99,255,0.15);
}
.form-group textarea { resize: vertical; min-height: 90px; }
.form-group select option { background: #1a1b2e; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 4px 16px var(--primary-glow);
}
.btn-primary:hover { box-shadow: 0 6px 24px var(--primary-glow); filter: brightness(1.1); }

.btn-success {
  background: linear-gradient(135deg, var(--success), #16a97b);
  color: #fff;
  box-shadow: 0 4px 12px rgba(34,211,160,0.3);
}
.btn-success:hover { filter: brightness(1.1); }

.btn-danger {
  background: linear-gradient(135deg, var(--danger), #c4273e);
  color: #fff;
}
.btn-danger:hover { filter: brightness(1.1); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg-card); color: var(--text); border-color: var(--border-active); }

.btn-outline {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
}
.btn-outline:hover { background: rgba(108,99,255,0.12); }

.btn-warning {
  background: linear-gradient(135deg, var(--warning), #d97706);
  color: #fff;
}

.btn-block { width: 100%; }
.btn-sm { padding: 7px 14px; font-size: 0.8rem; }
.btn-icon { padding: 8px; border-radius: var(--radius-xs); min-width: 36px; min-height: 36px; }

/* ============================================================
   APP LAYOUT
   ============================================================ */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ---- Sidebar ---- */
.sidebar {
  width: var(--sidebar-w);
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  position: fixed;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  background: rgba(255,255,255,0.03);
  border-right: 1px solid var(--border);
  backdrop-filter: blur(24px);
  z-index: 100;
  padding: 24px 16px;
}

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

.sidebar-logo .logo-badge {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  color: #fff;
  flex-shrink: 0;
}
.sidebar-logo h2 { font-size: 0.95rem; font-weight: 700; line-height: 1.2; }
.sidebar-logo span { font-size: 0.7rem; color: var(--text-muted); }

.nav-section { margin-bottom: 8px; }
.nav-section-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  padding: 0 10px;
  margin-bottom: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}
.nav-item:hover { color: var(--text); background: var(--bg-card); }
.nav-item.active {
  color: var(--primary);
  background: rgba(108,99,255,0.12);
  font-weight: 600;
}
.nav-item .nav-icon { font-size: 1.1rem; width: 22px; text-align: center; }

.sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius-sm);
  cursor: default;
}
.user-card .avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
  flex-shrink: 0;
}
.user-card .user-info-text h4 { font-size: 0.85rem; font-weight: 600; }
.user-card .user-info-text span { font-size: 0.72rem; color: var(--text-muted); }
.logout-btn {
  width: 100%;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: none;
  border: 1px solid rgba(244,63,94,0.25);
  color: var(--danger);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.logout-btn:hover { background: rgba(244,63,94,0.08); }

/* ---- Main ---- */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  padding: 32px;
  max-width: calc(100vw - var(--sidebar-w));
}

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
  margin-bottom: 28px;
}
.page-header h1 {
  font-size: 1.7rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.page-header p { color: var(--text-muted); font-size: 0.9rem; }
.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================================
   CARDS & PANELS
   ============================================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.2s;
}
.card:hover { border-color: rgba(255,255,255,0.14); }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.card-title { font-size: 1rem; font-weight: 700; }

/* ============================================================
   STATS ROW
   ============================================================ */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.stat-icon.purple { background: rgba(108,99,255,0.18); }
.stat-icon.green { background: rgba(34,211,160,0.18); }
.stat-icon.orange { background: rgba(245,158,11,0.18); }
.stat-icon.pink { background: rgba(255,107,157,0.18); }
.stat-icon.blue { background: rgba(56,189,248,0.18); }
.stat-box h3 { font-size: 1.5rem; font-weight: 700; line-height: 1; }
.stat-box p { font-size: 0.75rem; color: var(--text-muted); margin-top: 3px; }

/* ============================================================
   TABLE
   ============================================================ */
.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.875rem; }
th { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); font-weight: 600; white-space: nowrap; }
tbody tr { transition: background 0.15s; }
tbody tr:hover { background: var(--bg-card-hover); }
tbody tr:last-child td { border-bottom: none; }

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 600;
}
.badge-green { background: rgba(34,211,160,0.15); color: var(--success); }
.badge-orange { background: rgba(245,158,11,0.15); color: var(--warning); }
.badge-red { background: rgba(244,63,94,0.15); color: var(--danger); }
.badge-purple { background: rgba(108,99,255,0.15); color: var(--primary); }
.badge-grey { background: rgba(255,255,255,0.07); color: var(--text-muted); }

/* ============================================================
   TAB PANES
   ============================================================ */
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ============================================================
   MAP PREVIEW
   ============================================================ */
.map-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--info);
  font-size: 0.8rem;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s;
}
.map-link:hover { opacity: 0.8; }

/* ============================================================
   REPORT CARD (Talaba)
   ============================================================ */
.report-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.2s;
  margin-bottom: 16px;
}
.report-card:hover { border-color: rgba(255,255,255,0.14); }

.report-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.report-date { font-weight: 700; font-size: 1rem; }
.report-badge-row { display: flex; gap: 8px; flex-wrap: wrap; }

.report-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.report-meta span { display: flex; align-items: center; gap: 5px; }

.report-text {
  font-size: 0.875rem;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 14px;
  white-space: pre-wrap;
}

.report-images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
}
.report-img-thumb {
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  width: 100%;
}
.report-img-thumb:hover { transform: scale(1.04); box-shadow: 0 4px 16px rgba(0,0,0,0.4); }

/* ---- Grade display ---- */
.grade-display {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(34,211,160,0.08);
  border: 1px solid rgba(34,211,160,0.2);
  border-radius: var(--radius-sm);
  margin-top: 12px;
}
.grade-num { font-size: 1.5rem; font-weight: 800; color: var(--success); }
.grade-comment { font-size: 0.82rem; color: var(--text-muted); }

/* ============================================================
   LOCATION SUBMIT (Talaba)
   ============================================================ */
.location-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  margin-bottom: 20px;
}
.gps-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  display: block;
}
.location-status {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.location-coords {
  font-size: 0.8rem;
  color: var(--success);
  font-weight: 600;
  margin-bottom: 16px;
}

/* ============================================================
   IMAGE UPLOAD AREA
   ============================================================ */
.upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.upload-area:hover, .upload-area.drag-over {
  border-color: var(--primary);
  background: rgba(108,99,255,0.05);
}
.upload-area input[type="file"] { display: none; }
.upload-area p { color: var(--text-muted); font-size: 0.85rem; margin-top: 8px; }

.upload-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
  margin-top: 14px;
}
.upload-preview-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.upload-preview-item img { width: 100%; height: 100%; object-fit: cover; }
.upload-preview-item .del-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,0.7);
  border: none;
  color: #fff;
  font-size: 0.7rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

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

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-box {
  background: #1a1b2e;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow);
  animation: slideUp 0.25s ease;
  max-height: 90vh;
  overflow-y: auto;
}
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.modal-header h3 { font-size: 1.1rem; font-weight: 700; }
.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 4px;
  line-height: 1;
  transition: color 0.2s;
}
.modal-close:hover { color: var(--danger); }

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 22px;
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  padding: 24px;
  cursor: zoom-out;
}
.lightbox.hidden { display: none; }
.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  animation: zoomIn 0.2s ease;
}
@keyframes zoomIn { from { transform: scale(0.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ============================================================
   TOAST
   ============================================================ */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 320px;
}

.toast {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: #fff;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInRight 0.3s ease;
}
@keyframes slideInRight { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

.toast.success { background: linear-gradient(135deg, #22d3a0, #16a97b); }
.toast.error { background: linear-gradient(135deg, #f43f5e, #c4273e); }
.toast.info { background: linear-gradient(135deg, #6c63ff, #574fd4); }
.toast.warning { background: linear-gradient(135deg, #f59e0b, #d97706); }
.toast-icon { font-size: 1.1rem; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px;
  color: var(--text-muted);
  text-align: center;
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.6; }
.empty-state h3 { font-size: 1rem; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.empty-state p { font-size: 0.85rem; }

/* ============================================================
   LOADING
   ============================================================ */
.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   ACTION BUTTONS (table)
   ============================================================ */
.action-btns { display: flex; gap: 6px; }

/* ============================================================
   STUDENT DETAIL VIEW (in ustoz panel)
   ============================================================ */
.student-detail-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.student-avatar-lg {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.student-info-block h2 { font-size: 1.1rem; font-weight: 700; }
.student-info-block span { font-size: 0.8rem; color: var(--text-muted); }

/* ============================================================
   DATE FILTER ROW
   ============================================================ */
.filter-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.filter-row input[type="date"],
.filter-row select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 9px 13px;
  font-family: inherit;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s;
}
.filter-row input[type="date"]:focus,
.filter-row select:focus { border-color: var(--primary); }

/* ============================================================
   GRADE INLINE FORM
   ============================================================ */
.grade-form-inline {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 12px;
}
.grade-form-inline input[type="number"] {
  width: 80px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-xs);
  padding: 7px 10px;
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
}
.grade-form-inline input[type="text"] {
  flex: 1;
  min-width: 120px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-xs);
  padding: 7px 10px;
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }
  .sidebar { width: 240px !important; transform: translateX(-100%); transition: transform 0.3s; }
  .sidebar.open { transform: translateX(0); width: 240px !important; }
  .main-content { margin-left: 0; padding: 16px; }
  .mobile-menu-btn {
    display: flex;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 200;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text);
  }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 769px) {
  .mobile-menu-btn { display: none; }
}

/* Error msg */
.error-msg {
  background: rgba(244,63,94,0.12);
  border: 1px solid rgba(244,63,94,0.3);
  color: var(--danger);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-top: 12px;
}
.hidden { display: none !important; }

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

/* Help text */
.help-text { font-size: 0.75rem; color: var(--text-muted); margin-top: 5px; }

/* Progress bar */
.progress-bar-wrap { height: 6px; background: var(--border); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--primary), var(--secondary)); border-radius: 99px; transition: width 0.4s; }

/* Pulse animation for GPS button */
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(108,99,255,0.4); }
  70% { box-shadow: 0 0 0 16px rgba(108,99,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(108,99,255,0); }
}
.btn-pulse { animation: pulse-ring 1.5s infinite; }


