/* Konta klientów: link w nagłówku, logowanie / rejestracja (konto.php), panel klienta, zachęta na stronie zamówienia. */

/* ---------- Nagłówek strony ---------- */
.header-account { display: flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 700; font-size: .92rem; white-space: nowrap; color: var(--ink); }
.header-account__icon { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--violet-100); color: var(--violet); transition: transform .3s var(--ease-spring); }
.header-account__icon .ico { width: 19px; height: 19px; }
.header-account__icon.is-in::after { content: ''; position: absolute; right: 1px; bottom: 1px; width: 11px; height: 11px; border-radius: 50%; background: var(--green); border: 2px solid var(--bg); }
.header-account:hover .header-account__icon { transform: scale(1.08); }
.home .masthead:not(.is-scrolled) .header-account { color: #fff; }
.home .masthead:not(.is-scrolled) .header-account__icon { background: rgba(255, 255, 255, .1); color: #fff; }
.home .masthead:not(.is-scrolled) .header-account__icon.is-in::after { border-color: #1D1B26; }
@media (max-width: 1280px) { .header-account__text { display: none; } }
@media (max-width: 1024px) { body.nav-open .masthead .header-account { opacity: 0; pointer-events: none; } }
@media (max-width: 400px) { .header-account { display: none; } }

/* ---------- Wspólne ---------- */
.acc-main { padding-top: calc(var(--header-h) + 48px); }
.acc-flash { display: flex; align-items: center; gap: 12px; max-width: 1040px; margin: 0 auto 24px; padding: 14px 18px; border-radius: 16px; background: #EAF8F1; border: 1px solid #CBEEDC; color: var(--green-text); font-weight: 700; animation: accIn .5s var(--ease); }
.acc-flash .ico { flex: none; width: 22px; height: 22px; }
.acc-flash--error { background: #FDF0F0; border-color: #F8D4D5; color: var(--red-text); }
.acc-link { color: var(--violet); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.acc-link:hover { color: var(--violet-600); }
.acc-muted { color: var(--muted); margin: 0 0 16px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.field__hint { color: var(--muted-2); font-size: .82rem; line-height: 1.45; }
.btn--danger { color: #fff; background: var(--red-text); box-shadow: 0 10px 26px -10px rgba(201, 40, 45, .6); }
.btn--danger:hover { background: #B01F24; }
@keyframes accIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.acc-alert { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 20px; padding: 14px 16px; border-radius: 16px; font-size: .93rem; line-height: 1.5; }
.acc-alert > .ico { flex: none; width: 22px; height: 22px; margin-top: 1px; }
.acc-alert p { margin: 4px 0 10px; color: var(--muted); }
.acc-alert a { color: inherit; font-weight: 800; text-decoration: underline; text-underline-offset: 2px; }
.acc-alert--error { background: #FDF0F0; border: 1px solid #F8D4D5; color: var(--red-text); }
.acc-alert--warn { background: #FFF6E5; border: 1px solid #FBE3B5; color: #8A5300; }

/* ---------- Logowanie i rejestracja ---------- */
.acc-auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 480px); gap: 28px; max-width: 1040px; margin: 0 auto; align-items: stretch; }
.acc-auth--narrow { grid-template-columns: minmax(0, 520px); justify-content: center; }
.acc-aside { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center; padding: clamp(28px, 4vw, 48px); border-radius: var(--radius-xl); color: #fff; background: radial-gradient(520px 360px at 100% 0%, rgba(123, 97, 255, .55), transparent 60%), radial-gradient(400px 300px at 0% 100%, rgba(66, 226, 211, .18), transparent 60%), var(--ink); box-shadow: var(--shadow-lg); }
.acc-aside__title { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 800; line-height: 1.15; margin-bottom: 28px; }
.acc-aside__list { display: grid; gap: 20px; }
.acc-aside__list li { display: flex; gap: 14px; align-items: flex-start; }
.acc-aside__list b { display: block; font-family: var(--font-display); font-size: 1.02rem; }
.acc-aside__list small { display: block; color: rgba(235, 232, 255, .68); font-size: .9rem; margin-top: 2px; }
.acc-aside__ico { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); color: var(--violet-300); }
.acc-aside__ico .ico { width: 21px; height: 21px; }

.acc-card { padding: clamp(24px, 4vw, 40px); border-radius: var(--radius-xl); animation: accIn .5s var(--ease); }
.acc-card--center { text-align: center; }
.acc-card--center .acc-tips { text-align: left; }
.acc-title { font-size: clamp(1.5rem, 3vw, 1.95rem); font-weight: 800; margin-bottom: 8px; }
.acc-lead { color: var(--muted); margin: 0 0 24px; }
.acc-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 26px; border-radius: 14px; background: var(--violet-50); border: 1px solid var(--violet-100); }
.acc-switch a { display: grid; place-items: center; min-height: 42px; border-radius: 11px; font-family: var(--font-display); font-weight: 700; font-size: .92rem; color: var(--muted); transition: background .2s, color .2s, box-shadow .2s; }
.acc-switch a:hover { color: var(--ink); }
.acc-switch a.is-active { background: var(--surface); color: var(--violet); box-shadow: var(--shadow-sm); }
.acc-form { display: grid; gap: 16px; }
.acc-form .form__grid { margin-bottom: 4px; }
.acc-form > .btn { margin-top: 6px; }
.acc-form .consent { margin-top: 2px; }
.acc-consent .field__error { display: block; margin-top: 4px; }
.acc-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .92rem; }
.acc-check { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; color: var(--muted); }
.acc-check input { position: absolute; opacity: 0; }
.acc-check__box { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--line-2); color: transparent; background: var(--surface); transition: .2s var(--ease-spring); }
.acc-check__box .ico { width: 14px; height: 14px; }
.acc-check:has(input:checked) .acc-check__box { background: var(--violet); border-color: var(--violet); color: #fff; }
.acc-check:has(input:focus-visible) .acc-check__box { outline: 3px solid var(--violet-400); outline-offset: 2px; }
.acc-foot { margin: 22px 0 0; text-align: center; color: var(--muted); font-size: .94rem; }

.pass-wrap { position: relative; }
.pass-wrap input { padding-right: 54px; }
.pass-toggle { position: absolute; right: 6px; top: 50%; translate: 0 -50%; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; color: var(--muted-2); transition: color .2s, background .2s; }
.pass-toggle:hover { color: var(--violet); background: var(--violet-50); }
.pass-toggle .ico { width: 20px; height: 20px; }
.pass-rules { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 2px 0 0; font-size: .82rem; font-weight: 600; color: var(--muted-2); }
.pass-rules li { display: inline-flex; align-items: center; gap: 6px; transition: color .2s; }
.pass-rules li::before { content: ''; width: 15px; height: 15px; border-radius: 50%; border: 2px solid var(--line-2); transition: .2s; }
.pass-rules li.is-ok { color: var(--green-text); }
.pass-rules li.is-ok::before { border-color: var(--green); background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 10px no-repeat; }

.acc-divider { display: flex; align-items: center; gap: 14px; margin: 24px 0 18px; color: var(--muted-2); font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; }
.acc-divider::before, .acc-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.oauth-list { display: grid; gap: 10px; }
.oauth-btn { position: relative; display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 52px; padding: 12px 20px; border-radius: 14px; font-family: var(--font-display); font-weight: 700; font-size: .95rem; transition: transform .25s var(--ease), box-shadow .25s, background .2s, border-color .2s; }
.oauth-btn:active { transform: scale(.98); }
.oauth-btn--google { background: #fff; color: #1F1F1F; border: 1.5px solid var(--line-2); }
.oauth-btn--google:hover { border-color: #B9B4D3; box-shadow: var(--shadow-sm); }
.oauth-btn--apple { background: #000; color: #fff; border: 1.5px solid #000; }
.oauth-btn--apple:hover { background: #1C1C1E; }
.oauth-btn svg { flex: none; }
.oauth-btn.is-loading { pointer-events: none; opacity: .7; }

.acc-badge-ico { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 20px; background: var(--violet-100); color: var(--violet); }
.acc-badge-ico .ico { width: 30px; height: 30px; }
.acc-badge-ico.is-warn { background: #FFF2DA; color: #A86200; }
.acc-tips { display: grid; gap: 8px; margin: 0 0 22px; padding: 16px 18px; border-radius: 16px; background: var(--violet-50); font-size: .92rem; color: var(--muted); }
.acc-tips li { position: relative; padding-left: 18px; }
.acc-tips li::before { content: ''; position: absolute; left: 0; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: var(--violet-300); }
.acc-tips b { color: var(--ink); }

/* ---------- Panel klienta ---------- */
.acc-panel { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 28px; align-items: start; }
.acc-nav { position: sticky; top: calc(var(--header-h) + 20px); padding: 18px; border-radius: var(--radius-lg); }
.acc-nav__me { display: flex; align-items: center; gap: 12px; padding: 6px 6px 18px; margin-bottom: 10px; border-bottom: 1px solid var(--line); min-width: 0; }
.acc-nav__me span:last-child { min-width: 0; }
.acc-nav__me b { display: block; font-family: var(--font-display); font-size: .98rem; line-height: 1.25; overflow-wrap: anywhere; }
.acc-nav__me small { display: block; color: var(--muted-2); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-avatar { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 15px; background: var(--grad); color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; box-shadow: var(--glow); }
.acc-nav nav { display: grid; gap: 4px; }
.acc-nav__link { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 10px 12px; border-radius: 12px; font-weight: 700; font-size: .95rem; color: var(--muted); text-align: left; transition: background .2s, color .2s; }
.acc-nav__link .ico { flex: none; width: 20px; height: 20px; }
.acc-nav__link:hover { background: var(--violet-50); color: var(--ink); }
.acc-nav__link.is-active { background: var(--violet-100); color: var(--violet); }
.acc-nav__link--out { margin-top: 6px; border-top: 1px solid var(--line); border-radius: 0 0 12px 12px; padding-top: 14px; }
.acc-nav__link--out:hover { color: var(--red-text); background: #FDF0F0; }

.acc-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 24px; }
.acc-head .eyebrow { margin-bottom: 10px; }
.acc-h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 800; }
.acc-sub { color: var(--muted); margin: 6px 0 0; }
.acc-h2 { display: flex; align-items: center; gap: 10px; margin: 34px 0 14px; font-size: 1.25rem; font-weight: 800; }
.acc-h2 span { display: grid; place-items: center; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 999px; background: var(--violet-100); color: var(--violet); font-size: .82rem; }

.acc-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.acc-stat { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); min-width: 0; }
.acc-stat__ico { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--violet-50); color: var(--violet); }
.acc-stat__ico .ico { width: 21px; height: 21px; }
.acc-stat small { display: block; color: var(--muted-2); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.acc-stat b { display: block; font-family: var(--font-display); font-size: 1.25rem; line-height: 1.25; }

.acc-orders { display: grid; gap: 16px; }
.acc-order { position: relative; padding: 22px 24px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: box-shadow .3s, transform .3s var(--ease); animation: accIn .5s var(--ease) both; }
.acc-order:hover { box-shadow: var(--shadow); }
.acc-order::before { content: ''; position: absolute; left: 0; top: 22px; bottom: 22px; width: 4px; border-radius: 0 4px 4px 0; background: var(--violet); }
.acc-order--confirmed::before { background: #1F5FC4; }
.acc-order--in_progress::before { background: var(--amber); }
.acc-order--done::before { background: var(--green); }
.acc-order--cancelled::before, .acc-order--rejected::before { background: var(--line-2); }
.acc-orders--history .acc-order { padding-block: 18px; }
.acc-order__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.acc-order__id { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.acc-order__num { font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; letter-spacing: .01em; }
.acc-order__price { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; color: var(--violet); text-align: right; line-height: 1.1; }
.acc-order__price small { display: block; font-family: var(--font-body); font-size: .75rem; font-weight: 600; color: var(--muted-2); }
.acc-order__meta { display: grid; gap: 7px; margin: 14px 0 0; }
.acc-order__meta li { display: flex; align-items: flex-start; gap: 10px; color: var(--text); font-weight: 600; font-size: .95rem; line-height: 1.45; }
.acc-order__meta .ico { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--violet-400); }
.acc-order__meta li:last-child { color: var(--muted); font-weight: 500; }
.acc-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 18px 0 4px; }
.acc-steps li { position: relative; padding-top: 14px; font-size: .78rem; font-weight: 700; color: var(--muted-2); text-align: center; }
.acc-steps li::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 6px; border-radius: 3px; background: var(--line); }
.acc-steps li.is-done { color: var(--ink); }
.acc-steps li.is-done::before { background: var(--violet); }
.acc-steps li.is-current span { color: var(--violet); }
.acc-order__note { display: flex; align-items: flex-start; gap: 10px; margin: 16px 0 0; padding: 12px 14px; border-radius: 14px; background: var(--violet-50); border: 1px solid var(--violet-100); font-size: .92rem; color: var(--muted); line-height: 1.5; }
.acc-order__note .ico { flex: none; width: 20px; height: 20px; color: var(--violet); }
.acc-order__note b { color: var(--ink); }
.acc-order__note--green { background: #EAF8F1; border-color: #CBEEDC; }
.acc-order__note--green .ico { color: var(--green-text); }
.acc-order__note--red { background: #FDF0F0; border-color: #F8D4D5; }
.acc-order__note--red .ico { color: var(--red-text); }
.acc-order__msg { margin: 10px 0 0; font-size: .92rem; color: var(--text); }
.acc-order__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.acc-order__foot small { color: var(--muted-2); font-weight: 600; }
.acc-order__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.acc-order__actions .ico { width: 17px; height: 17px; }

.acc-empty { text-align: center; margin-top: 22px; padding: clamp(28px, 5vw, 48px); border-radius: var(--radius-lg); }
.acc-empty h2 { font-size: 1.4rem; font-weight: 800; margin-bottom: 8px; }
.acc-empty p { color: var(--muted); max-width: 520px; margin: 0 auto 20px; }
.acc-note { display: flex; align-items: flex-start; gap: 10px; margin: 28px 0 0; color: var(--muted-2); font-size: .88rem; }
.acc-note .ico { flex: none; width: 18px; height: 18px; margin-top: 2px; }
.acc-note a { color: var(--violet); font-weight: 700; white-space: nowrap; }

.acc-section { margin-bottom: 20px; padding: clamp(22px, 3.5vw, 32px); border-radius: var(--radius-lg); }
.acc-section__title { display: flex; align-items: center; gap: 10px; font-size: 1.15rem; font-weight: 800; margin-bottom: 16px; }
.acc-section__title .ico { width: 22px; height: 22px; color: var(--violet); }
.acc-section .acc-form > .btn { justify-self: start; }
.acc-danger { border-color: #F8D4D5; background: linear-gradient(180deg, #FFFAFA, #fff); }
.acc-danger .acc-section__title .ico { color: var(--red-text); }
.acc-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.acc-methods { display: grid; gap: 10px; margin-bottom: 20px; }
.acc-methods li { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); color: var(--muted-2); }
.acc-methods li .ico { flex: none; width: 22px; height: 22px; }
.acc-methods li b { display: block; color: var(--ink); font-size: .95rem; }
.acc-methods li small { display: block; font-size: .84rem; }
.acc-methods li.is-on { border-color: #CBEEDC; background: #F3FBF7; }
.acc-methods li.is-on small { color: var(--green-text); font-weight: 700; }
.acc-methods li.is-on .ico { color: var(--green-text); }

/* ---------- Strona statusu zamówienia ---------- */
.acc-back { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; font-weight: 700; color: var(--violet); }
.acc-back .ico { width: 18px; height: 18px; }
.acc-promo { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px; margin-top: 24px; padding: 22px 24px; border-radius: var(--radius-lg); background: linear-gradient(120deg, var(--violet-50), #fff); border: 1px solid var(--violet-100); }
.acc-promo__ico { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--grad); color: #fff; box-shadow: var(--glow); }
.acc-promo__ico .ico { width: 24px; height: 24px; }
.acc-promo b { display: block; font-family: var(--font-display); font-size: 1.08rem; }
.acc-promo p { margin: 3px 0 0; color: var(--muted); font-size: .93rem; }
.acc-promo__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.lookup-account { margin: 18px 0 0; color: var(--muted); font-size: .94rem; }

@media (max-width: 1024px) {
    .acc-auth { grid-template-columns: 1fr; max-width: 560px; }
    .acc-aside { display: none; }
    .acc-panel { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .acc-nav { position: static; padding: 10px; min-width: 0; }
    .acc-nav__me { display: none; }
    .acc-nav nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
    .acc-nav nav::-webkit-scrollbar { display: none; }
    .acc-nav__link { width: auto; flex: none; white-space: nowrap; min-height: 42px; }
    .acc-nav nav form { flex: none; }
    .acc-nav__link--out { margin: 0; border: 0; border-radius: 12px; padding-top: 10px; }
}
@media (max-width: 760px) {
    .acc-main { padding-top: calc(var(--header-h) + 28px); }
    .acc-stats { grid-template-columns: 1fr; gap: 10px; }
    .acc-stat { padding: 14px 16px; }
    .acc-head .btn { width: 100%; }
    .acc-order { padding: 18px; }
    .acc-order__price { text-align: left; }
    .acc-order__foot .acc-order__actions { width: 100%; }
    .acc-order__actions .btn { flex: 1; }
    .acc-promo { grid-template-columns: 1fr; text-align: left; }
    .acc-promo__actions .btn { flex: 1; }
    .acc-steps li { font-size: .7rem; }
}
