/* =========================================================
   PANEL ADMINISTRATORA — kalendarz i raport klasy po lewej, raporty po prawej
   ========================================================= */
[hidden] { display: none !important; }
body.admin { overflow: auto; height: auto; min-height: 100dvh; user-select: text; -webkit-user-select: text; }
.hud-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.hud-grid {
  position: absolute; inset: 0;
  background:
    linear-gradient(rgba(59,228,255,.045) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, rgba(59,228,255,.045) 1px, transparent 1px) 0 0 / 48px 48px,
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(125,155,69,.14), transparent 70%), var(--bg);
}
.hud-vignette { position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.6)); }

input, select, textarea.field-area {
  font: inherit; color: var(--text);
  background: var(--input-bg); border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  padding: 12px 14px; min-height: 52px; width: 100%;
}
input:focus, select:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cyan) 22%, transparent); outline: none; }
input[type=date] { color-scheme: dark; }
input[type=range] { min-height: 44px; padding: 0; accent-color: var(--cyan); background: none; border: 0; }
input[type=checkbox], input[type=radio] { width: 22px; height: 22px; min-height: 0; accent-color: var(--cyan); flex: none; }

/* ===== logowanie ===== */
.login { position: relative; z-index: 1; min-height: 100dvh; display: grid; place-items: center; padding: 20px max(16px, env(safe-area-inset-left)); }
.login-card {
  width: min(480px, 100%); display: grid; gap: 14px; padding: clamp(20px, 4vw, 32px);
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
}
.login-card-hint { font-size: 15px; color: var(--muted); line-height: 1.45; }
.back { color: var(--muted); text-decoration: none; font-size: 14px; }
.back:hover { color: var(--cyan); }
.kicker { font-family: var(--mono); font-size: 12px; letter-spacing: .2em; color: var(--lime); }
.login h1 { font-size: 28px; line-height: 1.1; }
.login .step { display: grid; gap: 10px; }
.login .step label { font-size: 14px; color: var(--muted); letter-spacing: .04em; }
.otp { font-family: var(--mono); font-size: 32px; letter-spacing: .5em; text-align: center; }
.link { color: var(--cyan); font-size: 14px; justify-self: start; text-decoration: underline; min-height: 44px; }
.msg { min-height: 1.4em; font-size: 15px; color: var(--muted); }
.msg.err { color: var(--red); } .msg.ok { color: var(--lime); }

/* ===== panel ===== */
.dash { position: relative; z-index: 1; padding: var(--pad) max(var(--pad), env(safe-area-inset-right)) var(--pad) max(var(--pad), env(safe-area-inset-left)); display: grid; gap: var(--gap); }
.dash-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--gap); }
.dash-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.dash-actions .btn3d, .present-exit { min-height: 52px; padding: 0 16px; font-size: 15px; --depth: 4px; }
.present-exit { display: none; }

.dash-body { display: grid; grid-template-columns: minmax(290px, 360px) minmax(0, 1fr); gap: var(--gap); align-items: start; }
.side, .main { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: var(--pad); min-width: 0; }
.side { display: grid; gap: 18px; position: sticky; top: var(--pad); }

.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.quick button, .class-pick-row button {
  min-height: 48px; border-radius: var(--r-sm); font-size: 14px; font-weight: 700;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--muted);
  transition: color .15s, background .15s, border-color .15s, box-shadow .15s, transform .1s;
}
.quick button:hover, .class-pick-row button:hover { color: var(--text); border-color: var(--line-strong); }
.quick button:active, .class-pick-row button:active { transform: translateY(2px); }
.quick button.on, .class-pick-row button.on {
  color: #02161d; background: linear-gradient(180deg, var(--send-1), var(--send-2)); border-color: transparent;
  box-shadow: 0 0 18px color-mix(in srgb, var(--send-1) 40%, transparent);
}

.class-pick h3 { font-size: 13px; letter-spacing: .16em; color: var(--muted); margin-bottom: 8px; }
.class-pick-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.class-pick-row button[data-k=""] { grid-column: 1 / -1; }

.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-head strong { font-size: 18px; text-transform: capitalize; }
.cal-head button { width: 44px; height: 44px; border-radius: 50%; font-size: 26px; color: var(--muted); background: var(--panel-2); }
.cal-head button:hover { color: var(--cyan); }
.cal-dow, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow span { text-align: center; font-size: 12px; color: var(--dim); letter-spacing: .08em; padding-bottom: 4px; }
.cal-grid button {
  position: relative; aspect-ratio: 1; border-radius: 10px; font-size: 15px; font-weight: 700;
  background: var(--panel-2); color: var(--muted); border: 1px solid transparent; min-height: 36px;
}
.cal-grid button.out { opacity: .3; }
.cal-grid button.has { color: var(--text); }
.cal-grid button.has::after {
  content: ""; position: absolute; left: 50%; bottom: 5px; transform: translateX(-50%);
  width: var(--dot, 5px); height: 4px; border-radius: 2px; background: var(--amber);
}
.cal-grid button.today { border-color: var(--lime); }
.cal-grid button.inrange { background: color-mix(in srgb, var(--cyan) 16%, transparent); color: var(--text); }
.cal-grid button.edge { background: linear-gradient(180deg, var(--send-1), var(--send-2)); color: #02161d; }
.cal-hint { font-size: 12px; color: var(--dim); margin-top: 8px; }
.range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.range label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); letter-spacing: .08em; }

/* ===== raport ===== */
.main { display: grid; gap: var(--gap); }
.report-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.range-title { font-size: clamp(18px, 2vw, 28px); text-wrap: balance; }
.class-badge {
  padding: 6px 14px; border-radius: 999px; font-weight: 800; letter-spacing: .12em; font-size: 14px;
  color: #02161d; background: linear-gradient(180deg, var(--send-1), var(--send-2));
  animation: badgePulse 2.4s ease-in-out infinite;
}
@keyframes badgePulse { 50% { box-shadow: 0 0 22px color-mix(in srgb, var(--send-1) 60%, transparent); } }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.kpi {
  display: grid; gap: 4px; align-content: start; padding: 16px; border-radius: var(--r-sm); min-width: 0;
  background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line);
}
.kpi small { font-size: 12px; letter-spacing: .14em; color: var(--muted); text-transform: uppercase; }
.kpi strong { font-family: var(--mono); font-size: clamp(28px, 3.2vw, 48px); color: var(--amber); line-height: 1.05; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-stars { color: var(--amber); letter-spacing: .1em; font-size: 18px; }
.kpi-sub { font-size: 13px; color: var(--muted); }

/* liczby: wjazd z powiększeniem, potem delikatny oddech */
.num { display: inline-block; transform-origin: left center; }
.num.pop { animation: numPop .7s var(--ease-spring); }
@keyframes numPop { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }

.reports { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.report {
  display: grid; gap: 14px; padding: clamp(14px, 1.6vw, 22px); border-radius: var(--r-sm); min-width: 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel-3) 70%, transparent), var(--panel-2));
  border: 1px solid var(--line);
  animation: rise .6s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 90ms);
}
.report-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.report-top h3 { font-size: clamp(20px, 2vw, 30px); font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.report-top .meta { font-size: 13px; color: var(--muted); }
.report-avg { text-align: right; }
.report-avg strong { font-family: var(--mono); font-size: clamp(26px, 2.6vw, 40px); color: var(--amber); }
.report-avg span { display: block; color: var(--amber); letter-spacing: .1em; }

.ans { display: grid; grid-template-columns: minmax(5.5em, 8.5em) minmax(60px, 1fr) 3.6em 2.8em; align-items: center; gap: 10px; }
.ans-label { font-weight: 700; font-size: clamp(14px, 1.15vw, 17px); }
.ans-bar { position: relative; height: clamp(16px, 1.8vw, 24px); border-radius: 6px; background: rgba(255,255,255,.06); overflow: hidden; }
.ans-bar i {
  position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 6px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 70%, #000), var(--c));
  box-shadow: 0 0 14px color-mix(in srgb, var(--c) 45%, transparent);
  transition: width 1.1s var(--ease-out);
}
.ans-bar i::after { /* błysk przechodzący przez pasek */
  content: ""; position: absolute; inset: 0; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent);
  transform: translateX(-120%); animation: barSweep 5s ease-in-out infinite; animation-delay: calc(1.2s + var(--j, 0) * .25s);
}
@keyframes barSweep { 0%, 70% { transform: translateX(-120%); } 95%, 100% { transform: translateX(320%); } }
.ans-pct { font-family: var(--mono); font-weight: 800; font-size: clamp(15px, 1.3vw, 22px); text-align: right; color: var(--text); display: inline-block; transform-origin: right center; }
.ans-pct.pulse { animation: pctPulse 2.8s ease-in-out infinite; animation-delay: calc(1.3s + var(--j, 0) * .35s); }
.ans.lead .ans-pct { color: var(--c); }
.ans.lead .ans-pct.pulse { animation-name: pctPulseLead; }
@keyframes pctPulse { 50% { transform: scale(1.06); } }
@keyframes pctPulseLead { 50% { transform: scale(1.12); text-shadow: 0 0 14px color-mix(in srgb, var(--c) 70%, transparent); } }
.ans-n { font-family: var(--mono); font-size: 13px; color: var(--muted); text-align: right; }
.empty-note { color: var(--dim); font-size: 15px; padding: 10px 0; }

