/**
 * TIC Identity - Site Styles
 * Main stylesheet for id.tic.io landing and documentation pages
 * Uses TIC Design System variables for consistency with tic.io
 */

/* ==========================================================================
   Global Mobile Fixes
   ========================================================================== */

html, body {
    overflow-x: hidden;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ==========================================================================
   Layout
   ========================================================================== */

.site-utility {
    background-color: var(--bg-tertiary, #f5f4f2);
    border-bottom: 1px solid var(--border-primary);
}

.site-utility__inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--space-3) var(--container-padding);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-3);
    font-size: var(--text-sm);
}

.site-utility__hint {
    color: var(--text-secondary);
    display: none;
}

@media (min-width: 576px) {
    .site-utility__hint { display: inline; }
}

.site-utility__link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--text-primary);
    font-weight: var(--font-medium);
    text-decoration: none;
    padding: 4px var(--space-2);
    border-radius: var(--radius-sm);
    transition: color var(--transition-fast), background-color var(--transition-fast);
}

.site-utility__link:hover {
    color: var(--accent-primary, #357a6b);
    background-color: var(--bg-secondary);
}

.site-utility__link svg {
    width: 16px;
    height: 16px;
    color: var(--accent-primary, #357a6b);
}

.site-utility__arrow {
    color: var(--text-tertiary, #8a8680) !important;
}

.site-header {
    position: sticky;
    top: 0;
    /* Must sit above .site-header__mobile-nav (which uses var(--z-modal)) so the
       hamburger/close toggle stays clickable while the mobile menu is open — this
       was hidden by the mobile-nav overlay on pages that also render .site-utility
       (e.g. the landing page), where the header ends up overlapping the mobile-nav
       top edge. */
    z-index: calc(var(--z-modal) + 1);
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-primary);
    padding: var(--space-4) 0;
}

.site-header__mobile-nav-label {
    display: block;
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary, #8a8680);
    padding: var(--space-3) var(--space-4) var(--space-1);
    border-top: 1px solid var(--border-primary);
    margin-top: var(--space-2);
}

.site-header__mobile-nav-label:first-child {
    border-top: none;
    margin-top: 0;
    padding-top: var(--space-2);
}

.portal-validation-banner {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    margin-bottom: var(--space-6);
    background-color: var(--color-warning-bg, #fef3c7);
    border: 1px solid var(--color-warning-border, #fcd34d);
    border-radius: var(--radius-md, 8px);
    color: var(--color-warning-text, #92400e);
}

.portal-validation-banner svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    margin-top: 2px;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.portal-validation-banner strong {
    display: block;
    font-size: var(--text-base);
    margin-bottom: 2px;
}

.portal-validation-banner p {
    margin: 0;
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
}

.site-header__inner {
    display: flex;
    align-items: center;
    /* gap on the flex container guarantees a minimum visual breathing space
       between every header item (logo / nav / theme-toggle / hamburger) — even
       when the theme toggle's `margin-left: auto` consumes the remaining free
       space and pulls otherwise space-between distribution out of the equation. */
    gap: var(--space-8, 2rem);
    justify-content: space-between;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.site-header__logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-weight: var(--font-semibold);
    font-size: var(--text-lg);
    color: var(--text-primary);
    text-decoration: none;
}

.site-header__logo:hover {
    color: var(--accent-primary);
}

.site-header__logo-icon {
    height: 17px;
    width: auto;
    color: var(--text-primary);
}

.site-header__nav {
    display: none;
    align-items: center;
    gap: var(--space-6);
}

@media (min-width: 768px) {
    .site-header__nav {
        display: flex;
        /* Anchor the nav (and everything after — theme-toggle) to the right of
           the header bar, so the layout reads as logo-left ↔ nav+actions-right
           rather than the default space-between distribution which leaves the
           nav floating in the middle. */
        margin-left: auto;
    }
}

/* Mobile menu toggle */
.site-header__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
}

.site-header__toggle svg {
    width: 24px;
    height: 24px;
}

@media (min-width: 768px) {
    .site-header__toggle {
        display: none;
    }
}

/* Mobile nav overlay */
.site-header__mobile-nav {
    display: none;
    position: fixed;
    inset: 0;
    top: 65px;
    z-index: var(--z-modal);
    background-color: var(--bg-secondary);
    padding: var(--space-6);
    flex-direction: column;
    gap: var(--space-4);
    border-top: 1px solid var(--border-primary);
}

.site-header__mobile-nav.is-open {
    display: flex;
}

@media (min-width: 768px) {
    .site-header__mobile-nav {
        display: none !important;
    }
}

.site-header__mobile-nav .site-header__link {
    display: block;
    padding: var(--space-4);
    font-size: var(--text-lg);
    border-radius: var(--radius-md);
}

.site-header__mobile-nav .site-header__link:hover {
    background-color: var(--bg-hover);
}

.site-header__mobile-nav .btn {
    margin-top: var(--space-4);
    text-align: center;
}

.site-header__link {
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.site-header__link:hover {
    color: var(--text-primary);
}

.site-header__link--active {
    color: var(--accent-primary);
}

/* Theme toggle — investigation helper. Sun shown in dark mode (click → light),
   moon shown in light mode (click → dark). Shift+click clears the stored
   preference so the OS setting takes over again. */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-left: var(--space-2);
    padding: 0;
    background: transparent;
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

/* Mobile only: the nav is hidden, so the header has just logo + theme-toggle +
   hamburger. With justify-content: space-between, the theme-toggle would
   otherwise float in the middle of the bar — anchor it (and the hamburger
   that follows) to the right with auto-margin.
   On desktop the nav is visible and absorbs the middle slot, so the default
   space-between distribution places theme-toggle near the right edge naturally;
   forcing auto-margin there breaks the public marketing page layout by
   collapsing the nav (Logga in / Skapa konto) up against the logo. */
@media (max-width: 767px) {
    .theme-toggle {
        margin-left: auto;
    }
    .theme-toggle + .site-header__toggle {
        margin-left: var(--space-2);
    }
}
.theme-toggle:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-secondary);
}
.theme-toggle:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}
.theme-toggle__icon {
    width: 18px;
    height: 18px;
}
.theme-toggle .theme-toggle__icon--sun { display: none; }
.theme-toggle .theme-toggle__icon--moon { display: block; }
[data-theme="dark"] .theme-toggle .theme-toggle__icon--sun { display: block; }
[data-theme="dark"] .theme-toggle .theme-toggle__icon--moon { display: none; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) .theme-toggle .theme-toggle__icon--sun { display: block; }
    :root:not([data-theme]) .theme-toggle .theme-toggle__icon--moon { display: none; }
}

/* Portal test-mode chip in header */
.portal-testmode-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #fff3cd;
    color: #664d03;
    border: 1px solid #f1c644;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    line-height: 1;
    white-space: nowrap;
}
.portal-testmode-chip:hover { background: #ffe69c; color: #3d2e02; }
.portal-testmode-chip svg { width: 14px; height: 14px; }

/* Portal test-mode banner — matches portal-validation-banner style */
.portal-testmode-banner {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    margin-bottom: var(--space-6);
    background-color: var(--color-warning-bg, #fef3c7);
    border: 1px solid var(--color-warning-border, #fcd34d);
    border-radius: var(--radius-md, 8px);
    color: var(--color-warning-text, #92400e);
}

.portal-testmode-banner > svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    margin-top: 2px;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.portal-testmode-banner strong {
    display: block;
    font-size: var(--text-base);
    margin-bottom: 2px;
}

.portal-testmode-banner p {
    margin: 0;
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
}

.portal-testmode-banner__subtitle {
    margin-top: var(--space-3);
    margin-bottom: 2px;
    font-size: var(--text-sm);
    font-weight: 600;
    opacity: 0.9;
}

.portal-testmode-banner__list {
    list-style: none;
    margin: var(--space-2) 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 4px var(--space-4);
    font-size: var(--text-sm);
}

.portal-testmode-banner__list li {
    display: flex;
    gap: var(--space-2);
    align-items: baseline;
}

.portal-testmode-banner__list code {
    background: rgba(0, 0, 0, 0.08);
    padding: 1px 6px;
    border-radius: 3px;
    font-size: var(--text-xs);
}

.portal-testmode-banner__list .portal-testmode-banner__label {
    opacity: 0.85;
}

.portal-testmode-banner__footer {
    margin-top: var(--space-2);
    font-size: var(--text-sm);
}

.portal-testmode-banner__footer a {
    color: inherit;
    text-decoration: underline;
}

.result-test-pill {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    color: #664d03;
    background: #fff3cd;
    border: 1px solid #f1c644;
    border-radius: 999px;
    vertical-align: middle;
}

/* Header divider (for portal nav) */
.site-header__divider {
    width: 1px;
    height: 20px;
    background: var(--neutral-300);
    margin: 0 var(--space-2);
}

/* Tenant name in header (single tenant) */
.site-header__tenant-name {
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--text-primary);
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Email in header */
.site-header__email {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Tenant switcher in header context */
.tenant-switcher--header {
    position: relative;
}

.tenant-switcher--header .tenant-switcher__button {
    background: var(--neutral-100);
    border: 1px solid var(--neutral-300);
    border-radius: var(--radius-sm);
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    max-width: 180px;
    transition: border-color var(--transition-fast), background var(--transition-fast);
}

.tenant-switcher--header .tenant-switcher__button:hover {
    background: var(--neutral-200);
    border-color: var(--neutral-400);
}

.tenant-switcher--header .tenant-switcher__current {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tenant-switcher--header .tenant-switcher__icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    transition: transform var(--transition-fast);
}

.tenant-switcher--header .tenant-switcher__dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    min-width: 260px;
    max-width: 320px;
    z-index: 1000;
    display: none;
    list-style: none;
    padding: 8px 0;
}

.tenant-switcher--header .tenant-switcher__dropdown.is-open,
#tenant-dropdown.is-open {
    display: block !important;
}

.tenant-switcher--header .tenant-switcher__option {
    padding: 10px 16px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 2px;
    transition: background 0.15s ease;
}

.tenant-switcher--header .tenant-switcher__option:hover {
    background: var(--bg-hover);
}

.tenant-switcher--header .tenant-switcher__option--active {
    background: var(--color-success-bg);
}

.tenant-switcher--header .tenant-switcher__option-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tenant-switcher--header .tenant-switcher__option-slug {
    font-size: 12px;
    color: var(--text-secondary);
    font-family: monospace;
}

.tenant-switcher--header .tenant-switcher__divider {
    height: 1px;
    background: var(--border-primary);
    margin: 8px 0;
}

.tenant-switcher--header .tenant-switcher__option--action {
    padding: 0;
}

.tenant-switcher--header .tenant-switcher__option--action:hover {
    background: transparent;
}

.tenant-switcher--header .tenant-switcher__action-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    color: var(--color-success);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.15s ease;
}

.tenant-switcher--header .tenant-switcher__action-link:hover {
    background: var(--color-success-bg);
}

.tenant-switcher--header .tenant-switcher__option-icon {
    font-size: 16px;
    font-weight: 700;
}

/* Tenant switcher dark mode */
[data-theme="dark"] .tenant-switcher--header .tenant-switcher__button {
    background: var(--bg-secondary);
    border-color: var(--border-primary);
    color: var(--text-primary);
}

[data-theme="dark"] .tenant-switcher--header .tenant-switcher__button:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-secondary);
}

