/* ============================================
   PARKLY — Styles globaux
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Geist:wght@300;400;500;600&display=swap');
@import url('https://cdn.jsdelivr.net/npm/@tabler/icons-webfont@2.40.0/tabler-icons.min.css');

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

:root {
  --bg: #0A0B0F;
  --bg-2: #0F1118;
  --surface: rgba(255,255,255,0.025);
  --surface-2: rgba(255,255,255,0.04);
  --surface-3: rgba(255,255,255,0.06);
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.14);
  --text: #F5F5F7;
  --text-muted: rgba(245,245,247,0.55);
  --text-faint: rgba(245,245,247,0.35);
  --accent: #7C5CFF;
  --accent-2: #FF6B9D;
  --success: #4ADE80;
  --warning: #FFA94D;
  --danger: #FF5C5C;
  --info: #38BDF8;
}

html, body { height: 100%; }
body {
  background: var(--bg);
  font-family: 'Geist', -apple-system, sans-serif;
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ============================================
   AUTH PAGES (login / register)
   ============================================ */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  position: relative;
  overflow: hidden;
}
.auth-bg {
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse 600px 400px at 25% 30%, rgba(124,92,255,0.15) 0%, transparent 60%),
    radial-gradient(ellipse 500px 500px at 80% 70%, rgba(255,107,157,0.10) 0%, transparent 60%),
    radial-gradient(ellipse 800px 300px at 50% 100%, rgba(124,92,255,0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.auth-grid {
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.012) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black, transparent);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black, transparent);
  pointer-events: none;
  z-index: 0;
}

.auth-shell {
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: 420px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 40px;
  justify-content: center;
}
.brand-mark {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(124,92,255,0.25);
}
.brand-name {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.brand-name em {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-weight: 400;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px 32px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 20px; right: 20px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
}

.head { text-align: center; margin-bottom: 28px; }
.head-eyebrow {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
  display: block;
}
.head-title {
  font-family: 'Instrument Serif', serif;
  font-size: 32px;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.head-title em {
  font-style: italic;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Tabs / segmented control */
.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 24px;
  position: relative;
}
.seg-thumb {
  position: absolute;
  top: 4px; bottom: 4px; left: 4px;
  width: calc(50% - 4px);
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.seg.right .seg-thumb { transform: translateX(100%); }
.seg-link {
  position: relative;
  z-index: 1;
  padding: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-align: center;
  cursor: pointer;
  border-radius: 8px;
  transition: color 0.2s;
}
.seg-link.active { color: var(--text); }

/* Form fields */
.field { margin-bottom: 16px; }
.field-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.field-link {
  font-size: 12px;
  color: var(--text-muted);
  transition: color 0.2s;
}
.field-link:hover { color: var(--text); }

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.input-wrap > i {
  position: absolute;
  left: 14px;
  font-size: 16px;
  color: var(--text-faint);
  pointer-events: none;
  transition: color 0.2s;
}
.input {
  width: 100%;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px 12px 42px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: all 0.2s;
}
.input::placeholder { color: var(--text-faint); }
.input:hover { border-color: var(--border-strong); }
.input:focus {
  border-color: rgba(124,92,255,0.5);
  background: rgba(124,92,255,0.04);
  box-shadow: 0 0 0 4px rgba(124,92,255,0.08);
}
.input:focus ~ i, .input-wrap:focus-within > i { color: var(--accent); }
.input.has-error { border-color: rgba(255,92,92,0.5); }

.toggle-pass {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-faint);
  padding: 6px;
  display: flex;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
.toggle-pass:hover { color: var(--text); background: rgba(255,255,255,0.05); }

/* Strength meter */
.strength { margin-top: 10px; display: none; }
.strength.visible { display: block; }
.strength-bars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-bottom: 6px;
}
.strength-seg {
  height: 3px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  transition: background 0.25s;
}
.strength-label { font-size: 11px; color: var(--text-faint); }

/* Checkbox custom */
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 18px 0 22px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  cursor: pointer;
}
.check-row input[type=checkbox] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px; height: 16px;
  margin-top: 2px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: rgba(255,255,255,0.03);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: all 0.15s;
}
.check-row input[type=checkbox]:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.check-row input[type=checkbox]:checked::after {
  content: '';
  position: absolute;
  left: 4px; top: 1px;
  width: 5px; height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.check-row a { color: var(--text); border-bottom: 1px dotted var(--text-faint); }

/* Buttons */
.btn-submit {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--accent) 0%, #6B4DE8 100%);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: white;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(124,92,255,0.25), inset 0 1px 0 rgba(255,255,255,0.15);
}
.btn-submit:hover {
  background: linear-gradient(135deg, #8B6DFF 0%, #7C5CFF 100%);
  box-shadow: 0 6px 24px rgba(124,92,255,0.35);
  transform: translateY(-1px);
}
.btn-submit:active { transform: translateY(0); }
.btn-submit i { transition: transform 0.2s; font-size: 16px; }
.btn-submit:hover i { transform: translateX(2px); }

.legal {
  text-align: center;
  margin-top: 22px;
  font-size: 12px;
  color: var(--text-faint);
  line-height: 1.5;
}
.legal a { color: var(--text-muted); }
.legal a:hover { color: var(--text); }

/* Form errors */
.form-error {
  background: rgba(255,92,92,0.08);
  border: 1px solid rgba(255,92,92,0.25);
  color: #FFB3B3;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.field-error {
  font-size: 12px;
  color: #FF8C8C;
  margin-top: 6px;
}

/* Toast (réutilisé partout) */
.toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-12px);
  background: rgba(20,21,27,0.95);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 1000;
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast i { font-size: 16px; }
.toast.success i { color: var(--success); }
.toast.info i    { color: var(--accent); }
.toast.error i   { color: var(--danger); }
.toast.warning i { color: var(--warning); }

