/* ==========================================================================
   StrefaRP Whitelist — tokens
   Paleta: głęboka, prawie czarna zieleń nocnego ogrodu + mgławy miętowy akcent.
   Display: Space Grotesk (kanciasty, techniczny — pasuje do świata RP/dyspozytora)
   Body: Inter
   Mono: JetBrains Mono (numery spraw, etykiety, ID)
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap");

:root {
  --bg: #0a0c07;
  --bg-elevated: #12150c;
  --panel: #151810;
  --panel-2: #1b2015;
  --border: rgba(216, 226, 195, 0.09);
  --border-strong: rgba(216, 226, 195, 0.17);
  --text: #edf0e4;
  --text-dim: #a3ab93;
  --text-faint: #6d7460;
  --accent: #93b158;
  --accent-dim: #4c5f30;
  --accent-glow: rgba(147, 177, 88, 0.2);
  --danger: #d9705f;
  --success: #8fc06a;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;
  --shadow-panel: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
  --maxw: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display {
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

.mono {
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0.02em;
}

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

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---- Nav ---------------------------------------------------------------- */

.nav-float {
  position: sticky;
  top: 16px;
  z-index: 50;
  margin: 16px auto 0;
  max-width: 1080px;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px 14px 10px 18px;
  background: rgba(15, 19, 18, 0.72);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 15px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1.5px dashed var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: var(--text-faint);
  text-align: center;
  line-height: 1.1;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13.5px;
}

.nav-links a {
  display: block;
  padding: 8px 13px;
  border-radius: var(--radius-pill);
  color: var(--text-dim);
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}

.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav-links a.active { color: var(--accent); }

.nav-right { display: flex; align-items: center; gap: 10px; }

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.03);
}

@media (max-width: 880px) {
  .nav-links { display: none; }
}

/* ---- Buttons -------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 14.5px;
  padding: 13px 24px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: #08211b;
  box-shadow: 0 8px 30px -8px var(--accent-glow);
}
.btn-primary:hover { box-shadow: 0 10px 34px -6px var(--accent-glow); background: #63e9cb; }

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); }

.btn-danger { background: var(--danger); color: #2a0a08; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-block { width: 100%; }

/* ---- Hero ------------------------------------------------------------------ */

.hero {
  position: relative;
  min-height: 92vh;
  margin-top: -78px;
  padding-top: 78px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background:
    linear-gradient(180deg, rgba(8, 9, 6, 0.35) 0%, rgba(8, 9, 6, 0.55) 55%, var(--bg) 96%),
    url("assets/hero.jpg") center/cover no-repeat;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.hero-photo-slot {
  position: absolute;
  inset: 0;
  z-index: -1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-photo-slot.has-image { background-size: cover; background-position: center; }

.hero-photo-hint {
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  color: var(--text-faint);
  font-size: 12.5px;
  margin: 40px;
}

.hero-content {
  position: relative;
  padding: 0 28px 72px;
  max-width: var(--maxw);
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 34px;
  align-items: end;
}

.hero-logo-slot {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-md);
  border: 1.5px dashed var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: var(--text-faint);
  text-align: center;
  line-height: 1.3;
  padding: 8px;
  flex-shrink: 0;
}

.eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.hero h1 {
  font-size: clamp(34px, 5.4vw, 58px);
  line-height: 1.06;
  max-width: 15ch;
  margin-bottom: 18px;
}

.hero p.lede {
  color: var(--text-dim);
  font-size: 16.5px;
  max-width: 52ch;
  margin-bottom: 30px;
}

.hero-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }


/* ---- Section shell ---------------------------------------------------------- */

section { padding: 96px 0; }
.section-head { max-width: 640px; margin-bottom: 52px; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 36px); margin-bottom: 14px; }
.section-head p { color: var(--text-dim); font-size: 15.5px; }

/* ---- Case docket (jak dołączyć) ---------------------------------------------- */

.docket { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }

.docket-item { background: var(--panel); padding: 34px 28px; position: relative; }

.docket-tag {
  display: inline-block;
  font-family: "JetBrains Mono", monospace;
  font-size: 11.5px;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  margin-bottom: 22px;
}

.docket-item h3 { font-size: 18.5px; margin-bottom: 10px; }
.docket-item p { color: var(--text-dim); font-size: 14.5px; margin: 0; }

@media (max-width: 800px) { .docket { grid-template-columns: 1fr; } }

/* ---- CTA panel --------------------------------------------------------------- */

.cta-panel {
  background: radial-gradient(ellipse at top left, rgba(82, 227, 194, 0.1), transparent 60%), var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 52px 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.cta-panel h2 { font-size: 26px; margin-bottom: 8px; max-width: 30ch; }
.cta-panel p { color: var(--text-dim); margin: 0; max-width: 42ch; }

/* ---- FAQ ---------------------------------------------------------------------- */

.faq-list { border-top: 1px solid var(--border); }

.faq-item { border-bottom: 1px solid var(--border); }

.faq-q {
  width: 100%;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 4px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 16.5px;
  font-weight: 500;
  text-align: left;
  gap: 20px;
}

.faq-q .num { font-family: "JetBrains Mono", monospace; font-size: 12px; color: var(--text-faint); margin-right: 14px; }

.faq-q .chev { color: var(--accent); transition: transform 0.2s ease; flex-shrink: 0; }
.faq-item.open .faq-q .chev { transform: rotate(45deg); }

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease, padding 0.25s ease;
  color: var(--text-dim);
  font-size: 15px;
  padding: 0 4px;
}

