/* ==========================================================================
   Kalkulatory.pl — Główny arkusz styli
   ========================================================================== */

/* Reset i zmienne */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

:root {
  --primary: #1e40af;
  --primary-dark: #1e3a8a;
  --primary-light: #3b82f6;
  --accent: #16a34a;
  --accent-dark: #15803d;
  --accent-light: #22c55e;
  --warn: #f59e0b;
  --error: #dc2626;

  --bg: #f8fafc;
  --bg-alt: #f1f5f9;
  --card: #ffffff;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;

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

  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Consolas, monospace;

  --max-w: 1200px;
}

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.25; font-weight: 700; color: var(--text); }
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); margin-bottom: 0.5rem; }
h2 { font-size: clamp(1.4rem, 3vw, 1.875rem); margin: 2rem 0 1rem; }
h3 { font-size: 1.25rem; margin: 1.5rem 0 0.75rem; }
h4 { font-size: 1.05rem; margin: 1rem 0 0.5rem; }

p { margin-bottom: 1rem; }

/* Container */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 768px) {
  .container { padding: 0 1.5rem; }
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  gap: 1rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--primary);
  text-decoration: none;
}
.site-logo:hover { text-decoration: none; }

.site-logo-icon {
  width: 32px; height: 32px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  display: grid; place-items: center;
  font-size: 1rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.site-nav ul {
  list-style: none;
  display: flex;
  gap: 0.25rem;
  padding: 0;
}
.site-nav a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  display: block;
}
.site-nav a:hover { background: var(--bg-alt); color: var(--primary); text-decoration: none; }

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  cursor: pointer;
  color: var(--text);
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--card); border-bottom: 1px solid var(--border); padding: 0.5rem 1rem 1rem; flex-direction: column; align-items: stretch; box-shadow: var(--shadow); }
  .site-nav.open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a { padding: 0.75rem 1rem; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  padding: 3rem 0;
  text-align: center;
}
.hero h1 { color: #fff; }
.hero p { color: rgba(255, 255, 255, 0.92); font-size: 1.125rem; max-width: 680px; margin: 0 auto 1.5rem; }

.search-bar {
  max-width: 560px;
  margin: 1.5rem auto 0;
  background: #fff;
  border-radius: 999px;
  padding: 0.5rem 0.5rem 0.5rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-lg);
}
.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1rem;
  font-family: var(--font);
  background: transparent;
  color: var(--text);
  padding: 0.5rem 0;
}
.search-bar button {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0.6rem 1.25rem;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
}
.search-bar button:hover { background: var(--primary-dark); }

#search-results {
  position: relative;
  max-width: 560px;
  margin: 0.5rem auto 0;
}
.search-dropdown {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-height: 320px;
  overflow-y: auto;
  z-index: 50;
  text-align: left;
}
.search-dropdown a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.search-dropdown a:hover { background: var(--bg-alt); text-decoration: none; }
.search-dropdown a:last-child { border-bottom: none; }
.search-dropdown small { color: var(--text-light); display: block; }

/* ==========================================================================
   Sections / Layout
   ========================================================================== */
main { flex: 1; padding: 2rem 0; }

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.section-title h2 { margin: 0; }
.section-title a { font-size: 0.95rem; font-weight: 500; }

/* Breadcrumbs */
.breadcrumbs {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs .sep { margin: 0 0.5rem; color: var(--border-strong); }

/* ==========================================================================
   Category grid (homepage)
   ========================================================================== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.category-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.category-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  text-decoration: none;
}

.category-icon {
  width: 48px; height: 48px;
  background: var(--bg-alt);
  color: var(--primary);
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  font-size: 1.5rem;
}

.category-card h3 { margin: 0; font-size: 1.1rem; }
.category-card p { font-size: 0.875rem; color: var(--text-muted); margin: 0; }
.category-card .count {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 600;
  margin-top: auto;
}

/* ==========================================================================
   Calculator card grid
   ========================================================================== */
.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.calc-tile {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.calc-tile:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  text-decoration: none;
}
.calc-tile h3 { margin: 0; font-size: 1rem; color: var(--primary); }
.calc-tile p { font-size: 0.875rem; color: var(--text-muted); margin: 0; }
.calc-tile .tag {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent);
  font-weight: 700;
  margin-top: 0.25rem;
}

/* ==========================================================================
   Calculator layout (calc detail page)
   ========================================================================== */
.calc-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin: 1.5rem 0;
}

@media (min-width: 1024px) {
  .calc-layout { grid-template-columns: 1fr 300px; }
}

.calc-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

@media (min-width: 768px) {
  .calc-card { padding: 2rem; }
}

.calc-card h2 { margin-top: 0; }

.calc-sidebar { display: flex; flex-direction: column; gap: 1rem; }

/* ==========================================================================
   Forms
   ========================================================================== */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
@media (min-width: 600px) {
  .form-grid.two-col { grid-template-columns: 1fr 1fr; }
  .form-grid.three-col { grid-template-columns: 1fr 1fr 1fr; }
}