[data-theme="dark"] .tenant-switcher--header .tenant-switcher__dropdown {
    background: var(--bg-secondary);
    border-color: var(--border-primary);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .tenant-switcher--header .tenant-switcher__option:hover {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .tenant-switcher--header .tenant-switcher__option--active {
    background: rgba(53, 122, 107, 0.2);
}

[data-theme="dark"] .tenant-switcher--header .tenant-switcher__option-name {
    color: var(--text-primary);
}

[data-theme="dark"] .tenant-switcher--header .tenant-switcher__option-slug {
    color: var(--text-tertiary);
}

[data-theme="dark"] .tenant-switcher--header .tenant-switcher__divider {
    background: var(--border-primary);
}

[data-theme="dark"] .tenant-switcher--header .tenant-switcher__action-link {
    color: var(--accent-primary);
}

[data-theme="dark"] .tenant-switcher--header .tenant-switcher__action-link:hover {
    background: rgba(53, 122, 107, 0.15);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .tenant-switcher--header .tenant-switcher__button {
        background: var(--bg-secondary);
        border-color: var(--border-primary);
        color: var(--text-primary);
    }

    :root:not([data-theme="light"]) .tenant-switcher--header .tenant-switcher__button:hover {
        background: var(--bg-tertiary);
        border-color: var(--border-secondary);
    }

    :root:not([data-theme="light"]) .tenant-switcher--header .tenant-switcher__dropdown {
        background: var(--bg-secondary);
        border-color: var(--border-primary);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    }

    :root:not([data-theme="light"]) .tenant-switcher--header .tenant-switcher__option:hover {
        background: var(--bg-tertiary);
    }

    :root:not([data-theme="light"]) .tenant-switcher--header .tenant-switcher__option--active {
        background: rgba(53, 122, 107, 0.2);
    }

    :root:not([data-theme="light"]) .tenant-switcher--header .tenant-switcher__option-name {
        color: var(--text-primary);
    }

    :root:not([data-theme="light"]) .tenant-switcher--header .tenant-switcher__option-slug {
        color: var(--text-tertiary);
    }

    :root:not([data-theme="light"]) .tenant-switcher--header .tenant-switcher__divider {
        background: var(--border-primary);
    }

    :root:not([data-theme="light"]) .tenant-switcher--header .tenant-switcher__action-link {
        color: var(--accent-primary);
    }

    :root:not([data-theme="light"]) .tenant-switcher--header .tenant-switcher__action-link:hover {
        background: rgba(53, 122, 107, 0.15);
    }
}

/* Mobile nav portal styles */
.site-header__mobile-divider {
    height: 1px;
    background: var(--neutral-200);
    margin: var(--space-3) 0;
}

.site-header__mobile-tenant {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    padding: var(--space-2) 0;
}

.site-header__mobile-tenant-label {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.site-header__mobile-tenant-name {
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--text-primary);
}

.site-header__mobile-email {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    padding: var(--space-2) 0;
}

/* Container */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.container--narrow {
    max-width: var(--text-max-width);
}

/* Main content */
.site-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
    padding: var(--space-16) 0;
    text-align: center;
}

@media (min-width: 768px) {
    .hero {
        padding: var(--space-24) 0;
    }
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    margin-bottom: var(--space-6);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-success);
    background-color: var(--color-success-bg);
    border: 1px solid var(--color-success-border);
    border-radius: var(--radius-full);
}

