/* static/css/login.css */
:root {
    --primary-color: #FF6B00;
    --primary-dark: #FFC107;
    --primary-light: #fdebd0;
    --secondary-color: #3498db;
    --secondary-light: #d6eaf8;
    --dark-color: #2c3e50;
    --dark-light: #5d6d7e;
    --light-color: #ecf0f1;
    --danger-color: #e74c3c;
    --success-color: #2ecc71;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.1), 0 6px 6px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 15px 25px rgba(0, 0, 0, 0.15), 0 5px 10px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Tajawal', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    margin: 0;
    height: fit-content;
    padding: 30px;
    color: var(--dark-color);
    line-height: 1.6;
}

.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    padding: 20px;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.auth-wrapper {
    width: 100%;
    max-width: 450px;
    transition: var(--transition);
}

.auth-card {
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow-xl);
    padding: 40px;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.auth-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
}

.logo-container {
    margin-bottom: 30px;
    transition: var(--transition);
}

.logo {
    max-width: 180px;
    height: auto;
    transition: var(--transition);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.logo:hover {
    transform: scale(1.05);
}

.auth-title {
    color: var(--dark-color);
    font-weight: 700;
    margin-bottom: 10px;
    font-size: 28px;
    position: relative;
    display: inline-block;
}

.auth-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
}

.auth-subtitle {
    color: var(--dark-light);
    margin-bottom: 30px;
    font-size: 16px;
}

.auth-form .form-group {
    margin-bottom: 20px;
    text-align: right;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-color);
    transition: var(--transition);
}

.input-group {
    margin-bottom: 5px;
    border-radius: 8px;
    transition: var(--transition);
    /*box-shadow: var(--shadow-sm);*/
}

.input-group:focus-within {
    box-shadow: 0 0 0 2px rgba(243, 156, 18, 0.3);
}

.input-group-text {
    background-color: var(--light-color);
    border: 1px solid #ddd;
    color: var(--dark-light);
    transition: var(--transition);
}

.input-group:focus-within .input-group-text {
    color: var(--primary-color);
    background-color: var(--primary-light);
}

.form-control {
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid #ddd;
    transition: var(--transition);
    background-color: #fff;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: none;
}

.form-control::placeholder {
    color: #bdc3c7;
    font-size: 14px;
}

.auth-btn {
    background-color: var(--primary-color);
    border: none;
    color: white;
    padding: 14px;
    width: 100%;
    border-radius: 8px;
    font-weight: 600;
    margin-top: 20px;
    transition: var(--transition);
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.auth-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.auth-btn:active {
    transform: translateY(0);
}

.auth-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.auth-btn:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }

    100% {
        transform: scale(20, 20);
        opacity: 0;
    }
}

.auth-footer {
    margin-top: 25px;
    font-size: 14px;
}

.iti {
    width: 100%;
    margin: 0px;
}

.iti__country-list {
    width: -webkit-fill-available !important;
    right: -276px !important;
    left: 11px !important;
}

#username {
    padding-right: 15px !important;
    padding-left: 97px !important;
    text-align: right;
}

.iti__flag-container {
    left: 0 !important;
    right: auto !important;
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
    position: relative;
}

.auth-footer a:hover {
    color: var(--primary-dark);
}

.auth-footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--primary-dark);
    transition: var(--transition);
}

.auth-footer a:hover::after {
    width: 100%;
}

.forgot-password {
    display: block;
    margin-top: 10px;
    color: var(--secondary-color);
}

.forgot-password:hover {
    color: var(--secondary-color);
    text-decoration: none;
}

/* Modal enhancements */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: var(--shadow-xl);
}

.modal-header {
    border-bottom: none;
    padding-bottom: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-radius: 15px 15px 0 0 !important;
}

.modal-title {
    font-weight: 700;
    color: white;
}

.modal-body {
    padding: 25px;
}

/* Form validation styles */
.is-invalid {
    border-color: var(--danger-color) !important;
}

