/* General Body and Layout */
body {
    background-color: var(--bs-body-bg, #f4f7f9); /* Fallback color */
    color: var(--bs-body-color, #212529);      /* Fallback color */
    font-family: var(--bs-body-font-family, 'Poppins', sans-serif); /* Fallback font */
}
.container, .container-fluid { /* Ensure container-fluid also gets max-width if boxed */
    max-width: var(--layout-max-width, 1200px); /* Default max-width if not boxed */
}

/* Login Page Styling */
.login-container {
    max-width: 400px;
    margin: 10vh auto;
}
.login-wrapper {
    display: flex;
    height: 100vh;
    width: 100vw;
}
.login-image-side {
    flex: 1;
    background: url('https://images.unsplash.com/photo-1554224155-8d04cb21cd6c?q=80&w=2070&auto=format&fit=crop') no-repeat center center;
    background-size: cover;
}
.login-form-side {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa; 
}
.login-card {
    border: none;
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 1rem 3rem rgba(0,0,0,.1);
}
.form-floating > .form-control:focus ~ label {
    color: var(--bs-primary);
}
@media (max-width: 768px) {
    .login-image-side {
        display: none; 
    }
    .login-form-side {
        background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    }
}


/* Dashboard Analytics Cards (from dashboard.php) */
.stat-card {
    padding: 1rem;
    border-radius: var(--bs-border-radius);
    transition: transform 0.2s;
    box-shadow: 0 .15rem 1.75rem 0 rgba(58,59,69,.15)!important; /* Ensure shadow applies if enabled */
}
.stat-card:hover {
    transform: translateY(-5px);
}
.stat-card h6 {
    font-size: .75rem;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: .3rem;
}
.stat-card h4 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0;
}
a.stat-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}
a.stat-card-link:hover {
    color: inherit;
}


/* Dashboard Quick Menu Cards (from dashboard.php) */
.menu-card {
    border: 1px solid #e3e6f0;
    border-radius: var(--bs-border-radius);
    height: 100%; 
    display: flex; 
    flex-direction: column; 
}
.menu-card .card-header {
    padding: .75rem 1.25rem;
    font-weight: bold;
    color: white;
    border-bottom: 1px solid #e3e6f0;
    flex-shrink: 0; 
}
.menu-card .list-group {
    flex-grow: 1; 
}
.menu-card .list-group-item {
    border: none;
    padding: .6rem 1rem;
    font-size: 0.9rem; 
}
.menu-card .list-group-item a {
    text-decoration: none;
    color: #5a5c69; /* Default color, might be overridden by theme_text */
    display: block;
    transition: color 0.15s ease-in-out, transform 0.15s ease-in-out;
}
.menu-card .list-group-item a:hover {
    color: var(--bs-primary);
    transform: translateX(5px);
    font-weight: 500;
}


/* Table Design Fix */
.table-responsive {
    border: 1px solid #dee2e6;
    border-radius: var(--bs-border-radius); /* Use theme radius */
}


/* Feedback Toast Message */
.feedback-toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1100; /* Ensure it's above most elements, but below modals if needed */
}
.feedback-toast { /* This class might not be directly used if using Bootstrap's .toast */
    min-width: 250px;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}
.toast { /* Direct styling for Bootstrap toasts */
    opacity: 0; 
    transition: opacity 0.5s ease-in-out;
}
.toast.show {
    opacity: 1;
}


