:root {
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --secondary: #7209b7;
    --success: #4cc9f0;
    --light: #f8f9fa;
    --dark: #212529;
    --gradient: linear-gradient(135deg, #6a1731 0%, #000000 100%);
    --gradient-light: linear-gradient(135deg, #4cc9f0 0%, #4361ee 100%);
    --shadow: 0 8px 32px rgba(67, 97, 238, 0.12);
    --shadow-light: 0 4px 16px rgba(67, 97, 238, 0.08);
    --radius: 12px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
@font-face {
    font-family: 'almarai-bold';
    src: url('../fonts/almarai/almarai-bold.ttf') format('truetype');
}
@font-face {
    font-family: 'almarai-extrabold';
    src: url('../fonts/almarai/almarai-extrabold.ttf') format('truetype');
}
@font-face {
    font-family: 'almarai-light';
    src: url('../fonts/almarai/almarai-light.ttf') format('truetype');
}
@font-face {
    font-family: 'almarai-regular';
    src: url('../fonts/almarai/almarai-regular.ttf') format('truetype');
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'almarai-regular', sans-serif;
}
.dataTables_info, .dataTables_length {
    display: none !important;
}
table th {
    background-color: #f8f9fa00 !important;
    border-bottom-color: rgb(0 0 0 / 17%) !important;
}
table {
    border: 1px solid rgb(0 0 0 / 10%) !important;
}
.forgot-password.disabled {
    pointer-events: none;
    opacity: 0.5;
    cursor: not-allowed;
}

table tbody tr td{
    border-bottom: 1px solid rgb(0 0 0 / 10%) !important;
}
.table thead tr th {
    text-align: center !important;
}
.dataTables_paginate {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 15px 0px;
}
.dataTables_filter {
    margin-bottom: 15px;
}
    .loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.message {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 10px;
    animation: fadeIn 0.3s ease;
}
.form-check-input:checked {
    background-color: #283849;
    border-color: #202d3b;
}
    .message.success {
        background: #e6f7ee;
        color: #1e7e34;
        border: 1px solid #b7ebcd;
    }

    .message.error {
        background: #fdecea;
        color: #b02a37;
        border: 1px solid #f5c2c7;
    }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


    *:focus {
        box-shadow: none !important;
        outline: none !important;
    }

html {
    direction: rtl;
    font-size: 14px;
}

body {
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    background: #f5f7ff;
    padding: 16px;
}

/* خلفية متحركة محسنة */
.logo {
    height: 100px;
    margin-bottom: 10px;
}
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
}

.circle {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(106, 23, 49, 0.05) 0%, rgba(0, 0, 0, 0.05) 100%);
    animation: float 25s infinite linear;
}

    .circle:nth-child(1) {
        width: 250px;
        height: 250px;
        top: 10%;
        right: 10%;
        animation-delay: 0s;
    }

    .circle:nth-child(2) {
        width: 180px;
        height: 180px;
        bottom: 15%;
        left: 10%;
        animation-delay: 8s;
    }

    .circle:nth-child(3) {
        width: 120px;
        height: 120px;
        top: 40%;
        left: 20%;
        animation-delay: 15s;
    }

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }

    25% {
        transform: translateY(-20px) rotate(90deg);
    }

    50% {
        transform: translateY(0) rotate(180deg);
    }

    75% {
        transform: translateY(20px) rotate(270deg);
    }
}

