/* ============================================================
   REMIMAT - panel (administrator, nauczyciele), logowanie, podgląd kursu
   Układ jak w panelu kmalecha: zakładki po lewej, pasek powiadomień,
   kafelki; kolory i czcionki z site.css.
============================================================ */

:root {
  --warn: #B4730B;
  --warn-soft: #FDF3DF;
  --danger-soft: #FCEBEA;
  --mono: ui-monospace, 'SFMono-Regular', Consolas, monospace;
}

.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.panel-main { padding: 40px 0 80px; min-height: 70vh; }
.panel-main .container { max-width: 1320px; }
.panel-title { font-size: 28px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.panel-head .muted { font-size: 14px; }

/* ---------- układ: zakładki po lewej ---------- */
.admin-layout { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 40px; align-items: start; margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--line); }
.admin-sidebar { position: sticky; top: 96px; }
.admin-tabs { display: flex; flex-direction: column; gap: 2px; border-left: 1px solid var(--line); }
.admin-tab { position: relative; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 14px; border: 0; background: none; text-align: left; font-size: 15px; font-weight: 500; color: var(--muted); cursor: pointer; border-radius: 0 10px 10px 0; transition: color .15s, background .15s; }
.admin-tab .ic { width: 18px; height: 18px; }
.admin-tab::after { content: ''; position: absolute; top: 0; bottom: 0; left: -1px; width: 2px; background: var(--accent-ink); transform: scaleY(0); transition: transform .25s; }
.admin-tab:hover { color: var(--ink); }
.admin-tab[aria-selected="true"] { color: var(--ink); background: var(--accent-soft); }
.admin-tab[aria-selected="true"]::after { transform: scaleY(1); }

