

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
}

@media (min-width: 768px) {
    body:not(.sidebar-mini-md):not(.sidebar-mini-xs):not(.layout-top-nav) .content-wrapper, body:not(.sidebar-mini-md):not(.sidebar-mini-xs):not(.layout-top-nav) .main-footer, body:not(.sidebar-mini-md):not(.sidebar-mini-xs):not(.layout-top-nav) .main-header {
        transition: margin-left 0.3s
        ease-in-out;
         margin-left: 0;
    }
}
/* Modern Form Inputs */
.form-modern {
    position: relative;
}

.form-modern input[type="text"],
.form-modern input[type="email"],
.form-modern input[type="password"],
.form-modern select,
.form-modern textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-dark);
    background-color: #ffffff;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    transition: var(--transition);
}

.form-modern input:focus,
.form-modern select:focus,
.form-modern textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(49, 106, 91, 0.1);
}

/* Modern Buttons */
.btn-modern {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.5;
    border-radius: 8px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    text-decoration: none;
}

.btn-modern-primary {
    background: var(--primary-gradient);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(49, 106, 91, 0.3);
}

.btn-modern-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(49, 106, 91, 0.4);
    color: #ffffff;
}

.btn-modern-outline {
    background: transparent;
    color: var(--primary-color);
    border: 1.5px solid var(--primary-color);
}

.btn-modern-outline:hover {
    background: var(--primary-color);
    color: #ffffff;
}

/* Modern Cards */
.card-modern {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: none;
    overflow: hidden;
    transition: var(--transition);
}

.card-modern:hover {
    box-shadow: var(--shadow-md);
}

.card-modern-header {
    background: var(--primary-gradient);
    color: #ffffff;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    font-weight: 600;
}

