/* base.css
   Reset, variables, typography, shared layout.
   Imported by every page. */

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

/* ── Variables ──────────────────────────────────────────────────────────────── */
:root {
  --accent:       #0097a7;
  --accent-dark:  #00838f;
  --accent-light: rgba(0, 151, 167, 0.1);

  --bg:           #f8f8f9;
  --surface:      #ffffff;
  --border:       #e0e0e0;
  --border-light: #f0f0f0;

  --text:         #1a1a1a;
  --text-muted:   #666666;
  --text-faint:   #aaaaaa;
  --text-ghost:   #cccccc;

  --red:          #c62828;
  --red-bg:       #fdecea;
  --blue:         #1565c0;
  --blue-bg:      #e3f2fd;
  --green:        #2e7d32;

  --radius:       6px;
  --radius-lg:    10px;
  --shadow:       0 1px 3px rgba(0,0,0,0.05);
  --shadow-nav:   0 1px 4px rgba(0,0,0,0.06);

  --nav-height:   52px;
  --max-width:    900px;
}

/* ── Dark mode ──────────────────────────────────────────────────────────────── */
body.dark {
  --bg:           #0f0f0f;
  --surface:      #1a1a1a;
  --border:       #2a2a2a;
  --border-light: #222222;

  --text:         #e0e0e0;
  --text-muted:   #888888;
  --text-faint:   #555555;
  --text-ghost:   #333333;

  --red-bg:       #2a1010;
  --blue-bg:      #0d1f35;

  --shadow:       0 1px 3px rgba(0,0,0,0.3);
  --shadow-nav:   0 1px 4px rgba(0,0,0,0.4);
}

/* ── Body ───────────────────────────────────────────────────────────────────── */
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Nav ────────────────────────────────────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 16px;
  z-index: 100;
  box-shadow: var(--shadow-nav);
}

nav .logo {
  color: var(--accent);
  font-size: 15px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 700;
  margin-right: auto;
  text-decoration: none;
}

nav .nav-btn {
  background: none; border: none; color: var(--text-faint);
  font-family: inherit; font-size: 12px; cursor: pointer;
  padding: 6px 10px; border-bottom: 2px solid transparent; font-weight: 600;
  text-decoration: none; display: inline-flex; align-items: center;
}

nav .nav-btn.active { color: var(--accent); border-bottom: 2px solid var(--accent); }
nav .nav-btn:hover  { color: var(--accent); }
nav .nav-btn.danger { color: var(--red); }

/* ── Page wrapper ───────────────────────────────────────────────────────────── */
.page-wrap {
  padding: calc(var(--nav-height) + 16px) 16px 40px;
  max-width: var(--max-width);
  margin: 0 auto;
}

/* ── Status ─────────────────────────────────────────────────────────────────── */
#status { font-size: 11px; color: var(--text-muted); padding-left: 8px; white-space: nowrap; }
#status.ok  { color: var(--green); }
#status.err { color: var(--red); }

/* ── Divider ────────────────────────────────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--border-light); margin: 10px 0; }

/* ── Empty state ────────────────────────────────────────────────────────────── */
.empty {
  color: var(--text-ghost); padding: 60px 0;
  text-align: center; font-size: 14px;
}

/* ── Lightbox ───────────────────────────────────────────────────────────────── */
.lightbox {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.92); z-index: 999;
  align-items: center; justify-content: center;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: 92vw; max-height: 88vh;
  object-fit: contain; border-radius: var(--radius);
}

.lightbox-close {
  position: absolute; top: 16px; right: 20px;
  color: white; font-size: 28px; cursor: pointer;
  background: none; border: none; line-height: 1;
}

/* ── Badges ─────────────────────────────────────────────────────────────────── */
.badge {
  font-size: 10px; padding: 2px 7px;
  border-radius: 4px; text-transform: uppercase; font-weight: 700;
}

.badge-fragile { background: var(--red-bg);  color: var(--red); }
.badge-mixed   { background: var(--blue-bg); color: var(--blue); }

/* ── Utility ────────────────────────────────────────────────────────────────── */
.mb { margin-bottom: 14px; }
.mt { margin-top: 16px; }

.section-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text-faint); font-weight: 700; margin-bottom: 8px; margin-top: 16px;
}