.faq-item.open .faq-a { max-height: 400px; padding: 0 4px 24px 44px; }

/* ---- Footer --------------------------------------------------------------------- */

footer { border-top: 1px solid var(--border); padding: 48px 0; color: var(--text-faint); font-size: 13.5px; }
footer .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
footer .foot-links { display: flex; gap: 20px; flex-wrap: wrap; }

/* ---- Apply page ------------------------------------------------------------------- */

.apply-shell { padding: 150px 0 100px; min-height: 100vh; }
.apply-card {
  max-width: 640px;
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 44px;
  box-shadow: var(--shadow-panel);
}

.apply-card h1 { font-size: 26px; margin-bottom: 10px; }
.apply-card > p.lede { color: var(--text-dim); font-size: 14.5px; margin-bottom: 30px; }

.discord-connect {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 22px;
}

.discord-user { display: flex; align-items: center; gap: 12px; }
.discord-user .avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--accent-dim); display: flex; align-items: center; justify-content: center; font-family: "JetBrains Mono", monospace; font-size: 13px; color: var(--bg); font-weight: 600; }
.discord-user .name { font-weight: 600; font-size: 14.5px; }
.discord-user .sub { font-size: 12px; color: var(--text-faint); }

.field { margin-bottom: 22px; }
.field label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 9px; }
.field .req { color: var(--danger); margin-left: 3px; }

.field input[type="text"],
.field input[type="number"],
.field textarea {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-family: "Inter", sans-serif;
  font-size: 14.5px;
  resize: vertical;
}

.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.field textarea { min-height: 110px; }

.field.checkbox-field { display: flex; align-items: flex-start; gap: 10px; }
.field.checkbox-field input { margin-top: 3px; accent-color: var(--accent); width: 16px; height: 16px; }
.field.checkbox-field label { margin: 0; font-size: 13.5px; color: var(--text-dim); }

.form-msg { font-size: 13.5px; padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 18px; }
.form-msg.error { background: rgba(239, 106, 99, 0.12); color: var(--danger); border: 1px solid rgba(239, 106, 99, 0.3); }
.form-msg.success { background: rgba(98, 217, 153, 0.12); color: var(--success); border: 1px solid rgba(98, 217, 153, 0.3); }

.status-card { text-align: center; padding: 26px 10px; }
.status-badge { display: inline-block; font-family: "JetBrains Mono", monospace; font-size: 12px; padding: 6px 14px; border-radius: var(--radius-pill); margin-bottom: 16px; }
.status-badge.pending { color: var(--accent); border: 1px solid var(--accent-dim); }
.status-badge.accepted { color: var(--success); border: 1px solid var(--success); }
.status-badge.rejected { color: var(--danger); border: 1px solid var(--danger); }

.hidden { display: none !important; }

/* ---- Ekipa ------------------------------------------------------------------------ */

.page-head { text-align: center; padding: 150px 0 40px; }
.page-head .eyebrow { justify-content: center; }
.page-head h1 { font-size: clamp(32px, 5vw, 46px); }
.page-head p { color: var(--text-dim); max-width: 52ch; margin: 16px auto 0; font-size: 15.5px; }

.roster { max-width: 900px; margin: 0 auto; padding: 20px 0 120px; }

.roster-group { margin-bottom: 54px; }

.roster-label {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 26px;
}

.roster-label .role-name {
  font-family: "JetBrains Mono", monospace;
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
}

.roster-label .rule { flex: 1; height: 1px; background: var(--border); }

.roster-label .idx { font-family: "JetBrains Mono", monospace; font-size: 12.5px; color: var(--text-faint); }

.roster-members { display: flex; flex-wrap: wrap; gap: 40px; }

.member { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 110px; text-align: center; }

.member-avatar {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: var(--panel-2);
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-family: "Space Grotesk", sans-serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--accent);
}

.member-avatar img { width: 100%; height: 100%; object-fit: cover; }

.member-name { font-size: 14.5px; font-weight: 500; }

/* ---- Zasady ----------------------------------------------------------------------- */

.rules-shell { padding: 150px 0 100px; }

.rules-meta { text-align: center; color: var(--text-faint); font-size: 12.5px; margin-top: 14px; }

.rules-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
  max-width: 1080px;
  margin: 56px auto 0;
  align-items: start;
}

.rules-search {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  color: var(--text);
  font-family: "Inter", sans-serif;
  font-size: 13.5px;
  margin-bottom: 18px;
}
.rules-search:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }

.rules-toc {
  position: sticky;
  top: 110px;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
}

