/* Centralny układ korzysta z tokenów wspólnych stron konta. */
.auth-shell.is-centered {
    --warning: 38 86% 42%;
    display: grid;
    grid-template-rows: auto 1fr auto;
    position: relative;
    isolation: isolate;
    min-width: 0;
    min-height: 100vh;
    min-height: 100svh;
    overflow-x: clip;
    background: hsl(var(--background));
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.auth-shell.is-centered.has-blueprint {
    background-image:
        radial-gradient(ellipse at 4% 22%, hsl(var(--primary) / 0.12), transparent 55%),
        radial-gradient(ellipse at 100% 88%, hsl(var(--accent) / 0.06), transparent 53%);
}

.auth-shell.is-centered.has-blueprint::before {
    content: "";
    position: absolute;
    inset: 72px 0 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        linear-gradient(hsl(var(--primary) / 0.035) 1px, transparent 1px),
        linear-gradient(90deg, hsl(var(--primary) / 0.035) 1px, transparent 1px),
        linear-gradient(hsl(var(--primary) / 0.035) 1px, transparent 1px),
        linear-gradient(90deg, hsl(var(--primary) / 0.035) 1px, transparent 1px);
    background-size: 32px 32px, 32px 32px, 160px 160px, 160px 160px;
    mask-image: linear-gradient(135deg, #000 5%, #0008 75%, transparent);
}

.auth-shell.is-centered [hidden] { display: none !important; }
.auth-shell.is-centered .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}
.auth-shell.is-centered :is(button, input, select, textarea) { font-family: inherit; }
.auth-shell.is-centered :is(a, button, summary, input):focus-visible {
    outline: 2px solid hsl(var(--ring));
    outline-offset: 3px;
}

.auth-shell.is-centered > :is(.auth-header, .content-panel, .auth-footer) {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.auth-shell.is-centered .auth-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 72px;
    padding: 16px 30px;
    border-bottom: 1px solid hsl(var(--border));
    background: hsl(var(--card));
}

.auth-shell.is-centered .auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    color: hsl(var(--foreground));
    text-decoration: none;
}

.auth-shell.is-centered .brand-logo { width: 30px; height: 30px; object-fit: contain; }
.auth-shell.is-centered .brand-wordmark {
    color: hsl(var(--foreground));
    font-size: 22px;
    font-weight: 500;
    letter-spacing: -0.035em;
}

.auth-shell.is-centered .language-switch {
    position: static;
    flex: 0 0 auto;
    gap: 2px;
    padding: 2px;
    border-radius: 8px;
    background: hsl(var(--muted) / 0.6);
}

.auth-shell.is-centered .language-switch a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 32px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.auth-shell.is-centered .content-panel {
    width: 100%;
    min-width: 0;
    padding: 40px 24px 28px;
    justify-content: center;
}

.auth-shell.is-centered .content-panel:has(.is-registration) {
    justify-content: flex-start;
    padding-top: 28px;
}

.auth-shell.is-centered .content-panel.is-scroll {
    justify-content: flex-start;
    padding: 32px 26px 20px;
}

.auth-shell.is-centered .content {
    width: 100%;
    min-width: 0;
    max-width: 430px;
    gap: 20px;
}

.auth-shell.is-centered .auth-card {
    padding: 30px;
    border: 1px solid hsl(var(--border));
    border-radius: 14px;
    background: hsl(var(--card));
    box-shadow: 0 8px 32px hsl(var(--foreground) / 0.07);
}

/* Strona błędu ma już kartę; wewnętrzna ramka statusu zostaje tylko ikoną i tekstem. */
.auth-shell.is-centered .auth-card > .status-card { gap: 20px; padding: 6px 0 0; border: 0; border-radius: 0; background: none; }
.auth-shell.is-centered .auth-card > .status-card .btn-primary { width: 100%; }
.auth-shell.is-centered .content.is-registration { max-width: 570px; }
.auth-shell.is-centered .content.is-wide { max-width: 940px; gap: 18px; }
.auth-shell.is-centered .auth-heading h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: -0.025em;
}

