* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background: #f4f5f7;
    color: #1f2933;
}
.wrap {
    max-width: 560px;
    margin: 40px auto;
    padding: 0 16px;
}
.card {
    background: #fff;
    border-radius: 10px;
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
h1 {
    font-size: 22px;
    margin: 0 0 8px;
    color: #173049;
}
p.lead {
    color: #52606d;
    margin-top: 0;
    margin-bottom: 24px;
}
label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin: 16px 0 6px;
}
input[type=text], input[type=email], select {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #cbd2d9;
    border-radius: 6px;
    font-size: 15px;
}
input:focus, select:focus { outline: 2px solid #173049; border-color: #173049; }
.btn {
    display: inline-block;
    background: #173049;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
    text-decoration: none;
}
.btn:hover { background: #0e2033; }
.btn.secondary {
    background: transparent;
    color: #173049;
    border: 1px solid #cbd2d9;
}
.error-box {
    background: #fdecea;
    color: #a1272a;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 16px;
}
.success-box {
    background: #e6f7ec;
    color: #14663a;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 16px;
}
.option-list { display: grid; gap: 10px; margin-top: 8px; }
.option-item {
    border: 1px solid #cbd2d9;
    border-radius: 8px;
    padding: 12px 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}
.option-item:has(input:checked) { border-color: #173049; background: #f0f4f8; }
.summary-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.summary-table td { padding: 8px 4px; border-bottom: 1px solid #e4e7eb; font-size: 14px; vertical-align: top; }
.summary-table td:first-child { color: #7b8794; width: 45%; }
.jst-block { border-top: 1px dashed #cbd2d9; margin-top: 16px; padding-top: 8px; }
.checkbox-row { display: flex; align-items: center; gap: 8px; margin-top: 18px; }
.checkbox-row input { width: auto; }
.hint { font-size: 12px; color: #7b8794; margin-top: 4px; }
.steps { display:flex; gap:6px; margin-bottom:24px; }
.steps span { flex:1; height:4px; border-radius:2px; background:#e4e7eb; }
.steps span.done { background:#173049; }

/* --- Panel admina: layout szerszy niż formularze publiczne --- */
body.admin { background:#eef1f4; }
.topbar {
  background:#173049; color:#fff; padding:14px 24px;
  display:flex; justify-content:space-between; align-items:center;
}
.topbar a { color:#cbd2d9; text-decoration:none; font-size:14px; margin-left:16px; }
.topbar a:hover { color:#fff; }
.topbar .brand { font-weight:700; font-size:16px; }
.container { max-width:1100px; margin:28px auto; padding:0 20px; }
.grid-cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:16px; margin-bottom:28px; }
.stat-card { background:#fff; border-radius:10px; padding:18px 20px; box-shadow:0 1px 3px rgba(0,0,0,.08); }
.stat-card .num { font-size:28px; font-weight:700; color:#173049; }
.stat-card .label { font-size:13px; color:#7b8794; margin-top:4px; }
table.data { width:100%; border-collapse:collapse; background:#fff; border-radius:10px; overflow:hidden; box-shadow:0 1px 3px rgba(0,0,0,.08); }
table.data th, table.data td { padding:10px 14px; text-align:left; font-size:14px; border-bottom:1px solid #eef1f4; }
table.data th { background:#f7f8fa; color:#52606d; font-weight:600; }
table.data tr:last-child td { border-bottom:none; }
.badge { display:inline-block; padding:2px 9px; border-radius:20px; font-size:12px; font-weight:600; }
.badge.ok { background:#e6f7ec; color:#14663a; }
.badge.warn { background:#fff4e0; color:#8a5a00; }
.badge.danger { background:#fdecea; color:#a1272a; }
.badge.muted { background:#eef1f4; color:#7b8794; }
.toolbar { display:flex; justify-content:space-between; align-items:center; margin-bottom:16px; gap:12px; flex-wrap:wrap; }
.toolbar form { display:flex; gap:8px; }
.toolbar input[type=text] { width:240px; }
.btn.small { padding:7px 14px; font-size:13px; margin-top:0; }
.btn.danger { background:#a1272a; }
.btn.danger:hover { background:#7e1d1f; }
a.link { color:#173049; text-decoration:none; font-weight:600; font-size:13px; }
a.link:hover { text-decoration:underline; }
.actions-cell { display:flex; gap:10px; }
.form-card { max-width:640px; }
.code-input { letter-spacing:8px; font-size:24px; text-align:center; text-transform:uppercase; }
