:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-2: #f1f5f9;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;
    --primary: #6366f1;
    --primary-2: #4f46e5;
    --primary-soft: #eef2ff;
    --success: #16a34a;
    --success-soft: #dcfce7;
    --warning: #f97316;
    --warning-soft: #ffedd5;
    --danger: #ef4444;
    --danger-soft: #fee2e2;
    --info: #2563eb;
    --info-soft: #dbeafe;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 24px 70px rgba(15, 23, 42, 0.12);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --header-h: 72px;
    --sidebar-w: 276px;
}

* {
    box-sizing: border-box;
}
html {
    min-height: 100%;
    background: var(--bg);
}
body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        "PingFang SC",
        "Microsoft YaHei",
        sans-serif;
    line-height: 1.5;
}
a {
    color: var(--primary-2);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}
button,
input {
    font: inherit;
}
button {
    cursor: pointer;
}
button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.hidden {
    display: none !important;
}
.muted {
    color: var(--muted);
}
.mobile-only {
    display: none;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    font-weight: 800;
    font-size: 34px;
    letter-spacing: -0.04em;
}
.brand:hover {
    text-decoration: none;
}
.brand.compact {
    font-size: 22px;
    letter-spacing: -0.03em;
}
.logo-mark {
    display: inline-block;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    object-fit: contain;
}
.brand.compact .logo-mark {
    width: 32px;
    height: 32px;
    border-radius: 10px;
}

.auth-body {
    background:
        radial-gradient(
            circle at top left,
            rgba(99, 102, 241, 0.11),
            transparent 30%
        ),
        radial-gradient(
            circle at bottom right,
            rgba(59, 130, 246, 0.1),
            transparent 32%
        ),
        var(--bg);
}
.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 24px;
    padding: 24px;
}
.brand-rail {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    padding: 32px;
}
.auth-rail {
    display: flex;
    flex-direction: column;
    gap: 22px;
}
.auth-rail h1 {
    margin: 14px 0 0;
    font-size: 24px;
    line-height: 1.2;
    letter-spacing: -0.03em;
}
.auth-rail > p {
    margin: 0;
    color: var(--muted);
}
.brand-copy {
    font-size: 14px;
}
.feature-list {
    display: grid;
    gap: 12px;
    margin-top: 4px;
}
.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.65);
}
.feature-item strong,
.feature-item small {
    display: block;
}
.feature-item small {
    color: var(--muted);
    font-size: 12px;
}
.feature-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    color: var(--primary-2);
    background: var(--primary-soft);
}
.design-token-card {
    margin-top: auto;
    padding: 18px;
    border-radius: var(--radius-lg);
    background: linear-gradient(
        135deg,
        rgba(99, 102, 241, 0.1),
        rgba(255, 255, 255, 0.8)
    );
    border: 1px solid var(--border);
}
.design-token-card p {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 13px;
}
.token-dot {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    margin-right: 8px;
    background: #cbd5e1;
}
.token-dot.primary {
    background: #6366f1;
}
.token-dot.violet {
    background: #8b5cf6;
}
.token-dot.green {
    background: #22c55e;
}
.token-dot.orange {
    background: #fb923c;
}
.token-dot.red {
    background: #ef4444;
}
.auth-main {
    position: relative;
    display: grid;
    place-items: center;
    min-width: 0;
    padding: 32px 16px;
}
.top-tools {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
}
.auth-tools {
    position: absolute;
    top: 24px;
    right: 24px;
}
.lang-pill {
    min-width: 38px;
    height: 30px;
    padding: 0 12px;
    border: 0;
    background: transparent;
    color: var(--muted);
    border-radius: 999px;
    font-weight: 700;
}
.lang-pill.is-active {
    color: var(--primary-2);
    background: var(--primary-soft);
}
.auth-card {
    width: min(960px, 100%);
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}
.split-card {
    display: grid;
    grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1fr);
}
.split-card.narrow {
    width: min(850px, 100%);
}
.auth-hero-panel {
    position: relative;
    min-height: 560px;
    padding: 44px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: linear-gradient(145deg, #fff, #eef2ff 85%);
    overflow: hidden;
}
.auth-hero-panel h2 {
    font-size: 34px;
    line-height: 1.1;
    letter-spacing: -0.04em;
    margin: 28px 0 0;
}
.auth-hero-panel p {
    margin: 0;
    color: var(--muted);
}
.accent-copy {
    color: var(--primary-2) !important;
    font-size: 22px;
    font-weight: 800;
}
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tag-row span {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-2);
    font-size: 12px;
    font-weight: 700;
}
.glass-illustration {
    position: absolute;
    right: 42px;
    bottom: 42px;
    width: 170px;
    height: 170px;
    border-radius: 42px;
    background: linear-gradient(
        135deg,
        rgba(99, 102, 241, 0.24),
        rgba(59, 130, 246, 0.06)
    );
    box-shadow:
        inset 0 1px rgba(255, 255, 255, 0.88),
        0 28px 60px rgba(99, 102, 241, 0.18);
    transform: rotate(8deg);
}
.glass-illustration::before {
    content: "";
    position: absolute;
    inset: 24px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.5);
}
.glass-illustration.small {
    width: 140px;
    height: 140px;
}
.glass-illustration.lock::after {
    content: "";
    position: absolute;
    left: 42px;
    top: -34px;
    width: 80px;
    height: 70px;
    border-radius: 44px 44px 0 0;
    border: 18px solid rgba(99, 102, 241, 0.2);
    border-bottom: 0;
}
.glass-illustration.shield {
    border-radius: 70px 70px 38px 38px;
}
.glass-illustration.shield::after {
    content: "✓";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--primary-2);
    font-size: 60px;
    font-weight: 900;
}
.form-panel {
    padding: 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
}
.center-y {
    justify-content: center;
}
.stack {
    display: grid;
    gap: 16px;
}
.tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 4px;
    border-radius: 14px;
    background: var(--surface-2);
}
.tab {
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: var(--muted);
    padding: 10px 8px;
    font-weight: 800;
}
.tab.is-active {
    color: var(--primary-2);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}
