/* Reklamacje GoPOS — kolory i krój jak na gopos.pl (DM Sans, niebieski #1A86E0, granat #212540) */
:root{
  --blue:#1A86E0;--blue-d:#0B6BD6;--blue-l:#E8F1FF;--blue-xl:#F3F8FF;
  --navy:#212540;--navy2:#1F286B;--ink:#2A2A2A;--muted:#6B7280;--line:#E4EAF3;
  --bg:#F7FAFF;--card:#fff;--yellow:#F7BB47;--yellow-l:#FFF6E3;
  --ok:#16A34A;--ok-l:#E7F7EE;--warn:#B7791F;--bad:#DC2626;--bad-l:#FDECEC;--violet:#7C3AED;--violet-l:#F1EAFE;
  --r1:#DC2626;--r2:#D97706;--r3:#2563EB;
  --shadow:0 1px 2px rgba(16,24,40,.04),0 4px 16px rgba(16,24,40,.06);
  --radius:14px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;font-family:'DM Sans',system-ui,sans-serif;background:var(--bg);color:var(--ink);font-size:15px;line-height:1.45}
a{color:var(--blue);text-decoration:none}a:hover{color:var(--blue-d);text-decoration:underline}
h1{font-size:28px;margin:0 0 14px;color:var(--navy);letter-spacing:-.01em}
h1 .client{font-weight:500;color:var(--muted);font-size:20px;margin-left:6px}
h2{font-size:17px;margin:0 0 12px;color:var(--navy)}
h2.section{margin:30px 0 12px;font-size:20px}
.small-h{font-size:13px;margin:16px 0 6px;color:var(--navy)}
.muted{color:var(--muted)}.small{font-size:13px}
code{background:var(--blue-xl);padding:1px 6px;border-radius:6px;font-size:13px}

/* ---------- nagłówek ---------- */
header{background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:22px;padding:0 28px;height:68px;
  position:sticky;top:0;z-index:20;box-shadow:0 1px 0 rgba(16,24,40,.02)}