.rules-toc a {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  color: var(--text-dim);
}
.rules-toc a .n { font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--text-faint); }
.rules-toc a:hover { background: rgba(255, 255, 255, 0.04); color: var(--text); }
.rules-toc a.active { color: var(--accent); background: rgba(147, 177, 88, 0.08); }
.rules-toc a.no-match { display: none; }

.rules-content { min-width: 0; }

.rule-section { padding-bottom: 46px; margin-bottom: 46px; border-bottom: 1px solid var(--border); scroll-margin-top: 100px; }
.rule-section:last-child { border-bottom: none; }
.rule-section.no-match { display: none; }

.rule-section h2 {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-size: 22px;
  margin-bottom: 6px;
}
.rule-section h2 .n { font-family: "JetBrains Mono", monospace; color: var(--accent); font-size: 16px; }
.rule-section .rule-desc { color: var(--text-dim); font-size: 14px; margin-bottom: 22px; }

.rule-item { display: flex; gap: 14px; padding: 14px 0; border-top: 1px solid var(--border); font-size: 14.5px; color: var(--text-dim); }
.rule-item:first-of-type { border-top: none; }
.rule-item .n { font-family: "JetBrains Mono", monospace; color: var(--accent); font-size: 13px; flex-shrink: 0; padding-top: 1px; }

@media (max-width: 860px) {
  .rules-layout { grid-template-columns: 1fr; }
  .rules-toc { position: static; max-height: none; flex-direction: row; flex-wrap: wrap; }
}

/* ---- Panel administracji ----------------------------------------------------------- */

.admin-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 12, 7, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}

.admin-nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.admin-nav .brand { font-family: "Space Grotesk", sans-serif; font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 10px; }
.admin-nav .brand .tag { font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--accent); border: 1px solid var(--accent-dim); padding: 2px 8px; border-radius: var(--radius-sm); }
.admin-nav .who { display: flex; align-items: center; gap: 14px; font-size: 13.5px; color: var(--text-dim); }
.admin-nav .who a { color: var(--text-dim); }
.admin-nav .who a:hover { color: var(--text); }

.admin-shell { padding: 40px 0 100px; }

.admin-auth-card {
  max-width: 420px;
  margin: 90px auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-panel);
}
.admin-auth-card h1 { font-size: 22px; margin-bottom: 8px; }
.admin-auth-card p.lede { color: var(--text-dim); font-size: 14px; margin-bottom: 26px; }

.field-label { display: block; font-size: 13.5px; font-weight: 500; margin-bottom: 8px; }
.field-input {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  color: var(--text);
  font-family: "Inter", sans-serif;
  font-size: 14.5px;
  margin-bottom: 18px;
}
.field-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }

.tab-bar { display: flex; gap: 8px; margin-bottom: 28px; flex-wrap: wrap; }
.tab-bar a {
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--text-dim);
  font-weight: 500;
}
.tab-bar a.active { color: var(--bg); background: var(--accent); border-color: var(--accent); }
.tab-bar a .count { font-family: "JetBrains Mono", monospace; opacity: 0.75; margin-left: 6px; }

.app-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 26px;
  margin-bottom: 18px;
}

.app-card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 6px; }
.app-card-who { display: flex; align-items: center; gap: 12px; }
.app-card-who img { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border-strong); }
.app-card-who .name { font-weight: 600; font-size: 15px; }
.app-card-who .id { font-family: "JetBrains Mono", monospace; font-size: 11.5px; color: var(--text-faint); }
.app-card-num { font-family: "JetBrains Mono", monospace; font-size: 12px; color: var(--text-faint); }

.app-answers { margin: 16px 0; border-top: 1px solid var(--border); padding-top: 14px; }
.app-answer { padding: 8px 0; font-size: 14px; border-bottom: 1px solid var(--border); }
.app-answer:last-child { border-bottom: none; }
.app-answer .q { color: var(--text-faint); font-size: 12.5px; margin-bottom: 3px; }
.app-answer .a { color: var(--text); }

.app-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.app-actions form { display: contents; }

.btn-sm { padding: 9px 16px; font-size: 13px; }

.reject-box { margin-top: 14px; display: none; }
.reject-box.open { display: block; }
.reject-box textarea {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--text);
  font-family: "Inter", sans-serif;
  font-size: 13.5px;
  min-height: 80px;
  margin-bottom: 10px;
  resize: vertical;
}

.app-decided-note { font-size: 13.5px; color: var(--text-dim); margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }

.flash { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 13.5px; margin-bottom: 22px; }
.flash.success { background: rgba(98, 217, 153, 0.12); color: var(--success); border: 1px solid rgba(98, 217, 153, 0.3); }
.flash.error { background: rgba(239, 106, 99, 0.12); color: var(--danger); border: 1px solid rgba(239, 106, 99, 0.3); }

.admin-list-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-list-table th { text-align: left; color: var(--text-faint); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; padding: 10px 12px; border-bottom: 1px solid var(--border-strong); }
.admin-list-table td { padding: 12px; border-bottom: 1px solid var(--border); }
.admin-list-table tr:last-child td { border-bottom: none; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--text-faint); }