.card-modern-body {
    padding: 1.25rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-modern input,
    .form-modern select,
    .form-modern textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .btn-modern {
        width: 100%;
    }

    .card-modern-body {
        padding: 1rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-up {
    animation: slideUp 0.4s ease-out;
}

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

/* Loading State */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
}

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

/* Utility Classes */
.text-compact {
    font-size: 0.813rem;
}

.text-muted-modern {
    color: var(--text-gray);
}

.spacing-compact {
    margin-bottom: 0.875rem;
}

/* Focus Visible for Accessibility */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
#modern-register {
            min-height: 100vh;
            background: linear-gradient(135deg, #316A5B 0%, #A43135 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 2rem 0;
            position: relative;
            overflow: hidden;
        }

        #modern-register::before {
            content: '';
            position: absolute;
            width: 500px;
            height: 500px;
            background: rgba(255, 255, 255, 0.08);
            border-radius: 50%;
            top: -250px;
            left: -200px;
            animation: pulse 10s ease-in-out infinite;
        }

        #modern-register::after {
            content: '';
            position: absolute;
            width: 400px;
            height: 400px;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 50%;
            bottom: -200px;
            right: -150px;
            animation: pulse 8s ease-in-out infinite;
        }

        @keyframes pulse {
            0%, 100% {
                transform: scale(1);
                opacity: 0.6;
            }
            50% {
                transform: scale(1.1);
                opacity: 0.8;
            }
        }

        .register-container {
            position: relative;
            z-index: 1;
            max-width: 900px;
            width: 100%;
        }

        .register-card {
            background: #ffffff;
            border-radius: 16px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
            overflow: hidden;
        }

        .register-header {
            background: linear-gradient(to bottom right, rgba(49, 106, 91, 0.05), rgba(164, 49, 53, 0.05));
            padding: 2.5rem 2rem 2rem;
            text-align: center;
            border-bottom: 1px solid #f3f4f6;
        }

        .register-header h1 {
            font-size: 1.5rem;
            font-weight: 700;
            color: #1f2937;
            margin-bottom: 0.5rem;
        }

        .register-header p {
            font-size: 0.938rem;
            color: #6b7280;
            margin-bottom: 0;
        }

        .register-body {
            padding: 2rem;
        }

        .signup-options {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 1rem;
            margin-top: 1.5rem;
        }

        .signup-option {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 2.5rem 2rem;
            background: linear-gradient(135deg, var(--bg-white) 0%, var(--bg-light) 100%);
            border: 2px solid var(--border-color);
            border-radius: 16px;
            text-decoration: none;
            transition: var(--transition);
            position: relative;
            overflow: hidden;
            box-shadow: var(--shadow-sm);
        }

        .signup-option::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: var(--primary-gradient);
            transform: scaleX(0);
            transition: var(--transition);
        }

        .signup-option:hover::after {
            transform: scaleX(1);
        }

        .signup-option::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: var(--primary-gradient);
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .signup-option:hover {
            border-color: #316A5B;
            transform: translateY(-4px);
            box-shadow: 0 8px 24px rgba(49, 106, 91, 0.2);
        }

        .signup-option:hover::before {
            opacity: 1;
        }

        .signup-option-icon {
            width: 60px;
            height: 60px;
            background: linear-gradient(135deg, #316A5B 0%, #A43135 100%);
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 1rem;
            position: relative;
            z-index: 1;
            transition: all 0.3s ease;
        }

        .signup-option:hover .signup-option-icon {
            background: #ffffff;
            transform: scale(1.1);
        }

        .signup-option-icon i {
            font-size: 1.75rem;
            color: #ffffff;
            transition: color 0.3s ease;
        }

        .signup-option:hover .signup-option-icon i {
            color: #316A5B;
        }

        .signup-option-title {
            font-size: 1rem;
            font-weight: 600;
            color: #1f2937;
            margin-bottom: 0.375rem;
            position: relative;
            z-index: 1;
            transition: color 0.3s ease;
        }

        .signup-option:hover .signup-option-title {
            color: #ffffff;
        }

        .signup-option-desc {
            font-size: 0.813rem;
            color: #6b7280;
            text-align: center;
            margin-bottom: 0;
            position: relative;
            z-index: 1;
            transition: color 0.3s ease;
        }

        .signup-option:hover .signup-option-desc {
            color: rgba(255, 255, 255, 0.9);
        }

        .divider {
            display: flex;
            align-items: center;
            text-align: center;
            margin: 2rem 0;
        }

        .divider::before,
        .divider::after {
            content: '';
            flex: 1;
            border-bottom: 1px solid #e5e7eb;
        }

        .divider span {
            padding: 0 1rem;
            color: #9ca3af;
            font-size: 0.875rem;
            font-weight: 500;
        }

        .login-link {
            text-align: center;
            margin-top: 1.5rem;
            padding-top: 1.5rem;
            border-top: 1px solid #f3f4f6;
            font-size: 0.875rem;
            color: #6b7280;
        }

        .login-link a {
            color: #316A5B;
            font-weight: 600;
            text-decoration: none;
            transition: color 0.2s;
        }

        .login-link a:hover {
            color: #285548;
            text-decoration: underline;
        }

        @media (max-width: 768px) {
            .register-header {
                padding: 2rem 1.5rem 1.5rem;
            }

            .register-header h1 {
                font-size: 1.25rem;
            }

            .register-body {
                padding: 1.5rem;
            }

            .signup-options {
                grid-template-columns: 1fr;
            }

            .signup-option {
                padding: 1.5rem 1rem;
            }
        }
        #modern-login {
            min-height: 100vh;
            background: linear-gradient(135deg, #316A5B 0%, #A43135 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 1.5rem 0;
            position: relative;
            overflow: hidden;
        }

        #modern-login::before {
            content: '';
            position: absolute;
            width: 400px;
            height: 400px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 50%;
            top: -200px;
            right: -100px;
            animation: float 6s ease-in-out infinite;
        }

        #modern-login::after {
            content: '';
            position: absolute;
            width: 300px;
            height: 300px;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 50%;
            bottom: -150px;
            left: -100px;
            animation: float 8s ease-in-out infinite;
        }

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

        .login-card {
            background: var(--bg-white);
            border-radius: 20px;
            box-shadow: var(--card-shadow), 0 0 0 1px rgba(49, 106, 91, 0.05);
            overflow: hidden;
            position: relative;
            z-index: 1;
            width: 100%;
            margin: 0 auto;
            backdrop-filter: blur(10px);
            transition: var(--transition);
        }

        .login-card:hover {
            box-shadow: var(--shadow-colored-lg), 0 0 0 1px rgba(49, 106, 91, 0.1);
            transform: translateY(-4px);
        }

        .login-header {
            padding: 2rem 2rem 1.5rem;
            text-align: center;
            background: linear-gradient(to bottom, var(--bg-light), var(--bg-white));
            position: relative;
        }

        .login-header::before {
            content: '';
            position: absolute;
            bottom: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 60px;
            height: 3px;
            background: var(--primary-gradient);
            border-radius: 2px;
        }

        .logo-container {
            margin-bottom: 1rem;
        }

        .logo-container img {
            max-width: 120px;
            height: auto;
        }

        .login-title {
            font-size: 1.125rem;
            font-weight: 600;
            color: #1f2937;
            margin-bottom: 0.25rem;
            line-height: 1.3;
        }

        .login-subtitle {
            font-size: 0.875rem;
            color: #6b7280;
            font-weight: 400;
            margin-bottom: 0;
        }

        .login-body {
            padding: 1.5rem 2rem 2rem;
        }

        .form-group-modern {
            margin-bottom: 1rem;
        }

        .form-label-modern {
            display: block;
            font-size: 0.8125rem;
            font-weight: 600;
            color: var(--text-dark);
            margin-bottom: 0.5rem;
            letter-spacing: 0.01em;
            transition: var(--transition-fast);
        }

        .form-group-modern:focus-within .form-label-modern {
            color: var(--primary-color);
        }

        .form-control-modern {
            width: 100%;
            padding: 0.75rem 1rem;
            font-size: 0.875rem;
            line-height: 1.5;
            color: var(--text-dark);
            background-color: var(--bg-white);
            border: 2px solid var(--input-border);
            border-radius: 10px;
            transition: var(--transition);
        }

        .form-control-modern:focus {
            outline: none;
            border-color: var(--input-focus);
            background-color: var(--bg-white);
            box-shadow: 0 0 0 4px var(--primary-lighter), 0 2px 8px rgba(49, 106, 91, 0.15);
            transform: translateY(-1px);
        }

        .form-control-modern:hover:not(:focus) {
            border-color: var(--primary-light);
        }

        .form-control-modern.is-invalid {
            border-color: #ef4444;
        }

        .invalid-feedback {
            font-size: 0.75rem;
            color: #ef4444;
            margin-top: 0.25rem;
        }

        .form-options {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin: 1rem 0;
            font-size: 0.813rem;
        }

        .remember-me {
            display: flex;
            align-items: center;
        }

        .remember-me input[type="checkbox"] {
            width: 16px;
            height: 16px;
            margin-right: 0.5rem;
            cursor: pointer;
        }

        .remember-me label {
            margin-bottom: 0;
            cursor: pointer;
            font-size: 0.813rem;
            color: #4b5563;
        }

        .forgot-link {
            color: var(--primary-color);
            text-decoration: none;
            font-weight: 500;
            font-size: 0.813rem;
            transition: color 0.2s;
        }

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

        .btn-login {
            width: 100%;
            padding: 0.875rem 1.5rem;
            font-size: 0.9375rem;
            font-weight: 600;
            color: #ffffff;
            background: var(--primary-gradient);
            border: none;
            border-radius: 10px;
            cursor: pointer;
            transition: var(--transition);
            box-shadow: var(--shadow-colored);
            position: relative;
            overflow: hidden;
        }

        .btn-login::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
            transition: left 0.5s ease;
        }

        .btn-login:hover::before {
            left: 100%;
        }

        .btn-login:hover {
            background: var(--primary-gradient-hover);
            transform: translateY(-3px);
            box-shadow: var(--shadow-colored-lg);
        }

        .btn-login:active {
            transform: translateY(-1px);
            box-shadow: var(--shadow-colored);
        }

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

        .btn-login i {
            margin-right: 0.5rem;
        }

        .login-footer {
            text-align: center;
            margin-top: 1.5rem;
            padding-top: 1.25rem;
            border-top: 1px solid #f3f4f6;
            font-size: 0.875rem;
        }

        .login-footer a {
            color: #316A5B;
            font-weight: 500;
            text-decoration: none;
            transition: all 0.2s ease;
        }

        .login-footer a:hover {
            color: #285548;
            text-decoration: underline;
        }

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

        .password-input-wrapper .form-control-modern {
            padding-right: 2.75rem;
        }

        .password-toggle {
            position: absolute;
            right: 0.875rem;
            top: 50%;
            transform: translateY(-50%);
            background: none;
            border: none;
            color: var(--text-light);
            cursor: pointer;
            padding: 0.375rem;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: var(--transition);
            border-radius: 6px;
        }

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

        .password-toggle:active {
            transform: translateY(-50%) scale(0.95);
        }

        .password-toggle i {
            font-size: 1rem;
        }

        .password-input-wrapper .form-control-compact-reg {
            padding-right: 2.75rem;
        }

        @media (max-width: 576px) {
            .login-card {
                margin: 0 1rem;
            }

            .login-header {
                padding: 1.5rem 1.5rem 1rem;
            }

            .login-body {
                padding: 1rem 1.5rem 1.5rem;
            }
        }