.field {
    display: grid;
    gap: 7px;
    color: var(--text);
    font-weight: 700;
    font-size: 13px;
}
.field input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 13px;
    color: var(--text);
    background: #fff;
    outline: none;
    transition:
        border-color 0.15s,
        box-shadow 0.15s;
}
.field input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}
.field select {
    width: 100%;
    height: 46px;
    padding: 0 34px 0 14px;
    border: 1px solid var(--border);
    border-radius: 13px;
    color: var(--text);
    background: #fff;
    outline: none;
    appearance: none;
    font: inherit;
    font-weight: 800;
    color: #334155;
    background-image:
        linear-gradient(45deg, transparent 50%, #64748b 50%),
        linear-gradient(135deg, #64748b 50%, transparent 50%);
    background-position:
        calc(100% - 17px) 20px,
        calc(100% - 12px) 20px;
    background-size:
        5px 5px,
        5px 5px;
    background-repeat: no-repeat;
    transition:
        border-color 0.15s,
        box-shadow 0.15s;
}
.field select:focus,
.inline-search select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}
.inline-search select {
    height: 46px;
    padding: 0 34px 0 14px;
    border: 1px solid var(--border);
    border-radius: 13px;
    color: #334155;
    background: #fff;
    outline: none;
    appearance: none;
    font: inherit;
    font-weight: 800;
    background-image:
        linear-gradient(45deg, transparent 50%, #64748b 50%),
        linear-gradient(135deg, #64748b 50%, transparent 50%);
    background-position:
        calc(100% - 17px) 20px,
        calc(100% - 12px) 20px;
    background-size:
        5px 5px,
        5px 5px;
    background-repeat: no-repeat;
    transition:
        border-color 0.15s,
        box-shadow 0.15s;
}
.has-action {
    position: relative;
}
.has-action input {
    padding-right: 46px;
}
.input-action {
    position: absolute;
    bottom: 6px;
    right: 6px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--muted);
}
.input-action:hover {
    background: var(--surface-2);
}
.form-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.between {
    justify-content: space-between;
}
.checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
}
.checkbox input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 13px;
    border: 1px solid transparent;
    font-weight: 850;
    text-decoration: none;
    transition:
        transform 0.12s ease,
        box-shadow 0.12s ease,
        background 0.12s;
}
.btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
}
.btn.is-loading,
.inline-action.is-loading,
.dropdown-item.is-loading {
    pointer-events: none;
}
.btn.primary {
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    color: #fff;
    box-shadow: 0 14px 28px rgba(79, 70, 229, 0.24);
}
.btn.secondary {
    background: #fff;
    color: var(--primary-2);
    border-color: var(--border);
}
.btn.danger {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
}
.btn.danger-outline {
    background: #fff;
    color: var(--danger);
    border-color: var(--danger-soft);
}
.btn.full {
    width: 100%;
}
.btn.small {
    min-height: 36px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 13px;
}
.btn.tiny {
    min-height: 30px;
    padding: 0 10px;
    border-radius: 9px;
    font-size: 12px;
}
.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-size: 13px;
}
.divider::before,
.divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: var(--border);
}
.provider-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}
.compact-providers {
    justify-content: center;
}
.provider-button {
    display: inline-grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 14px;
    cursor: pointer;
    transition:
        border-color 0.15s,
        box-shadow 0.15s;
}
.provider-button:hover {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
    text-decoration: none;
}
.provider-icon {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    object-fit: contain;
}
.fine-print,
.switch-link {
    text-align: center;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}
