/* ==========================================================================
   Comarchivist: system wyglądu w barwach COMPACT
   Limonka COMPACT jako akcent, ciepłe szarości z logo, Inter + Montserrat.
   ========================================================================== */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/montserrat-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/montserrat-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+1E00-1E9F; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/montserrat-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/montserrat-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+1E00-1E9F; }

:root {
  /* Marka */
  --brand-50: #f7f9e8;
  --brand-100: #eef3d1;
  --brand-200: #dde7a3;
  --brand-400: #b5c94a;
  --brand-500: #a3b626;
  --brand-600: #8a9a1f;
  --brand-700: #6f7c1a;
  --brand-800: #576115;

  /* Neutralne, ciepłe szarości z logo */
  --ink-950: #191a17;
  --ink-900: #22231f;
  --ink-800: #2d2e2a;
  --ink-700: #3e3f3a;
  --ink-600: #55564f;
  --ink-500: #6d6e69;
  --ink-400: #9a9b94;
  --ink-300: #c4c5bf;
  --line: #e7e7e2;
  --line-strong: #d7d7d0;
  --canvas: #f6f6f3;
  --canvas-2: #efefea;
  --surface: #ffffff;

  /* Statusy */
  --ok: #2f7d47;      --ok-bg: #e9f5ec;      --ok-line: #bfe0c9;
  --warn: #9a5b00;    --warn-bg: #fdf3e0;    --warn-line: #f2d39c;
  --danger: #b42318;  --danger-bg: #fdecea;  --danger-line: #f5c2bd;
  --info: #1d5fa8;    --info-bg: #e8f1fb;    --info-line: #bcd5f2;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(25, 26, 23, .06);
  --shadow: 0 1px 2px rgba(25, 26, 23, .05), 0 4px 16px rgba(25, 26, 23, .06);
  --shadow-lg: 0 12px 40px rgba(25, 26, 23, .18);
  --focus: 0 0 0 3px rgba(163, 182, 38, .35);

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Montserrat", var(--font-sans);
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --sidebar-w: 252px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-900);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}
h1, h2, h3, h4 { margin: 0; color: var(--ink-950); line-height: 1.25; }
h1 { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -.01em; }
h2 { font-size: 15px; font-weight: 600; }
h3 { font-size: 14px; font-weight: 600; }
p { margin: 0 0 .75rem; }
a { color: var(--brand-700); text-decoration: none; }
a:hover { color: var(--brand-800); text-decoration: underline; }
code, kbd, .mono { font-family: var(--font-mono); font-size: 12.5px; }
h1:focus { outline: none; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--radius-sm); }
svg.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
svg.icon.sm { width: 15px; height: 15px; }
svg.icon.lg { width: 22px; height: 22px; }

