/* ============================================================
   POI Visit PWA — Design System
   Dark mode · Mobile-native · Indibiz branding
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&family=DM+Mono:wght@400;500&display=swap');

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  /* Brand */
  --primary:        #1A6FE8;
  --primary-dim:    #1557C0;
  --primary-glow:   rgba(26, 111, 232, 0.18);
  --primary-subtle: rgba(26, 111, 232, 0.10);

  /* Background layers */
  --bg-base:        #080C14;
  --bg-surface:     #0E1420;
  --bg-card:        #131A28;
  --bg-elevated:    #1A2236;
  --bg-input:       #0E1420;

  /* Borders */
  --border:         rgba(255,255,255,0.07);
  --border-focus:   rgba(26, 111, 232, 0.50);
  --border-strong:  rgba(255,255,255,0.12);

  /* Text */
  --text:           #F0F4FF;
  --text-secondary: #8A97B0;
  --text-tertiary:  #4A5568;
  --text-inverse:   #080C14;

  /* Status colors */
  --green:          #22C55E;
  --green-dim:      rgba(34, 197, 94, 0.12);
  --yellow:         #F59E0B;
  --yellow-dim:     rgba(245, 158, 11, 0.12);
  --red:            #EF4444;
  --red-dim:        rgba(239, 68, 68, 0.12);
  --orange:         #F97316;
  --orange-dim:     rgba(249, 115, 22, 0.12);
  --purple:         #A78BFA;
  --purple-dim:     rgba(167, 139, 250, 0.12);
  --cyan:           #22D3EE;
  --cyan-dim:       rgba(34, 211, 238, 0.12);

  /* Layout */
  --bottom-nav-h:   64px;
  --header-h:       56px;
  --safe-bottom:    env(safe-area-inset-bottom, 0px);
  --safe-top:       env(safe-area-inset-top, 0px);

  /* Radius */
  --radius-xs:  6px;
  --radius-sm:  10px;
  --radius-md:  14px;
  --radius-lg:  20px;
  --radius-xl:  28px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg:  0 8px 32px rgba(0,0,0,0.6);
  --shadow-primary: 0 4px 20px rgba(26, 111, 232, 0.35);

  /* Typography */
  --font:       'Plus Jakarta Sans', sans-serif;
  --font-mono:  'DM Mono', monospace;

  /* Transitions */
  --transition: 0.18s ease;
  --transition-slow: 0.3s ease;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  height: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg-base);
  color: var(--text);
  min-height: 100%;
  line-height: 1.5;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: var(--font); cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: var(--font); }
img { max-width: 100%; display: block; }

/* ── App Shell ──────────────────────────────────────────────── */
.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: calc(var(--bottom-nav-h) + var(--safe-bottom));
}

/* ── Header ─────────────────────────────────────────────────── */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  padding-top: var(--safe-top);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding-left: 16px;
  padding-right: 16px;
  gap: 12px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.app-header .header-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  flex: 1;
}

.app-header .header-subtitle {
  font-size: 11px;
  color: var(--text-tertiary);
  font-weight: 400;
}

.header-back {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: background var(--transition);
  flex-shrink: 0;
}
.header-back:active { background: var(--bg-elevated); }

.header-action {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: background var(--transition);
  flex-shrink: 0;
}
.header-action:active { background: var(--bg-elevated); }

/* ── Bottom Navigation ──────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: calc(var(--bottom-nav-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: stretch;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-tertiary);
  transition: color var(--transition);
  position: relative;
  padding: 8px 4px;
}

.nav-item.active { color: var(--primary); }

.nav-item .nav-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.nav-item.active .nav-icon::after {
  content: '';
  position: absolute;
  inset: -6px;
  background: var(--primary-subtle);
  border-radius: var(--radius-sm);
  z-index: -1;
}

.nav-item .nav-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.nav-badge {
  position: absolute;
  top: -2px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  background: var(--red);
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* ── Page Content ───────────────────────────────────────────── */
.page-content {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.page-content.no-pad { padding: 0; }
.page-content.pad-bottom { padding-bottom: 24px; }

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.card-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.01em;
}

