/* UI4 / MVP16 — logowanie i moduł konta */

.auth-page--refined,
.account-page--refined {
    --account-ink: #0f1d35;
    --account-muted: #66758b;
    --account-border: #dce4ee;
    --account-soft: #F7FAFC;
    --account-primary: #1F6FB2;
    --account-primary-hover: #185B93;
    --account-success: #17865e;
    --account-warning: #a56a11;
    --account-danger: #bd3b35;
}

/* ===== Logowanie ===== */
.auth-page--refined {
    min-height: 100vh;
    display: block;
    padding: 0;
    overflow-x: hidden;
    background: #F1F6FA;
}

.auth-public-link {
    position: fixed;
    z-index: 30;
    top: 24px;
    right: 28px;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 0 15px;
    border: 1px solid rgba(255,255,255,.17);
    border-radius: 12px;
    color: rgba(255,255,255,.88);
    background: rgba(15,28,53,.36);
    box-shadow: 0 10px 34px rgba(5,14,31,.14);
    backdrop-filter: blur(14px);
    font-size: 13px;
    font-weight: 720;
    text-decoration: none;
    transition: background .16s ease, transform .16s ease, border-color .16s ease;
}

.auth-public-link svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.auth-public-link:hover {
    color: #fff;
    border-color: rgba(255,255,255,.28);
    background: rgba(15,28,53,.58);
    transform: translateY(-1px);
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(500px, .92fr);
}

.auth-story {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    color: #fff;
    background:
        radial-gradient(circle at 80% 14%, rgba(31,111,178,.27), transparent 26rem),
        radial-gradient(circle at 18% 92%, rgba(30,185,137,.13), transparent 28rem),
        linear-gradient(145deg, #092A49 0%, #0F3B66 54%, #0C3155 100%);
}

.auth-story::before,
.auth-story::after {
    content: "";
    position: absolute;
    border: 1px solid rgba(255,255,255,.045);
    border-radius: 50%;
}

.auth-story::before {
    width: 560px;
    height: 560px;
    top: -310px;
    left: -220px;
}

.auth-story::after {
    width: 430px;
    height: 430px;
    right: -250px;
    bottom: -220px;
}

.auth-story__content {
    position: relative;
    z-index: 2;
    width: min(780px, 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 48px;
    margin: auto;
    padding: 64px clamp(58px, 7vw, 112px);
}

.auth-brand,
.auth-mobile-brand {
    display: flex;
    align-items: center;
    gap: 13px;
}

.auth-brand > div {
    display: grid;
    gap: 3px;
}

.auth-brand strong {
    color: #fff;
    font-size: 15px;
    letter-spacing: -.01em;
}

.auth-brand span:last-child {
    color: #9fb0cb;
    font-size: 12px;
}

.auth-brand__mark,
.account-brand-mark {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 14px;
    background: rgba(255,255,255,.08);
    box-shadow: inset 0 1px rgba(255,255,255,.11);
}

.auth-brand__mark i,
.account-brand-mark i {
    width: 14px;
    height: 20px;
    position: relative;
    display: block;
    border: 4px solid #58A0DC;
    border-radius: 10px 10px 12px 12px;
}

.auth-brand__mark i::after,
.account-brand-mark i::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -9px;
    width: 6px;
    height: 6px;
    border-right: 3px solid #58A0DC;
    border-bottom: 3px solid #58A0DC;
    transform: translateX(-50%) rotate(45deg);
}

.eyebrow--light {
    color: #aebce0;
}

.auth-copy {
    max-width: 700px;
}

.auth-copy h1 {
    max-width: 680px;
    margin: 0 0 24px;
    color: #fff;
    font-size: clamp(48px, 5vw, 78px);
    line-height: 1.01;
    letter-spacing: -.055em;
}

.auth-copy .lead {
    max-width: 620px;
    margin: 0;
    color: #bdc9dc;
    font-size: 17px;
    line-height: 1.75;
}

.auth-map-preview {
    position: relative;
    width: min(650px, 100%);
    height: 232px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 25px;
    background:
        linear-gradient(35deg, transparent 48%, rgba(255,255,255,.035) 49%, rgba(255,255,255,.035) 51%, transparent 52%),
        linear-gradient(145deg, rgba(255,255,255,.075), rgba(255,255,255,.025));
    box-shadow: 0 28px 70px rgba(3,11,27,.24), inset 0 1px rgba(255,255,255,.09);
}

.auth-map-preview__grid {
    position: absolute;
    inset: 0;
    opacity: .48;
    background-image:
        linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px);
    background-size: 38px 38px;
    transform: rotate(-8deg) scale(1.16);
}