.center-link {
    text-align: center;
}
.notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
    border-radius: 16px;
    font-size: 14px;
}
.notice.success {
    color: #166534;
    background: var(--success-soft);
    border: 1px solid #bbf7d0;
}
.notice.info {
    color: #1e3a8a;
    background: var(--info-soft);
    border: 1px solid #bfdbfe;
}
.rule-card {
    padding: 16px;
    border-radius: 16px;
    background: var(--surface-2);
    border: 1px solid var(--border);
}
.rule-card ul {
    margin: 8px 0 0;
    padding-left: 18px;
    color: var(--muted);
}
.password-meter {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
}
.password-meter span {
    height: 6px;
    border-radius: 999px;
    background: var(--border);
}
.password-meter.level-1 span:nth-child(-n + 1) {
    background: var(--danger);
}
.password-meter.level-2 span:nth-child(-n + 2) {
    background: var(--warning);
}
.password-meter.level-3 span:nth-child(-n + 3) {
    background: #84cc16;
}
.password-meter.level-4 span:nth-child(-n + 4) {
    background: var(--success);
}

.consent-card,
.status-card,
.error-card {
    padding: 32px;
}
.consent-header,
.status-topline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.page-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}
.page-heading.centered {
    display: block;
    text-align: center;
    margin: 28px 0 24px;
}
.page-heading h1,
.page-heading h2,
.page-heading h3 {
    margin: 0;
    letter-spacing: -0.04em;
}
.page-heading h1 {
    font-size: 32px;
}
.page-heading p {
    margin: 6px 0 0;
    color: var(--muted);
}
.consent-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}
.card-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 22px;
}
.card-panel > .notice {
    margin-bottom: 20px;
}
.section-title,
.section-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}
.section-title h3,
.section-heading h2 {
    margin: 0;
}
.section-title p,
.section-heading p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 13px;
}
.app-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--primary);
    color: #fff;
    font-weight: 900;
}
.app-summary,
.identity-block {
    display: grid;
    gap: 4px;
    margin-bottom: 18px;
}
.app-summary small,
.identity-block span {
    color: var(--muted);
}
.badge {
    display: inline-flex;
    align-items: center;
    width: max-content;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}