header .brand{display:flex;align-items:center;gap:12px;color:var(--navy);font-weight:700;font-size:15px}
header .brand:hover{text-decoration:none}
header .brand img{height:30px;display:block}
header .brand span{padding-left:12px;border-left:1px solid var(--line);color:var(--muted);font-weight:500}
header nav{display:flex;align-items:center;gap:4px}
header nav>a{color:var(--navy);padding:9px 14px;border-radius:10px;font-weight:500}
header nav>a:hover{background:var(--blue-xl);text-decoration:none;color:var(--blue)}
header nav>a.active{background:var(--blue-l);color:var(--blue);font-weight:700}
.count{background:var(--yellow);color:var(--navy);border-radius:999px;padding:1px 8px;font-size:12px;font-weight:700;margin-left:4px}
details.more{position:relative}
details.more summary{cursor:pointer;padding:9px 14px;list-style:none;border-radius:10px;color:var(--navy);font-weight:500}
details.more summary::-webkit-details-marker{display:none}
details.more summary:after{content:' ▾';color:var(--muted)}
details.more[open] summary,details.more summary:hover{background:var(--blue-xl);color:var(--blue)}
details.more>div{position:absolute;top:46px;left:0;background:#fff;border:1px solid var(--line);border-radius:12px;padding:6px;z-index:30;min-width:230px;box-shadow:0 12px 32px rgba(16,24,40,.14)}
details.more>div a{display:block;color:var(--navy);padding:9px 12px;border-radius:8px}
details.more>div a:hover{background:var(--blue-xl);text-decoration:none;color:var(--blue)}
header .user{margin-left:auto;font-size:14px;color:var(--muted);display:flex;align-items:center;gap:10px}
header .user .avatar{width:32px;height:32px;border-radius:50%;background:var(--blue);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:13px}
header .user a{color:var(--muted);font-size:13px}

.banner{background:var(--yellow-l);border-bottom:1px solid #F5DFA8;color:#7A5300;padding:8px 28px;font-size:13px}
.flash{max-width:1180px;margin:18px auto 0;background:var(--ok-l);color:#14532d;border:1px solid #BFE6CD;border-radius:12px;padding:11px 16px}
main{max-width:1180px;margin:0 auto;padding:28px}

/* ---------- karty, siatki ---------- */
.grid{display:grid;gap:16px}.g4{grid-template-columns:repeat(4,1fr)}.g2{grid-template-columns:1fr 1fr}.g3{grid-template-columns:2fr 1fr}
.kb-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:16px 0}
@media(max-width:900px){.g4,.g2,.g3,.kb-grid{grid-template-columns:1fr}header{overflow-x:auto}}
.card,.case-card,.stepper-card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:18px 20px;box-shadow:var(--shadow)}
.case-card{margin-bottom:20px;padding:22px}
.kpi .v{font-size:30px;font-weight:700;color:var(--navy)}.kpi .l{color:var(--muted);font-size:12px;text-transform:uppercase;letter-spacing:.05em}
.empty{text-align:center;padding:48px}
.summary{color:#3D4466;line-height:1.55;margin:4px 0 14px}.summary.big{font-size:17px;max-width:860px}

/* ---------- tabele ---------- */
table{width:100%;border-collapse:collapse}
th,td{text-align:left;padding:10px 12px;border-bottom:1px solid var(--line);vertical-align:top}
th{font-size:12px;color:var(--muted);font-weight:600;text-transform:uppercase;letter-spacing:.04em;white-space:nowrap}
tr.click{cursor:pointer}tr.click:hover td{background:var(--blue-xl)}
table.data th.sortable{cursor:pointer;user-select:none}
table.data th.sortable:hover{color:var(--blue)}
table.data th.sortable:after{content:' ↕';opacity:.35}
table.data th.asc:after{content:' ↑';opacity:1;color:var(--blue)}table.data th.desc:after{content:' ↓';opacity:1;color:var(--blue)}
table.data tr.filters td{padding:6px 8px;background:var(--blue-xl);border-bottom:1px solid var(--line)}
table.data tr.filters input,table.data tr.filters select{width:100%;padding:6px 8px;font-size:13px;border-radius:8px}
.table-tools{display:flex;justify-content:space-between;align-items:center;margin:0 0 8px;font-size:13px;color:var(--muted)}

/* ---------- formularze i przyciski ---------- */
input,select,textarea,button{font:inherit;padding:9px 12px;border:1px solid #D5DEEA;border-radius:10px;background:#fff;color:var(--ink)}
input:focus,select:focus,textarea:focus{outline:none;border-color:var(--blue);box-shadow:0 0 0 3px var(--blue-l)}
button,.btn{background:var(--blue);color:#fff;border:0;cursor:pointer;padding:10px 18px;border-radius:10px;display:inline-block;font-weight:600;transition:background .15s}
button:hover,.btn:hover{background:var(--blue-d);color:#fff;text-decoration:none}
button.ok{background:var(--blue)}button.ok:hover{background:var(--blue-d)}
button.ghost,.btn.ghost-btn{background:var(--blue-l);color:var(--blue);border:0}
button.ghost:hover,.btn.ghost-btn:hover{background:#D6E6FF;color:var(--blue-d)}
button:disabled{opacity:.5;cursor:default}
.btn.asana-btn{background:#F06A6A}.btn.asana-btn:hover{background:#E35757}
form.filters{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px}

/* ---------- etykiety ---------- */
.pill{display:inline-block;padding:3px 10px;border-radius:999px;font-size:12px;font-weight:600;background:var(--blue-l);color:var(--blue)}
.pill.R1{background:var(--bad-l);color:var(--r1)}.pill.R2{background:#FDF0DC;color:var(--r2)}.pill.R3{background:#E3ECFD;color:var(--r3)}
.pill.COMPLAINT{background:var(--blue-l)}.pill.SUPPORT_REDIRECT{background:var(--ok-l);color:var(--ok)}.pill.NEEDS_TRIAGE{background:var(--bad-l);color:var(--bad)}
.pill.OTHER{background:#EEF0F4;color:#555}
.pill.CORRECT,.pill.st-DONE{background:var(--ok-l);color:var(--ok)}.pill.PARTIAL{background:#FDF0DC;color:var(--warn)}
.pill.WRONG,.pill.st-FAILED{background:var(--bad-l);color:var(--bad)}.pill.st-REJECTED{background:#EEF0F4;color:#666}
.pill.SIMULATED{background:var(--yellow-l);color:#7A5300}.pill.premium{background:var(--violet-l);color:var(--violet)}
.tag-customer{background:var(--yellow-l);color:#8A5A00}
.lvl-warn{color:var(--warn)}.lvl-error{color:var(--bad);font-weight:600}
.overdue{color:var(--bad);font-weight:700}.soon{color:var(--warn);font-weight:600}
.stage-pill{display:inline-block;padding:4px 11px;border-radius:999px;font-size:12px;font-weight:700;white-space:nowrap}
.stage-pill.st-nowa{background:var(--bad-l);color:#B4233C}.stage-pill.st-realizacja{background:var(--blue-l);color:var(--blue-d)}
.stage-pill.st-klient{background:var(--yellow-l);color:#8A5A00}.stage-pill.st-weryfikacja{background:var(--violet-l);color:var(--violet)}
.stage-pill.st-zamknieta{background:var(--ok-l);color:var(--ok)}
.asana-link{color:#E35757;font-weight:600}

/* ---------- lista spraw: lejek etapów ---------- */
.pipeline{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin:10px 0 16px}
.pipe{background:#fff;border:1px solid var(--line);border-radius:14px;padding:12px 16px;display:flex;flex-direction:column;color:var(--ink);box-shadow:var(--shadow);position:relative;overflow:hidden}
.pipe:before{content:'';position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--line)}
.pipe.st-nowa:before{background:#F87171}.pipe.st-realizacja:before{background:var(--blue)}.pipe.st-klient:before{background:var(--yellow)}
.pipe.st-weryfikacja:before{background:var(--violet)}.pipe.st-zamknieta:before{background:var(--ok)}
.pipe b{font-size:26px;color:var(--navy);line-height:1.1}.pipe span{font-size:13px;color:var(--muted)}
.pipe.on{border-color:var(--blue);box-shadow:0 0 0 3px var(--blue-l)}.pipe:hover{text-decoration:none;border-color:var(--blue)}

/* ---------- sprawy i kroki ---------- */
.case-head{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:8px}
.case-no{font-weight:700;font-size:18px;color:var(--navy)}.case-head .client{font-weight:600;margin-left:6px}
.due{font-weight:600;color:var(--muted)}.due.overdue{color:var(--bad)}.due.soon{color:var(--warn)}
.case-title{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}.case-title h1{margin:0}
.title-links{display:flex;gap:8px}
.approve-all{display:flex;gap:12px;align-items:center;margin:8px 0 14px}
.step-card{border:1px solid var(--line);border-left:5px solid var(--blue);border-radius:12px;padding:14px 16px;margin:12px 0;background:#FBFDFF}
.step-card.customer{border-left-color:var(--yellow);background:#FFFDF7}
.step-card.state-DONE{border-left-color:var(--ok);background:#fff}.step-card.state-REJECTED{border-left-color:#C9CED8;background:#FAFAFB;opacity:.8}
.step-card.state-FAILED{border-left-color:var(--bad)}
.step-head{display:flex;gap:10px;align-items:center;flex-wrap:wrap;font-size:16px;color:var(--navy)}
.sys{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;border-radius:6px;padding:3px 8px}
.sys-ASANA{background:#FDE7EA;color:#B4233C}.sys-INTERCOM{background:var(--blue-l);color:var(--blue-d)}
.why{color:var(--muted);font-size:13px;margin:6px 0 8px}
.step-card textarea{width:100%;font-size:14px;line-height:1.5;resize:vertical;margin-top:4px}
.what{font-size:13px;color:#4B5180;margin:6px 0}
.btns{display:flex;gap:10px;margin-top:8px}
pre.draft{white-space:pre-wrap;font-family:inherit;font-size:13px;background:var(--blue-xl);border-radius:10px;padding:10px 12px;margin:8px 0}
.close-form{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:18px;padding-top:16px;border-top:1px dashed var(--line)}
details.history{margin-top:14px}details.history summary{cursor:pointer;color:var(--blue);font-weight:600}
ul.checks{list-style:none;padding:0;margin:8px 0}ul.checks li{padding:4px 0}ul.checks li.ok{color:var(--ok)}ul.checks li.no{color:var(--bad);font-weight:600}
dl{display:grid;grid-template-columns:170px 1fr;gap:6px 12px;margin:0}dt{color:var(--muted)}dd{margin:0}
.msg{border:1px solid var(--line);border-radius:12px;padding:12px 14px;margin-bottom:12px;background:#fff}
.msg pre{white-space:pre-wrap;font-family:inherit;margin:8px 0 0;max-height:420px;overflow:auto}
.timeline{list-style:none;padding:0;margin:0}.timeline li{padding:6px 0 6px 16px;border-left:2px solid var(--line);position:relative}
.timeline li:before{content:'';position:absolute;left:-5px;top:12px;width:8px;height:8px;border-radius:50%;background:var(--blue)}
.bar{height:8px;background:var(--blue-l);border-radius:4px;overflow:hidden}.bar span{display:block;height:100%;background:var(--blue)}

/* ---------- etapy (stepper) ---------- */
.stepper-card{margin:14px 0 20px}
.stepper{display:flex;list-style:none;padding:0;margin:0 0 16px}
.stepper li{flex:1;display:flex;flex-direction:column;align-items:center;text-align:center;position:relative;color:var(--muted)}
.stepper li:not(:last-child):after{content:'';position:absolute;top:18px;left:calc(50% + 22px);right:calc(-50% + 22px);height:3px;border-radius:2px;background:var(--line)}
.stepper li.done:not(:last-child):after{background:var(--blue)}
.stepper .dot{width:38px;height:38px;border-radius:50%;background:#EEF2F8;display:flex;align-items:center;justify-content:center;font-weight:700;color:var(--muted);z-index:1}
.stepper li.done .dot{background:var(--blue);color:#fff}
.stepper li.current .dot{background:var(--navy);color:#fff;box-shadow:0 0 0 6px var(--blue-l)}
.stepper .lbl{font-weight:600;margin-top:8px;color:var(--navy)}.stepper li:not(.current):not(.done) .lbl{color:var(--muted)}
.stepper .sec{font-size:11px;color:var(--muted)}
.stage-now{background:var(--blue-xl);border:1px solid var(--blue-l);border-radius:12px;padding:14px 16px;display:grid;gap:8px;line-height:1.55}
.next-steps{display:flex;gap:10px;flex-wrap:wrap;margin-top:4px}

/* ---------- baza wiedzy ---------- */
ol.you li,.card ul li{margin:6px 0;line-height:1.5}
.stage-list{padding-left:0;list-style:none;display:grid;gap:14px}.stage-list li{border-left:3px solid var(--line);padding-left:12px}
.flow-steps{display:grid;gap:10px}
.fstep{display:grid;grid-template-columns:44px 1fr auto;gap:14px;align-items:start;background:#fff;border:1px solid var(--line);border-radius:14px;padding:14px 16px;box-shadow:var(--shadow)}
.fstep .n{width:36px;height:36px;border-radius:50%;background:var(--blue);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700}
.fstep.nowe .n{background:var(--yellow);color:var(--navy)}.fstep .who{font-size:12px;text-transform:uppercase;letter-spacing:.05em;color:var(--muted)}
.fstep p{margin:4px 0 0;color:#3D4466}
.stage-dziala{background:var(--ok-l);color:var(--ok)}.stage-nowe{background:var(--yellow-l);color:#8A5A00}.stage-wkrotce{background:#EEF0F4;color:#666}

/* ---------- logowanie ---------- */
.center{min-height:100vh;display:flex;align-items:center;justify-content:center;background:linear-gradient(160deg,#F3F8FF 0%,#E8F1FF 100%)}
.login{max-width:400px;text-align:center;padding:36px 32px}
.login .logo{height:40px;margin-bottom:8px}
.login h1{font-size:22px;color:var(--navy);margin:6px 0 4px}
.btn.google{padding:13px 24px;font-weight:700;width:100%}