.card-subtitle {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 1px;
}

.card-body { padding: 16px; }

/* ── Stat Cards ─────────────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

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

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  color: var(--primary);
}

.stat-value.green  { color: var(--green); }
.stat-value.yellow { color: var(--yellow); }
.stat-value.red    { color: var(--red); }
.stat-value.orange { color: var(--orange); }

.stat-label {
  font-size: 11px;
  color: var(--text-tertiary);
  font-weight: 500;
}

/* ── List Items ─────────────────────────────────────────────── */
.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
  cursor: pointer;
}
.list-item:last-child { border-bottom: none; }
.list-item:active { background: var(--bg-elevated); }

.list-item-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
  background: var(--bg-elevated);
}

.list-item-content { flex: 1; min-width: 0; }

.list-item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-item-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-item-meta {
  font-size: 11px;
  color: var(--text-tertiary);
  text-align: right;
  flex-shrink: 0;
}

.list-item-arrow {
  color: var(--text-tertiary);
  flex-shrink: 0;
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 20px;
  height: 48px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  transition: all var(--transition);
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
}

.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; pointer-events: none; }

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow-primary);
}
.btn-primary:active { background: var(--primary-dim); }

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-secondary:active { background: var(--bg-card); }

.btn-danger {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(239,68,68,0.2);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:active { background: var(--bg-elevated); }

.btn-block { width: 100%; }

.btn-sm {
  height: 36px;
  padding: 0 14px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

.btn-lg {
  height: 54px;
  font-size: 16px;
  border-radius: var(--radius-lg);
}

.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--radius-sm);
}

/* ── Forms ───────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.form-input {
  width: 100%;
  height: 48px;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0 14px;
  font-size: 15px;
  color: var(--text);
  outline: none;
  transition: border-color var(--transition);
  -webkit-appearance: none;
}

.form-input:focus { border-color: var(--border-focus); }
.form-input::placeholder { color: var(--text-tertiary); }
.form-input:disabled { opacity: 0.5; }

.form-textarea {
  width: 100%;
  min-height: 100px;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 15px;
  color: var(--text);
  outline: none;
  resize: vertical;
  transition: border-color var(--transition);
  -webkit-appearance: none;
}
.form-textarea:focus { border-color: var(--border-focus); }
.form-textarea::placeholder { color: var(--text-tertiary); }

.form-select {
  width: 100%;
  height: 48px;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0 14px;
  font-size: 15px;
  color: var(--text);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238A97B0' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}
.form-select:focus { border-color: var(--border-focus); }

.form-hint {
  font-size: 11px;
  color: var(--text-tertiary);
}

.form-error {
  font-size: 12px;
  color: var(--red);
}

/* Input with icon */
.input-wrap { position: relative; }
.input-wrap .form-input { padding-left: 44px; }
.input-wrap .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  pointer-events: none;
}
.input-wrap .input-action {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  padding: 4px;
}

/* ── Toggle / Radio Pills ────────────────────────────────────── */
.pill-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill {
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
  background: var(--bg-input);
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
  -webkit-user-select: none;
}

.pill:active { transform: scale(0.96); }

.pill.selected {
  background: var(--primary-subtle);
  border-color: var(--primary);
  color: var(--primary);
}

.pill.selected.green  { background: var(--green-dim);  border-color: var(--green);  color: var(--green); }
.pill.selected.red    { background: var(--red-dim);    border-color: var(--red);    color: var(--red); }
.pill.selected.yellow { background: var(--yellow-dim); border-color: var(--yellow); color: var(--yellow); }
.pill.selected.orange { background: var(--orange-dim); border-color: var(--orange); color: var(--orange); }