.extras { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(0, 1fr) minmax(0, 1.3fr); gap: var(--gap); align-items: stretch; }
.card { padding: 16px; border-radius: var(--r-sm); background: var(--panel-2); border: 1px solid var(--line); min-width: 0; display: grid; gap: 10px; align-content: start; }
.card h3 { font-size: 13px; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
.time-card .cv { position: relative; height: 220px; }
/* okrąg z liczbą głosów z wybranego okresu — wewnątrz wykresu, w górnym pasie (słupki mają zapas nad sobą) */
.vote-ring {
  position: absolute; top: 2px; right: 6px; z-index: 2;
  width: clamp(66px, 26%, 96px); aspect-ratio: 1; max-width: 100%;
  border-radius: 50%;
  display: grid; place-content: center; justify-items: center; gap: 0;
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--panel-3) 92%, transparent), color-mix(in srgb, var(--panel) 92%, transparent));
  border: 3px solid var(--cyan);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--cyan) 18%, transparent), 0 8px 20px rgba(0,0,0,.45);
  pointer-events: none;
  animation: voteRing 2.6s ease-in-out infinite;
}
.vote-ring strong { font-family: var(--mono); font-weight: 800; font-size: clamp(18px, 2vw, 30px); line-height: 1; color: var(--text); }
.vote-ring small { font-size: clamp(9px, .8vw, 12px); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
@keyframes voteRing {
  0%, 100% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--cyan) 18%, transparent), 0 8px 20px rgba(0,0,0,.45); }
  50%      { box-shadow: 0 0 0 9px color-mix(in srgb, var(--cyan) 10%, transparent), 0 0 26px color-mix(in srgb, var(--cyan) 55%, transparent); }
}
body.present .time-card .cv { height: 300px; }
body.present .vote-ring { width: clamp(90px, 22%, 130px); }
body.present .vote-ring strong { font-size: clamp(26px, 2.6vw, 42px); }
.bars { display: grid; gap: 10px; }
.bars .ans { grid-template-columns: 5.6em minmax(0, 1fr) 3.6em; }
.bars .ans.click { cursor: pointer; border-radius: 6px; }
.bars .ans.click:hover .ans-label { color: var(--cyan); }

