html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}



/* General Body Styles */
body {
    font-family: 'Open Sans', sans-serif; /* خط عام للنصوص */
    background-color: #f8f9fa; /* لون خلفية فاتح جداً */
    color: #333; /* لون نص أساسي داكن قليلاً */
}

/* Header & Navigation Bar */
.main-header {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08); /* ظل خفيف للـ header */
    background-color: #ffffff; /* خلفية بيضاء لـ header */
}

.custom-navbar {
    padding: 1rem 0; /* مساحة داخلية علوية وسفلية للملاحة */
    background-color: #fff !important; /* تأكيد أن الخلفية بيضاء */
}

.brand-logo {
    font-family: 'Roboto', sans-serif; /* خط مميز للشعار */
    font-weight: 700; /* سمك الخط */
    font-size: 1.8rem; /* حجم أكبر للشعار */
    color: #007bff !important; /* لون أزرق مميز للشعار */
    display: flex; /* لترتيب الأيقونة والنص */
    align-items: center; /* لمحاذاة العناصر عمودياً */
}

.logo-icon {
    color: #28a745; /* لون أخضر للأيقونة */
    margin-inline-end: 8px; /* مسافة بين الأيقونة والنص (استخدم margin-inline-end لدعم RTL) */
    font-size: 2rem; /* حجم أكبر للأيقونة */
}

.custom-navbar .nav-link {
    color: #555 !important; /* لون روابط التنقل */
    font-weight: 500;
    transition: color 0.3s ease; /* تأثير انتقال اللون عند التحويم */
    margin-inline-start: 15px; /* مسافة بين الروابط */
    padding: 0.5rem 1rem; /* مساحة داخلية للروابط */
    border-radius: 5px; /* حواف مستديرة للروابط */
}

    .custom-navbar .nav-link:hover {
        color: #007bff !important; /* لون أزرق عند التحويم */
        background-color: #e9f5ff; /* خلفية فاتحة عند التحويم */
    }

.custom-navbar .nav-item .nav-link.active {
    color: #0056b3 !important; /* لون أزرق داكن للرابط النشط */
    font-weight: 600;
}

.user-greeting {
    margin-inline-start: auto; /* يدفع رسالة الترحيب إلى اليمين في تخطيط LTR، وإلى اليسار في RTL */
    font-weight: 600;
    color: #28a745 !important; /* لون أخضر لرسالة الترحيب */
}

/* Main Content Wrapper */
.main-content-wrapper {
    min-height: calc(100vh - 180px); /* يضمن أن المحتوى يملأ الصفحة بشكل جيد قبل التذييل */
    padding-top: 20px; /* مسافة علوية للمحتوى */
}

/* Footer */
.custom-footer {
    background-color: #343a40; /* لون خلفية داكن للتذييل */
    color: #f8f9fa; /* لون نص فاتح للتذييل */
    padding: 1.5rem 0; /* مساحة داخلية */
    text-align: center;
}

    .custom-footer a {
        color: #007bff; /* لون روابط التذييل */
        text-decoration: none;
    }

        .custom-footer a:hover {
            text-decoration: underline;
        }

/* Enhancements for specific elements (examples) */

/* Buttons */
.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
    transition: all 0.3s ease;
}

    .btn-primary:hover {
        background-color: #0056b3;
        border-color: #0056b3;
    }

