:root {
  --bg: #f8fafc;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #1e40af;
  --brand-2: #22c55e;
  --danger: #dc2626;
  --warning: #d97706;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: radial-gradient(circle at top left, #dbeafe, transparent 30rem), var(--bg); }
.app-shell { max-width: 1240px; margin: 0 auto; padding: 24px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; }
.brand { display: flex; align-items: center; gap: 14px; }
.logo-mark { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(135deg, var(--brand), #0f172a); color: white; font-weight: 800; letter-spacing: -0.06em; box-shadow: var(--shadow); }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(1.5rem, 3vw, 2.1rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin-bottom: 10px; }
h3 { margin-bottom: 12px; }
.eyebrow { color: var(--brand); font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.09em; margin-bottom: 4px; }
.muted { color: var(--muted); }
.small-text { font-size: 0.88rem; }
.hidden { display: none !important; }
.auth-card, .hero-card, .panel { background: rgba(255,255,255,0.9); border: 1px solid var(--line); border-radius: 24px; padding: 24px; box-shadow: var(--shadow); backdrop-filter: blur(14px); }
.auth-card { display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; align-items: center; min-height: 360px; }
.form-grid { display: grid; gap: 14px; }
.form-grid.single { grid-template-columns: 1fr; }
label { display: grid; gap: 7px; font-size: 0.92rem; font-weight: 700; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 14px; padding: 12px 13px; font: inherit; background: #fff; color: var(--ink); outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(30, 64, 175, 0.12); }
.btn { border: 0; border-radius: 14px; padding: 12px 16px; font-weight: 800; cursor: pointer; transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: linear-gradient(135deg, var(--brand), #0f172a); color: white; }
.btn.ghost { background: #e2e8f0; color: #0f172a; }
.btn.link { background: transparent; color: var(--brand); padding: 8px; }
.btn.small { padding: 8px 11px; font-size: 0.85rem; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.user-badge, .pill { border: 1px solid var(--line); background: #fff; color: var(--muted); border-radius: 999px; padding: 8px 12px; font-size: 0.86rem; font-weight: 800; }
.pill.success { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.pill.warn { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.hero-card { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 18px; }
.selector-wrap { min-width: 280px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 18px; box-shadow: var(--shadow); }
.stat strong { display: block; font-size: 1.9rem; margin-bottom: 4px; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0; }
.tab { border: 1px solid var(--line); background: white; border-radius: 999px; padding: 10px 14px; font-weight: 800; cursor: pointer; color: var(--muted); }
.tab.active { background: var(--brand); color: white; border-color: var(--brand); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.grid.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.list { display: grid; gap: 12px; }
.item { border: 1px solid var(--line); border-radius: 18px; padding: 14px; background: #fff; }
.item h4 { margin: 0 0 7px; font-size: 1rem; }
.item-meta { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 0.87rem; }
.item-meta span { background: #f1f5f9; border-radius: 999px; padding: 5px 8px; }
.photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.photo-grid img { width: 100%; height: 190px; object-fit: cover; border-radius: 16px; border: 1px solid var(--line); }
.empty { color: var(--muted); background: #f8fafc; border: 1px dashed #cbd5e1; padding: 18px; border-radius: 18px; }
.toast { position: fixed; right: 24px; bottom: 24px; max-width: 420px; padding: 14px 16px; border-radius: 16px; background: #0f172a; color: white; box-shadow: var(--shadow); z-index: 1000; }
.toast.error { background: var(--danger); }
.toast.success { background: #166534; }
@media (max-width: 900px) {
  .auth-card, .hero-card, .grid.two, .stats-grid { grid-template-columns: 1fr; }
  .hero-card { align-items: stretch; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .top-actions { width: 100%; justify-content: space-between; }
  .photo-grid { grid-template-columns: 1fr; }
  .app-shell { padding: 16px; }
}
