.rtl {
    direction: rtl;
    text-align: right;
}

.ltr {
    direction: ltr;
    text-align: left;
}
/* General Reset & Base Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; /* Bootstrap's default font stack */
    background-color: #fdfeff; /* Lighter, modern background */
    color: #191a1a;
    line-height: 1.6;
    padding-top: 0px; /* Adjusted for a slightly taller navbar or more breathing room */
    direction: rtl; /* Reinforce RTL */
    
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-weight: 500; /* Slightly less bold for a cleaner look */
    color: #2c3e50; /* Darker, slightly desaturated blue/grey */
}

h1 { font-size: 2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.5rem; }

/* Links */
a {
    color: #007bff; /* Bootstrap primary blue */
    text-decoration: none;
}
a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Navbar */
.navbar.fixed-top {
    min-height: 56px;
    background-color: #343a40 !important; /* Dark background for navbar */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding-left: 40px;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.25rem;
    color: #f8f9fa !important;
}

.navbar .nav-link {
    color: #adb5bd !important; /* Lighter grey for non-active links */
    padding: 0.8rem 1rem;
    font-weight: 500;
}

.navbar .nav-link.active,
.navbar .nav-link:hover,
.navbar .nav-link:focus {
    color: #ffffff !important; /* White for active/hover links */
}

.navbar-toggler {
    border-color: rgba(255,255,255,0.1);
}
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Dropdown menu in navbar */
.dropdown-menu {
    border-radius: 0.25rem;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15);
    border: none;
}
.dropdown-item {
    padding: 0.5rem 1rem;
    color: #333 !important; /* Ensure dropdown text is dark on light background */
}
.dropdown-item:hover, .dropdown-item:focus {
    background-color: #e9ecef;
    color: #1e2125 !important;
}

/* Content Wrapper */
.content-wrapper {
    padding: 25px;
    background-color: #ffffff;
    margin: 20px;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0,0,0,0.05);
    min-height: calc(100vh - 70px - 70px); /* Full height minus navbar and footer approx */
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    margin-bottom: 1.5rem;
    border-radius: 0.5rem;
}
.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    font-weight: 500;
    padding: 0.75rem 1.25rem;
}
.card-body {
    padding: 1.25rem;
}

/* Tables */
.table {
    margin-bottom: 0;
}
.table th, .table td {
    vertical-align: middle;
    padding: 0.9rem;
    border-top: 1px solid #e9ecef; /* Lighter table lines */
}
.table th {
    font-weight: 500;
    color: #495057;
}
.table-hover tbody tr:hover {
    background-color: #f1f3f5;
}
.table thead.table-dark th {
    background-color: #495057;
    border-color: #5a6268;
    color: #fff;
}
.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0,0,0,.025); /* Softer stripe */
}

/* Forms */
.form-label {
    font-weight: 500;
    margin-bottom: 0.3rem;
    color: #495057;
}
.form-control, .form-select {
    border-radius: 0.25rem;
    border: 1px solid #ced4da;
    padding: 0.5rem 0.75rem;
    transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
    background-position: left .75rem center;
}
.form-control:focus, .form-select:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}
.form-control-sm, .form-select-sm {
    padding: 0.35rem 0.6rem;
}
fieldset {
    border: 1px solid #e0e0e0;
    padding: 1.5rem !important;
    margin-bottom: 1.5rem;
    border-radius: 0.375rem;
}
legend {
    font-size: 1rem;
    font-weight: 500;
    padding: 0 0.5rem;
    width: auto;
    color: #007bff;
}

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    letter-spacing: 0.5px;
}
.btn-sm {
    padding: 0.35rem 0.75rem;
}
.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}
.btn-primary:hover {
    background-color: #0069d9;
    border-color: #0062cc;
}

/* Modals */
.modal-content {
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 1.5rem;
}
.modal-title {
    font-weight: 500;
}
.modal-body {
    padding: 1.5rem;
}
.modal-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    padding: 1rem 1.5rem;
}

/* Alerts */
.alert {
    border-radius: 0.375rem;
    padding: 1rem 1.25rem;
    border-width: 0; /* Remove border if using background colors */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Footer */
footer.fixed-bottom {
    background-color: #ffffff; /* Cleaner footer */
    border-top: 1px solid #dee2e6;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.05);
    padding-top: 1rem; /* Bootstrap's py-4 is quite large, this overrides */
    padding-bottom: 1rem;
}
footer.fixed-bottom .text-muted {
    color: #6c757d !important;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    body {
        padding-top: 0px; /* Default BS navbar height for smaller screens */
    }
    .content-wrapper {
        margin: 10px;
        padding: 15px;
        min-height: calc(100vh - 56px - 60px); /* Adjust for smaller navbar/footer */
    }
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.6rem; }
    h3 { font-size: 1.3rem; }
}

@media (max-width: 576px) {
    .form-control, .form-select, .btn {
        font-size: 0.9rem;
    }
    .card-body, .modal-body, .modal-footer, .modal-header {
        padding: 1rem;
    }
    .content-wrapper {
        margin: 0;
        border-radius: 0;
        box-shadow: none;
        padding: 10px;
    }
}

/* Utility classes (optional, Bootstrap has many) */
.text-small {
    font-size: 0.875em;
}
.fw-medium { /* Bootstrap 5 has fw-semibold, fw-bold. This is an alternative. */
    font-weight: 500;
}