/* Register Form Styles */
#modern-register-form {
    min-height: 100vh;
    background: linear-gradient(135deg, #316A5B 0%, #A43135 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 0;
    position: relative;
    overflow: hidden;
}

#modern-register-form::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    top: -200px;
    right: -100px;
    animation: float 6s ease-in-out infinite;
}

.register-form-card {
    background: var(--bg-white);
    border-radius: 20px;
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(49, 106, 91, 0.05);
    overflow: hidden;
    position: relative;
    z-index: 1;
    width: 100%;
    margin: 0 auto;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.register-form-card:hover {
    box-shadow: var(--shadow-colored-lg), 0 0 0 1px rgba(49, 106, 91, 0.1);
    transform: translateY(-4px);
}

.register-form-header {
    padding: 1.5rem 1.75rem;
    text-align: center;
    background: linear-gradient(to bottom, #f8f9fa, #ffffff);
    border-bottom: 1px solid #f3f4f6;
}

.logo-container-form {
    margin-bottom: 0.75rem;
}

.logo-container-form img {
    max-width: 100px;
    height: auto;
}

.register-form-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.register-form-subtitle {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0;
}

.register-form-body {
    padding: 1.5rem 1.75rem 1.75rem;
    max-height: 70vh;
    overflow-y: auto;
}

.register-form-body::-webkit-scrollbar {
    width: 6px;
}

.register-form-body::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.register-form-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.form-group-compact-reg {
    margin-bottom: 0.875rem;
}

.form-label-compact-reg {
    display: block;
    font-size: 0.813rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.375rem;
}

.form-control-compact-reg {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-dark);
    background-color: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    transition: var(--transition);
}

.form-control-compact-reg:focus {
    outline: none;
    border-color: var(--border-focus);
    background-color: var(--bg-white);
    box-shadow: 0 0 0 4px var(--primary-lighter), 0 2px 8px rgba(49, 106, 91, 0.15);
    transform: translateY(-1px);
}

.form-control-compact-reg:hover:not(:focus) {
    border-color: var(--primary-light);
}

.form-control-compact-reg.is-invalid {
    border-color: #ef4444;
}

.btn-register-submit {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #ffffff;
    background: var(--primary-gradient);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-colored);
    margin-top: 0.75rem;
    position: relative;
    overflow: hidden;
}

