/* Panel ZooKurier — wspólny styl (jasny, profesjonalny, menu boczne) */

*{box-sizing:border-box;margin:0;padding:0;}

:root{
--sidebar-bg:#101828;
--sidebar-active:#1d2939;
--accent:#2970ff;
--accent-soft:#eff4ff;
--bg:#f4f6fa;
--card:#ffffff;
--ink:#101828;
--muted:#667085;
--line:#e4e7ec;
--green:#12b76a;
--orange:#f79009;
--red:#f04438;
--radius:12px;
}

body{
font-family:'Segoe UI', system-ui, Arial, sans-serif;
background:var(--bg);
color:var(--ink);
font-size:14.5px;
line-height:1.5;
}

.app{display:flex;min-height:100vh;}

/* ── Sidebar ─────────────────────────────── */

.sidebar{
width:248px;
background:var(--sidebar-bg);
color:#cdd5e0;
display:flex;
flex-direction:column;
position:sticky;
top:0;
height:100vh;
flex-shrink:0;
}

.brand{
display:flex;
align-items:center;
gap:12px;
padding:20px 18px;
border-bottom:1px solid #1d2939;
}

.brand-logo{
width:38px;height:38px;
border-radius:10px;
background:var(--accent);
color:#fff;
font-weight:800;
font-size:20px;
display:grid;
place-items:center;
}

