/* ============================================================
   SANTA ANA CATFISH INTEL — Premium Mobile-First Dashboard
   ============================================================ */

:root {
  --bg-primary: #060d1a;
  --bg-secondary: #0a1628;
  --bg-card: #0f1d35;
  --bg-card-hover: #142240;
  --surface-1: #162744;
  --surface-2: #1c3054;
  --border: #1e3a5f;
  --border-light: #2a4a6e;

  --text-primary: #e8edf5;
  --text-secondary: #8ba4c7;
  --text-muted: #5b7a9e;
  --text-accent: #60a5fa;

  --accent: #3b82f6;
  --accent-glow: rgba(59, 130, 246, 0.3);
  --gold: #f59e0b;
  --gold-glow: rgba(245, 158, 11, 0.25);
  --success: #22c55e;
  --success-glow: rgba(34, 197, 94, 0.3);
  --warning: #eab308;
  --danger: #ef4444;

  --lake-fill: #0d2137;
  --lake-stroke: #1e4d7a;
  --lake-deep: #061428;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --shadow-card: 0 4px 24px rgba(0,0,0,0.4);
  --nav-height: 72px;
  --header-height: 64px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', monospace;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* --- App Container --- */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

/* --- Header --- */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  height: var(--header-height);
}
.header-left { display: flex; align-items: center; gap: 10px; }
.logo-icon { font-size: 26px; line-height: 1; }
.header-title h1 { font-size: 14px; font-weight: 800; letter-spacing: -0.3px; line-height: 1.2; }
.header-sub { font-size: 10px; color: var(--text-muted); font-weight: 500; }
.header-right { display: flex; gap: 4px; }
.btn-icon {
  background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius);
  width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); cursor: pointer; transition: all 0.2s;
}
.btn-icon:hover, .btn-icon:active { background: var(--surface-2); color: var(--text-primary); }
.btn-icon svg { transition: transform 0.4s ease; }

/* --- Main Content --- */
.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  padding-bottom: calc(var(--nav-height) + 40px + var(--safe-bottom));
}