.auth-shell.is-centered .auth-heading p { margin-top: 9px; font-size: 14px; line-height: 1.55; }
.auth-shell.is-centered .auth-eyebrow { margin: 0 0 7px; color: hsl(var(--primary)); font-size: 12px; font-weight: 500; }
.auth-shell.is-centered .providers { gap: 10px; }
.auth-shell.is-centered .provider {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    gap: 12px;
    padding: 10px 14px;
    border-color: hsl(var(--border));
    border-radius: 9px;
}

.auth-shell.is-centered .provider-label { white-space: normal; font-weight: 500; line-height: 1.4; }
.auth-shell.is-centered .provider-sub { font-weight: 400; }
.auth-shell.is-centered .divider { gap: 12px; font-size: 12px; }
.auth-shell.is-centered .login-form { gap: 16px; min-width: 0; }
.auth-shell.is-centered .field { min-width: 0; gap: 7px; }
.auth-shell.is-centered .field-label { font-size: 13px; font-weight: 500; line-height: 1.4; }
.auth-shell.is-centered .field-input-wrap { min-width: 0; }
.auth-shell.is-centered .field-input-icon { left: 12px; }
.auth-shell.is-centered .field-input {
    min-width: 0;
    height: 44px;
    padding: 0 12px 0 38px;
    border-color: hsl(var(--border));
    border-radius: 8px;
    font-size: 14px;
    font-weight: 400;
}

.auth-shell.is-centered .field-input-wrap:not(:has(.field-input-icon)) .field-input { padding-left: 12px; }
.auth-shell.is-centered .field-input.has-password-toggle { padding-right: 44px; }
.auth-shell.is-centered .password-toggle { right: 3px; width: 38px; height: 38px; border-radius: 6px; }
.auth-shell.is-centered .auth-form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.auth-shell.is-centered .btn-primary,
.auth-shell.is-centered .btn-secondary {
    min-width: 0;
    min-height: 44px;
    height: auto;
    padding: 10px 18px;
    border: 1px solid hsl(var(--border));
    border-radius: 9px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: 0;
    text-align: center;
    text-transform: none;
    white-space: normal;
    box-shadow: none;
}

.auth-shell.is-centered .btn-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: hsl(var(--card)); color: hsl(var(--foreground)); text-decoration: none; cursor: pointer; }
.auth-shell.is-centered .btn-secondary:hover { background: hsl(var(--muted)); }
.auth-shell.is-centered .btn-primary { border-color: hsl(var(--primary)); }
.auth-shell.is-centered .btn-primary:hover { box-shadow: none; }
.auth-shell.is-centered :is(.btn-primary, .btn-secondary):disabled { opacity: 0.5; cursor: not-allowed; }
.auth-shell.is-centered .secondary-action { margin: 0; font-size: 13px; }
.auth-shell.is-centered .secondary-action a { font-weight: 500; }
.auth-shell.is-centered .footnote { font-size: 12px; line-height: 1.5; }
.auth-shell.is-centered .legal-note { text-align: left; }
.auth-shell.is-centered .legal-note a { font-weight: 500; }
.auth-shell.is-centered .alert { gap: 9px; border-radius: 8px; background: hsl(var(--destructive) / 0.06); }
.auth-shell.is-centered .alert-text { min-width: 0; font-size: 13px; font-weight: 400; overflow-wrap: anywhere; }
.auth-shell.is-centered .registration-notice { gap: 10px; padding: 16px; border-radius: 9px; }
.auth-shell.is-centered .registration-notice h2 { font-size: 17px; font-weight: 500; }
.auth-shell.is-centered .registration-notice p { font-size: 13px; }
.auth-shell.is-centered .registration-notice .btn-primary { min-height: 44px; padding: 10px 14px; }
.auth-shell.is-centered .account-type-legend { margin-bottom: 9px; font-size: 13px; font-weight: 500; }
.auth-shell.is-centered .account-type-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.auth-shell.is-centered .account-type-card { align-items: flex-start; gap: 9px; min-height: 80px; padding: 12px; border-radius: 9px; }
.auth-shell.is-centered .account-type-icon { display: none; }
.auth-shell.is-centered .account-type-title { font-size: 13px; font-weight: 500; }
.auth-shell.is-centered .account-type-description { font-size: 12px; }
.auth-shell.is-centered .account-type-check { order: -1; width: 17px; height: 17px; margin-top: 2px; border-width: 1px; }
.auth-shell.is-centered .account-type-check svg { width: 12px; height: 12px; }
.auth-shell.is-centered .account-type-input:checked + .account-type-card { box-shadow: none; }
.auth-shell.is-centered .cf-turnstile { min-width: 0; max-width: 100%; }
.auth-shell.is-centered .auth-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px 18px;
    padding: 20px 24px;
    color: hsl(var(--muted-foreground));
    font-size: 12px;
    text-align: center;
}

