/* wyglad: zar */
/* ============================================================
   KARTY PŁATNOŚCI W USTAWIENIACH STREFY („Cennik”, „Pakiety”, „Odwołane treningi”; ui/priceListCard.js)
   Układ jak na makiecie „Cennik ogólny”: pole z krokami, opcje z kropką, wiersze pakietów.
   Kolory tylko z tokenów Strefy (--tz-*); bez :has().
   ============================================================ */

.tz .tz-pay .tz-set-hd {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tz .tz-pay .tz-set-hd .tz-ic {
    color: var(--tz-hi);
}

.tz .tz-pay-sep {
    width: 100%;
    height: 1px;
    margin: 0;
    border: 0;
    background: var(--tz-inset-line);
}

.tz .tz-pay-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 52px;
}

.tz .tz-pay-l {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    font-size: 14px;
    text-align: left;
}

.tz .tz-pay-l small {
    color: var(--tz-mut);
    font-size: 12px;
}

/* ---------- Stepper ---------- */
.tz .tz-pay-stepper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tz .tz-pay-step {
    width: 44px;
    height: 44px;
    padding: 0;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--tz-inset-bg);
    border: 1px solid var(--tz-inset-line);
    color: var(--tz-text);
}

.tz .tz-pay-step:disabled {
    opacity: 0.4;
}

.tz .tz-pay-val {
    min-width: 84px;
    text-align: center;
    font-style: italic;
    font-weight: 700;
    font-size: 22px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    color: var(--tz-text);
}

/* ---------- Opcje z kropką ---------- */
.tz .tz-pay-opt {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 60px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid var(--tz-inset-line);
    background: var(--tz-inset-bg);
    cursor: pointer;
}

.tz .tz-pay-opt input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
}

.tz .tz-pay-dot {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--tz-sub);
    display: grid;
    place-items: center;
}

.tz .tz-pay-opt input:checked + .tz-pay-dot {
    border-color: var(--tz-acc);
}

.tz .tz-pay-opt input:checked + .tz-pay-dot::after {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--tz-acc);
}

.tz .tz-pay-opt input:focus-visible + .tz-pay-dot {
    outline: 2px solid var(--tz-hi);
    outline-offset: 2px;
}

.tz .tz-pay-opt-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tz .tz-pay-opt-text small {
    color: var(--tz-mut);
    font-size: 12px;
}

/* ---------- Pakiety ---------- */
.tz .tz-pay-pack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tz .tz-pay-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-height: 52px;
    padding: 4px 0;
    background: none;
    border: 0;
    color: var(--tz-text);
}

.tz .tz-pay-row[aria-expanded="true"] .tz-pay-money {
    border-color: var(--tz-hi);
}

.tz .tz-pay-money {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid var(--tz-inset-line);
    background: var(--tz-inset-bg);
    font-style: italic;
    font-weight: 700;
    font-size: 18px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.tz .tz-pay-form {
    padding: 12px;
    border-radius: 14px;
    border: 1px solid var(--tz-inset-line);
    background: var(--tz-inset-bg);
}

.tz .tz-pay-wide {
    width: 100%;
    justify-content: center;
    min-height: 44px;
}

.tz .tz-pay-note {
    text-align: center;
}

/* ---------- Rozliczanie klienta (ui/billingScreen.js) ---------- */
.tz .tz-pay-seg {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 4px;
    border-radius: 16px;
    border: 1px solid var(--tz-inset-line);
    background: var(--tz-inset-bg);
}

.tz .tz-pay-seg-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 56px;
    padding: 6px 4px;
    border-radius: 12px;
    border: 0;
    background: none;
    color: var(--tz-text);
    font-weight: 700;
    font-size: 14px;
}

.tz .tz-pay-seg-btn small {
    color: var(--tz-mut);
    font-size: 11px;
    font-weight: 400;
}

.tz .tz-pay-seg-btn[aria-checked="true"] {
    background: var(--tz-acc);
    color: var(--ukis-on-primary);
}

.tz .tz-pay-seg-btn[aria-checked="true"] small {
    color: inherit;
}

/* ---------- Płatności klienta (ui/paymentsScreen.js, ui/paymentsSheets.js) ---------- */
.tz .tz-pay-between {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
}

.tz .tz-pay-grow {
    flex: 1;
    min-width: 0;
    font-size: 14px;
}

