/* Department of Justice | San Andreas: nowoczesna warstwa wyglądu.
   Barwy z pieczęci Departamentu (granat, złoto, bordo), szkło, miękkie światło i wyraźna typografia.
   Plik nadpisuje app.css. Dokumenty urzędowe (.paper) zachowują swój wygląd. */

/* ───────── Tokeny ───────── */
:root[data-theme="light"] {
  --bg: #f3f2ee; --bg-2: #faf9f6; --panel: #ffffff; --panel-2: #f7f6f2; --panel-3: #eeebe4;
  --border: #e5e1d8; --border-2: #d4cfc2; --text: #0e1a2f; --text-2: #33405a; --muted: #687188; --faint: #9aa1b0;
  --navy: #0b2a55; --navy-2: #12386d; --navy-3: #1d4f91; --brand-navy: #04193a;
  --gold: #c9a24a; --gold-light: #e5c56b; --gold-2: #8a621f; --bronze: #9b6d27;
  --gold-soft: rgba(201, 162, 74, 0.14); --navy-soft: rgba(11, 42, 85, 0.06);
  --link: #1d4f91; --accent-ink: #0b2a55; --hover: #f6f4ee; --field: #ffffff; --desk: #e8e5dc;
  --guide-bg: #fffbf3; --guide-bg-2: #fdf6e6; --guide-border: #ecdcb3;
  --shadow-sm: 0 1px 2px rgba(14, 26, 47, 0.05);
  --shadow: 0 1px 2px rgba(14, 26, 47, 0.04), 0 10px 30px rgba(14, 26, 47, 0.07);
  --shadow-lg: 0 28px 70px rgba(4, 25, 58, 0.25);
  --glass: rgba(255, 255, 255, 0.72); --glass-border: rgba(14, 26, 47, 0.08);
  --ring: rgba(29, 79, 145, 0.18);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #070c17; --bg-2: #0a1120; --panel: #0e1626; --panel-2: #121c2f; --panel-3: #18243a;
  --border: #1d2a42; --border-2: #2a3a57; --text: #e9eef7; --text-2: #c3cddd; --muted: #8e9bb2; --faint: #67748c;
  --navy: #1d4f91; --navy-2: #2a62ad; --navy-3: #79a6e8; --brand-navy: #040a15;
  --gold: #d4ae58; --gold-light: #ecd08a; --gold-2: #ecd08a; --bronze: #d4ae58;
  --gold-soft: rgba(236, 208, 138, 0.12); --navy-soft: rgba(121, 166, 232, 0.1);
  --link: #8fb8f2; --accent-ink: #dde7f7; --hover: #131e33; --field: #0a1221; --desk: #05090f;
  --guide-bg: #151a24; --guide-bg-2: #171c27; --guide-border: #3a3626;
  --shadow-sm: none; --shadow: 0 10px 30px rgba(0, 0, 0, 0.35); --shadow-lg: 0 28px 70px rgba(0, 0, 0, 0.55);
  --glass: rgba(14, 22, 38, 0.72); --glass-border: rgba(255, 255, 255, 0.08);
  --ring: rgba(121, 166, 232, 0.25);
  color-scheme: dark;
}
:root {
  --radius: 16px; --radius-sm: 10px;
  --font-heading: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  --font-accent: 'Instrument Serif', Georgia, serif;
  --mesh: radial-gradient(900px 420px at 85% -10%, rgba(229, 197, 107, 0.28), transparent 60%),
          radial-gradient(700px 500px at -10% 110%, rgba(138, 34, 54, 0.45), transparent 60%),
          radial-gradient(600px 400px at 60% 120%, rgba(29, 79, 145, 0.55), transparent 65%),
          linear-gradient(135deg, #04193a 0%, #072352 55%, #0b2a55 100%);
  --grid-lines: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
}

/* ───────── Podstawy ───────── */
body { font-size: 14.5px; background: var(--bg); }
[hidden] { display: none !important; }
:is(h1, h2, h3, h4):not(.paper *) { font-family: var(--font-heading); letter-spacing: -0.015em; }
h1:not(.paper *) { font-weight: 800; letter-spacing: -0.03em; }
::selection { background: rgba(229, 197, 107, 0.4); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
* { scrollbar-width: thin; scrollbar-color: var(--border-2) transparent; }

/* ───────── Przyciski i pola ───────── */
.btn { border-radius: 11px; height: 40px; padding: 0 16px; font-weight: 600; box-shadow: var(--shadow-sm); transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.15s, color 0.15s; }
.btn:hover { border-color: var(--border-2); background: var(--panel-2); }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn.sm { height: 32px; padding: 0 12px; border-radius: 9px; }
.btn.lg { height: 50px; padding: 0 24px; border-radius: 14px; font-size: 15px; }
.btn.icon { width: 40px; }
.btn.icon.sm { width: 32px; }
.btn.primary { background: linear-gradient(180deg, #16407c 0%, #0b2a55 100%); border-color: #0b2a55; color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset, 0 6px 18px rgba(11, 42, 85, 0.25); }
.btn.primary:hover { background: linear-gradient(180deg, #1d4f91 0%, #12386d 100%); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 10px 26px rgba(11, 42, 85, 0.32); transform: translateY(-1px); }
.btn.gold { background: linear-gradient(135deg, #f2d98f 0%, #c9a24a 100%); border-color: #c9a24a; color: #08203f; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 6px 18px rgba(201, 162, 74, 0.3); }
.btn.gold:hover { filter: brightness(1.04); transform: translateY(-1px); }
.btn.ghost { box-shadow: none; }
.btn.ghost:hover { background: var(--navy-soft); border-color: transparent; }
.btn.danger { border-color: rgba(163, 35, 58, 0.35); }
.btn.glass { background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.18); color: #fff; box-shadow: none; backdrop-filter: blur(8px); }
.btn.glass:hover { background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.3); }
:root[data-theme="dark"] .btn.primary { background: linear-gradient(135deg, #f2d98f 0%, #c9a24a 100%); border-color: #c9a24a; color: #071a36; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.45) inset, 0 8px 24px rgba(201, 162, 74, 0.22); }
:root[data-theme="dark"] .btn.primary:hover { background: linear-gradient(135deg, #f6e2a6 0%, #d4ae58 100%); }

.input, .select, .textarea { border-radius: 11px; border-color: var(--border-2); background: var(--field); min-height: 42px; transition: border-color 0.15s, box-shadow 0.15s, background 0.15s; }
.textarea { min-height: 0; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--faint); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--navy-3); box-shadow: 0 0 0 4px var(--ring); }
.field label, .label { font-weight: 600; }

.tag { border-radius: 7px; }
.badge { border-radius: 999px; }
kbd { border-radius: 6px; }

/* ───────── Karty, statystyki, tabele ───────── */
.card { border-radius: var(--radius); border-color: var(--border); box-shadow: var(--shadow-sm); }
.card-head h2 { font-size: 16.5px; font-weight: 700; }
.card-head .ico { color: var(--gold); }
.stat { border-radius: var(--radius); padding: 18px 20px; gap: 6px; box-shadow: var(--shadow-sm); transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s; }
.stat::after { content: ''; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(circle, var(--gold-soft), transparent 70%); pointer-events: none; }
a.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat .label .ico { color: var(--gold); }
.stat .value { font-family: var(--font-heading); font-size: 31px; font-weight: 800; letter-spacing: -0.035em; }
.table th { font-size: 11px; letter-spacing: 0.08em; background: var(--panel-2); color: var(--muted); }
.table td { border-color: var(--border); }
.table tbody tr { transition: background 0.12s; }
.card.flush { overflow: hidden; }

.tabs { gap: 3px; border: 1px solid var(--border); border-radius: 13px; background: var(--panel-2); padding: 4px; width: fit-content; max-width: 100%; margin-bottom: 18px; }
.tabs a, .tabs button { border: 0; margin: 0; border-radius: 9px; padding: 8px 14px; color: var(--muted); transition: background 0.15s, color 0.15s, box-shadow 0.15s; }
.tabs a:hover, .tabs button:hover { color: var(--text); background: var(--hover); }
.tabs .active { background: var(--panel); color: var(--text); box-shadow: 0 1px 2px rgba(14, 26, 47, 0.08), 0 0 0 1px var(--border); }
.tabs .active .ico { color: var(--gold); }

.alert { border-radius: 12px; }
.guide { border-radius: var(--radius); background: linear-gradient(135deg, var(--guide-bg), var(--guide-bg-2)); }
.guide-head .gi { border-radius: 10px; background: linear-gradient(135deg, #16407c, #04193a); box-shadow: 0 4px 12px rgba(11, 42, 85, 0.25); }
.guide li::before { border-color: var(--gold); background: var(--panel); }
.empty .ico { color: var(--gold); opacity: 0.6; }

.modal-backdrop { background: rgba(4, 12, 28, 0.55); backdrop-filter: blur(6px); }
.modal { border-radius: 22px; border: 1px solid var(--glass-border); }
.modal-head { border-radius: 22px 22px 0 0; background: var(--panel); }
.modal-head h2, .modal-head h3 { font-weight: 800; }
.modal-foot { border-radius: 0 0 22px 22px; }

/* ───────── Panel: pasek boczny i górny ───────── */
.sidebar {
  background: radial-gradient(130% 50% at 0% 0%, rgba(229, 197, 107, 0.12), transparent 55%),
              radial-gradient(120% 40% at 100% 100%, rgba(138, 34, 54, 0.25), transparent 60%),
              linear-gradient(180deg, #071d3f 0%, #04152f 55%, #030e21 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.06); padding: 20px 14px;
}
.brand { gap: 12px; }
.brand-title { font-family: var(--font-heading); font-weight: 800; letter-spacing: 0.04em; font-size: 13px; color: #fff; }
.brand-sub { color: #8b9dbb; font-size: 11px; }
.side-cta { border-bottom-color: rgba(255, 255, 255, 0.07); padding-bottom: 16px; }
.side-cta a { border-radius: 13px; padding: 11px 6px; color: #071d3f; background: linear-gradient(135deg, #f2d98f 0%, #c9a24a 100%); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 8px 20px rgba(201, 162, 74, 0.25); transition: transform 0.15s, filter 0.15s; }
.side-cta a.alt { background: rgba(255, 255, 255, 0.06); color: #fff; border: 1px solid rgba(255, 255, 255, 0.12); box-shadow: none; }
.side-cta a:hover { transform: translateY(-1px); filter: brightness(1.05); }
.nav { gap: 1px; }
.nav-label { font-size: 10px; letter-spacing: 0.18em; color: #6c80a1; padding: 16px 10px 6px; }
.nav a { border-radius: 10px; padding: 8px 10px; font-size: 13.3px; color: #c4cede; transition: background 0.15s, color 0.15s; }
.nav a .ico { opacity: 0.8; transition: color 0.15s, opacity 0.15s; }
.nav a:hover { background: rgba(255, 255, 255, 0.055); color: #fff; }
.nav a.active { background: linear-gradient(90deg, rgba(229, 197, 107, 0.2), rgba(229, 197, 107, 0.04)); color: #fff; box-shadow: inset 0 0 0 1px rgba(229, 197, 107, 0.2); }
.nav a.active .ico { color: var(--gold-light); opacity: 1; }
.nav a.active::before { background: var(--gold-light); box-shadow: 0 0 14px rgba(229, 197, 107, 0.85); }
.nav .count { background: linear-gradient(135deg, #b0304a, #8a2236); box-shadow: 0 0 0 2px rgba(4, 21, 47, 0.9); }
.sidebar-foot { border-top-color: rgba(255, 255, 255, 0.07); }
.user-card { border-radius: 12px; }
.avatar { background: linear-gradient(135deg, #2a62ad, #0b2a55); box-shadow: 0 0 0 2px rgba(229, 197, 107, 0.55); }

@media (min-width: 961px) {
  .topbar { background: rgba(243, 242, 238, 0.72); backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px); border-bottom: 1px solid var(--glass-border); }
  :root[data-theme="dark"] .topbar { background: rgba(7, 12, 23, 0.72); }
}
@media (max-width: 960px) {
  .topbar { background: linear-gradient(135deg, #04193a, #0b2a55); }
}
.appbar-search { height: 42px; border-radius: 13px; border-color: var(--border); background: var(--panel); box-shadow: var(--shadow-sm); transition: border-color 0.15s, box-shadow 0.15s; }
.appbar-search:hover { border-color: var(--border-2); box-shadow: 0 0 0 4px var(--ring); }

.page-head { margin-bottom: 22px; }
.page-head h1 { font-size: 30px; line-height: 1.15; }
.page-head .sub { font-size: 14px; }

/* ───────── Pulpit ───────── */
.welcome { position: relative; overflow: hidden; border-radius: 22px; padding: 26px 28px; background: var(--mesh); box-shadow: 0 18px 50px rgba(4, 25, 58, 0.25); border: 1px solid rgba(255, 255, 255, 0.06); }
.welcome::before { content: ''; position: absolute; inset: 0; background-image: var(--grid-lines); background-size: 32px 32px; mask-image: linear-gradient(90deg, transparent, #000 40%, #000 70%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 40%, #000 70%, transparent); pointer-events: none; }
.welcome > * { position: relative; }
.welcome h1 { color: #fff; font-size: 30px; font-weight: 800; letter-spacing: -0.03em; }
.welcome .sub { color: #c7d3e8; }
.welcome .logo { filter: drop-shadow(0 8px 24px rgba(229, 197, 107, 0.35)); }
.welcome .btn.ghost { color: #fff; border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.06); backdrop-filter: blur(8px); }
.welcome .btn.ghost:hover { background: rgba(255, 255, 255, 0.14); }

.quick { gap: 14px; }
.quick a { position: relative; overflow: hidden; border-radius: 18px; padding: 18px; gap: 10px; transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s; }
.quick a::after { content: ''; position: absolute; inset: auto -30% -60% auto; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, var(--gold-soft), transparent 70%); opacity: 0; transition: opacity 0.2s; }
.quick a:hover { transform: translateY(-3px); border-color: rgba(201, 162, 74, 0.55); box-shadow: 0 14px 34px rgba(14, 26, 47, 0.12); }
.quick a:hover::after { opacity: 1; }
.quick .qi { width: 44px; height: 44px; border-radius: 13px; background: linear-gradient(135deg, #16407c, #04193a); color: var(--gold-light); box-shadow: 0 6px 16px rgba(11, 42, 85, 0.28); }
.quick a.gold .qi { background: linear-gradient(135deg, #f2d98f, #c9a24a); color: #071d3f; box-shadow: 0 6px 16px rgba(201, 162, 74, 0.35); }
.quick a.burgundy .qi { background: linear-gradient(135deg, #b0304a, #6b1929); color: #fbe3e8; box-shadow: 0 6px 16px rgba(107, 25, 41, 0.3); }
.quick b { font-family: var(--font-heading); font-size: 15px; font-weight: 700; }

/* ───────── Strona publiczna: nagłówek ───────── */
.public { background: var(--bg); }
.civic-bar { background: #04193a; color: #b9c6dc; font-size: 10px; letter-spacing: 0.16em; font-weight: 600; }
.civic-bar .inner { max-width: 1280px; margin: 0 auto; padding: 8px 32px; display: flex; justify-content: space-between; gap: 16px; }
.civic-divider { margin: 0 12px; color: var(--gold); }
.public-header { position: sticky; top: 0; z-index: 30; background: rgba(243, 242, 238, 0.78); backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px); border-bottom: 1px solid var(--glass-border); box-shadow: none; }
:root[data-theme="dark"] .public-header { background: rgba(7, 12, 23, 0.78); }
.public-header .inner { max-width: 1280px; padding: 14px 32px; gap: 24px; flex-wrap: nowrap; }
.civic-brand { display: flex; align-items: center; gap: 12px; color: var(--text); flex-shrink: 0; }
.civic-brand:hover { text-decoration: none; }
.civic-brand strong { display: block; font: 800 17px/1.15 var(--font-heading); letter-spacing: -0.02em; color: var(--text); }
.civic-brand small { display: block; color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: 0.2em; margin-top: 4px; }
.public-nav { margin-left: auto; gap: 4px; flex-wrap: nowrap; align-items: center; }
.public-nav > a, .nav-more summary { color: var(--text-2); font-size: 13.5px; font-weight: 600; padding: 8px 13px; border-radius: 10px; white-space: nowrap; transition: background 0.15s, color 0.15s; }
.public-nav > a:hover, .nav-more summary:hover { background: var(--navy-soft); color: var(--text); text-decoration: none; }
.public-nav > a.active { background: var(--panel); color: var(--text); box-shadow: 0 1px 2px rgba(14, 26, 47, 0.08), 0 0 0 1px var(--border); }
.header-actions { display: flex; gap: 8px; align-items: center; }
.header-actions .theme-btn { color: var(--text-2); border: 0; background: transparent; box-shadow: none; }
.header-actions .theme-btn:hover { background: var(--navy-soft); }
.employee-link { height: 40px; border-radius: 12px; font-size: 13px; background: linear-gradient(180deg, #16407c, #0b2a55); border-color: #0b2a55; color: #fff; box-shadow: 0 6px 16px rgba(11, 42, 85, 0.22); }
.employee-link:hover { background: linear-gradient(180deg, #1d4f91, #12386d); color: #fff; }
:root[data-theme="dark"] .employee-link { background: linear-gradient(135deg, #f2d98f, #c9a24a); color: #071a36; border-color: #c9a24a; }
.employee-link .ico { width: 15px; height: 15px; }
.public-menu { display: none; }
.nav-more { position: relative; }
.nav-more summary { display: flex; align-items: center; gap: 4px; cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
.nav-more summary > .ico { width: 13px; height: 13px; transform: rotate(90deg); transition: transform 0.2s; }
.nav-more[open] summary > .ico { transform: rotate(-90deg); }
.nav-more-panel { position: absolute; z-index: 50; top: calc(100% + 10px); right: 0; width: 260px; padding: 8px; border: 1px solid var(--border); background: var(--panel); box-shadow: var(--shadow-lg); border-radius: 16px; animation: pop 0.16s ease; }
.public-nav .nav-more-panel a { display: flex; align-items: center; gap: 11px; color: var(--text-2); font-size: 13.5px; font-weight: 500; padding: 10px 11px; border-radius: 10px; }
.public-nav .nav-more-panel a:hover, .public-nav .nav-more-panel a.active { background: var(--hover); color: var(--text); text-decoration: none; }
.nav-more-panel .ico { width: 17px; height: 17px; color: var(--gold); }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 100; background: var(--panel); color: var(--text); padding: 12px 18px; border: 2px solid var(--gold); border-radius: 10px; }
.skip-link:focus { top: 12px; }
.public-main { max-width: 1280px; padding: 28px 32px 72px; }

/* ───────── Strona główna ───────── */
.civic-hero {
  position: relative; overflow: hidden; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; align-items: center;
  padding: 64px 56px 96px; border-radius: 30px; color: #fff; background: var(--mesh); box-shadow: 0 30px 80px rgba(4, 25, 58, 0.28);
}
.civic-hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background-image: var(--grid-lines); background-size: 44px 44px; mask-image: radial-gradient(ellipse at 70% 40%, #000 0%, transparent 70%); -webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 0%, transparent 70%); }
.civic-hero::after { content: ''; position: absolute; z-index: -1; right: -120px; top: -160px; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(229, 197, 107, 0.25), transparent 65%); filter: blur(10px); }
.hero-pill { display: inline-flex; align-items: center; gap: 9px; padding: 7px 14px 7px 11px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.14); color: #dbe4f3; font-size: 12.5px; font-weight: 600; backdrop-filter: blur(8px); }
.hero-pill .sep { color: var(--gold-light); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #5ee0a0; box-shadow: 0 0 0 0 rgba(94, 224, 160, 0.6); animation: pulse 2.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(94, 224, 160, 0.55); } 70% { box-shadow: 0 0 0 10px rgba(94, 224, 160, 0); } 100% { box-shadow: 0 0 0 0 rgba(94, 224, 160, 0); } }
.hero-copy h1 { color: #fff; font: 800 clamp(40px, 5.4vw, 72px)/1.02 var(--font-heading); letter-spacing: -0.045em; margin: 22px 0 0; }
.hero-state { display: block; margin-top: 10px; font: italic 400 0.62em/1.1 var(--font-accent); letter-spacing: -0.01em; background: linear-gradient(90deg, #f5dc95, #c9a24a 60%, #f2d98f); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-description { color: #c3cfe3; font-size: 16.5px; line-height: 1.7; max-width: 470px; margin: 22px 0 28px; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.hero-actions .btn.primary { background: linear-gradient(135deg, #f2d98f 0%, #c9a24a 100%); border-color: #d9b55e; color: #071d3f; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 12px 30px rgba(201, 162, 74, 0.35); }
.hero-actions .btn.primary:hover { background: linear-gradient(135deg, #f7e4ab 0%, #d4ae58 100%); }
.hero-actions .ico { width: 17px; height: 17px; }
.hero-note { display: flex; gap: 8px; align-items: center; color: #9fb0cc; font-size: 12.5px; margin-top: 22px; }
.hero-note .ico { width: 15px; height: 15px; color: #5ee0a0; }

.hero-visual { position: relative; min-height: 420px; display: grid; place-items: center; }
.seal-stage { position: relative; width: 340px; height: 340px; display: grid; place-items: center; }
.seal-stage .logo, .seal-stage img { position: relative; z-index: 2; width: 230px; height: 230px; filter: drop-shadow(0 20px 50px rgba(0, 0, 0, 0.45)); animation: float 7s ease-in-out infinite; }
.seal-glow { position: absolute; inset: 40px; border-radius: 50%; background: radial-gradient(circle, rgba(229, 197, 107, 0.45), transparent 65%); filter: blur(24px); }
.ring { position: absolute; border-radius: 50%; border: 1px solid rgba(229, 197, 107, 0.28); }
.ring.r1 { inset: 0; border-style: dashed; animation: spin 60s linear infinite; }
.ring.r2 { inset: -44px; border-color: rgba(255, 255, 255, 0.09); }
.ring.r3 { inset: 18px; background: conic-gradient(from 0deg, transparent 0 70%, rgba(229, 197, 107, 0.55) 85%, transparent 100%); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1px)); mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1px)); border: 0; animation: spin 9s linear infinite; }
.float-chip { position: absolute; z-index: 3; display: flex; align-items: center; gap: 11px; padding: 11px 15px 11px 11px; border-radius: 16px; background: rgba(12, 28, 58, 0.55); border: 1px solid rgba(255, 255, 255, 0.14); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3); color: #fff; }
.float-chip b { display: block; font: 700 13.5px/1.2 var(--font-heading); }
.float-chip div > span { display: block; font-size: 11.5px; color: #a9b8d2; margin-top: 2px; }
.float-chip .fi { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, #f2d98f, #c9a24a); color: #071d3f; flex: none; }
.float-chip .fi .ico { width: 17px; height: 17px; }
.float-chip.c1 { left: -6px; top: 30px; }
.float-chip.c2 { right: -10px; top: 46%; }
.float-chip.c3 { left: 18px; bottom: 18px; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.verification-strip { position: relative; z-index: 2; margin: -52px 40px 0; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 26px; border-radius: 22px; background: var(--glass); border: 1px solid var(--glass-border); backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px); box-shadow: 0 20px 50px rgba(14, 26, 47, 0.14); }
.verification-intro { display: flex; gap: 15px; align-items: center; }
.verification-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg, #16407c, #04193a); color: var(--gold-light); box-shadow: 0 8px 20px rgba(11, 42, 85, 0.3); flex: none; }
.verification-icon .ico { width: 24px; height: 24px; }
.verification-intro h2 { font-size: 17px; font-weight: 800; }
.verification-intro p { font-size: 13px; color: var(--muted); margin: 4px 0 0; }
.verification-form { display: flex; gap: 8px; flex: 0 1 420px; }
.verification-form .input.code { min-width: 0; height: 50px; min-height: 50px; font-size: 16px; letter-spacing: 0.18em; text-align: left; border-radius: 14px; background: var(--field); }
.verification-form .btn { height: 50px; border-radius: 14px; padding: 0 20px; }
.verification-form .ico { width: 16px; height: 16px; }

.civic-section { margin-top: 72px; }
.section-heading { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 26px; }
.section-number { font: 800 12px/1 var(--font-heading); color: var(--gold-2); padding: 7px 10px; border-radius: 999px; background: var(--gold-soft); margin-top: 6px; letter-spacing: 0.06em; }
.section-heading h2 { font-size: clamp(26px, 3vw, 36px); font-weight: 800; letter-spacing: -0.035em; }
.section-heading p { font-size: 14.5px; color: var(--muted); margin: 6px 0 0; }

.citizen-services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.citizen-service { position: relative; overflow: hidden; display: flex; flex-direction: column; padding: 26px; border-radius: 22px; background: var(--panel); border: 1px solid var(--border); color: var(--text); box-shadow: var(--shadow-sm); transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; }
.citizen-service::before { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: linear-gradient(135deg, rgba(229, 197, 107, 0.9), transparent 40%, transparent 60%, rgba(29, 79, 145, 0.7)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity 0.2s; pointer-events: none; }
.citizen-service:hover { transform: translateY(-4px); box-shadow: 0 22px 50px rgba(14, 26, 47, 0.13); text-decoration: none; }
.citizen-service:hover::before { opacity: 1; }
.service-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; }
.service-top > .ico { width: 50px; height: 50px; padding: 13px; border-radius: 15px; background: linear-gradient(135deg, #16407c, #04193a); color: var(--gold-light); box-shadow: 0 10px 22px rgba(11, 42, 85, 0.28); }
.citizen-service:nth-child(2) .service-top > .ico { background: linear-gradient(135deg, #f2d98f, #c9a24a); color: #071d3f; box-shadow: 0 10px 22px rgba(201, 162, 74, 0.3); }
.citizen-service:nth-child(3) .service-top > .ico { background: linear-gradient(135deg, #b0304a, #6b1929); color: #fbe3e8; box-shadow: 0 10px 22px rgba(107, 25, 41, 0.28); }
.service-top > span { font: 800 40px/1 var(--font-heading); letter-spacing: -0.04em; color: var(--panel-3); }
.citizen-service h3 { font-size: 19px; font-weight: 800; margin-bottom: 8px; }
.citizen-service p { font-size: 14px; color: var(--muted); line-height: 1.65; margin-bottom: 22px; }
.service-action { margin-top: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; color: var(--link); }
.service-action .ico { width: 16px; height: 16px; transition: transform 0.2s; }
.citizen-service:hover .service-action .ico { transform: translateX(4px); }

.knowledge-band { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 48px; margin-top: 72px; padding: 44px; border-radius: 28px; background: var(--panel); border: 1px solid var(--border); }
.knowledge-band::before { content: ''; position: absolute; left: -120px; bottom: -160px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, var(--gold-soft), transparent 70%); pointer-events: none; }
.knowledge-intro { position: relative; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.2em; color: var(--gold-2); display: flex; gap: 10px; align-items: center; text-transform: uppercase; }
.knowledge-intro h2 { font-size: clamp(30px, 3.4vw, 42px); font-weight: 800; letter-spacing: -0.04em; line-height: 1.08; margin: 14px 0; }
.knowledge-intro p { font-size: 15px; color: var(--muted); line-height: 1.7; max-width: 380px; margin-bottom: 22px; }
.text-link { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; font-weight: 700; color: var(--link); }
.text-link .ico { width: 16px; height: 16px; transition: transform 0.2s; }
.text-link:hover { text-decoration: none; }
.text-link:hover .ico { transform: translateX(4px); }
.knowledge-links, .information-links { display: grid; gap: 10px; align-content: start; }
.resource-link { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 16px; background: var(--panel-2); border: 1px solid var(--border); color: var(--text); transition: transform 0.15s, border-color 0.15s, background 0.15s; }
.resource-link:hover { text-decoration: none; transform: translateX(4px); border-color: rgba(201, 162, 74, 0.55); background: var(--panel); }
.resource-link > .ico:first-child { width: 40px; height: 40px; padding: 10px; border-radius: 12px; background: var(--gold-soft); color: var(--gold-2); flex: none; }
.resource-link > .ico:last-child { margin-left: auto; width: 16px; height: 16px; color: var(--muted); }
.resource-link h3 { font-size: 15px; font-weight: 700; }
.resource-link p { margin: 3px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }

.information-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.news-panel { padding: 24px; border-radius: 22px; background: var(--panel); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.news-panel .card-head h3 { font-size: 17px; font-weight: 800; }
.board-content .alert { margin-bottom: 12px; text-decoration: none; }
.board-empty { display: flex; align-items: flex-start; gap: 16px; padding: 18px 0; }
.board-empty > .ico { width: 44px; height: 44px; padding: 11px; border-radius: 13px; background: var(--gold-soft); color: var(--gold-2); flex: none; }
.board-empty h3 { font-size: 18px; margin-bottom: 6px; }
.board-empty p { color: var(--muted); font-size: 14px; line-height: 1.6; }

.practical-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 16px; }
.practical-panel { border-radius: 20px; background: var(--panel); border: 1px solid var(--border); overflow: hidden; }
.practical-panel summary { display: flex; align-items: center; gap: 12px; list-style: none; padding: 20px 22px; cursor: pointer; font: 700 15.5px var(--font-heading); }
.practical-panel summary > .ico:first-child { width: 38px; height: 38px; padding: 9px; border-radius: 11px; background: var(--navy-soft); color: var(--accent-ink); }
.practical-panel summary > .ico:last-child { margin-left: auto; width: 18px; height: 18px; color: var(--muted); transition: transform 0.2s; }
.practical-panel[open] summary > .ico:last-child { transform: rotate(45deg); }
.practical-panel[open] summary { border-bottom: 1px solid var(--border); }
.practical-content { padding: 14px 22px 22px; }
.practical-content .fee-table td { white-space: normal; }

.civic-stats { display: grid; grid-template-columns: 1fr 1fr 1.6fr; gap: 16px; margin-top: 72px; }
.civic-stats:empty { display: none; }
.civic-stats > div { display: flex; flex-direction: column; gap: 6px; padding: 22px 24px; border-radius: 20px; background: var(--panel); border: 1px solid var(--border); }
.civic-stats > div > strong { font: 800 44px/1 var(--font-heading); letter-spacing: -0.05em; background: linear-gradient(135deg, var(--accent-ink), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.civic-stats span { color: var(--muted); font-size: 13.5px; }
.signature-stat { flex-direction: row !important; align-items: center; gap: 16px !important; background: var(--mesh) !important; border: 0 !important; color: #fff; }
.signature-stat > .ico { width: 46px; height: 46px; padding: 11px; border-radius: 14px; background: rgba(255, 255, 255, 0.1); color: #5ee0a0; flex: none; }
.signature-stat > div { display: flex; flex-direction: column; gap: 4px; }
.signature-stat strong { font: 700 15px var(--font-heading); color: #fff; }
.signature-stat div > span { color: #b6c3da !important; }

.public-footer { margin-top: 24px; background: #04193a; color: #a9b8d0; border-top: 1px solid rgba(229, 197, 107, 0.35); }
.public-footer .inner { max-width: 1280px; padding: 30px 32px; align-items: center; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand strong { font: 800 17px var(--font-heading); color: #fff; }
.footer-brand p { font-size: 12px; margin: 3px 0 0; color: #8fa1c0; }
.footer-links { display: flex; gap: 22px; font-size: 13.5px; font-weight: 600; }
.public-footer a { color: #d8e1f0; }
.public-footer a:hover { color: var(--gold-light); text-decoration: none; }
.public-footer .footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.08); padding-top: 16px; padding-bottom: 18px; font-size: 12px; color: #8597b6; }

/* Lekkie pojawienie się górnej części strony po załadowaniu. */
.hero-copy, .hero-visual { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.hero-visual { animation-delay: 0.1s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ───────── Logowanie ───────── */
.login-wrap { position: relative; overflow: hidden; isolation: isolate; background: var(--mesh); border-top: 0; }
.login-wrap::before { content: ''; position: absolute; inset: 0; z-index: -1; background-image: var(--grid-lines); background-size: 44px 44px; mask-image: radial-gradient(ellipse at 50% 40%, #000, transparent 70%); -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000, transparent 70%); }
.login-card { width: min(440px, 100%); }
.login-card .seal-head { margin-bottom: 22px; text-align: center; }
.login-card .seal-head img, .login-card .seal-head .logo { display: block; margin: 0 auto; filter: drop-shadow(0 10px 30px rgba(229, 197, 107, 0.35)); }
.seal-head .eyebrow { justify-content: center; margin-top: 18px; color: var(--gold-light); }
.login-card .seal-head h1 { font: 800 34px/1.1 var(--font-heading); letter-spacing: -0.035em; color: #fff; margin: 10px 0 6px; }
.login-card .seal-head p, .login-card .seal-head .muted { color: #b3c1d8; font-size: 14px; }
.login-card .card { padding: 28px; border-radius: 22px; background: var(--glass); border: 1px solid rgba(255, 255, 255, 0.18); backdrop-filter: saturate(160%) blur(20px); -webkit-backdrop-filter: saturate(160%) blur(20px); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35); }
.login-card > p a, .login-card > p a.muted { color: #c3cfe3; }

/* Logowanie awaryjne administratora (gdy działa Discord) */
.login-emergency { border-top: 1px solid var(--border); padding-top: 12px; }
.login-emergency summary { cursor: pointer; color: var(--muted); text-align: center; list-style: none; }
.login-emergency summary:hover { color: var(--text); }
.login-card .login-emergency .card { border: 0; padding: 14px 0 0; background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }

/* ───────── Responsywność ───────── */
@media (max-width: 1120px) {
  .public-header .inner { flex-wrap: wrap; gap: 12px; padding-bottom: 10px; }
  .header-actions { margin-left: auto; }
  .public-nav { order: 3; width: 100%; overflow-x: auto; padding-bottom: 2px; }
  .nav-more-panel { left: 0; right: auto; }
  .civic-hero { padding: 52px 40px 90px; gap: 24px; }
  .seal-stage { width: 290px; height: 290px; }
  .seal-stage .logo, .seal-stage img { width: 190px; height: 190px; }
  .verification-strip { flex-wrap: wrap; margin-left: 24px; margin-right: 24px; }
  .verification-form { flex: 1 1 320px; max-width: none; }
}
@media (max-width: 860px) {
  .civic-hero { grid-template-columns: 1fr; padding: 44px 28px 84px; }
  .hero-visual { min-height: 340px; }
  .knowledge-band { grid-template-columns: 1fr; padding: 30px; gap: 26px; }
  .information-grid, .practical-grid { grid-template-columns: 1fr; }
  .citizen-services { grid-template-columns: 1fr; }
  .civic-stats { grid-template-columns: 1fr 1fr; }
  .civic-stats .signature-stat { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .civic-bar .inner { padding: 7px 16px; font-size: 9px; letter-spacing: 0.1em; }
  .civic-divider { margin: 0 7px; }
  .public-header .inner { padding: 12px 16px; gap: 8px; flex-wrap: nowrap; }
  .civic-brand { gap: 9px; min-width: 0; }
  .civic-brand img { width: 40px; height: 40px; }
  .civic-brand strong { font-size: 15px; }
  .civic-brand small { font-size: 8.5px; letter-spacing: 0.14em; }
  .header-actions { gap: 4px; }
  .employee-link { width: 40px; padding: 0; font-size: 0; }
  .employee-link span:not(.ico) { display: none; }
  .employee-link .ico { width: 17px; height: 17px; }
  .public-menu { display: inline-flex; color: var(--text); }
  .public-nav { display: none; position: absolute; left: 12px; right: 12px; top: calc(100% + 6px); flex-direction: column; align-items: stretch; gap: 2px; padding: 8px; border-radius: 18px; background: var(--panel); border: 1px solid var(--border); box-shadow: var(--shadow-lg); width: auto; }
  .public-nav.is-open { display: flex; }
  .public-nav > a, .nav-more summary { padding: 12px 14px; font-size: 15px; }
  .nav-more-panel { position: static; width: 100%; box-shadow: none; border: 0; padding: 0 0 0 8px; animation: none; }
  .public-main { padding: 16px 12px 48px; }
  .civic-hero { padding: 36px 22px 78px; border-radius: 24px; }
  .hero-copy h1 { font-size: clamp(36px, 10.5vw, 48px); }
  .hero-description { font-size: 15px; }
  .hero-actions .btn { flex: 1 1 auto; }
  .hero-visual { min-height: 300px; }
  .seal-stage { width: 220px; height: 220px; }
  .seal-stage .logo, .seal-stage img { width: 150px; height: 150px; }
  .ring.r2 { inset: -26px; }
  .float-chip { padding: 8px 11px 8px 8px; border-radius: 13px; }
  .float-chip .fi { width: 28px; height: 28px; border-radius: 8px; }
  .float-chip b { font-size: 12px; }
  .float-chip div > span { display: none; }
  .float-chip.c1 { left: 0; top: 8px; }
  .float-chip.c2 { right: 0; }
  .float-chip.c3 { left: 6px; bottom: 4px; }
  .verification-strip { margin: -46px 10px 0; padding: 18px; border-radius: 20px; }
  .verification-form { flex-basis: 100%; }
  .civic-section, .knowledge-band, .civic-stats { margin-top: 48px; }
  .section-heading { gap: 10px; }
  .knowledge-band { padding: 24px 20px; border-radius: 22px; }
  .citizen-service { padding: 22px; }
  .civic-stats { grid-template-columns: 1fr; }
  .footer-links { flex-wrap: wrap; gap: 12px 18px; }
  .public-footer .inner { padding: 24px 16px; gap: 18px; }
  .public-footer .footer-bottom { padding: 14px 16px; gap: 6px; }
  .page-head h1 { font-size: 26px; }
  .welcome { padding: 22px 20px; border-radius: 20px; }
  .welcome h1 { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
@media print {
  .civic-bar, .skip-link { display: none !important; }
  .civic-hero, .welcome { box-shadow: none; }
}