.auth-shell.is-centered .auth-footer p { margin: 0; }
.auth-shell.is-centered .auth-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 16px; }
.auth-shell.is-centered .auth-footer a { display: inline-flex; align-items: center; min-height: 32px; text-decoration: none; }
.auth-shell.is-centered .auth-footer a:hover { color: hsl(var(--foreground)); text-decoration: underline; }

/* Rysunek pozostaje pod nieprzezroczystą kartą i nie przechwytuje zdarzeń. */
.auth-shell.is-centered .architectural-bg { position: absolute; inset: 72px 0 0; z-index: -1; pointer-events: none; color: hsl(var(--primary) / 0.24); }
.auth-shell.is-centered .plan-sketch { position: absolute; width: 320px; height: 280px; left: max(-60px, calc(50% - 700px)); top: 265px; transform: rotate(-9deg); }
.auth-shell.is-centered .plan-outline { position: absolute; inset: 25px 28px 40px 0; border: 3px solid currentColor; }
.auth-shell.is-centered .plan-wall { position: absolute; display: block; background: currentColor; }
.auth-shell.is-centered .plan-wall-a { width: 3px; height: 100%; left: 59%; top: 0; }
.auth-shell.is-centered .plan-wall-b { width: 59%; height: 3px; left: 0; top: 57%; }
.auth-shell.is-centered .plan-wall-c { width: 41%; height: 3px; right: 0; top: 34%; }
.auth-shell.is-centered .plan-window { position: absolute; display: block; background: hsl(var(--background)); border: 1px solid currentColor; }
.auth-shell.is-centered .plan-window-a { width: 66px; height: 6px; top: -5px; left: 47px; }
.auth-shell.is-centered .plan-window-b { width: 6px; height: 58px; right: -5px; bottom: 22px; }
.auth-shell.is-centered .plan-door { position: absolute; left: 59%; bottom: 30px; width: 43px; height: 43px; border: 1px solid currentColor; border-left: 0; border-bottom: 0; border-radius: 0 100% 0 0; }
.auth-shell.is-centered .plan-stairs { position: absolute; width: 67px; height: 48px; right: 22px; top: 13px; border: 1px solid currentColor; background: repeating-linear-gradient(90deg, transparent 0 10px, currentColor 10px 11px); }
.auth-shell.is-centered .dimension { position: absolute; font-size: 11px; text-align: center; letter-spacing: 0.6px; }
.auth-shell.is-centered .dimension-top { left: 0; right: 28px; top: 0; padding-bottom: 4px; border-bottom: 1px solid currentColor; }
.auth-shell.is-centered .dimension-top::before,
.auth-shell.is-centered .dimension-top::after { content: ""; position: absolute; bottom: -4px; width: 1px; height: 9px; background: currentColor; }
.auth-shell.is-centered .dimension-top::before { left: 0; }
.auth-shell.is-centered .dimension-top::after { right: 0; }
.auth-shell.is-centered .dimension-side { right: 4px; top: 86px; height: 145px; padding-left: 5px; border-left: 1px solid currentColor; writing-mode: vertical-rl; }
.auth-shell.is-centered .sketch-caption { position: absolute; bottom: 9px; left: 0; font-size: 11px; letter-spacing: 0.5px; }
.auth-shell.is-centered .elevation-sketch { position: absolute; width: 280px; height: 240px; right: max(-60px, calc(50% - 690px)); top: 135px; transform: rotate(7deg); }
.auth-shell.is-centered .elevation-outline { position: absolute; left: 30px; right: 30px; top: 100px; bottom: 40px; border: 2px solid currentColor; border-top: 0; }
.auth-shell.is-centered .elevation-outline span { position: absolute; top: 25px; width: 37px; height: 35px; border: 2px solid currentColor; }
.auth-shell.is-centered .elevation-outline span:first-child { left: 23px; }
.auth-shell.is-centered .elevation-outline span:nth-child(2) { right: 23px; }
.auth-shell.is-centered .elevation-outline span:last-child { left: calc(50% - 16px); top: auto; bottom: 0; width: 32px; height: 53px; }
.auth-shell.is-centered .elevation-roof { position: absolute; width: 164px; height: 164px; left: 58px; top: 41px; border-top: 2px solid currentColor; border-left: 2px solid currentColor; transform: rotate(45deg); }
.auth-shell.is-centered .elevation-ground { position: absolute; bottom: 39px; left: 0; right: 0; border-bottom: 1px solid currentColor; }
.auth-shell.is-centered .elevation-sketch .sketch-caption { bottom: 12px; left: 30px; }

