/* Auth Container - centered with premium glow */
.auth-container {
    position: relative;
    min-height: calc(100vh - 120px);
    display: flex;
    /* align-items: center; */
    justify-content: center;
    /* padding: 2rem 1.5rem; */
    /* overflow: hidden; */
}

/* Soft diagonal halo behind the card */
.auth-container::before {
    content: '';
    position: absolute;
    inset: -30%;
    background:
        radial-gradient(circle at 20% 0%,
            rgba(38, 80, 119, 0.18), transparent 55%),
        radial-gradient(circle at 80% 100%,
            rgba(2, 33, 64, 0.22), transparent 55%);
    opacity: 0.7;
    pointer-events: none;
    z-index: 0;
}

/* Subtle vertical glow strip */
.auth-container::after {
    content: '';
    position: absolute;
    width: 40%;
    height: 140%;
    left: 30%;
    top: -20%;
    background: linear-gradient(180deg,
            rgba(248, 249, 250, 0),
            rgba(38, 80, 119, 0.12),
            rgba(248, 249, 250, 0));
    filter: blur(32px);
    opacity: 0.6;
    pointer-events: none;
    z-index: 0;
}

/* Auth card sits above the effects */
.auth-panel {
    position: relative;
    z-index: 1;
    max-width: 420px;
    width: 100%;
    background: linear-gradient(145deg,
            #ffffff 0%,
            rgba(248, 249, 250, 0.96) 40%,
            rgba(2, 33, 64, 0.03) 100%);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    border: 1px solid var(--color-border-subtle);
    box-shadow:
        0 24px 45px rgba(2, 33, 64, 0.28),
        0 0 0 1px rgba(232, 234, 237, 0.9);
}

/* Mobile tweaks */
@media (max-width: 480px) {
    .auth-panel {
        padding: 1.5rem;
        border-radius: var(--radius-base);
    }
}

.panel-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--color-primary-dark);
}

.panel-subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary-dark);
    cursor: pointer;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-base);
    font-size: 1rem;
    background: var(--bg-primary);
    color: var(--text-primary-dark);
    transition: var(--transition);
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: var(--text-primary-dark);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.form-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.password-wrapper {
    position: relative;
}

/* Button Styling */
.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    cursor: pointer;
    color: #888;
    padding: 6px;
    border-radius: 50%;
    transition: all 0.25s ease;
}

/* Hover Effect */
.toggle-password:hover {
    color: var(--color-primary-dark);
    /* background: rgba(0,0,0,0.05); */
    /* transform: translateY(-50%) scale(1.1); */
}

/* Active (Password Visible) */
.toggle-password.active {
    color: var(--color-primary-slate);
    /* background: rgba(13, 110, 253, 0.1); */
}

/* Icon Animation */
.eye-icon {
    transition: transform 0.3s ease;
}

.toggle-password:active .eye-icon {
    transform: scale(0.85);
}

/* Tooltip */
.toggle-password::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 130%;
    right: 50%;
    transform: translateX(50%) translateY(5px);
    background: #222;
    color: #fff;
    font-size: 12px;
    padding: 5px 8px;
    border-radius: 5px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
}

/* Tooltip Arrow */
.toggle-password::before {
    content: "";
    position: absolute;
    bottom: 115%;
    right: 50%;
    transform: translateX(50%);
    border: 5px solid transparent;
    border-top-color: #222;
    opacity: 0;
    transition: all 0.2s ease;
}

/* Show Tooltip */
.toggle-password:hover::after,
.toggle-password:hover::before {
    opacity: 1;
    transform: translateX(50%) translateY(0);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--text-primary-dark);
}

.checkbox-label {
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
    user-select: none;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--color-primary-dark);
}

.form-link {
    color: var(--text-primary-dark);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.form-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Button Styles */
.auth-btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: var(--radius-base);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--gradient-primary);
}

