/* Style interfejsu: karty i formularze, rozwijana lista artykułów (.combo),
   pasek postępu (.bar), log oraz paleta kolorów statusów (ok / warn / err). */
* { box-sizing: border-box; }
body {
    font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    background: #f4f6f8;
    color: #1f2933;
    margin: 0;
    line-height: 1.5;
}
.wrap { max-width: 820px; margin: 32px auto; padding: 0 16px; }
h1 { font-size: 24px; margin: 0 0 4px; }
.sub { color: #52606d; margin: 0 0 24px; }
.card {
    background: #fff;
    border: 1px solid #e1e7ec;
    border-radius: 10px;
    margin-bottom: 18px;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
summary {
    cursor: pointer;
    padding: 14px 18px;
    font-weight: 600;
    user-select: none;
}
.card-body { padding: 6px 18px 18px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.toolbar-left { display: flex; gap: 12px; flex-wrap: wrap; }
.toolbar-card .card-body { padding: 14px 18px; }
label { display: block; margin: 12px 0; font-weight: 600; font-size: 14px; }
label small { display: block; font-weight: 400; color: #7b8794; margin-top: 4px; }
input[type=text], input[type=password], select {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid #cbd2d9;
    border-radius: 7px;
    font-size: 14px;
    margin-top: 4px;
    font-weight: 400;
}
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.row-top { align-items: flex-start; }
.grow { flex: 1; min-width: 180px; }
.field { margin: 12px 0; }
.field-label { display: block; font-weight: 600; font-size: 14px; }
.field small { display: block; font-weight: 400; color: #7b8794; margin-top: 4px; }
.combo { position: relative; margin-top: 4px; }
.combo-toggle {
    width: 100%; text-align: left; background: #fff; border: 1px solid #cbd2d9; border-radius: 7px;
    padding: 9px 11px; font-size: 14px; font-weight: 400; color: #1f2933; cursor: pointer;
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.combo-toggle:hover { border-color: #9fb3c8; }
.combo-toggle:disabled { background: #eef2f7; color: #7b8794; cursor: not-allowed; }
.combo-label-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.combo-caret { color: #7b8794; font-size: 12px; }
.combo-panel {
    position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px);
    background: #fff; border: 1px solid #cbd2d9; border-radius: 7px;
    box-shadow: 0 6px 18px rgba(0,0,0,.12); max-height: 240px; overflow: auto;
}
.combo-opt {
    padding: 8px 11px; font-size: 13px; cursor: pointer; border-bottom: 1px solid #f0f3f6;
}
.combo-opt:last-child { border-bottom: 0; }
.combo-opt:hover { background: #f4f6f8; }
.combo-opt.selected { background: #e8f0fe; color: #1d4ed8; font-weight: 600; }
.combo-all { font-weight: 600; }
.combo-empty { padding: 8px 11px; color: #7b8794; font-size: 13px; }
.check { display: flex; align-items: center; gap: 6px; font-weight: 400; white-space: nowrap; }
.check input { width: auto; margin: 0; }
.checks-col { margin: 12px 0; display: flex; flex-direction: column; gap: 10px; }
.checks-col .field-label { margin-bottom: 4px; }
.checks-col .check { margin: 0; }
.btn {
    background: #2563eb; color: #fff; border: 0; border-radius: 7px;
    padding: 10px 16px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.btn:hover { background: #1d4ed8; }
.btn:disabled { background: #9fb3c8; cursor: not-allowed; }
.btn-secondary { background: #52606d; }
.btn-secondary:hover { background: #3e4c59; }
.btn-danger { background: #c0392b; }
.btn-danger:hover { background: #a93226; }
.status { margin-top: 12px; font-size: 14px; }
.status:empty { margin-top: 0; }
.status .ok { color: #157347; }
.status .warn { color: #b7791f; }
.status .err { color: #c0392b; }
.note { font-size: 13px; color: #7b8794; margin-top: 8px; min-height: 18px; }
.note .warn { color: #b7791f; }
.hidden { display: none; }
.bar {
    height: 14px; background: #e1e7ec; border-radius: 7px; overflow: hidden; margin: 18px 0 10px;
}
#bar-fill { height: 100%; width: 0; background: #2563eb; transition: width .15s; }
.counts { font-size: 14px; color: #3e4c59; }
.counts b { font-weight: 700; }
.log {
    margin-top: 14px; background: #0f172a; color: #cbd5e1; border-radius: 8px;
    padding: 12px; max-height: 320px; overflow: auto; font-size: 12.5px;
    white-space: pre-wrap; word-break: break-word;
}
.log .ok { color: #4ade80; }
.log .skip { color: #fbbf24; }
.log .err { color: #f87171; }
code { background: #eef2f7; padding: 1px 5px; border-radius: 4px; font-size: 12px; }