/* Zgoda zachowuje natywne szczegóły i zwykłe kontrolki formularza. */
.auth-shell.is-centered.is-consent .content-panel {
    justify-content: flex-start;
    padding-top: 28px;
}

.auth-shell.is-centered .content.consent-card {
    gap: 16px;
    padding: 28px;
    border-color: hsl(var(--primary) / 0.18);
    box-shadow: 0 10px 36px hsl(var(--foreground) / 0.05);
}

.auth-shell.is-centered .consent-card .auth-heading p { margin-top: 7px; }
.auth-shell.is-centered .consent-card .consent-context { gap: 16px; padding: 14px 16px; border-color: hsl(var(--primary) / 0.14); border-radius: 10px; background: hsl(var(--muted) / 0.32); }
.auth-shell.is-centered .consent-card .consent-form { gap: 12px; }
.auth-shell.is-centered .consent-card .scope-sections { border-radius: 10px; }
.auth-shell.is-centered .consent-card .consent-section > summary { min-height: 48px; padding: 11px 14px; background: hsl(var(--primary) / 0.025); }
.auth-shell.is-centered .consent-card .consent-section[open] > summary { background: hsl(var(--primary) / 0.055); }
.auth-shell.is-centered .consent-card .consent-section > summary:hover { background: hsl(var(--primary) / 0.075); }
.auth-shell.is-centered .consent-card .section-title { color: hsl(var(--primary)); }
.auth-shell.is-centered .consent-card .actions { margin-top: 2px; padding-top: 14px; }

/* Skrót udostępniania danych jest widoczny przed wyborem uprawnień. */
.auth-shell.is-centered .consent-disclosure {
    display: grid;
    gap: 7px;
    min-width: 0;
    padding: 13px 16px;
    border: 1px solid hsl(var(--primary) / 0.18);
    border-left: 3px solid hsl(var(--primary) / 0.7);
    border-radius: 9px;
    background: hsl(var(--primary) / 0.035);
}