/* --- Tab Panels --- */
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeSlideIn 0.25s ease; }
@keyframes fadeSlideIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* --- Bottom Nav --- */
.bottom-nav {
  display: flex;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  position: fixed;
  bottom: 0; left: 0; right: 0;
  max-width: 600px;
  margin: 0 auto;
  height: var(--nav-height);
  padding-bottom: var(--safe-bottom);
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.nav-btn {
  flex: 1; min-width: 56px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  background: none; border: none; color: var(--text-muted); cursor: pointer;
  transition: all 0.2s; padding: 6px 4px; position: relative;
  white-space: nowrap;
}
.nav-btn.active { color: var(--accent); }
.nav-btn.active::before {
  content: ''; position: absolute; top: 0; left: 25%; right: 25%;
  height: 2px; background: var(--accent); border-radius: 0 0 2px 2px;
}
.nav-icon { font-size: 18px; line-height: 1; }
.nav-label { font-size: 10px; font-weight: 600; }

/* --- Section Titles --- */
.section-title { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.section-sub { font-size: 12px; color: var(--text-muted); margin-bottom: 16px; }

/* ============================================================
   TAB 1: TODAY'S BITE
   ============================================================ */
.today-layout { display: flex; flex-direction: column; gap: 14px; }

/* Hero Card — Map + Barometer side by side */
.hero-card {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  min-height: 280px;
}
.hero-map-side {
  flex: 3;
  position: relative;
  overflow: hidden;
  background: #0a1a0a;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-map-wrap {
  position: relative;
  display: inline-block;
  width: 100%;
}
.hero-map-img {
  width: 100%;
  display: block;
}
.hero-map-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero-map-overlay .spot-dot {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1.5px solid #fff;
  box-shadow: 0 0 6px rgba(0,0,0,0.6);
}
.hero-map-overlay .spot-dot.pulse {
  animation: heroPulse 2s ease-in-out infinite;
}
@keyframes heroPulse {
  0%, 100% { box-shadow: 0 0 4px currentColor; }
  50% { box-shadow: 0 0 14px currentColor, 0 0 24px currentColor; }
}
.hero-map-overlay .spot-score {
  position: absolute;
  transform: translate(-50%, 50%);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.9);
  white-space: nowrap;
  pointer-events: none;
  margin-top: 4px;
  background: rgba(0,0,0,0.5);
  border-radius: 6px;
  padding: 1px 4px;
}
.hero-score-side {
  flex: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 10px;
  text-align: center;
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
}

.score-gauge-container { position: relative; width: 160px; height: 160px; margin: 0 auto 8px; }
.score-gauge { width: 100%; height: 100%; }
.gauge-score { font-family: var(--font-mono); font-size: 40px; font-weight: 700; fill: var(--text-primary); letter-spacing: -2px; }
.gauge-label { font-size: 10px; fill: var(--text-muted); font-weight: 500; letter-spacing: 0.5px; }
.score-message { font-size: 13px; font-weight: 600; line-height: 1.4; margin-bottom: 2px; min-height: 36px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.score-confidence { font-size: 10px; color: var(--text-muted); font-weight: 500; }

.quick-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stat-item {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 6px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.stat-icon { font-size: 18px; }
.stat-label { font-size: 9px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.stat-value { font-size: 12px; font-weight: 700; font-family: var(--font-mono); }

.rec-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 18px; box-shadow: var(--shadow-card);
}
.rec-title { font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.rec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rec-item { display: flex; flex-direction: column; gap: 2px; }
.rec-key { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.rec-val { font-size: 13px; font-weight: 600; }

/* --- Rig image in recommendation card --- */
.rec-rig-img-wrapper {
  margin-top: 10px; position: relative; cursor: pointer;
  background: #fff; border-radius: 8px; overflow: hidden; border: 1px solid var(--border-light);
}
.rec-rig-img { width: 100%; display: block; }
.rec-rig-img-hint {
  position: absolute; bottom: 6px; right: 6px;
  background: rgba(0,0,0,0.65); color: #fff; font-size: 9px;
  padding: 1px 6px; border-radius: 10px; pointer-events: none;
}

/* --- Ranked Spot List (Today tab, below hero) --- */
.spot-rank-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 16px; box-shadow: var(--shadow-card);
}
.spot-rank-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.spot-rank-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius);
  background: var(--surface-1); cursor: pointer; transition: background 0.15s;
}
.spot-rank-row:hover, .spot-rank-row:active { background: var(--surface-2); }
.spot-rank-num {
  font-family: var(--font-mono); font-size: 16px; font-weight: 800;
  color: var(--text-muted); min-width: 22px;
}
.spot-rank-num.top1 { color: var(--success); }
.spot-rank-num.top3 { color: var(--accent); }
.spot-rank-name { flex: 1; font-size: 13px; font-weight: 600; }
.spot-rank-conditions { font-size: 10px; color: var(--text-muted); }
.spot-rank-score {
  font-family: var(--font-mono); font-size: 16px; font-weight: 700;
  padding: 3px 8px; border-radius: 8px; min-width: 38px; text-align: center;
}

/* ============================================================
   TAB 2: LAKE MAP
   ============================================================ */
.map-container {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 14px; box-shadow: var(--shadow-card); margin-bottom: 14px;
}
.map-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.map-toolbar h3 { font-size: 14px; font-weight: 700; }
.map-legend-hint { font-size: 10px; color: var(--text-muted); }
.lake-map-wrapper {
  position: relative;
  background: #0a1a0a; border-radius: var(--radius); border: 1px solid var(--border-light);
  overflow: hidden;
}
.lake-map-img { width: 100%; display: block; }
.lake-map-markers {
  position: absolute; inset: 0; pointer-events: none;
}
.lake-map-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: all;
  cursor: pointer;
}
.lake-map-marker .dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 6px rgba(0,0,0,0.6);
  transition: transform 0.2s;
}
.lake-map-marker:hover .dot { transform: scale(1.3); }
.lake-map-marker .pulse-ring {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid;
  opacity: 0.4;
  animation: mapPulse 2s ease-out infinite;
}
@keyframes mapPulse {
  0% { width: 12px; height: 12px; opacity: 0.6; }
  100% { width: 30px; height: 30px; opacity: 0; }
}
.lake-map-label {
  position: absolute;
  transform: translate(-50%, -130%);
  font-family: var(--font-main);
  font-size: 8px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.9);
  white-space: nowrap;
  pointer-events: none;
}
/* Score badge on map */
.lake-map-score {
  position: absolute;
  transform: translate(-50%, 50%);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.9);
  white-space: nowrap;
  pointer-events: none;
  background: rgba(0,0,0,0.55);
  border-radius: 8px;
  padding: 1px 5px;
  margin-top: 6px;
}