.hero__badge-dot {
    width: 8px;
    height: 8px;
    background-color: var(--color-success);
    border-radius: var(--radius-full);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.hero__title {
    font-size: var(--text-4xl);
    font-weight: var(--font-semibold);
    margin-bottom: var(--space-4);
    letter-spacing: var(--tracking-tight);
    overflow-wrap: break-word;
    word-break: break-word;
}

.hero__title-suffix {
    display: inline-block;
    font-size: 0.7em;
    font-weight: var(--font-medium);
    color: var(--text-secondary);
    letter-spacing: 0;
    margin-top: var(--space-2);
}

.hero__title-asterisk {
    color: var(--accent-primary, #357a6b);
    font-weight: var(--font-semibold);
    margin-left: 2px;
    font-size: 0.85em;
    vertical-align: super;
    line-height: 0;
}

.hero__footnote {
    margin-top: var(--space-6);
    font-size: var(--text-xs);
    color: var(--text-tertiary, #8a8680);
    line-height: var(--leading-relaxed);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero__footnote a {
    color: var(--accent-primary, #357a6b);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.hero__footnote a:hover {
    text-decoration: none;
}

.hero__title br {
    display: none;
}

@media (min-width: 768px) {
    .hero__title br {
        display: inline;
    }
}

@media (min-width: 768px) {
    .hero__title {
        font-size: var(--text-5xl);
    }
}

@media (min-width: 992px) {
    .hero__title {
        font-size: var(--text-6xl);
    }
}

.hero__subtitle {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto var(--space-8);
    line-height: var(--leading-relaxed);
}

@media (min-width: 768px) {
    .hero__subtitle {
        font-size: var(--text-xl);
    }
}

.hero__actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    justify-content: center;
    align-items: center;
}

@media (min-width: 576px) {
    .hero__actions {
        flex-direction: row;
    }
}

/* ==========================================================================
   Features Section
   ========================================================================== */

.features {
    padding: var(--space-16) 0;
    background-color: var(--bg-tertiary);
}

.features__grid {
    display: grid;
    gap: var(--space-6);
}

@media (min-width: 768px) {
    .features__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .features__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.feature-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    transition: var(--transition-normal);
}

.feature-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.feature-card__icon {
    width: 48px;
    height: 48px;
    margin-bottom: var(--space-4);
    color: var(--accent-primary);
}

.feature-card__title {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    margin-bottom: var(--space-2);
}

.feature-card__description {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
}

/* ==========================================================================
   Provider Logos Section
   ========================================================================== */

.providers {
    padding: var(--space-12) 0;
}

.providers__title {
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    text-align: center;
    margin-bottom: var(--space-6);
}

.providers__grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: var(--space-6);
}

@media (min-width: 576px) {
    .providers__grid {
        gap: var(--space-8);
    }
}

.providers__logo {
    height: 32px;
    opacity: 0.6;
    filter: grayscale(100%);
    transition: var(--transition-normal);
}

.providers__logo:hover {
    opacity: 1;
    filter: grayscale(0%);
}

.providers__disclaimer {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    text-align: center;
    margin-top: var(--space-4);
}

/* Brand-compliant logos: original colors, constrained height */
.providers__logo--bankid {
    height: 50px;
    width: auto;
    opacity: 1;
    filter: none;
}

@media (min-width: 576px) {
    .providers__logo--bankid {
        height: 80px;
    }
}

.providers__logo--freja {
    max-height: 28px;
    width: auto;
    opacity: 1;
    filter: none;
}

@media (min-width: 576px) {
    .providers__logo--freja {
        max-height: 40px;
    }
}

.providers__logo--bankid:hover,
.providers__logo--freja:hover {
    opacity: 1;
    filter: none;
}

/* Dark mode: invert black BankID logo to white */
[data-theme="dark"] .providers__logo--bankid {
    filter: brightness(0) invert(1);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .providers__logo--bankid {
        filter: brightness(0) invert(1);
    }
}

/* ==========================================================================
   Code Generator Teaser
   ========================================================================== */

.code-generator-teaser {
    padding: var(--space-16) 0;
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    text-align: center;
}

.code-generator-teaser__content {
    max-width: 700px;
    margin: 0 auto;
}

.code-generator-teaser__badge {
    display: inline-block;
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 1px;
    background: linear-gradient(135deg, var(--accent-primary) 0%, #4a9688 100%);
    color: white;
    border-radius: var(--radius-full);
    margin-bottom: var(--space-4);
}

.code-generator-teaser__title {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    margin-bottom: var(--space-4);
}

@media (min-width: 576px) {
    .code-generator-teaser__title {
        font-size: var(--text-3xl);
    }
}

.code-generator-teaser__description {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    margin-bottom: var(--space-6);
    line-height: var(--leading-relaxed);
}

.code-generator-teaser__languages {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-2);
    margin-bottom: var(--space-8);
}

.code-generator-teaser__lang {
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
}

.code-generator-teaser .btn__icon {
    margin-right: var(--space-2);
}

/* ==========================================================================
   CTA Section
   ========================================================================== */

.cta {
    padding: var(--space-16) 0;
    text-align: center;
    background-color: var(--bg-tertiary);
}

.cta__title {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    margin-bottom: var(--space-4);
}

@media (min-width: 576px) {
    .cta__title {
        font-size: var(--text-3xl);
    }
}

.cta__description {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    margin-bottom: var(--space-8);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* ==========================================================================
   Site Footer
   ========================================================================== */

.site-footer {
    padding: var(--space-8) 0;
    border-top: 1px solid var(--border-primary);
    background-color: var(--bg-secondary);
}

.site-footer__inner {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    align-items: center;
    text-align: center;
}

@media (min-width: 768px) {
    .site-footer__inner {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

.site-footer__brand {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.site-footer__logo {
    font-weight: var(--font-semibold);
    color: var(--text-primary);
}

.site-footer__company {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
}

.site-footer__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-4);
}

@media (min-width: 768px) {
    .site-footer__links {
        gap: var(--space-6);
    }
}

.site-footer__link {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.site-footer__link:hover {
    color: var(--text-primary);
}

.site-footer__badges {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.site-footer__badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    color: var(--text-tertiary);
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-full);
}

.site-footer__badge svg {
    width: 12px;
    height: 12px;
    color: var(--color-success);
}

/* ==========================================================================
   Utilities
   ========================================================================== */

.text-center {
    text-align: center;
}

/* Section headings - responsive sizing */
h2.text-center {
    font-size: var(--text-2xl);
}

@media (min-width: 576px) {
    h2.text-center {
        font-size: var(--text-3xl);
    }
}

.text-secondary {
    color: var(--text-secondary);
}

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-4 { margin-top: var(--space-4); }
.mb-4 { margin-bottom: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }
.mb-8 { margin-bottom: var(--space-8); }

.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;
}

/* ==========================================================================
   Services Section
   ========================================================================== */

.services {
    padding: var(--space-16) 0;
}

.services__grid {
    display: grid;
    gap: var(--space-6);
}

@media (min-width: 768px) {
    .services__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .services__grid--three {
        grid-template-columns: repeat(3, 1fr);
    }
}

.service-card {
    position: relative;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
}

@media (min-width: 576px) {
    .service-card {
        padding: var(--space-8);
    }
}

.service-card--highlight {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 1px var(--accent-primary);
}

.service-card__badge {
    position: absolute;
    top: calc(-1 * var(--space-3));
    right: var(--space-4);
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    color: var(--text-inverse);
    background-color: var(--accent-primary);
    border-radius: var(--radius-full);
}

.service-card__header {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}

.service-card__icon {
    width: 40px;
    height: 40px;
    color: var(--accent-primary);
    flex-shrink: 0;
}

.service-card__title {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    margin: 0;
}

.service-card__description {
    color: var(--text-secondary);
    margin-bottom: var(--space-4);
    line-height: var(--leading-relaxed);
}

.service-card__features {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-6) 0;
}

.service-card__features li {
    position: relative;
    padding-left: var(--space-6);
    margin-bottom: var(--space-2);
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.service-card__features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--color-success);
    font-weight: var(--font-semibold);
}

/* ==========================================================================
   How It Works Section
   ========================================================================== */

.how-it-works {
    padding: var(--space-16) 0;
    background-color: var(--bg-tertiary);
}

/* ==========================================================================
   Channels Section (SMS / Kivra / Brev)
   ========================================================================== */

.channels {
    padding: var(--space-16) 0;
}

.channels__grid {
    display: grid;
    gap: var(--space-6);
    grid-template-columns: 1fr;
    max-width: 1100px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .channels__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.channel-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: var(--space-6);
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.channel-card:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.channel-card--primary {
    border-color: var(--accent-primary);
    box-shadow: 0 2px 12px rgba(53, 122, 107, 0.08);
}

.channel-card__badge {
    position: absolute;
    top: calc(-1 * var(--space-3));
    left: var(--space-6);
    padding: var(--space-1) var(--space-3);
    background: var(--accent-primary);
    color: #fff;
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-radius: var(--radius-md);
}

.channel-card__icon {
    width: 32px;
    height: 32px;
    color: var(--accent-primary);
    margin-bottom: var(--space-4);
    stroke-linecap: round;
    stroke-linejoin: round;
}

.channel-card__title {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    margin: 0 0 var(--space-2);
    color: var(--text-primary);
}

.channel-card__description {
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
    color: var(--text-secondary);
    margin: 0 0 var(--space-4);
}

.channel-card__points {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    margin-top: auto;
    padding-top: var(--space-4);
    border-top: 1px solid var(--border-primary);
}

.channel-card__points li {
    position: relative;
    padding-left: var(--space-5);
    font-size: var(--text-sm);
    color: var(--text-primary);
}

.channel-card__points li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-primary);
}

.steps {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
}

@media (min-width: 992px) {
    .steps {
        flex-direction: row;
        justify-content: center;
        align-items: flex-start;
    }
}

.step {
    text-align: center;
    max-width: 280px;
}

.step__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: var(--space-4);
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: var(--text-inverse);
    background-color: var(--accent-primary);
    border-radius: var(--radius-full);
}

.step__title {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    margin-bottom: var(--space-2);
}

.step__description {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
}

.step__connector {
    width: 2px;
    height: 40px;
    background-color: var(--border-secondary);
}

@media (min-width: 992px) {
    .step__connector {
        width: 60px;
        height: 2px;
        margin-top: 24px;
    }
}