/* ============================================
   APP LAYOUT (hub + dashboard)
   ============================================ */
.app-bg {
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse 700px 500px at 15% 10%, rgba(124,92,255,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 500px 400px at 90% 20%, rgba(255,107,157,0.08) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.topbar {
  position: relative; z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px);
  background: rgba(10,11,15,0.7);
}
.brand-mark-sm {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(124,92,255,0.25);
}

.top-actions { display: flex; align-items: center; gap: 6px; }

.icon-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text-muted);
  transition: all 0.18s;
  position: relative;
}
.icon-btn:hover {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 5px 5px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: all 0.18s;
  margin-left: 8px;
}
.user-chip:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
}
.user-chip-name { font-size: 13px; font-weight: 500; }
.user-chip-coins {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.user-chip-coins i { color: var(--warning); font-size: 13px; }
.avatar-wrap { position: relative; }
.avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FF6B9D 0%, #7C5CFF 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 500;
  color: white;
}
.online-dot {
  position: absolute;
  bottom: -1px; right: -1px;
  width: 10px; height: 10px;
  background: var(--success);
  border-radius: 50%;
  border: 2px solid var(--bg);
}

.dropdown-host { position: relative; }
.dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px); right: 0;
  width: 220px;
  background: #0F1118;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
  z-index: 30;
}
.dropdown.open { display: block; }
.dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px;
  font-size: 13px;
  color: var(--text);
  border-radius: 7px;
  transition: background 0.15s;
}
.dropdown-item:hover { background: var(--surface-2); }
.dropdown-item i { font-size: 16px; color: var(--text-muted); }
.dropdown-item.danger { color: var(--danger); }
.dropdown-item.danger i { color: var(--danger); }
.dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }
.dropdown-header {
  padding: 10px 10px 8px;
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.04em;
}

/* ============================================
   HUB (page /parks)
   ============================================ */
