*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body.cpt-auth-body {
    margin: 0;
    font-family: var(--cpt-font);
    color: var(--cpt-ink);
    background: var(--cpt-surface);
    -webkit-font-smoothing: antialiased;
}

.cpt-auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    min-height: 100vh;
}

.cpt-auth-brand {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    overflow: hidden;
    color: #f8fafc;
    background:
        radial-gradient(1200px 600px at 10% 10%, rgba(232, 163, 61, .18), transparent 55%),
        radial-gradient(900px 500px at 90% 90%, rgba(59, 130, 246, .16), transparent 60%),
        linear-gradient(145deg, #101c2e 0%, #1f3a5f 55%, #16283f 100%);
}

.cpt-auth-brand::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .035;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

.cpt-auth-brand-inner {
    position: relative;
    z-index: 1;
    max-width: 460px;
}

.cpt-auth-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .08em;
    color: #101c2e;
    background: var(--cpt-accent);
    box-shadow: var(--cpt-shadow-md);
}

.cpt-auth-brand-title {
    margin: 28px 0 16px;
    font-size: clamp(30px, 3.4vw, 46px);
    line-height: 1.08;
    letter-spacing: -.02em;
    font-weight: 700;
}

.cpt-auth-brand-text {
    margin: 0 0 28px;
    max-width: 400px;
    color: rgba(248, 250, 252, .78);
    font-size: 15px;
    line-height: 1.6;
}

.cpt-auth-brand-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 12px;
}

.cpt-auth-brand-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(248, 250, 252, .82);
    font-size: 14px;
}

.cpt-auth-brand-list li::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--cpt-accent);
    box-shadow: 0 0 0 4px rgba(232, 163, 61, .16);
}

.cpt-auth-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 24px;
    background: var(--cpt-surface);
}

.cpt-auth-card {
    width: 100%;
    max-width: 420px;
    padding: 36px 32px;
    border: 1px solid var(--cpt-border);
    border-radius: 16px;
    background: var(--cpt-card);
    box-shadow: var(--cpt-shadow-md);
    animation: cpt-auth-in 220ms ease-out both;
}

@keyframes cpt-auth-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cpt-auth-header {
    margin-bottom: 26px;
}

.cpt-auth-step {
    display: inline-block;
    margin-bottom: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--cpt-navy);
    background: rgba(31, 58, 95, .08);
}

[data-bs-theme="dark"] .cpt-auth-step {
    color: var(--cpt-accent);
    background: rgba(232, 163, 61, .12);
}

.cpt-auth-header h2 {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -.01em;
}

.cpt-auth-header p {
    margin: 0;
    color: var(--cpt-muted);
    font-size: 14px;
    line-height: 1.55;
}

.cpt-auth-firma {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 22px;
    padding: 12px 14px;
    border: 1px solid var(--cpt-border);
    border-radius: var(--cpt-radius-sm);
    background: var(--cpt-surface);
    font-size: 13px;
}

.cpt-auth-firma strong {
    font-weight: 600;
}

.cpt-auth-hint {
    margin: 18px 0 0;
    color: var(--cpt-muted);
    font-size: 12px;
    line-height: 1.5;
}

.cpt-auth-footer {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 420px;
    margin-top: 22px;
    color: var(--cpt-muted);
    font-size: 12px;
}

.cpt-auth-version {
    font-variant-numeric: tabular-nums;
}

.cpt-theme-toggle {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 10;
    width: 38px;
    height: 38px;
    border: 1px solid var(--cpt-border);
    border-radius: 50%;
    color: var(--cpt-ink);
    background: var(--cpt-card);
    box-shadow: var(--cpt-shadow-sm);
    cursor: pointer;
    transition: transform var(--cpt-transition), background var(--cpt-transition);
}

.cpt-theme-toggle:hover {
    transform: translateY(-1px);
}

.cpt-theme-toggle-icon {
    font-size: 15px;
    line-height: 1;
}

.cpt-auth-card .form-label {
    font-size: 13px;
    font-weight: 600;
}

.cpt-auth-card .form-control {
    border-color: var(--cpt-border);
    border-radius: var(--cpt-radius-sm);
    padding: 11px 13px;
    font-size: 14px;
}

.cpt-auth-card .form-control:focus {
    border-color: var(--cpt-accent);
    box-shadow: 0 0 0 3px rgba(232, 163, 61, .18);
}

.cpt-auth-card .btn-primary {
    border: 0;
    background: var(--cpt-navy);
}

.cpt-auth-card .btn-primary:hover,
.cpt-auth-card .btn-primary:focus {
    background: #16283f;
}

.cpt-auth-card .btn-link {
    color: var(--cpt-muted);
    font-size: 13px;
    text-decoration: none;
}

.cpt-auth-card .btn-link:hover {
    color: var(--cpt-ink);
}

.cpt-auth-switch {
    display: flex;
    justify-content: center;
    margin-top: 18px;
}

@media (max-width: 991.98px) {
    .cpt-auth-shell {
        grid-template-columns: 1fr;
    }

    .cpt-auth-brand {
        display: none;
    }

    .cpt-auth-panel {
        min-height: 100vh;
        padding: 32px 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cpt-auth-card,
    .cpt-theme-toggle {
        animation: none;
        transition: none;
    }
}