/* ==========================================================================
   Enrichment Data Section
   ========================================================================== */

.enrichment {
    padding: var(--space-16) 0;
}

.enrichment__grid {
    display: grid;
    gap: var(--space-6);
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .enrichment__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .enrichment__grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.enrichment-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    text-align: center;
    transition: var(--transition-normal);
    display: flex;
    flex-direction: column;
    align-items: center;
}

@media (min-width: 576px) {
    .enrichment-card {
        padding: var(--space-6);
    }
}

.enrichment-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
}

.enrichment-card__icon {
    width: 40px;
    height: 40px;
    margin-bottom: var(--space-4);
    color: var(--accent-primary);
}

.enrichment-card__title {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    margin: 0 0 var(--space-2) 0;
}

.enrichment-card__description {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin: 0 0 var(--space-3) 0;
    flex-grow: 1;
}

.enrichment-card__source {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    margin-top: auto;
    padding-top: var(--space-3);
    border-top: 1px solid var(--border-primary);
    width: 100%;
}

/* ==========================================================================
   Pricing Section
   ========================================================================== */

.pricing {
    padding: var(--space-16) 0;
    background-color: var(--bg-secondary);
}

.pricing__grid {
    display: grid;
    gap: var(--space-6);
    grid-template-columns: 1fr;
    max-width: 900px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .pricing__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .pricing__grid--three {
        grid-template-columns: repeat(2, 1fr);
        max-width: 1100px;
    }
}

@media (min-width: 1024px) {
    .pricing__grid--three {
        grid-template-columns: repeat(3, 1fr);
    }
}

.pricing-card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    display: flex;
    flex-direction: column;
    position: relative;
}

@media (min-width: 576px) {
    .pricing-card {
        padding: var(--space-8);
    }
}

.pricing-card--highlight {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 1px var(--accent-primary);
}

.pricing-card__badge {
    position: absolute;
    top: calc(-1 * var(--space-3));
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--accent-primary);
    color: white;
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pricing-card__header {
    text-align: center;
    margin-bottom: var(--space-6);
}

.pricing-card__title {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    margin: 0 0 var(--space-1) 0;
}

.pricing-card__subtitle {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
    margin: 0;
}

.pricing-card__price {
    text-align: center;
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-6);
    border-bottom: 1px solid var(--border-primary);
}

.pricing-card__from {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
    display: block;
    height: 1.5em;
}

.pricing-card__amount {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    line-height: 1;
}

@media (min-width: 576px) {
    .pricing-card__amount {
        font-size: 4rem;
    }
}

.pricing-card__currency {
    font-family: 'JetBrains Mono', monospace;
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--text-primary);
    vertical-align: super;
    margin-left: 2px;
}

.pricing-card__period {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
}

.pricing-card__features {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-6) 0;
    flex-grow: 1;
}

.pricing-card__features li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-3);
}

.pricing-card__features li:last-child {
    margin-bottom: 0;
}

.pricing-card__features svg {
    width: 20px;
    height: 20px;
    color: var(--accent-primary);
    flex-shrink: 0;
    margin-top: 1px;
}

.pricing-card__extra {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    text-align: center;
    margin-bottom: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border-primary);
}

.pricing-card__delivery {
    padding: var(--space-4);
    margin-bottom: var(--space-4);
    background: var(--bg-secondary, #ffffff);
    border-radius: var(--radius-md, 8px);
    border: 1px solid var(--border-primary, #e5e5e5);
}

.pricing-card__delivery-title {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold, 600);
    color: var(--text-tertiary, #8a8680);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: var(--space-3, 0.75rem);
    line-height: 1.3;
}

.pricing-card__delivery-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.pricing-card__delivery-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-3, 0.75rem);
    padding: var(--space-2, 0.5rem) 0;
    border-bottom: 1px solid var(--border-primary, #e5e5e5);
}

.pricing-card__delivery-list li:last-child { border-bottom: none; }
.pricing-card__delivery-list li:first-child { padding-top: 0; }

.pricing-card__delivery-label {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2, 0.5rem);
    font-size: var(--text-sm, 0.875rem);
    color: var(--text-primary);
    font-weight: var(--font-medium, 500);
}

.pricing-card__delivery-label svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--accent-primary, #357a6b);
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pricing-card__delivery-price {
    font-size: var(--text-base, 1rem);
    font-weight: var(--font-semibold, 600);
    color: var(--text-primary);
    white-space: nowrap;
}

.pricing-card__delivery-currency {
    font-size: var(--text-xs, 0.75rem);
    font-weight: var(--font-medium, 500);
    color: var(--text-secondary);
    margin-left: 2px;
}

.pricing-card__delivery-from {
    font-size: var(--text-xs, 0.75rem);
    font-weight: var(--font-medium, 500);
    color: var(--text-tertiary, #8a8680);
    margin-right: 2px;
}

/* ==========================================================================
   Modal
   ========================================================================== */

.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
}

.modal__backdrop {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.modal__content {
    position: relative;
    /* One elevation step above the page body (--bg-primary) so the modal panel
       reads as a distinct surface in both themes. In dark mode this is
       #242424 on a #1a1a1a body; in light mode #ffffff on a #f9f8f6 body.
       Using --bg-primary here made the panel and body identical in dark theme
       (both #1a1a1a), so the only separation came from the backdrop overlay —
       not enough on small screens or when the modal fills most of the viewport. */
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    transform: translateY(20px);
    transition: transform 0.2s ease;
}

@media (min-width: 576px) {
    .modal__content {
        padding: var(--space-8);
    }
}

.modal[aria-hidden="false"] .modal__content {
    transform: translateY(0);
}

.modal__close {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-2);
    color: var(--text-tertiary);
    transition: color 0.15s ease;
}

.modal__close:hover {
    color: var(--text-primary);
}

.modal__close svg {
    width: 20px;
    height: 20px;
}

.modal__title {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    margin: 0 0 var(--space-2) 0;
}

.modal__description {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin: 0 0 var(--space-6) 0;
}

/* ==========================================================================
   Contact Form
   ========================================================================== */

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.form-group label {
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: var(--space-3);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-family: inherit;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.btn--block {
    display: block;
    width: 100%;
    text-align: center;
}

/* ==========================================================================
   Auth Pages (Signup/Login)
   ========================================================================== */

.auth-page {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-8) var(--space-4);
    background-color: var(--bg-tertiary);
}

.auth-private-notice {
    width: 100%;
    margin: 0 auto var(--space-4);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
}

.auth-private-notice--wide {
    max-width: 900px;
}