.spot-detail-card {
  position: fixed; bottom: calc(var(--nav-height) + 12px + var(--safe-bottom));
  left: 12px; right: 12px; max-width: 576px; margin: 0 auto;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 18px; z-index: 90; box-shadow: 0 -8px 40px rgba(0,0,0,0.6);
  animation: slideUp 0.3s ease;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.spot-detail-close {
  position: absolute; top: 10px; right: 10px;
  background: var(--surface-1); border: none; color: var(--text-secondary);
  width: 30px; height: 30px; border-radius: 50%; font-size: 18px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.spot-detail-name { font-size: 16px; font-weight: 800; margin-bottom: 4px; }
.spot-detail-rating { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 4px 8px; border-radius: 16px; margin-bottom: 10px; }
.spot-detail-note { font-size: 12px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 12px; }
.spot-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.spot-detail-item { font-size: 11px; }
.spot-detail-item .key { color: var(--text-muted); text-transform: uppercase; font-size: 9px; font-weight: 600; }
.spot-detail-item .val { color: var(--text-primary); font-weight: 600; font-size: 12px; }

/* ============================================================
   TAB 3: RIGS LIBRARY
   ============================================================ */
.rigs-list { display: flex; flex-direction: column; gap: 12px; }
.rig-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-card);
}
.rig-card-header {
  display: flex; align-items: center; gap: 12px; padding: 14px;
  cursor: pointer; user-select: none;
}
.rig-card-priority {
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  color: var(--gold); background: rgba(245,158,11,0.1);
  padding: 2px 8px; border-radius: 10px; white-space: nowrap;
}
.rig-card-emoji { font-size: 22px; }
.rig-card-name { font-size: 15px; font-weight: 700; flex: 1; }
.rig-card-chevron { color: var(--text-muted); transition: transform 0.3s; font-size: 14px; }
.rig-card.open .rig-card-chevron { transform: rotate(180deg); }
.rig-card-body {
  display: none; padding: 0 14px 14px;
  border-top: 1px solid var(--border); padding-top: 12px;
}
.rig-card.open .rig-card-body { display: block; animation: fadeSlideIn 0.25s ease; }
.rig-card-image {
  width: 100%; display: block;
}
.rig-diagram-wrapper { position: relative; cursor: pointer; background: #fff; border-bottom: 1px solid var(--border); }
.rig-diagram-wrapper:hover .rig-diagram-hint { opacity: 1; }
.rig-diagram-hint {
  position: absolute; bottom: 8px; right: 8px;
  background: rgba(0,0,0,0.7); color: #fff; font-size: 10px;
  padding: 2px 8px; border-radius: 12px;
  opacity: 0; transition: opacity 0.2s;
}
/* Diagram expand overlay */
.diagram-expand-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.9);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; animation: overlayIn 0.2s ease;
}
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }
.diagram-expand-card {
  background: #fff; border-radius: 12px;
  max-width: 500px; width: 100%; max-height: 90vh;
  overflow-y: auto; position: relative;
}
.diagram-expand-close {
  position: sticky; top: 8px; float: right; z-index: 1;
  background: rgba(0,0,0,0.6); color: #fff; border: none;
  width: 32px; height: 32px; border-radius: 50%;
  font-size: 20px; line-height: 1; cursor: pointer;
  margin: 8px;
}
.diagram-expand-title {
  padding: 16px 16px 0; font-size: 16px; font-weight: 700; color: #1a1a2e;
}
.diagram-expand-img { width: 100%; display: block; padding: 16px; }
.rig-card-detail { display: flex; flex-direction: column; gap: 10px; }
.rig-card-section h4 { font-size: 12px; font-weight: 700; color: var(--text-accent); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.rig-card-section p, .rig-card-section li { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }
.rig-card-section ul { list-style: none; padding: 0; }
.rig-card-section li::before { content: '• '; color: var(--accent); }
.rig-card-section li.bad::before { content: '✗ '; color: var(--danger); }
.rig-setup-box {
  background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 12px; font-family: var(--font-mono); font-size: 11px;
  color: var(--text-accent); line-height: 1.6;
}

/* ============================================================
   TAB 4: KNOTS LIBRARY
   ============================================================ */
.knots-list { display: flex; flex-direction: column; gap: 12px; }
.knot-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-card);
}
.knot-card-header {
  display: flex; align-items: center; gap: 10px; padding: 14px;
  cursor: pointer; user-select: none;
}
.knot-card-meta { display: flex; flex-direction: column; gap: 2px; }
.knot-card-name { font-size: 14px; font-weight: 700; }
.knot-card-stats { font-size: 10px; color: var(--text-muted); font-family: var(--font-mono); }
.knot-strength-bar {
  height: 4px; background: var(--surface-2); border-radius: 2px; width: 60px; margin-top: 2px;
}
.knot-strength-fill { height: 100%; border-radius: 2px; }
.knot-card-chevron { color: var(--text-muted); transition: transform 0.3s; margin-left: auto; font-size: 14px; }
.knot-card.open .knot-card-chevron { transform: rotate(180deg); }
.knot-card-body {
  display: none; padding: 0 14px 14px;
  border-top: 1px solid var(--border); padding-top: 12px;
}
.knot-card.open .knot-card-body { display: block; animation: fadeSlideIn 0.25s ease; }
.knot-card-image {
  width: 100%; max-width: 300px; margin: 0 auto 10px; display: block;
  background: var(--bg-primary); border-radius: var(--radius); padding: 4px;
}
.knot-steps { counter-reset: step; list-style: none; padding: 0; }
.knot-steps li {
  counter-increment: step; font-size: 12px; color: var(--text-secondary);
  line-height: 1.5; margin-bottom: 6px; padding-left: 24px; position: relative;
}
.knot-steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 1px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* ============================================================
   TAB 5: CATCH LOG
   ============================================================ */
