:root {
    --primary-bg: #020b18;
    --primary-text: #0f172a;
    --border-color: #e2e8f0;
    --btn-black: #000000;
    --input-radius: 30px;
}

body,
html {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: 'Inter', sans-serif;
    background: #f1f5f9;
}

.auth-container {
    width: 100%;
    padding: 40px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    box-sizing: border-box;
}

@media (max-height: 900px) {
    .auth-container {
        align-items: flex-start;
        padding-top: 40px;
        padding-bottom: 40px;
    }
}

.auth-card {
    display: flex;
    width: 100%;
    max-width: 1100px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: max-width 0.3s ease;
}

.auth-card.centered-mode {
    max-width: 600px;
    flex-direction: column;
}

.auth-card.centered-mode .left-panel {
    display: none;
}

.auth-card.centered-mode .right-panel {
    width: 100%;
    padding: 50px 40px;
}

.left-panel {
    width: 50%;
    background-color: var(--primary-bg);
    position: relative;
    overflow: hidden;
    min-height: 600px;
}

.left-panel img.bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.right-panel {
    width: 50%;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    box-sizing: border-box;
}

.login-box {
    width: 100%;
    max-width: 480px;
}

/* STEPPER */
.stepper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin-bottom: 25px;
    gap: 10px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 80px;
}

.step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
    transition: background 0.3s, color 0.3s;
}

.step.done .step-circle {
    background-color: #7CF0FF;
    color: #000;
    font-size: 0;
}

.step.done .step-circle::after {
    content: '✓';
    font-size: 14px;
    font-weight: bold;
}

.step.active .step-circle {
    background-color: #000;
    color: #fff;
}

.step.inactive .step-circle {
    background-color: #fff;
    border: 1px solid #e2e8f0;
    color: #64748b;
}

.step-label {
    font-size: 11px;
    color: #121212;
    line-height: 1.3;
}

.step-line {
    width: 40px;
    height: 1px;
    background-color: #e2e8f0;
    margin-top: 16px;
}

.step-line.filled {
    background-color: #000;
}

h2 {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 10px 0;
    color: var(--primary-text);
}

.sub-text {
    text-align: center;
    color: #6B6B6B;
    font-size: 0.95rem;
    margin-bottom: 30px;
    line-height: 1.5;
}

.input-group {
    margin-bottom: 15px;
    position: relative;
    width: 100%;
}

.input-label {
    display: block;
    font-size: 0.85rem;
    color: #475569;
    margin-bottom: 6px;
    margin-left: 5px;
    font-weight: 400;
}

.input-field {
    width: 100%;
    padding: 12px 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--input-radius);
    font-size: 0.95rem;
    box-sizing: border-box;
    background-color: #fff;
    transition: border-color 0.3s ease;
    height: 50px;
    color: #0f172a;
}

.input-field:focus {
    border-color: var(--btn-black);
    outline: none;
}

.nip-container {
    display: flex;
    gap: 10px;
}

.nip-prefix-box {
    width: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f1f5f9;
    color: #64748b;
    font-weight: 600;
    border: 1px solid var(--border-color);
    border-radius: var(--input-radius);
    font-size: 0.95rem;
    user-select: none;
}

/* NIP status indicator */
.nip-wrapper {
    position: relative;
    flex: 1;
}

.nip-status {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    font-weight: 600;
    display: none;
    align-items: center;
    gap: 5px;
    pointer-events: none;
}

.nip-status.loading {
    display: flex;
    color: #0ea5e9;
}

.nip-status.success {
    display: flex;
    color: #22c55e;
}

.nip-status.error {
    display: flex;
    color: #ef4444;
}

.nip-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid #e2e8f0;
    border-top: 2px solid #0ea5e9;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.form-row {
    display: flex;
    gap: 15px;
    width: 100%;
}

.col-half {
    flex: 1;
}

.col-third {
    flex: 1;
}

.col-2-3 {
    flex: 2;
}

select.input-field {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1.5rem center;
    background-size: 1em;
    cursor: pointer;
}

.checkbox-container {
    margin-top: 25px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.8rem;
    color: #334155;
    line-height: 1.5;
    cursor: pointer;
}

.checkbox-item input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #000;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
}

.checkbox-item a {
    color: #0f172a;
    text-decoration: underline;
    font-weight: 500;
}

.btn-primary {
    width: 100%;
    height: 52px;
    border: none;
    border-radius: var(--input-radius);
    background-color: #0a101f;
    color: white;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    margin-top: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: opacity 0.2s;
}

.btn-primary:hover {
    opacity: 0.9;
}

.toggle-password {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    background: none;
    border: none;
    opacity: 0.6;
    padding: 0;
    display: flex;
    align-items: center;
}

.toggle-password:hover {
    opacity: 1;
}

.toggle-password img {
    width: 20px;
    height: 20px;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 25px 0;
    color: #64748b;
    font-size: 0.85rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e2e8f0;
}

.divider span {
    padding: 0 15px;
}

.social-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
}

.social-btn {
    background-color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid #f1f5f9;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.1s;
}

.social-btn:hover {
    transform: scale(1.05);
}

.signup-link {
    text-align: center;
    font-size: 0.85rem;
    color: #121212;
    margin-top: 10px;
}

#error-container,
#success-container {
    padding: 10px;
    border-radius: 10px;
    font-size: 0.9rem;
    margin-bottom: 20px;
    text-align: center;
    display: none;
}

#error-container {
    color: #ef4444;
    background-color: #fef2f2;
}

#success-container {
    color: #059669;
    background-color: #d1fae5;
}

.verification-code-group {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 20px 0;
}

.code-input {
    width: 50px;
    height: 55px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

/* Autofill highlight animation */
@keyframes autofillPulse {
    0% {
        background-color: #ecfeff;
    }

    100% {
        background-color: #fff;
    }
}

.autofilled {
    animation: autofillPulse 1.5s ease-out forwards;
}

@media (max-width: 900px) {
    .auth-card {
        flex-direction: column;
        max-width: 500px;
    }

    .auth-card.centered-mode {
        max-width: 500px;
    }

    .left-panel {
        width: 100%;
        height: 180px;
        min-height: 180px;
    }

    .right-panel {
        width: 100%;
        padding: 40px 25px;
    }

    .form-row {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 450px) {
    .verification-code-group {
        gap: 4px;
    }

    .code-input {
        width: 36px;
        height: 45px;
        font-size: 1.1rem;
        border-radius: 8px;
    }

    .auth-card.centered-mode .right-panel {
        padding: 30px 15px;
    }
}