/* Cards (if used) */
.card {
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.card-header {
    background-color: #007bff;
    color: white;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

/* Forms */
.form-control {
    border-radius: 5px;
    border: 1px solid #ced4da;
    padding: 0.75rem 1rem;
}

    .form-control:focus {
        border-color: #80bdff;
        box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    }

/* Specific for eye hospital theme - You can add more here */
/* Example: a hero section on the homepage */
.hero-section {
    background: linear-gradient(rgba(0, 123, 255, 0.7), rgba(0, 123, 255, 0.7)), url('/images/eye-care-banner.jpg') no-repeat center center; /* استخدم صورة خلفية ذات صلة */
    background-size: cover;
    color: white;
    padding: 6rem 0;
    text-align: center;
    border-radius: 10px;
    margin-bottom: 30px;
}

    .hero-section h1 {
        font-size: 3.5rem;
        font-weight: 700;
        margin-bottom: 1rem;
    }

    .hero-section p {
        font-size: 1.3rem;
        margin-bottom: 2rem;
    }

/* RTL Support (add this if your site is primarily RTL) */
body {
    direction: rtl; /* لتغيير اتجاه النص والمكونات */
    text-align: right; /* لمحاذاة النص لليمين */
}

.navbar-nav {
    padding-right: 0; /* لإزالة البادئة الافتراضية لقائمة التنقل */
}

.navbar-toggler {
    margin-left: auto; /* لدفع الزر إلى اليسار في RTL */
}

.navbar-brand {
    margin-right: 0; /* لإزالة الهامش الأيمن الافتراضي */
    margin-left: 1rem; /* إضافة هامش أيسر */
}

.navbar-nav .nav-item {
    margin-left: 15px; /* مسافة بين العناصر */
    margin-right: 0;
}

    .navbar-nav .nav-item:last-child {
        margin-left: 0;
    }

/* --- Login Page Styles --- */

/* Container for centering the login card */
.login-container {
    min-height: calc(100vh - 180px); /* Adjust to ensure it fills the available space */
    padding: 30px 0; /* Add some vertical padding */
    background-color: #f0f2f5; /* Light background for the login page */
}

/* Login Card Styling */
.login-card {
    max-width: 450px; /* Max width for the card */
    width: 100%;
    border: none; /* Remove default border */
    border-radius: 10px; /* Rounded corners */
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1); /* Soft shadow */
    overflow: hidden; /* Ensure rounded corners apply to content */
}

.login-header {
    background-color: #007bff; /* Primary brand color for header */
    color: white;
    padding: 25px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-top-left-radius: 10px; /* Ensure header matches card radius */
    border-top-right-radius: 10px; /* Ensure header matches card radius */
}

    .login-header h2 {
        margin-bottom: 5px;
        font-size: 1.8rem;
        font-weight: 700;
    }

    .login-header p {
        font-size: 0.95rem;
        opacity: 0.9;
    }

.login-icon {
    font-size: 3.5rem; /* Large icon for branding */
    color: #ffffff; /* White icon color */
    margin-bottom: 15px;
}

/* Form Group Styles */
.form-group.mb-3,
.form-group.mb-4 {
    margin-bottom: 1.5rem !important; /* Consistent spacing */
}

.login-label {
    font-weight: 600; /* Bolder labels */
    color: #495057; /* Slightly darker grey for labels */
    margin-bottom: 8px; /* Space between label and input */
    display: block; /* Ensure label takes full width */
}

.login-input {
    border-radius: 8px; /* More rounded inputs */
    padding: 12px 15px; /* More padding for better feel */
    border: 1px solid #ced4da; /* Default border */
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04); /* Subtle inner shadow */
}

    .login-input:focus {
        border-color: #80bdff;
        box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.25);
        outline: none; /* Remove default focus outline */
    }

/* Validation Summary */
.login-validation-summary {
    margin-bottom: 20px;
    padding: 10px 15px;
    border-radius: 5px;
    background-color: #f8d7da; /* Light red background */
    color: #721c24; /* Dark red text */
    border: 1px solid #f5c6cb;
}

/* Login Button */
.login-btn {
    padding: 12px 25px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 8px; /* Matches input roundedness */
    background-color: #007bff;
    border-color: #007bff;
    transition: all 0.3s ease; /* Smooth transition for hover */
}

    .login-btn:hover {
        background-color: #0056b3;
        border-color: #0056b3;
        transform: translateY(-2px); /* Slight lift on hover */
        box-shadow: 0 4px 10px rgba(0, 123, 255, 0.2); /* Subtle shadow on hover */
    }