.btn-register-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-register-submit:hover::before {
    left: 100%;
}

.btn-register-submit:hover {
    background: var(--primary-gradient-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-colored-lg);
}

.btn-register-submit:active {
    transform: translateY(-1px);
    box-shadow: var(--shadow-colored);
}

.login-link-footer {
    text-align: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f3f4f6;
    font-size: 0.875rem;
    color: #6b7280;
}

.login-link-footer a {
    color: #316A5B;
    font-weight: 600;
    text-decoration: none;
}

.login-link-footer a:hover {
    color: #285548;
    text-decoration: underline;
}

@media (max-width: 576px) {
    .register-form-card {
        margin: 0 1rem;
    }

    .register-form-header {
        padding: 1.25rem 1.5rem;
    }

    .register-form-body {
        padding: 1.25rem 1.5rem 1.5rem;
        max-height: 65vh;
    }
}

/* ========================================
   تحسين Select2 لصفحات التسجيل 
   ======================================== */

.select2-container--default .select2-selection--single {
    height: 42px !important;
    border: 1.5px solid #e5e7eb !important;
    border-radius: 10px !important;
    padding: 0 !important;
    background: var(--bg-white) !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

.select2-container--default .select2-selection--single:hover {
    border-color: var(--primary-color) !important;
    box-shadow: 0 2px 8px rgba(49, 106, 91, 0.1) !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 40px !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    font-size: 0.9375rem !important;
    color: var(--text-dark) !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 40px !important;
    width: 30px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: var(--text-medium) transparent transparent transparent !important;
    border-width: 6px 5px 0 5px !important;
}

.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent var(--text-medium) transparent !important;
    border-width: 0 5px 6px 5px !important;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(49, 106, 91, 0.1) !important;
    padding: 0 !important;
}

