/* ============================================
   AUTH PAGE STYLES
   ============================================ */

:root {
    --primary-color: #0aa026;
    --primary-dark: #088a1f;
    --primary-light: #0dcaf0;
    --secondary-color: #064663;
    --bg-dark: #0f1419;
    --bg-darker: #041c32;
    --text-light: rgba(255, 255, 255, 0.9);
    --text-muted: rgba(255, 255, 255, 0.6);
    --border-color: rgba(10, 160, 38, 0.2);
    --error-color: #dc3545;
    --success-color: #0aa026;
}

/* ============================================
   AUTH HERO SECTION
   ============================================ */

.auth-hero {
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--secondary-color) 100%);
    padding: 60px 20px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.auth-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(10, 160, 38, 0.2);
}

.auth-hero p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin: 0;
}

@media (max-width: 768px) {
    .auth-hero {
        padding: 40px 15px;
    }

    .auth-hero h1 {
        font-size: 1.8rem;
    }

    .auth-hero p {
        font-size: 1rem;
    }
}

/* ============================================
   AUTH HEADER (inline with section)
   ============================================ */

.auth-header {
    text-align: center;
    margin-bottom: 30px;
    display: none;
}

.auth-header.active {
    display: block;
}

.auth-header-login {
    display: block;
}

.auth-header-register {
    display: none;
}

.auth-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
}

.auth-header p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin: 0;
    font-weight: 500;
}

@media (max-width: 768px) {
    .auth-header h1 {
        font-size: 1.5rem;
        margin-bottom: 6px;
    }

    .auth-header p {
        font-size: 0.9rem;
    }
}

/* ============================================
   AUTH SECTION
   ============================================ */

.auth-section {
    padding: 20px;
    min-height: calc(100vh - 300px);
    margin-top: 40px;
}

/* ============================================
   AUTH TABS
   ============================================ */

.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    background:#041c32;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 8px;
    overflow: hidden;
}

.auth-tab-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
    min-width: 0;
}

.auth-tab-btn:hover:not(.active) {
    color: var(--text-light);
    background: rgba(255, 255, 255, 0.05);
}

.auth-tab-btn.active {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 15px rgba(10, 160, 38, 0.3);
}

.auth-tab-btn i {
    font-size: 1.1rem;
}

@media (max-width: 576px) {
    .auth-tabs {
        flex-wrap: wrap;
    }

    .auth-tab-btn {
        flex: 1 1 calc(50% - 5px);
        min-width: 120px;
    }
}

/* ============================================
   AUTH CARDS
   ============================================ */

.auth-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(10, 160, 38, 0.05) 100%);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.auth-card h2 {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 10px;
}

.auth-card p {
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 1rem;
    font-weight: 500;
}

@media (max-width: 768px) {
    .auth-card {
        padding: 30px 20px;
    }

    .auth-card h2 {
        font-size: 1.5rem;
    }
}

/* ============================================
   TAB CONTENT
   ============================================ */

.auth-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.auth-tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   FORM GROUPS
   ============================================ */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-light);
    font-weight: 700;
    font-size: 1rem;
}

.form-group .input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.form-group .input-wrapper > i:not(.password-toggle) {
    position: absolute;
    left: 15px;
    color: var(--primary-color);
    font-size: 1.1rem;
    pointer-events: none;
}

.form-control {
    width: 100%;
    padding: 12px 15px 12px 45px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-light);
    font-size: 1.05rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(10, 160, 38, 0.2);
}

.form-control.is-valid {
    border-color: var(--success-color);
    background: rgba(10, 160, 38, 0.05);
}

.form-control.is-invalid {
    border-color: var(--error-color);
    background: rgba(220, 53, 69, 0.05);
}

/* ============================================
   FORM ROW (for side-by-side fields)
   ============================================ */

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 576px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   PASSWORD TOGGLE
   ============================================ */

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.3s ease;
    font-size: 1.1rem;
    z-index: 10;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: var(--primary-color);
}

/* ============================================
   LOGIN TYPE TOGGLE
   ============================================ */

.login-type-toggle {
    display: flex;
    gap: 0;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 3px;
    margin-bottom: 25px;
    margin-top: 0;
    overflow: hidden;
}