/* الحاوية الرئيسية */
.main-container {
    width: 100%;
    max-width: 1200px;
    min-height: 85vh;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    position: relative;
}
.nav-text {
    font-weight: bold;
}
.global-button {
    padding: 14px;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
/* الشريط الجانبي */
.sidebar {
    width: 40%;
    background: var(--gradient);
    padding: 32px;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

    .sidebar::before {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 200px;
        height: 200px;
        background: rgba(255, 255, 255, 0.08);
        border-radius: 50%;
        transform: translate(30%, -30%);
    }

    .sidebar::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 150px;
        height: 150px;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 50%;
        transform: translate(-30%, 30%);
    }
.welcome-text {
    position: relative;
    z-index: 2;
    margin-bottom: 36px;
}

    .welcome-text h3 {
        font-size: 22px;
        font-weight: 700;
        margin-bottom: 12px;
        line-height: 1.4;
        font-family: 'almarai-bold';
    }

    .welcome-text p {
        font-size: 13px;
        opacity: 0.9;
        line-height: 1.5;
    }

.features {
    position: relative;
    z-index: 2;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: var(--transition);
}

    .feature-item:hover {
        background: rgba(255, 255, 255, 0.12);
        transform: translateX(-3px);
    }

.feature-icon {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.feature-text h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    font-family: 'almarai-bold';
}

.feature-text p {
    font-size: 12px;
    opacity: 0.8;
    line-height: 1.4;
}

/* قسم النموذج */
.form-section {
    width: 60%;
    padding: 32px 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-container {
    max-width: 380px;
    margin: 0 auto;
    width: 100%;
}

.form-header {
    text-align: center;
    margin-bottom: 32px;
}

    .form-header h2 {
        font-size: 26px;
        color: #2c3e50;
        margin-bottom: 8px;
        font-weight: 700;
        font-family: 'almarai-extrabold';
    }

    .form-header p {
        color: #666;
        font-size: 14px;
        line-height: 1.4;
    }

/* نماذج الإدخال */
.input-group {
    position: relative;
    margin-bottom: 24px;
}

    .input-group label {
        display: block;
        margin-bottom: 6px;
        color: #2c3e50;
        font-weight: 500;
        font-size: 13px;
        font-family: 'almarai-bold';
    }

.input-field {
    width: 100%;
    border: 1.5px solid #e1e5f1;
    border-radius: 5px !important;
    transition: var(--transition);
    background: white;
    color: #333;
    font-size: 12px;

    padding: 9px 10px
}

    .input-field:focus {
        border-color: #6a1731;
        box-shadow: 0 0 0 3px rgba(106, 23, 49, 0.1);
    }

.input-icon {
    position: absolute;
    left: 16px;
    top: 40px;
    color: #8a94a6;
    font-size: 14px;
    transition: var(--transition);
}

.input-field:focus + .input-icon {
    color: #6a1731;
}

.password-toggle {
    position: absolute;
    left: 16px;
    top: 40px;
    cursor: pointer;
    color: #8a94a6;
    font-size: 14px;
    transition: var(--transition);
}

    .password-toggle:hover {
        color: #6a1731;
    }

/* الروابط */
.form-links {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
    font-size: 13px;
}

.forgot-password {
    color: #6a1731;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    font-size: 12px;
}

    .forgot-password:hover {
        color: #000;
        text-decoration: underline;
    }

/* زر الإرسال */
.submit-btn {
    width: 100%;
    padding: 14px;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    position: relative;
    overflow: hidden;
    font-family: 'almarai-bold';
}

    .submit-btn::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: 0.5s;
    }

    .submit-btn:hover::before {
        left: 100%;
    }

    .submit-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(106, 23, 49, 0.2);
    }

    .submit-btn:active {
        transform: translateY(0);
    }

    .submit-btn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none !important;
    }

/* OTP */
.otp-container {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 24px 0;
}

.otp-input {
    width: 42px;
    height: 50px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    border: 1.5px solid #e1e5f1;
    border-radius: 8px;
    background: white;
    transition: var(--transition);
    color: #333;
}

    .otp-input:focus {
        border-color: #6a1731;
        box-shadow: 0 0 0 3px rgba(106, 23, 49, 0.1);
        outline: none;
    }

    .otp-input.filled {
        border-color: #6a1731;
        background: rgba(106, 23, 49, 0.05);
    }

/* المؤقت */
.otp-timer {
    text-align: center;
    margin: 20px 0;
    color: #666;
    font-size: 13px;
    padding: 12px;
    background: #f8f9ff;
    border-radius: 8px;
    border: 1px solid #e8eaff;
}

    .otp-timer span {
        color: #6a1731;
        font-weight: 600;
        font-size: 14px;
    }