/* القائمة المنسدلة */
.select2-container--default .select2-dropdown {
    border-radius: 10px !important;
    border: 1.5px solid #e5e7eb !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
    margin-top: 4px !important;
}

.select2-container--default .select2-results__option {
    padding: 12px 16px !important;
    font-size: 0.9375rem !important;
    transition: all 0.2s ease !important;
}

.select2-container--default .select2-results__option--highlighted {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
    color: var(--white) !important;
}

/* Placeholder */
.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: var(--text-light) !important;
}



/* International Telephone Input */
.iti {
    width: 100%;
}

.iti__flag-container {
    border-radius: 8px 0 0 8px;
}

/* Profile Modern Section */
#modern-profile-section {
    min-height: 100vh;
    background: linear-gradient(135deg, #316A5B 0%, #A43135 100%);
    padding: 3rem 0;
    position: relative;
}

#modern-profile-section::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    top: -300px;
    right: -200px;
    animation: float 8s ease-in-out infinite;
}

.profile-alert {
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
    animation: slideDown 0.4s ease-out;
}

.profile-card-enhanced {
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
}

.profile-card-enhanced:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15) !important;
}

.profile-header-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.75rem;
    color: #ffffff;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }
}

.form-label-compact-reg i {
    margin-right: 0.375rem;
    color: #316A5B;
    font-size: 0.875rem;
}

@media (max-width: 991px) {
    #modern-profile-section {
        padding: 2rem 0;
    }

    .profile-header-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    #modern-profile-section {
        padding: 1.5rem 0;
    }

    .profile-card-enhanced .register-form-header h1 {
        font-size: 1.1rem;
    }

    .profile-card-enhanced .register-form-header p {
        font-size: 0.75rem;
    }
}

/* Profile Modern Wrapper */
.profile-modern-wrapper {
    padding: 2rem 0;
    min-height: calc(100vh - 120px);
    background: #f8f9fa;
}

.profile-modern-wrapper .register-form-card {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
}

.profile-modern-wrapper .register-form-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.profile-modern-wrapper .btn-register-submit {
    margin-top: 0.5rem;
}

.profile-modern-wrapper .register-form-body {
    max-height: none;
}

.profile-modern-wrapper .alert {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 991px) {
    .profile-modern-wrapper .col-lg-4 {
        margin-top: 1.5rem;
    }
}

@media (max-width: 768px) {
    .profile-modern-wrapper {
        padding: 1rem 0;
    }

    .profile-modern-wrapper .register-form-header h1 {
        font-size: 1.1rem;
    }
}

.iti input {
    width: 100%;

}

/* Profile Page Custom Styles */