.main {
  position: relative; z-index: 5;
  max-width: 1200px;
  margin: 0 auto;
  padding: 36px 32px 60px;
}

.hello { margin-bottom: 32px; }
.hello-eyebrow {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.hello-title {
  font-family: 'Instrument Serif', serif;
  font-size: 38px;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.hello-title em {
  font-style: italic;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hello-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 6px;
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 36px;
}
.kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
}
.kpi-label {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.kpi-label i { font-size: 13px; }
.kpi-value {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.kpi-trend {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  margin-left: 8px;
  padding: 2px 6px;
  border-radius: 4px;
}
.kpi-trend.up   { background: rgba(74,222,128,0.1);  color: var(--success); }
.kpi-trend.flat { background: rgba(255,255,255,0.05); color: var(--text-muted); }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.section-title { font-size: 18px; font-weight: 500; letter-spacing: -0.01em; }
.section-title span {
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 6px;
  font-size: 14px;
}

.parks-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.park {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.2, 0, 0, 1);
  position: relative;
  display: block;
  color: inherit;
}
.park:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
  transform: translateY(-2px);
}
.park:hover .park-cover { transform: scale(1.04); }
.park:hover .park-enter { opacity: 1; transform: translateY(0); }

.park-cover-wrap {
  position: relative;
  height: 140px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.park-cover {
  position: absolute; inset: 0;
  transition: transform 0.4s ease;
}
.park-cover svg { width: 100%; height: 100%; display: block; }

.park-status {
  position: absolute;
  top: 12px; left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  background: rgba(10,11,15,0.7);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text);
}
.pulse {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.5; } }
.park-status.closed .pulse {
  background: var(--text-faint);
  box-shadow: none;
  animation: none;
}
.park-status.building .pulse {
  background: var(--warning);
  box-shadow: 0 0 8px var(--warning);
}
.park-day-pill {
  position: absolute;
  top: 12px; right: 12px;
  padding: 4px 9px;
  background: rgba(10,11,15,0.7);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 11px;
  color: var(--text-muted);
}

.park-body { padding: 16px 18px 18px; }
.park-name {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}
.park-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dot-sep {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--text-faint);
}

.park-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.stat-row { display: flex; flex-direction: column; gap: 2px; }
.stat-label {
  font-size: 10px;
  color: var(--text-faint);
  letter-spacing: 0.04em;
}
.stat-val {
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
}
.stat-val i { font-size: 13px; color: var(--text-muted); }

.sat-bar {
  position: relative;
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 4px;
}
.sat-fill {
  position: absolute; inset: 0 auto 0 0;
  border-radius: 2px;
}

.park-enter {
  position: absolute;
  bottom: 18px; right: 18px;
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent) 0%, #6B4DE8 100%);
  border-radius: 50%;
  color: white;
  opacity: 0;
  transform: translateY(6px);
  transition: all 0.25s;
  box-shadow: 0 6px 20px rgba(124,92,255,0.4);
  pointer-events: none;
}
.park-enter i { font-size: 18px; }

.create-bar {
  margin-top: 20px;
  width: 100%;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: 16px;
  padding: 24px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
}
.create-bar:hover {
  background: var(--surface-2);
  border-color: var(--accent);
  border-style: solid;
}
.create-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(124,92,255,0.15) 0%, rgba(255,107,157,0.15) 100%);
  border: 1px solid rgba(124,92,255,0.25);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}
.create-bar:hover .create-icon {
  background: linear-gradient(135deg, rgba(124,92,255,0.25) 0%, rgba(255,107,157,0.25) 100%);
  transform: scale(1.05);
}
.create-icon i { font-size: 22px; color: var(--accent); }
.create-text { flex: 1; }
.create-title { font-size: 15px; font-weight: 500; margin-bottom: 4px; }
.create-sub { font-size: 12px; color: var(--text-muted); }