.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}
.field .hint { font-size: 0.75rem; color: var(--text-light); }

.input, .select, .textarea {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: var(--font);
  background: #fff;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.12);
}
.input-group { display: flex; align-items: stretch; }
.input-group .input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group .unit {
  background: var(--bg-alt);
  border: 1px solid var(--border-strong);
  border-left: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0 0.75rem;
  display: grid;
  place-items: center;
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 600;
  min-width: 48px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}
.btn:hover { background: var(--primary-dark); text-decoration: none; color: #fff; }
.btn.secondary { background: var(--bg-alt); color: var(--text); }
.btn.secondary:hover { background: var(--border); }
.btn.accent { background: var(--accent); }
.btn.accent:hover { background: var(--accent-dark); }
.btn.ghost { background: transparent; color: var(--primary); border: 1px solid var(--border-strong); }
.btn.ghost:hover { background: var(--bg-alt); }

.btn-row { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1rem; }

.radio-group, .checkbox-group { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.radio-group label, .checkbox-group label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.875rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: #fff;
  font-size: 0.9rem;
  font-weight: 500;
}
.radio-group input, .checkbox-group input { accent-color: var(--primary); }
.radio-group label:has(input:checked), .checkbox-group label:has(input:checked) {
  border-color: var(--primary);
  background: rgba(30, 64, 175, 0.06);
  color: var(--primary);
}

/* Range slider */
.range-row { display: flex; align-items: center; gap: 0.75rem; }
.range-row input[type="range"] { flex: 1; accent-color: var(--primary); }
.range-row .range-value {
  min-width: 70px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--primary);
}

/* ==========================================================================
   Result
   ========================================================================== */
.result {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 1px solid #bbf7d0;
  border-radius: var(--radius);
}
.result h3 { margin-top: 0; color: var(--accent-dark); }

.result.dim {
  background: var(--bg-alt);
  border-color: var(--border);
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.result-stat {
  background: rgba(255, 255, 255, 0.7);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  text-align: center;
}
.result-stat .num {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 800;
  color: var(--accent-dark);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.result-stat .lbl {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0.25rem;
}

.result-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  background: #fff;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.result-table th, .result-table td {
  padding: 0.6rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.result-table th { background: var(--bg-alt); font-weight: 600; }
.result-table tr:last-child td { border-bottom: none; }
.result-table td.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Visualization box */
.viz-box {
  margin-top: 1.5rem;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
}
.viz-box svg { margin: 0 auto; max-width: 100%; height: auto; display: block; }
.viz-box h3 { font-size: 1rem; color: var(--text); margin-bottom: 0.75rem; }
.viz-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  font-size: 0.875rem;
  margin-top: 0.5rem;
  color: var(--text-muted);
}
.viz-legend .dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  margin-right: 0.35rem;
  vertical-align: middle;
}
/* Siatka dwóch widoków obok siebie */
.viz-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}
@media (min-width: 768px) {
  .viz-grid { grid-template-columns: 1fr 1fr; }
  .viz-grid .viz-box { margin-top: 0; }
}

/* Pasek wykorzystania */
.viz-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.5rem 0;
}
.viz-bar .lbl { width: 130px; text-align: left; font-size: 0.85rem; color: var(--text-muted); }
.viz-bar .track {
  flex: 1;
  height: 24px;
  background: var(--bg-alt);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}