.auth-private-notice a {
    color: var(--accent-primary, #357a6b);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.auth-private-notice a:hover { text-decoration: none; }

.auth-container {
    width: 100%;
    max-width: 440px;
}

.auth-container--with-cta {
    max-width: 900px;
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    align-items: stretch;
}

@media (min-width: 768px) {
    .auth-container--with-cta {
        flex-direction: row;
        align-items: stretch;
    }

    .auth-container--with-cta .signup-cta {
        flex: 1;
        max-width: 380px;
        height: auto;
    }

    .auth-container--with-cta .auth-card {
        flex: 1;
        max-width: 460px;
        display: flex;
        flex-direction: column;
    }

    .auth-container--with-cta .auth-card .auth-form {
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    .auth-container--with-cta .auth-card .auth-form > button[type="submit"],
    .auth-container--with-cta .auth-card .auth-form > .btn[type="submit"] {
        margin-top: auto;
    }
}

.signup-cta {
    justify-content: center;
}

.signup-cta .pricing-card__price {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
    border-top: 1px solid var(--border-primary);
    padding-top: var(--space-6);
}

.auth-card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-lg);
}

@media (min-width: 576px) {
    .auth-card {
        padding: var(--space-8);
    }
}

.auth-header {
    text-align: center;
    margin-bottom: var(--space-6);
}

.auth-title {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    margin: 0 0 var(--space-2) 0;
}

.auth-subtitle {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin: 0;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.auth-form .form-group {
    position: relative;
}

.auth-form input {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    font-family: inherit;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.auth-form input::placeholder {
    color: var(--text-tertiary);
}

.auth-form label {
    display: block;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--text-primary);
    margin-bottom: var(--space-1);
}

.form-error {
    display: none;
    font-size: var(--text-xs);
    color: var(--color-error);
    margin-top: var(--space-1);
}

.form-message {
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    text-align: center;
}

.form-message--error {
    background-color: var(--color-error-bg);
    color: var(--color-error);
    border: 1px solid var(--color-error-border);
}

.form-message--success {
    background-color: var(--color-success-bg);
    color: var(--color-success);
    border: 1px solid var(--color-success-border);
}

.form-info {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    padding: var(--space-3);
    background-color: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.form-info p {
    margin: 0;
}

.auth-footer {
    margin-top: var(--space-6);
    text-align: center;
    padding-top: var(--space-6);
    border-top: 1px solid var(--border-primary);
}

.auth-footer p {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin: 0;
}

.auth-footer a {
    color: var(--accent-primary);
    font-weight: var(--font-medium);
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Company Search */
.company-search-container {
    position: relative;
}

.company-search-results {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    box-shadow: var(--shadow-lg);
    max-height: 280px;
    overflow-y: auto;
}

.company-result {
    padding: var(--space-3) var(--space-4);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-bottom: 1px solid var(--border-primary);
}

.company-result:last-child {
    border-bottom: none;
}

.company-result:hover {
    background-color: var(--bg-hover);
}

.company-result--empty {
    color: var(--text-tertiary);
    cursor: default;
    font-size: var(--text-sm);
}

.company-result--empty:hover {
    background-color: transparent;
}

.company-result-name {
    font-weight: var(--font-medium);
    color: var(--text-primary);
}

.company-result-orgnr {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    font-family: monospace;
}

.selected-company {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    background-color: var(--color-success-bg);
    border: 1px solid var(--color-success-border);
    border-radius: var(--radius-md);
    margin-top: var(--space-2);
}

.selected-company-name {
    font-weight: var(--font-medium);
    color: var(--text-primary);
    flex: 1;
}

.selected-company-orgnr {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    font-family: monospace;
}

.selected-company-remove {
    background: none;
    border: none;
    cursor: pointer;
    font-size: var(--text-xl);
    color: var(--text-tertiary);
    padding: 0;
    line-height: 1;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

.selected-company-remove:hover {
    color: var(--color-error);
    background-color: var(--color-error-bg);
}

/* OTP Input */
.otp-input {
    font-family: monospace;
    font-size: var(--text-2xl) !important;
    letter-spacing: 0.5em;
    text-align: center;
    padding: var(--space-4) !important;
}

/* Success Modal */
.modal__content--success {
    text-align: center;
}

.success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-4);
    background-color: var(--color-success-bg);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-icon svg {
    width: 32px;
    height: 32px;
    color: var(--color-success);
}

.api-key-display {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3);
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
}

.api-key-display code {
    flex: 1;
    font-size: var(--text-xs);
    font-family: monospace;
    word-break: break-all;
    text-align: left;
    color: var(--text-primary);
}

.modal__warning {
    font-size: var(--text-sm);
    color: var(--color-warning);
    margin-bottom: var(--space-6);
}

/* API Key Section (Signup Success) */
.api-key-section {
    text-align: left;
    margin: var(--space-6) 0;
}

.api-key-warning {
    display: flex;
    gap: var(--space-3);
    padding: var(--space-4);
    background-color: var(--color-warning-bg);
    border: 1px solid var(--color-warning-border);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
    text-align: left;
}

.api-key-warning__icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: var(--color-warning);
}

.api-key-warning strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
}

.api-key-warning p {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.api-key-label {
    display: block;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
}

.api-key-display {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3);
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-3);
}

.api-key-display code {
    flex: 1;
    font-size: var(--text-xs);
    font-family: monospace;
    word-break: break-all;
    text-align: left;
    color: var(--text-primary);
}

.api-key-display .btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    flex-shrink: 0;
}

.api-key-email-note {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--text-tertiary);
    margin: 0;
}

.api-key-email-note svg {
    flex-shrink: 0;
    color: var(--color-success);
}

.api-key-confirm {
    padding: var(--space-4);
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    cursor: pointer;
    font-size: var(--text-sm);
    color: var(--text-primary);
    text-align: left;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkbox-custom {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-primary);
    border-radius: var(--radius-sm);
    background-color: var(--bg-primary);
    transition: all 0.15s ease;
    position: relative;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label input[type="checkbox"]:focus + .checkbox-custom {
    box-shadow: 0 0 0 2px var(--accent-primary-alpha);
}

#continue-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==========================================================================
   Onboarding Wizard
   ========================================================================== */

.wizard-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.wizard-overlay[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
}

.wizard-topbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) var(--space-6);
    background-color: rgba(0, 0, 0, 0.4);
    color: white;
    font-size: var(--text-sm);
}

.wizard-topbar__label {
    opacity: 0.9;
}

.wizard-topbar__switcher {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.wizard-topbar__text {
    opacity: 0.7;
}

.wizard-topbar__link {
    color: white;
    text-decoration: none;
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    background-color: rgba(255, 255, 255, 0.15);
    transition: background-color 0.15s, color 0.15s;
}

.wizard-topbar__link:hover,
.wizard-topbar__link:focus {
    color: white;
    background-color: rgba(255, 255, 255, 0.35);
}

.wizard-container {
    background-color: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    max-width: 800px;
    width: calc(100% - var(--space-4));
    margin: 0 var(--space-2);
    max-height: 90vh;
    overflow-x: hidden;
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

@media (min-width: 576px) {
    .wizard-container {
        width: 100%;
        margin: 0;
    }
}

.wizard-overlay[aria-hidden="false"] .wizard-container {
    transform: translateY(0);
}

.wizard-header {
    padding: var(--space-6);
    border-bottom: 1px solid var(--border-primary);
    text-align: center;
}

@media (min-width: 576px) {
    .wizard-header {
        padding: var(--space-8) var(--space-8) var(--space-6);
    }
}

.wizard-title {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    margin: 0 0 var(--space-2) 0;
}

@media (min-width: 576px) {
    .wizard-title {
        font-size: var(--text-2xl);
    }
}

.wizard-subtitle {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin: 0;
}

/* Wizard Progress */
.wizard-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4) var(--space-4);
    background-color: var(--bg-tertiary);
    gap: var(--space-2);
    overflow-x: auto;
}

@media (min-width: 576px) {
    .wizard-progress {
        padding: var(--space-6) var(--space-8);
        gap: var(--space-3);
    }
}

.wizard-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    flex-shrink: 0;
}

.wizard-step__number {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background-color: var(--bg-secondary);
    border: 2px solid var(--border-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--text-tertiary);
    transition: all 0.2s ease;
}

@media (min-width: 576px) {
    .wizard-step__number {
        width: 40px;
        height: 40px;
        font-size: var(--text-base);
    }
}

.wizard-step__label {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    font-weight: var(--font-medium);
    white-space: nowrap;
}

@media (min-width: 576px) {
    .wizard-step__label {
        font-size: var(--text-sm);
    }
}

.wizard-step--active .wizard-step__number {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.wizard-step--active .wizard-step__label {
    color: var(--accent-primary);
}

.wizard-step--completed .wizard-step__number {
    background-color: var(--color-success);
    border-color: var(--color-success);
    color: transparent;
    position: relative;
}

.wizard-step--completed .wizard-step__number::after {
    content: "";
    position: absolute;
    width: 10px;
    height: 6px;
    border-left: 2px solid white;
    border-bottom: 2px solid white;
    transform: rotate(-45deg);
    top: 50%;
    left: 50%;
    margin-top: -4px;
    margin-left: -5px;
}

@media (min-width: 576px) {
    .wizard-step--completed .wizard-step__number::after {
        width: 12px;
        height: 7px;
        margin-top: -5px;
        margin-left: -6px;
    }
}

.wizard-step--completed .wizard-step__label {
    color: var(--color-success);
}

.wizard-step__connector {
    width: 20px;
    height: 2px;
    background-color: var(--border-primary);
    flex-shrink: 0;
}

@media (min-width: 576px) {
    .wizard-step__connector {
        width: 40px;
    }
}

.wizard-step__connector--active {
    background-color: var(--color-success);
}

/* Wizard Content */
.wizard-content {
    padding: var(--space-5);
    overflow-x: hidden;
}

@media (min-width: 576px) {
    .wizard-content {
        padding: var(--space-6);
    }
}

.wizard-panel__title {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    margin: 0 0 var(--space-2) 0;
}

.wizard-panel__description {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin: 0 0 var(--space-6) 0;
}

.wizard-panel__note {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin: var(--space-4) 0 0 0;
    padding: var(--space-3);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

/* Mode Options */
.wizard-options {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.wizard-option {
    cursor: pointer;
}

.wizard-option input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.wizard-option__content {
    padding: var(--space-4);
    border: 2px solid var(--border-primary);
    border-radius: var(--radius-lg);
    transition: all 0.2s ease;
}

@media (min-width: 576px) {
    .wizard-option__content {
        padding: var(--space-5);
    }
}

.wizard-option:hover .wizard-option__content {
    border-color: var(--accent-primary);
    background-color: var(--bg-secondary);
}

.wizard-option input:checked + .wizard-option__content {
    border-color: var(--accent-primary);
    background-color: rgba(59, 130, 246, 0.05);
}

.wizard-option__header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-2);
}

.wizard-option__icon {
    width: 24px;
    height: 24px;
    color: var(--accent-primary);
    flex-shrink: 0;
}

.wizard-option__title {
    font-weight: var(--font-semibold);
    font-size: var(--text-base);
}

.wizard-option__description {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin: 0;
    padding-left: 36px;
}

@media (max-width: 575px) {
    .wizard-option__description {
        padding-left: 0;
    }
}

/* Wizard Form */
.wizard-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.wizard-form .form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.wizard-form label {
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--text-primary);
}