.log-header-row { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.log-header-row .section-title { margin-bottom: 0; }
.btn-sm {
  padding: 8px 14px; border-radius: var(--radius); font-size: 12px; font-weight: 700;
  border: none; cursor: pointer; font-family: var(--font-main); white-space: nowrap;
}
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover, .btn-accent:active { background: #2563eb; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-outline { background: none; border: 1px solid var(--border); color: var(--text-secondary); }

/* Stats Card */
.stats-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 14px; margin-bottom: 12px;
}
.stats-card h4 { font-size: 12px; color: var(--text-muted); text-transform: uppercase; margin-bottom: 8px; letter-spacing: 0.5px; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stats-item { text-align: center; }
.stats-item .emoji { font-size: 18px; }
.stats-item .label { font-size: 9px; color: var(--text-muted); text-transform: uppercase; font-weight: 600; }
.stats-item .value { font-size: 13px; font-weight: 700; }

/* Filters */
.log-filters { display: flex; gap: 8px; margin-bottom: 12px; overflow-x: auto; }
.log-filters select {
  background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text-primary); padding: 8px 10px; font-size: 11px; font-family: var(--font-main);
  appearance: none; -webkit-appearance: none; min-width: 100px;
}
.log-filters select:last-child { margin-right: 0; }

/* Catch List */
.catch-list { display: flex; flex-direction: column; gap: 8px; }
.catch-entry {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px;
}
.catch-entry-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; }
.catch-entry-date { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); }
.catch-entry-delete {
  background: none; border: none; color: var(--danger); cursor: pointer; font-size: 14px; padding: 2px 6px;
}
.catch-entry-spot { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.catch-entry-details { display: flex; flex-wrap: wrap; gap: 6px; font-size: 11px; color: var(--text-secondary); }
.catch-entry-tag {
  background: var(--surface-1); padding: 2px 8px; border-radius: 10px; font-size: 10px;
  font-weight: 600; white-space: nowrap;
}
.catch-entry-notes { font-size: 11px; color: var(--text-muted); margin-top: 6px; font-style: italic; }

/* Empty State */
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.empty-icon { font-size: 40px; margin-bottom: 10px; }
.empty-state h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; color: var(--text-secondary); }
.empty-state p { font-size: 12px; }