.toggle-option-login {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}

.toggle-option-login.active {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 2px 8px rgba(10, 160, 38, 0.3);
}

.toggle-option-login:hover:not(.active) {
    color: var(--text-light);
}

/* ============================================
   FORM FOOTER
   ============================================ */

.form-footer {
    margin: 15px 0 25px;
    text-align: right;
}

.link-primary {
    color: var(--primary-light);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.link-primary:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn-auth {
    width: 100%;
    padding: 12px 20px;
    background: var(--primary-color);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-auth:hover {
    background: var(--primary-dark);
    box-shadow: 0 6px 20px rgba(10, 160, 38, 0.3);
    transform: translateY(-2px);
}

.btn-auth:active {
    transform: translateY(0);
}

.btn-auth.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-auth i {
    font-size: 1.1rem;
}

/* ============================================
   AUTH DIVIDER
   ============================================ */

.auth-divider {
    margin: 30px 0;
    display: flex;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.auth-divider span {
    padding: 0 15px;
}

/* ============================================
   AUTH SWITCH
   ============================================ */

.auth-switch {
    text-align: center;
    color: var(--text-muted);
    margin: 0;
}

.auth-switch a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.auth-switch a:hover {
    color: var(--primary-color);
}

/* ============================================
   TERMS CHECKBOX
   ============================================ */

.terms-checkbox {
    margin-bottom: 25px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
    flex-shrink: 0;
    line-height: 1;
}

.checkbox-label a {
    color: var(--primary-light);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: inherit;
}

.checkbox-label a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* ============================================
   ERROR MESSAGES
   ============================================ */

#error-messages {
    margin-bottom: 25px;
}

.alert {
    padding: 16px;
    border-radius: 12px;
    border: 1px solid;
    margin-bottom: 15px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    border-color: rgba(220, 53, 69, 0.3);
    color: #ff6b6b;
}

.alert-info {
    background: rgba(13, 202, 240, 0.1);
    border-color: rgba(13, 202, 240, 0.3);
    color: var(--primary-light);
}

.alert-success {
    background: rgba(10, 160, 38, 0.1);
    border-color: rgba(10, 160, 38, 0.3);
    color: var(--primary-color);
}

.alert i {
    margin-right: 8px;
}

.alert ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.alert ul li {
    padding: 4px 0;
}

/* ============================================
   PHONE INPUT SPECIFIC
   ============================================ */

.phone-input-wrapper {
    position: relative;
}

.iti {
    width: 100%;
}

.iti__country-list {
    background: var(--bg-darker) !important;
    border: 1px solid var(--border-color) !important;
}

.iti__country {
    color: var(--text-light) !important;
}

.iti__country:hover,
.iti__country.iti__highlight {
    background-color: rgba(10, 160, 38, 0.2) !important;
}

.iti__country-name,
.iti__dial-code {
    color: var(--text-light) !important;
}

.iti__input {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-light) !important;
    font-size: 1rem !important;
    padding: 12px 15px 12px 45px !important;
}

.iti__input:focus {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 15px rgba(10, 160, 38, 0.2) !important;
}

.iti__flag {
    background-image: url('https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.8/img/flags.png') !important;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1200px) {
    .auth-section .container {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .auth-section {
        padding: 30px 15px;
    }

    .auth-card {
        padding: 25px 15px;
    }

    .form-control {
        font-size: 16px; /* Prevents zoom on mobile */
    }

    .btn-auth {
        padding: 10px 16px;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .auth-hero {
        padding: 30px 15px;
        margin-bottom: 30px;
    }

    .auth-hero h1 {
        font-size: 1.5rem;
    }

    .auth-hero p {
        font-size: 0.9rem;
    }

    .auth-card {
        border-radius: 12px;
        padding: 20px 15px;
    }

    .auth-card h2 {
        font-size: 1.3rem;
    }

    .form-group label {
        font-size: 0.85rem;
    }

    .form-control {
        padding: 10px 12px 10px 40px;
        font-size: 16px;
    }

    .form-group .input-wrapper i {
        left: 12px;
        font-size: 1rem;
    }

    .password-toggle {
        right: 12px;
    }

    .auth-divider {
        margin: 20px 0;
    }

    .checkbox-label {
        font-size: 0.85rem;
    }
}

/* ============================================
   LIGHT MODE STYLES
   ============================================ */

body.light {
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
}

body.light .auth-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
}

body.light .auth-header {
    background: #0e2434;
    padding: 30px 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

body.light .auth-header h1 {
    color: #fff;
    text-shadow: none;
}

body.light .auth-header p {
    color: #fff;
}

body.light .auth-tabs {
    background: var(--bg-darker);
    border: 1px solid rgba(10, 160, 38, 0.3);
}

body.light .auth-tab-btn {
    color: #fff;
}

body.light .auth-tab-btn:hover:not(.active) {
    color: #1a1a1a;
    background: rgba(0, 0, 0, 0.08);
}

body.light .auth-tab-btn.active {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 15px rgba(10, 160, 38, 0.3);
}

body.light .auth-card {
    background:#0e2434;
    border: 1px solid rgba(10, 160, 38, 0.2);
    box-shadow: 0 8px 32px rgba(15, 59, 125, 0.2);
}

body.light .auth-card h2 {
    color: #fff;
}

body.light .auth-card p {
    color: #fff;
}

body.light .form-group label {
    color: #fff;
}

body.light .form-control {
    background: rgba(255, 255, 255, 0.7);
    border: 1.5px solid rgba(10, 160, 38, 0.2);
    color: #1a1a1a;
}

body.light .form-control::placeholder {
    color: #999;
}

body.light .form-control:focus {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(10, 160, 38, 0.25);
}

body.light .form-control.is-valid {
    border-color: var(--success-color);
    background: rgba(10, 160, 38, 0.08);
}

body.light .form-control.is-invalid {
    border-color: var(--error-color);
    background: rgba(220, 53, 69, 0.08);
}

body.light .form-group .input-wrapper > i:not(.password-toggle) {
    color: var(--primary-color);
}

body.light .password-toggle {
    color: #666;
    cursor: pointer;
}

body.light .password-toggle:hover {
    color: var(--primary-color);
}

body.light .login-type-toggle {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(10, 160, 38, 0.2);
}

body.light .toggle-option-login {
    color: #fff;
}

body.light .toggle-option-login.active {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 2px 8px rgba(10, 160, 38, 0.25);
}

body.light .btn-auth {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: #fff;
    border: none;
    box-shadow: 0 4px 15px rgba(10, 160, 38, 0.2);
}

body.light .btn-auth:hover {
    box-shadow: 0 6px 20px rgba(10, 160, 38, 0.3);
    transform: translateY(-2px);
}

body.light .btn-auth:disabled {
    opacity: 0.6;
    box-shadow: none;
}

body.light .auth-switch a {
    color: #fff;
}

body.light .form-check-input {
    background: rgba(255, 255, 255, 0.8);
    border: 1.5px solid rgba(10, 160, 38, 0.2);
}

body.light .form-check-input:checked {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

body.light .form-check-label {
    color: #555;
}

body.light a {
    color: var(--primary-color);
    text-decoration: none;
}

body.light a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

body.light .alert {
    border-radius: 10px;
}

body.light .alert-info {
    background: rgba(13, 202, 240, 0.1);
    border: 1px solid rgba(13, 202, 240, 0.3);
    color: #0c5a73;
}

body.light .alert-success {
    background: rgba(10, 160, 38, 0.1);
    border: 1px solid rgba(10, 160, 38, 0.3);
    color: #055a10;
}

body.light .alert-danger {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #842029;
}

body.light .alert-warning {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    color: #664d03;
}

body.light .error-message {
    color: var(--error-color);
}

body.light .success-message {
    color: var(--success-color);
}

body.light .form-text {
    color: #666;
}

body.light .spinner-border {
    border-color: rgba(10, 160, 38, 0.3);
    border-right-color: var(--primary-color);
}

body.light .text-muted {
    color: #888 !important;
}

body.light hr {
    border-color: rgba(10, 160, 38, 0.15);
}

/* ============================================
   ANIMATIONS & TRANSITIONS
   ============================================ */

.form-control,
.btn-auth,
.auth-tab-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