.wizard-form input[type="text"],
.wizard-form input[type="url"],
.wizard-form select {
    padding: var(--space-3);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-family: inherit;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wizard-form input:focus,
.wizard-form select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-hint {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
}

.form-hint--error {
    color: var(--color-error);
}

.form-hint--success {
    color: var(--color-success);
}

/* Input with prefix */
.input-with-prefix {
    display: flex;
    align-items: stretch;
}

.input-prefix {
    padding: var(--space-3);
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-right: none;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    font-size: var(--text-sm);
    color: var(--text-tertiary);
    white-space: nowrap;
}

.input-with-prefix input {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    flex: 1;
    min-width: 0;
}

/* Input with button */
.input-with-button {
    display: flex;
    gap: var(--space-2);
}

.input-with-button input {
    flex: 1;
    min-width: 0;
}

/* Logo input row with thumbnail */
.logo-input-row {
    display: flex;
    gap: var(--space-3);
    align-items: center;
}

.logo-thumb {
    width: 48px;
    height: 48px;
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    background-color: var(--bg-tertiary);
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

.logo-thumb--loaded {
    background-color: transparent;
}

.logo-input-row input {
    flex: 1;
    min-width: 0;
    padding: var(--space-3);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-family: inherit;
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

.logo-input-row input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Color pickers */
/* Extract loading spinner */
.extract-loading {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) 0;
}

.extract-loading__spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-primary);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.extract-loading__text {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

/* Logo alternatives */
.logo-alternatives {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: var(--space-2);
    flex-wrap: wrap;
}

.logo-alternatives__label {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
}

.logo-alternatives__list {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.logo-alt-thumb {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-sm);
    background-color: var(--bg-tertiary);
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
    transition: border-color 0.15s, transform 0.15s;
}

.logo-alt-thumb:hover {
    border-color: var(--accent-primary);
    transform: scale(1.1);
}

/* Color pickers */
.color-pickers {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-3);
}

@media (min-width: 400px) {
    .color-pickers {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-4);
    }
}

.form-group--color {
    gap: var(--space-2) !important;
}

.color-input-wrapper {
    display: flex;
    gap: var(--space-2);
    align-items: center;
}

.color-input-wrapper input[type="color"] {
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    cursor: pointer;
    background: none;
}

.color-input-wrapper input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 2px;
}

.color-input-wrapper input[type="color"]::-webkit-color-swatch {
    border-radius: var(--radius-sm);
    border: none;
}

.color-input-wrapper input[type="text"] {
    flex: 1;
    min-width: 0;
    font-family: monospace;
    font-size: var(--text-xs);
    text-transform: uppercase;
}

/* Branding layout */
.wizard-branding-layout {
    display: flex;
    flex-direction: column-reverse;
    gap: var(--space-5);
}

@media (min-width: 900px) {
    .wizard-branding-layout {
        flex-direction: row;
    }

    .wizard-branding-form {
        flex: 1;
        min-width: 0;
    }

    .wizard-branding-preview {
        width: 240px;
        flex-shrink: 0;
    }
}

.wizard-branding-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

/* Preview card */
.wizard-branding-preview {
    /* On mobile: compact preview at top */
}

@media (min-width: 900px) {
    .wizard-branding-preview {
        position: sticky;
        top: var(--space-4);
    }
}

.preview-label {
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-2);
}

.preview-card {
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-primary);
    text-align: center;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--space-3);
}

@media (min-width: 900px) {
    .preview-card {
        flex-direction: column;
        padding: var(--space-6);
        gap: 0;
    }
}

.preview-logo {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    background-color: var(--bg-tertiary);
    border-radius: var(--radius-md);
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

@media (min-width: 900px) {
    .preview-logo {
        width: 48px;
        height: 48px;
        margin: 0 auto var(--space-4);
    }
}

.preview-text {
    flex: 1;
    text-align: left;
    min-width: 0;
}

@media (min-width: 900px) {
    .preview-text {
        text-align: center;
    }
}

.preview-title {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    margin-bottom: 0;
}

@media (min-width: 900px) {
    .preview-title {
        font-size: var(--text-lg);
        margin-bottom: var(--space-1);
    }
}

.preview-subtitle {
    font-size: var(--text-xs);
    margin-bottom: 0;
    opacity: 0.7;
}

@media (min-width: 900px) {
    .preview-subtitle {
        font-size: var(--text-sm);
        margin-bottom: var(--space-4);
    }
}

.preview-button {
    display: none;
    width: 100%;
    padding: var(--space-3) var(--space-4);
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    cursor: pointer;
    transition: opacity 0.2s ease;
}

@media (min-width: 900px) {
    .preview-button {
        display: block;
    }
}

.preview-button:hover {
    opacity: 0.9;
}

/* Multi-input (for origins/callbacks) */
.multi-input {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    margin-bottom: var(--space-2);
}

.multi-input__item {
    display: flex;
    gap: var(--space-2);
    align-items: center;
}

.multi-input__item input {
    flex: 1;
    padding: var(--space-3);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-family: inherit;
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

.multi-input__item input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.multi-input__remove {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--text-tertiary);
    font-size: var(--text-lg);
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.multi-input__remove:hover {
    background-color: var(--color-error-bg);
    border-color: var(--color-error);
    color: var(--color-error);
}

/* Providers */
.wizard-providers {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin-bottom: var(--space-6);
}

.wizard-provider {
    cursor: pointer;
}

.wizard-provider input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.wizard-provider__content {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4);
    border: 2px solid var(--border-primary);
    border-radius: var(--radius-lg);
    transition: all 0.2s ease;
}

.wizard-provider:hover .wizard-provider__content {
    border-color: var(--accent-primary);
    background-color: var(--bg-secondary);
}

.wizard-provider input:checked + .wizard-provider__content {
    border-color: var(--accent-primary);
    background-color: rgba(59, 130, 246, 0.05);
}

.wizard-provider__logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.wizard-provider__info {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.wizard-provider__name {
    font-weight: var(--font-semibold);
}

.wizard-provider__description {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
}

/* Test mode toggle */
.wizard-test-mode {
    padding: var(--space-4);
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
}

.wizard-test-mode .checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    cursor: pointer;
}

.wizard-test-mode .checkbox-label div {
    flex: 1;
}

.wizard-test-mode .checkbox-label strong {
    display: block;
    margin-bottom: var(--space-1);
}

.wizard-test-mode .checkbox-label p {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin: 0;
}

/* Wizard Footer */
.wizard-footer {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-6);
    border-top: 1px solid var(--border-primary);
    background-color: var(--bg-secondary);
}

@media (min-width: 576px) {
    .wizard-footer {
        padding: var(--space-4) var(--space-8);
    }
}

.wizard-footer__spacer {
    flex: 1;
}

.wizard-footer .btn {
    min-width: 100px;
}

/* Loading state */
.wizard-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-8);
}

.wizard-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-primary);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   Settings Panel
   ========================================================================== */

.settings-panel {
    margin-top: var(--space-8);
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
}

.settings-panel__title {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    margin: 0 0 var(--space-4) 0;
}

/* Settings Tabs */
.settings-tabs {
    display: flex;
    gap: var(--space-1);
    border-bottom: 1px solid var(--border-primary);
    margin-bottom: var(--space-6);
    overflow-x: auto;
}