.empty-state {
  text-align: center;
  padding: 60px 32px;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: 16px;
}
.empty-icon {
  width: 64px; height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(124,92,255,0.15) 0%, rgba(255,107,157,0.15) 100%);
  border: 1px solid rgba(124,92,255,0.25);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px;
}
.empty-icon i { font-size: 28px; color: var(--accent); }
.empty-title {
  font-family: 'Instrument Serif', serif;
  font-size: 24px;
  margin-bottom: 6px;
}
.empty-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 22px;
}

/* ============================================
   MODAL
   ============================================ */
.modal-host {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  z-index: 100;
}
.modal-host.open { display: flex; }
.modal {
  width: 100%;
  max-width: 460px;
  background: #0F1118;
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.modal-head {
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.modal-eyebrow {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.modal-title {
  font-family: 'Instrument Serif', serif;
  font-size: 24px;
  font-weight: 400;
}
.modal-title em {
  font-style: italic;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.modal-close {
  width: 32px; height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  transition: all 0.15s;
}
.modal-close:hover {
  color: var(--text);
  background: var(--surface-2);
}
.modal-body { padding: 22px 24px; }
.modal-foot {
  padding: 18px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  background: rgba(255,255,255,0.015);
}
.btn {
  padding: 10px 18px;
  border-radius: 9px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.18s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
}
.btn-ghost {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.btn-ghost:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--surface);
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #6B4DE8 100%);
  border: 1px solid rgba(255,255,255,0.1);
  color: white;
  box-shadow: 0 4px 16px rgba(124,92,255,0.3), inset 0 1px 0 rgba(255,255,255,0.15);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #8B6DFF 0%, #7C5CFF 100%);
  box-shadow: 0 6px 20px rgba(124,92,255,0.4);
}

.field-counter {
  font-size: 11px;
  color: var(--text-faint);
}
.field-help {
  font-size: 11px;
  color: var(--text-faint);
  margin-top: 6px;
  line-height: 1.5;
}
.input-bare {
  width: 100%;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 13px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: all 0.18s;
}
.input-bare:focus {
  border-color: rgba(124,92,255,0.5);
  background: rgba(124,92,255,0.04);
  box-shadow: 0 0 0 4px rgba(124,92,255,0.08);
}

/* ============================================
   PARK DASHBOARD
   ============================================ */
.dashboard-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(10,11,15,0.85);
  backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 30;
}
.dashboard-left { display: flex; align-items: center; gap: 16px; }
.back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 12px;
  transition: all 0.15s;
}
.back-btn:hover {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--border-strong);
}
.back-btn i { font-size: 14px; }

.park-id { display: flex; flex-direction: column; }
.park-id-name {
  font-family: 'Instrument Serif', serif;
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1;
}
.park-id-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dashboard-mid {
  display: flex;
  align-items: center;
  gap: 22px;
}
.metric-pill {
  display: flex;
  flex-direction: column;
  gap: 1px;
  align-items: flex-start;
}
.metric-pill-label {
  font-size: 10px;
  color: var(--text-faint);
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 4px;
}
.metric-pill-label i { font-size: 11px; }
.metric-pill-val {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 4px;
}
.metric-divider {
  width: 1px;
  height: 26px;
  background: var(--border);
}

.dashboard-right { display: flex; align-items: center; gap: 8px; }

.next-day-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px 9px 16px;
  background: linear-gradient(135deg, var(--accent) 0%, #6B4DE8 100%);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: white;
  transition: all 0.18s;
  box-shadow: 0 4px 16px rgba(124,92,255,0.3), inset 0 1px 0 rgba(255,255,255,0.15);
}
.next-day-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #8B6DFF 0%, #7C5CFF 100%);
  box-shadow: 0 6px 20px rgba(124,92,255,0.4);
}
.next-day-btn:active:not(:disabled) { transform: scale(0.98); }
.next-day-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.next-day-btn i { font-size: 16px; }
.quota-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 7px;
  background: rgba(0,0,0,0.25);
  border-radius: 5px;
  margin-left: 4px;
}