/* --- Narzędzia --- */
.muted { color: var(--ink-500); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.right { text-align: right; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ==========================================================================
   Układ aplikacji
   ========================================================================== */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  background: var(--ink-900);
  color: #d9dad4;
  border-right: 1px solid var(--ink-950);
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 16px; color: #fff; text-decoration: none; }
.sidebar-brand:hover { color: #fff; text-decoration: none; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 16px; letter-spacing: .01em; line-height: 1.1; }
.brand-sub { display: block; font-family: var(--font-sans); font-weight: 500; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-400); margin-top: 2px; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 8px 10px 16px; }
.nav-section { margin-top: 18px; }
.nav-section-title { padding: 0 10px 6px; font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-400); }
.nav-link {
  position: relative; display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; margin: 1px 0; border-radius: var(--radius-sm);
  color: #d9dad4; font-weight: 500; text-decoration: none;
}
.nav-link:hover { background: rgba(255, 255, 255, .06); color: #fff; text-decoration: none; }
.nav-link.active { background: rgba(163, 182, 38, .14); color: #fff; }
.nav-link.active::before { content: ""; position: absolute; left: -10px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand-500); }
.nav-link.active svg.icon { color: var(--brand-400); }
.nav-badge { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 600; text-align: center; }

.sidebar-user { border-top: 1px solid rgba(255, 255, 255, .08); padding: 12px 10px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: var(--radius-sm); color: #fff; text-decoration: none; }
.user-chip:hover { background: rgba(255, 255, 255, .06); color: #fff; text-decoration: none; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-600); color: #fff; font-weight: 600; font-size: 12px; flex: none; }
.user-meta { min-width: 0; line-height: 1.25; }
.user-name { font-weight: 600; font-size: 13px; }
.user-role { font-size: 11.5px; color: var(--ink-400); }
.logout-btn { width: 100%; margin-top: 4px; display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: none; border: 0; border-radius: var(--radius-sm); color: var(--ink-400); font: inherit; cursor: pointer; text-align: left; }
.logout-btn:hover { background: rgba(255, 255, 255, .06); color: #fff; }

.main { min-width: 0; display: flex; flex-direction: column; }
.mobile-bar, .nav-toggle, .nav-scrim { display: none; }
.content { width: 100%; max-width: 1320px; margin: 0 auto; padding: 24px 32px 48px; }

/* --- Nagłówek strony --- */
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.breadcrumbs { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; font-size: 12.5px; color: var(--ink-500); }
.breadcrumbs a { color: var(--ink-500); }
.breadcrumbs a:hover { color: var(--ink-900); }
.breadcrumbs svg.icon { width: 13px; height: 13px; color: var(--ink-300); }
.page-subtitle { margin-top: 4px; color: var(--ink-500); }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ==========================================================================
   Komponenty
   ========================================================================== */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card-header .hint { color: var(--ink-500); font-size: 12.5px; font-weight: 400; }
.card-body { padding: 18px; }
.card-footer { padding: 12px 18px; border-top: 1px solid var(--line); background: #fbfbf9; border-radius: 0 0 var(--radius) var(--radius); }

/* --- Przyciski --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  font: inherit; font-weight: 600; font-size: 13.5px; line-height: 1;
  cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background-color .12s, border-color .12s, color .12s;
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--brand-700); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--brand-800); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--ink-800); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.btn-secondary:hover:not(:disabled) { background: var(--canvas); color: var(--ink-950); }
.btn-ghost { background: transparent; color: var(--ink-600); }
.btn-ghost:hover:not(:disabled) { background: var(--canvas-2); color: var(--ink-900); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #8f1c13; color: #fff; }
.btn-danger-soft { background: var(--surface); color: var(--danger); border-color: var(--danger-line); }
.btn-danger-soft:hover:not(:disabled) { background: var(--danger-bg); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn-block { width: 100%; height: 42px; font-size: 14px; }
.btn-icon { width: 32px; padding: 0; }
.btn-link { background: none; border: 0; padding: 0; height: auto; color: var(--brand-700); font-weight: 500; }
.btn-link:hover { color: var(--brand-800); text-decoration: underline; }

/* --- Formularze --- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field + .field { margin-top: 14px; }
.label { font-size: 13px; font-weight: 600; color: var(--ink-800); }
.hint { font-size: 12.5px; color: var(--ink-500); }
.input, .select, textarea.input {
  width: 100%; height: 38px; padding: 0 12px;
  font: inherit; color: var(--ink-950);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  transition: border-color .12s, box-shadow .12s;
}
.input::placeholder { color: var(--ink-400); }
.input:hover, .select:hover { border-color: var(--ink-300); }
.input:focus, .select:focus { outline: none; border-color: var(--brand-600); box-shadow: var(--focus); }
.input.code { font-family: var(--font-mono); font-size: 20px; letter-spacing: .3em; text-align: center; height: 48px; }
.input.invalid, .input.modified.invalid { border-color: var(--danger); }
.select { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236d6e69' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; }
.select-sm { height: 30px; font-size: 12.5px; padding-left: 8px; }
.validation-message { color: var(--danger); font-size: 12.5px; }
.validation-errors { margin: 0 0 12px; padding-left: 18px; color: var(--danger); }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; align-items: end; }

/* --- Komunikaty --- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid; font-size: 13.5px; }
.alert svg.icon { margin-top: 1px; }
.alert-title { font-weight: 600; }
.alert-ok { background: var(--ok-bg); border-color: var(--ok-line); color: #1f5a32; }
.alert-warn { background: var(--warn-bg); border-color: var(--warn-line); color: #6e4100; }
.alert-danger { background: var(--danger-bg); border-color: var(--danger-line); color: #8f1c13; }
.alert-info { background: var(--info-bg); border-color: var(--info-line); color: #164a85; }
.alert-brand { background: var(--brand-50); border-color: var(--brand-200); color: var(--brand-800); }

/* --- Statusy --- */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 11px; font-size: 12px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.no-dot::before { display: none; }
.pill-ok { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.pill-warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.pill-danger { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-line); }
.pill-info { background: var(--info-bg); color: var(--info); border-color: var(--info-line); }
.pill-muted { background: var(--canvas-2); color: var(--ink-600); border-color: var(--line); }
.pill-brand { background: var(--brand-50); color: var(--brand-800); border-color: var(--brand-200); }
.pill-running::before { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 4px; background: var(--canvas-2); color: var(--ink-700); font-size: 11.5px; font-weight: 600; }

/* --- Tabele --- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table th {
  position: sticky; top: 0; z-index: 1;
  padding: 10px 16px; text-align: left; white-space: nowrap;
  font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-500);
  background: #fbfbf9; border-bottom: 1px solid var(--line);
}
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #fafaf7; }
.table tr.row-warn td { background: #fffaf0; }
.table tr.row-warn:hover td { background: #fff5e3; }
.table .primary-text { font-weight: 600; color: var(--ink-950); }
.table .secondary-text { font-size: 12.5px; color: var(--ink-500); }
.table .actions { text-align: right; white-space: nowrap; }
.table-compact td { padding: 8px 16px; }

/* --- Kafle statystyk --- */
.stat { padding: 16px 18px; }
.stat-top { display: flex; align-items: center; justify-content: space-between; color: var(--ink-500); font-size: 12.5px; font-weight: 500; }
.stat-icon { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--canvas); color: var(--ink-600); }
.stat-icon.brand { background: var(--brand-50); color: var(--brand-700); }
.stat-icon.ok { background: var(--ok-bg); color: var(--ok); }
.stat-icon.danger { background: var(--danger-bg); color: var(--danger); }
.stat-value { margin-top: 8px; font-family: var(--font-display); font-weight: 700; font-size: 28px; line-height: 1.1; color: var(--ink-950); }
.stat-foot { margin-top: 4px; font-size: 12.5px; color: var(--ink-500); }

/* --- Pusty stan --- */
.empty { padding: 40px 24px; text-align: center; color: var(--ink-500); }
.empty-icon { width: 48px; height: 48px; margin: 0 auto 12px; border-radius: 12px; display: grid; place-items: center; background: var(--canvas); color: var(--ink-400); }
.empty-title { font-weight: 600; color: var(--ink-800); margin-bottom: 4px; }

/* --- Lista definicji --- */
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; margin: 0; }
.dl dt { color: var(--ink-500); }
.dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* --- Pole do skopiowania (tokeny, hasła) --- */
.secret-box { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--ink-900); color: #eef0e6; border-radius: var(--radius-sm); font-family: var(--font-mono); font-size: 13px; overflow-wrap: anywhere; }
.secret-box .value { flex: 1; user-select: all; }

/* --- Dialog --- */
.dialog-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(25, 26, 23, .45); animation: fade .12s ease-out; }
.dialog { width: 100%; max-width: 460px; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); animation: rise .15s ease-out; }
.dialog-body { display: flex; gap: 14px; padding: 22px 22px 18px; }
.dialog-icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--warn-bg); color: var(--warn); }
.dialog-icon.danger { background: var(--danger-bg); color: var(--danger); }
.dialog-title { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.dialog-text { color: var(--ink-600); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; background: #fbfbf9; border-top: 1px solid var(--line); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

/* --- Powiadomienia --- */
.toast-host { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.toast { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; background: var(--ink-900); color: #f2f3ee; border-radius: var(--radius); box-shadow: var(--shadow-lg); animation: rise .15s ease-out; }
.toast.ok svg.icon { color: var(--brand-400); }
.toast.error svg.icon { color: #ff8a80; }
.toast-close { margin-left: auto; background: none; border: 0; color: var(--ink-400); cursor: pointer; padding: 0; }

/* --- Zakładki / filtry --- */
.segmented { display: inline-flex; padding: 3px; background: var(--canvas-2); border-radius: 8px; gap: 2px; }
.segmented button { height: 28px; padding: 0 12px; border: 0; border-radius: 6px; background: none; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink-600); cursor: pointer; }
.segmented button.active { background: var(--surface); color: var(--ink-950); box-shadow: var(--shadow-sm); }
.search { position: relative; }
.search svg.icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ink-400); pointer-events: none; }
.search .input { padding-left: 34px; }

/* --- Kroki (konfiguracja MFA) --- */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps > li { position: relative; padding: 0 0 22px 44px; counter-increment: step; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: -2px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-800); border: 1px solid var(--brand-200); font-weight: 700; font-size: 13px; }
.steps > li::after { content: ""; position: absolute; left: 13.5px; top: 30px; bottom: 4px; width: 1px; background: var(--line); }
.steps > li:last-child::after { display: none; }
.step-title { font-weight: 600; margin-bottom: 4px; }
.qr { display: inline-block; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.qr img { display: block; image-rendering: pixelated; }
.recovery-codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.recovery-code { padding: 8px 10px; background: var(--canvas); border: 1px solid var(--line); border-radius: var(--radius-sm); font-family: var(--font-mono); text-align: center; }

/* --- Podnawigacja konta --- */
.subnav { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.subnav a { padding: 10px 12px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--ink-600); font-weight: 500; white-space: nowrap; }
.subnav a:hover { color: var(--ink-950); text-decoration: none; }
.subnav a.active { color: var(--ink-950); border-bottom-color: var(--brand-600); }
.narrow { max-width: 640px; }

/* ==========================================================================
   Ekrany logowania
   ========================================================================== */
.auth { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; background: var(--surface); }
.auth-aside {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between;
  padding: 40px 48px; background: var(--ink-900); color: #e6e7e1;
}
.auth-aside .hex-bg { position: absolute; right: -80px; bottom: -60px; width: 520px; opacity: .14; color: var(--brand-500); }
.auth-aside .brand-name { font-size: 18px; color: #fff; }
.auth-claim { position: relative; max-width: 440px; }
.auth-claim h2 { font-family: var(--font-display); font-size: 30px; font-weight: 700; line-height: 1.2; color: #fff; margin-bottom: 14px; }
.auth-claim h2 em { font-style: normal; color: var(--brand-400); }
.auth-claim p { color: #b9bab3; font-size: 15px; }
.auth-points { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.auth-points li { display: flex; gap: 10px; align-items: center; color: #d6d7d0; }
.auth-points svg.icon { color: var(--brand-400); }
.auth-foot { position: relative; font-size: 12px; color: var(--ink-400); }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-panel { width: 100%; max-width: 380px; }
.auth-panel h1 { font-size: 24px; margin-bottom: 6px; }
.auth-panel .lead { color: var(--ink-500); margin-bottom: 24px; }
.auth-mobile-brand { display: none; }
.divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--ink-400); font-size: 12px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.passkey-btn { width: 100%; }

/* Błąd Blazora */
#blazor-error-ui { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 100; padding: 12px 20px; background: var(--danger-bg); color: #8f1c13; border-top: 1px solid var(--danger-line); }
#blazor-error-ui .dismiss { float: right; cursor: pointer; }
.blazor-error-boundary { padding: 16px; background: var(--danger-bg); color: #8f1c13; border-radius: var(--radius-sm); }
.blazor-error-boundary::after { content: "Wystąpił błąd komponentu."; }

/* ==========================================================================
   Wąskie ekrany
   ========================================================================== */
@media (max-width: 960px) {
  .auth { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-mobile-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
  .auth-mobile-brand .brand-name { color: var(--ink-950); }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 40; left: 0; width: var(--sidebar-w); transform: translateX(-100%); transition: transform .18s ease-out; }
  .nav-toggle:checked ~ .sidebar { transform: none; box-shadow: var(--shadow-lg); }
  .nav-toggle:checked ~ .nav-scrim { display: block; position: fixed; inset: 0; z-index: 39; background: rgba(25, 26, 23, .4); }
  .mobile-bar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 30; padding: 10px 16px; background: var(--ink-900); color: #fff; }
  .mobile-bar .brand-name { font-size: 15px; }
  .mobile-bar label { display: grid; place-items: center; color: #fff; padding: 4px; cursor: pointer; }
  .content { padding: 18px 16px 40px; }
  .table th, .table td { padding-left: 12px; padding-right: 12px; }
}

/* Wybór dni tygodnia w harmonogramie */
.day-toggle { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 32px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); font-size: 12.5px; font-weight: 600; color: var(--ink-600); cursor: pointer; user-select: none; }
.day-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.day-toggle.on { background: var(--brand-50); border-color: var(--brand-400); color: var(--brand-800); }
.day-toggle.off { opacity: .4; cursor: not-allowed; }
.day-toggle:focus-within { box-shadow: var(--focus); }