.tz .tz-pay-big {
    font-family: 'Barlow', 'Inter', sans-serif;
    font-style: italic;
    font-weight: 700;
    font-size: 40px;
    line-height: 1;
    letter-spacing: -0.5px;
    font-variant-numeric: tabular-nums;
    color: var(--tz-text);
}

.tz .tz-pay-sm {
    min-height: 44px;
    padding: 0 14px;
    font-size: 14px;
}

.tz .tz-pay-rateline {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 8px 8px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--tz-inset-line);
}

.tz .tz-pay-rateline b {
    font-weight: 700;
}

.tz .tz-pay-incl {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    background: var(--ukis-primary-tint);
    color: var(--tz-sub);
    font-size: 13px;
}

/* ---------- Plakietki ---------- */
.tz .tz-pay-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    border: 1px solid var(--tz-inset-line);
    background: rgba(255, 255, 255, 0.08);
    color: var(--tz-sub);
    font: 600 12px/1 'Inter', sans-serif;
    white-space: nowrap;
}

.tz .tz-pay-pill .tz-ic {
    width: 12px;
    height: 12px;
}

.tz .tz-pay-late {
    background: var(--ukis-primary-tint);
    border-color: var(--ukis-accent-line);
    color: var(--tz-pay-bad);
}

.tz {
    /* Bursztyn „termin dziś”: --ukis-color-warning daje 4,46 : 1; ten sam odcień we wszystkich motywach (ostrzeżenie jest wspólne) */
    --tz-pay-warn: var(--ukis-pay-warn);
    /* „Po terminie”: --ukis-danger-text ma w jednym z motywów 4,35 : 1 na tle plakietki; odcień jak .tz-danger */
    --tz-pay-bad: var(--ukis-pay-bad);
}

.tz .tz-pay-today {
    border-color: var(--ukis-color-warning);
    color: var(--tz-pay-warn);
}

.tz .tz-pay-ok {
    border-color: var(--tz-ok);
    color: var(--tz-ok);
}

/* ---------- Pozycje ---------- */
.tz .tz-pay-list {
    display: flex;
    flex-direction: column;
}

.tz .tz-pay-it {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    min-height: 64px;
    padding: 0;
    border: 0;
    border-top: 1px solid var(--tz-inset-line);
    background: none;
    color: inherit;
    text-align: left;
    font: inherit;
}

.tz .tz-pay-it.tz-pay-on {
    background: linear-gradient(90deg, var(--ukis-primary-tint), transparent 80%);
}

.tz .tz-pay-selpart,
.tz .tz-pay-amtbtn {
    display: flex;
    align-items: center;
    min-height: 64px;
    padding: 8px 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.tz .tz-pay-selpart {
    flex: 1;
    min-width: 0;
    gap: 12px;
}

.tz .tz-pay-amtbtn {
    gap: 6px;
    padding-left: 8px;
    min-width: 44px;
}

.tz .tz-pay-amtbtn .tz-ic {
    color: var(--tz-mut);
    width: 16px;
    height: 16px;
}

.tz .tz-pay-box {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    border: 2px solid rgba(255, 255, 255, 0.45);
}

.tz .tz-pay-box .tz-ic {
    width: 18px;
    height: 18px;
    stroke-width: 3;
    opacity: 0;
}

.tz .tz-pay-selpart[aria-checked="true"] .tz-pay-box {
    background: var(--tz-acc);
    border-color: var(--tz-acc);
}

.tz .tz-pay-selpart[aria-checked="true"] .tz-pay-box .tz-ic {
    opacity: 1;
}

.tz .tz-pay-mark {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--tz-ok);
    color: var(--tz-ok);
}

.tz .tz-pay-mark .tz-ic {
    width: 16px;
    height: 16px;
}