/* Materiały nauki: jedna wspólna, mocno wyróżniona grupa z podziałem wewnętrznym */
.tab-group { display: flex; flex-direction: column; margin: 10px 0 10px 10px; padding: 5px; border-radius: 12px; background: var(--ink); box-shadow: 0 8px 20px rgba(14, 26, 58, .18); }
.admin-tab--in { border-radius: 8px; color: rgba(255, 255, 255, .78); font-weight: 600; text-decoration: none; }
.admin-tab--in + .admin-tab--in { margin-top: 5px; }
.admin-tab--in + .admin-tab--in::before { content: ""; position: absolute; left: 12px; right: 12px; top: -3px; height: 1px; background: rgba(255, 255, 255, .14); }
.admin-tab--in::after { display: none; }
.admin-tab--in:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.admin-tab--in[aria-selected="true"] { color: #fff; background: var(--accent-ink); }
@media (max-width: 960px) {
  .tab-group { flex-direction: row; flex-shrink: 0; margin: 0; padding: 3px; }
  .admin-tab--in + .admin-tab--in { margin: 0 0 0 3px; }
  .admin-tab--in + .admin-tab--in::before { display: none; }
}

/* Kursy - mocno wyróżniona zakładka */
.admin-tab--featured { margin: 10px 0; padding: 14px 16px; border-radius: 12px; margin-left: 10px; background: var(--ink); color: #fff; font-weight: 600; box-shadow: 0 8px 20px rgba(14, 26, 58, .18); }
.admin-tab--featured::after { display: none; }
.admin-tab--featured:hover { color: #fff; background: var(--ink-2); }
.admin-tab--featured[aria-selected="true"] { color: #fff; background: var(--accent-ink); box-shadow: 0 8px 22px rgba(58, 75, 194, .35); }
.admin-tab__count { margin-left: auto; min-width: 24px; padding: 1px 8px; border-radius: 999px; background: rgba(255, 255, 255, .18); font-size: 12px; text-align: center; }

.admin-tab--logout { margin-top: 12px; border-top: 1px solid var(--line); border-radius: 0; color: var(--danger); }
.admin-tab--logout:hover { color: var(--danger); background: var(--danger-soft); }
.admin-tab--logout::after { display: none; }

.tabs-arrow { display: none; }
@media (max-width: 960px) {
  .admin-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .admin-sidebar { position: relative; top: auto; min-width: 0; }   /* top: auto - bez przesunięcia z reguły sticky z komputera */
  /* przewijanie palcem (swipe) bez widocznego paska; strzałki po bokach */
  .admin-tabs { flex-direction: row; overflow-x: auto; border-left: 0; border-bottom: 1px solid var(--line); gap: 4px; padding-bottom: 6px; scrollbar-width: none; -ms-overflow-style: none; scroll-behavior: smooth; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
  .admin-tabs::-webkit-scrollbar { display: none; }
  .tabs-arrow { position: absolute; top: 0; bottom: 7px; z-index: 3; display: grid; place-items: center; width: 44px; padding: 0; border: 0; color: var(--ink); cursor: pointer; }
  .tabs-arrow[hidden] { display: none; }
  .tabs-arrow .ic { display: grid; place-items: center; width: 30px; height: 30px; padding: 6px; border: 1px solid var(--line); border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); }
  .tabs-arrow--prev { left: 0; justify-items: start; background: linear-gradient(90deg, var(--bg) 55%, transparent); }
  .tabs-arrow--next { right: 0; justify-items: end; background: linear-gradient(270deg, var(--bg) 55%, transparent); }
  .admin-tab { flex-shrink: 0; white-space: nowrap; border-radius: 10px; }
  .admin-tab::after { display: none; }
  .admin-tab--featured { margin: 0; }
  .admin-tab--logout { margin-top: 0; border-top: 0; border-left: 1px solid var(--line); border-radius: 0; }
}

/* ---------- pasek powiadomień ---------- */
.notify-bar { display: flex; align-items: center; gap: 14px; min-height: 58px; margin-bottom: 24px; padding: 10px 16px; border: 1px solid var(--line); border-left: 3px solid var(--line-strong); border-radius: 14px; background: var(--surface); transition: border-color .25s, background .25s; }
.notify-bar__icon { display: grid; place-items: center; flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--bg-2); color: var(--muted); }
.notify-bar__icon .ic { width: 20px; height: 20px; }
.notify-bar__body { flex: 1; min-width: 0; }
.notify-bar__msg { font-size: 14px; }
.notify-bar__msg:empty::before { content: 'Okno informacyjne'; color: var(--muted); }
.notify-bar__msg.is-ok { color: var(--success); }
.notify-bar__msg.is-error { color: var(--danger); }
.notify-bar__time { flex-shrink: 0; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.notify-bar[data-state="ok"] { border-left-color: var(--success); background: #F6FBF8; }
.notify-bar[data-state="ok"] .notify-bar__icon { background: var(--success-soft); color: var(--success); }
.notify-bar[data-state="error"] { border-left-color: var(--danger); background: #FFF8F7; }
.notify-bar[data-state="error"] .notify-bar__icon { background: var(--danger-soft); color: var(--danger); }

/* ---------- powitanie, kafelki ---------- */
.greeting { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 24px; }
.greeting__text { font-family: var(--font-head); font-size: 22px; font-weight: 600; color: var(--ink); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge--role { background: var(--accent-soft); color: var(--accent-ink); }
.badge--draft { background: var(--bg-2); color: var(--muted); }
.badge--published { background: var(--success-soft); color: var(--success); }
.badge--ultraadmin { background: var(--accent-ink); color: #fff; }
.badge--admin { background: var(--ink); color: #fff; }
.badge--teacher { background: var(--accent-soft); color: var(--accent-ink); }
.badge--student { background: var(--bg-2); color: var(--text); }

/* Kafelki panelu informacyjnego: równa szerokość i zawsze ta sama wysokość (wiersze 1fr), przycisk na dole */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); grid-auto-rows: 1fr; gap: 16px; align-items: stretch; }
.dash-grid > .dash-card, .dash-grid > #liveTiles > .dash-card { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.dash-grid .dash-card__btn { margin-top: auto; align-self: flex-start; }
.dash-card { display: grid; gap: 14px; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.dash-card__title { font-size: 16px; font-weight: 600; }
.dash-card__btn { justify-self: start; }
.dash-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-top: 11px; border-top: 1px solid var(--line); }
.dash-row__label { font-size: 13px; color: var(--muted); }
.dash-row__value { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; text-align: right; }
.dash-row__value--small { font-size: 13px; font-weight: 500; }
.hint { font-size: 13px; line-height: 1.6; color: var(--muted); }
.hint strong { color: var(--ink); font-weight: 600; }
.section-sub { margin-bottom: 16px; font-size: 16px; font-weight: 600; }
.section-sub--gap { margin-top: 32px; }
.group-title { margin-top: 8px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink); }

/* ---------- statystyki ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.stat-card { padding: 18px 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.dash-card .stat-card { padding: 0; border: 0; background: none; }
.stat-card__period { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.stat-card__num { margin-top: 4px; font-family: var(--font-head); font-size: 30px; font-weight: 700; color: var(--ink); line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat-card__label, .stat-card__sub { font-size: 12px; color: var(--muted); }
.stat-card__pages { display: grid; gap: 4px; margin-top: 8px; }
.stat-card__page { display: flex; justify-content: space-between; gap: 16px; font-size: 13px; color: var(--muted); }
.stat-card__page strong { color: var(--ink); font-weight: 600; }
.stat-card--online, .dash-card .stat-card--online { padding: 16px 18px; border: 1px solid #BFE3CC; border-radius: 14px; background: #F3FAF5; }
.stat-card--online .stat-card__num { color: var(--success); }
.stat-card--online .stat-card__pages { margin-top: 12px; padding-top: 10px; border-top: 1px solid #D5EEDD; }
.online-dot { position: relative; flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--success); }
.online-dot::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--success); animation: rm-pulse 2.4s ease infinite; }
@keyframes rm-pulse { 0% { transform: scale(1); opacity: .6; } 70%, 100% { transform: scale(2.6); opacity: 0; } }

.chart { padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.chart__plot { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2px; height: 210px; }
.chart__col { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.chart__count { min-height: 1.3em; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.chart__track { flex: 1; display: flex; align-items: flex-end; justify-content: center; width: 100%; min-height: 0; border-bottom: 1px solid var(--line-strong); }
.chart__bar { width: min(70%, 28px); border-radius: 4px 4px 0 0; background: var(--accent); opacity: .6; transition: opacity .15s; }
.chart__bar--current, .chart__col:hover .chart__bar { opacity: 1; background: var(--accent-ink); }
.chart__label { margin-top: 7px; font-size: 11px; color: var(--muted); }
.chart__label--current { color: var(--ink); font-weight: 600; }

.collapse { margin-top: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.collapse__head { padding: 14px 20px; font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer; }
.collapse__head:hover { color: var(--accent-ink); }
.bars { display: grid; gap: 10px; padding: 0 20px 18px; }
.bar-row { display: grid; grid-template-columns: minmax(110px, 180px) minmax(40px, 1fr) auto 70px; align-items: center; gap: 12px; font-size: 13px; }
.bar-row__sub { display: block; color: var(--muted); }
.bar-row__track { height: 5px; border-radius: 4px; background: var(--bg-2); overflow: hidden; }
.bar-row__fill { display: block; height: 100%; border-radius: 4px; background: var(--accent); }
.bar-row__num { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.bar-row__uniq { color: var(--muted); text-align: right; }
.chip-lists { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; margin-top: 32px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 4px 11px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 12px; color: var(--text); background: var(--surface); }

/* ---------- formularze ---------- */
.field { display: grid; gap: 6px; }
.field > label, .field > .field__label, .cover-field label { font-size: 13px; font-weight: 600; color: var(--muted); }
.cover-field label { display: block; margin-bottom: 6px; }
.input { width: 100%; min-height: 44px; padding: 10px 13px; border: 1px solid var(--line-strong); border-radius: 12px; background: #fff; font-size: 15px; color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(76, 95, 213, .14); }
textarea.input { min-height: 110px; resize: vertical; line-height: 1.55; }
select.input { padding-right: 34px; appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236A7391' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") right 10px center / 16px no-repeat; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field--wide { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.form-notice { font-size: 14px; font-weight: 600; }
.form-notice:empty { display: none; }
.form-notice.is-ok { color: var(--success); }
.form-notice.is-error { color: var(--danger); }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent-ink); margin: 0; }
.check--terms { align-items: flex-start; line-height: 1.5; color: var(--text); }
.check--terms input { flex-shrink: 0; margin-top: 2px; }
.check--terms a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; }

.profile-form { display: grid; gap: 16px; max-width: 1080px; }
.profile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 16px; align-items: stretch; }
.profile-grid > .dash-card { align-content: start; }
.profile-form > .btn { justify-self: start; }

/* ---------- tabele, pasek narzędzi ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 18px; }
.toolbar .input { width: auto; min-width: 170px; }
.toolbar input[type="search"] { min-width: 260px; }
.toolbar__spacer { flex: 1; }
@media (max-width: 600px) { .toolbar .input, .toolbar input[type="search"] { width: 100%; min-width: 0; } }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table th { background: var(--bg); font-size: 12px; font-weight: 600; color: var(--muted); }
.table tbody tr:hover { background: var(--accent-softer); }
.table__sub { display: block; font-size: 12px; color: var(--muted); }
.table__num { text-align: right !important; font-variant-numeric: tabular-nums; }
.table__actions { display: flex; gap: 6px; justify-content: flex-end; }
.table__name { font-weight: 600; color: var(--ink); }
.empty { padding: 36px 20px; text-align: center; color: var(--muted); font-size: 14px; }

.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.icon-btn:hover { background: var(--bg); border-color: var(--line-strong); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.icon-btn .ic { width: 16px; height: 16px; }
.icon-btn--danger:hover { color: var(--danger); border-color: #F1C4C1; background: var(--danger-soft); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #B23A34; }

/* ---------- okna dialogowe ---------- */
.dialog { width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 28px; border: 1px solid var(--line); border-radius: 20px; background: #fff; color: var(--text); box-shadow: 0 30px 80px rgba(14, 26, 58, .25); }
.dialog::backdrop { background: rgba(14, 26, 58, .45); backdrop-filter: blur(2px); }
.dialog--small { width: min(460px, calc(100vw - 32px)); }
.dialog--wide { width: min(860px, calc(100vw - 32px)); }
.dialog__title { font-size: 20px; margin-bottom: 18px; }
.dialog__photo { display: block; width: calc(100% + 56px); max-width: none; height: auto; margin: -28px -28px 20px; aspect-ratio: 3 / 2; object-fit: cover; object-position: 50% 40%; }
.dialog__actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.dialog .hint { margin-bottom: 4px; }
.dialog form { display: grid; gap: 14px; }

/* ---------- ustawienia ---------- */
/* E-mail z formularzy, Wymuś aktualizację i Ustawienia tymczasowe: obok siebie, ta sama wysokość */
.settings-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.settings-grid > .dash-card:not(.pages-card) { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.settings-grid > .dash-card:not(.pages-card) .dash-card__btn { margin-top: auto; align-self: flex-start; }
.pages-card { grid-column: 1 / -1; align-self: start; }
@media (max-width: 760px) { .settings-grid { grid-template-columns: 1fr; } }

/* przełącznik (slider) */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-top: 12px; border-top: 1px solid var(--line); cursor: pointer; }
.switch-row__txt { display: grid; gap: 2px; font-size: 14px; color: var(--ink); }
.switch-row__txt b { font-weight: 600; }
.switch-row__txt .hint { font-size: 12px; line-height: 1.45; }
.switch { appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 44px; height: 24px; margin: 0; border-radius: 999px; background: var(--line); cursor: pointer; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
.switch:checked { background: var(--accent-ink); }
.switch:checked::after { transform: translateX(20px); }
.switch:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.switch:disabled { opacity: .6; cursor: wait; }
.pages-row { display: grid; grid-template-columns: minmax(0, 1fr) 90px 140px; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--ink); }
.pages-row--head { font-size: 12px; color: var(--muted); }
.pages-row--head span:not(:first-child), .pages-row__check { display: flex; justify-content: center; text-align: center; }
.pages-row__url { display: block; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.pages-row__check { align-items: center; gap: 6px; min-height: 34px; cursor: pointer; }
.pages-row__check input { width: 18px; height: 18px; accent-color: var(--accent-ink); }
.pages-row__mobile { display: none; font-size: 12px; color: var(--muted); }
@media (max-width: 600px) {
  .pages-row--head { display: none; }
  .pages-row { grid-template-columns: 1fr 1fr; }
  .pages-row__name { grid-column: 1 / -1; }
  .pages-row__check { justify-content: flex-start; }
  .pages-row__mobile { display: inline; }
  .bar-row { grid-template-columns: minmax(0, 1fr) auto; }
  .bar-row__track { grid-column: 1 / -1; grid-row: 2; }
  .bar-row__uniq { display: none; }
}

/* ---------- kursy: lista ---------- */
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
/* Pola obowiązkowe: gwiazdka i opis pod formularzem */
.req { color: var(--danger); font-weight: 700; }
.req-note { font-size: 12px; color: var(--muted); }
.product__foot .badge { font-size: 11px; }

/* Okładki: kafelek kursu, pole okładki w edytorze, okładka tymczasowa */
.course-card__cover { margin: -20px -20px 4px; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 16px 16px 0 0; background: var(--bg-2); }
.course-card__cover img { width: 100%; height: 100%; object-fit: cover; }
.temp-cover { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 100%; height: 100%; min-height: 120px; padding: 12px; background: radial-gradient(240px 160px at 85% 10%, rgba(122, 90, 240, .55), transparent 60%), linear-gradient(135deg, #1D2B57, #0E1A3A); color: #fff; text-align: center; }
.temp-cover__brand { font-family: var(--font-head); font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.temp-cover__label { font-size: 13px; font-weight: 600; color: #C9CFE6; }
.temp-cover__note { margin-top: 6px; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, .12); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: #C9CFE6; }
.cover-field { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 16px; align-items: center; }
.cover-field__img, .cover-field__ph { width: 160px; aspect-ratio: 16 / 9; border-radius: 12px; object-fit: cover; border: 1px solid var(--line); }
.cover-field__ph { display: grid; place-items: center; background: var(--orange-soft); border-color: var(--orange-line); color: var(--orange); font-size: 12px; font-weight: 700; }
@media (max-width: 560px) { .cover-field { grid-template-columns: 1fr; } }

/* Kursy, Książki, Sprawdziany: trzy kafelki w wierszu (na węższych ekranach dwa, na telefonie jeden) */
#courseGrid, .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 1000px) { #courseGrid, .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { #courseGrid, .product-grid { grid-template-columns: minmax(0, 1fr); } }
.course-card { display: flex; flex-direction: column; gap: 12px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: #fff; transition: border-color .2s, box-shadow .2s; }
.course-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.course-card__top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.course-card h3 { font-size: 17px; }
.course-card__level { font-size: 13px; color: var(--accent-ink); font-weight: 600; }
.course-card__meta { display: flex; gap: 16px; font-size: 13px; color: var(--muted); }
.course-card__meta b { color: var(--ink); }
.course-card__foot { display: flex; gap: 8px; align-items: center; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.course-card__foot .btn { flex: 1; }

/* ---------- kursy: edytor ---------- */
.editor-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--muted); background: none; border: 0; cursor: pointer; padding: 6px 0; }
.back-link:hover { color: var(--ink); }
.back-link .ic { width: 16px; height: 16px; }
.editor-head .toolbar__spacer { flex: 1; }
.course-form { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 14px; }
.course-form .field--wide { grid-column: 1 / -1; }
@media (max-width: 760px) { .course-form { grid-template-columns: 1fr; } }

.chapters { display: grid; gap: 14px; margin-top: 24px; }
.chapter { border: 1px solid var(--line); border-radius: 16px; background: #fff; overflow: hidden; }
.chapter__head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--bg); border-bottom: 1px solid var(--line); }
.chapter__num { display: grid; place-items: center; flex-shrink: 0; width: 32px; height: 32px; border-radius: 9px; background: var(--ink); color: #fff; font-weight: 700; font-size: 14px; }
.chapter__title { flex: 1; min-width: 0; }
.chapter__title h3 { font-size: 16px; }
.chapter__title p { font-size: 13px; color: var(--muted); }
.chapter__tools { display: flex; gap: 6px; flex-shrink: 0; }
.items { list-style: none; margin: 0; padding: 6px 0; }
.item { display: flex; align-items: center; gap: 12px; padding: 9px 16px; }
.item + .item { border-top: 1px dashed var(--line); }
.item__ic { display: grid; place-items: center; flex-shrink: 0; width: 34px; height: 34px; border-radius: 9px; }
.item__ic .ic { width: 17px; height: 17px; }
.item--video .item__ic { background: #FDECEA; color: #C4302B; }
.item--note .item__ic { background: #EEF2F8; color: #4A6489; }
.item--image .item__ic { background: var(--accent-soft); color: var(--accent-ink); }
.item--question .item__ic { background: var(--warn-soft); color: var(--warn); }
.item--test .item__ic { background: var(--success-soft); color: var(--success); }
.item__body { flex: 1; min-width: 0; }
.item__title { font-size: 14px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item__meta { font-size: 12px; color: var(--muted); }
.item__tools { display: flex; gap: 6px; flex-shrink: 0; }
.chapter__add { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); background: var(--bg); }
.chapter__add span { font-size: 13px; color: var(--muted); align-self: center; margin-right: 4px; }
.add-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px dashed var(--line-strong); border-radius: 9px; background: #fff; font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer; }
.add-btn:hover { border-style: solid; border-color: var(--accent-ink); color: var(--accent-ink); }
.add-btn .ic { width: 15px; height: 15px; }
.chapter-add-row { display: flex; justify-content: center; padding: 20px; border: 2px dashed var(--line-strong); border-radius: 16px; }
@media (max-width: 600px) {
  .item { flex-wrap: wrap; }
  .item__tools { width: 100%; justify-content: flex-end; }
  .chapter__head { flex-wrap: wrap; }
  .chapter__tools { width: 100%; justify-content: flex-end; }
}

/* ---------- edytor elementu (pytania) ---------- */
.q-list { display: grid; gap: 14px; }
.q-card { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.q-card__head { display: flex; align-items: center; gap: 10px; }
.q-card__head b { font-size: 14px; color: var(--ink); }
.q-card__head .toolbar__spacer { flex: 1; }
.q-card textarea.input { min-height: 64px; }
.q-type { display: inline-flex; padding: 3px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; }
.q-type button { padding: 6px 12px; border: 0; border-radius: 7px; background: none; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.q-type button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.q-opts { display: grid; gap: 8px; }
.q-opt { display: flex; align-items: center; gap: 8px; }
.q-opt .input { min-height: 40px; }
.q-opt.is-correct .input { border-color: #9FD3B1; background: #F6FBF8; }
.yt-preview { display: flex; gap: 14px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.yt-preview img { width: 160px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; }
.yt-preview p { font-size: 13px; color: var(--muted); }
.callout { padding: 12px 14px; border-radius: 12px; background: var(--warn-soft); color: #6E4A0B; font-size: 13px; line-height: 1.55; }

/* ---------- książki i sprawdziany ---------- */
/* Książki i sprawdziany: większe kafelki (min. 320 px, zwykle 2-3 w rzędzie) */
.product-grid { display: grid; }
.product { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 20px; background: #fff; overflow: hidden; transition: box-shadow .2s, border-color .2s; }
.product:hover { border-color: var(--accent-2); box-shadow: var(--shadow); }
.product__img { display: grid; place-items: center; aspect-ratio: 4 / 3; background: var(--bg-2); color: var(--muted); }
.product__img img { width: 100%; height: 100%; object-fit: cover; }
.product__img .ic { width: 48px; height: 48px; }
.product__body { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 20px 22px; }
.product__body h3 { font-size: 18px; line-height: 1.3; }
.product__body p { flex: 1; font-size: 14px; line-height: 1.6; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.product__file { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--accent-ink); min-width: 0; }
.product__file .ic { width: 14px; height: 14px; }
.product__file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.product__foot b { color: var(--ink); font-size: 17px; font-family: var(--font-head); }
.product-preview { max-height: 140px; width: auto; border-radius: 10px; border: 1px solid var(--line); }
input[type="file"].input { padding: 9px 10px; font-size: 13px; }

/* ---------- grafik kursów live, opłaty ---------- */
.slots { display: grid; gap: 8px; }
/* Zmiany nauczycieli do zatwierdzenia */
.review-chip { display: inline-flex; align-self: flex-start; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--orange-soft); color: var(--orange); font-size: 12px; font-weight: 700; }
.review-chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); }
.course-card--review, .product--review { border-color: var(--orange-line); box-shadow: 0 0 0 3px rgba(194, 87, 12, .06); }
.review-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-bottom: 16px; padding: 14px 18px; border: 1px solid var(--orange-line); border-radius: 16px; background: var(--orange-soft); }
.review-bar__ic { display: grid; place-items: center; flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--orange); color: #fff; font-weight: 800; }
.review-bar__txt { flex: 1 1 260px; display: grid; gap: 2px; font-size: 14px; color: var(--text); }
.review-bar__txt b { color: var(--orange); }
.review-bar__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.product__body .product__author, .product__body .review-chip { flex: none; overflow: visible; -webkit-line-clamp: unset; }
.product__author { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--accent-ink); }
.product__author .ic { width: 14px; height: 14px; }
.tab-dot--dark { box-shadow: 0 0 0 3px rgba(255, 255, 255, .15); }
/* liczba zawsze przy prawej krawędzi zakładki; widoczna kropka stoi tuż przed nią
   (ukryta kropka [hidden] też jest sąsiadem w DOM - dlatego :not([hidden])) */
.admin-tab .admin-tab__count { margin-left: auto; }
.admin-tab .tab-dot:not([hidden]) + .admin-tab__count { margin-left: 8px; }
/* przyciski niedostępne dla roli (nauczyciel) - wyszarzone */
.icon-btn:disabled, .btn:disabled { opacity: .4; cursor: not-allowed; filter: grayscale(1); }
.icon-btn:disabled:hover { background: none; color: var(--muted); }

/* własny wybór godziny (grafik) */
.tp { position: relative; min-width: 0; }
.tp__btn { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; cursor: pointer; font-variant-numeric: tabular-nums; font-weight: 600; }
.tp__btn .ic { width: 16px; height: 16px; color: var(--accent-ink); flex-shrink: 0; }
.tp--empty .tp__val { color: var(--muted); font-weight: 500; }
.tp--open .tp__btn, .tp__btn:hover { border-color: var(--accent); }
.tp--open .tp__btn { box-shadow: 0 0 0 4px rgba(76, 95, 213, .14); }
.tp-pop { position: relative; width: min(320px, 100%); margin: -2px 0 4px clamp(0px, var(--tp-x, 0px), calc(100% - 320px)); padding: 14px; border: 1px solid var(--accent-2); border-radius: 16px; background: #fff; box-shadow: var(--shadow); animation: tpIn .14s ease; }
@keyframes tpIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.tp-pop__label { margin: 2px 0 8px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tp-pop__grid { display: grid; gap: 4px; margin-bottom: 12px; }
.tp-pop__grid--h { grid-template-columns: repeat(6, 1fr); }
.tp-pop__grid--m { grid-template-columns: repeat(4, 1fr); }
.tp-pop__grid button { height: 32px; border: 1px solid transparent; border-radius: 9px; background: var(--bg); color: var(--ink); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer; transition: background .12s, color .12s, border-color .12s; }
.tp-pop__grid button:hover:not(:disabled) { background: var(--accent-soft); border-color: var(--accent-2); color: var(--accent-ink); }
.tp-pop__grid button.is-on { background: var(--accent-ink); color: #fff; }
.tp-pop__grid button:disabled { opacity: .35; cursor: default; }
.tp-pop__foot { display: flex; justify-content: flex-end; padding-top: 10px; border-top: 1px solid var(--line); }
.tp-pop__foot .hint { font-size: 12px; }

/* Kursy live i Grafik */
.live-price { display: flex; align-items: baseline; gap: 6px; }
.live-price b { font-family: var(--font-head); font-size: 18px; color: var(--ink); }
.live-summary { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--accent-ink); }
.live-summary .ic { width: 16px; height: 16px; }
.live-tile__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.sched-list { display: grid; gap: 16px; }
.sched-card { display: grid; gap: 16px; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.sched-card__head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sched-card__head h3 { font-size: 18px; margin: 4px 0 6px; }
.sched-teachers { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.sched-teacher { padding: 14px 16px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); }
.sched-teacher b { display: block; margin-bottom: 8px; color: var(--ink); font-size: 14px; }
.sched-teacher ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.sched-teacher li { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text); }
.sched-teacher li .ic { width: 15px; height: 15px; color: var(--accent-ink); }
.dialog--wide { width: min(820px, calc(100vw - 32px)); }
.sched-head, .sched-row { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1.2fr) minmax(0, .9fr) minmax(0, .9fr) 36px; gap: 8px; align-items: center; }
.sched-head { font-size: 12px; font-weight: 600; color: var(--muted); }
.sched-rows { display: grid; gap: 8px; }
@media (max-width: 640px) {
  .sched-head { display: none; }
  .sched-row { grid-template-columns: 1fr 1fr 36px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; }
  .sched-row [data-s="teacher"] { grid-column: 1 / -1; }
  .sched-row [data-s="day"] { grid-column: 1 / -1; }
  .tp-pop { margin-left: 0; width: 100%; }
}
.slot { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) 36px; gap: 8px; align-items: center; }
@media (max-width: 560px) { .slot { grid-template-columns: 1fr 1fr; } .slot select { grid-column: 1 / -1; } }
.badge--unpaid { background: var(--warn-soft); color: var(--warn); }
.badge--late { background: var(--danger); color: #fff; }
.table--wrap td:nth-child(2) { white-space: normal; min-width: 200px; }
a.admin-tab { text-decoration: none; }

/* ---------- kursy live: dostęp 30 dni, płatności ---------- */
:root { --orange: #C2570C; --orange-soft: #FFF1E3; --orange-line: #F7C89B; }

/* Oczekujące akcje (panel informacyjny administratora) */
.actions-card { transition: border-color .2s, background .2s, box-shadow .2s; }
.actions-card.is-active { border-color: var(--orange-line); background: var(--orange-soft); box-shadow: 0 0 0 3px rgba(194, 87, 12, .08); }
.actions-card.is-active .dash-card__title { color: var(--orange); }
.action-row { display: flex; align-items: center; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.actions-card.is-active .action-row { border-top-color: var(--orange-line); }
.action-row__count { flex-shrink: 0; display: grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 8px; background: var(--orange); color: #fff; font-family: var(--font-head); font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.action-row__label { flex: 1; min-width: 0; font-size: 12px; font-weight: 600; line-height: 1.3; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.action-row .btn { flex-shrink: 0; margin-left: auto; padding: 4px 10px; font-size: 12px; border-radius: 8px; }

/* Ustawienia: diagnoza wysyłki maili */
.mail-diag { font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.mail-diag .is-ok { color: var(--success); }
.mail-diag .is-bad { color: var(--danger); }
.mail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }

/* Wysyłka: klikalne etapy statusu, przycisk Usuń i szczegóły dostawy pod „i” */
.ship-row--del td { background: #FFF6F5; }
.order-step--btn { font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; transition: border-color .15s, background .15s; }
.order-step--btn:hover:not(:disabled) { border-color: var(--accent-2); background: var(--accent-softer); }
.order-step--btn:disabled { cursor: default; }
.order-step--btn[data-step="paid"]:disabled, .order-step--btn.is-done:disabled { opacity: 1; filter: none; }
.order-step--btn:disabled:not(.is-done) { opacity: .45; filter: none; }
.order-step--del { color: var(--danger); border-color: #F1C4C1; }
.order-step--del .ic { width: 13px; height: 13px; color: var(--danger) !important; }
.order-step--del:hover:not(:disabled) { background: #FFF6F5; border-color: var(--danger); }
.order-step--del.is-on { background: var(--danger); border-color: var(--danger); color: #fff; }
.order-step--del.is-on .ic { color: #fff !important; }
.ship-info { position: relative; }
.ship-info summary { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 5px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 12px; font-weight: 600; color: var(--ink); cursor: pointer; list-style: none; user-select: none; }
.ship-info summary::-webkit-details-marker { display: none; }
.ship-info summary:hover, .ship-info[open] summary { border-color: var(--accent-2); background: var(--accent-soft); color: var(--accent-ink); }
.ship-info__ic { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--accent-ink); color: #fff; font-family: Georgia, serif; font-style: italic; font-size: 11px; font-weight: 700; }
.ship-info__pop { display: grid; gap: 2px; margin-top: 8px; max-width: 240px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow); font-size: 13px; line-height: 1.45; color: var(--text); }
.ship-info__pop b { color: var(--ink); }
/* Zamówienia ucznia: etapy przesyłki */
.order-steps { display: flex; flex-wrap: wrap; gap: 6px; }
.order-step { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px 4px 7px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.order-step .ic { width: 14px; height: 14px; color: var(--success); }
.order-step i { width: 10px; height: 10px; margin: 2px; border: 1.5px solid var(--line-strong); border-radius: 50%; }
.order-step.is-done { border-color: #BFE3CC; color: var(--ink); }

/* Moje dane: usunięcie konta */
.danger-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-top: 28px; padding: 18px 22px; border: 1px solid #F1C4C1; border-radius: 18px; background: #FFF6F5; }
.danger-card__txt { flex: 1 1 320px; display: grid; gap: 2px; font-size: 14px; color: var(--text); }
.danger-card__txt b { color: var(--danger); font-family: var(--font-head); font-size: 15px; }
/* znaczniki przy użytkowniku: prośba o usunięcie i odrzucona próba */
.user-flag { display: inline-flex; margin-top: 4px; padding: 2px 8px; border-radius: 999px; background: var(--bg-2); color: var(--muted); font-size: 11px; font-weight: 700; }
.user-flag--req { background: var(--danger-soft); color: var(--danger); }
.actions-card__empty { display: flex; align-items: center; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.actions-card__empty::before { content: '✓'; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--success-soft); color: var(--success); font-size: 12px; font-weight: 800; }
/* pomarańczowa kropka przy zakładce (bez liczby) */
.tab-dot { width: 9px; height: 9px; margin-left: auto; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 3px var(--orange-soft); flex-shrink: 0; }.btn-warn { background: var(--orange); color: #fff; }
.btn-warn:hover { background: #A5480A; }
.live-tile { --c: var(--success); border-color: #BFE3CC; background: #F3FAF5; }
.live-tile--warn { --c: var(--orange); border-color: var(--orange-line); background: var(--orange-soft); }
.live-tile--late { --c: var(--danger); border-color: #F1C4C1; background: #FFF4F3; }
.live-bar { height: 8px; border-radius: 6px; background: rgba(14, 26, 58, .08); overflow: hidden; }
.live-bar i { display: block; height: 100%; border-radius: inherit; background: var(--c); }
.live-tile__txt { font-size: 14px; font-weight: 600; color: var(--c); }
.live-mat--warn { border-color: var(--orange-line); }
.live-mat--late { border-color: #F1C4C1; }
.days { display: inline-block; padding: 4px 11px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.days--ok { color: var(--success); background: var(--success-soft); }
.days--warn { color: var(--orange); background: var(--orange-soft); }
.days--late { color: var(--danger); background: var(--danger-soft); }
.reminder { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; padding: 14px 16px; border: 1px solid var(--orange-line); border-radius: 14px; background: var(--orange-soft); }
.reminder__ic { display: grid; place-items: center; flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--orange); color: #fff; font-size: 19px; font-weight: 800; }
.reminder__txt { flex: 1; min-width: 200px; color: var(--ink); font-size: 14px; }
.reminder__txt b, .reminder__txt span { display: block; }
.dash-card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.count-badge { display: grid; place-items: center; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 50%; background: var(--danger); color: #fff; font-size: 13px; font-weight: 700; }
.mat-head, .mat-row { display: grid; grid-template-columns: minmax(0, 1fr) 90px 104px; gap: 8px; align-items: baseline; }
.mat-head { font-size: 11px; color: var(--muted); text-align: right; }
.mat-row { padding-top: 11px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.mat-row b { color: var(--ink); font-size: 16px; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- logowanie ---------- */
.auth { display: flex; }
.auth-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 56px; align-items: stretch; min-height: 660px; padding-top: 48px; padding-bottom: 48px; }
.auth-form { display: flex; flex-direction: column; justify-content: center; width: 100%; max-width: 440px; margin: 0 auto; }
.auth-form h1 { font-size: clamp(28px, 3vw, 36px); letter-spacing: -.025em; }
.auth-lead { margin: 10px 0 30px; color: var(--muted); font-size: 16px; }
.auth-form form { display: grid; gap: 18px; }
.auth-form .field > label { color: var(--ink); }
.auth-form .btn-lg { margin-top: 4px; }
.auth-foot { margin-top: 24px; text-align: center; font-size: 15px; color: var(--muted); }
.field__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 13px; }
.field__row label { font-weight: 600; color: var(--ink); }
.input-ic { position: relative; }
.input-ic .ic { position: absolute; left: 15px; top: 50%; width: 18px; height: 18px; margin-top: -9px; color: var(--muted); pointer-events: none; }
.input-ic .input { min-height: 52px; padding-left: 44px; border-radius: 12px; background: var(--surface); }
.input-ic .input::placeholder { color: #B3B7BF; }
.auth-info { padding: 13px 15px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-deep); font-size: 14px; line-height: 1.5; }
.auth-photo { position: relative; margin: 0; border-radius: 28px; overflow: hidden; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.auth-photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(14, 26, 58, .35)), linear-gradient(135deg, rgba(58, 75, 194, .12), rgba(122, 90, 240, .08)); pointer-events: none; }
.auth-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
@media (max-width: 900px) {
  .auth-grid { grid-template-columns: 1fr; gap: 32px; min-height: 0; padding-top: 32px; }
  .auth-photo { aspect-ratio: 3 / 2; }
}

/* Tymczasowe logowanie testowe (settings.php: TEST_LOGIN_MODE) */
.test-bar { background: var(--warn-soft); border-bottom: 1px solid #F0DDB5; color: #6E4A0B; font-size: 14px; }
.test-bar__in { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; padding-top: 12px; padding-bottom: 12px; }
.test-bar__btns { display: flex; flex-wrap: wrap; gap: 8px; }
.test-bar__lock { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.test-bar__lock .input { width: 220px; max-width: 100%; height: 36px; padding: 6px 12px; font-size: 14px; }

/* element „Zdjęcie” i pytanie ze zdjęcia */
.img-up { display: grid; gap: 6px; }
.img-up__box { position: relative; display: block; border: 1.5px dashed var(--line-strong); border-radius: 12px; background: #fff; overflow: hidden; cursor: pointer; }
.img-up__box:hover, .img-up__box:focus-within { border-color: var(--accent-ink); }
.img-up input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.img-up__view { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 120px; padding: 10px; font-size: 14px; color: var(--muted); }
.img-up__view img { display: block; max-width: 100%; max-height: 260px; border-radius: 8px; }
.img-up.is-busy { opacity: .55; pointer-events: none; }

/* odpowiedzi w pytaniu */
.q-opt__mark { display: grid; place-items: center; flex-shrink: 0; width: 22px; height: 22px; border: 1.5px solid var(--line-strong); border-radius: 50%; background: #fff; }
.q-opt__mark.is-on { border-color: var(--success); background: var(--success); color: #fff; }
.q-opt__mark .ic { width: 13px; height: 13px; }
.q-opt .info-tip { margin: 0 8px; }
.info-tip { position: relative; display: inline-grid; place-items: center; flex-shrink: 0; width: 20px; height: 20px; border: 1.5px solid var(--muted); border-radius: 50%; font-size: 12px; font-weight: 700; line-height: 1; color: var(--muted); cursor: help; }
.info-tip:hover, .info-tip:focus { border-color: var(--ink); color: var(--ink); outline: none; }
.info-tip__box { position: absolute; right: -6px; bottom: calc(100% + 8px); z-index: 5; width: 230px; padding: 9px 12px; border-radius: 9px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 500; line-height: 1.4; text-align: left; opacity: 0; visibility: hidden; transition: opacity .15s; pointer-events: none; }
.info-tip:hover .info-tip__box, .info-tip:focus .info-tip__box { opacity: 1; visibility: visible; }
.q-card > .add-btn { justify-self: start; }
.q-add { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

/* podsumowanie płatności */
.pay-sum { grid-template-columns: 1.1fr 1fr 1fr 1.5fr; align-items: center; gap: 20px; margin-bottom: 28px; }
.pay-sum__year { display: grid; gap: 10px; }
.pay-sum__year select { max-width: 170px; }
.pay-sum__item { display: grid; gap: 4px; }
.pay-sum__item span { font-size: 13px; color: var(--muted); }
.pay-sum__item b { font-family: var(--font-head); font-size: 20px; font-weight: 700; color: var(--ink); }
.pay-sum__item--total b { color: var(--accent-ink); }
@media (max-width: 900px) { .pay-sum { grid-template-columns: 1fr 1fr; } .pay-sum__year, .pay-sum__item--total { grid-column: 1 / -1; } }

/* wysyłka */
.ship-check { width: 20px; height: 20px; margin: 0; accent-color: var(--success); cursor: pointer; }