.badge.success {
    color: #166534;
    background: var(--success-soft);
}
.badge.verified {
    color: var(--primary-2);
    background: var(--primary-soft);
}
.badge.warning {
    color: #9a3412;
    background: var(--warning-soft);
}
.badge.danger {
    color: #991b1b;
    background: var(--danger-soft);
}
.badge.info {
    color: #1e40af;
    background: var(--info-soft);
}
.badge.muted {
    color: var(--muted);
    background: var(--surface-2);
}
.scope-list {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
    display: grid;
    gap: 11px;
}
.scope-list li {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    color: var(--muted);
}
.scope-list span {
    color: var(--success);
    font-weight: 900;
}
.learn-link {
    display: inline-flex;
    margin-top: 16px;
}
.meta-grid {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 12px 18px;
    margin: 0;
}
.meta-grid dt {
    color: var(--muted);
}
.meta-grid dd {
    margin: 0;
}
.button-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 22px;
}
.button-row.center {
    justify-content: center;
}
.segmented-control,
.state-switcher,
.verification-badges {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px;
    border-radius: 999px;
    background: var(--surface-2);
}
.segmented-control button,
.chip {
    border: 0;
    border-radius: 999px;
    min-height: 32px;
    padding: 0 12px;
    background: transparent;
    color: var(--muted);
    font-weight: 800;
}
.segmented-control button.is-active,
.chip.is-active {
    color: var(--primary-2);
    background: #fff;
    box-shadow: var(--shadow-sm);
}
.state-switcher {
    display: flex;
    width: max-content;
    margin: 24px auto 0;
}
.verification-badges .badge {
    min-height: 32px;
    padding: 0 12px;
}
.status-panel {
    display: none;
    text-align: center;
    padding: 40px 20px 18px;
    max-width: 520px;
    margin: 0 auto;
}
.status-panel.is-active {
    display: grid;
    justify-items: center;
    gap: 14px;
}
.status-panel h2 {
    font-size: 30px;
    margin: 0;
}
.status-panel p {
    margin: 0;
    color: var(--muted);
}
.status-illustration {
    display: grid;
    place-items: center;
    width: 112px;
    height: 112px;
    border-radius: 34px;
    font-size: 50px;
    font-weight: 900;
}
.status-illustration.success {
    color: var(--success);
    background: var(--success-soft);
}
.status-illustration.warning {
    color: var(--warning);
    background: var(--warning-soft);
}
.status-illustration.danger {
    color: var(--danger);
    background: var(--danger-soft);
}
.account-pill {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--muted);
    background: var(--surface-2);
}
.error-card > .brand {
    display: flex;
    width: max-content;
    margin-bottom: 28px;
}
.error-grid {
    display: grid;
    grid-template-columns: 0.9fr 1fr;
    align-items: center;
    gap: 40px;
}
.space-illustration {
    position: relative;
    min-height: 340px;
    border-radius: 40px;
    background: linear-gradient(135deg, #eef2ff, #fff);
    overflow: hidden;
}
.space-illustration .planet {
    position: absolute;
    width: 190px;
    height: 190px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: linear-gradient(135deg, #c7d2fe, #eef2ff);
}
.space-illustration .rocket {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) rotate(-22deg);
    font-size: 64px;
}
.error-code {
    margin: 0;
    color: var(--danger);
    font-size: 64px;
    font-weight: 900;
    letter-spacing: -0.06em;
}
.error-grid h2 {
    margin: 0 0 8px;
    font-size: 32px;
    letter-spacing: -0.04em;
}
.error-grid p:not(.error-code) {
    color: var(--muted);
}
.error-ref {
    display: block;
    margin-top: 28px;
}

.account-body {
    background: var(--bg);
}
.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
    grid-template-rows: var(--header-h) 1fr;
}
.app-header {
    position: sticky;
    top: 0;
    z-index: 30;
    grid-column: 1 / -1;
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(16px);
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.header-user {
    position: relative;
}
.avatar {
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, #6366f1, #3b82f6);
    font-weight: 900;
    overflow: hidden;
}
.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.avatar.sm {
    width: 32px;
    height: 32px;
    font-size: 13px;
}
.avatar.xl {
    width: 116px;
    height: 116px;
    font-size: 34px;
    box-shadow: 0 22px 48px rgba(99, 102, 241, 0.25);
}
.avatar.photo {
    width: 48px;
    height: 48px;
}
.sidebar {
    grid-row: 2;
    padding: 20px 16px;
    border-right: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.65);
}
.sidebar nav {
    display: grid;
    gap: 8px;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border-radius: 15px;
    color: var(--muted);
    font-weight: 800;
}
.nav-item:hover {
    text-decoration: none;
    background: var(--surface-2);
}
.nav-item.is-active {
    color: var(--primary-2);
    background: var(--primary-soft);
}
.sidebar-note {
    margin-top: 24px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: #fff;
    color: var(--muted);
}
.sidebar-note p {
    margin: 4px 0 0;
}
.content-pane {
    grid-column: 2;
    padding: 32px;
    min-width: 0;
}
.profile-card {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 22px;
}
.profile-avatar-column {
    display: grid;
    justify-items: center;
    gap: 12px;
}
.profile-meta {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 18px;
    margin: 0;
}
.profile-meta dt {
    color: var(--muted);
}
.profile-meta dd {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.pending-arrow {
    color: var(--muted);
    margin: 0 2px;
    font-size: 1.1em;
}
.inline-action {
    border: 0;
    background: transparent;
    color: var(--primary-2);
    font-weight: 800;
    padding: 0;
}
.grid-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}
.full-line {
    grid-column: 1 / -1;
}
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}
.form-card {
    max-width: 640px;
}
.strength-row {
    display: grid;
    grid-template-columns: 110px 1fr 68px;
    align-items: center;
    gap: 14px;
    color: var(--muted);
}
.responsive-table {
    overflow-x: auto;
}
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}
th,
td {
    padding: 14px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
th {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
td code {
    padding: 4px 7px;
    border-radius: 7px;
    color: #334155;
    background: var(--surface-2);
}
.table-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.push-right {
    margin-left: auto;
}
.table-footer {
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    font-size: 13px;
    padding-top: 14px;
}
.provider-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}
.provider-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 16px;
}
.provider-card strong {
    display: inline-block;
    margin-bottom: 4px;
}
.provider-card p {
    margin: 4px 0 0 42px;
    color: var(--muted);
    font-size: 13px;
}
.current-row {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.11), transparent);
}
.expired-row {
    opacity: 0.62;
}
.current-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: var(--primary);
    box-shadow: 0 0 0 6px rgba(99, 102, 241, 0.13);
}
.icon-button {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
}
.sidebar-backdrop {
    display: none;
}
.dialog-panel {
    display: none;
}
.dialog-overlay {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(8px);
}
.dialog-overlay .dialog-panel {
    display: grid;
    width: min(440px, 100%);
    gap: 16px;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: var(--shadow-lg);
}
.dialog-panel h3 {
    margin: 0;
    font-size: 20px;
    letter-spacing: -0.03em;
}
.dialog-panel p {
    margin: 0;
    color: var(--muted);
}
.dialog-panel .button-row {
    margin-top: 4px;
}
.toast {
    position: fixed;
    left: 50%;
    top: 24px;
    transform: translate(-50%, -20px);
    opacity: 0;
    pointer-events: none;
    z-index: 80;
    padding: 12px 16px;
    border-radius: 999px;
    color: #fff;
    background: #0f172a;
    box-shadow: var(--shadow-lg);
    transition: all 0.2s ease;
}
.toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

