:root {
  --bg: radial-gradient(circle at top, rgba(113, 166, 255, 0.18), transparent 28%), linear-gradient(180deg, #0b1020 0%, #0d1324 35%, #0a0e18 100%);
  --panel: rgba(255,255,255,0.10);
  --text: #eef4ff;
  --muted: #adc0dd;
  --accent: #7dc4ff;
  --accent-2: #8de3aa;
  --border: rgba(255,255,255,0.16);
  --shadow: 0 12px 40px rgba(0,0,0,0.35);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; font-family: Inter, ui-sans-serif, system-ui, sans-serif; color: var(--text); background: var(--bg); background-attachment: fixed; }
body::before { content: ''; position: fixed; inset: 0; pointer-events: none; background: linear-gradient(135deg, rgba(255,255,255,0.18), transparent 18%, transparent 82%, rgba(255,255,255,0.08)); opacity: 0.35; }
.hidden { display: none !important; }
.glass { background: linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0.08)); border: 1px solid var(--border); backdrop-filter: blur(26px) saturate(180%); -webkit-backdrop-filter: blur(26px) saturate(180%); box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.18); }
.login-gate { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; position: relative; z-index: 1; }
.login-card { width: 100%; max-width: 420px; padding: 28px; border-radius: 28px; text-align: center; }
.login-mark { width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 22px; display: flex; align-items: center; justify-content: center; background: linear-gradient(180deg, rgba(125,196,255,0.30), rgba(141,227,170,0.16)); font-weight: 700; letter-spacing: 0.04em; }
.login-copy, .login-error { color: var(--muted); }
.login-btn { width: 100%; }
.app-shell { max-width: 1500px; margin: 0 auto; padding: 24px; position: relative; z-index: 1; }
.topbar { display: flex; justify-content: space-between; gap: 16px; align-items: end; flex-wrap: wrap; margin-bottom: 24px; }
.topbar h1 { margin: 0 0 6px; font-size: clamp(2rem, 4vw, 3.2rem); letter-spacing: -0.03em; }
.topbar-actions { display: flex; gap: 10px; flex-wrap: wrap; }
input, select, button, textarea { width: 100%; background: rgba(12,18,34,0.55); color: var(--text); border: 1px solid var(--border); border-radius: 14px; padding: 11px 14px; outline: none; backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%); box-shadow: inset 0 1px 0 rgba(255,255,255,0.08); }
.topbar-actions input, .topbar-actions select { width: auto; min-width: 180px; }
button { cursor: pointer; }
.page { display: none; }
.page.active { display: block; }
.primary-btn, .secondary-btn, .back-btn { width: auto; background: linear-gradient(180deg, rgba(125,196,255,0.28), rgba(125,196,255,0.12)); }
.secondary-btn { background: linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0.08)); }
.stack { display: grid; gap: 10px; }
label { display: grid; gap: 6px; font-size: 0.95rem; color: var(--muted); }
.checkbox-row { display: flex; align-items: center; gap: 10px; }
.checkbox-row input { width: auto; }
textarea { min-height: 96px; resize: vertical; }
.tract-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.tract-card, .detail-card { border-radius: 24px; padding: 16px; }
.tract-card:hover { transform: translateY(-2px); border-color: rgba(125,196,255,0.45); cursor: pointer; }
.tract-photo { width: 100%; aspect-ratio: 16/10; border-radius: 20px; overflow: hidden; margin-bottom: 14px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); display: flex; align-items: center; justify-content: center; }
.tract-photo img, .gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.photo-fallback { width: 100%; height: 100%; min-height: 180px; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at top, rgba(125,196,255,0.35), rgba(255,255,255,0.04)); color: rgba(255,255,255,0.9); font-weight: 700; }
.tract-name { margin: 0 0 8px; font-size: 1.2rem; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.badge { display: inline-block; padding: 5px 10px; border-radius: 999px; font-size: 0.82rem; background: rgba(255,255,255,0.08); color: var(--text); border: 1px solid rgba(255,255,255,0.14); }
.badge.good { color: var(--accent-2); border-color: rgba(141,227,170,0.45); }
.note-snippet, .empty { color: var(--muted); }
.back-btn { margin-bottom: 12px; }
.tract-hero { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 20px; padding: 20px; border-radius: 30px; margin-bottom: 18px; }
.tract-hero-photo { border-radius: 24px; overflow: hidden; min-height: 230px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12); }
.tract-hero-copy { display: grid; gap: 14px; align-content: center; }
.tract-hero-copy h2 { margin: 0; font-size: 2rem; }
.hero-headline { margin: 0; color: var(--muted); line-height: 1.55; }
.quick-read-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.quick-read-item { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); }
.quick-read-item span { color: var(--muted); }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.8fr); gap: 18px; align-items: start; }
.detail-main-column, .detail-side-column, .ops-grid { display: grid; gap: 16px; }
.ops-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.detail-card h3 { margin-top: 0; margin-bottom: 12px; }
.detail-card p, .detail-card li { color: var(--muted); line-height: 1.45; }
.detail-card ul { margin: 0; padding-left: 18px; }
.form-grid { display: grid; gap: 12px; }
.form-grid.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.inline-readout { padding: 11px 14px; border-radius: 14px; border: 1px solid var(--border); background: rgba(12,18,34,0.35); color: var(--text); }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.gallery-item { margin: 0; border-radius: 18px; overflow: hidden; min-height: 120px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12); }
.gallery-item.main { grid-column: 1 / -1; min-height: 220px; }
@media (max-width: 980px) { .tract-hero, .detail-layout { grid-template-columns: 1fr; } .ops-grid, .form-grid.two-col { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .app-shell { padding: 14px; } .topbar-actions { width: 100%; } .topbar-actions input, .topbar-actions select { width: 100%; } .tract-grid { grid-template-columns: 1fr; } }