.auth-btn {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.auth-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.auth-btn:active:not(:disabled) {
    transform: translateY(0);
}

.btn-danger {
    background: rgba(192, 21, 47, 0.1);
    color: var(--color-error);
    border: 1px solid rgba(192, 21, 47, 0.3);
}

.btn-danger:hover:not(:disabled) {
    background: rgba(192, 21, 47, 0.15);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Social Login */
.social-login {
    margin-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.social-title {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.social-buttons {
    display: grid;
    gap: 1rem;
}

.social-btn {
    width: 100%;
    padding: var(--space-12);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-base);
    background: var(--color-surface);
    color: var(--color-slate-900);
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-8);
    font-size: var(--font-size-sm);
}

.social-btn:hover {
    border-color: var(--color-primary-slate);
    background: var(--color-surface-muted);
}


/* Message Styles */
.message {
    padding: 1rem;
    text-align: center;
    border-radius: var(--radius-base);
    margin-bottom: 1.5rem;
    display: none;
    animation: slideIn 0.3s ease-out;
}

.message.show {
    display: block;
}

.message.success {
    background: rgba(39, 174, 96, 0.1);
    color: var(--color-success);
    border-left: 4px solid var(--color-success);
}

.message.message-error {
    background: rgba(192, 21, 47, 0.1);
    color: var(--color-error);
    border-left: 4px solid var(--color-error);
}

.message.info {
    background: rgba(52, 152, 219, 0.1);
    color: var(--color-info);
    border-left: 4px solid var(--color-info);
}

.error-text {
    color: var(--color-error);
    font-size: 13px;
    margin-top: 4px;
    display: block;
}

.required-star {
    color: red;
    font-weight: bold;
    margin-left: 4px;
}

.optional-text {
    color: #888;
    font-size: 12px;
    margin-left: 5px;
}

/* Tab Navigation */
.tab-container {
    display: flex;
    gap: 0;
    margin-bottom: var(--space-24);
    border-bottom: 1px solid var(--color-border-subtle);
}

.tab {
    padding: var(--space-16) var(--space-24);
    background: none;
    border: none;
    cursor: pointer;
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-secondary);
    transition: var(--transition);
    position: relative;
    font-size: var(--font-size-base);
}

.tab.active {
    color: var(--color-primary-slate);
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-primary-slate);
}

.tab:hover {
    color: var(--color-primary-dark);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

/* -----------------------------
🔥 Auth-Box
----------------------------- */
.auth-box {
    background: #ffffff;
    padding: 40px 30px;
    border-radius: 12px;
    text-align: center;
    max-width: 400px;
    width: 100%;

    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    animation: fadeIn 0.4s ease-in-out;
}

/* -----------------------------
🔥 Box OTP
----------------------------- */
.otp-boxes {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}

/* Container */
.otp-container {
    text-align: center;
    max-width: 400px;
    margin: auto;
}

/* Email text */
.otp-email {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.otp-input {
    width: 50px;
    height: 55px;
    font-size: 20px;
    text-align: center;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-gray-300);
    outline: none;
    transition: 0.2s;
    background: #f9f9f9;
}

.otp-input:focus {
    border-color: var(--text-primary-dark);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
    transform: scale(1.05);
}

/* 🔥 TIMER */
.timer-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 20px auto;
}

.timer-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

/* Circular progress */
.progress-ring__circle {
    stroke: var(--color-primary-dark);
    stroke-dasharray: 314;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear;
}

/* 🔥 BUTTON */
#resendBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 🔥 SHAKE ERROR */
.shake {
    animation: shake 0.3s;
}

@keyframes shake {
    0% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    50% {
        transform: translateX(5px);
    }

    75% {
        transform: translateX(-5px);
    }

    100% {
        transform: translateX(0);
    }
}

#timer {
    text-align: center;
}

/* 🔥 Smooth pulse animation */
@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .header-content {
        gap: 1rem;
        flex-wrap: wrap;
    }

    .social-buttons {
        grid-template-columns: 1fr;
    }

    .panel-title {
        font-size: 1.5rem;
    }

    .main-content {
        padding: 1.5rem 1rem;
    }
   
}

@media (max-width: 480px) {
    .header {
        padding: 1rem;
    }

    .logo {
        font-size: 1.25rem;
    }

    .logo-icon {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }

    .auth-panel {
        border-radius: var(--radius-base);
    }

    .form-input {
        font-size: 16px;
    }

    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }

    .tab {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

/* Loading State */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--color-border-subtle);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

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

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-secondary {
    color: var(--text-secondary);
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.hidden {
    display: none;
}