/* Card Footer for registration link */
.login-footer {
    background-color: #f8f9fa; /* Light grey background */
    padding: 15px 20px;
    border-top: 1px solid #e9ecef;
    border-bottom-left-radius: 10px; /* Ensure footer matches card radius */
    border-bottom-right-radius: 10px; /* Ensure footer matches card radius */
}

    .login-footer a {
        color: #007bff;
        text-decoration: none;
        font-weight: 500;
    }

        .login-footer a:hover {
            text-decoration: underline;
        }

/* Adjustments for RTL (if not already handled in general site.css) */
body {
    direction: rtl;
    text-align: right;
}

.login-label,
.login-btn {
    text-align: right; /* Ensure labels and buttons align right in RTL */
}

.login-container .card-header,
.login-container .card-footer {
    text-align: center; /* Keep header and footer text centered */
}

.form-group .text-danger {
    text-align: right; /* Align validation messages to the right */
    display: block; /* Ensure they are on their own line */
    margin-top: 5px;
    font-size: 0.85rem;
}

/* --- docIndex (Appointments List) Styles --- */

.page-title {
    color: #007bff; /* Primary blue color for titles */
    font-weight: 700;
    margin-bottom: 25px; /* Space below title */
}

.btn-add-new {
    background-color: #28a745; /* Green button for "Create New" */
    border-color: #28a745;
    padding: 10px 20px;
    font-weight: 600;
    transition: all 0.3s ease;
}

    .btn-add-new:hover {
        background-color: #218838;
        border-color: #1e7e34;
        transform: translateY(-2px);
        box-shadow: 0 4px 10px rgba(40, 167, 69, 0.2);
    }

.appointment-table-container {
    background-color: #ffffff; /* White background for the table container */
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08); /* Soft shadow for the table card */
    padding: 20px; /* Internal padding */
}

.appointment-table {
    margin-bottom: 0; /* Remove default table margin */
}

    .appointment-table thead th {
        background-color: #007bff; /* Dark header with brand color */
        color: white;
        font-weight: 600;
        padding: 12px 15px;
        border-bottom: none; /* Remove default border */
    }

    .appointment-table tbody tr {
        transition: background-color 0.2s ease;
    }

        .appointment-table tbody tr:hover {
            background-color: #f0f8ff; /* Light blue on hover for rows */
        }

    .appointment-table tbody td {
        padding: 12px 15px;
        vertical-align: middle; /* Align content vertically in the middle */
        border-top: 1px solid #e9ecef; /* Light border between rows */
    }

/* Status Badges */
.badge {
    padding: 0.6em 0.9em;
    border-radius: 0.375rem; /* Standard Bootstrap border-radius */
    font-size: 0.85em;
    font-weight: 600;
}

/* Actions Column (for dropdown button) */
.actions-column .dropdown-toggle {
    min-width: 120px; /* Ensure button has a consistent width */
}

.actions-column .dropdown-menu {
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    min-width: 220px; /* Ensure dropdown menu is wide enough */
}

.actions-column .dropdown-item {
    color: #333;
    padding: 10px 15px;
}

    .actions-column .dropdown-item:hover {
        background-color: #e9f5ff; /* Light blue hover for dropdown items */
        color: #007bff;
    }

    .actions-column .dropdown-item i {
        width: 20px; /* Fixed width for icons */
        text-align: center;
    }