/* ── Badges ──────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-blue    { background: var(--primary-subtle); color: var(--primary); }
.badge-green   { background: var(--green-dim);      color: var(--green); }
.badge-yellow  { background: var(--yellow-dim);     color: var(--yellow); }
.badge-red     { background: var(--red-dim);        color: var(--red); }
.badge-orange  { background: var(--orange-dim);     color: var(--orange); }
.badge-purple  { background: var(--purple-dim);     color: var(--purple); }
.badge-gray    { background: var(--bg-elevated);    color: var(--text-secondary); }
.badge-cyan    { background: var(--cyan-dim);       color: var(--cyan); }

/* ── Step Indicator ──────────────────────────────────────────── */
.step-indicator {
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 0;
}

.step-dot {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-tertiary);
  flex-shrink: 0;
  transition: all var(--transition-slow);
  position: relative;
  z-index: 1;
}

.step-dot.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 0 0 4px var(--primary-glow);
}

.step-dot.done {
  background: var(--green);
  border-color: var(--green);
  color: white;
}

.step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  transition: background var(--transition-slow);
}

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

/* ── Photo Upload ────────────────────────────────────────────── */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.photo-slot {
  aspect-ratio: 4/3;
  border-radius: var(--radius-sm);
  border: 1.5px dashed var(--border);
  background: var(--bg-input);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.photo-slot:active { border-color: var(--primary); background: var(--primary-subtle); }

.photo-slot.filled { border-style: solid; border-color: var(--border-strong); }
.photo-slot.filled img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-slot .photo-label {
  font-size: 11px;
  color: var(--text-tertiary);
  font-weight: 500;
  text-align: center;
  padding: 0 8px;
  position: relative;
  z-index: 1;
}

.photo-slot .photo-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  background: rgba(0,0,0,0.7);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  color: white;
  font-size: 14px;
}

/* ── GPS Indicator ───────────────────────────────────────────── */
.gps-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.gps-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--text-tertiary);
  flex-shrink: 0;
}

.gps-dot.acquiring {
  background: var(--yellow);
  animation: gps-pulse 1.2s ease-in-out infinite;
}

.gps-dot.ready { background: var(--green); }
.gps-dot.error { background: var(--red); }

@keyframes gps-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.4); }
}

.gps-text {
  flex: 1;
  font-size: 12px;
  color: var(--text-secondary);
}

.gps-coords {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-tertiary);
}

/* ── Toast ───────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 12px);
  left: 16px;
  right: 16px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  box-shadow: var(--shadow-lg);
  animation: toast-in 0.25s ease;
  pointer-events: auto;
}

.toast.success { border-left: 3px solid var(--green); }
.toast.error   { border-left: 3px solid var(--red); }
.toast.warning { border-left: 3px solid var(--yellow); }
.toast.info    { border-left: 3px solid var(--primary); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Modal ───────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-slow);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  width: 100%;
  background: var(--bg-card);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 20px 20px calc(20px + var(--safe-bottom));
  border-top: 1px solid var(--border-strong);
  transform: translateY(100%);
  transition: transform var(--transition-slow);
  max-height: 90dvh;
  overflow-y: auto;
}

.modal-overlay.open .modal {
  transform: translateY(0);
}

.modal-handle {
  width: 36px;
  height: 4px;
  background: var(--border-strong);
  border-radius: var(--radius-full);
  margin: 0 auto 16px;
}

.modal-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.modal-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.modal-actions .btn { flex: 1; }

/* ── Loading States ──────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-card) 50%, var(--bg-elevated) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.spinner {
  width: 24px;
  height: 24px;
  border: 2.5px solid var(--border);
  border-top-color: var(--primary);
  border-radius: var(--radius-full);
  animation: spin 0.7s linear infinite;
}

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

.loading-screen {
  position: fixed;
  inset: 0;
  background: var(--bg-base);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 999;
}

.loading-screen .spinner { width: 36px; height: 36px; }
.loading-screen p { font-size: 14px; color: var(--text-tertiary); }

/* ── Empty State ─────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  gap: 10px;
  text-align: center;
}

.empty-icon { font-size: 40px; opacity: 0.5; }
.empty-title { font-size: 15px; font-weight: 600; color: var(--text-secondary); }
.empty-sub { font-size: 13px; color: var(--text-tertiary); line-height: 1.6; }

/* ── Section Header ──────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.section-action {
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
}

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

/* ── Info Row ────────────────────────────────────────────────── */
.info-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.info-row:last-child { border-bottom: none; }

