/* Strażnik wykluczeń, panel w stylu Double Digital: menu prawie czarne, treść na białym tle, pomarańczowe akcenty marki (#FE3200). */
:root {
  --bg: #121315; --surface: #1a1b1e; --surface-2: #212226; --surface-3: #2a2b30; --line: #2c2d32; --line-2: #36373d;
  --text: #f5f5f6; --text-2: #d4d4d8; --muted: #9a9aa3; --side: #0c0c0d; --side-2: #26272b; --side-hover: #1c1d20;
  --accent: #fe3200; --accent-dark: #e02c00; --accent-soft: rgba(254, 50, 0, .14); --amber: #f5a524;
  --green: #34d399; --green-soft: rgba(52, 211, 153, .13); --yellow: #fbbf24; --yellow-soft: rgba(251, 191, 36, .13);
  --blue: #7aa7ff; --blue-soft: rgba(122, 167, 255, .13); --red-soft: rgba(255, 90, 60, .14);
  --radius: 16px; --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 10px 30px rgba(0, 0, 0, .25);
  --strong: #fff; --row-hover: rgba(255, 255, 255, .025); --hover-border: #4a4b52; --panel: #151619; --panel-stopka: rgba(21, 22, 25, .96);
  --green-t: #6ee7b7; --yellow-t: #fcd34d; --blue-t: #a9c4ff; --red-t: #ff9a80; --orange-t: #ff9470; --uwaga-t: #fde68a; --eyebrow: var(--amber);
}
/* treść, panel konta i okna na białym tle */
.main, .szuflada, .okno-tlo {
  --bg: #ffffff; --surface: #ffffff; --surface-2: #f5f5f7; --surface-3: #e9e9ed; --line: #e6e6ea; --line-2: #d6d6dc;
  --text: #1a1b1f; --text-2: #34353b; --muted: #6a6b73; --strong: #0b0b0d; --eyebrow: var(--accent);
  --row-hover: #f7f7f9; --hover-border: #b9b9c1; --panel: #ffffff; --panel-stopka: rgba(255, 255, 255, .96);
  --accent-soft: rgba(254, 50, 0, .08); --green-soft: rgba(16, 185, 129, .1); --yellow-soft: rgba(245, 158, 11, .12); --blue-soft: rgba(37, 99, 235, .08);
  --red-soft: rgba(254, 50, 0, .08); --yellow: #d97706;
  --green-t: #047857; --yellow-t: #b45309; --blue-t: #1d4ed8; --red-t: #c2410c; --orange-t: #d93000; --uwaga-t: #92400e;
  --shadow: 0 1px 2px rgba(16, 17, 20, .04), 0 6px 18px rgba(16, 17, 20, .05);
  color: var(--text);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: var(--bg); color: var(--text);
  -webkit-font-smoothing: antialiased; font-size: 14px; line-height: 1.5; display: flex; height: 100vh; height: 100dvh; overflow: hidden; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
svg.i { width: 18px; height: 18px; flex-shrink: 0; }
.ukryte { display: none !important; }

/* ── menu ── */
.sidebar { width: 258px; flex-shrink: 0; background: var(--side); height: 100%; display: flex; flex-direction: column;
  border-right: 1px solid #1b1c1f; overflow-y: auto; }
.brand { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; padding: 22px 20px 18px; border-bottom: 1px solid #1d1e21; }
.logo-dd { height: 34px; width: auto; display: block; }
.brand-nazwa { color: var(--muted); font-size: 11.5px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; }
.logo { width: 38px; height: 38px; border-radius: 11px; background: var(--accent); color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.logo svg { width: 20px; height: 20px; }
.brand b { display: block; color: #fff; font-weight: 700; font-size: 15.5px; line-height: 1.15; }
.brand small { display: block; color: var(--muted); font-size: 12px; font-weight: 500; }
.szukaj-menu { margin: 16px 14px 6px; position: relative; }
.szukaj-menu input { width: 100%; background: #1a1b1e; border: 1px solid #2a2b2f; color: #fff; border-radius: 9px; padding: 9px 44px 9px 36px; font: inherit; font-size: 14px; }
.szukaj-menu input::placeholder { color: #8c8c94; }
.szukaj-menu input:focus { outline: none; border-color: var(--accent); }
.szukaj-menu svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: #a8a8b0; }
.szukaj-menu kbd { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); font: 600 11px/1 inherit; color: #b5b5bc; background: #2a2b30; border-radius: 5px; padding: 4px 6px; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px 16px; flex: 1; }
.nav-grupa { margin: 14px 12px 6px; text-transform: uppercase; font-size: 11.5px; letter-spacing: .6px; color: #7d7d86; font-weight: 700; }
.sidebar nav a { display: flex; align-items: center; gap: 12px; color: #e9e9ec; text-decoration: none; font-size: 14px; font-weight: 500; padding: 9px 12px;
  border-radius: 9px; position: relative; }
.sidebar nav a svg { color: #fff; }
.sidebar nav a:hover { background: var(--side-hover); }
.sidebar nav a.active { background: var(--side-2); color: #fff; font-weight: 600; }
.sidebar nav a.active::before { content: ''; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.sidebar nav a.active svg { color: var(--accent); }
.sidebar nav a .licznik { margin-left: auto; background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 700; border-radius: 20px; padding: 1px 8px; }
.sidebar .footer { border-top: 1px solid #1d1e21; padding: 14px 16px; display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: #2a2b30; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.user-info { flex: 1; min-width: 0; }
.user-name { color: #fff; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { color: var(--muted); font-size: 12px; }
.btn-ikona { background: none; border: 0; color: #cfcfd4; padding: 7px; border-radius: 8px; display: grid; place-items: center; }
.btn-ikona:hover { background: var(--side-hover); color: var(--accent); }

/* ── treść ── */
.main { flex: 1; min-width: 0; height: 100%; overflow-y: auto; overscroll-behavior: contain; padding: 40px 56px 64px; background: var(--bg); }
.main-inner { max-width: 1400px; margin: 0 auto; }
.eyebrow { font-size: 12.5px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--eyebrow); margin-bottom: 6px; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 6px; }
.page-header h1 { font-size: 34px; font-weight: 700; letter-spacing: -.6px; line-height: 1.15; color: var(--strong); }
.podtytul { color: var(--muted); font-size: 15px; margin-bottom: 26px; }
.akcje { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi, .box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.kpi { padding: 18px 20px; position: relative; overflow: hidden; }
.kpi .l { font-size: 11.5px; font-weight: 700; letter-spacing: .5px; color: var(--muted); text-transform: uppercase; }
.kpi .v { font-size: 28px; font-weight: 700; letter-spacing: -.5px; margin-top: 6px; color: var(--strong); white-space: nowrap; }
.kpi .s { color: var(--muted); font-size: 13px; margin-top: 2px; }
.kpi.akcent { border-color: rgba(254, 50, 0, .45); background: linear-gradient(160deg, var(--accent-soft), var(--surface) 60%); }
.kpi.akcent .v { color: var(--strong); }
.box { padding: 22px 24px; margin-bottom: 20px; }
.box h2 { font-size: 16.5px; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--strong); }
.box h2 a, .link { color: var(--muted); font-weight: 500; font-size: 13.5px; text-decoration: none; background: none; border: 0; }
.box h2 a:hover, .link:hover { color: var(--accent); }
.grid2 { display: grid; grid-template-columns: 1.15fr .85fr; gap: 20px; }
.grid2 > .box { margin-bottom: 20px; }
.muted { color: var(--muted); }
.maly { font-size: 12.5px; }

/* paski „gdzie wytnie najwięcej” */
.paski { display: flex; flex-direction: column; gap: 4px; }
.pasek { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 14px; padding: 10px 12px; border-radius: 11px; cursor: pointer; border: 1px solid transparent; }
.pasek:hover { background: var(--surface-2); border-color: var(--line); }
.pasek .n { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pasek .w { color: var(--text-2); font-variant-numeric: tabular-nums; text-align: right; }
.pasek .tor { grid-column: 1 / -1; height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.pasek .tor i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--accent), #ff8a5c); }
.pasek .d { grid-column: 1 / -1; color: var(--muted); font-size: 12.5px; }

/* lista zdarzeń */
.zdarzenia { list-style: none; display: flex; flex-direction: column; }
.zdarzenia li { display: grid; grid-template-columns: 10px 1fr auto; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); align-items: start; }
.zdarzenia li:last-child { border-bottom: 0; }
.zdarzenia li::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-top: 6px; }
.zdarzenia li.cofniete::before { background: var(--muted); }
.zdarzenia .t { font-weight: 600; }
.zdarzenia .p { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 420px; }

/* tabele */
.table-wrap { overflow-x: auto; border-radius: 12px; }
table.tab { width: 100%; border-collapse: collapse; font-size: 14px; }
.tab th { text-align: left; color: var(--muted); font-size: 11.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; border-bottom: 1px solid var(--line);
  padding: 11px 10px; white-space: nowrap; background: var(--surface); position: sticky; top: 0; z-index: 1; }
.tab td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; color: var(--text-2); }
.tab td.l, .tab th.l { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tab tbody tr.klik { cursor: pointer; }
.tab tbody tr:hover { background: var(--row-hover); }
.tab td .glowna { color: var(--strong); font-weight: 600; }
.tab td .pod { color: var(--muted); font-size: 12.5px; }
.tab td.powod { min-width: 220px; max-width: 360px; font-size: 13px; color: var(--text-2); }
.tab input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); }
.tab .nazwa { min-width: 230px; max-width: 360px; }
.tab .etykiety { display: flex; gap: 6px; margin-top: 5px; flex-wrap: wrap; }
.tab .kampania { min-width: 110px; max-width: 170px; color: var(--muted); font-size: 12.5px; word-break: break-word; }
.tab .fraza { min-width: 150px; padding: 6px 9px; }
.tab.poz td.powod { min-width: 180px; max-width: 280px; }
.tab .nazwa a { color: var(--strong); text-decoration: none; font-weight: 600; word-break: break-word; }
.tab .nazwa a:hover { color: var(--accent); }

/* etykiety i przyciski */
.pill { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); color: var(--text-2); background: var(--surface-2); border-radius: 7px;
  font-weight: 600; font-size: 12px; padding: 3px 9px; white-space: nowrap; }
.pill.red { background: var(--red-soft); border-color: rgba(254, 50, 0, .3); color: var(--red-t); }
.pill.green { background: var(--green-soft); border-color: rgba(16, 185, 129, .3); color: var(--green-t); }
.pill.yellow { background: var(--yellow-soft); border-color: rgba(245, 158, 11, .35); color: var(--yellow-t); }
.pill.blue { background: var(--blue-soft); border-color: rgba(59, 130, 246, .3); color: var(--blue-t); }
.pill.orange { background: var(--accent-soft); border-color: rgba(254, 50, 0, .35); color: var(--orange-t); }
.kropka { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.btn { display: inline-flex; align-items: center; gap: 8px; border-radius: 10px; font-weight: 600; font-size: 14px; padding: 9px 16px; border: 1px solid var(--line-2);
  background: var(--surface-2); color: var(--strong); white-space: nowrap; }
.btn:hover { border-color: var(--hover-border); background: var(--surface-3); }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-maly { padding: 5px 10px; font-size: 12.5px; border-radius: 8px; }
.btn:disabled { opacity: .55; cursor: wait; }
.filtry { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.filtry button { padding: 8px 14px; border: 1px solid var(--line-2); border-radius: 9px; font-size: 13.5px; font-weight: 500; color: var(--text-2); background: var(--surface); }
.filtry button:hover { border-color: #4a4b52; color: var(--strong); }
.filtry button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.filtry button b { font-weight: 700; margin-left: 4px; opacity: .85; }
.szukaj { background: var(--surface); border: 1px solid var(--line-2); color: var(--strong); border-radius: 10px; padding: 9px 14px; font: inherit; min-width: 240px; }
.szukaj::placeholder, .pole::placeholder { color: var(--muted); }
.szukaj:focus, .pole:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(254, 50, 0, .15); }

/* pola formularzy */
.formularz { display: grid; gap: 16px; }
.formularz label { display: grid; gap: 6px; color: var(--muted); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: .4px; }
.formularz .opis { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--muted); font-size: 12.5px; }
.pole { width: 100%; background: var(--bg); border: 1px solid var(--line-2); color: var(--strong); border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 14px; text-transform: none; letter-spacing: 0; font-weight: 500; }
textarea.pole { min-height: 74px; resize: vertical; }
.pole.waski { width: 120px; }
.siatka2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.siatka4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.wybor { display: flex; gap: 10px; flex-wrap: wrap; }
.wybor label { display: inline-flex; align-items: center; gap: 8px; text-transform: none; letter-spacing: 0; color: var(--text-2); font-size: 14px; font-weight: 500;
  border: 1px solid var(--line-2); padding: 8px 12px; border-radius: 10px; cursor: pointer; background: var(--bg); }
.wybor input { accent-color: var(--accent); }
.przelacznik { display: inline-flex !important; align-items: center; gap: 12px; cursor: pointer; text-transform: none !important; letter-spacing: 0 !important; color: var(--strong) !important; font-size: 15px !important; }
.przelacznik input { appearance: none; width: 42px; height: 24px; border-radius: 24px; background: var(--surface-3); position: relative; cursor: pointer; transition: .15s; border: 1px solid var(--line-2); }
.przelacznik input::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: .15s; }
.przelacznik input:checked { background: var(--accent); border-color: var(--accent); }
.przelacznik input:checked::after { left: 20px; }

/* panel konta z prawej */
.zaslona { position: fixed; inset: 0; background: rgba(10, 10, 12, .45); z-index: 40; backdrop-filter: blur(2px); }
.szuflada { position: fixed; top: 0; right: 0; bottom: 0; width: min(1080px, 100%); background: var(--panel); border-left: 1px solid var(--line); z-index: 41;
  display: flex; flex-direction: column; box-shadow: -30px 0 60px rgba(0, 0, 0, .18); animation: wjazd .18s ease-out; }
@keyframes wjazd { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.sz-glowa { padding: 22px 28px 0; border-bottom: 1px solid var(--line); }
.sz-tytul { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.sz-tytul h2 { font-size: 24px; font-weight: 700; letter-spacing: -.4px; color: var(--strong); }
.sz-tytul .pod { color: var(--muted); margin-top: 2px; }
.zakladki { display: flex; gap: 4px; margin-top: 18px; overflow-x: auto; }
.zakladki button { background: none; border: 0; color: var(--muted); font-weight: 600; padding: 10px 14px; border-bottom: 2px solid transparent; white-space: nowrap; }
.zakladki button:hover { color: var(--strong); }
.zakladki button.on { color: var(--strong); border-bottom-color: var(--accent); }
.sz-tresc { flex: 1; overflow-y: auto; padding: 24px 28px 110px; }
.sz-stopka { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 28px; background: var(--panel-stopka); border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; backdrop-filter: blur(6px); }
.kafle { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.kafel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.kafel .l { font-size: 11px; font-weight: 700; letter-spacing: .5px; color: var(--muted); text-transform: uppercase; }
.kafel .v { font-size: 22px; font-weight: 700; color: var(--strong); margin-top: 4px; white-space: nowrap; }
.kafel .s { color: var(--muted); font-size: 12.5px; }
.kafel.akcent { border-color: rgba(254, 50, 0, .45); background: linear-gradient(160deg, var(--accent-soft), var(--surface) 60%); }
.sekcja { margin-bottom: 22px; }
.sekcja h3 { font-size: 15px; font-weight: 700; margin-bottom: 10px; color: var(--strong); }
.wnioski { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.wnioski li { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 10px; padding: 10px 14px; color: var(--text-2); }
.uwaga { background: var(--yellow-soft); border: 1px solid rgba(245, 158, 11, .35); color: var(--uwaga-t); border-radius: 12px; padding: 12px 14px; margin-bottom: 16px; }
.pusto { background: var(--surface); border: 1px dashed var(--line-2); border-radius: 14px; padding: 26px; text-align: center; color: var(--muted); }
.postep { display: flex; align-items: center; gap: 12px; color: var(--text-2); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; }
.kolko { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--surface-3); border-top-color: var(--accent); animation: obrot .8s linear infinite; flex-shrink: 0; }
@keyframes obrot { to { transform: rotate(360deg); } }
.pamiec li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.pamiec ul { list-style: none; }

/* okno potwierdzenia, komunikaty, logowanie */
.okno-tlo { position: fixed; inset: 0; background: rgba(10, 10, 12, .5); z-index: 60; display: grid; place-items: center; padding: 16px; }
.okno { background: var(--surface); border: 1px solid var(--line-2); border-radius: 18px; padding: 24px; width: min(460px, 100%); box-shadow: var(--shadow); }
.okno h3 { font-size: 18px; margin-bottom: 8px; color: var(--strong); }
.okno p { color: var(--text-2); margin-bottom: 18px; }
.okno .akcje { justify-content: flex-end; }
.toasty { position: fixed; right: 20px; bottom: 20px; z-index: 70; display: flex; flex-direction: column; gap: 8px; }
.toast { background: #24252a; border: 1px solid var(--line-2); border-left: 3px solid var(--green); color: #fff; padding: 12px 16px; border-radius: 12px; max-width: 420px;
  box-shadow: var(--shadow); animation: wjazd .18s ease-out; }
.toast.blad { border-left-color: var(--accent); }
.logowanie { position: fixed; inset: 0; display: grid; place-items: center; background: radial-gradient(1200px 600px at 70% -10%, rgba(255, 77, 28, .16), transparent 60%), var(--side); z-index: 80; padding: 16px; }
.logowanie form { width: min(400px, 100%); background: var(--surface); border: 1px solid var(--line-2); border-radius: 20px; padding: 30px; display: grid; gap: 16px; box-shadow: var(--shadow); }
.logowanie .brand { padding: 0 0 6px; border: 0; }
.logowanie .blad { color: #ff9a80; font-size: 13.5px; min-height: 18px; }

/* telefon i tablet */
@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid2 { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  body { flex-direction: column; }
  .sidebar { width: 100%; height: auto; flex-shrink: 0; z-index: 30; flex-direction: row; align-items: center; overflow: visible; border-right: 0; border-bottom: 1px solid #1d1e21; }
  .brand { padding: 10px 12px; border: 0; flex-direction: row; align-items: center; }
  .brand-nazwa, .szukaj-menu, .sidebar .footer, .nav-grupa { display: none; }
  .logo-dd { height: 26px; }
  .sidebar nav { flex-direction: row; overflow-x: auto; padding: 8px 10px; gap: 4px; flex: 1; }
  .sidebar nav a { white-space: nowrap; padding: 8px 10px; font-size: 13.5px; }
  .sidebar nav a span.tekst { display: none; }
  .sidebar nav a.active::before { left: 8px; right: 8px; top: auto; bottom: 0; width: auto; height: 2px; }
  .main { flex: 1; min-height: 0; height: auto; padding: 20px 16px 48px; }
  .page-header h1 { font-size: 26px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 14px; }
  .kpi .v { font-size: 21px; }
  .box { padding: 18px 16px; }
  .kafle { grid-template-columns: 1fr 1fr; }
  .siatka2, .siatka4 { grid-template-columns: 1fr 1fr; }
  .sz-glowa { padding: 16px 16px 0; }
  .sz-tresc { padding: 16px 16px 120px; }
  .sz-stopka { padding: 12px 16px; flex-wrap: wrap; }
  .szukaj { min-width: 0; width: 100%; }
  .zdarzenia .p { max-width: 220px; }
}

/* obchód juniora */
.alarmy { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.alarmy li { background: var(--surface-2); border: 1px solid var(--line); border-left: 3px solid var(--line-2); border-radius: 10px; padding: 10px 14px; color: var(--text-2); cursor: pointer; }
.alarmy li b { color: var(--strong); margin-right: 4px; }
.alarmy li.czerwony { border-left-color: var(--accent); }
.alarmy li.zolty { border-left-color: var(--yellow); }
.alarmy li:hover { border-color: var(--line-2); }
.zadanie { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; background: var(--surface-2); }
.zadanie-glowa { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 10px; }
.zadanie .tab td { padding: 8px 10px; }
.minus { color: var(--red-t); font-weight: 700; }
.kpis.cztery { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 860px) {
  .kpis.cztery { grid-template-columns: 1fr 1fr; }
  .zadanie-glowa { flex-direction: column; }
  .zadanie .tab td { white-space: normal; }
}

/* stawki i strategie */
.tab.stawki td { padding: 10px 8px; }
.tab.stawki .kampania-st { min-width: 170px; max-width: 300px; }
.tab.stawki .strategia-st { min-width: 110px; }
.tab.stawki .cel-st { min-width: 130px; max-width: 200px; font-size: 13px; }
.tab.stawki tr.grupa td { background: var(--surface-2); color: var(--strong); font-weight: 700; padding: 9px 10px; border-bottom: 1px solid var(--line); }
.tab.stawki tr.grupa .pod { display: inline; margin-left: 8px; font-weight: 500; }

/* historia pracy */
.dziennik { list-style: none; display: flex; flex-direction: column; }
.dziennik > li { display: grid; grid-template-columns: 56px 1fr; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.dziennik > li:last-child { border-bottom: 0; }
.dziennik .godz { color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13px; line-height: 1.6; }
.glowa-wpisu { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.glowa-wpisu b { color: var(--strong); font-weight: 600; }
.glowa-wpisu .btn { margin-left: auto; }
.tresc-wpisu details { margin-top: 6px; }
.tresc-wpisu summary { cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 600; }
.tresc-wpisu summary:hover { color: var(--accent); }
.linie-wpisu { list-style: none; margin-top: 6px; display: flex; flex-direction: column; gap: 4px; }
.linie-wpisu li { color: var(--text-2); font-size: 13.5px; padding: 6px 10px; border-left: 3px solid var(--line-2); background: var(--surface-2); border-radius: 6px; white-space: pre-wrap; }
.linie-wpisu li.czerwony { border-left-color: var(--accent); }
.linie-wpisu li.zolty { border-left-color: var(--yellow); }
@media (max-width: 860px) { .dziennik > li { grid-template-columns: 44px 1fr; gap: 10px; } }

/* stan agenta */
.agent { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.box .agent { margin: 14px 0 0; }
.agent-el { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface-2); font-size: 12.5px; color: var(--text-2); }
.agent-el .kropka { color: var(--green-t); }
.agent-el b { color: var(--strong); font-weight: 600; }
.agent-el.zle { border-color: rgba(254, 50, 0, .35); background: var(--red-soft); }
.agent-el.zle .kropka, .agent-el.zle span { color: var(--red-t); }
.box h2 .btn { margin-left: auto; }
.alarmy li a { color: var(--accent); text-decoration: none; }

/* widok strażnika wykluczeń */
.konta-straznika { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.konta-straznika button { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); color: var(--text-2); font-weight: 500; font-size: 13.5px; }
.konta-straznika button:hover { border-color: var(--hover-border); color: var(--strong); }
.konta-straznika button.on { border-color: var(--accent); color: var(--strong); box-shadow: 0 0 0 3px var(--accent-soft); font-weight: 600; }
.konta-straznika b { background: var(--accent); color: #fff; border-radius: 20px; padding: 1px 8px; font-size: 11.5px; }
.konta-straznika b.zero { background: var(--surface-3); color: var(--muted); }
.konto-straznika .kg { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.filtry.typy button { background: var(--surface-2); }
.filtry.typy button.on { background: var(--strong); border-color: var(--strong); color: #fff; }
.powody { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -4px 0 14px; }
.powody .pill b { margin-left: 4px; }
.main .sz-stopka { position: sticky; bottom: -64px; margin: 0 -56px -64px; padding: 14px 56px; border-radius: 0; z-index: 5; }
@media (max-width: 860px) { .main .sz-stopka { margin: 0 -16px -48px; padding: 12px 16px; bottom: -48px; } }
@media (max-width: 860px) { .konta-straznika { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; margin-right: -16px; } .konta-straznika button { flex-shrink: 0; } }

/* wyniki konta */
.kafle.osiem { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kafel .zm { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.kafel .zm.lepiej { color: var(--green-t); }
.kafel .zm.gorzej { color: var(--red-t); }
.wykres { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px 10px; }
.wykres svg { width: 100%; height: 150px; display: block; }
.wykres .slupek { fill: rgba(254, 50, 0, .28); }
.wykres .linia-konw { fill: none; stroke: var(--green-t); stroke-width: 2.2; vector-effect: non-scaling-stroke; }
.legenda { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--text-2); margin-top: 6px; }
.legenda i { display: inline-block; width: 12px; height: 8px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.legenda .k-koszt { background: rgba(254, 50, 0, .45); }
.legenda .k-konw { background: var(--green-t); height: 3px; }
.legenda .muted { margin-left: auto; }
/* dzwonek i karta nowych alarmów */
#dzwonek.wyl { color: #77777f; }
#alarmy-nowe { position: fixed; top: 16px; right: 16px; z-index: 75; width: min(420px, calc(100vw - 32px)); }
.alarmy-karta { --surface-2: #f5f5f7; --line: #e6e6ea; --text-2: #34353b; --muted: #6a6b73; --red-t: #c2410c; --yellow-t: #b45309; --red-soft: rgba(254, 50, 0, .08); --yellow-soft: rgba(245, 158, 11, .12);
  background: #fff; color: #1a1b1f; border-radius: 16px; box-shadow: 0 20px 50px rgba(0, 0, 0, .3); border: 1px solid #e6e6ea; overflow: hidden; animation: wjazd .18s ease-out; }
.ak-glowa { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--accent); color: #fff; }
.ak-glowa .btn-ikona { margin-left: auto; color: #fff; }
.ak-glowa .btn-ikona:hover { background: rgba(255, 255, 255, .15); color: #fff; }
.alarmy-karta ul { list-style: none; max-height: 60vh; overflow-y: auto; }
.alarmy-karta li { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); cursor: pointer; border-left: 3px solid var(--line); }
.alarmy-karta li:hover { background: var(--surface-2); }
.alarmy-karta li.czerwony { border-left-color: var(--accent); }
.alarmy-karta li.zolty { border-left-color: #d97706; }
.alarmy-karta .ak-konto { color: #0b0b0d; }
.alarmy-karta li > span:not(.pill) { grid-column: 1 / -1; font-size: 13px; color: var(--text-2); }
@media (max-width: 860px) { .kafle.osiem { grid-template-columns: 1fr 1fr; } }

/* ════════ Czat z poleceniami ════════ */
.czat { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 20px; align-items: start; }
.czat-rozmowy { display: flex; flex-direction: column; gap: 6px; max-height: calc(100vh - 250px); overflow-y: auto; }
.czat-rozmowy .rozmowa { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; background: var(--surface); }
.czat-rozmowy .rozmowa .glowna { color: var(--strong); font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.czat-rozmowy .rozmowa:hover { border-color: var(--hover-border); }
.czat-rozmowy .rozmowa.active { border-color: var(--accent); background: var(--accent-soft); }
.czat-okno { display: flex; flex-direction: column; height: calc(100vh - 250px); min-height: 440px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.czat-wiadomosci { flex: 1; overflow-y: auto; padding: 22px 24px; display: flex; flex-direction: column; gap: 16px; }
.czat-pisz { display: flex; gap: 10px; align-items: flex-end; padding: 14px 16px; border-top: 1px solid var(--line); background: var(--surface-2); }
.czat-pisz textarea { flex: 1; resize: none; min-height: 44px; max-height: 160px; line-height: 1.45; font-family: inherit; }
.czat-pisz .btn { height: 44px; }
.wiad { display: flex; flex-direction: column; gap: 8px; max-width: 880px; }
.wiad.moja { align-self: flex-end; align-items: flex-end; max-width: 640px; }
.wiad .dymek { padding: 12px 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); font-size: 14.5px; line-height: 1.55; overflow-wrap: anywhere; }
.wiad.moja .dymek { background: var(--accent-soft); border-color: rgba(254, 50, 0, .22); }
.wiad.blad .dymek { background: var(--red-soft); border-color: rgba(254, 50, 0, .3); color: var(--red-t); }
.wiad .dymek p + p, .wiad .dymek p + ul, .wiad .dymek ul + p { margin-top: 8px; }
.wiad .dymek ul { padding-left: 20px; display: grid; gap: 4px; }
.wiad .dymek.pisze { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); }
.wiad-stopka { font-size: 11.5px; padding: 0 4px; }
.wiad .polecenie { margin: 0; width: 100%; }
.polecenie .uwaga { margin: 10px 0 0; }
.polecenie .tab td.przed { color: var(--muted); }
.polecenie .tab td.strz { color: var(--muted); width: 24px; text-align: center; }
.polecenie .uwaga-poz { color: var(--yellow-t); }
.polecenie .pominiete { margin-top: 10px; color: var(--muted); }
.polecenie > .muted.maly { margin-top: 10px; }
.czat-pusto { margin: auto; text-align: center; max-width: 560px; display: grid; gap: 12px; }
.czat-pusto .glowna { font-size: 19px; font-weight: 700; color: var(--strong); }
.czat-pusto .podpowiedzi { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.czat-pusto .podpowiedzi .btn { white-space: normal; text-align: left; }
#czat-konto { width: auto; min-width: 220px; max-width: 320px; }
.czat-naglowek .akcje { flex-wrap: nowrap; }
@media (max-width: 860px) {
  .czat { grid-template-columns: 1fr; gap: 12px; }
  .czat-rozmowy { flex-direction: row; overflow-x: auto; max-height: none; padding-bottom: 4px; }
  .czat-rozmowy .rozmowa { min-width: 180px; max-width: 220px; flex-shrink: 0; }
  .czat-okno { height: calc(100vh - 330px); min-height: 380px; }
  .czat-wiadomosci { padding: 14px; }
  .wiad, .wiad.moja { max-width: 100%; }
  #czat-konto { min-width: 0; max-width: none; flex: 1; }
  .czat-naglowek .akcje { width: 100%; }
  .czat-naglowek .akcje .btn { flex-shrink: 0; }
  .czat-podtytul { display: none; }
  .czat-naglowek { margin-bottom: 14px; }
  .polecenie .tab, .polecenie .tab tbody { display: block; }
  .polecenie .tab tr { display: grid; grid-template-columns: auto auto 1fr; align-items: baseline; border-bottom: 1px solid var(--line); padding: 8px 0; }
  .polecenie .tab td { border: 0; padding: 2px 6px; }
  .polecenie .tab td:first-child { grid-column: 1 / -1; }
  .polecenie .tab td.strz { width: auto; }
  .polecenie .zadanie-glowa { flex-direction: column; gap: 10px; }
}