/* Custom Error Alert Styling */
.custom-error-alert {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe5e5 100%);
    border: 2px solid #ef4444;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px rgba(239, 68, 68, 0.1);
    animation: slideDown 0.3s ease-out;
    position: relative;
    padding-right: 3rem;
}

.error-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    color: #dc2626;
}

.error-header i {
    font-size: 1.25rem;
    margin-right: 0.5rem;
}

.error-header strong {
    font-size: 1rem;
    font-weight: 600;
}

.error-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.error-list li {
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
    background-color: white;
    border-radius: 8px;
    color: #991b1b;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.error-list li i {
    margin-right: 0.5rem;
    color: #dc2626;
    font-size: 0.875rem;
}

.error-list li:last-child {
    margin-bottom: 0;
}

/* Custom Success Alert Styling */
.custom-success-alert {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid #22c55e;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px rgba(34, 197, 94, 0.1);
    animation: slideDown 0.3s ease-out;
    position: relative;
    padding-right: 3rem;
}

.success-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    color: #15803d;
}

.success-header i {
    font-size: 1.25rem;
    margin-right: 0.5rem;
}

.success-header strong {
    font-size: 1rem;
    font-weight: 600;
}

.success-message {
    color: #166534;
    font-size: 0.875rem;
    margin: 0;
    padding-left: 1.75rem;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Alert Close Button */
.custom-error-alert .close,
.custom-success-alert .close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.25rem 0.5rem;
    background-color: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    color: inherit;
    opacity: 0.7;
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1;
    text-shadow: none;
    transition: all 0.2s ease;
}

.custom-error-alert .close:hover,
.custom-success-alert .close:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.custom-error-alert .close:focus,
.custom-success-alert .close:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

