:root{
    --blue:#003b7a;
    --blue2:#0059b3;
    --yellow:#ffcf00;
    --border:#c9d3df;
    --bg:#eef3f8;
    --text:#17212b;
    --muted:#637083;
    --card:#fff;
    --soft:#f6f9fc;
}
*{box-sizing:border-box}
html,body{min-height:100%}
body{
    margin:0 !important;
    font-family:Arial,Helvetica,sans-serif !important;
    background:var(--bg) !important;
    color:var(--text) !important;
    font-size:14px !important;
    line-height:1.45;
}
a{color:#0059b3;text-decoration:none}
a:hover{text-decoration:underline}

/* TOP BAR */
.topbar{
    background:linear-gradient(#0b5cad,#003b7a) !important;
    border-bottom:4px solid var(--yellow) !important;
    color:#fff !important;
    width:100%;
}
.topbar-inner{
    max-width:1200px !important;
    margin:0 auto !important;
    display:flex !important;
    align-items:center !important;
    gap:14px !important;
    padding:12px 16px !important;
}
.logo{
    display:flex !important;
    align-items:center !important;
    gap:8px !important;
    color:#fff !important;
    text-decoration:none !important;
    font-weight:bold !important;
    font-size:22px !important;
    flex:0 0 auto !important;
}
.logo:hover{text-decoration:none !important}
.logo-brick{
    width:34px !important;
    height:24px !important;
    background:var(--yellow) !important;
    border-radius:3px !important;
    box-shadow:inset 0 -3px rgba(0,0,0,.18) !important;
    position:relative !important;
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    color:#003b7a !important;
    font-weight:bold !important;
    font-size:13px !important;
}
.logo-brick:before,.logo-brick:after{
    content:"";
    position:absolute;
    top:-6px;
    width:8px;
    height:8px;
    border-radius:50%;
    background:var(--yellow);
    box-shadow:inset 0 -2px rgba(0,0,0,.12);
}
.logo-brick:before{left:7px}
.logo-brick:after{right:7px}

.top-search{
    flex:1 1 420px !important;
    display:flex !important;
    min-width:280px !important;
    max-width:620px !important;
}
.top-search select{
    border:1px solid #002b58 !important;
    border-right:0 !important;
    border-radius:4px 0 0 4px !important;
    padding:8px 6px !important;
    background:#fff !important;
    height:36px !important;
}
.top-search input{
    flex:1 !important;
    border:1px solid #002b58 !important;
    border-right:0 !important;
    padding:9px 10px !important;
    min-width:120px !important;
    height:36px !important;
}
.top-search button{
    border:1px solid #002b58 !important;
    background:var(--yellow) !important;
    border-radius:0 4px 4px 0 !important;
    padding:8px 14px !important;
    font-weight:bold !important;
    cursor:pointer !important;
    height:36px !important;
}

.user-nav{
    margin-left:auto !important;
    display:flex !important;
    gap:10px !important;
    align-items:center !important;
    color:#fff !important;
    flex:0 0 auto !important;
}
.user-nav a{color:#fff !important;font-weight:bold !important}
.user-name{
    max-width:160px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

/* MAIN NAV */
.main-nav{
    background:#fff !important;
    border-bottom:1px solid var(--border) !important;
    box-shadow:0 1px 3px rgba(0,0,0,.08) !important;
    display:flex !important;
    justify-content:center !important;
    gap:0 !important;
    flex-wrap:wrap !important;
}
.main-nav a{
    display:block !important;
    padding:12px 16px !important;
    color:var(--blue) !important;
    font-weight:bold !important;
    text-decoration:none !important;
    border-left:1px solid #edf1f5 !important;
}
.main-nav a:hover{
    background:#f8fbff !important;
    color:#000 !important;
}

/* PAGE */
.page{
    max-width:1200px !important;
    margin:18px auto !important;
    padding:0 16px !important;
}
.card,.auth-panel{
    background:var(--card) !important;
    border:1px solid var(--border) !important;
    border-radius:6px !important;
    box-shadow:0 2px 5px rgba(0,0,0,.08) !important;
    margin-bottom:14px !important;
    padding:16px !important;
}
.card h1,.card h2,.card h3,
.dashboard-hero h1,.dashboard-hero h2{
    color:var(--blue) !important;
}

/* DASHBOARD */
.dashboard-hero{
    background:linear-gradient(#fffbe7,#fff7c9) !important;
    border:1px solid #ead47b !important;
    border-radius:6px !important;
    padding:18px !important;
    margin-bottom:18px !important;
    display:flex !important;
    justify-content:space-between !important;
    gap:16px !important;
    align-items:center !important;
}
.dashboard-hero h2{
    margin:0 0 8px !important;
    font-size:24px !important;
}
.dashboard-hero p{
    margin:0 !important;
    color:#4c5b6c !important;
    max-width:740px;
}
.hero-actions{
    display:flex !important;
    gap:10px !important;
    flex-wrap:wrap !important;
    justify-content:flex-end !important;
}
.btn,.btn-primary,.button-primary{
    display:inline-block !important;
    border:1px solid var(--border) !important;
    border-radius:4px !important;
    padding:10px 14px !important;
    background:#fff !important;
    color:#0059b3 !important;
    font-weight:bold !important;
    cursor:pointer !important;
    text-decoration:none !important;
}
.btn.primary,.btn-primary,.button-primary{
    background:var(--blue2) !important;
    border-color:#003b7a !important;
    color:#fff !important;
}
.btn:hover,.btn-primary:hover,.button-primary:hover{
    text-decoration:none !important;
    filter:brightness(.96);
}
.stats-grid{
    display:grid !important;
    grid-template-columns:repeat(auto-fit,minmax(170px,1fr)) !important;
    gap:14px !important;
    margin-bottom:18px !important;
}
.stat-card{
    display:block !important;
    background:#fff !important;
    border:1px solid var(--border) !important;
    border-radius:6px !important;
    padding:16px !important;
    box-shadow:0 2px 5px rgba(0,0,0,.07) !important;
    color:var(--text) !important;
    text-decoration:none !important;
}
.stat-card strong{
    display:block !important;
    font-size:28px !important;
    color:var(--blue) !important;
    line-height:1.1 !important;
}
.stat-card span{
    display:block !important;
    margin-top:7px !important;
    font-weight:bold !important;
}
.two-col{
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
    gap:18px !important;
}
.quick-links{
    display:grid !important;
    gap:8px !important;
}
.quick-links a{
    display:block !important;
    background:#f8fbff !important;
    border:1px solid #d7e2ef !important;
    border-radius:4px !important;
    padding:10px 12px !important;
    font-weight:bold !important;
}
.timeline{
    list-style:none !important;
    padding:0 !important;
    margin:0 !important;
}
.timeline li{
    padding:9px 0 !important;
    border-bottom:1px solid #edf1f5 !important;
}
.timeline li span{
    display:block !important;
    font-size:12px !important;
    color:#637083 !important;
}

/* TABLES */
table{
    width:100% !important;
    border-collapse:collapse !important;
    background:#fff !important;
    border:1px solid var(--border) !important;
}
th{
    background:#e6eef7 !important;
    color:#003b7a !important;
    text-align:left !important;
}
th,td{
    padding:9px 10px !important;
    border-bottom:1px solid var(--border) !important;
}

/* FORMS */
input,select,textarea,button{
    font-family:Arial,Helvetica,sans-serif;
}
.btn-secondary{
    display:inline-block !important;
    padding:10px 14px !important;
    border:1px solid var(--border) !important;
    border-radius:4px !important;
    background:#fff !important;
    text-decoration:none !important;
}
.alert{
    padding:10px 12px !important;
    border-radius:4px !important;
    margin-bottom:14px !important;
}
.alert-error{
    background:#ffe5e5 !important;
    border:1px solid #e0a1a1 !important;
    color:#8a0000 !important;
}
.alert-success{
    background:#e7f7e7 !important;
    border:1px solid #95cf95 !important;
    color:#145214 !important;
}
.auth-page{
    display:flex !important;
    justify-content:center !important;
    padding:38px 0 !important;
}
.auth-panel{
    width:420px !important;
    padding:26px !important;
}
.auth-intro h1{
    margin:0 0 8px !important;
    color:var(--blue) !important;
    font-size:28px !important;
}
.auth-intro p{
    margin:0 0 22px !important;
    color:var(--muted) !important;
    line-height:1.5 !important;
}
.auth-form label{
    display:block !important;
    font-weight:bold !important;
    margin:14px 0 6px !important;
}
.auth-form input{
    width:100% !important;
    padding:10px !important;
    border:1px solid var(--border) !important;
    border-radius:4px !important;
    font-size:15px !important;
}
.demo-box{
    margin-top:18px !important;
    background:#fff8d7 !important;
    border:1px solid #ead47b !important;
    padding:12px !important;
    border-radius:4px !important;
    color:#5b4a00 !important;
}
.footer{
    max-width:1200px !important;
    margin:35px auto 0 !important;
    padding:18px 16px !important;
    color:var(--muted) !important;
    border-top:1px solid var(--border) !important;
}

/* THEMES */
body.theme-dark{
    background:#121820 !important;
    color:#e9eef5 !important;
}
body.theme-dark .card,
body.theme-dark .stat-card{
    background:#1d2633 !important;
    color:#e9eef5 !important;
    border-color:#39485c !important;
}
body.theme-dark table,
body.theme-dark td{
    background:#1d2633 !important;
    color:#e9eef5 !important;
    border-color:#39485c !important;
}
body.theme-dark th{
    background:#263449 !important;
    color:#fff !important;
}
body.theme-light{
    background:#eef3f8 !important;
}

/* RESPONSIVE */
@media(max-width:1050px){
    .topbar-inner{
        flex-wrap:wrap !important;
        align-items:stretch !important;
    }
    .top-search{
        max-width:none !important;
        width:100% !important;
        order:3;
    }
    .user-nav{
        margin-left:0 !important;
    }
}
@media(max-width:800px){
    .dashboard-hero{
        flex-direction:column !important;
        align-items:flex-start !important;
    }
    .hero-actions{
        justify-content:flex-start !important;
    }
    .two-col{
        grid-template-columns:1fr !important;
    }
}
@media(max-width:700px){
    .auth-panel{width:100% !important}
    .main-nav{justify-content:flex-start !important}
    .main-nav a{padding:10px 12px !important}
}

/* Etap 32 — szybkie dodanie klocka do magazynu */
.quick-stock-card { max-width: 1180px; }
.quick-stock-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 24px; align-items: start; }
.quick-stock-preview { border: 1px solid #d6e1ee; border-radius: 10px; padding: 16px; background: #f7fbff; }
.quick-stock-preview img { width: 100%; max-height: 220px; object-fit: contain; background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; }
.quick-stock-form label, .quick-stock-form fieldset { display: block; margin-bottom: 16px; }
.quick-stock-form label > span { display: block; font-weight: 700; color: #003b7a; margin-bottom: 6px; }
.quick-stock-form input, .quick-stock-form select { width: 100%; max-width: 100%; padding: 10px; border: 1px solid #b9c9dc; border-radius: 6px; background: #fff; }
.quick-stock-form select[size] { min-height: 170px; padding: 6px; }
.quick-stock-form option[hidden] { display: none; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 160px; gap: 16px; }
.quick-fieldset { border: 1px solid #d6e1ee; border-radius: 10px; padding: 16px; background: #fbfdff; }
.quick-fieldset legend { font-weight: 800; color: #003b7a; padding: 0 8px; }
.radio-row { display: flex !important; gap: 8px; align-items: center; font-weight: 700; color: #003b7a; }
.radio-row input { width: auto; }
.quick-location-picker, .quick-new-location { margin: 8px 0 18px 24px; }
.quick-filter { margin-bottom: 8px; }
@media (max-width: 800px) { .quick-stock-layout, .form-grid-2 { grid-template-columns: 1fr; } }