/* الرسائل */
/*#messageContainer {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}
*/
.message {
    padding: 14px 18px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow);
    animation: slideIn 0.3s ease;
    justify-content:center;
    margin-bottom: 10px;
    font-size: 13px;
}

    .message.success {
        background: #e8f5e9;
        color: #1b5e20;
        border-right: 4px solid #4caf50;
    }

    .message.error {
        background: #ffebee;
        color: #c62828;
        border-right: 4px solid #f44336;
    }

.message-icon {
    font-size: 16px;
}

/* تحسينات عامة */
footer {
    height: 20px;
    margin-top: 16px;
}

    footer p {
        margin-right: var(--sidebar-width);
        font-size: 11px;
        padding: 2px 0;
        color: #000;
    }

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========== تصميم متجاوب ========== */

/* للأجهزة اللوحية الكبيرة (أقل من 992px) */
@media (max-width: 992px) {
    .main-container {
        flex-direction: column;
        max-width: 500px;
        min-height: auto;
    }

    .sidebar, .form-section {
        width: 100%;
    }

    .sidebar {
        padding: 24px;
        min-height: 280px;
    }

    .form-section {
        padding: 32px 24px;
    }

    .welcome-text h3 {
        font-size: 20px;
    }
}

/* للأجهزة اللوحية الصغيرة (أقل من 768px) */
@media (max-width: 768px) {
    body {
        padding: 12px;
    }

    .main-container {
        min-height: 90vh;
    }

    .sidebar {
        padding: 20px;
    }

    .form-section {
        padding: 28px 20px;
    }

    .form-header h2 {
        font-size: 22px;
    }

    .welcome-text h3 {
        font-size: 18px;
    }
}

/* للهواتف (أقل من 576px) */
@media (max-width: 576px) {
    html {
        font-size: 13px;
    }

    body {
        padding: 8px;
        background: linear-gradient(135deg, #f5f7ff 0%, #eef1ff 100%);
    }

    .main-container {
        border-radius: 10px;
        min-height: 92vh;
    }

    .sidebar {
        padding: 20px 16px;
        min-height: 240px;
    }

    .form-section {
        padding: 24px 16px;
    }

    .form-container {
        padding: 0 8px;
    }

    .form-header {
        margin-bottom: 28px;
    }

        .form-header h2 {
            font-size: 20px;
        }

    .feature-item {
        padding: 12px;
        margin-bottom: 12px;
    }

    .feature-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .feature-text h4 {
        font-size: 13px;
    }

    .feature-text p {
        font-size: 11px;
    }

    /* OTP للأجهزة الصغيرة */
    .otp-container {
        gap: 6px;
        margin: 20px 0;
    }

    .otp-input {
        width: 36px;
        height: 44px;
        font-size: 16px;
    }



    .input-icon,
    .password-toggle {
        top: 36px;
        left: 14px;
        font-size: 13px;
    }

    .submit-btn {
        padding: 13px;
        font-size: 13px;
    }

    .otp-timer {
        font-size: 12px;
        padding: 10px;
    }

    .message {

        font-size: 12px;
        padding: 12px 16px;
    }
}

/* للأجهزة صغيرة جداً (أقل من 375px) */
@media (max-width: 375px) {
    .sidebar {
        padding: 16px 12px;
    }

    .form-section {
        padding: 20px 12px;
    }

    .otp-input {
        width: 32px;
        height: 40px;
    }

    .welcome-text h3 {
        font-size: 16px;
    }


}

/* للشاشات الكبيرة جداً (أكبر من 1440px) */
@media (min-width: 1440px) {
    .main-container {
        max-width: 1100px;
        min-height: 70vh;
    }

    .form-container {
        max-width: 420px;
    }
}

/* تحسين الطباعة */
@media print {
    .bg-animation,
    .sidebar,
    .password-toggle,
    .submit-btn {
        display: none !important;
    }

    .main-container {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .form-section {
        width: 100%;
    }
}