.tz .tz-pay-what {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.tz .tz-pay-what b {
    font-weight: 600;
    font-size: 15px;
}

.tz .tz-pay-what small {
    color: var(--tz-mut);
    font-size: 12px;
}

.tz .tz-pay-amt {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.tz .tz-pay-amt b {
    font-family: 'Barlow', 'Inter', sans-serif;
    font-style: italic;
    font-weight: 700;
    font-size: 19px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.tz .tz-pay-amt small {
    font-size: 12px;
}

.tz .tz-pay-paid {
    cursor: pointer;
    padding: 8px 0;
    gap: 12px;
}

.tz .tz-pay-paid .tz-pay-what b,
.tz .tz-pay-paid .tz-pay-amt b {
    color: var(--tz-sub);
}

.tz .tz-pay-wp {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 64px;
    padding: 8px 0;
    border: 0;
    background: none;
    color: var(--tz-text);
    text-align: left;
    font: inherit;
    cursor: pointer;
}

/* Kreska tylko między wierszami: bez kreski nad pierwszym */
.tz .tz-pay-wp + .tz-pay-wp {
    border-top: 1px solid var(--tz-inset-line);
}

.tz .tz-pay-lines {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 0;
    border-top: 1px solid var(--tz-inset-line);
    border-bottom: 1px solid var(--tz-inset-line);
    font-size: 14px;
}

.tz .tz-pay-empty {
    padding: 12px 0;
}

/* ---------- Pasek zaznaczenia (nad dolnym paskiem Strefy) ---------- */
.tz .tz-pay-selbar {
    position: sticky;
    bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 8px 8px 18px;
    border-radius: 999px;
    background: var(--ukis-glass-bg-solid);
    border: 1px solid var(--ukis-accent-line);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
}

.tz .tz-pay-selbar b {
    font-family: 'Barlow', 'Inter', sans-serif;
    font-style: italic;
    font-size: 20px;
}

/* ---------- Arkusze ---------- */
.tz .tz-sheet-wrap {
    align-items: flex-end;
    padding: 0;
}

.tz .tz-sheet {
    width: 100%;
    max-width: 480px;
    max-height: 92%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    border-radius: 24px 24px 0 0;
    border-bottom: 0;
    background-color: var(--ukis-sheet-bg);
    padding: 10px 16px calc(18px + env(safe-area-inset-bottom, 0px));
}

.tz .tz-sheet-grab {
    align-self: center;
    flex: 0 0 auto;
    width: 44px;
    height: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.3);
}

.tz .tz-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.tz .tz-sheet-head .hd {
    font-size: 22px;
}

.tz .tz-sheet-head .hd:focus {
    outline: none;
}

.tz .tz-icbtn-sheet {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: var(--tz-text);
}

.tz .tz-pay-forms {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.tz .tz-pay-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 84px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.05);
    color: var(--tz-text);
    font: 600 14px 'Inter', sans-serif;
    cursor: pointer;
}

.tz .tz-pay-form .tz-ic {
    width: 26px;
    height: 26px;
}

.tz .tz-pay-form[aria-pressed="true"] {
    background: var(--tz-acc);
    border-color: transparent;
    color: var(--tz-on-acc);
    box-shadow: 0 8px 22px var(--tz-acc-soft);
}

.tz .tz-pay-hint {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 12px;
    border-left: 3px solid var(--tz-hi);
    border-radius: 0 12px 12px 0;
    background: var(--ukis-primary-tint);
    color: var(--tz-sub);
    font-size: 13px;
}

/* ---------- Karta „Pakiet”: kropki zużycia i numery treningów (ui/paymentsScreen.js) ---------- */
.tz .tz-pay-dots {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.tz .tz-pay-dots i {
    display: block;
    flex: 1 1 18px;
    height: 14px;
    border-radius: 5px;
    background: var(--tz-inset-line);
}

.tz .tz-pay-dots i.tz-pay-dot-on {
    background: linear-gradient(180deg, var(--tz-hi), var(--tz-acc));
}

.tz .tz-pay-pk {
    width: 100%;
    text-align: left;
}

.tz .tz-pay-num {
    font-size: 13px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* ---------- Arkusz „Przypomnienie” (ui/reminderSheet.js) ---------- */
.tz .tz-pay-sends {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.tz .tz-pay-send {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 96px;
    min-width: 0;
    padding: 8px 4px;
    border: none;
    border-radius: 16px;
    background: var(--tz-acc);
    color: var(--tz-on-acc);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
}

.tz .tz-pay-send svg {
    width: 24px;
    height: 24px;
}

.tz .tz-pay-send small {
    max-width: 100%;
    overflow-wrap: anywhere;
    text-align: center;
    line-height: 1.25;
    font-size: 11px;
    font-weight: 500;
}

.tz .tz-pay-send:disabled {
    background: var(--tz-inset-line);
    color: var(--tz-mut);
    cursor: not-allowed;
}

/* ---------- Lista klientów: karta „Płatności” i plakietka przy kliencie ---------- */
.tz .tz-pay-listcard {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    text-align: left;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.tz .tz-pay-listhd {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tz .tz-pay-listhd .tz-ic {
    color: var(--tz-hi);
}

.tz .tz-pay-listfoot {
    align-items: flex-end;
}

.tz .tz-pay-listfoot > span:first-child {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tz .tz-client-badges {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex: 0 0 auto;
}

.tz .tz-client-badges:empty {
    display: none;
}

/* ---------- Płatności: wszyscy (ui/paymentsOverviewScreen.js) ---------- */
.tz {
    /* Kolory form wpłat na pasku podziału i w legendzie: z tokenów, trzy różne odcienie */
    --tz-pay-f-cash: var(--ukis-color-warning);
    --tz-pay-f-bank: var(--ukis-color-primary);
    --tz-pay-f-blik: var(--ukis-color-success);
}

.tz .tz-pay-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.tz .tz-pay-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    padding: 12px;
    border-radius: 14px;
    background: var(--tz-inset-bg);
    border: 1px solid var(--tz-inset-line);
}

.tz .tz-pay-stat.tz-pay-late {
    border-color: var(--ukis-accent-line);
    background: var(--ukis-primary-tint);
    color: inherit;
}

.tz .tz-pay-stat.tz-pay-late .tz-pay-mid {
    color: var(--tz-pay-bad);
}

.tz .tz-pay-stat .mut {
    color: var(--tz-sub);
}

.tz .tz-pay-statl {
    font-size: 12px;
    color: var(--tz-sub);
}

.tz .tz-pay-mid {
    font-family: 'Barlow', 'Inter', sans-serif;
    font-style: italic;
    font-weight: 700;
    font-size: 24px;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.tz .tz-pay-split {
    display: flex;
    gap: 2px;
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
}

.tz .tz-pay-split i {
    display: block;
    min-width: 4px;
}

.tz .tz-pay-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    font-size: 13px;
    color: var(--tz-sub);
}

.tz .tz-pay-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tz .tz-pay-legend i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.tz .tz-pay-f-cash {
    background: var(--tz-pay-f-cash);
}

.tz .tz-pay-f-bank {
    background: var(--tz-pay-f-bank);
}

.tz .tz-pay-f-blik {
    background: var(--tz-pay-f-blik);
}

.tz .tz-pay-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tz .tz-pay-ovrow {
    width: 100%;
    gap: 8px;
    padding: 8px 4px;
}

.tz .tz-pay-ovrow .tz-pay-amt {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex: 0 0 auto;
}

.tz .tz-pay-ovrow .tz-ic {
    flex: 0 0 auto;
    color: var(--tz-mut);
}

.tz .tz-pay-ovrow .tz-pay-pill .tz-ic {
    color: inherit;
}

/* ---------- Podsumowanie miesiąca (trasa payments-month) ---------- */
.tz .tz-pay-monthlbl {
    flex: 1;
    text-align: center;
}

.tz .tz-pay-up {
    color: var(--tz-ok);
    font-weight: 600;
}

.tz .tz-pay-down {
    color: var(--tz-pay-bad);
    font-weight: 600;
}

.tz .tz-pay-paidbar {
    display: flex;
    gap: 2px;
    height: 12px;
    border-radius: 999px;
    overflow: hidden;
}

.tz .tz-pay-paidbar i {
    display: block;
}

.tz .tz-pay-paidpart {
    background: var(--tz-ok);
}

.tz .tz-pay-restpart {
    background: var(--ukis-primary-tint);
    border: 1px solid var(--ukis-accent-line);
    box-sizing: border-box;
}

.tz .tz-pay-bars {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    height: 150px;
    padding-top: 4px;
    border-bottom: 1px solid var(--tz-inset-line);
}

.tz .tz-pay-bar {
    position: relative;
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 4px;
    padding-bottom: 22px;
    box-sizing: border-box;
}

.tz .tz-pay-bar i {
    display: block;
    width: 100%;
    max-width: 44px;
    min-height: 2px;
    border-radius: 8px 8px 2px 2px;
    background: var(--tz-acc);
}

.tz .tz-pay-barv {
    font-family: 'Barlow', 'Inter', sans-serif;
    font-style: italic;
    font-weight: 700;
    font-size: 15px;
    font-variant-numeric: tabular-nums;
}

.tz .tz-pay-barl {
    position: absolute;
    bottom: 0;
    font-size: 11px;
    color: var(--tz-mut);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.tz .tz-pay-formrows {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
}

.tz .tz-pay-paylist {
    border-top: 1px solid var(--tz-inset-line);
    padding-top: 6px;
}
