/* ═══════════════════════════════════════
   34Vault — shared.css
   Import this on every page:
   <link rel="stylesheet" href="/shared.css" />
═══════════════════════════════════════ */

:root {
  --bg:      #0a0b0e;
  --panel:   #13151c;
  --panel2:  #1a1d27;
  --border:  #252736;
  --text:    #f0f0f0;
  --muted:   #8b8fa8;
  --accent:  #f59e0b;
  --accent2: #d97706;
  --danger:  #e11d48;
  --ok:      #22c55e;
  --topH:    54px;
  --navH:    62px;
  --maxW:    1100px;
  --radius:  12px;
  --shadow:  0 8px 32px rgba(0,0,0,.5);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
}

a { color: inherit; text-decoration: none; }

/* ── TOPBAR ── */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 800;
  height: var(--topH);
  background: rgba(10,11,14,.97);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.topbar-inner {
  height: 100%; max-width: var(--maxW); margin: 0 auto;
  display: flex; align-items: center; gap: 10px; padding: 0 14px;
}
.brand {
  font-size: 20px; font-weight: 900; letter-spacing: -.5px;
  cursor: pointer; user-select: none; flex-shrink: 0;
  white-space: nowrap;
}
.brand em { color: var(--accent); font-style: normal; }

/* ── ICON BUTTON ── */
.ico-btn {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--panel2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; user-select: none; flex-shrink: 0; font-size: 17px;
  transition: border-color .15s;
}
.ico-btn:hover { border-color: var(--accent); }

/* ── BOTTOM NAV (mobile) ── */
.bottomnav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 800;
  height: var(--navH);
  background: rgba(10,11,14,.97);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex; justify-content: space-around; align-items: center;
  padding: 0 4px;
}
.nav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; gap: 4px;
  color: var(--muted); font-size: 10px; font-weight: 700;
  cursor: pointer; user-select: none; padding: 6px 0;
  transition: color .15s; text-align: center;
}
.nav-item.active { color: var(--accent); }
.nav-dot {
  width: 32px; height: 32px; border-radius: 10px;
  background: var(--panel2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; transition: border-color .15s;
}
.nav-item.active .nav-dot { border-color: var(--accent); }

@media (min-width: 900px) {
  .bottomnav { display: none; }
}

/* ── DESKTOP NAV LINKS ── */
.desktop-nav {
  display: none;
}
@media (min-width: 900px) {
  .desktop-nav {
    display: flex; gap: 6px; align-items: center;
  }
  .desktop-nav a {
    height: 34px; padding: 0 12px; border-radius: 8px;
    background: var(--panel2); border: 1px solid var(--border);
    font-size: 12px; font-weight: 700; color: var(--muted);
    display: flex; align-items: center; transition: all .15s;
  }
  .desktop-nav a:hover { color: var(--text); border-color: var(--accent); }
}

/* ── SPACER ── */
.spacer { flex: 1; }

/* ── PILL BUTTON ── */
.pill-btn {
  height: 36px; padding: 0 14px; border-radius: 10px;
  background: var(--panel2); border: 1px solid var(--border);
  color: var(--text); font-size: 13px; font-weight: 700;
  cursor: pointer; user-select: none; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
  transition: border-color .15s, background .15s;
}
.pill-btn:hover { border-color: var(--accent); }
.pill-btn.active { border-color: var(--accent); color: var(--accent); }

/* ── PRIMARY BUTTON ── */
.btn-primary {
  height: 44px; padding: 0 20px; border-radius: 10px;
  background: var(--accent); border: none;
  color: #000; font-size: 14px; font-weight: 800;
  cursor: pointer; transition: background .15s;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-primary:hover { background: var(--accent2); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }

/* ── CARD ── */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

/* ── CHIPS ── */
.chip {
  height: 24px; padding: 0 10px; border-radius: 999px;
  background: var(--panel2); border: 1px solid var(--border);
  font-size: 11px; font-weight: 700; color: var(--muted);
  display: inline-flex; align-items: center;
}
.chip.accent { border-color: rgba(245,158,11,.4); color: var(--accent); }

/* ── TOAST ── */
.toast {
  position: fixed; bottom: calc(var(--navH) + 12px); left: 50%;
  transform: translateX(-50%); z-index: 2000;
  background: rgba(13,15,20,.92); border: 1px solid var(--border);
  border-radius: 10px; padding: 9px 16px;
  font-size: 12px; font-weight: 700; color: var(--text);
  backdrop-filter: blur(8px); box-shadow: var(--shadow);
  white-space: nowrap; pointer-events: none; display: none;
}

/* ── PAGE WRAPPER (for pages with topbar + optional bottom nav) ── */
.page-wrap {
  max-width: var(--maxW); margin: 0 auto;
  padding: calc(var(--topH) + 16px) 14px calc(var(--navH) + 16px);
}
@media (min-width: 900px) {
  .page-wrap { padding-bottom: 32px; }
}

/* ── SECTION HEADER ── */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.section-title { font-size: 16px; font-weight: 900; }
.section-count { font-size: 12px; color: var(--muted); font-weight: 700; }

/* ── EMPTY / ERROR STATE ── */
.state-box {
  padding: 40px 20px; text-align: center;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius);
}
.state-icon  { font-size: 36px; margin-bottom: 12px; }
.state-title { font-size: 16px; font-weight: 800; margin-bottom: 6px; }
.state-sub   { font-size: 13px; color: var(--muted); }

/* ── SPINNER ── */
.spinner {
  width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--accent);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── FORM ELEMENTS ── */
.form-input {
  width: 100%; height: 44px;
  background: var(--panel2); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text);
  font-size: 14px; padding: 0 14px; outline: none;
  transition: border-color .15s; -webkit-appearance: none;
}
.form-input:focus { border-color: var(--accent); }
.form-input::placeholder { color: var(--muted); }

.form-label {
  display: block; font-size: 12px; font-weight: 700;
  color: var(--muted); margin-bottom: 6px;
}

/* ── PAGINATION ── */
.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; padding: 20px 0 8px; flex-wrap: wrap;
}
.pg-btn {
  min-width: 38px; height: 38px; padding: 0 10px;
  border-radius: 10px; border: 1px solid var(--border);
  background: var(--panel2); color: var(--muted);
  font-size: 13px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s; user-select: none;
}
.pg-btn:hover { border-color: var(--accent); color: var(--text); }
.pg-btn.active { background: var(--accent); border-color: var(--accent); color: #000; }
.pg-btn:disabled { opacity: .35; cursor: default; pointer-events: none; }
.pg-ellipsis {
  min-width: 32px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 13px;
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