/* jQuery UI Autocomplete Styling Fix */
.ui-autocomplete {
    position: absolute;
    z-index: 1060 !important; /* High z-index */
    cursor: default;
    padding: 0;
    margin-top: 2px;
    list-style: none;
    background-color: var(--bs-body-bg); /* Use theme background */
    border: 1px solid var(--bs-border-color, #ccc); /* Use theme border color */
    border-radius: var(--bs-border-radius) !important; /* Use theme radius */
    box-shadow: var(--bs-card-shadow, 0 5px 10px rgba(0, 0, 0, 0.2)); /* Use theme shadow if enabled */
}
.ui-menu-item > a.ui-corner-all {
    display: block;
    padding: 0.375rem 0.75rem; /* Bootstrap-like padding */
    clear: both;
    font-weight: normal;
    line-height: 1.5;
    color: var(--bs-body-color) !important; /* Use theme text color */
    white-space: nowrap;
    text-decoration: none;
}
.ui-state-hover, 
.ui-state-active, 
.ui-widget-content .ui-state-hover,
.ui-widget-content .ui-state-focus { /* Added focus state */
    color: #ffffff !important; /* Text color for active/hover item */
    text-decoration: none;
    background-color: var(--bs-primary) !important; /* Use theme primary color */
    border-color: var(--bs-primary) !important; /* Use theme primary color for border */
    background-image: none;
}


/* Notification Dropdown Styling in Header */
.navbar .dropdown-menu-notifications {
    width: 350px; 
    max-height: 450px; 
    overflow-y: auto;
    padding: 0; 
    border-radius: var(--bs-border-radius);
    border: 1px solid var(--bs-border-color-translucent, rgba(0,0,0,.15)); /* Ensure border matches dropdowns */
    box-shadow: var(--bs-dropdown-box-shadow, 0 .5rem 1rem rgba(0,0,0,.175)); /* Ensure shadow matches dropdowns */
}
.navbar .dropdown-menu-notifications .dropdown-header {
    background-color: var(--bs-tertiary-bg, #f8f9fa); /* Use a subtle background */
    color: var(--bs-emphasis-color, #495057);   
    padding: 0.75rem 1rem;
    font-weight: 600;
    border-bottom: 1px solid var(--bs-border-color, #dee2e6);
    font-size: 0.9rem; /* Header font size */
}
.navbar .dropdown-menu-notifications .dropdown-item {
    white-space: normal; 
    padding: 0.75rem 1rem;
    font-size: 0.875rem; 
    border-bottom: 1px solid var(--bs-border-color-translucent, rgba(0,0,0,.075));
    transition: background-color 0.15s ease-in-out;
    color: var(--bs-dropdown-link-color, var(--bs-body-color)); /* Inherit dropdown link color */
}
.navbar .dropdown-menu-notifications .dropdown-item:last-child {
    border-bottom: none;
}
.navbar .dropdown-menu-notifications .dropdown-item:hover,
.navbar .dropdown-menu-notifications .dropdown-item:focus {
    background-color: var(--bs-dropdown-link-hover-bg, var(--bs-primary-bg-subtle)); 
    color: var(--bs-dropdown-link-hover-color, var(--bs-primary)); /* Hover text color */
}
.navbar .dropdown-menu-notifications .notification-message {
    display: block;
    /* color is inherited from .dropdown-item */
}
.navbar .dropdown-menu-notifications .notification-time {
    font-size: 0.75em;
    color: var(--bs-secondary-color, #6c757d);
    display: block;
    margin-top: 0.25rem;
}
.navbar .dropdown-menu-notifications .view-all-link {
    display: block;
    text-align: center;
    padding: 0.5rem 1rem;
    font-weight: 500;
    color: var(--bs-primary);
    background-color: var(--bs-tertiary-bg, #f8f9fa);
    border-top: 1px solid var(--bs-border-color, #dee2e6);
    font-size: 0.875rem;
}
.navbar .dropdown-menu-notifications .view-all-link:hover {
    background-color: var(--bs-light-bg-subtle, #fcfcfd);
    text-decoration: none;
}
.navbar .dropdown-menu-notifications .no-notifications {
    padding: 1rem;
    text-align: center;
    color: var(--bs-secondary-color, #6c757d);
    font-style: italic;
}


/* Dashboard Notification Card Specifics */
#dashboardNotificationCard .list-group-item {
    padding: 0.85rem 1.1rem; /* Slightly more padding */
}
#dashboardNotificationCard .list-group-item i.fa-lg { /* For icons in dashboard card */
    font-size: 1.35em; 
    width: 30px; 
    text-align: center;
    vertical-align: middle;
}
#dashboardNotificationCard .list-group-item p.small.notification-message { /* Target only the message paragraph */
    font-size: 0.9rem; 
}
#dashboardNotificationCard .list-group-item small.notification-time { /* Target only the time paragraph */
    font-size: 0.8rem; 
}
#dashboardNotificationCard .list-group-item-action:hover,
#dashboardNotificationCard .list-group-item-action:focus {
    background-color: var(--bs-primary-bg-subtle, #cfe2ff); /* Theme hover */
}
#dashboardNotificationCardInfo .fa-2x {
    font-size: 2.5em;
}


/* All Notifications Page Styling */
.all-notifications-page .list-group-item {
    margin-bottom: 0.75rem; /* More spacing */
    border-radius: var(--bs-border-radius);
    box-shadow: var(--bs-card-shadow-sm, 0 .125rem .25rem rgba(0,0,0,.075)); /* Subtle shadow */
}
.all-notifications-page .list-group-item.list-group-item-light {
    background-color: var(--bs-gray-100, #f8f9fa); /* Lighter for read */
    border-color: var(--bs-gray-300, #dee2e6);
}
.all-notifications-page .list-group-item.list-group-item-light .notification-message,
.all-notifications-page .list-group-item.list-group-item-light .notification-time,
.all-notifications-page .list-group-item.list-group-item-light small.mb-1 {
    color: var(--bs-gray-700, #495057); /* Darker text for read items */
}

.all-notifications-page .list-group-item.list-group-item-info { /* Unread items */
    border-left: 4px solid var(--bs-info, #0dcaf0);
}

.all-notifications-page .list-group-item h6.notification-message { /* Target the message h6 */
    font-size: 1rem;
}
.all-notifications-page .list-group-item small.mb-1 { /* "Type:" text */
    font-size: 0.85rem;
}
.all-notifications-page .list-group-item i.fa-lg { /* Icons on all_notifications page */
    font-size: 1.35em;
    width: 30px;
    text-align: center;
    vertical-align: middle;
}

/* General table input used in various forms */
.table-input { 
    padding: 0.25rem; 
    height: auto; 
    border-radius: var(--bs-form-control-border-radius, 4px); 
    border: 1px solid var(--bs-form-control-border-color, #ced4da); 
    width: 100%; 
}
.table-input.text-end { 
    text-align: right; 
}
.table-input:focus { 
    border-color: var(--bs-primary, #86b7fe); 
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb, 13, 110, 253), 0.25); 
    outline: 0; 
}
/* Ensure table cells with inputs are vertically aligned */
.table th, .table td { 
    vertical-align: middle; 
}