/* Catch Form Modal */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 200; backdrop-filter: blur(4px);
}
.modal-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  width: 100%; max-width: 600px; max-height: 85vh; overflow-y: auto;
  padding: 20px; animation: slideUp 0.3s ease;
}
.modal-card h3 { font-size: 16px; font-weight: 800; margin-bottom: 14px; }
.catch-form { display: flex; flex-direction: column; gap: 12px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-group label { font-size: 11px; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }
.form-group select, .form-group input, .form-group textarea {
  background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text-primary); padding: 10px; font-size: 13px; font-family: var(--font-main);
}
.form-group select { appearance: none; -webkit-appearance: none; }
.form-group textarea { resize: vertical; min-height: 60px; }
.form-actions { display: flex; gap: 8px; margin-top: 4px; }
.form-actions button { flex: 1; padding: 12px; border-radius: var(--radius); font-size: 14px; font-weight: 700; cursor: pointer; font-family: var(--font-main); }

/* ============================================================
   TAB 6: PLAN BUILDER
   ============================================================ */
.plan-form {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 16px; display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px;
}
.plan-form .form-group select {
  background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text-primary); padding: 10px; font-size: 13px; font-family: var(--font-main);
  appearance: none; -webkit-appearance: none;
}
.btn-predict {
  background: var(--accent); color: #fff; border: none; border-radius: var(--radius);
  padding: 14px; font-size: 15px; font-weight: 700; cursor: pointer; transition: all 0.2s;
  font-family: var(--font-main); margin-top: 4px;
}
.btn-predict:hover, .btn-predict:active { background: #2563eb; box-shadow: 0 0 20px var(--accent-glow); }

.plan-result {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 18px; animation: fadeSlideIn 0.3s ease;
}
.plan-result-header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.plan-score-badge {
  font-family: var(--font-mono); font-size: 28px; font-weight: 800;
  padding: 6px 14px; border-radius: var(--radius); min-width: 70px; text-align: center;
}
.plan-confidence { font-size: 12px; font-weight: 600; }
.plan-message { font-size: 13px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 14px; padding: 12px; background: var(--surface-1); border-radius: var(--radius); border-left: 3px solid var(--accent); }
.plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.plan-item { padding: 8px 0; }
.plan-item .key { font-size: 10px; color: var(--text-muted); text-transform: uppercase; font-weight: 600; }
.plan-item .val { font-size: 13px; font-weight: 600; }

/* ============================================================
   Loading Overlay
   ============================================================ */
.loading-overlay {
  position: fixed; inset: 0; background: var(--bg-primary);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  z-index: 200; opacity: 1; transition: opacity 0.4s ease;
}
.loading-overlay.hidden { opacity: 0; pointer-events: none; }
.loading-overlay p { color: var(--text-muted); font-size: 13px; }
.loading-spinner {
  width: 40px; height: 40px; border: 3px solid var(--border);
  border-top-color: var(--accent); border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   Desktop / Tablet
   ============================================================ */
@media (min-width: 768px) {
  .app-container { max-width: 720px; border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
  .today-layout { display: flex; flex-direction: column; gap: 14px; }
  .hero-card { min-height: 340px; }
  .hero-map-side { min-height: 340px; }
  .score-gauge-container { width: 180px; height: 180px; }
  .spot-detail-card { position: fixed; top: 80px; bottom: auto; left: auto; right: 20px; width: 340px; animation: fadeSlideIn 0.3s ease; }
  .plan-form { display: grid; grid-template-columns: 1fr 1fr; }
  .plan-form .btn-predict { grid-column: 1 / -1; }
  .stats-grid { grid-template-columns: repeat(6, 1fr); }
}

@media (min-width: 1024px) {
  .app-container { max-width: 800px; }
}
