@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --auth-primary: #e9621c;
    --auth-secondary: #0066b2;
    --auth-bg-light: #f8fafc;
    --auth-card-bg: #ffffff;
    --auth-text-main: #1e293b;
    --auth-text-muted: #64748b;
    --auth-border: #e2e8f0;
    --auth-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --auth-radius: 16px;
}

.auth-page {
    min-height: 100vh;
    background-color: var(--auth-bg-light);
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--auth-text-main);
    overflow-x: hidden;
}

.auth-row {
    min-height: 100vh;
    margin: 0;
}

/* Sidebar Styling */
.auth-sidebar {
    background: linear-gradient(135deg, var(--auth-secondary) 0%, #004a82 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    color: white;
}

.auth-sidebar::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    top: -100px;
    right: -100px;
}

.auth-sidebar::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
    bottom: -50px;
    left: -50px;
}

.auth-sidebar-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 400px;
}

.auth-sidebar-img {
    width: 80%;
    max-width: 300px;
    margin-bottom: 2rem;
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.2));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

.auth-sidebar h2 {
    font-weight: 800;
    font-size: 2rem;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.auth-sidebar p {
    font-size: 0.95rem;
    opacity: 0.9;
    font-weight: 400;
    line-height: 1.5;
}

/* Form Container Styling */
.auth-form-container {
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: white;
}

.auth-card {
    width: 100%;
    max-width: 550px;
}

.auth-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.auth-header h1 {
    font-weight: 800;
    font-size: 1.75rem;
    color: var(--auth-text-main);
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
}

.auth-header p {
    color: var(--auth-text-muted);
    font-size: 0.9rem;
}

/* Tabs Styling */
.auth-tabs {
    background: #f1f5f9;
    padding: 6px;
    border-radius: 12px;
    display: flex;
    gap: 4px;
    margin-bottom: 2rem;
}

.auth-tab-item {
    flex: 1;
}

.auth-tab-btn {
    width: 100%;
    padding: 10px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--auth-text-muted);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-tab-btn.active {
    background: white;
    color: var(--auth-secondary);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Form Controls */
.auth-form-group {
    margin-bottom: 1rem;
}

.auth-label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--auth-text-main);
}

.auth-input-wrapper {
    position: relative;
}

.auth-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--auth-text-muted);
    pointer-events: none;
}

.auth-input {
    width: 100%;
    padding: 10px 14px;
    background: #f8fafc;
    border: 1.5px solid var(--auth-border);
    border-radius: 10px;
    font-size: 0.9rem;
    transition: all 0.2s;
    color: var(--auth-text-main);
}

.auth-input:focus {
    outline: none;
    border-color: var(--auth-secondary);
    background: white;
    box-shadow: 0 0 0 4px rgba(0, 102, 178, 0.1);
}

.auth-input.is-invalid {
    border-color: #ef4444;
}

.auth-input.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--auth-text-muted);
    background: none;
    border: none;
    padding: 0;
}

/* Custom Select */
.auth-select-wrapper {
    display: flex;
    gap: 8px;
}

.auth-select {
    min-width: 120px;
    padding: 12px 16px;
    background: #f8fafc;
    border: 1.5px solid var(--auth-border);
    border-radius: 12px;
    font-size: 0.95rem;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

/* Captcha Styling */
.captcha-box {
    display: flex;
    align-items: stretch;
    gap: 12px;
    background: #f8fafc;
    padding: 8px;
    border-radius: 12px;
    border: 1.5px solid var(--auth-border);
}

.captcha-img-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.captcha-img-container img {
    height: 40px;
    width: auto;
}

.captcha-reload {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    background: white;
    border: 1px solid var(--auth-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.captcha-reload:hover {
    background: #f1f5f9;
    color: var(--auth-secondary);
}

/* Checkbox Styling */
.auth-checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 1.5rem 0;
}

.auth-checkbox {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 1.5px solid var(--auth-border);
    cursor: pointer;
    accent-color: var(--auth-secondary);
    margin-top: 2px;
}

.auth-checkbox-label {
    font-size: 0.9rem;
    color: var(--auth-text-muted);
}

.auth-checkbox-label a {
    color: var(--auth-secondary);
    font-weight: 600;
}

/* Button Styling */
.auth-btn-primary {
    width: 100%;
    padding: 12px;
    background: var(--auth-secondary);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.auth-btn-primary:hover {
    background: #005696;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 102, 178, 0.3);
}

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

.auth-btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    color: var(--auth-text-muted);
    font-size: 0.95rem;
}

.auth-footer a {
    color: var(--auth-secondary);
    font-weight: 700;
}

/* Error Messages */
.error-msg {
    color: #ef4444;
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 4px;
    display: block;
}

/* OTP Modal Improvements */
.modal-content.auth-modal {
    border-radius: 24px;
    border: none;
    padding: 1rem;
}

.otp-inputs {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 2rem 0;
}

.otp-box {
    width: 50px;
    height: 60px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    background: #f8fafc;
    border: 2px solid var(--auth-border);
    border-radius: 12px;
    transition: all 0.2s;
}

.otp-box:focus {
    border-color: var(--auth-secondary);
    background: white;
    box-shadow: 0 0 0 4px rgba(0, 102, 178, 0.1);
    outline: none;
}

.otp-resend {
    margin-top: 0.5rem;
}

.otp-resend-btn {
    background: none;
    border: none;
    color: var(--auth-secondary);
    font-weight: 700;
    font-size: 0.875rem;
    padding: 0;
    margin-left: 4px;
    cursor: pointer;
}

.otp-resend-btn:disabled {
    color: var(--auth-text-muted);
    cursor: not-allowed;
    font-weight: 500;
}

.otp-resend-msg {
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 0.5rem;
    min-height: 1.25rem;
}

.otp-resend-msg.success {
    color: #16a34a;
}

.otp-resend-msg.error {
    color: #ef4444;
}

/* Responsiveness */
@media (max-width: 768px) {
    .auth-sidebar {
        display: none;
    }
    .auth-form-container {
        padding: 2rem 1rem;
    }
    .auth-card {
        max-width: 100%;
    }
}
