/* =========================
   THEME VARIABLES
========================= */

:root {
  --accent: #2563eb;
  --accent-hover: #1d4ed8;

  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-2: #f1f5f9;

  --text: #0f172a;
  --text-muted: #64748b;

  --border: #e2e8f0;
  --shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

html[data-theme="dark"] {
  --bg: #0f172a;
  --surface: #111827;
  --surface-2: #1f2937;

  --text: #e5e7eb;
  --text-muted: #9ca3af;

  --border: #1f2937;
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

/* =========================
   BASE
========================= */

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.site-shell {
  min-height: calc(100vh - 160px);
}

/* =========================
   TYPOGRAPHY
========================= */

h1, h2, h3 {
  font-weight: 700;
  margin-top: 0;
}

.page-title {
  margin-bottom: 0.5rem;
}

.page-subtitle {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* =========================
   BUTTONS
========================= */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.btn:hover {
  background: var(--surface-2);
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-ghost {
  background: transparent;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

/* =========================
   TABLES
========================= */

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
}

th, td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

th {
  background: var(--surface-2);
  font-weight: 600;
}

/* =========================
   MOD LAYOUT
========================= */

.mod-shell {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  padding: 2rem 0;
}

.mod-pass {
  position: sticky;
  top: 100px;
}

.modpass-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.2rem;
  box-shadow: var(--shadow);
}

.modpass-title {
  font-weight: 600;
  margin-bottom: 1rem;
}

.kv-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.6rem;
  font-size: 0.85rem;
}

.pill {
  display: inline-block;
  background: var(--surface-2);
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  margin: 0.2rem 0.2rem 0 0;
}

/* =========================
   BACK TO TOP
========================= */

.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  cursor: pointer;
}