/* Dashboard and Language Buttons Styling */
.btn-dashboard {
    background: linear-gradient(135deg, #316A5B 0%, #245044 100%);
    color: white;
    border: none;
    padding: 0.375rem 0.875rem;
    border-radius: 6px;
    font-size: 0.813rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(49, 106, 91, 0.2);
    text-decoration: none;
}

.btn-dashboard:hover {
    background: linear-gradient(135deg, #245044 0%, #1a3d33 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(49, 106, 91, 0.3);
    text-decoration: none;
}

.btn-dashboard i {
    font-size: 0.875rem;
}

.btn-language {
    background: white;
    color: #316A5B;
    border: 2px solid #316A5B;
    padding: 0.375rem 0.875rem;
    border-radius: 6px;
    font-size: 0.813rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(49, 106, 91, 0.1);
}

.btn-language:hover {
    background: #f0f9f7;
    border-color: #245044;
    color: #245044;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(49, 106, 91, 0.2);
}

.btn-language:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(49, 106, 91, 0.2);
}

.btn-language i {
    font-size: 0.875rem;
}

.language-dropdown {
    border-radius: 6px;
    border: 1px solid #d1d5db;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 0.25rem 0;
    min-width: 140px;
    margin-top: 0.25rem;
}

.language-item {
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: #374151;
    transition: all 0.2s ease;
    font-size: 0.75rem;
}

.language-item i {
    color: #316A5B;
    opacity: 0;
    transition: opacity 0.2s ease;
    font-size: 0.75rem;
}

.language-item:hover {
    background: #f0f9f7;
    color: #316A5B;
}

.language-item.active {
    background: #316A5B;
    color: white;
    font-weight: 600;
}

.language-item.active i {
    opacity: 1;
    color: white;
}

/* Section Header Styling for Profile */
.section-header-compact {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.section-title-compact {
    color: #316A5B;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.section-title-compact i {
    margin-right: 0.5rem;
}

/* Custom switch styling */
.custom-control-switch {
    padding-left: 2.5rem;
}

.custom-control-switch .custom-control-label::before {
    left: -2.5rem;
    width: 2rem;
    pointer-events: all;
    border-radius: 1rem;
    background-color: #dee2e6;
    border: none;
}

.custom-control-switch .custom-control-label::after {
    left: calc(-2.5rem + 2px);
    width: calc(1rem - 4px);
    height: calc(1rem - 4px);
    background-color: #fff;
    border-radius: 1rem;
    transition: transform 0.15s ease-in-out, background-color 0.15s ease-in-out;
}

.custom-control-switch .custom-control-input:checked ~ .custom-control-label::before {
    background-color: #316A5B;
}

.custom-control-switch .custom-control-input:checked ~ .custom-control-label::after {
    transform: translateX(0.75rem);
}

.custom-control-label {
    font-size: 0.813rem;
    font-weight: 500;
    color: #374151;
}

/* Document Display Styles */
.existing-documents {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
}

.document-item {
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    background: #ffffff;
    border-radius: 6px;
    border-left: 3px solid #316A5B;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.document-item:last-child {
    margin-bottom: 0;
}

.document-item i {
    color: #316A5B;
    font-size: 1.1rem;
}

.document-item a {
    color: #316A5B;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
}

.document-item a:hover {
    text-decoration: underline;
}

.btn-outline-success {
    border-color: #316A5B;
    color: #316A5B;
}

.btn-outline-success:hover {
    background-color: #316A5B;
    border-color: #316A5B;
    color: #ffffff;
}

/* Compact Documents Styles */
.existing-documents-compact {
    background: #f8fafb;
    border-radius: 6px;
    padding: 0.5rem;
    border: 1px solid #e5e7eb;
}

.document-item-compact {
    padding: 0.35rem 0.5rem;
    margin-bottom: 0.35rem;
    background: #ffffff;
    border-radius: 4px;
    border-left: 2px solid #316A5B;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.813rem;
}

.document-item-compact:last-child {
    margin-bottom: 0;
}

.document-item-compact i {
    color: #316A5B;
    font-size: 0.9rem;
}

.document-item-compact a {
    color: #316A5B;
    text-decoration: none;
    font-weight: 500;
    flex: 1;
}

.document-item-compact a:hover {
    text-decoration: underline;
}

.badge-sm {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
}

/* Repeater Compact Styles */
.repeater-compact {
    background: #fafbfc;
    border-radius: 6px;
    padding: 0.95rem;
    border: 1px dashed #d1d5db;
}

.repeater-row-compact {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 0.5rem;
    transition: all 0.2s ease;
}

.repeater-row-compact:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.custom-file-sm {
    height: calc(1.5em + 0.5rem + 2px);
}

.custom-file-input-sm {
    height: calc(1.5em + 0.5rem + 2px);
}

.custom-file-label-sm {
    height: calc(1.5em + 0.5rem + 2px);
    padding: 0.25rem 0.5rem;
    font-size: 0.813rem;
    line-height: 1.5;
}

.custom-file-label-sm::after {
    height: calc(1.5em + 0.5rem);
    padding: 0.25rem 0.5rem;
    line-height: 1.5;
    font-size: 0.813rem;
}

.btn-icon-compact {
    width: 28px;
    height: 28px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.btn-icon-compact i {
    font-size: 0.75rem;
}

.form-control-sm {
    font-size: 0.813rem;
    padding: 0.25rem 0.5rem;
}

.btn-outline-primary {
    border-color: #316A5B;
    color: #316A5B;
    font-size: 0.813rem;
    padding: 0.35rem 0.75rem;
}

.btn-outline-primary:hover {
    background-color: #316A5B;
    border-color: #316A5B;
    color: #ffffff;
}

.g-2 {
    margin-left: -0.25rem;
    margin-right: -0.25rem;
}

.g-2 > [class*="col-"] {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
}

/* Existing Documents Inline Styles */
.existing-docs-inline {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.btn-link-doc {
    padding: 0.25rem 0.5rem;
    font-size: 0.813rem;
    color: #316A5B;
    text-decoration: none;
    background: #f0f9f7;
    border: 1px solid #d1e7e0;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-link-doc:hover {
    background: #316A5B;
    color: #ffffff;
    border-color: #316A5B;
    text-decoration: none;
}

.btn-link-doc i {
    font-size: 0.9rem;
}

/* Existing Document Row Styles */
.existing-doc-row {
    background: #f8fdf9 !important;
    border-left: 3px solid #316A5B !important;
}

.existing-file-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: #ffffff;
    border-radius: 4px;
    border: 1px solid #d1e7e0;
}

.existing-file-display i {
    font-size: 1rem;
}

.file-link {
    color: #316A5B;
    text-decoration: none;
    font-size: 0.813rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.file-link:hover {
    text-decoration: underline;
}

.doc-row-deleted {
    opacity: 0.5;
    background: #fee !important;
    border-left-color: #dc3545 !important;
}

.doc-row-deleted input,
.doc-row-deleted select {
    pointer-events: none;
}

/* Safety Document Styles */
.safety-document-wrapper {
    background: #f8fafb;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.3s ease;
}

.safety-document-wrapper:hover {
    border-color: #316A5B;
    background: #f0f9f7;
}

.current-document-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 0.75rem;
    gap: 1rem;
}

.document-preview {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.document-preview > i {
    font-size: 2rem;
    color: #316A5B;
}

.document-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.document-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1f2937;
    word-break: break-word;
}

.document-meta {
    font-size: 0.75rem;
    color: #6b7280;
}

.document-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-view-doc {
    background: #316A5B;
    color: #ffffff;
    border: none;
    padding: 0.4rem 0.75rem;
    border-radius: 4px;
    font-size: 0.813rem;
    transition: all 0.2s ease;
}

.btn-view-doc:hover {
    background: #2d5f52;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(49, 106, 91, 0.3);
}

.btn-replace-doc {
    background: #f59e0b;
    color: #ffffff;
    border: none;
    padding: 0.4rem 0.75rem;
    border-radius: 4px;
    font-size: 0.813rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-replace-doc:hover {
    background: #d97706;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.upload-placeholder {
    text-align: center;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.upload-placeholder > i {
    font-size: 3rem;
    color: #9ca3af;
}

.upload-placeholder > span {
    color: #6b7280;
    font-size: 0.875rem;
}

.btn-upload-doc {
    background: #316A5B;
    color: #ffffff;
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
}

.btn-upload-doc:hover {
    background: #2d5f52;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(49, 106, 91, 0.3);
}

/* Responsive Styles */
@media (max-width: 768px) {
    .btn-dashboard,
    .btn-language {
        padding: 0.5rem 1rem;
        font-size: 0.813rem;
    }

    .btn-dashboard span,
    .btn-language span {
        display: none;
    }

    .existing-docs-inline {
        margin-top: 0.5rem;
        width: 100%;
    }
}

@media (max-width: 576px) {
    .current-document-display {
        flex-direction: column;
        align-items: flex-start;
    }

    .document-actions {
        width: 100%;
        justify-content: flex-end;
    }
}
.alternative-login {
    margin-top: 1.5rem;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0 1rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e5e7eb;
}

.divider span {
    padding: 0 1rem;
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
}

.btn-otp-login {
    display: block;
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #316A5B;
    background: #ffffff;
    border: 2px solid #316A5B;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
}

.btn-otp-login:hover {
    background: #316A5B;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(49, 106, 91, 0.3);
    text-decoration: none;
}

.btn-otp-login i {
    margin-right: 0.5rem;
}

.consent-info-box {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 1.5rem;
    border-left: 4px solid #316A5B;
}

.info-row {
    padding: 0.5rem 0;
    border-bottom: 1px solid #dee2e6;
}

.info-row:last-child {
    border-bottom: none;
}

.info-row strong {
    color: #316A5B;
    font-size: 0.9rem;
    margin-right: 0.5rem;
}

.info-row span {
    color: #495057;
    font-size: 0.9rem;
}

.consent-content {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    max-height: 400px;
    overflow-y: auto;
}

.consent-content::-webkit-scrollbar {
    width: 6px;
}

.consent-content::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.consent-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.consent-content p {
    font-size: 0.875rem;
    line-height: 1.6;
    color: #4b5563;
    margin-bottom: 1rem;
}

.consent-content p:last-child {
    margin-bottom: 0;
}