.info-label {
  font-size: 12px;
  color: var(--text-tertiary);
  min-width: 110px;
  flex-shrink: 0;
  padding-top: 1px;
}

.info-value {
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
  flex: 1;
  line-height: 1.5;
}

/* ── Alert Banner ────────────────────────────────────────────── */
.alert {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.5;
}

.alert-info    { background: var(--primary-subtle); color: var(--primary); border: 1px solid rgba(26,111,232,0.2); }
.alert-success { background: var(--green-dim);      color: var(--green);   border: 1px solid rgba(34,197,94,0.2); }
.alert-warning { background: var(--yellow-dim);     color: var(--yellow);  border: 1px solid rgba(245,158,11,0.2); }
.alert-danger  { background: var(--red-dim);        color: var(--red);     border: 1px solid rgba(239,68,68,0.2); }

/* ── Login Page ──────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg-base);
  position: relative;
  overflow: hidden;
}

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

.login-bg::before {
  content: '';
  position: absolute;
  top: -120px;
  left: -80px;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(26,111,232,0.15) 0%, transparent 70%);
  border-radius: 50%;
}

.login-bg::after {
  content: '';
  position: absolute;
  bottom: 80px;
  right: -100px;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(26,111,232,0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.login-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 24px;
  padding-top: calc(32px + var(--safe-top));
  position: relative;
  z-index: 1;
}

.login-logo-wrap {
  margin-bottom: 40px;
}

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

.logo-mark {
  width: 40px;
  height: 40px;
  background: var(--primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: white;
  letter-spacing: -0.02em;
  box-shadow: var(--shadow-primary);
}

.logo-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.login-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.login-sub {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 6px;
  line-height: 1.5;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 32px;
}

.login-error {
  display: none;
  padding: 12px 14px;
  background: var(--red-dim);
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--red);
  line-height: 1.5;
}
.login-error.show { display: block; }

.login-footer {
  padding: 20px 24px;
  padding-bottom: calc(20px + var(--safe-bottom));
  text-align: center;
  font-size: 12px;
  color: var(--text-tertiary);
  position: relative;
  z-index: 1;
}

/* ── Utility ─────────────────────────────────────────────────── */
.text-primary   { color: var(--primary); }
.text-green     { color: var(--green); }
.text-red       { color: var(--red); }
.text-yellow    { color: var(--yellow); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary  { color: var(--text-tertiary); }
.text-sm        { font-size: 13px; }
.text-xs        { font-size: 11px; }
.font-mono      { font-family: var(--font-mono); }
.font-bold      { font-weight: 700; }
.fw-500         { font-weight: 500; }
.fw-600         { font-weight: 600; }

.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }

.mb-4  { margin-bottom: 4px; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }

.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1; }

.w-full { width: 100%; }
.hidden { display: none !important; }

/* ── Animations ──────────────────────────────────────────────── */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-up { animation: fade-up 0.3s ease both; }
.fade-up-1 { animation: fade-up 0.3s 0.05s ease both; }
.fade-up-2 { animation: fade-up 0.3s 0.10s ease both; }
.fade-up-3 { animation: fade-up 0.3s 0.15s ease both; }
.fade-up-4 { animation: fade-up 0.3s 0.20s ease both; }
.fade-up-5 { animation: fade-up 0.3s 0.25s ease both; }

/* ── Scrollbar ───────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 2px; }