.auth-map-route {
    position: absolute;
    display: block;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, rgba(120,151,255,.88), rgba(100,215,175,.68), transparent);
    transform-origin: left center;
}

.auth-map-route--one {
    width: 390px;
    top: 118px;
    left: 56px;
    transform: rotate(-14deg);
}

.auth-map-route--two {
    width: 270px;
    top: 72px;
    left: 282px;
    opacity: .64;
    transform: rotate(25deg);
}

.auth-pin {
    position: absolute;
    width: 34px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 3px solid currentColor;
    border-radius: 18px 18px 22px 22px;
    background: #132746;
    box-shadow: 0 12px 28px rgba(0,0,0,.26);
}

.auth-pin::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -8px;
    width: 10px;
    height: 10px;
    border-right: 4px solid currentColor;
    border-bottom: 4px solid currentColor;
    transform: translateX(-50%) rotate(45deg);
}

.auth-pin i {
    width: 17px;
    height: 17px;
    display: block;
    border-radius: 50%;
    background: linear-gradient(135deg, #e8edf8, #7184a4);
}

.auth-pin--primary { top: 55px; left: 120px; color: #58A0DC; }
.auth-pin--portfolio { top: 107px; left: 356px; color: #52d5a6; transform: scale(.83); }
.auth-pin--private { top: 42px; right: 62px; color: #97a7be; transform: scale(.72); }

.auth-map-card {
    position: absolute;
    right: 28px;
    bottom: 25px;
    min-width: 280px;
    display: grid;
    grid-template-columns: 46px 1fr 28px;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 15px;
    background: rgba(11,25,48,.82);
    box-shadow: 0 18px 44px rgba(0,0,0,.22);
    backdrop-filter: blur(14px);
}

.auth-map-card__thumb {
    width: 46px;
    height: 40px;
    display: block;
    border-radius: 10px;
    background:
        linear-gradient(150deg, transparent 48%, rgba(255,255,255,.12) 49%, transparent 51%),
        linear-gradient(135deg, #39547e, #182b49);
}

.auth-map-card div {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.auth-map-card strong {
    color: #fff;
    font-size: 13px;
}

.auth-map-card small {
    overflow: hidden;
    color: #aab8cd;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.auth-map-card__status {
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #9bf0cf;
    background: rgba(48,191,139,.14);
    font-size: 12px;
    font-weight: 900;
}

.auth-benefits {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.auth-benefits > div {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: 11px;
}

.auth-benefits > div > span {
    color: #7893f7;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .08em;
}

.auth-benefits p {
    display: grid;
    gap: 4px;
    margin: 0;
}

.auth-benefits strong {
    color: #f6f8fc;
    font-size: 13px;
}

.auth-benefits small {
    color: #8fa0ba;
    font-size: 11px;
    line-height: 1.45;
}

.auth-panel {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 74px clamp(42px, 6vw, 92px) 42px;
    background:
        radial-gradient(circle at 92% 8%, rgba(31,111,178,.08), transparent 22rem),
        linear-gradient(180deg, #f9fbfe, #f1f5fa);
}

.auth-card--refined {
    width: min(455px, 100%);
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.auth-mobile-brand {
    display: none;
    margin-bottom: 38px;
}

.auth-mobile-brand .auth-brand__mark {
    border-color: #dbe3f2;
    background: #EAF4FB;
}

.auth-mobile-brand strong {
    color: var(--account-ink);
}

.auth-card--refined .auth-card__header {
    margin-bottom: 31px;
}

.auth-card--refined .auth-card__header h2 {
    margin: 4px 0 10px;
    color: var(--account-ink);
    font-size: 40px;
    line-height: 1.08;
    letter-spacing: -.045em;
}

.auth-card--refined .auth-card__header p:last-child {
    max-width: 410px;
    color: var(--account-muted);
    font-size: 14px;
    line-height: 1.62;
}

.auth-alert {
    display: grid;
    grid-template-columns: 34px 1fr;
    align-items: start;
    gap: 12px;
    margin-bottom: 22px;
    padding: 14px 15px;
    border: 1px solid;
    border-radius: 14px;
}

.auth-alert__icon {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 900;
}

.auth-alert > div {
    display: grid;
    gap: 3px;
}

.auth-alert strong {
    font-size: 13px;
}

.auth-alert p {
    margin: 0;
    font-size: 12px;
    line-height: 1.48;
}

.auth-alert--error {
    color: #8f322d;
    border-color: #f0c7c3;
    background: #fff4f3;
}

.auth-alert--error .auth-alert__icon { color: #fff; background: #d65149; }

.auth-alert--success {
    color: #176847;
    border-color: #bee5d4;
    background: #f0fbf6;
}

.auth-alert--success .auth-alert__icon { color: #fff; background: #23966c; }

.auth-alert--warning {
    color: #7b571d;
    border-color: #edd7aa;
    background: #fff9eb;
}

.auth-alert--warning .auth-alert__icon { color: #fff; background: #c88a29; }

.auth-form--refined {
    gap: 19px;
}

.field--auth,
.field--security {
    gap: 8px;
}

.field--auth .field__label,
.field--security .field__label {
    color: #28374b;
    font-size: 13px;
    font-weight: 770;
}

.input-control {
    position: relative;
    display: block;
}

.input-control__icon {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 15px;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: #8a98ab;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    transform: translateY(-50%);
    pointer-events: none;
}

.input-control input[type="text"],
.input-control input[type="password"] {
    width: 100%;
    height: 54px;
    padding: 0 48px 0 46px;
    border: 1px solid #ccd6e2;
    border-radius: 14px;
    color: #142239;
    background: rgba(255,255,255,.96);
    box-shadow: 0 1px 2px rgba(20,34,57,.02);
    font-size: 14px;
    transition: border-color .14s ease, box-shadow .14s ease, background .14s ease;
}

.input-control input:hover {
    border-color: #acb9c9;
}

.input-control input:focus {
    border-color: #5574e7;
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(31,111,178,.105), 0 9px 24px rgba(34,61,144,.06);
}

.input-control:focus-within .input-control__icon {
    stroke: var(--account-primary);
}

.password-toggle {
    position: absolute;
    z-index: 3;
    top: 50%;
    right: 9px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 10px;
    color: #718097;
    background: transparent;
    cursor: pointer;
    transform: translateY(-50%);
    transition: color .14s ease, background .14s ease;
}

.password-toggle:hover,
.password-toggle:focus-visible {
    color: var(--account-primary);
    background: #EAF4FB;
    outline: none;
}

.password-toggle svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.password-toggle__hide {
    display: none;
}

.password-toggle[aria-pressed="true"] .password-toggle__show {
    display: none;
}

.password-toggle[aria-pressed="true"] .password-toggle__hide {
    display: block;
}

.caps-lock-hint {
    display: none;
    color: #9a6416;
    font-size: 11px;
    font-weight: 700;
}

.caps-lock-hint.is-visible {
    display: inline-flex;
}

.auth-submit {
    min-height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 4px;
    border-radius: 14px;
    box-shadow: 0 15px 32px rgba(31,111,178,.24);
}

.auth-submit svg,
.account-save-button > svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.button-spinner {
    width: 17px;
    height: 17px;
    display: none;
    border: 2px solid rgba(255,255,255,.34);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ui4-spin .7s linear infinite;
}

[data-submit-button].is-loading > svg,
[data-submit-button].is-loading [data-submit-label] + svg {
    display: none;
}

[data-submit-button].is-loading .button-spinner {
    display: inline-block;
}

[data-submit-button].is-loading {
    cursor: wait;
    opacity: .9;
}

@keyframes ui4-spin { to { transform: rotate(360deg); } }

.auth-support {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 26px;
    padding-top: 23px;
    border-top: 1px solid #e3e9f0;
}

.auth-support__icon {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    color: #5d6f8a;
    background: #edf2f7;
}

.auth-support__icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.auth-support p {
    display: grid;
    gap: 3px;
    margin: 0;
}

.auth-support strong {
    color: #334257;
    font-size: 12px;
}

.auth-support small {
    color: #7a889a;
    font-size: 11px;
}

.auth-legal {
    width: min(455px, 100%);
    margin: 32px 0 0;
    color: #8995a5;
    font-size: 10px;
    line-height: 1.5;
    text-align: center;
}

/* ===== Konto ===== */
.account-page--refined {
    min-height: 100vh;
    background:
        radial-gradient(circle at 9% 9%, rgba(31,111,178,.09), transparent 31rem),
        linear-gradient(180deg, #f9fbfe 0%, #f1f5fa 100%);
}

.account-topbar--refined {
    min-height: 76px;
    padding: 0 clamp(26px, 4vw, 58px);
    background: rgba(255,255,255,.91);
}

.account-topbar__brand,
.account-topbar__actions {
    display: flex;
    align-items: center;
}

.account-topbar__brand {
    gap: 12px;
}

.account-topbar__brand > div {
    display: grid;
    gap: 2px;
}

.account-topbar__brand strong {
    color: var(--account-ink);
    font-size: 14px;
}

.account-topbar__brand span:last-child {
    color: #7a8798;
    font-size: 11px;
}

.account-brand-mark {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
    border-color: #d7e0ef;
    background: #EAF4FB;
}

.account-brand-mark i {
    border-color: #1F6FB2;
}

.account-brand-mark i::after {
    border-color: #1F6FB2;
}

.account-topbar__actions {
    gap: 10px;
}

.account-back-button svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.button--subtle {
    color: #59677a;
    border: 1px solid transparent;
    background: transparent;
}

.button--subtle:hover {
    color: #26364b;
    border-color: #dce3ec;
    background: #f7f9fc;
}

.account-workspace {
    width: min(1180px, calc(100% - 80px));
    margin: 0 auto;
    padding: 54px 0 80px;
}

.account-page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 28px;
}

.account-page-heading h1 {
    margin: 3px 0 8px;
    color: var(--account-ink);
    font-size: 40px;
    line-height: 1.08;
    letter-spacing: -.045em;
}

.account-page-heading p:last-child {
    margin: 0;
    color: var(--account-muted);
    font-size: 14px;
}

.account-state {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border: 1px solid;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.account-state i {
    width: 7px;
    height: 7px;
    display: block;
    border-radius: 50%;
}

.account-state--active {
    color: #19704e;
    border-color: #bee5d5;
    background: #eefbf5;
}

.account-state--active i {
    background: #28a977;
    box-shadow: 0 0 0 4px rgba(40,169,119,.11);
}

.account-grid {
    display: grid;
    grid-template-columns: minmax(300px, .76fr) minmax(0, 1.34fr);
    gap: 25px;
    align-items: start;
}

.account-profile-card,
.account-security-card {
    border: 1px solid var(--account-border);
    border-radius: 24px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 18px 55px rgba(25,42,70,.07);
}

.account-profile-card {
    position: sticky;
    top: 104px;
    padding: 31px;
}

.account-profile-card__top {
    display: grid;
    gap: 22px;
    padding-bottom: 26px;
    border-bottom: 1px solid #e7ecf2;
}

.account-avatar--large {
    width: 78px;
    height: 78px;
    margin: 0;
    display: grid;
    place-items: center;
    border: 1px solid #cad7fb;
    border-radius: 24px;
    color: #fff;
    background: linear-gradient(145deg, #637fea, #1F6FB2);
    box-shadow: 0 15px 35px rgba(31,111,178,.23);
    font-size: 29px;
    font-weight: 850;
}

.account-profile-card h2 {
    margin: 4px 0 7px;
    color: var(--account-ink);
    font-size: 27px;
    line-height: 1.12;
    letter-spacing: -.035em;
}

.account-login {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    color: #748196;
    font-size: 12px;
}

.account-login strong {
    color: #536176;
    font-weight: 720;
}

.account-facts {
    display: grid;
    gap: 0;
    margin: 17px 0 22px;
}

.account-facts > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 0;
    border-bottom: 1px solid #edf1f5;
}

.account-facts > div:last-child {
    border-bottom: 0;
}

.account-facts dt {
    color: #778497;
    font-size: 11px;
}

.account-facts dd {
    margin: 0;
    color: #26354a;
    font-size: 12px;
    font-weight: 720;
    text-align: right;
}

.fact-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.fact-status::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.fact-status--success {
    color: #16704d;
}

.fact-status--success::before {
    background: #28a977;
}

.account-security-state {
    display: grid;
    grid-template-columns: 40px 1fr;
    align-items: start;
    gap: 12px;
    padding: 14px;
    border: 1px solid;
    border-radius: 15px;
}

.account-security-state__icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 11px;
}

.account-security-state__icon svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.account-security-state > div {
    display: grid;
    gap: 4px;
}

.account-security-state strong {
    font-size: 12px;
}

.account-security-state p {
    margin: 0;
    font-size: 11px;
    line-height: 1.48;
}

.account-security-state--warning {
    color: #7b571a;
    border-color: #ead5aa;
    background: #fff9eb;
}

.account-security-state--warning .account-security-state__icon {
    color: #a97117;
    background: #f9eac8;
}

.account-security-state--success {
    color: #176948;
    border-color: #bfe4d5;
    background: #f1faf6;
}

.account-security-state--success .account-security-state__icon {
    color: #1f8b62;
    background: #dff4ea;
}

.account-security-card {
    padding: 34px;
}

.account-security-card__header {
    display: grid;
    grid-template-columns: 46px 1fr;
    align-items: start;
    gap: 15px;
    margin-bottom: 27px;
    padding-bottom: 25px;
    border-bottom: 1px solid #e7ecf2;
}

.security-heading-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #1F6FB2;
    background: #EAF4FB;
}

.security-heading-icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.account-security-card__header h2 {
    margin: 3px 0 7px;
    color: var(--account-ink);
    font-size: 27px;
    line-height: 1.14;
    letter-spacing: -.035em;
}

.account-security-card__header p:last-child {
    margin: 0;
    color: var(--account-muted);
    font-size: 13px;
    line-height: 1.55;
}

.account-password-form {
    display: grid;
    gap: 22px;
}

.password-builder {
    display: grid;
    gap: 13px;
    padding: 17px;
    border: 1px solid #e1e7ef;
    border-radius: 17px;
    background: #f8fafd;
}

.password-strength {
    display: grid;
    gap: 7px;
}

.password-strength__label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: #748196;
    font-size: 10px;
}

.password-strength__label strong {
    color: #637188;
    font-size: 10px;
}

.password-strength__track {
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: #e4e9f0;
}

.password-strength__track span {
    width: 0;
    height: 100%;
    display: block;
    border-radius: inherit;
    background: #a9b3c2;
    transition: width .18s ease, background .18s ease;
}

.password-strength[data-level="weak"] .password-strength__track span { width: 25%; background: #d9554e; }
.password-strength[data-level="fair"] .password-strength__track span { width: 50%; background: #df9a2f; }
.password-strength[data-level="good"] .password-strength__track span { width: 75%; background: #5c78de; }
.password-strength[data-level="strong"] .password-strength__track span { width: 100%; background: #27a474; }

.password-rules {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 13px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.password-rules li {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #8591a2;
    font-size: 10px;
    transition: color .14s ease;
}

.password-rules li span {
    width: 16px;
    height: 16px;
    display: grid;
    place-items: center;
    border: 1px solid #d1d9e4;
    border-radius: 50%;
    color: transparent;
    background: #fff;
    font-size: 9px;
    font-weight: 900;
}

.password-rules li.is-met {
    color: #257a59;
}

.password-rules li.is-met span {
    color: #fff;
    border-color: #2ca476;
    background: #2ca476;
}

.password-match {
    min-height: 16px;
    color: #7f8c9e;
    font-size: 10px;
}

.password-match.is-valid { color: #23805b; }
.password-match.is-invalid { color: #b9443e; }

.security-notice {
    display: grid;
    grid-template-columns: 35px 1fr;
    align-items: start;
    gap: 11px;
    padding: 14px;
    border: 1px solid #d9e4f6;
    border-radius: 15px;
    color: #425777;
    background: #f2f6fd;
}

.security-notice svg {
    width: 22px;
    height: 22px;
    margin: 3px auto 0;
    fill: none;
    stroke: #5873d5;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.security-notice p {
    display: grid;
    gap: 4px;
    margin: 0;
}

.security-notice strong {
    color: #30466a;
    font-size: 11px;
}

.security-notice span {
    color: #65758c;
    font-size: 10px;
    line-height: 1.5;
}

.account-form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 3px;
}

.account-save-button {
    min-width: 170px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
}

@media (prefers-reduced-motion: no-preference) {
    .auth-story__content,
    .auth-card--refined,
    .account-profile-card,
    .account-security-card {
        animation: ui4-enter .38s cubic-bezier(.2,.8,.2,1) both;
    }

    .auth-card--refined,
    .account-security-card { animation-delay: .05s; }

    .auth-pin--primary { animation: ui4-pin 2.8s ease-in-out infinite; }
    .auth-pin--portfolio { animation: ui4-pin 3.2s .3s ease-in-out infinite; }

    @keyframes ui4-enter {
        from { opacity: 0; transform: translateY(8px); }
        to { opacity: 1; transform: translateY(0); }
    }

    @keyframes ui4-pin {
        0%, 100% { margin-top: 0; }
        50% { margin-top: -5px; }
    }
}

@media (max-width: 1220px) {
    .auth-shell {
        grid-template-columns: minmax(0, 1fr) minmax(440px, .86fr);
    }

    .auth-story__content {
        padding-inline: 52px;
    }

    .auth-copy h1 {
        font-size: clamp(44px, 4.7vw, 62px);
    }

    .auth-benefits {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .auth-benefits > div {
        align-items: center;
    }
}

@media (max-width: 960px) {
    .auth-public-link {
        color: #43536b;
        border-color: #dce3ed;
        background: rgba(255,255,255,.9);
    }

    .auth-public-link:hover {
        color: #1d3150;
        border-color: #cad5e4;
        background: #fff;
    }

    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-story {
        display: none;
    }

    .auth-panel {
        min-height: 100vh;
        padding: 88px 28px 42px;
    }

    .auth-mobile-brand {
        display: flex;
    }

    .account-grid {
        grid-template-columns: 1fr;
    }

    .account-profile-card {
        position: static;
    }
}

@media (max-width: 720px) {
    .account-topbar--refined {
        min-height: auto;
        flex-wrap: wrap;
        gap: 12px;
        padding-block: 14px;
    }

    .account-topbar__actions {
        width: 100%;
        justify-content: space-between;
    }

    .account-workspace {
        width: min(100% - 32px, 1180px);
        padding-top: 35px;
    }

    .account-page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .account-page-heading h1 {
        font-size: 34px;
    }

    .account-security-card,
    .account-profile-card {
        padding: 24px;
        border-radius: 20px;
    }

    .password-rules {
        grid-template-columns: 1fr;
    }

    .account-form-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .account-form-actions .button {
        width: 100%;
    }
}

@media (max-width: 520px) {
    .auth-public-link span {
        display: none;
    }

    .auth-public-link {
        width: 42px;
        padding: 0;
        justify-content: center;
    }

    .auth-panel {
        padding-inline: 20px;
    }

    .auth-card--refined .auth-card__header h2 {
        font-size: 34px;
    }
}

/* ===== MVP20.3: czytelniejszy i precyzyjnie wycentrowany formularz hasła ===== */
.account-security-card {
    padding: 38px;
}

.account-security-card__header {
    grid-template-columns: 52px minmax(0, 1fr);
    align-items: center;
    gap: 18px;
}

.security-heading-icon {
    width: 52px;
    height: 52px;
    border-radius: 15px;
}

.security-heading-icon svg {
    width: 25px;
    height: 25px;
    stroke-width: 1.9;
}

.account-security-card__header h2 {
    font-size: 29px;
}

.account-security-card__header p:last-child {
    font-size: 14px;
}

.field--security {
    gap: 10px;
}

.field--security .field__label {
    font-size: 14px;
    line-height: 1.25;
}

.account-password-form .input-control {
    position: relative !important;
    width: 100%;
    display: block;
}

.account-password-form .input-control__icon {
    top: 50% !important;
    left: 17px !important;
    width: 21px;
    height: 21px;
    transform: translateY(-50%) !important;
    stroke-width: 1.9;
}

.account-password-form .input-control input[type="text"],
.account-password-form .input-control input[type="password"] {
    height: 58px;
    padding: 0 56px 0 52px;
    border-radius: 15px;
    font-size: 15px;
    line-height: 58px;
}

.account-password-form .input-control input::placeholder {
    color: #929fb1;
    opacity: 1;
}

.account-password-form .password-toggle {
    position: absolute !important;
    z-index: 4;
    top: 50% !important;
    right: 9px !important;
    left: auto !important;
    bottom: auto !important;
    width: 42px;
    height: 42px;
    display: grid !important;
    place-items: center;
    margin: 0 !important;
    transform: translateY(-50%) !important;
}

.account-password-form .password-toggle svg {
    width: 21px;
    height: 21px;
    stroke-width: 1.9;
}

.password-builder {
    gap: 16px;
    padding: 20px;
    border-radius: 18px;
}

.password-strength {
    gap: 9px;
}

.password-strength__label,
.password-strength__label strong {
    font-size: 12px;
    line-height: 1.3;
}

.password-strength__track {
    height: 8px;
}

.password-rules {
    gap: 10px 18px;
}

.password-rules li {
    gap: 9px;
    color: #718096;
    font-size: 12px;
    line-height: 1.35;
}

.password-rules li span {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    font-size: 11px;
}

.password-match {
    min-height: 19px;
    font-size: 12px;
    line-height: 1.4;
}

.security-notice {
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 17px;
}

.security-notice svg {
    width: 25px;
    height: 25px;
    margin: 0 auto;
}

.security-notice strong {
    font-size: 12.5px;
}

.security-notice span {
    font-size: 11.5px;
    line-height: 1.55;
}

.account-form-actions .button {
    min-height: 46px;
    font-size: 13.5px;
}

.account-save-button > svg {
    width: 20px;
    height: 20px;
}


/* MVP20.21 — spójny blok tworzenia i potwierdzania hasła */
.account-page-heading > div > .eyebrow + h1 {
    margin-bottom: 0;
}

.password-confirmation {
    display: grid;
    gap: 11px;
    padding-top: 17px;
    border-top: 1px solid #e1e7ef;
}

.password-match {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #dce4ee;
    border-radius: 12px;
    color: #66758a;
    background: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
    transition: color .16s ease, border-color .16s ease, background .16s ease;
}

.password-match__icon {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: #95a2b4;
    font-size: 12px;
    font-weight: 900;
}

.password-match.is-valid {
    color: #176b4b;
    border-color: #bce5d3;
    background: #effaf5;
}

.password-match.is-valid .password-match__icon {
    background: #27996e;
}

.password-match.is-invalid {
    color: #963d37;
    border-color: #efc7c3;
    background: #fff4f3;
}

.password-match.is-invalid .password-match__icon {
    background: #d45149;
}

.password-match.is-pending {
    color: #65758b;
    border-color: #dce4ee;
    background: #f7f9fc;
}

.account-save-button:disabled {
    cursor: not-allowed;
    opacity: .5;
    box-shadow: none;
    transform: none;
}


/* MVP20.44 — ukrycie natywnego przycisku podglądu hasła w przeglądarce. */
.auth-form--refined input[type="password"]::-ms-reveal,
.auth-form--refined input[type="password"]::-ms-clear {
    display: none;
}

.auth-form--refined input[type="password"]::-webkit-credentials-auto-fill-button,
.auth-form--refined input[type="password"]::-webkit-textfield-decoration-container {
    visibility: hidden;
    pointer-events: none;
}