.settings-tab {
    padding: var(--space-3) var(--space-4);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--text-secondary);
    transition: color 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.settings-tab:hover {
    color: var(--text-primary);
}

.settings-tab--active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

/* Settings Pane */
.settings-pane {
    max-width: 800px;
}

.settings-pane__actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-top: var(--space-6);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border-primary);
}

.settings-status {
    font-size: var(--text-sm);
}

.settings-status--success {
    color: var(--color-success);
}

.settings-status--error {
    color: var(--color-error);
}

/* Mode Selector */
.mode-selector {
    display: flex;
    gap: var(--space-2);
}

.mode-option {
    flex: 1;
    cursor: pointer;
}

.mode-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.mode-option__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: var(--space-3);
    background-color: var(--bg-secondary);
    border: 2px solid var(--border-primary);
    border-radius: var(--radius-md);
    transition: border-color 0.15s, background-color 0.15s;
}

.mode-option:hover .mode-option__content {
    border-color: var(--text-tertiary);
}

.mode-option input:checked + .mode-option__content {
    border-color: var(--accent-primary);
    background-color: var(--bg-tertiary);
}

.mode-option__title {
    font-weight: var(--font-semibold);
    font-size: var(--text-sm);
}

.mode-option__desc {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
}

/* Advanced Branding */
.advanced-branding {
    margin-top: var(--space-6);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
}

.advanced-branding__toggle {
    cursor: pointer;
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--text-secondary);
    list-style: none;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.advanced-branding__toggle::-webkit-details-marker {
    display: none;
}

.advanced-branding__toggle::before {
    content: '';
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--text-tertiary);
    transition: transform 0.2s;
}

.advanced-branding[open] .advanced-branding__toggle::before {
    transform: rotate(180deg);
}

.advanced-branding__toggle:hover {
    color: var(--text-primary);
}

.advanced-branding__content {
    padding: 0 var(--space-4) var(--space-4) var(--space-4);
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    cursor: pointer;
}

.toggle-label__text {
    font-size: var(--text-sm);
    color: var(--text-primary);
}

/* Enrichment Tab */
.settings-pane__intro {
    color: var(--text-secondary);
    margin: 0 0 var(--space-6) 0;
    font-size: var(--text-sm);
}

.enrichment-sources {
    margin-bottom: var(--space-6);
}

.enrichment-sources__title {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    margin: 0 0 var(--space-4) 0;
}

.enrichment-sources__list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.enrichment-source-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
}

.enrichment-source-item--enabled {
    border-left: 3px solid var(--color-success);
}

.enrichment-source-item--disabled {
    border-left: 3px solid var(--border-primary);
}

.enrichment-source-item__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.enrichment-source-item__name {
    font-weight: var(--font-medium);
    font-size: var(--text-sm);
    color: var(--text-primary);
}

.enrichment-source-item__description {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
}

.enrichment-source-item__status {
    font-size: var(--text-xs);
    flex-shrink: 0;
    white-space: nowrap;
}

.enrichment-source-item--enabled .enrichment-source-item__status {
    color: var(--color-success);
}

.enrichment-source-item--disabled .enrichment-source-item__status {
    color: var(--text-tertiary);
}

.enrichment-contact-notice {
    padding: var(--space-4);
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
}

.enrichment-contact-notice__content strong {
    display: block;
    margin-bottom: var(--space-1);
    font-size: var(--text-sm);
}

.enrichment-contact-notice__content p {
    margin: 0;
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.enrichment-contact-notice__content a {
    color: var(--accent-primary);
}

/* Enrichment Sources (new design with toggles) */
.enrichment-test-notice {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-4);
    background-color: var(--color-success-bg);
    border: 1px solid var(--color-success);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-6);
}

.enrichment-test-notice p {
    margin: 0 0 var(--space-1) 0;
    font-size: var(--text-sm);
    color: var(--text-primary);
}

.enrichment-test-notice p:last-child {
    margin-bottom: 0;
    color: var(--text-secondary);
}

.enrichment-test-notice .provider-badge--test {
    background-color: rgba(22, 101, 52, 0.15);
    color: rgb(22, 101, 52);
}

.enrichment-source--test {
    border-left: 3px solid var(--color-warning);
}

.enrichment-source--live {
    border-left: 3px solid var(--color-success);
}

.enrichment-source {
    padding: var(--space-4);
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-3);
}

.enrichment-source__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    margin-bottom: var(--space-2);
}

.enrichment-source__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.enrichment-source__name {
    font-weight: var(--font-semibold);
    font-size: var(--text-sm);
    color: var(--text-primary);
}

.enrichment-source__description {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
}

.enrichment-source__details {
    margin: 0;
    font-size: var(--text-xs);
    color: var(--text-secondary);
    line-height: 1.5;
}

.enrichment-source__details strong {
    color: var(--color-success);
}

/* Portal Page */
.portal-page {
    padding: var(--space-8) 0;
    min-height: calc(100vh - 200px);
}

/* Company Card */
.portal-info-value--text {
    font-family: inherit;
    font-weight: var(--font-medium);
}

.portal-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-4, 1rem);
    flex-wrap: wrap;
    margin-bottom: var(--space-4, 1rem);
}

.portal-search {
    display: flex;
    gap: var(--space-2, 0.5rem);
    align-items: center;
}