.viz-bar .fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 0.5rem;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  transition: width 0.4s ease;
}
.viz-bar .fill.good { background: linear-gradient(90deg, #15803d 0%, #22c55e 100%); }
.viz-bar .fill.warn { background: linear-gradient(90deg, #b45309 0%, #f59e0b 100%); }

/* Globalne zastrzeżenie pod kalkulatorem */
.calc-disclaimer {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-top: 1rem;
  padding: 0.875rem 1rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-left: 4px solid var(--warn);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: #78350f;
  line-height: 1.5;
}
.calc-disclaimer .cd-icon { font-size: 1.1rem; line-height: 1; flex-shrink: 0; }
.calc-disclaimer a { color: var(--primary); font-weight: 600; }

/* Error / warning */
.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  margin: 0.5rem 0;
  font-size: 0.9rem;
  border-left: 4px solid;
}
.alert.error { background: #fef2f2; border-color: var(--error); color: #991b1b; }
.alert.warn { background: #fffbeb; border-color: var(--warn); color: #92400e; }
.alert.info { background: #eff6ff; border-color: var(--primary); color: #1e3a8a; }

/* ==========================================================================
   SEO Content blocks
   ========================================================================== */
.seo-content {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  border: 1px solid var(--border);
  margin: 2rem 0;
}
@media (min-width: 768px) { .seo-content { padding: 2rem; } }

.seo-content h2 { margin-top: 1.5rem; }
.seo-content h2:first-child { margin-top: 0; }
.seo-content ul, .seo-content ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.seo-content li { margin-bottom: 0.35rem; }
.seo-content code {
  background: var(--bg-alt);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.875em;
}
.formula {
  display: inline-block;
  background: var(--bg-alt);
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 1rem;
  border-left: 3px solid var(--primary);
  margin: 0.5rem 0;
}

.faq details {
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  border: 1px solid var(--border);
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  position: relative;
  padding-right: 1.5rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  font-size: 1.25rem;
  color: var(--primary);
  font-weight: 700;
}
.faq details[open] summary::after { content: "−"; }
.faq details[open] { background: #fff; }
.faq p { margin: 0.5rem 0 0; color: var(--text-muted); }

/* ==========================================================================
   Ad slots — placeholdery i realne reklamy
   ========================================================================== */
.ad-slot {
  margin: 1.25rem 0;
  display: block;
  text-align: center;
  overflow: hidden;
}
/* Stan PUSTY (brak reklamy) — mały, dyskretny pasek, który nie szpeci strony */
.ad-slot.empty {
  min-height: 22px;
  background: var(--bg-alt);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0.85rem 0;
  opacity: 0.55;
}
.ad-slot.empty .ad-empty-label {
  font-size: 0.6rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-light);
}
/* Sidebar również: bez reklamy tylko cienki pasek (nie rezerwujemy 600 px) */
.ad-slot.empty[data-slot="sidebar"] { min-height: 22px; }

/* Stan AKTYWNY (jest reklama) — sama reklama, bez ramek i tła */
.ad-slot.active {
  background: transparent;
  border: none;
  padding: 0;
  min-height: 0;
}

/* Affiliate sidebar box */
.affiliate-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}
.affiliate-box h4 {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-light);
}
.affiliate-box ul { list-style: none; padding: 0; margin: 0; }
.affiliate-box li { border-bottom: 1px solid var(--border); }
.affiliate-box li:last-child { border-bottom: none; }
.affiliate-box a {
  display: block;
  padding: 0.6rem 0;
  font-size: 0.9rem;
  color: var(--text);
}
.affiliate-box a:hover { color: var(--primary); text-decoration: none; }
.affiliate-box .price {
  color: var(--accent);
  font-weight: 700;
  font-size: 0.85rem;
}
.affiliate-box small { display: block; color: var(--text-light); font-size: 0.75rem; margin-top: 0.5rem; }

/* Related calculators */
.related-calcs {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}
.related-calcs h4 {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-light);
}
.related-calcs ul { list-style: none; padding: 0; margin: 0; }
.related-calcs li { border-bottom: 1px solid var(--border); }
.related-calcs li:last-child { border-bottom: none; }
.related-calcs a {
  display: block;
  padding: 0.6rem 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.related-calcs a:hover { color: var(--primary); text-decoration: none; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 2.5rem 0 1.5rem;
  margin-top: 3rem;
}
.site-footer a { color: #e2e8f0; }
.site-footer a:hover { color: #fff; }

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-grid h4 { color: #f1f5f9; font-size: 0.95rem; margin-bottom: 0.75rem; }
.footer-grid ul { list-style: none; padding: 0; }
.footer-grid li { margin-bottom: 0.35rem; font-size: 0.9rem; }

.footer-bottom {
  border-top: 1px solid #334155;
  padding-top: 1rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #94a3b8;
}

/* ==========================================================================
   Cookie banner
   ========================================================================== */
.cookie-banner {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  max-width: 720px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-lg);
  z-index: 200;
  display: none;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.cookie-banner.show { display: flex; }
.cookie-banner p { margin: 0; font-size: 0.875rem; flex: 1; min-width: 240px; }

/* ==========================================================================
   Utilities
   ========================================================================== */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.hidden { display: none !important; }
.full-width { width: 100%; }

.tag-pill {
  display: inline-block;
  background: var(--bg-alt);
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ==========================================================================
   Admin panel
   ========================================================================== */
.admin-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 960px) {
  .admin-shell { grid-template-columns: 220px 1fr; }
}

.admin-side {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  height: fit-content;
}
.admin-side h4 { margin: 0 0 0.5rem; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-light); }
.admin-side ul { list-style: none; padding: 0; }
.admin-side li a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9rem;
}
.admin-side li a:hover { background: var(--bg-alt); text-decoration: none; }
.admin-side li a.active { background: var(--primary); color: #fff; }

.admin-main {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.admin-main .textarea { font-family: var(--font-mono); font-size: 0.85rem; min-height: 120px; }

.admin-tabs { display: none; }
.admin-tab.active { display: block; }

.admin-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 1rem;
  background: var(--bg);
}
.admin-card h4 { margin: 0 0 0.5rem; }

.status-pill {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.status-pill.on { background: #dcfce7; color: var(--accent-dark); }
.status-pill.off { background: #fef2f2; color: var(--error); }

/* Accordions */
.accordion .acc-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  background: #fff;
}
.accordion .acc-head {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 0.75rem 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.accordion .acc-body { padding: 0 1rem 1rem; display: none; }
.accordion .acc-item.open .acc-body { display: block; }