[data-lang-current="en"] [data-i18n-alt]::after {
    content: attr(data-i18n-alt);
}

@media (max-width: 1100px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }
    .auth-rail {
        display: none;
    }
    .auth-main {
        padding-top: 76px;
    }
}

@media (max-width: 780px) {
    :root {
        --header-h: 64px;
    }
    .desktop-only {
        display: none !important;
    }
    .mobile-only {
        display: inline-grid;
    }
    .auth-shell {
        padding: 12px;
    }
    .auth-main {
        padding: 62px 0 10px;
    }
    .auth-tools {
        top: 12px;
        right: 12px;
    }
    .auth-card {
        border-radius: 24px;
        width: 100%;
    }
    .split-card,
    .consent-grid,
    .error-grid,
    .profile-card,
    .grid-form {
        grid-template-columns: 1fr;
    }
    .auth-hero-panel {
        min-height: auto;
        padding: 28px;
    }
    .auth-hero-panel h2 {
        margin-top: 18px;
        font-size: 28px;
    }
    .glass-illustration {
        display: none;
    }
    .form-panel,
    .consent-card,
    .status-card,
    .error-card {
        padding: 24px;
    }
    .compact-providers {
        justify-content: center;
    }
    .consent-header,
    .status-topline {
        align-items: flex-start;
        flex-direction: column;
    }
    .button-row,
    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .button-row .btn,
    .form-actions .btn {
        width: 100%;
    }
    .meta-grid,
    .profile-meta {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    .profile-meta dd {
        margin-bottom: 10px;
    }
    .space-illustration {
        min-height: 180px;
    }
    .error-code {
        font-size: 50px;
    }
    .app-shell {
        grid-template-columns: 1fr;
    }
    .app-header {
        padding: 0 12px;
    }
    .content-pane {
        grid-column: 1;
        padding: 18px 12px 36px;
    }
    .sidebar {
        position: fixed;
        z-index: 60;
        top: 0;
        bottom: 0;
        left: 0;
        width: min(310px, 88vw);
        padding-top: 76px;
        transform: translateX(-105%);
        transition: transform 0.2s ease;
        box-shadow: var(--shadow-lg);
        background: #fff;
    }
    .sidebar.is-open {
        transform: translateX(0);
    }
    .sidebar-backdrop.is-open {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 50;
        background: rgba(15, 23, 42, 0.38);
    }
    .page-heading {
        display: block;
    }
    .page-heading h1 {
        font-size: 26px;
    }
    .card-panel {
        padding: 18px;
        border-radius: 20px;
    }
    .table-toolbar {
        align-items: stretch;
    }
    .push-right {
        margin-left: 0;
    }
    .provider-card {
        align-items: flex-start;
    }
    th,
    td {
        padding: 12px 10px;
    }
}

/* === Requested refinements: centered auth flow, simplified login, logout avatar === */
.auth-shell {
    grid-template-columns: 1fr;
    padding: 32px;
}
.auth-main {
    width: 100%;
    min-height: calc(100vh - 64px);
    padding: 72px 16px 32px;
}
.auth-tools {
    top: 24px;
    right: 32px;
}
.login-card {
    width: min(860px, 100%);
}
.login-card .auth-hero-panel {
    min-height: 500px;
}
.login-card .form-panel {
    gap: 22px;
}
.login-options {
    margin: 8px 0 14px;
    padding: 2px 0;
}
.identifier-control {
    display: grid;
    grid-template-columns: 132px 1fr;
    gap: 10px;
    align-items: center;
}
.identifier-control select,
.identifier-control input {
    width: 100%;
    height: 46px;
    border: 1px solid var(--border);
    border-radius: 13px;
    color: var(--text);
    background: #fff;
    outline: none;
    transition:
        border-color 0.15s,
        box-shadow 0.15s;
}
.identifier-control select {
    padding: 0 34px 0 12px;
    font-weight: 800;
    color: #334155;
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, #64748b 50%),
        linear-gradient(135deg, #64748b 50%, transparent 50%);
    background-position:
        calc(100% - 17px) 20px,
        calc(100% - 12px) 20px;
    background-size:
        5px 5px,
        5px 5px;
    background-repeat: no-repeat;
}
.identifier-control input {
    padding: 0 14px;
}
.identifier-control select:focus,
.identifier-control input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}
.header-user {
    position: relative;
}
.header-user-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    cursor: pointer;
    color: var(--text);
    font: inherit;
}
.header-user-trigger:hover {
    background: var(--primary-soft);
    border-color: #c7d2fe;
}
.user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12);
    z-index: 50;
    padding: 6px;
}
.user-dropdown.is-open {
    display: block;
}
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: none;
    border-radius: 8px;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
}
.dropdown-item:hover {
    background: var(--surface-2);
}
.dropdown-item.danger {
    color: #dc2626;
}
.dropdown-item.danger:hover {
    background: #fef2f2;
}
.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 8px;
}
.sidebar {
    padding-top: 18px;
}
.profile-card:first-child {
    margin-top: 0;
}