.tile {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; text-align: left;
  padding: 18px; border-radius: var(--r-sm); min-height: 120px;
  background: linear-gradient(180deg, var(--panel-3), var(--panel-2)); border: 1px solid var(--line-strong);
  box-shadow: 0 6px 0 var(--steel-edge), 0 14px 24px rgba(0,0,0,.4);
  transition: transform .1s var(--ease-out), box-shadow .1s, border-color .2s;
}
.tile { grid-template-columns: auto minmax(0, 1fr); align-content: start; align-items: center; }
.tile-go { grid-row: 1; grid-column: 2; justify-self: end; }
.tile-txt { grid-column: 1 / -1; }
.tile:hover { border-color: var(--cyan); }
.tile:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--steel-edge), 0 4px 10px rgba(0,0,0,.4); }
.tile-icon { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 14px; color: var(--cyan); background: color-mix(in srgb, var(--cyan) 12%, transparent); border: 1px solid color-mix(in srgb, var(--cyan) 40%, transparent); animation: iconPulse 2.6s ease-in-out infinite; }
.tile-icon svg { width: 70%; }
@keyframes iconPulse { 50% { box-shadow: 0 0 20px color-mix(in srgb, var(--cyan) 45%, transparent); } }
.tile-txt { display: grid; gap: 4px; }
.tile-txt strong { font-size: 17px; }
.tile-txt small { font-size: 13px; color: var(--muted); line-height: 1.35; }
.season-sum { display: grid; gap: 6px; margin-top: 6px; }
.season-sum div { display: flex; flex-wrap: wrap; column-gap: 10px; row-gap: 2px; font-size: 13px; color: var(--muted); }
.season-sum b { color: var(--text); letter-spacing: .06em; flex-basis: 100%; }
.season-sum em { font-style: normal; font-family: var(--mono); color: var(--lime); }
.tile-go { font-size: 30px; color: var(--muted); }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ===== okno (przyprawy i sól, wydruk) ===== */
.modal { position: fixed; inset: 0; z-index: 75; display: grid; place-items: center; padding: 16px; background: rgba(0,0,0,.6); opacity: 0; visibility: hidden; transition: .25s; }
.modal.show { opacity: 1; visibility: visible; }
.modal-panel {
  width: min(980px, 100%); max-height: calc(100dvh - 32px); display: grid; grid-template-rows: auto 1fr;
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--r);
  box-shadow: 0 40px 100px rgba(0,0,0,.7);
  transform: scale(.94) translateY(12px); transition: transform .35s var(--ease-spring);
}
.modal.show .modal-panel { transform: none; }
.modal-panel header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); gap: 12px; }
.modal-panel h2 { font-size: 20px; }
.modal-body { overflow: auto; padding: 18px 20px 24px; }
.season-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.season { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 14px; align-items: center; padding: 16px; border-radius: var(--r-sm); background: var(--panel-2); border: 1px solid var(--line); animation: rise .5s var(--ease-out) both; animation-delay: calc(var(--i) * 80ms); }
.season h4 { grid-column: 1 / -1; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.season .bars .ans { grid-template-columns: 6.2em minmax(0, 1fr) 3.8em 3em; }
.season .donut { position: relative; height: 120px; }
.season .ok-share { grid-column: 1 / -1; font-size: 13px; color: var(--muted); }
.print-opts { display: grid; gap: 14px; }
.print-opts label { display: flex; align-items: center; gap: 12px; font-size: 17px; min-height: 44px; }

/* ===== szuflada ===== */
.drawer { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.55); opacity: 0; visibility: hidden; transition: .25s; }
.drawer.show { opacity: 1; visibility: visible; }
.drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(600px, 100%);
  display: grid; grid-template-rows: auto 1fr;
  background: var(--panel); border-left: 1px solid color-mix(in srgb, var(--cyan) 35%, transparent);
  box-shadow: -30px 0 80px rgba(0,0,0,.6);
  transform: translateX(100%); transition: transform .35s var(--ease-out);
  padding-top: env(safe-area-inset-top);
}
.drawer.show .drawer-panel { transform: none; }
.drawer-panel header { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer-panel h2 { font-size: 20px; }
.x { width: 44px; height: 44px; border-radius: 50%; background: var(--panel-2); font-size: 18px; color: var(--muted); flex: none; }
.drawer-body { overflow: auto; padding: 16px 20px 40px; display: grid; gap: 12px; align-content: start; }

.row-item { padding: 12px 14px; border-radius: var(--r-sm); background: var(--panel-2); border: 1px solid var(--line); display: grid; gap: 4px; }
.row-item time { font-family: var(--mono); font-size: 12px; color: var(--cyan); }
.row-item p { font-size: 16px; line-height: 1.35; overflow-wrap: anywhere; }
.row-item .tag { font-size: 11px; color: #1a2405; background: var(--lime); padding: 1px 6px; border-radius: 4px; justify-self: start; }
.row-item.click { cursor: pointer; } .row-item.click:hover { border-color: var(--cyan); }
.field { display: grid; gap: 4px; }
.field label { font-size: 12px; letter-spacing: .08em; color: var(--muted); }
.field .hint { font-size: 12px; color: var(--dim); }
.form-actions { position: sticky; bottom: -40px; padding: 12px 0 20px; background: var(--panel); }
.form-actions .btn3d { width: 100%; }
.hist-wrap { overflow-x: auto; }
.hist { width: 100%; border-collapse: collapse; font-size: 14px; }
.hist th, .hist td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.hist th { color: var(--muted); font-weight: 600; font-size: 12px; letter-spacing: .06em; }

/* ===== WYGLĄD ===== */
.look-sec { display: grid; gap: 12px; padding: 16px; border-radius: var(--r-sm); background: var(--panel-2); border: 1px solid var(--line); }
.look-sec h3 { font-size: 14px; letter-spacing: .14em; text-transform: uppercase; }
.look-sec > p { font-size: 13px; color: var(--muted); line-height: 1.4; }
.skins { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.skin-opt { position: relative; display: grid; gap: 8px; padding: 10px; border-radius: var(--r-sm); border: 2px solid var(--line); background: var(--panel); cursor: pointer; text-align: left; }
.skin-opt:has(input:checked) { border-color: var(--cyan); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cyan) 25%, transparent); }
.skin-opt input { position: absolute; opacity: 0; }
.skin-opt strong { font-size: 15px; letter-spacing: .06em; }
.skin-prev { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; padding: 10px; border-radius: 6px; background: var(--panel); border: 1px solid var(--line); }
.skin-prev i { height: 26px; border-radius: 4px; }
.skin-prev .g { background: linear-gradient(180deg, var(--good-1), var(--good-2)); }
.skin-prev .o { background: linear-gradient(180deg, var(--ok-1), var(--ok-2)); }
.skin-prev .b { background: linear-gradient(180deg, var(--bad-1), var(--bad-2)); }
.skin-prev .s { grid-column: 1 / -1; height: 22px; background: linear-gradient(180deg, var(--ready-1), var(--ready-2)); }
.skin-prev-obecna {
  --panel: #0d131a; --line: rgba(150,185,205,.14);
  --good-1: #9de34a; --good-2: #4f8f1f; --ok-1: #ffc95a; --ok-2: #d8871a; --bad-1: #ff7a66; --bad-2: #c62f25;
  --ready-1: #c4f75a; --ready-2: #4f9a1c;
  background: linear-gradient(rgba(59,228,255,.06) 1px, transparent 1px) 0 0 / 12px 12px, #0d131a;
}
.skin-prev-moro { background: linear-gradient(rgba(16,20,11,.35), rgba(16,20,11,.5)), url("../assets/camo/wz93.jpg") center / cover; }
.skin-prev-moro i { border: 1px solid rgba(0,0,0,.4); }
.skin-prev-moro .s { background: linear-gradient(180deg, var(--ready-1), var(--ready-2)); box-shadow: 0 0 0 2px #fff; }
.sound-opts { display: grid; gap: 8px; }
.sound-opt { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 8px 10px; min-height: 52px; border-radius: var(--r-sm); background: var(--panel); border: 1px solid var(--line); cursor: pointer; }
.sound-opt:has(input:checked) { border-color: var(--cyan); }
.sound-opt .play { min-height: 40px; padding: 0 12px; border-radius: 8px; background: var(--panel-3); color: var(--text); font-weight: 700; font-size: 13px; }
.check { display: flex; align-items: center; gap: 12px; min-height: 44px; font-size: 15px; }
.logo-box { display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: center; }
.logo-prev { width: 120px; height: 120px; border-radius: 12px; display: grid; place-items: center; background: repeating-conic-gradient(var(--panel-3) 0 25%, var(--panel) 0 50%) 0 0 / 16px 16px; border: 1px solid var(--line); overflow: hidden; color: var(--dim); font-size: 12px; text-align: center; padding: 6px; }
.logo-prev img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-actions { display: grid; gap: 8px; }
.logo-actions input[type=file] { padding: 10px; min-height: 48px; }
.mini-btn { min-height: 44px; padding: 0 14px; border-radius: 8px; background: var(--panel-3); color: var(--text); font-weight: 700; font-size: 14px; justify-self: start; }

/* ===== tryb prezentacji (dla dyrektora) ===== */
body.present .side, body.present .dash-actions { display: none; }
body.present .present-exit { display: inline-flex; align-items: center; }
body.present .dash-body { grid-template-columns: 1fr; }
body.present .main { padding: clamp(16px, 2.4vw, 40px); }
body.present .range-title { font-size: clamp(24px, 3vw, 44px); }
body.present .kpi strong { font-size: clamp(36px, 4.6vw, 72px); }
body.present .report-top h3 { font-size: clamp(26px, 3vw, 46px); }
body.present .ans-label { font-size: clamp(16px, 1.6vw, 26px); }
body.present .ans-pct { font-size: clamp(20px, 2.2vw, 34px); }
body.present .ans-bar { height: clamp(22px, 2.4vw, 36px); }

/* ===== responsywność ===== */
@media (max-width: 1360px) { .reports { grid-template-columns: 1fr; } }
@media (max-width: 1200px) { .extras { grid-template-columns: 1fr 1fr; } .time-card { grid-column: 1 / -1; } }
/* układ pionowy i mobilny: najpierw raporty, pod nimi wybór okresu i kalendarz (o połowę mniejszy) */
@media (max-width: 980px), (max-aspect-ratio: 1/1) {
  .dash-body { grid-template-columns: 1fr; }
  .main { order: 1; }
  .side { order: 2; position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto auto 1fr auto; align-items: start; column-gap: var(--gap); }
  .side > .quick { grid-column: 1; grid-row: 1; }
  .side > .class-pick { grid-column: 1; grid-row: 2; }
  .side > .cal, .side > .range { grid-column: 2; }
  .side > .cal { grid-row: 1 / span 3; }
  .side > .range { grid-row: 4; }
  .side > .range.wheels { grid-column: 1 / -1; }
  .reports { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* kalendarz w połowie szerokości panelu */
  .cal-head strong { font-size: 15px; }
  .cal-head button { width: 36px; height: 36px; font-size: 22px; }
  .cal-grid button { font-size: 13px; border-radius: 7px; min-height: 0; }
  .cal-dow span { font-size: 10px; }
}
@media (max-width: 640px) {
  /* telefon: jedna kolumna, kalendarz o połowę niższy (dni jako niskie kafelki) */
  .side { grid-template-columns: 1fr; grid-template-rows: none; }
  .side > .quick, .side > .class-pick, .side > .cal, .side > .range { grid-column: 1; grid-row: auto; }
  .cal-grid button { aspect-ratio: auto; height: 28px; font-size: 12px; }
  .cal-grid button.has::after { bottom: 2px; height: 3px; }
  .cal-grid, .cal-dow { gap: 3px; }
  .cal-hint { display: none; }
  .extras { grid-template-columns: 1fr; }
  .season-grid { grid-template-columns: 1fr; }
  .season { grid-template-columns: minmax(0, 1fr) 90px; }
  .ans { grid-template-columns: minmax(70px, 7.5em) minmax(0, 1fr) 3.6em 3em; gap: 8px; }
  .dash-actions .btn3d { flex: 1 1 calc(50% - 8px); font-size: 14px; }
  .skins { grid-template-columns: 1fr; }
  .logo-box { grid-template-columns: 1fr; }
}
@media (max-width: 420px) { .kpis { grid-template-columns: 1fr; } .ans-n { display: none; } .ans { grid-template-columns: minmax(70px, 7em) minmax(0, 1fr) 3.6em; } }

/* ===== RAPORT DO DRUKU / PDF ===== */
.print-report { display: none; }
@media print {
  @page { size: A4; margin: 14mm 12mm; }
  html, body.admin { background: #fff !important; color: #111 !important; height: auto; overflow: visible; }
  body.admin > *:not(.print-report) { display: none !important; }
  .print-report { display: block !important; font-family: Arial, Helvetica, sans-serif; color: #111; font-size: 11pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pr-head { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 3px solid #111; padding-bottom: 6px; margin-bottom: 10px; }
  .pr-head h1 { font-size: 20pt; margin: 0; }
  .pr-head .pr-meta { text-align: right; font-size: 9.5pt; color: #444; }
  .pr-kpis { display: flex; gap: 10px; margin: 8px 0 12px; }
  .pr-kpis div { flex: 1; border: 1px solid #bbb; border-radius: 6px; padding: 6px 10px; }
  .pr-kpis small { display: block; font-size: 8pt; text-transform: uppercase; letter-spacing: .08em; color: #555; }
  .pr-kpis b { font-size: 17pt; }
  .pr-sec { break-inside: avoid; margin: 10px 0 14px; }
  .pr-sec h2 { font-size: 13pt; margin: 0 0 6px; padding: 3px 8px; background: #eee; border-left: 5px solid #111; }
  .pr-sec h3 { font-size: 11pt; margin: 8px 0 4px; }
  .pr-table { width: 100%; border-collapse: collapse; }
  .pr-table td, .pr-table th { padding: 3px 6px; border-bottom: 1px solid #ddd; font-size: 10pt; text-align: left; }
  .pr-table th { font-size: 8.5pt; color: #555; text-transform: uppercase; letter-spacing: .05em; }
  .pr-table .r { text-align: right; white-space: nowrap; }
  .pr-bar { height: 10px; background: #eee; border-radius: 3px; overflow: hidden; width: 100%; }
  .pr-bar i { display: block; height: 100%; }
  .pr-cols { display: flex; gap: 14px; }
  .pr-cols > * { flex: 1; min-width: 0; }
  .pr-comments { columns: 2; column-gap: 16px; font-size: 9.5pt; }
  .pr-comments p { break-inside: avoid; margin: 0 0 5px; padding-bottom: 4px; border-bottom: 1px dotted #ccc; }
  .pr-comments time { color: #666; font-size: 8.5pt; }
  .pr-foot { margin-top: 12px; font-size: 8.5pt; color: #666; border-top: 1px solid #ccc; padding-top: 4px; }
  .pr-page { break-before: page; }
}

/* ===== MORO w panelu ===== */
body.admin[data-skin="moro"] .hud-grid {
  background:
    repeating-linear-gradient(45deg, rgba(0,0,0,.07) 0 1px, transparent 1px 3px),
    linear-gradient(rgba(10,12,7,.2), rgba(10,12,7,.4)),
    url("../assets/camo/wz93.jpg") center / cover;
}
body.admin[data-skin="moro"] .kpi,
body.admin[data-skin="moro"] .report,
body.admin[data-skin="moro"] .card,
body.admin[data-skin="moro"] .season,
body.admin[data-skin="moro"] .look-sec,
body.admin[data-skin="moro"] .row-item,
body.admin[data-skin="moro"] .quick button,
body.admin[data-skin="moro"] .class-pick-row button,
body.admin[data-skin="moro"] .cal-grid button,
body.admin[data-skin="moro"] .cal-head button,
body.admin[data-skin="moro"] .x {
  background: linear-gradient(rgba(14,17,10,.66), rgba(14,17,10,.74)), url("../assets/camo/woodland.jpg") center / 420px auto;
  border-color: var(--line-strong);
}
body.admin[data-skin="moro"] .quick button,
body.admin[data-skin="moro"] .class-pick-row button,
body.admin[data-skin="moro"] .cal-grid button { color: #ffffff; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
body.admin[data-skin="moro"] .cal-grid button.out { opacity: .35; }
body.admin[data-skin="moro"] .quick button.on,
body.admin[data-skin="moro"] .class-pick-row button.on,
body.admin[data-skin="moro"] .cal-grid button.edge,
body.admin[data-skin="moro"] .class-badge {
  color: #ffffff;
  background: linear-gradient(180deg, var(--send-1), var(--send-2));
  border-color: #ffffff;
  box-shadow: 0 0 18px rgba(210,58,82,.55);
}
body.admin[data-skin="moro"] .cal-grid button.inrange:not(.edge) { background: linear-gradient(rgba(138,22,40,.55), rgba(138,22,40,.6)); }
body.admin[data-skin="moro"] .cal-grid button.today { border-color: #ffffff; }
body.admin[data-skin="moro"] #kTop { white-space: normal; font-size: clamp(24px, 2.4vw, 40px); letter-spacing: 0; }
body.admin[data-skin="moro"] .kpi strong,
body.admin[data-skin="moro"] .report-avg strong { color: #ffffff; text-shadow: 0 2px 10px rgba(0,0,0,.6); }
body.admin[data-skin="moro"] .kpi-stars,
body.admin[data-skin="moro"] .report-avg span { color: var(--amber); }
body.admin[data-skin="moro"] .ans-bar { background: rgba(0,0,0,.35); }
body.admin[data-skin="moro"] .tile {
  background: linear-gradient(rgba(14,17,10,.6), rgba(14,17,10,.7)), url("../assets/camo/woodland.jpg") 30% 60% / 420px auto;
  border-color: rgba(255,255,255,.4);
}
body.admin[data-skin="moro"] .tile-icon { color: #ffffff; background: rgba(138,22,40,.55); border-color: var(--beret-hi); }
body.admin[data-skin="moro"] .tile:hover { border-color: var(--beret-hi); }
body.admin[data-skin="moro"] .season-sum em { color: #ffffff; }
body.admin[data-skin="moro"] .row-item time { color: #ff9aa9; }
body.admin[data-skin="moro"] .dash-actions .btn3d, body.admin[data-skin="moro"] .present-exit { padding: 0 20px; }
body.admin[data-skin="moro"] .skin-opt:has(input:checked) { border-color: var(--beret-hi); box-shadow: 0 0 0 3px rgba(210,58,82,.35); }
body.admin[data-skin="moro"] .sound-opt:has(input:checked) { border-color: var(--beret-hi); }
body.admin[data-skin="moro"] .kicker { color: #ffffff; }

/* =========================================================
   JEDEN EKRAN BEZ PRZEWIJANIA — desktop i tablet w pionie.
   Zupa i II danie obok siebie; kalendarz, okres i klasa widoczne
   razem z raportem. Wysokość dzielą wiersze siatki (1fr), więc
   układ dopasowuje się do ekranu. Telefon nadal się przewija.
   ========================================================= */
@media (min-width: 981px) and (min-aspect-ratio: 1/1) and (min-height: 600px),
       (max-aspect-ratio: 1/1) and (min-width: 700px) and (min-height: 900px) {
  body.admin { height: 100dvh; overflow: hidden; }
  .dash { height: 100dvh; grid-template-rows: auto minmax(0, 1fr); gap: 10px; padding-top: 10px; padding-bottom: 10px; }

  /* pasek: tytuł + przyciski w jednym rzędzie, mniejsze przyciski */
  .dash-top { flex-wrap: nowrap; gap: 14px; }
  .dash-top .brand h1 { font-size: clamp(20px, 1.9vw, 30px); white-space: nowrap; }
  .dash-top .brand-mark { height: 38px; }
  .dash-actions { flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
  .dash-actions .btn3d, .present-exit { min-height: 42px; padding: 0 12px; font-size: 13px; --depth: 3px; }
  body.admin[data-skin="moro"] .dash-actions .btn3d { padding: 0 12px; letter-spacing: .03em; }

  .dash-body { min-height: 0; height: 100%; align-items: stretch; gap: 12px; }
  .main {
    min-height: 0; overflow: auto; /* awaryjnie, gdy ekran jest bardzo niski */
    grid-template-rows: auto auto auto minmax(0, 1fr);
    gap: 10px; padding: 14px 16px;
  }
  .report-head { gap: 10px; }
  .range-title { font-size: clamp(17px, 1.5vw, 24px); }

  .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 10px 12px; gap: 2px; }
  .kpi small { font-size: 11px; }
  .kpi strong { font-size: clamp(22px, 2.2vw, 36px); }
  .kpi-stars { font-size: 14px; }
  .kpi-sub { font-size: 12px; }

  /* ZUPA i II DANIE obok siebie */
  .reports { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .report { padding: 12px 14px; gap: 8px; }
  .report-top h3 { font-size: clamp(17px, 1.5vw, 24px); }
  .report-top .meta { font-size: 12px; }
  .report-avg strong { font-size: clamp(20px, 1.8vw, 30px); }
  .report-avg span { font-size: 12px; }
  .ans { grid-template-columns: minmax(4.5em, 7.5em) minmax(40px, 1fr) 3.2em 2.4em; gap: 8px; }
  .ans-label { font-size: clamp(12px, 1vw, 15px); }
  .ans-bar { height: clamp(12px, 1.4vh, 18px); }
  .ans-pct { font-size: clamp(14px, 1.15vw, 19px); }
  .ans-n { font-size: 12px; }

  /* dolny rząd wypełnia resztę wysokości */
  .extras { min-height: 0; grid-template-columns: minmax(180px, .8fr) minmax(0, 1fr) minmax(0, 1.4fr); gap: 10px; }
  .extras > * { min-height: 0; }
  .tile { min-height: 0; padding: 12px; gap: 8px; align-content: start; }
  .tile-icon { width: 44px; height: 44px; }
  .tile-txt strong { font-size: 15px; }
  .tile-txt small, .season-sum div { font-size: 12px; }
  .card { padding: 12px; gap: 6px; overflow: hidden; }
  .bars { gap: 6px; }
  .bars .ans { grid-template-columns: 5em minmax(0, 1fr) 2.6em; }
  .classes-card .kpi-sub { display: none; }
  .time-card { grid-template-rows: auto minmax(0, 1fr); align-content: stretch; grid-column: auto; }
  .time-card .cv { height: auto; min-height: 110px; }
  .vote-ring { width: clamp(58px, 24%, 86px); }

  /* lewy panel: kompaktowy */
  .side { position: static; overflow: auto; align-content: start; gap: 10px; padding: 12px; }
  .quick { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
  .quick button, .class-pick-row button { min-height: 40px; font-size: 12.5px; padding: 0 4px; }
  .class-pick h3 { font-size: 11px; margin-bottom: 5px; }
  .class-pick-row { gap: 5px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .quick button, .class-pick-row button { min-width: 0; white-space: normal; line-height: 1.1; }
  .side > * { min-width: 0; }
  .dash-top .brand { min-width: 0; flex: 0 1 auto; }
  .dash-top .brand-kicker { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .extras > *, .reports > *, .kpis > * { min-width: 0; }
  .time-card .cv { min-width: 0; width: 100%; overflow: hidden; }
  .time-card .cv canvas { max-width: 100%; }
  .cal-head { margin-bottom: 4px; }
  .cal-head strong { font-size: 15px; }
  .cal-head button { width: 34px; height: 34px; font-size: 22px; }
  .cal-dow span { font-size: 10px; padding-bottom: 2px; }
  .cal-grid, .cal-dow { gap: 3px; }
  .cal-grid button { aspect-ratio: auto; height: clamp(24px, 3.3vh, 38px); min-height: 0; font-size: 13px; border-radius: 6px; }
  .cal-grid button.has::after { bottom: 2px; height: 3px; }
  .cal-hint { display: none; }
  .range { gap: 6px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .range label { min-width: 0; }
  .range input { min-width: 0; width: 100%; }
  .range label { font-size: 11px; gap: 2px; }
  .range input { min-height: 40px; padding: 6px 8px; font-size: 13px; }

  /* tryb prezentacji: to samo, większe liczby */
  body.present .kpi strong { font-size: clamp(30px, 3.4vw, 56px); }
  body.present .ans-bar { height: clamp(16px, 2vh, 28px); }
  body.present .time-card .cv { height: auto; }
}

/* desktop: lewy panel 290 px */
@media (min-width: 981px) and (min-aspect-ratio: 1/1) and (min-height: 600px) {
  .dash-body { grid-template-columns: minmax(270px, 300px) minmax(0, 1fr); }
}

/* tablet w pionie: raport na górze (rozciąga się), pod nim okres + klasa | kalendarz */
@media (max-aspect-ratio: 1/1) and (min-width: 700px) and (min-height: 900px) {
  .dash-top { flex-wrap: wrap; }
  .dash-actions { width: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .dash-actions .btn3d { padding: 0 6px; }
  .dash-body { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .main { order: 1; }
  .side { order: 2; overflow: visible; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto auto 1fr auto; column-gap: 12px; }
  .side > .quick { grid-column: 1; grid-row: 1; }
  .side > .class-pick { grid-column: 1; grid-row: 2; }
  .side > .cal { grid-column: 2; grid-row: 1 / span 3; }
  .side > .range { grid-column: 1; grid-row: 3; align-self: end; }
  .cal-grid button { height: clamp(22px, 2.2vh, 32px); }
  .extras { grid-template-columns: minmax(0, .9fr) minmax(0, 1fr) minmax(0, 1.3fr); }
  .tile { grid-template-columns: auto minmax(0, 1fr); overflow: hidden; }
  .tile-txt > small { display: none; }
  .tile-txt strong { font-size: 14px; }
  .ans { grid-template-columns: minmax(4.5em, 6.5em) minmax(30px, 1fr) 3em 2.2em; }
}

/* ===== KARTY I GŁOSOWANIE ===== */
.reader-line { font-size: 14px; line-height: 1.4; padding-left: 22px; position: relative; color: var(--muted); }
.reader-line::before { content: ""; position: absolute; left: 2px; top: .3em; width: 11px; height: 11px; border-radius: 50%; background: var(--dim); }
.reader-line[data-ok="1"] { color: var(--text); }
.reader-line[data-ok="1"]::before { background: var(--lime); box-shadow: 0 0 0 0 var(--lime); animation: crLive 1.6s ease-in-out infinite; }
@keyframes crLive { 50% { box-shadow: 0 0 0 6px transparent; } 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--lime) 70%, transparent); } }

.learn { border-color: color-mix(in srgb, var(--cyan) 45%, transparent); }
.learn-wait { display: flex; align-items: center; gap: 16px; }
.learn-wait p { font-size: 15px; line-height: 1.45; }
.learn-wait small { color: var(--muted); font-size: 12.5px; }
.learn-radar { position: relative; width: 58px; height: 58px; flex: none; border-radius: 50%; border: 2px solid var(--cyan); background: radial-gradient(circle, color-mix(in srgb, var(--cyan) 28%, transparent), transparent 70%); }
.learn-radar i { position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--cyan); animation: learnPing 2s ease-out infinite; }
.learn-radar i:nth-child(2) { animation-delay: 1s; }
@keyframes learnPing { from { transform: scale(1); opacity: .9; } to { transform: scale(1.8); opacity: 0; } }

.learn-card { display: grid; gap: 12px; animation: rise .35s var(--ease-out); }
.learn-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.learn-head strong { font-family: var(--mono); font-size: 20px; }
.learn-head small { color: var(--muted); font-size: 12px; }
.role { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: .06em; }
.role-new { background: var(--amber); color: #1d1500; }
.role-student { background: color-mix(in srgb, var(--good-1) 85%, transparent); color: #0b1504; }
.role-admin { background: linear-gradient(180deg, var(--send-1), var(--send-2)); color: #fff; }
.warn { padding: 10px 12px; border-radius: 8px; font-size: 13px; line-height: 1.4; background: color-mix(in srgb, var(--amber) 16%, transparent); border: 1px solid var(--amber); }
.learn-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.learn-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.learn-actions .btn3d { min-height: 50px; font-size: 14px; padding: 0 10px; }

.card-list { display: grid; gap: 6px; max-height: 340px; overflow: auto; }
.card-row { grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; }
.card-row-main { display: grid; gap: 2px; min-width: 0; }
.card-row-main strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-row.off { opacity: .55; }
.card-votes { font-family: var(--mono); font-size: 20px; font-weight: 800; color: var(--amber); }
.card-votes small { font-size: 12px; color: var(--muted); }
.card-edit { gap: 10px; }
@media (max-width: 520px) { .learn-form, .learn-actions { grid-template-columns: 1fr; } }

/* ===== logowanie: karta albo kod (co pierwsze) ===== */
.login-tap { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: var(--r-sm); border: 1px dashed color-mix(in srgb, var(--cyan) 55%, transparent); background: color-mix(in srgb, var(--cyan) 7%, transparent); }
.login-tap strong { display: block; font-size: 17px; }
.login-tap small { color: var(--muted); font-size: 13px; line-height: 1.4; }
.login-tap[hidden] { display: none; }
.login-setup { display: grid; gap: 10px; padding: 14px; border-radius: var(--r-sm); border: 1px solid var(--amber); background: color-mix(in srgb, var(--amber) 12%, transparent); animation: rise .4s var(--ease-out); }
.login-setup[hidden] { display: none; }
.login-setup p { font-size: 14px; line-height: 1.45; }
.login-setup .btn3d { min-height: 52px; font-size: 14px; }
.login-or { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; color: var(--dim); font-family: var(--mono); font-size: 11px; letter-spacing: .18em; }
.login-or::before, .login-or::after { content: ""; height: 1px; background: var(--line-strong); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* ===== Karty i głosowanie: kiosk, numer, poczta ===== */
.inline-field { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 6px 0; }
.inline-field label { font-size: 14px; color: var(--muted); }
.inline-field input { width: 96px; text-align: center; font-family: var(--mono); }
.sub-h { margin-top: 12px; font-size: 14px; letter-spacing: .04em; }
.sub-h small { color: var(--muted); font-weight: 400; }
/* schemat kiosku: 4 przyciski wokół „ekranu” */
.side-pick {
  display: grid; grid-template-columns: 1fr 1.4fr 1fr; grid-template-rows: auto 74px auto;
  grid-template-areas: ". gora ." "lewo screen prawo" ". dol ."; gap: 8px; max-width: 420px; margin-top: 8px;
}
.side-pick [data-side="gora"] { grid-area: gora; } .side-pick [data-side="dol"] { grid-area: dol; }
.side-pick [data-side="lewo"] { grid-area: lewo; } .side-pick [data-side="prawo"] { grid-area: prawo; }
.side-screen { grid-area: screen; display: grid; place-items: center; border-radius: 10px; border: 2px solid var(--line-strong); background: var(--panel-2); color: var(--dim); font-family: var(--mono); font-size: 12px; letter-spacing: .2em; }
.side-pick button {
  min-height: 48px; border-radius: var(--r-sm); font-size: 13px; font-weight: 700; color: var(--muted);
  background: var(--panel-2); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; gap: 6px;
}
.side-pick button i { width: 14px; height: 9px; background: currentColor; clip-path: polygon(0 0, 50% 62%, 100% 0, 100% 38%, 50% 100%, 0 38%); }
.side-pick [data-side="gora"] i { transform: rotate(180deg); } .side-pick [data-side="lewo"] i { transform: rotate(90deg); } .side-pick [data-side="prawo"] i { transform: rotate(-90deg); }
.side-pick button.on { color: #031016; background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 18px color-mix(in srgb, var(--cyan) 50%, transparent); }
body[data-skin="moro"] .side-pick button.on { color: #fff; background: var(--beret-hi); border-color: var(--beret-hi); box-shadow: 0 0 18px rgba(210,58,82,.5); }
.mail-state { font-size: 14px; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--line-strong); }
.mail-state[data-ok="1"] { color: var(--lime); border-color: color-mix(in srgb, var(--lime) 50%, transparent); }
.mail-state[data-ok="0"] { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 50%, transparent); }
.mail-form { grid-template-columns: 1fr 1fr; }
.hint-sm { font-size: 13px; color: var(--muted); line-height: 1.4; }
@media (max-width: 560px) { .mail-form { grid-template-columns: 1fr; } }
.mail-state { margin-bottom: 8px; }

/* =========================================================
   v4 — panel: okres i kalendarz = 1/3 szerokości (poziomo) / 1/4 wysokości (pionowo),
   przewijaki dzień-miesiąc, duże okna szczegółów, większe treści w kafelkach
   ========================================================= */
button.kpi { text-align: left; color: inherit; font: inherit; cursor: pointer; position: relative; }
.kpi-click { transition: border-color .2s, transform .1s; }
.kpi-click:hover { border-color: var(--cyan); }
.kpi-click:active { transform: translateY(2px); }
.kpi-go { position: absolute; top: 8px; right: 10px; font-style: normal; color: var(--dim); font-size: 16px; }
.report { cursor: pointer; } .report:hover { border-color: var(--cyan); }
.time-card { cursor: pointer; } .time-card:hover { border-color: var(--cyan); }
.check.big { font-size: 16px; line-height: 1.35; align-items: flex-start; }
.check.big input { margin-top: 2px; }
.class-pick-row { grid-template-columns: repeat(5, minmax(0, 1fr)); }

/* przewijaki (bębny) */
.wheels { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: stretch; }
.wheel-grp { display: grid; grid-template-columns: auto 1fr 1.2fr; gap: 4px; align-items: center; min-width: 0; }
.wheel-cap { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 11px; letter-spacing: .2em; color: var(--muted); font-weight: 800; }
.wheel { position: relative; height: calc(var(--wh, 38px) * 3); border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); overflow: hidden; min-width: 0; }
.wheel-track {
  height: 100%; overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior: contain; scrollbar-width: none;
  padding: var(--wh, 38px) 0; touch-action: pan-y;
  mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent);
  -webkit-mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent);
}
.wheel-track::-webkit-scrollbar { display: none; }
.wheel-item { height: var(--wh, 38px); display: grid; place-items: center; scroll-snap-align: center; font-family: var(--mono); font-weight: 700; font-size: 16px; color: var(--dim); cursor: pointer; }
.wheel-item.on { color: var(--text); font-size: 19px; }
.wheel-sel { position: absolute; left: 4px; right: 4px; top: var(--wh, 38px); height: var(--wh, 38px); border-radius: 8px; border: 2px solid var(--cyan); pointer-events: none; box-shadow: 0 0 14px color-mix(in srgb, var(--cyan) 30%, transparent); }
.wheel-year { display: grid; grid-template-rows: auto 1fr auto; justify-items: center; align-items: center; gap: 2px; padding: 4px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); }
.wheel-year button { width: 38px; height: 34px; border-radius: 8px; color: var(--muted); font-size: 20px; background: var(--panel-3); transform: rotate(90deg); }
.wheel-year strong { font-family: var(--mono); font-size: 14px; writing-mode: vertical-rl; transform: rotate(180deg); letter-spacing: .1em; }
body.admin[data-skin="moro"] .wheel-sel { border-color: var(--beret-hi); box-shadow: 0 0 14px rgba(210,58,82,.4); }

/* klawiatura kodu logowania */
.code-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.code-pad button { min-height: 58px; border-radius: 12px; font-family: var(--mono); font-size: 26px; font-weight: 800; color: var(--text); background: linear-gradient(180deg, var(--steel-1), var(--steel-2)); box-shadow: 0 4px 0 var(--steel-edge); }
.code-pad button:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--steel-edge); }

/* duże okno szczegółów (prawie cały ekran) */
.modal.wide .modal-panel { width: min(1700px, 96vw); height: min(92dvh, 1200px); max-height: none; }
.modal.wide .modal-panel h2 { font-size: clamp(20px, 2vw, 30px); }
.detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.dcard { display: grid; gap: 10px; align-content: start; padding: clamp(14px, 1.6vw, 24px); border-radius: var(--r-sm); background: var(--panel-2); border: 1px solid var(--line); min-width: 0; animation: rise .5s var(--ease-out) both; }
.dcard.span2 { grid-column: span 2; }
.dcard h4 { font-size: clamp(13px, 1.1vw, 17px); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.dchart { position: relative; height: clamp(220px, 32vh, 420px); }
.big-num { align-content: center; justify-items: start; }
.big-num small { font-size: 14px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.big-num strong { font-family: var(--mono); font-size: clamp(56px, 7vw, 120px); color: var(--amber); line-height: 1; }
.big-num span { font-size: clamp(15px, 1.4vw, 22px); color: var(--muted); }
.big-num b { color: var(--text); font-family: var(--mono); }
.detail-split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(160px, 1fr); gap: 18px; align-items: center; }
.donut-l { height: clamp(180px, 26vh, 320px); }
.dbars .ans { grid-template-columns: minmax(6em, 9em) minmax(0, 1fr) 4em 3em; }
.dbars .ans-label { font-size: clamp(15px, 1.4vw, 22px); }
.dbars .ans-bar { height: clamp(18px, 2.4vh, 30px); }
.dbars .ans-pct { font-size: clamp(17px, 1.6vw, 26px); }
.dbars .ans-n { font-size: 15px; }
/* przyprawy i sól w dużym oknie: wszystko większe */
.modal.wide .season-grid { gap: var(--gap); }
.modal.wide .season { grid-template-columns: minmax(0, 1fr) clamp(140px, 14vw, 240px); padding: clamp(16px, 2vw, 28px); }
.modal.wide .season h4 { font-size: clamp(14px, 1.3vw, 20px); }
.modal.wide .season .bars .ans { grid-template-columns: minmax(6em, 8em) minmax(0, 1fr) 4em 3em; }
.modal.wide .season .ans-label { font-size: clamp(15px, 1.4vw, 22px); }
.modal.wide .season .ans-bar { height: clamp(18px, 2.6vh, 30px); }
.modal.wide .season .ans-pct { font-size: clamp(17px, 1.6vw, 26px); }
.modal.wide .season .donut { height: clamp(140px, 22vh, 260px); }
.modal.wide .season .ok-share { font-size: 15px; }
@media (max-width: 900px), (max-aspect-ratio: 1/1) {
  .detail-grid { grid-template-columns: 1fr 1fr; }
  .dcard.span2 { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .detail-grid, .detail-split { grid-template-columns: 1fr; }
  .modal.wide .modal-panel { width: 100vw; height: 100dvh; border-radius: 0; }
  .modal.wide { padding: 0; }
  .modal.wide .season { grid-template-columns: 1fr; }
}

/* klasy w kafelku: wiersze wypełniają wysokość, większe liczby */
.classes-card { grid-template-rows: auto minmax(0, 1fr); }
.classes-card .bars { align-content: space-evenly; height: 100%; }
.classes-card .ans-label { font-size: clamp(14px, calc(.6vw + .8vh), 22px); }
.classes-card .ans-bar { height: clamp(14px, 2.2vh, 28px); }
.classes-card .ans-pct { font-size: clamp(16px, calc(.7vw + 1vh), 26px); }
.season-tile .season-sum div { font-size: clamp(13px, calc(.5vw + .7vh), 19px); }
.season-tile .tile-txt strong { font-size: clamp(15px, calc(.6vw + .8vh), 22px); }

/* ===== jeden ekran, POZIOMO: okres + kalendarz = 1/3 szerokości ===== */
@media (min-width: 981px) and (min-aspect-ratio: 1/1) and (min-height: 600px) {
  .dash-body { grid-template-columns: minmax(300px, 33.333%) minmax(0, 1fr); }
  .side { grid-template-rows: auto auto minmax(0, 1fr) auto; height: 100%; overflow: hidden; }
  .side > .cal { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; min-height: 0; }
  .cal-grid { grid-template-rows: repeat(6, minmax(0, 1fr)); min-height: 0; }
  .cal-grid button { height: auto; min-height: 30px; font-size: clamp(13px, 1vw, 18px); }
  .cal-head strong { font-size: clamp(15px, 1.3vw, 22px); }
  .cal-hint { display: block; font-size: 12px; }
  .quick button, .class-pick-row button { min-height: clamp(40px, 5vh, 54px); font-size: clamp(12.5px, .95vw, 15px); }
  .wheels { --wh: clamp(30px, 4vh, 40px); }
  .classes-card .kpi-sub { display: none; }
}
/* ===== jeden ekran, PIONOWO (tablet): okres + kalendarz = 1/4 wysokości, w trzech kolumnach ===== */
@media (max-aspect-ratio: 1/1) and (min-width: 700px) and (min-height: 900px) {
  .dash-body { grid-template-rows: minmax(0, 1fr) 25vh; }
  .side {
    height: 25vh; overflow: hidden; padding: 10px 12px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr);
    column-gap: 12px; row-gap: 8px;
  }
  .side > .quick { grid-column: 1; grid-row: 1; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .side > .class-pick { grid-column: 1; grid-row: 2; align-self: start; }
  .side > .cal { grid-column: 2; grid-row: 1 / span 2; display: grid; grid-template-rows: auto auto minmax(0, 1fr); min-height: 0; }
  .side > .cal .cal-hint { display: none; }
  .cal-grid { grid-template-rows: repeat(6, minmax(0, 1fr)); min-height: 0; }
  .cal-grid button { height: auto; min-height: 0; }
  .side > .range.wheels { grid-column: 3; grid-row: 1 / span 2; align-self: stretch; }
  .wheels { --wh: clamp(26px, 3.6vh, 40px); grid-template-columns: 1fr; grid-template-rows: 1fr 1fr auto; }
  .wheel-year { grid-template-rows: none; grid-template-columns: auto 1fr auto; }
  .wheel-year strong { writing-mode: horizontal-tb; transform: none; }
  .wheel-year button { transform: none; }
  .wheel { height: calc(var(--wh) * 3); }
  .quick button, .class-pick-row button { min-height: 38px; font-size: 12px; }
}
/* telefon (przewijany): przewijaki pod kalendarzem, duże do kciuka */
@media (max-width: 640px) {
  .wheels { --wh: 44px; grid-template-columns: 1fr 1fr; }
  .wheel-year { grid-column: 1 / -1; grid-template-rows: none; grid-template-columns: auto 1fr auto; }
  .wheel-year strong { writing-mode: horizontal-tb; transform: none; text-align: center; font-size: 16px; }
  .wheel-year button { transform: none; width: 52px; height: 44px; }
  .wheel-item { font-size: 18px; } .wheel-item.on { font-size: 22px; }
}

/* ===== logowanie: wybór adresu; adres alternatywny i TOTP w USTAWIENIACH ===== */
.target-pick { display: grid; gap: 8px; }
.target-opt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--panel-2); cursor: pointer; min-height: 56px; }
.target-opt[hidden] { display: none; }
.target-opt:has(input:checked) { border-color: var(--cyan); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cyan) 22%, transparent); }
.target-opt input { width: 22px; height: 22px; accent-color: var(--cyan); }
.target-opt span { display: grid; gap: 2px; }
.target-opt b { font-size: 16px; } .target-opt small { color: var(--muted); font-size: 13px; letter-spacing: 0; }
body.admin[data-skin="moro"] .target-opt:has(input:checked) { border-color: var(--beret-hi); box-shadow: 0 0 0 3px rgba(210,58,82,.3); }
.alt-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 14px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.alt-row span { color: var(--muted); } .alt-row b { font-family: var(--mono); }
.alt-flow { display: grid; gap: 10px; padding: 12px; border-radius: var(--r-sm); border: 1px dashed var(--line-strong); background: var(--panel); animation: rise .35s var(--ease-out); }
.totp-secret { font-family: var(--mono); font-size: 20px; letter-spacing: .08em; padding: 10px; border-radius: 8px; background: var(--input-bg); word-break: break-all; }
#totpBox { display: grid; gap: 8px; justify-items: start; }
.learn-actions.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) { .learn-actions.three { grid-template-columns: 1fr; } }
.role-staff { background: color-mix(in srgb, var(--amber) 22%, transparent); color: var(--amber); }
.tag-kadra { font-size: 11px; letter-spacing: .12em; padding: 1px 6px; border-radius: 4px; color: #1d1000; background: var(--amber); vertical-align: middle; }
.target-opt.off { opacity: .5; cursor: not-allowed; }
.send-to { font-size: 15px; color: var(--muted); letter-spacing: .04em; }
.card-edit select { min-height: 44px; }
/* awatary w panelu (Wygląd) */
.av-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.av-slot { display: grid; justify-items: center; gap: 6px; padding: 8px; border-radius: var(--r-sm); background: var(--panel); border: 1px solid var(--line); }
.av-slot img, .av-empty { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; border: 2px solid var(--line-strong); }
.av-empty { display: grid; place-items: center; font-size: 30px; color: var(--dim); border-style: dashed; }
.av-slot.off img { filter: grayscale(1); opacity: .35; }
.av-slot small { font-size: 12px; color: var(--muted); }
.av-slot .mini-btn { justify-self: stretch; text-align: center; min-height: 38px; font-size: 13px; display: grid; place-items: center; cursor: pointer; }
/* RAPORT KLASY: 5 przycisków w jednym rzędzie — napisy skalują się do szerokości panelu, bez łamania i ucinania */
.class-pick-row { container-type: inline-size; }
.class-pick-row button:not([data-k=""]) { white-space: nowrap; overflow: hidden; padding: 0 2px; letter-spacing: 0; font-size: clamp(7px, 3.1cqi, 15px) !important; line-height: 1; letter-spacing: -.01em; }
body.admin[data-skin="moro"] .class-pick-row button:not([data-k=""]) { letter-spacing: 0; }
/* „Klasy w wybranym okresie” (także w prezentacji): etykieta zawsze w jednym wierszu, skalowana do szerokości kafelka */
.classes-card { container-type: inline-size; }
.classes-card .bars .ans, body.present .classes-card .bars .ans { grid-template-columns: max-content minmax(40px, 1fr) max-content; column-gap: clamp(8px, 2.5cqi, 16px); }
.classes-card .ans-label, body.present .classes-card .ans-label { white-space: nowrap; font-size: clamp(12px, 4.6cqi, 26px); }
.classes-card .ans-pct, body.present .classes-card .ans-pct { font-size: clamp(14px, 5.2cqi, 30px); min-width: 2ch; }
/* paski klas wyrównane do jednej linii startu (wspólne kolumny) */
.classes-card .bars { grid-template-columns: max-content minmax(40px, 1fr) max-content; column-gap: clamp(8px, 2.5cqi, 16px); }
.classes-card .bars > * { grid-column: 1 / -1; }
.classes-card .bars .ans, body.present .classes-card .bars .ans { grid-template-columns: subgrid; }
.av-slot.ct-slot img { object-fit: contain; padding: 6px; background: radial-gradient(circle at 35% 30%, #3a5c8f, #0d1830); }
.av-slot.ct-slot.ct-moro img { background: radial-gradient(circle at 35% 30%, #8a9356, #262c12); }

/* =========================================================
   v1.7 — panel logowania (bez informacji administracyjnych), monitorek, szef, DEMO ON/OFF, skiny
   ========================================================= */
.login-card .mon-link { justify-self: start; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: var(--panel-2); color: var(--muted); }
.login-card .mon-link svg { width: 26px; height: 26px; }
.login-card .mon-link:hover { color: var(--cyan); }
.other-way { justify-self: center; font-size: 13px; opacity: .7; }
.login-tap small:empty { display: none; }

/* monitorek w panelu: powrót do ekranu głosowania bez wylogowania */
.mon-btn { display: grid; place-items: center; width: 56px; height: 52px; border-radius: 12px; flex: none;
  background: var(--panel-2); border: 1px solid var(--line-strong); color: var(--cyan); box-shadow: 0 6px 16px rgba(0,0,0,.35); }
.mon-btn svg { width: 30px; height: 30px; }
.mon-btn:hover { filter: brightness(1.2); }
.dash-top { gap: 10px var(--gap); }
.dash-top .brand { flex: 1 1 auto; }
body.present .mon-btn { display: none; }

/* przełącznik DEMO ON/OFF */
.demo-switch { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 14px; border-radius: 10px;
  background: var(--panel-2); border: 1px solid var(--line-strong); cursor: pointer; user-select: none; font-weight: 800; font-size: 14px; letter-spacing: .08em; }
.demo-switch[hidden] { display: none; }
.demo-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ds-track { position: relative; width: 46px; height: 26px; border-radius: 13px; background: #2a3640; border: 1px solid var(--line-strong); transition: background .2s; }
.ds-track i { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #cfd8de; transition: transform .2s; }
.demo-switch input:checked + .ds-track { background: #c8901a; }
.demo-switch input:checked + .ds-track i { transform: translateX(20px); background: #fff; }
.demo-switch input:focus-visible + .ds-track { outline: 2px solid var(--cyan); outline-offset: 2px; }
.ds-txt b { color: var(--amber); }

/* karty szefa */
.boss-row { display: grid; gap: 8px; }
.boss-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.boss-name { flex: 1 1 160px; min-height: 42px; padding: 0 10px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line-strong); color: var(--text); font-weight: 700; }
.boss-perms { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 14px; }
.boss-perms .check { min-height: 36px; font-size: 14px; }
.boss-perms .on-fixed { opacity: .6; }
.count-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.count-tile { display: grid; justify-items: center; gap: 4px; padding: 18px 10px; border-radius: var(--r-sm); background: var(--panel); border: 1px solid var(--line); }
.count-tile strong { font-size: clamp(32px, 5vw, 56px); color: var(--cyan); }
.count-tile.dim strong { color: var(--muted); }
.count-tile small { color: var(--muted); letter-spacing: .06em; }
.clear-box { display: grid; gap: 12px; max-width: 560px; }

/* skiny */
.skin-admin { display: grid; gap: 14px; }
.skin-card { display: grid; gap: 10px; padding: 12px; border-radius: var(--r-sm); background: var(--panel); border: 1px solid var(--line-strong); }
.skin-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.skin-def { display: flex; align-items: center; gap: 10px; font-size: 17px; cursor: pointer; }
.skin-def input { width: 20px; height: 20px; }
.skin-def small { color: var(--muted); font-size: 13px; }
.skin-meta { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; font-size: 14px; color: var(--muted); }
.skin-meta select { min-height: 40px; border-radius: 8px; background: var(--panel-2); color: var(--text); border: 1px solid var(--line-strong); padding: 0 8px; margin-left: 6px; }
.skin-meta input[type="color"] { width: 46px; height: 36px; border: 0; background: none; vertical-align: middle; margin-left: 6px; }
.skin-icons { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.si-lbl { font-size: 13px; color: var(--muted); margin-right: 4px; }
.ico-opt { position: relative; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; cursor: pointer;
  background: radial-gradient(circle at 35% 30%, #3a5c8f, #0d1830); border: 2px solid var(--line-strong); }
.ico-opt img { width: 80%; height: 80%; object-fit: contain; }
.ico-opt input { position: absolute; opacity: 0; }
.ico-opt.on, .ico-opt:has(input:checked) { border-color: var(--lime); box-shadow: 0 0 0 3px rgba(185,242,75,.35); }
.skin-media { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.sm-slot { display: grid; gap: 6px; align-content: start; padding: 8px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line); }
.sm-prev { height: 78px; border-radius: 6px; background: #0a0f14 center / cover no-repeat; border: 1px solid var(--line); display: grid; place-items: center; color: var(--dim); font-size: 12px; }
.sm-prev.sm-ocena { background-size: contain; background-color: #1b2630; }
.sm-prev.sm-wygl, .sm-prev.sm-wygp { background-size: contain; background-color: #10161b; }
.sm-slot small { font-size: 12px; color: var(--muted); line-height: 1.3; }
.sm-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.sm-btns .mini-btn { min-height: 34px; font-size: 12px; padding: 0 10px; display: inline-grid; place-items: center; cursor: pointer; }
.skin-add { min-height: 50px; justify-self: start; }
.ct-sound { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ct-sound .mini-btn { display: inline-grid; place-items: center; cursor: pointer; }
.ct-sound-state { font-weight: 700; }
.ct-sound .hint-sm { flex-basis: 100%; margin: 0; }

/* =========================================================
   v1.8 — budziki, domyślny skin dla urządzeń, podgląd telefonu
   ========================================================= */
.alarms { display: grid; gap: 8px; }
.alarm-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--panel); border: 1px solid var(--line); }
.alarm-badge { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; flex: none; color: #fff;
  background: radial-gradient(circle at 35% 30%, #ff6b5f, #b3140c); box-shadow: 0 0 0 3px rgba(255,59,48,.25), 0 4px 12px rgba(0,0,0,.4); }
.alarm-badge svg { width: 64%; }
.alarm-lbl { font-weight: 800; min-width: 74px; }
.alarm-time { min-height: 44px; padding: 0 10px; border-radius: 8px; background: var(--panel-2); color: var(--text); border: 1px solid var(--line-strong);
  font: 700 20px/1 var(--mono, monospace); letter-spacing: .06em; color-scheme: dark; }
.alarm-row .check { min-height: 40px; font-size: 14px; }

.skin-defaults { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.def-btn { min-height: 38px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 800; letter-spacing: .02em;
  background: var(--panel-2); color: var(--text); border: 1px solid var(--line-strong); cursor: pointer; }
.def-btn.on { background: color-mix(in srgb, var(--lime) 22%, var(--panel-2)); border-color: var(--lime); color: #eaffc4; }

/* podgląd telefonu */
.phone-pv { position: fixed; inset: 0; z-index: 80; display: none; grid-template-rows: auto 1fr; background: rgba(4,6,9,.92); backdrop-filter: blur(6px); }
.phone-pv.show { display: grid; }
.pv-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.pv-bar b { letter-spacing: .14em; font-size: 14px; margin-right: auto; }
.pv-vibe { font-weight: 900; color: #ff6b5f; letter-spacing: .1em; animation: hotBlinkA 1s steps(2) infinite; }
@keyframes hotBlinkA { 50% { opacity: .4; } }
.pv-stage { display: grid; place-items: center; overflow: hidden; }
.pv-phone { --k: 1; position: relative; width: 414px; height: 868px; padding: 12px; border-radius: 52px; transform: scale(var(--k)); transform-origin: center;
  background: linear-gradient(145deg, #2a3138, #0c1014); box-shadow: 0 0 0 2px #3a444d, 0 30px 80px rgba(0,0,0,.7), inset 0 0 0 2px #050708; }
.pv-phone iframe { display: block; width: 390px; height: 844px; border: 0; border-radius: 40px; background: #06080c; }
.pv-notch { position: absolute; top: 18px; left: 50%; width: 110px; height: 28px; transform: translateX(-50%); border-radius: 16px; background: #000; z-index: 2; pointer-events: none; }
.pv-phone.buzz { animation: pvBuzz .09s linear infinite; }
@keyframes pvBuzz { 0% { transform: scale(var(--k)) translate(0, 0); } 25% { transform: scale(var(--k)) translate(-3px, 1px); } 50% { transform: scale(var(--k)) translate(3px, -1px); } 75% { transform: scale(var(--k)) translate(-2px, -1px); } 100% { transform: scale(var(--k)) translate(0, 0); } }

/* =========================================================
   v1.8.1 — zarejestrowane karty: kafelki → lista; zawieszanie kart
   ========================================================= */
button.count-tile { cursor: pointer; color: inherit; font: inherit; transition: border-color .15s, box-shadow .15s, transform .1s; }
button.count-tile:hover { border-color: var(--line-strong); }
button.count-tile:active { transform: scale(.98); }
button.count-tile.on { border-color: var(--cyan); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cyan) 30%, transparent); }
.count-list { margin-top: 16px; }
.count-h { margin: 6px 0 4px; font-size: 16px; letter-spacing: .06em; text-transform: uppercase; }
.count-h small { color: var(--muted); }
.row-btns { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.row-btns .mini-btn, .boss-head .mini-btn { min-height: 38px; font-size: 13px; }
.mini-btn.danger { background: color-mix(in srgb, var(--red) 22%, var(--panel-3)); }
.mini-btn.susp-btn { background: color-mix(in srgb, var(--amber) 20%, var(--panel-3)); }
.mini-btn.susp-btn.is-off { background: color-mix(in srgb, var(--lime) 22%, var(--panel-3)); }
.tag-susp { display: inline-block; padding: 2px 7px; margin-right: 4px; border-radius: 6px; font-size: 11px; font-weight: 900; letter-spacing: .08em;
  color: #1b0f00; background: var(--amber); vertical-align: middle; }
.row-item.off { opacity: .78; }
.row-item.off strong, .row-item.off .boss-name, .row-item.off .adm-name { text-decoration: line-through; text-decoration-color: rgba(255,184,63,.7); }
.adm-name { min-height: 40px; padding: 0 10px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line-strong); color: var(--text); font-weight: 700; width: min(100%, 320px); }
.admin-row .card-row-main { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }

/* zamykanie okien wykresów: duży, wyraźny przycisk (telefon: „✕ ZAMKNIJ”), nagłówek zawsze widoczny */
.modal-panel header, .drawer header { position: sticky; top: 0; z-index: 3; background: var(--panel); }
.modal-panel .x, .drawer .x {
  width: 58px; height: 58px; font-size: 28px; font-weight: 800; color: #fff;
  background: var(--panel-3); border: 2px solid var(--line-strong); box-shadow: 0 4px 12px rgba(0,0,0,.4);
}
.modal-panel .x:active, .drawer .x:active { transform: scale(.94); }
@media (max-width: 700px) {
  .modal { padding: 8px; }
  .modal-panel { max-height: calc(100dvh - 16px); }
  .modal-panel header { padding: 10px 12px; }
  .modal-panel h2 { font-size: 17px; }
  .modal-panel .x, .drawer .x { width: auto; height: 54px; padding: 0 18px; border-radius: 999px; font-size: 22px;
    display: inline-flex; align-items: center; gap: 8px; }
  .modal-panel .x::after, .drawer .x::after { content: "ZAMKNIJ"; font-size: 14px; letter-spacing: .1em; }
}