.brand-name{font-weight:700;color:#fff;font-size:15px;}
.brand-sub{font-size:11.5px;color:#8a94a6;}

.menu{flex:1;padding:12px 10px;overflow-y:auto;}

.menu-item{
display:flex;
align-items:center;
gap:11px;
padding:10px 12px;
border-radius:8px;
color:#cdd5e0;
text-decoration:none;
font-size:13.5px;
margin-bottom:2px;
}

.menu-item:hover{background:var(--sidebar-active);color:#fff;}
.menu-item.active{background:var(--accent);color:#fff;font-weight:600;}

.menu-icon{width:20px;text-align:center;font-size:15px;}

.sidebar-foot{
padding:14px 16px;
border-top:1px solid #1d2939;
}

.user-chip{display:flex;align-items:center;gap:10px;}

.user-avatar{
width:34px;height:34px;
border-radius:50%;
background:#344054;
color:#fff;
display:grid;
place-items:center;
font-weight:700;
}

.user-name{font-size:13px;color:#fff;font-weight:600;}
.user-role{font-size:11px;color:#8a94a6;}

.logout-link{
display:inline-block;
margin-top:10px;
color:#8a94a6;
font-size:12px;
text-decoration:none;
}
.logout-link:hover{color:#fff;}

/* ── Content ─────────────────────────────── */

.content{flex:1;padding:26px 32px;min-width:0;}

.topbar{
display:flex;
justify-content:space-between;
align-items:center;
margin-bottom:22px;
flex-wrap:wrap;
gap:10px;
}

.topbar h1{font-size:22px;font-weight:700;}
.topbar-meta{color:var(--muted);font-size:13px;}

/* ── Karty / KPI ─────────────────────────── */

.grid{display:grid;gap:16px;}
.grid-kpi{grid-template-columns:repeat(auto-fit, minmax(200px, 1fr));}

.card{
background:var(--card);
border:1px solid var(--line);
border-radius:var(--radius);
padding:18px 20px;
}

.card h2{
font-size:14px;
font-weight:700;
margin-bottom:12px;
color:var(--ink);
}

.kpi-value{font-size:28px;font-weight:800;}
.kpi-label{font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:.4px;margin-top:2px;}
.kpi-sub{font-size:12px;color:var(--muted);margin-top:6px;}

.kpi-accent{border-top:3px solid var(--accent);}
.kpi-green{border-top:3px solid var(--green);}
.kpi-orange{border-top:3px solid var(--orange);}
.kpi-red{border-top:3px solid var(--red);}

section{margin-top:24px;}

/* ── Tabele ──────────────────────────────── */

table{width:100%;border-collapse:collapse;font-size:13.5px;}
th,td{padding:9px 12px;text-align:left;border-bottom:1px solid var(--line);}
th{color:var(--muted);font-weight:600;font-size:11.5px;text-transform:uppercase;letter-spacing:.4px;}
tr:last-child td{border-bottom:none;}
tr:hover td{background:#f9fafb;}
.num{font-weight:700;font-variant-numeric:tabular-nums;}
.muted{color:var(--muted);}

/* ── Etapy procesu magazynowego (zbieranie → pakowanie) ── */

.flow{display:flex;align-items:stretch;flex-wrap:wrap;gap:0;}
.flow-step{flex:1;min-width:220px;}
.flow-arrow{display:flex;align-items:center;justify-content:center;padding:0 10px;color:#c9ced8;font-size:26px;line-height:1;}
.stage-pick{border-top:3px solid var(--green);}
.stage-pack{border-top:3px solid var(--accent);}

.dot{display:inline-block;width:9px;height:9px;border-radius:3px;margin-right:7px;vertical-align:middle;}
.dot-pick{background:var(--green);}
.dot-pack{background:var(--accent);}

/* nagłówki grupujące kolumny wg etapu */
th.grp{text-align:center;font-size:11px;padding:6px 12px;}
th.grp-pick{color:#067647;background:#f2fbf6;}
th.grp-pack{color:#1849a9;background:var(--accent-soft);}
th.sep,td.sep{border-left:1px solid var(--line);}
tr.sum td{background:#f9fafb;font-weight:700;border-top:2px solid var(--line);}

details.method{margin-top:14px;font-size:12.5px;color:var(--muted);}
details.method summary{cursor:pointer;font-weight:600;color:#344054;}
details.method p{margin-top:8px;}

/* ── Badge / status ──────────────────────── */

.badge{
display:inline-block;
padding:3px 10px;
border-radius:20px;
font-size:11px;
font-weight:700;
}
.badge-green{background:#e7f8f0;color:#067647;}
.badge-orange{background:#fef4e6;color:#b54708;}
.badge-red{background:#fee4e2;color:#b42318;}
.badge-gray{background:#f2f4f7;color:#475467;}
.badge-blue{background:var(--accent-soft);color:#1849a9;}

/* ── Formularze ──────────────────────────── */

input,select,textarea{
font-family:inherit;
font-size:14px;
padding:9px 12px;
border:1px solid #d0d5dd;
border-radius:8px;
background:#fff;
color:var(--ink);
width:100%;
}

input:focus,select:focus,textarea:focus{outline:2px solid var(--accent-soft);border-color:var(--accent);}

/* Checkbox i radio to nie pola tekstowe — reguła wyżej rozciągała je na całą szerokość */
input[type="checkbox"],input[type="radio"]{
width:auto;
padding:0;
margin:0 6px 0 0;
vertical-align:-2px;
accent-color:var(--accent);
}

label{display:block;font-size:12.5px;font-weight:600;color:#344054;margin-bottom:5px;}

.form-row{display:flex;gap:14px;flex-wrap:wrap;margin-bottom:14px;}
.form-row>div{flex:1;min-width:160px;}

button,.btn{
font-family:inherit;
font-size:14px;
font-weight:600;
padding:10px 18px;
border-radius:8px;
border:none;
background:var(--accent);
color:#fff;
cursor:pointer;
text-decoration:none;
display:inline-block;
}
button:hover,.btn:hover{filter:brightness(1.08);}

.btn-light{background:#fff;color:#344054;border:1px solid #d0d5dd;}
.btn-red{background:var(--red);}
.btn-green{background:var(--green);}
.btn-sm{padding:6px 12px;font-size:12.5px;}

.empty{color:var(--muted);font-style:italic;padding:14px 0;}

.notice{
background:var(--accent-soft);
border:1px solid #b2ccff;
color:#1849a9;
padding:12px 16px;
border-radius:10px;
margin-bottom:16px;
font-size:13.5px;
}

.notice-warn{background:#fef4e6;border-color:#fedf89;color:#b54708;}

/* ── Login ───────────────────────────────── */

.login-wrap{
min-height:100vh;
display:grid;
place-items:center;
background:linear-gradient(135deg,#101828 0%,#1d2939 100%);
}

.login-box{
background:#fff;
border-radius:16px;
padding:38px 36px;
width:100%;
max-width:380px;
box-shadow:0 20px 60px rgba(0,0,0,.3);
}

.login-box h1{font-size:20px;margin-bottom:4px;}
.login-box .sub{color:var(--muted);font-size:13px;margin-bottom:22px;}
.login-box .form-row{margin-bottom:12px;}
.login-box button{width:100%;margin-top:8px;}

.login-error{
background:#fee4e2;
color:#b42318;
padding:10px 14px;
border-radius:8px;
font-size:13px;
margin-bottom:14px;
}

@media (max-width:900px){
.sidebar{width:64px;}
.brand-name,.brand-sub,.menu-item span:not(.menu-icon){display:none;}
.menu-item{justify-content:center;}
.user-chip div:last-child,.logout-link{display:none;}
.content{padding:18px;}
}