/* Authorization page simplification */
.consent-simple {
    width: min(720px, 100%);
    padding: 30px;
}
.consent-header.simple {
    margin-bottom: 22px;
}
.compact-heading {
    margin: 8px 0 26px;
}
.consent-app-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #fff, #f8fafc);
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}
.consent-app-card h3 {
    margin: 0;
    font-size: 20px;
    letter-spacing: -0.03em;
}
.consent-app-card p {
    margin: 3px 0 0;
    color: var(--muted);
}
.app-pair {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}
.app-icon.pero {
    background: linear-gradient(135deg, #6d5dfc, #3b82f6);
}
.connection-line {
    width: 24px;
    height: 2px;
    border-radius: 999px;
    background: #c7d2fe;
}
.consent-stack {
    display: grid;
    gap: 18px;
}
.compact-panel {
    padding: 20px;
}
.compact-panel h3 {
    margin: 0 0 14px;
    font-size: 16px;
}
.permission-list {
    margin-top: 0;
}
.permission-list li {
    padding: 10px 12px;
    border-radius: 13px;
    background: var(--surface-2);
    color: #334155;
}
.compact-title {
    margin-bottom: 14px;
}
.meta-grid.slim {
    grid-template-columns: 92px 1fr;
    gap: 10px 16px;
}
.consent-notice {
    margin-top: 20px;
}
.consent-actions {
    margin-top: 20px;
}
.consent-actions .btn {
    min-width: 140px;
}

@media (max-width: 780px) {
    .auth-shell {
        padding: 12px;
    }
    .auth-main {
        min-height: calc(100vh - 24px);
        padding: 62px 0 10px;
    }
    .auth-tools {
        top: 12px;
        right: 12px;
    }
    .login-card .auth-hero-panel {
        min-height: auto;
    }
    .identifier-control {
        grid-template-columns: 112px 1fr;
        gap: 8px;
    }
    .login-options {
        margin: 10px 0 16px;
    }
    .consent-simple {
        padding: 22px;
    }
    .consent-app-card {
        grid-template-columns: 1fr;
        text-align: left;
        gap: 12px;
    }
    .consent-app-card .badge {
        justify-self: start;
    }
    .meta-grid.slim {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}

@media (max-width: 430px) {
    .identifier-control {
        grid-template-columns: 1fr;
    }
}

/* === Homepage === */
.home-body {
    background:
        radial-gradient(ellipse at top left, rgba(99, 102, 241, 0.08), transparent 40%),
        radial-gradient(ellipse at bottom right, rgba(59, 130, 246, 0.07), transparent 42%),
        var(--bg);
}

.home-header {
    position: sticky;
    top: 0;
    z-index: 40;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(16px);
}
.home-header-inner {
    max-width: 1120px;
    margin: 0 auto;
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}
.home-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.home-main {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

.hero-section {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    align-items: center;
    padding: 80px 0 72px;
}
.hero-inner {
    position: relative;
    z-index: 2;
}
.hero-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-2);
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 20px;
}
.hero-title {
    margin: 0;
    font-size: 52px;
    line-height: 1.08;
    letter-spacing: -0.05em;
    color: var(--text);
}
.hero-title-accent {
    background: linear-gradient(135deg, var(--primary), #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-desc {
    margin: 20px 0 0;
    font-size: 17px;
    line-height: 1.7;
    color: var(--muted);
    max-width: 520px;
}
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}
.hero-actions .btn {
    min-width: 140px;
}
.hero-tags {
    margin-top: 28px;
}

.hero-visual {
    position: relative;
    min-height: 420px;
}
.hero-visual .glass-illustration {
    position: absolute;
    right: auto;
    bottom: auto;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    border-radius: 52px;
}
.hero-orbit {
    position: absolute;
    left: 50%;
    top: 50%;
    border-radius: 50%;
    border: 1px solid rgba(99, 102, 241, 0.1);
}
.hero-orbit-1 {
    width: 280px;
    height: 280px;
    transform: translate(-50%, -50%);
}
.hero-orbit-2 {
    width: 360px;
    height: 360px;
    transform: translate(-50%, -50%);
    border-color: rgba(99, 102, 241, 0.06);
}
.hero-orbit-3 {
    width: 420px;
    height: 420px;
    transform: translate(-50%, -50%);
    border-color: rgba(99, 102, 241, 0.03);
}
.hero-dot {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 6px rgba(99, 102, 241, 0.12);
}
.hero-dot-1 {
    left: calc(50% + 110px);
    top: calc(50% - 110px);
    background: var(--primary);
}
.hero-dot-2 {
    left: calc(50% - 140px);
    top: calc(50% + 90px);
    background: #3b82f6;
}
.hero-dot-3 {
    left: calc(50% + 60px);
    top: calc(50% + 130px);
    background: #8b5cf6;
    width: 8px;
    height: 8px;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}
.section-header h2 {
    margin: 0;
    font-size: 36px;
    letter-spacing: -0.04em;
}
.section-header p {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 16px;
}

.features-section {
    padding: 72px 0;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.feature-card {
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.feature-card-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    font-size: 24px;
    margin-bottom: 18px;
}
.icon-auth {
    background: var(--primary-soft);
}
.icon-social {
    background: var(--info-soft);
}
.icon-security {
    background: var(--success-soft);
}
.icon-admin {
    background: var(--warning-soft);
}
.feature-card h3 {
    margin: 0 0 10px;
    font-size: 18px;
    letter-spacing: -0.02em;
}
.feature-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.tech-section {
    padding: 72px 0;
}
.tech-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    max-width: 720px;
    margin: 0 auto;
}
.tech-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.72);
}
.tech-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--surface-2);
    font-size: 20px;
    flex-shrink: 0;
}
.tech-item strong {
    display: block;
    font-size: 15px;
}
.tech-item small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 13px;
}

