﻿:root {
    --primary-color: #f5f3cc; /* أصفر فاتح (الهيدر والسايدبار) */
    --secondary-color: #b0b0b0; /* رمادي */
    --header-text-color: #2e2e2e; /* نص داكن */
    --text-dark: #2e2e2e; /* نص أسود داكن */
    --text-light: #fff;
    --border-radius: 6px;
    --subtle-red: rgba(204, 0, 0, 0.1); /* أحمر شفاف */
    --heading-color: #5F8575; /* عدلتها */
    --accent-green: #00A67E;
    --background-light: #f7f7f8;
    --header-bg-color: #5F8575;
}

/* حاوية عامة */
.auth-container {
    max-width: 1200px; /* عرض أكبر قليلاً ليناسب الشاشات الكبيرة */
    padding: 0 15px; /* حواف داخلية */
    direction: rtl;
    box-sizing: border-box;
}

/* كارد المصادقة */
.auth-card {
    border: none;
    border-radius: 0.75rem;
    background-color: var(--background-light);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.auth-card-header {
    background-color: var(--accent-green);
    color: var(--text-light);
    text-align: center;
    font-weight: bold;
    padding: 1rem;
    border-top-left-radius: 0.75rem;
    border-top-right-radius: 0.75rem;
}

.auth-card-body {
    padding: 1.5rem 1rem;
    color: var(--text-dark);
    overflow-x: auto; /* تمرير أفقي للجدول العريض */
}

/* حقول الإدخال */
.auth-input,
.login-input {
    width: 100%;
    border: 2px solid var(--accent-green);
    border-radius: 0.25rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.9rem;
}

/* التسميات */
.auth-label,
.login-label {
    color: var(--accent-green);
    font-weight: 600;
}

/* checkbox label */
.auth-checkbox-label {
    color: #4a4a4a;
    font-weight: 600;
}

/* أزرار */
.auth-button,
.login-button {
    background-color: var(--accent-green);
    border: none;
    color: var(--text-light);
    border-radius: 0.25rem;
    font-weight: bold;
    width: 100%;
    padding: 0.5rem;
    transition: background-color 0.3s ease;
    cursor: pointer;
}

    .auth-button:hover,
    .login-button:hover {
        background-color: #008c67;
    }

/* روابط */
.auth-link,
.login-link {
    color: var(--accent-green);
    font-weight: 600;
    text-decoration: none;
}

    .auth-link:hover,
    .login-link:hover {
        text-decoration: underline;
    }

/* التنسيق العام */
body {
    background-color: var(--background-light);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    color: var(--text-dark);
}

.container {
    max-width: 1200px;
}

/* الهيدر */
header {
    background-color: var(--header-bg-color) !important;
    color: var(--text-dark);
    text-align: right;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 15px;
    padding: 10px 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* نص بتدرج لوني */
.gradient-text {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: bold;
}

/* الشريط الجانبي */
.sidebar {
    background-color: var(--header-bg-color);
    color: var(--text-dark);
    padding: 15px 20px;
    min-height: 100vh;
    width: 220px;
    flex-shrink: 0;
    box-shadow: inset 0 0 10px var(--subtle-red);
}

    .sidebar ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

        .sidebar ul li {
            margin-bottom: 15px;
        }

            .sidebar ul li a {
                color: var(--text-dark);
                text-decoration: none;
                font-weight: bold;
                display: block;
                padding: 6px 10px;
                border-radius: 4px;
                transition: background-color 0.3s ease;
            }

                .sidebar ul li a:hover {
                    background-color: var(--subtle-red);
                }

/* محتوى الصفحة الرئيسي */
main.main-content {
    flex-grow: 1;
    padding: 20px;
    background: white;
    min-height: 100vh;
}

/* الفوتر */
/*footer {
    font-size: 0.85rem;
    background-color: #f1f1f1;
    padding: 15px 0;
    text-align: center;
    border-top: 1px solid #ddd;
    margin-top: auto;
    color: var(--text-dark);
}*/

/* العناوين العامة */
.section-title,
h1, h2, h3, h4, h5, h6 {
/*   // color: #;*/

    font-weight: bold;
}

/* أزرار عامة */
.btn-primary-custom {
    background: var(--secondary-color);
    color: var(--text-light);
    border: none;
    border-radius: var(--border-radius);
    padding: 6px 16px;
    transition: background-color 0.3s ease;
}

    .btn-primary-custom:hover {
        background: #999999;
    }

.btn-secondary-custom {
    background: var(--primary-color);
    color: var(--text-dark);
    border: none;
    border-radius: var(--border-radius);
    padding: 6px 16px;
    transition: background-color 0.3s ease;
}

    .btn-secondary-custom:hover {
        background: #dedcaa;
    }

/* حقول عامة */
.input-style {
    border: 1px solid #ccc;
    border-radius: var(--border-radius);
    padding: 8px 12px;
    color: var(--text-dark);
}

.label-style {
    color: var(--text-dark);
    font-weight: 600;
}

/* تنبيهات */
.alert-success-custom {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: var(--border-radius);
    padding: 10px;
}

.alert-error-custom {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: var(--border-radius);
    padding: 10px;
}

/* رأس الكارد أو العناصر */
.header-gradient {
    background: linear-gradient(to left, var(--primary-color), var(--secondary-color));
    color: var(--header-text-color);
    padding: 10px 15px;
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
}

/* استجابة الشاشات الصغيرة */
@media (max-width: 768px) {
    .d-flex-wrapper {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        min-height: auto;
        padding: 15px;
    }
/*
    main.main-content {
        min-height: auto;
        padding: 15px;
    }*/

    header {
        background-color: var(--header-bg-color) !important;
        flex-direction: column;
        text-align: center;
    }

    .auth-container {
        max-width: 100%;
        margin: 1rem 0.5rem;
        padding: 0 10px;
    }

    .auth-card-body {
        padding: 1rem 0.5rem;
    }

    .row.mb-3 > div {
        margin-bottom: 1rem;
    }
}

/* تخطيط مرن للصفحة */
.d-flex-wrapper {
    display: flex;
    flex-direction: row;
    min-height: 100vh;
}

/* الحاوية الأساسية */
.login-container {
    max-width: 500px;
    margin: 4rem auto;
    direction: rtl;
}

/* الكارد الرئيسي */
.login-card {
    border: none;
    border-radius: 0.75rem;
    background-color: var(--background-light);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* هيدر الكارد */
.login-card-header {
    background-color: var(--accent-green);
    color: var(--text-light);
    text-align: center;
    font-weight: bold;
    padding: 1rem;
    border-top-left-radius: 0.75rem;
    border-top-right-radius: 0.75rem;
}

/* جسم الكارد */
.login-card-body {
    padding: 2rem;
    color: var(--text-dark);
}
.toggle-btn {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    background: var(--accent-green);
    border: none;
    color: var(--text-light);
    font-size: 1.1rem;
    padding: 0 10px;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

    .toggle-btn:hover {
        background: #008c67;
    }

.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.auth-input {
    padding: 0.5rem 2.5rem 0.5rem 0.75rem;
    font-size: 1rem;
    border: 2px solid var(--accent-green);
    border-radius: 0.25rem;
    width: 100%;
    height: 2.75rem;
    box-sizing: border-box;
}

.login-card-header h2 {
    color: var(--text-light);
    margin: 0;
    font-weight: 700;
    font-size: 1.5rem;
    text-align: center;
}
