/* Authentication Page Styles */
/* Place this file in public/css/auth.css */
.auth-body {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding: 20px;
}
html, body{
    overflow: auto;
}

/* RTL specific font support */
[dir="rtl"] .auth-body {
    font-family: 'Baloo Bhaijaan 2', sans-serif;
}

.auth-container {
    width: 100%;
    max-width: 480px;
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.auth-header {
    padding: 40px 40px 0;
    text-align: center;
}

.auth-toggle {
    display: inline-flex;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 10px;
    position: relative;
}

.auth-toggle::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: #4064dd;
    border-radius: 2px;
}

.toggle-btn {
    padding: 12px 32px;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    text-decoration: none;
}

/* RTL adjustments for toggle buttons */
[dir="rtl"] .toggle-btn {
    text-transform: none;
}

.toggle-btn:hover {
    color: #cbd5e1;
    text-decoration: none;
}

.toggle-btn.active {
    color: white;
    background: var(--bs-primary);
    box-shadow: 0 4px 12px rgba(90, 128, 255, 0.3);
}

.auth-content {
    padding: 30px 40px 40px;
}

.form-floating {
    margin-bottom: 0.5rem;
}

.form-floating input {
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(10px);
    color: #e2e8f0;
    border-radius: 12px;
    height: 56px;
    padding-top: 24px;
    font-size: 15px;
    transition: all 0.3s ease;
}

/* RTL input adjustments */
[dir="rtl"] .form-floating input {
    text-align: right;
}

.form-floating input:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(90, 128, 255, 0.1);
    background: rgba(15, 23, 42, 0.7);
}

.form-floating label {
    padding: 16px 16px;
    color: #94a3b8;
    font-size: 14px;
}
.input-group-text{
    height: 58px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(10px);
    color: #e2e8f0;
}

/* RTL label adjustments */
[dir="rtl"] .form-floating label {
    right: 0;
    left: auto;
    transform-origin: right center;
}

[dir="rtl"] .form-floating input:focus~label,
[dir="rtl"] .form-floating input:not(:placeholder-shown)~label {
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    z-index: 10;
    padding: 4px;
    transition: color 0.3s ease;
}

/* RTL password toggle positioning */
[dir="rtl"] .password-toggle {
    right: auto;
    left: 16px;
}

.password-toggle:hover {
    color: var(--bs-primary);
}

.form-check {
    margin-bottom: 24px;
}

.form-check-input {
    width: 20px;
    height: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(15, 23, 42, 0.5);
    margin-top: 2px;
}

/* RTL checkbox adjustments */
[dir="rtl"] .form-check-input {
    margin-right: 0;
    margin-left: 0.5rem;
}

.form-check-input:checked {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.form-check-label {
    margin-left: 8px;
    color: #cbd5e1;
    font-size: 14px;
}

/* RTL checkbox label adjustments */
[dir="rtl"] .form-check-label {
    margin-left: 0;
    margin-right: 8px;
}

.btn-auth {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--bs-primary);
    background: rgba(var(--bs-primary-rgb), 0.2);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    color: white;
    box-shadow: 0 4px 15px rgba(90, 128, 255, 0.3);
    margin-bottom: 16px;
    & span{
        color: white;
    }
}

/* RTL button text adjustments */
[dir="rtl"] .btn-auth {
    text-transform: none;
}

.btn-auth:hover {
    transform: translateY(-2px);
    border: 1px solid var(--bs-primary);
    box-shadow: 0 6px 20px rgba(90, 128, 255, 0.4);
    background: rgba(var(--bs-primary-rgb), 0.3);
    color: white;
}

.forgot-link {
    display: block;
    text-align: center;
    color: var(--bs-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

.auth-divider {
    text-align: center;
    margin: 24px 0;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.auth-divider span {
    background: transparent;
    padding: 0 16px;
    color: #94a3b8;
    font-size: 13px;
    position: relative;
}

.social-login {
    display: flex;
    gap: 12px;
}

.social-btn {
    flex: 1;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    text-decoration: none !important;
    color: #e2e8f0;
    font-size: 18px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.social-btn:hover {
    border-color: var(--bs-primary);
    color: var(--bs-primary);
    background: rgba(15, 23, 42, 0.7);
    transform: translateY(-2px);
}

/* Error states */
.form-floating input.is-invalid {
    border-color: var(--bs-danger);
}

.form-floating input.is-invalid:focus {
    border-color: var(--bs-danger);
    box-shadow: 0 0 0 0.2rem rgba(239, 68, 68, 0.1);
}

.invalid-feedback {
    color: var(--bs-danger);
    font-size: 14px;
    margin-top: 5px;
}

/* RTL error message alignment */
[dir="rtl"] .invalid-feedback {
    text-align: right;
}

.phone-input-group {
    display: flex;
    align-items: stretch;
}

.country-select {
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-left: none;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(10px);
    color: #e2e8f0;
    border-radius: 0 12px 12px 0;
    padding: 0 12px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 110px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 12px center;
    padding-left: 35px;
    font-weight: 500;
}

[dir="rtl"] .country-select {
    background-position: right 12px center;
    padding-left: 12px;
    padding-right: 35px;
}

.country-select:focus {
    border-color: var(--bs-primary);
    background: rgba(15, 23, 42, 0.7);
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(90, 128, 255, 0.1);
}

.country-select option {
    padding: 10px;
    font-size: 15px;
    background: #1e293b;
    color: #e2e8f0;
}

.phone-input-group .form-floating {
    flex: 1;
    margin-bottom: 0;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: -0.25rem;
}

.row-cols-1 > * {
    flex: 0 0 100%;
    max-width: 100%;
}
.form-floating>.form-control-plaintext:-webkit-autofill, .form-floating>.form-control:-webkit-autofill + label{
    color: #393636 !important;
}
.form-control + label {
    color: #c6d2e4 !important;
}
.form-floating input:focus{
    color: #c6d2e4 !important;
}


@media (min-width: 768px) {
    .row-cols-md-2 > * {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (min-width: 420px) {
    .row-cols-sm-2 > * {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Responsive */
@media (max-width: 576px) {
    .auth-body {
        padding: 5px;
    }
    .auth-toggle {
        margin-bottom: 0;
    }
    .auth-divider {
        margin: 5px 0 10px 0;
    }
    .auth-header {
        padding: 10px 30px 0 30px;
    }
    .form-floating {
        margin-bottom: 0.5rem;
    }
    .auth-content {
        padding: 20px 8px 5px 8px;
    }
    .toggle-btn {
        padding: 10px 24px;
        font-size: 12px;
    }
}