.auth-shell.is-centered .consent-disclosure h2 { margin: 0; color: hsl(var(--foreground)); font-size: 14px; font-weight: 500; line-height: 1.4; }
.auth-shell.is-centered .consent-disclosure p { margin: 0; color: hsl(var(--muted-foreground)); font-size: 13px; line-height: 1.55; }
.auth-shell.is-centered .consent-disclosure strong { color: hsl(var(--foreground)); font-weight: 500; }
.auth-shell.is-centered .consent-disclosure-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0 18px; }
.auth-shell.is-centered .consent-disclosure-links a { display: inline-flex; align-items: center; max-width: 100%; min-height: 32px; color: hsl(var(--primary)); font-size: 12px; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.auth-shell.is-centered .consent-disclosure-links a:hover { text-decoration-thickness: 2px; }
.auth-shell.is-centered .consent-context { display: grid; grid-template-columns: 0.85fr 1.2fr 1fr; gap: 18px; padding: 15px 18px; border: 1px solid hsl(var(--border)); border-radius: 14px; background: hsl(var(--card)); }
.auth-shell.is-centered .context-item { min-width: 0; }
.auth-shell.is-centered .info-label { display: block; margin-bottom: 3px; padding: 0; color: hsl(var(--muted-foreground)); font-size: 12px; font-weight: 400; letter-spacing: 0; text-transform: none; }
.auth-shell.is-centered .info-value { display: block; font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.auth-shell.is-centered .context-item small { display: block; margin-top: 2px; color: hsl(var(--muted-foreground)); font-size: 12px; overflow-wrap: anywhere; }
.auth-shell.is-centered .consent-intent { display: flex; align-items: flex-start; gap: 8px; margin: 0; color: hsl(var(--muted-foreground)); font-size: 12px; }
.auth-shell.is-centered .consent-intent svg { flex: 0 0 auto; margin-top: 1px; color: hsl(var(--primary)); }
.auth-shell.is-centered .consent-intent strong { font-weight: 500; color: hsl(var(--foreground)); }
.auth-shell.is-centered .consent-form { display: flex; flex-direction: column; min-width: 0; gap: 14px; }
.auth-shell.is-centered .scopes-heading { margin: 0; font-size: 15px; font-weight: 500; }
.auth-shell.is-centered .scopes-subnote { margin: 0; color: hsl(var(--muted-foreground)); font-size: 12px; }
.auth-shell.is-centered .scope-sections { overflow: hidden; border: 1px solid hsl(var(--border)); border-radius: 14px; background: hsl(var(--card)); }
.auth-shell.is-centered .consent-section { border-bottom: 1px solid hsl(var(--border)); }
.auth-shell.is-centered .consent-section:last-child { border-bottom: 0; }
.auth-shell.is-centered .consent-section > summary { display: flex; align-items: center; gap: 8px; padding: 14px 16px; list-style: none; cursor: pointer; }
.auth-shell.is-centered .consent-section > summary:focus-visible { outline-offset: -3px; }
.auth-shell.is-centered .consent-section > summary::-webkit-details-marker { display: none; }
.auth-shell.is-centered .consent-section > summary::before { content: "+"; flex: 0 0 12px; color: hsl(var(--primary)); font-size: 16px; line-height: 1; }
.auth-shell.is-centered .consent-section[open] > summary::before { content: "−"; }
.auth-shell.is-centered .section-title { font-size: 14px; font-weight: 500; }
.auth-shell.is-centered .section-count { flex: 0 0 auto; margin-left: auto; color: hsl(var(--muted-foreground)); font-size: 12px; font-weight: 400; }
.auth-shell.is-centered .scope-table { width: 100%; margin: 0; border-collapse: collapse; table-layout: fixed; font-size: 13px; }
.auth-shell.is-centered .scope-table .area-column { width: 58%; }
.auth-shell.is-centered .scope-table .permission-column { width: 14%; }
.auth-shell.is-centered .scope-table thead { background: hsl(var(--muted) / 0.45); }
.auth-shell.is-centered .scope-table th,
.auth-shell.is-centered .scope-table td { padding: 10px 12px; border: 0; border-bottom: 1px solid hsl(var(--border)); vertical-align: middle; }
.auth-shell.is-centered .scope-table thead th { border-top: 1px solid hsl(var(--border)); color: hsl(var(--muted-foreground)); font-size: 12px; font-weight: 400; text-align: center; }
.auth-shell.is-centered .scope-table thead th:first-child { text-align: left; }
.auth-shell.is-centered .scope-table tbody tr + tr { border-top: 0; }
.auth-shell.is-centered .scope-table tbody tr:last-child > * { border-bottom: 0; }
.auth-shell.is-centered .scope-table .scope-area { font-size: 13px; font-weight: 400; text-align: left; }
.auth-shell.is-centered .scope-table td { text-align: center; }
.auth-shell.is-centered .scope-table td.is-delete { background: hsl(var(--warning) / 0.025); }
.auth-shell.is-centered .scope-details { margin: 0; font-weight: 400; }
.auth-shell.is-centered .scope-details > summary { width: fit-content; max-width: 100%; color: hsl(var(--foreground)); font-size: 13px; font-weight: 500; cursor: pointer; }
.auth-shell.is-centered .scope-details > summary::marker { color: hsl(var(--primary)); }
.auth-shell.is-centered .scope-details ul { margin: 8px 0 0; padding-left: 16px; }
.auth-shell.is-centered .scope-details li { margin-top: 6px; color: hsl(var(--muted-foreground)); font-size: 12px; line-height: 1.5; }
.auth-shell.is-centered .scope-details li strong { color: hsl(var(--foreground)); font-weight: 500; }
.auth-shell.is-centered .scope-description { margin: 3px 0 0; color: hsl(var(--muted-foreground)); font-size: 12px; font-weight: 400; line-height: 1.5; }
.auth-shell.is-centered .scope-choice { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 40px; min-height: 36px; padding: 6px; border-radius: 6px; font-size: 12px; font-weight: 400; cursor: pointer; }
.auth-shell.is-centered .scope-choice:hover { background: hsl(var(--primary) / 0.06); }
.auth-shell.is-centered .scope-choice input { flex: 0 0 auto; width: 17px; height: 17px; margin: 0; accent-color: hsl(var(--primary)); }
.auth-shell.is-centered .scope-choice.is-delete input { accent-color: hsl(var(--warning)); }
.auth-shell.is-centered .scope-table .is-delete { color: hsl(var(--warning)); }
.auth-shell.is-centered .scope-unavailable { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; color: hsl(var(--muted-foreground)); }
.auth-shell.is-centered .mobile-action { display: none; }
.auth-shell.is-centered .notice-delete { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 12px; border: 1px solid hsl(var(--warning) / 0.3); border-radius: 8px; background: hsl(var(--warning) / 0.07); font-size: 12px; line-height: 1.5; }
.auth-shell.is-centered .notice-delete svg { flex: 0 0 auto; margin-top: 1px; color: hsl(var(--warning)); }
.auth-shell.is-centered .notice-delete strong { font-weight: 500; }
.auth-shell.is-centered .notice-delete:not(.has-selection) { padding: 0; border: 0; background: transparent; color: hsl(var(--muted-foreground)); }
.auth-shell.is-centered .notice-delete.has-selection { border-color: hsl(var(--warning) / 0.6); }
.auth-shell.is-centered .actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; padding-top: 18px; border-top: 1px solid hsl(var(--border)); }
.auth-shell.is-centered .selection-count { color: hsl(var(--muted-foreground)); font-size: 12px; }
.auth-shell.is-centered .action-buttons { display: flex; gap: 10px; }
.auth-shell.is-centered .actions .btn-primary { flex: initial; width: auto; min-width: 0; }
.auth-shell.is-centered .connection-details { min-width: 0; color: hsl(var(--muted-foreground)); font-size: 12px; }
.auth-shell.is-centered .connection-details > summary { width: fit-content; cursor: pointer; }
.auth-shell.is-centered .connection-details dl { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 6px 12px; margin-bottom: 0; }
.auth-shell.is-centered .connection-details dd { margin: 0; overflow-wrap: anywhere; }
.auth-shell.is-centered .connection-details p { margin: 7px 0 0; overflow-wrap: anywhere; }
.auth-shell.is-centered .connection-details .info-row { display: grid; align-items: start; gap: 6px 16px; margin-top: 7px; grid-template-columns: 104px minmax(0, 1fr); }
.auth-shell.is-centered .connection-details .info-value { font-size: 12px; font-weight: 400; }
.auth-shell.is-centered .tenant-choice { display: flex; flex-direction: column; gap: 8px; }
.auth-shell.is-centered .tenant-option { display: flex; align-items: center; justify-content: space-between; border: 1px solid hsl(var(--border)); background: hsl(var(--card)); color: hsl(var(--foreground)); text-decoration: none; min-width: 0; min-height: 44px; gap: 12px; padding: 10px 12px; border-radius: 9px; font-size: 13px; font-weight: 500; }
.auth-shell.is-centered .tenant-option:hover { background: hsl(var(--muted)); }
.auth-shell.is-centered .tenant-option.is-selected { border-color: hsl(var(--primary)); background: hsl(var(--primary) / 0.06); }
.auth-shell.is-centered .tenant-option > span { min-width: 0; }
.auth-shell.is-centered .tenant-option-hint { flex: 0 0 auto; color: hsl(var(--muted-foreground)); font-size: 12px; font-weight: 400; }

@media (pointer: coarse) {
    .auth-shell.is-centered .language-switch a { min-width: 44px; min-height: 44px; }
    .auth-shell.is-centered .auth-footer a { min-height: 44px; }
    .auth-shell.is-centered .consent-disclosure-links a { min-height: 44px; }
    .auth-shell.is-centered.is-consent .scope-choice,
    .auth-shell.is-centered.is-consent .scope-unavailable { min-height: 44px; }
}

@media (max-width: 600px) {
    .auth-shell.is-centered .architectural-bg { display: none; }
    .auth-shell.is-centered .auth-header { gap: 12px; min-height: 66px; padding: 12px 16px; }
    .auth-shell.is-centered .brand-wordmark { font-size: 21px; }
    .auth-shell.is-centered .content-panel,
    .auth-shell.is-centered .content-panel:has(.is-registration) { justify-content: flex-start; padding: 24px 14px 16px; }
    .auth-shell.is-centered .content-panel.is-scroll { padding: 25px 14px 14px; }
    .auth-shell.is-centered .auth-card { padding: 22px 18px; border-radius: 12px; }
    .auth-shell.is-centered.is-consent .content-panel { padding: 18px 10px 12px; }
    .auth-shell.is-centered .content.consent-card { gap: 14px; padding: 20px 16px; }
    .auth-shell.is-centered .consent-card .consent-context { gap: 12px; padding: 12px; }
    .auth-shell.is-centered .consent-disclosure { gap: 6px; padding: 12px; }
    .auth-shell.is-centered .content { gap: 18px; }
    .auth-shell.is-centered .auth-heading h1 { font-size: 25px; }
    .auth-shell.is-centered .auth-form-row { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .auth-shell.is-centered .field-input { font-size: 16px; }
    /* Trzy karty (prywatne, firma, projektant) nie mieszczą się obok siebie na telefonie — jedna pod drugą. */
    .auth-shell.is-centered .account-type-options { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .auth-shell.is-centered .account-type-card { min-height: 64px; padding: 11px 12px; gap: 9px; }
    .auth-shell.is-centered .consent-context { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; padding: 13px; }
    .auth-shell.is-centered .consent-context > .context-item:last-child { grid-column: 1 / -1; }
    .auth-shell.is-centered .consent-section > summary { padding: 14px; }
    .auth-shell.is-centered .scope-table,
    .auth-shell.is-centered .scope-table tbody { display: block; }
    .auth-shell.is-centered .scope-table colgroup { display: none; }
    .auth-shell.is-centered .scope-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .auth-shell.is-centered .scope-table tbody tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 12px 14px; border-bottom: 1px solid hsl(var(--border)); }
    .auth-shell.is-centered .scope-table tbody tr:first-child { border-top: 1px solid hsl(var(--border)); }
    .auth-shell.is-centered .scope-table tbody tr:last-child { border-bottom: 0; }
    .auth-shell.is-centered .scope-table th,
    .auth-shell.is-centered .scope-table td { display: block; padding: 0; border: 0; }
    .auth-shell.is-centered .scope-table .scope-area { grid-column: 1 / -1; padding-bottom: 5px; font-size: 13px; }
    .auth-shell.is-centered .scope-table td.is-delete { background: none; }
    .auth-shell.is-centered .scope-table .scope-choice { display: flex; width: 100%; min-width: 0; min-height: 44px; padding: 6px 2px; }
    .auth-shell.is-centered .mobile-action { display: inline; font-size: 12px; }
    .auth-shell.is-centered .scope-unavailable { width: 100%; min-height: 44px; }
    .auth-shell.is-centered .actions { gap: 10px; }
    .auth-shell.is-centered .action-buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
    .auth-shell.is-centered .actions :is(.btn-primary, .btn-secondary) { width: 100%; padding: 10px 12px; font-size: 13px; }
    .auth-shell.is-centered .connection-details .info-row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
    .auth-shell.is-centered.is-consent .connection-details dl { grid-template-columns: minmax(0, 1fr); gap: 3px; }
    .auth-shell.is-centered.is-consent .connection-details dd + dt { margin-top: 5px; }
    .auth-shell.is-centered .auth-footer { padding: 16px; gap: 4px 14px; }
}

@media (max-width: 380px) {
    .auth-shell.is-centered .auth-card { padding: 20px 14px; }
    .auth-shell.is-centered .content.consent-card { padding: 18px 12px; }
    .auth-shell.is-centered.is-consent .scope-table .scope-choice { flex-direction: column; gap: 6px; padding: 8px 2px; line-height: 1.35; }
    .auth-shell.is-centered .consent-context { grid-template-columns: minmax(0, 1fr); }
    .auth-shell.is-centered .action-buttons { grid-template-columns: minmax(0, 1fr); }
    .auth-shell.is-centered .tenant-option { align-items: flex-start; flex-direction: column; gap: 3px; }
}