.cta-section {
    padding: 72px 0;
}
.cta-card {
    text-align: center;
    padding: 56px 40px;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(59, 130, 246, 0.05));
    border: 1px solid var(--border);
}
.cta-card h2 {
    margin: 0;
    font-size: 32px;
    letter-spacing: -0.04em;
}
.cta-card p {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 16px;
}
.cta-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 28px;
    flex-wrap: wrap;
}
.cta-actions .btn {
    min-width: 160px;
}

.auth-footer {
    text-align: center;
    padding: 16px 0 8px;
}
.auth-footer p {
    margin: 0;
    font-size: 12px;
    color: var(--muted);
}
.auth-footer a {
    color: var(--muted);
    text-decoration: none;
}
.auth-footer a:hover {
    text-decoration: underline;
}

.home-footer {
    border-top: 1px solid var(--border);
    margin-top: 40px;
}
.home-footer-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 28px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.home-footer-inner .footer-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}
.home-footer-inner .footer-info p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}
.home-footer-inner .footer-info a {
    color: var(--muted);
    text-decoration: none;
}
.home-footer-inner .footer-info a:hover {
    color: var(--fg);
    text-decoration: underline;
}

@media (max-width: 900px) {
    .hero-section {
        grid-template-columns: 1fr;
        padding: 52px 0 40px;
    }
    .hero-title {
        font-size: 38px;
    }
    .hero-visual {
        display: none;
    }
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .tech-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 580px) {
    .home-header-inner {
        height: 60px;
        padding: 0 14px;
    }
    .features-grid {
        grid-template-columns: 1fr;
    }
    .hero-title {
        font-size: 30px;
    }
    .hero-desc {
        font-size: 15px;
    }
    .section-header h2 {
        font-size: 28px;
    }
    .cta-card {
        padding: 36px 20px;
    }
    .cta-actions .btn {
        width: 100%;
    }
    .home-footer-inner {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}
