/* ─── TOKENS ─────────────────────────────────────────── */
:root {
  --bg: #0e0e0e;
  --bg2: #161616;
  --bg3: #1f1f1f;
  --border: #2a2a2a;
  --text: #e8e8e8;
  --text-dim: #888;
  --accent: #e8a020;
  --accent-dim: rgba(232,160,32,0.15);
  --green: #3ecf8e;
  --green-dim: rgba(62,207,142,0.15);
  --red: #e5534b;
  --red-dim: rgba(229,83,75,0.15);
  --radius: 8px;
  --font-head: 'Barlow Condensed', sans-serif;
  --font-body: 'Barlow', sans-serif;
}

/* ─── RESET ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  min-height: 100vh;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }

/* ─── SHELL ──────────────────────────────────────────── */
.shell {
  max-width: 540px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── HEADER ─────────────────────────────────────────── */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0;
}
.brand-logo {
  height: 38px;
  width: auto;
  display: block;
}
.back-btn {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-dim);
  padding: 6px 0;
  min-width: 60px;
  transition: color 0.15s;
}
.back-btn:hover { color: var(--text); }

/* ─── HOME ───────────────────────────────────────────── */
.home-main {
  flex: 1;
  padding: 32px 20px 48px;
}
.home-hero {
  margin-bottom: 36px;
}
.hero-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(52px, 14vw, 80px);
  line-height: 0.95;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.accent { color: var(--accent); }
.hero-sub {
  margin-top: 12px;
  color: var(--text-dim);
  font-size: 15px;
}

/* ─── HOME NAV CARDS ─────────────────────────────────── */
.home-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.nav-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 18px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.nav-card:hover, .nav-card:active {
  border-color: var(--accent);
  background: var(--bg3);
}
.nav-card-icon {
  font-size: 28px;
  flex-shrink: 0;
  width: 44px;
  text-align: center;
}
.nav-card-body { flex: 1; }
.nav-card-body h2 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.03em;
}
.nav-card-body p {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 2px;
}
.nav-card-arrow {
  font-size: 18px;
  color: var(--accent);
  flex-shrink: 0;
}

/* ─── GENERIC PAGE ───────────────────────────────────── */
.page-main {
  flex: 1;
  padding: 28px 20px 48px;
}
.page-header { margin-bottom: 28px; }
.page-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(40px, 11vw, 64px);
  line-height: 0.95;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.page-sub {
  margin-top: 10px;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.5;
}

/* ─── PDF LIST ───────────────────────────────────────── */
.pdf-list { display: flex; flex-direction: column; gap: 10px; }
.pdf-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 16px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s;
}
.pdf-card:hover { border-color: var(--accent); }
.pdf-icon {
  background: var(--accent);
  color: #000;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.05em;
  padding: 4px 7px;
  border-radius: 4px;
  flex-shrink: 0;
}
.pdf-info { flex: 1; min-width: 0; }
.pdf-title {
  display: block;
  font-weight: 500;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pdf-date {
  display: block;
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 2px;
}
.pdf-open { font-size: 13px; color: var(--accent); flex-shrink: 0; }

/* ─── FORMS ──────────────────────────────────────────── */
.crew-form { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.req { color: var(--accent); }
.field input, .field select {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  padding: 13px 14px;
  width: 100%;
  transition: border-color 0.15s;
  -webkit-appearance: none;
}
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--accent);
}
.field input::placeholder { color: var(--text-dim); }
.field-hint { font-size: 12px; color: var(--text-dim); }
.select-wrap { position: relative; }
.select-wrap::after {
  content: '▾';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}

/* ─── BUTTONS ────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 13px 20px;
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.05em;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text);
  transition: background 0.15s, border-color 0.15s;
  text-transform: uppercase;
}
.btn:hover { background: var(--bg3); border-color: #444; }
.btn-full { width: 100%; }
.btn-primary {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}
.btn-primary:hover { background: #c98a18; border-color: #c98a18; }
.btn-ghost { background: transparent; }
.btn-checkin {
  flex: 1;
  background: var(--green-dim);
  border-color: var(--green);
  color: var(--green);
  font-size: 18px;
  padding: 18px;
}
.btn-checkin:hover { background: rgba(62,207,142,0.25); }
.btn-checkout {
  flex: 1;
  background: var(--red-dim);
  border-color: var(--red);
  color: var(--red);
  font-size: 18px;
  padding: 18px;
}
.btn-checkout:hover { background: rgba(229,83,75,0.25); }
.btn-icon { font-size: 20px; }
.action-row { display: flex; gap: 12px; margin-top: 8px; }

/* ─── ERROR / SUCCESS ────────────────────────────────── */
.error-banner {
  background: var(--red-dim);
  border: 1px solid var(--red);
  border-radius: var(--radius);
  color: var(--red);
  padding: 12px 14px;
  font-size: 14px;
  margin-bottom: 16px;
}
.success-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.success-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--green-dim);
  border: 2px solid var(--green);
  color: var(--green);
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.success-icon.checked-out {
  background: var(--red-dim);
  border-color: var(--red);
  color: var(--red);
}
.success-box h2 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 24px;
}
.checkin-status { font-size: 15px; }
.checkin-time {
  font-family: var(--font-head);
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
}
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-dim);
}
.empty-icon { font-size: 40px; margin-bottom: 12px; }
.empty-state a { color: var(--accent); text-decoration: underline; }

/* ─── LOCKED / ACCESS GATE ───────────────────────────── */
.lock-box {
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 0 8px;
  text-align: center;
}
.lock-icon {
  font-size: 48px;
  line-height: 1;
}
.lock-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 26px;
  letter-spacing: 0.02em;
}
.lock-sub {
  font-size: 14px;
  color: var(--text-dim);
  margin-top: -4px;
  line-height: 1.5;
}