/* Responsive Table (for small screens) */
@media (max-width: 768px) {
    .appointment-table thead {
        display: none; /* Hide table headers on small screens */
    }

    .appointment-table,
    .appointment-table tbody,
    .appointment-table tr,
    .appointment-table td {
        display: block; /* Make table elements behave like blocks */
        width: 100%;
    }

        .appointment-table tr {
            margin-bottom: 15px;
            border: 1px solid #dee2e6;
            border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
            background-color: #fff;
        }

        .appointment-table td {
            text-align: right; /* Align content to the right */
            padding-left: 15px;
            padding-right: 15px;
            position: relative;
            padding-inline-start: 50% !important; /* Make space for data-label */
        }

            /* Data label for responsive table */
            .appointment-table td::before {
                content: attr(data-label);
                position: absolute;
                right: 15px; /* Position label to the right in RTL */
                top: 12px;
                font-weight: 600;
                color: #007bff;
                width: 45%; /* Give label some width */
                text-align: left; /* Align label text to the left */
            }

    .actions-column {
        padding-top: 15px;
        padding-bottom: 15px;
        text-align: center;
    }

        .actions-column td::before {
            display: none; /* Hide data label for actions column */
        }
}




/* --- General Form Styles (can be reused across different forms) --- */

.form-card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08); /* Soft shadow for depth */
    overflow: hidden; /* Ensures rounded corners apply to header/footer */
}

.form-header {
    background-color: #007bff; /* Primary brand color */
    color: white;
    padding: 25px 20px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

    .form-header h2 {
        margin-bottom: 5px;
        font-size: 2rem; /* Larger title */
        font-weight: 700;
    }

    .form-header p {
        font-size: 0.95rem;
        opacity: 0.9;
    }

.form-header-icon {
    font-size: 3.5rem; /* Large icon for branding */
    color: #ffffff;
    margin-bottom: 15px;
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    display: block; /* Ensures label is on its own line */
}

.form-control {
    border-radius: 8px; /* More rounded inputs */
    padding: 12px 15px; /* More padding for better feel */
    border: 1px solid #ced4da;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease; /* Smooth transition on focus */
}

    .form-control:focus {
        border-color: #80bdff;
        box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.25);
        outline: none;
    }

textarea.form-control {
    min-height: 120px; /* Default height for textareas */
    resize: vertical; /* Allow vertical resizing only */
}

/* Validation Summary & Messages */
.form-validation-summary {
    margin-bottom: 20px;
    padding: 10px 15px;
    border-radius: 5px;
    background-color: #f8d7da; /* Light red background */
    color: #721c24; /* Dark red text */
    border: 1px solid #f5c6cb;
}

.text-danger {
    font-size: 0.875em;
    margin-top: 5px;
    display: block; /* Ensures validation messages appear on new line */
}

/* Submit Button */
.form-submit-btn {
    padding: 12px 25px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 8px;
    background-color: #28a745; /* Green color for submit */
    border-color: #28a745;
    transition: all 0.3s ease;
}

    .form-submit-btn:hover {
        background-color: #218838;
        border-color: #1e7e34;
        transform: translateY(-2px);
        box-shadow: 0 4px 10px rgba(40, 167, 69, 0.2);
    }

/* Back Button */
.form-back-btn {
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    color: #6c757d; /* Dark grey for outline button */
    border-color: #6c757d;
    transition: all 0.3s ease;
}

    .form-back-btn:hover {
        background-color: #e9ecef; /* Light grey hover */
        color: #495057;
        border-color: #495057;
    }

/* Alert for Appointment ID */
.alert-info {
    background-color: #e0f7fa; /* Light blue for info alerts */
    border-color: #b2ebf2;
    color: #006064;
    padding: 15px 20px;
    border-radius: 8px;
    font-weight: 500;
}

    .alert-info .fas {
        font-size: 1.3rem;
    }

/* RTL Adjustments (if not already covered in general site.css) */
body {
    direction: rtl;
    text-align: right;
}

.form-label,
.form-control,
.form-validation-summary,
.text-danger {
    text-align: right; /* Ensure text alignment for form elements */
}

.form-header {
    text-align: center; /* Keep header text centered */
}

.alert-info .fas {
    margin-right: 0; /* Override default Bootstrap margin-right for icons in RTL */
    margin-left: 0.5rem; /* Add margin-left for icons in RTL */
}

/* Ensure placeholder text aligns right in RTL */
input::placeholder,
textarea::placeholder {
    text-align: right;
}