.is-valid {
    border-color: var(--success-color) !important;
}

.invalid-feedback {
    text-align: right;
    font-size: 13px;
    margin-top: 5px;
    color: var(--danger-color);
}

/* Password strength meter */
.password-strength {
    height: 4px;
    background: #eee;
    margin-top: 5px;
    border-radius: 2px;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    width: 0;
    background: #e74c3c;
    transition: var(--transition);
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .auth-card {
        padding: 30px 20px;
    }

    .logo {
        max-width: 150px;
    }

    .auth-title {
        font-size: 24px;
    }

    .auth-subtitle {
        font-size: 14px;
    }
}

/* Password toggle button */
#togglePassword {
    cursor: pointer;
    background: transparent;
    border: 1px solid #ddd;
    transition: var(--transition);
}

#togglePassword:hover {
    background-color: var(--light-color);
}

#eyeIcon {
    color: var(--dark-light);
    transition: var(--transition);
}

#togglePassword:hover #eyeIcon {
    color: var(--primary-color);
}

/* Loading spinner */
.spinner-border {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
    display: inline-block;
    vertical-align: text-bottom;
}

/* Floating labels effect */
.floating-label-group {
    position: relative;
    margin-bottom: 20px;
}

.floating-label {
    position: absolute;
    top: 12px;
    right: 15px;
    color: #7f8c8d;
    transition: var(--transition);
    pointer-events: none;
    background: white;
    padding: 0 5px;
}

.form-control:focus+.floating-label,
.form-control:not(:placeholder-shown)+.floating-label {
    top: -8px;
    right: 10px;
    font-size: 12px;
    color: var(--primary-color);
}

/* Social login buttons */
.social-login {
    margin: 20px 0;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 10px;
    color: white;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: white;
}

.social-btn i {
    margin-left: 10px;
    font-size: 18px;
}

.social-btn.facebook {
    background-color: #3b5998;
}

.social-btn.google {
    background-color: #db4437;
}

.social-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: #7f8c8d;
}

.social-divider::before,
.social-divider::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid #ddd;
}

.social-divider::before {
    margin-left: 10px;
}

.social-divider::after {
    margin-right: 10px;
}

/* Animated background for premium feel */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.05) 0%, rgba(52, 152, 219, 0.05) 100%);
    z-index: -1;
}

/* Pulse animation for important elements */
@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.03);
    }

    100% {
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Tooltip styles */
.tooltip-inner {
    background-color: var(--dark-color);
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 12px;
}

.bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow::before,
.bs-tooltip-top .tooltip-arrow::before {
    border-top-color: var(--dark-color);
}

/* Custom checkbox */
.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-dark);
}

.form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(243, 156, 18, 0.25);
}

/* Alert enhancements */
.alert {
    border-radius: 8px;
    border-left-width: 5px;
}

.alert-dismissible .btn-close {
    padding: 0.75rem;
}

/* Language switcher */
.language-switcher {
    position: absolute;
    top: 20px;
    left: 20px;
}

.language-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 20px;
    padding: 5px 15px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.language-btn:hover {
    background: white;
    box-shadow: var(--shadow-md);
}

/* Dark mode toggle */
.dark-mode-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

/* Terms checkbox styling */
.terms-check {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}

.terms-check input {
    margin-top: 3px;
    margin-left: 10px;
}

/* Password requirements list */
.password-requirements {
    text-align: right;
    font-size: 13px;
    color: var(--dark-light);
    margin-top: 5px;
}

.password-requirements ul {
    padding-right: 20px;
    margin-bottom: 0;
}

.password-requirements li {
    margin-bottom: 3px;
    position: relative;
}

.password-requirements li::before {
    content: "•";
    position: absolute;
    right: -15px;
}

.password-requirements li.valid {
    color: var(--success-color);
}

.password-requirements li.invalid {
    color: var(--danger-color);
}