.portal-search__input {
    padding: var(--space-2, 0.5rem) var(--space-3, 0.75rem);
    border: 1px solid var(--border-primary, #e5e5e5);
    border-radius: var(--radius-md, 8px);
    font-size: var(--text-sm, 0.875rem);
    font-family: inherit;
    width: 200px;
}

.portal-search__input:focus {
    outline: none;
    border-color: var(--accent-primary, #357a6b);
    box-shadow: 0 0 0 3px rgba(53, 122, 107, 0.1);
}

.portal-table__actions {
    white-space: nowrap;
}

.portal-table__actions .portal-link--icon {
    margin-left: var(--space-3, 0.75rem);
}

.portal-table__row--test {
    background-color: var(--color-warning-bg);
}

.portal-table__row--test:hover {
    background-color: var(--color-warning-border);
}

.testmode-pill {
    display: inline-block;
    margin-left: 8px;
    padding: 1px 8px;
    font-size: 11px;
    font-weight: 600;
    color: #664d03;
    background: #fff3cd;
    border: 1px solid #f1c644;
    border-radius: 999px;
    vertical-align: middle;
    letter-spacing: 0.02em;
}

.score-label {
    display: inline-block;
    margin-left: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.portal-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4, 1rem) 0 0;
    border-top: 1px solid var(--border-primary, #e5e5e5);
    margin-top: var(--space-4, 1rem);
}

.portal-pagination__info {
    font-size: var(--text-sm, 0.875rem);
    color: var(--text-secondary);
}

.portal-pagination__nav {
    display: flex;
    gap: var(--space-2, 0.5rem);
}

.portal-card__empty {
    color: var(--text-tertiary);
    font-style: italic;
    margin: 0;
}

.portal-card__divider {
    height: 1px;
    background-color: var(--border-primary);
    margin: var(--space-4) 0;
}

.portal-card__subtitle {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--text-secondary);
    margin: 0 0 var(--space-2) 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Tenant Switcher - Divider and Action */
.tenant-switcher__divider {
    height: 1px;
    background-color: var(--border-primary);
    margin: var(--space-2) 0;
}

.tenant-switcher__option--action {
    padding: 0;
}

.tenant-switcher__action-link {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3);
    color: var(--accent-primary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: background-color 0.15s;
}

.tenant-switcher__action-link:hover {
    background-color: var(--bg-secondary);
}

.tenant-switcher__option-icon {
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    width: 20px;
    text-align: center;
}

/* Status Indicator */
.portal-status {
    display: inline-flex;
    align-items: center;
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
}

.portal-status--test {
    background-color: rgba(234, 179, 8, 0.15);
    color: rgb(161, 98, 7);
}

.portal-status--production {
    background-color: rgba(34, 197, 94, 0.15);
    color: rgb(22, 101, 52);
}

.portal-status--pending {
    background-color: rgba(59, 130, 246, 0.15);
    color: rgb(29, 78, 216);
}

.portal-status--rejected {
    background-color: rgba(239, 68, 68, 0.15);
    color: rgb(185, 28, 28);
}

.portal-card__description {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin: var(--space-3) 0 0 0;
    line-height: 1.5;
}

/* Provider Sections */
.provider-sections {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.provider-section {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.provider-section__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-primary);
}

.provider-section__identity {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.provider-section__logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.provider-section__info {
    display: flex;
    flex-direction: column;
}

.provider-section__name {
    font-weight: var(--font-semibold);
    font-size: var(--text-sm);
}

.provider-section__description {
    font-size: var(--text-xs);
    color: var(--text-secondary);
}

.provider-section__body {
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.provider-section__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.provider-section__label {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.provider-section__status {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.provider-section__meta {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
}

.provider-section__link {
    font-size: var(--text-sm);
    color: var(--accent-primary);
    text-decoration: none;
}

.provider-section__link:hover {
    text-decoration: underline;
}

/* Mode Box */
.provider-section__mode-box {
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    padding: var(--space-3);
}

.provider-section__mode-box--test {
    border-color: rgba(234, 179, 8, 0.3);
}

.provider-section__mode-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-2);
}

.provider-section__mode-status {
    font-size: var(--text-xs);
    color: var(--color-success);
    font-weight: var(--font-medium);
}

.provider-section__mode-status--pending {
    color: rgb(29, 78, 216);
}

.provider-section__mode-status--rejected {
    color: rgb(185, 28, 28);
}

.provider-section__mode-status--inactive {
    color: var(--text-tertiary);
}

.provider-section__mode-description {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    margin: 0 0 var(--space-3) 0;
    line-height: 1.5;
}

.provider-section__mode-description:last-child {
    margin-bottom: 0;
}

.provider-section__mode-box .btn {
    width: 100%;
}

/* Toggle Switch */
.toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    cursor: pointer;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle__slider {
    position: absolute;
    inset: 0;
    background-color: var(--border-primary);
    border-radius: var(--radius-full);
    transition: background-color 0.2s;
}

.toggle__slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.toggle input:checked + .toggle__slider {
    background-color: var(--accent-primary);
}

.toggle input:checked + .toggle__slider::before {
    transform: translateX(20px);
}

/* Provider Badge */
.provider-badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
}

.provider-badge--test {
    background-color: rgba(234, 179, 8, 0.15);
    color: rgb(161, 98, 7);
}

.provider-badge--production {
    background-color: rgba(34, 197, 94, 0.15);
    color: rgb(22, 101, 52);
}

.provider-badge--pending {
    background-color: rgba(59, 130, 246, 0.15);
    color: rgb(29, 78, 216);
}

.provider-badge--rejected {
    background-color: rgba(239, 68, 68, 0.15);
    color: rgb(185, 28, 28);
}

/* Provider Advanced Settings */
.provider-section__advanced {
    margin-top: var(--space-4);
    border-top: 1px solid var(--border-primary);
    padding-top: var(--space-4);
}

.provider-section__advanced-toggle {
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.provider-section__advanced-toggle:hover {
    color: var(--text-primary);
}

.provider-section__advanced-toggle::before {
    content: '▸';
    font-size: 0.75em;
    transition: transform 0.2s;
}

.provider-section__advanced[open] .provider-section__advanced-toggle::before {
    transform: rotate(90deg);
}

.provider-section__advanced-content {
    margin-top: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.provider-section__advanced-content textarea {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    line-height: 1.5;
    resize: vertical;
    min-height: 120px;
}

.provider-section__advanced--disabled {
    opacity: 0.7;
}

.provider-section__advanced--disabled .provider-section__advanced-toggle {
    cursor: default;
    color: var(--text-tertiary);
}

.provider-section__advanced--disabled .provider-section__advanced-toggle::before {
    content: none;
}

.provider-section__advanced-notice {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    margin-top: var(--space-3);
    padding: var(--space-3);
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    color: var(--text-secondary);
    line-height: 1.5;
}

.provider-section__advanced-notice-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 1px;
    stroke: var(--text-tertiary);
}

/* Mode Toggle */
.mode-toggle {
    display: inline-flex;
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-full);
    padding: 2px;
}

.mode-toggle__option {
    cursor: pointer;
}

.mode-toggle__option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.mode-toggle__option span {
    display: block;
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    transition: all 0.15s;
}

.mode-toggle__option input:checked + span {
    background: var(--accent-primary);
    color: white;
}

.mode-toggle__option--disabled {
    cursor: not-allowed;
}

.mode-toggle__option--disabled span {
    opacity: 0.4;
}

.provider-section__mode-hint {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    margin: var(--space-2) 0 0 0;
}

/* ==========================================================================
   BankID Application Form
   ========================================================================== */

/* Hide number input spinners */
.bankid-application input[type="number"]::-webkit-outer-spin-button,
.bankid-application input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.bankid-application input[type="number"] {
    -moz-appearance: textfield;
}

.form-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-2);
}

.form-label-row label {
    margin-bottom: 0;
}

.btn--ghost {
    background: transparent;
    border: 1px solid var(--border-primary);
    color: var(--text-secondary);
}

.btn--ghost:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--text-tertiary);
}

.btn--xs {
    padding: var(--space-1) var(--space-2);
    font-size: var(--text-xs);
}

.bankid-application {
    max-width: 800px;
    margin: 0 auto;
}

.bankid-application__header {
    margin-bottom: var(--space-8);
}

.bankid-application__back {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: var(--text-sm);
    margin-bottom: var(--space-4);
    transition: color 0.2s;
}

.bankid-application__back:hover {
    color: var(--text-primary);
}

.bankid-application__title {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    margin: 0 0 var(--space-2) 0;
}

.bankid-application__subtitle {
    color: var(--text-secondary);
    margin: 0;
}

/* Progress Steps */
.bankid-application__progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-8);
    padding: var(--space-4) 0;
}

.bankid-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
}

.bankid-step__number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--bg-tertiary);
    border: 2px solid var(--border-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--font-semibold);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    transition: all 0.2s;
}

.bankid-step__label {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    font-weight: var(--font-medium);
}

.bankid-step--active .bankid-step__number {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.bankid-step--active .bankid-step__label {
    color: var(--text-primary);
}

.bankid-step--completed .bankid-step__number {
    background-color: var(--color-success);
    border-color: var(--color-success);
    color: white;
}

.bankid-step__connector {
    width: 60px;
    height: 2px;
    background-color: var(--border-primary);
    margin: 0 var(--space-2);
    margin-bottom: var(--space-6);
    transition: background-color 0.2s;
}

.bankid-step__connector--completed {
    background-color: var(--color-success);
}

/* Panel */
.bankid-panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    margin-bottom: var(--space-6);
}

.bankid-panel__title {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    margin: 0 0 var(--space-2) 0;
}

.bankid-panel__description {
    color: var(--text-secondary);
    margin: 0 0 var(--space-6) 0;
}

/* Form Grid */
.bankid-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

.bankid-form-grid .form-group--wide {
    grid-column: 1 / -1;
}

@media (max-width: 640px) {
    .bankid-form-grid {
        grid-template-columns: 1fr;
    }
}

/* Radio Group */
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
}

.radio-label {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    cursor: pointer;
}

.radio-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s;
}

.radio-custom::after {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--accent-primary);
    transform: scale(0);
    transition: transform 0.15s;
}

.radio-label input[type="radio"]:checked + .radio-custom {
    border-color: var(--accent-primary);
}

.radio-label input[type="radio"]:checked + .radio-custom::after {
    transform: scale(1);
}

.radio-label input[type="radio"]:focus + .radio-custom {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Checkbox Group */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
}

/* Form Info Box */
.form-info {
    margin-top: var(--space-3);
    padding: var(--space-3);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.5;
}

.form-info strong {
    color: var(--text-primary);
}

/* Volume Options */
.volume-options {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.volume-option {
    cursor: pointer;
}

.volume-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.volume-option span {
    display: block;
    padding: var(--space-2) var(--space-3);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    transition: all 0.15s;
}

.volume-option:hover span {
    border-color: var(--accent-primary);
}

.volume-option input[type="radio"]:checked + span {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.volume-option input[type="radio"]:focus + span {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Footer */
.bankid-application__footer {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding-top: var(--space-4);
}

.bankid-application__footer-spacer {
    flex: 1;
}

/* Responsive */
@media (max-width: 640px) {
    .bankid-application__progress {
        overflow-x: auto;
        padding: var(--space-4);
        margin-left: calc(-1 * var(--container-padding));
        margin-right: calc(-1 * var(--container-padding));
    }

    .bankid-step__connector {
        width: 30px;
    }

    .bankid-step__label {
        display: none;
    }
}