.layout {
  display: grid;
  grid-template-columns: 220px 1fr 280px;
  gap: 16px;
  padding: 16px 24px 32px;
  max-width: 1400px;
  margin: 0 auto;
}

.sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 8px;
  height: fit-content;
  position: sticky;
  top: 84px;
}
.sb-section { padding: 10px 4px 4px; }
.sb-section-title {
  font-size: 10px;
  color: var(--text-faint);
  letter-spacing: 0.06em;
  padding: 0 8px 6px;
}
.sb-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-muted);
  transition: all 0.15s;
  position: relative;
  cursor: pointer;
}
.sb-item:hover {
  background: var(--surface-2);
  color: var(--text);
}
.sb-item.active {
  background: rgba(124,92,255,0.1);
  color: var(--text);
}
.sb-item.active::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 8px; bottom: 8px;
  width: 2px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
}
.sb-item i { font-size: 16px; flex-shrink: 0; }
.sb-item .badge {
  margin-left: auto;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--surface-3);
  color: var(--text-muted);
}

.main-col { min-width: 0; display: flex; flex-direction: column; gap: 16px; }

.terrain-head {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.terrain-info { flex: 1; }
.terrain-label {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.terrain-vals {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 8px;
}
.terrain-used {
  font-size: 18px;
  font-weight: 500;
}
.terrain-total {
  font-size: 13px;
  color: var(--text-muted);
}
.terrain-bar {
  position: relative;
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
}
.terrain-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
}
.terrain-extend {
  padding: 8px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.terrain-extend:hover {
  background: var(--surface-3);
  border-color: var(--accent);
}
.terrain-extend i { font-size: 14px; }

.map-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.map-canvas {
  position: relative;
  width: 100%;
  height: 380px;
  background: radial-gradient(ellipse 600px 400px at 50% 50%, #182030 0%, #0d141f 100%);
  overflow: hidden;
}

.right-col { display: flex; flex-direction: column; gap: 16px; }
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.panel-head {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.panel-title {
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}
.panel-title i { font-size: 15px; color: var(--text-muted); }
.panel-body { padding: 12px 14px; }

.alert-item {
  display: flex;
  gap: 10px;
  margin: 0 -14px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.alert-item:last-child { border-bottom: none; }
.alert-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.alert-icon i { font-size: 14px; }
.alert-icon.danger  { background: rgba(255,92,92,0.12);  color: var(--danger); }
.alert-icon.warning { background: rgba(255,169,77,0.12); color: var(--warning); }
.alert-icon.info    { background: rgba(56,189,248,0.12); color: var(--info); }
.alert-content { flex: 1; min-width: 0; }
.alert-title {
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 1px;
}
.alert-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

.season-card { padding: 14px; }
.season-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.season-now {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
}
.season-icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: rgba(255,169,77,0.12);
  border: 1px solid rgba(255,169,77,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--warning);
}
.season-icon i { font-size: 16px; }
.season-day { font-size: 11px; color: var(--text-muted); }
.season-progress {
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
}
.season-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--warning), var(--accent-2));
  border-radius: 2px;
}
.season-effect {
  margin-top: 12px;
  padding: 8px 10px;
  background: rgba(255,169,77,0.08);
  border: 1px solid rgba(255,169,77,0.2);
  border-radius: 7px;
  font-size: 11px;
  color: var(--warning);
  display: flex;
  align-items: center;
  gap: 6px;
}
.season-effect i { font-size: 13px; }

.empty-panel {
  padding: 24px 14px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
}

/* Day modal summary */
.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.summary-row:last-child { border-bottom: none; }
.summary-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}
.summary-label i { font-size: 15px; }
.summary-val { font-size: 14px; font-weight: 500; }
.summary-val.up   { color: var(--success); }
.summary-val.down { color: var(--danger); }
