/* ==========================================
   AFAMPOS2.0 - COMPREHENSIVE STYLESHEET
   ========================================== */

:root {
    --primary: #A8763E;
    --primary-dark: #6F1A07;
    --cream: #F7F3E3;
    --light-gray: #ECF0F1;
    --dark: #2B2118;
    --white: #ffffff;
    --light-bg: #f9f9f9;
}

/* ==========================================
   RESET & BASE STYLES
   ========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
    color: var(--dark);
    line-height: 1.6;
    transition: all 0.3s ease;
}

/* ==========================================
   DARK MODE STYLES
   ========================================== */

body.dark-mode {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

body.dark-mode .card {
    background-color: #2d2d2d;
    color: #e0e0e0;
    border-color: #404040;
}

body.dark-mode .sidebar {
    background: #0f0f0f;
}

body.dark-mode .table {
    color: #e0e0e0;
}

body.dark-mode .table-hover tbody tr:hover {
    background-color: #333;
}

body.dark-mode .form-control,
body.dark-mode .form-select {
    background-color: #2d2d2d;
    color: #e0e0e0;
    border-color: #404040;
}

body.dark-mode .modal-content {
    background-color: #2d2d2d;
    color: #e0e0e0;
}

body.dark-mode .modal-header {
    border-bottom-color: #404040;
}

body.dark-mode .modal-footer {
    border-top-color: #404040;
}

body.dark-mode .badge {
    background-color: #404040;
}

body.dark-mode .alert {
    background-color: #2d2d2d;
    color: #e0e0e0;
    border-color: #404040;
}

/* ==========================================
   DROPDOWN MENU STYLES
   ========================================== */

.dropdown-toggle {
    padding: 8px 16px !important;
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    background: none;
    border: none;
}

.dropdown-toggle:hover {
    color: white !important;
    transform: translateY(-1px);
}

.user-role-badge {
    background: rgba(255, 255, 255, 0.25);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 600;
    margin-left: 4px;
}

.dropdown-menu {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    min-width: 200px;
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 1000;
    animation: slideDown 0.2s ease-out;
    list-style: none !important;
    padding: 8px 0 !important;
    margin: 5px 0 0 0 !important;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.2s ease-out;
    pointer-events: none;
}

.dropdown-menu.show {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-menu li {
    list-style: none !important;
    margin: 0;
    padding: 0;
}

.dropdown-item {
    padding: 10px 20px;
    color: #333;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background-color: #f5f5f5;
    color: var(--primary);
}

.dropdown-item i {
    width: 18px;
    text-align: center;
}

.dropdown-divider {
    margin: 5px 0 !important;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-menu[data-bs-popper] {
    transform: none !important;
}

.navbar-nav .dropdown-menu {
    margin-top: 5px;
}

.dropdown-item {
    padding: 12px 16px;
    color: var(--dark);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.dropdown-item:hover {
    background: #f5f5f5;
    color: var(--primary);
}

.dropdown-item i {
    width: 16px;
    text-align: center;
}

.dropdown-divider {
    margin: 8px 0;
    background: #e0e0e0;
}

/* ==========================================
   MODAL STYLES - BOOTSTRAP OVERRIDE
   ========================================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1050;
    display: none;
    width: 100%;
    height: 100%;
    overflow: hidden;
    outline: 0;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal.show {
    overflow-y: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-dialog {
    position: relative;
    width: auto;
    margin: 1.75rem auto;
    max-width: 90vw;
    max-height: calc(100vh - 3.5rem);
}

.modal-dialog-lg {
    max-width: 800px;
}

.modal-dialog-md {
    max-width: 600px;
}

.modal-dialog-sm {
    max-width: 400px;
}

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    pointer-events: auto;
    background-color: white;
    background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 0.375rem;
    outline: 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.16);
    max-height: calc(100vh - 3.5rem);
    overflow-y: auto;
}

.modal-header {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    border-top-left-radius: calc(0.375rem - 1px);
    border-top-right-radius: calc(0.375rem - 1px);
}

.modal-title {
    margin-bottom: 0;
    line-height: 1.5;
    font-size: 1.25rem;
    font-weight: 500;
}

.modal-body {
    position: relative;
    flex: 1 1 auto;
    padding: 1rem;
}

.modal-footer {
    display: flex;
    flex-shrink: 0;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    padding: 0.75rem;
    border-top: 1px solid #dee2e6;
    border-bottom-right-radius: calc(0.375rem - 1px);
    border-bottom-left-radius: calc(0.375rem - 1px);
}

.btn-close {
    box-sizing: content-box;
    width: 1em;
    height: 1em;
    padding: 0.25em 0.25em;
    color: #000;
    background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 2l12 12M14 2L2 14'/%3e%3c/svg%3e") center / 1em auto no-repeat;
    border: 0;
    border-radius: 0.25rem;
    opacity: 0.5;
    cursor: pointer;
    transition: opacity 0.15s linear;
}

.btn-close:hover {
    opacity: 0.75;
}

.modal.fade {
    transition: opacity 0.15s linear;
    opacity: 0;
}

.modal.fade.show {
    opacity: 1;
}

/* ==========================================
   MODAL BACKDROP
   ========================================== */

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1040;
    width: 100vw;
    height: 100vh;
    background-color: #000;
    display: none;
}

.modal-backdrop.show {
    display: block;
    opacity: 0.5;
}

/* ==========================================
   NAVBAR BUTTON STYLES
   ========================================== */

.nav-link.btn-link {
    background: none;
    border: none;
    padding: 8px 12px !important;
    color: rgba(255, 255, 255, 0.85) !important;
    text-decoration: none;
}

/* ==========================================
   NAVBAR/HEADER LAYOUT
   ========================================== */

.navbar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    padding: 15px 0 !important;
    min-height: 70px;
}

.navbar-brand {
    font-weight: 700 !important;
    font-size: 22px !important;
    color: white !important;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-right: 30px;
    text-decoration: none;
}

.company-logo {
    max-height: 45px;
    width: auto;
    border-radius: 3px;
}

.navbar-collapse {
    justify-content: flex-end;
}

.navbar-nav {
    align-items: center;
    gap: 20px;
    list-style: none;
}

.nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    transition: all 0.3s;
    padding: 8px 12px !important;
    text-decoration: none;
}

.nav-link:hover {
    color: white !important;
    transform: translateY(-1px);
}

.user-info {
    color: white;
    font-size: 13px;
    text-align: right;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    border-left: 2px solid rgba(255, 255, 255, 0.3);
}

.user-badge {
    background: rgba(255, 255, 255, 0.25);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    text-transform: uppercase;
    margin-top: 4px;
    font-weight: 600;
    display: inline-block;
}

/* ==========================================
   MAIN CONTAINER LAYOUT
   ========================================== */

.container-main {
    display: flex;
    min-height: calc(100vh - 80px);
    width: 100%;
    gap: 0;
}

/* ==========================================
   SIDEBAR STYLES
   ========================================== */

.sidebar {
    width: 260px;
    background: white;
    box-shadow: 3px 0 8px rgba(0, 0, 0, 0.08);
    overflow-y: auto;
    border-right: 2px solid var(--cream);
    flex-shrink: 0;
}

.sidebar-menu {
    list-style: none;
    padding: 20px 0;
    margin: 0;
}

.sidebar-menu li {
    margin: 0;
}

.menu-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #ddd, transparent);
    margin: 15px 15px;
}

.menu-section-title {
    padding: 15px 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.menu-section-title i {
    font-size: 13px;
    opacity: 0.7;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #555;
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    font-weight: 500;
    font-size: 14px;
}

.sidebar-menu a:hover {
    background: #f5f5f5;
    color: var(--primary);
    border-left-color: var(--primary);
    padding-left: 19px;
}

.sidebar-menu a.active {
    background: linear-gradient(90deg, rgba(168, 118, 62, 0.1), transparent);
    color: var(--primary);
    border-left-color: var(--primary);
    font-weight: 600;
    padding-left: 19px;
}

.sidebar-menu i {
    width: 18px;
    text-align: center;
    font-size: 14px;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ==========================================
   MAIN LAYOUT STYLES
   ========================================== */

.main-content {
    display: flex;
    min-height: calc(100vh - 70px);
    width: 100%;
}

.content-wrapper {
    flex: 1;
    padding: 20px;
    background-color: #f5f5f5;
    overflow-y: auto;
}

.content-wrapper .row {
    display: flex;
}

.content-wrapper .row > [class*="col-"] {
    display: flex;
    flex-direction: column;
}

/* ==========================================
   CONTENT AREA STYLES
   ========================================== */

.content {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
    background-color: var(--light-bg);
    width: 100%;
}

.content h1, .content h2, .content h3, .content h4, .content h5, .content h6 {
    color: var(--dark);
    margin-bottom: 20px;
    font-weight: 600;
}

/* ==========================================
   CARD STYLES
   ========================================== */

.card {
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-radius: 10px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    background: white;
    overflow: hidden;
}

.card:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.card-header {
    background: linear-gradient(135deg, rgba(168, 118, 62, 0.1), rgba(111, 26, 7, 0.05));
    border-bottom: 2px solid var(--cream);
    padding: 20px;
    font-weight: 600;
    color: var(--dark);
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 15px 20px;
    background: #f9f9f9;
    border-top: 1px solid #e0e0e0;
}

/* ==========================================
   BUTTON STYLES
   ========================================== */

.btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: 1px solid var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(168, 118, 62, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--light-gray);
    color: var(--dark);
    border: 1px solid var(--light-gray);
}

.btn-secondary:hover {
    background: #d0d0d0;
    border-color: #d0d0d0;
}

.btn-danger {
    background: #e74c3c;
    color: white;
    border: 1px solid #e74c3c;
}

.btn-danger:hover {
    background: #c0392b;
    border-color: #c0392b;
}

.btn-success {
    background: #27ae60;
    color: white;
    border: 1px solid #27ae60;
}

.btn-success:hover {
    background: #229954;
    border-color: #229954;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 16px;
}

/* ==========================================
   FORM STYLES
   ========================================== */

.form-group {
    margin-bottom: 20px;
}

.form-label {
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--dark);
    display: block;
}

.form-control,
.form-select {
    border: 1.5px solid #ddd;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 14px;
    background-color: white;
    color: var(--dark);
    transition: all 0.3s ease;
    width: 100%;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(168, 118, 62, 0.1);
    outline: none;
}

.form-control::placeholder {
    color: #999;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* ==========================================
   TABLE STYLES
   ========================================== */

.table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: 20px;
}

.table thead th {
    background: linear-gradient(135deg, rgba(168, 118, 62, 0.1), rgba(111, 26, 7, 0.05));
    color: var(--dark);
    font-weight: 600;
    border: none;
    padding: 15px;
    text-align: left;
}

.table tbody td {
    padding: 12px 15px;
    border-color: #f0f0f0;
    vertical-align: middle;
}

.table tbody tr:hover {
    background: #f9f9f9;
}

/* ==========================================
   BADGE & ALERT STYLES
   ========================================== */

.badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
}

.badge-primary {
    background: var(--primary);
    color: white;
}

.badge-success {
    background: #27ae60;
    color: white;
}

.badge-danger {
    background: #e74c3c;
    color: white;
}

.badge-warning {
    background: #f39c12;
    color: white;
}

.alert {
    border-radius: 8px;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: 20px;
    padding: 15px 20px;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
}

.alert-success {
    background: #d4edda;
    color: #155724;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
}

/* ==========================================
   DARK MODE STYLES
   ========================================== */

body.dark-mode {
    background-color: #1a1a1a;
    color: #f0f0f0;
}

body.dark-mode .navbar {
    background: linear-gradient(135deg, #3d2817 0%, #2a1810 100%);
}

body.dark-mode .sidebar {
    background: #222;
    border-right-color: #333;
}

body.dark-mode .sidebar-menu a {
    color: #bbb;
}

body.dark-mode .sidebar-menu a:hover {
    background: #333;
    color: #d4a574;
}

body.dark-mode .sidebar-menu a.active {
    background: rgba(168, 118, 62, 0.2);
    color: #d4a574;
}

body.dark-mode .content {
    background-color: #1a1a1a;
}

body.dark-mode .card {
    background: #2a2a2a;
    color: #f0f0f0;
}

body.dark-mode .card-header {
    background: rgba(168, 118, 62, 0.15);
    border-bottom-color: #444;
}

body.dark-mode .card-footer {
    background: #333;
    border-top-color: #444;
}

body.dark-mode .form-control,
body.dark-mode .form-select {
    background-color: #2a2a2a;
    color: #f0f0f0;
    border-color: #444;
}

body.dark-mode .form-control:focus,
body.dark-mode .form-select:focus {
    background-color: #2a2a2a;
    color: #f0f0f0;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(168, 118, 62, 0.2);
}

body.dark-mode .table {
    background: #2a2a2a;
    color: #f0f0f0;
}

body.dark-mode .table thead th {
    background: rgba(168, 118, 62, 0.2);
}

body.dark-mode .table tbody tr:hover {
    background: #333;
}

body.dark-mode .user-info {
    background: rgba(0, 0, 0, 0.3);
    border-left-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .menu-divider {
    background: linear-gradient(90deg, transparent, #444, transparent);
}

body.dark-mode .menu-section-title {
    color: #d4a574;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6 {
    color: #f0f0f0;
}

/* ==========================================
   UTILITY CLASSES
   ========================================== */

.text-center { text-align: center; }
.text-end { text-align: right; }
.text-start { text-align: left; }

.text-muted { color: #999; }
.text-danger { color: #e74c3c; }
.text-success { color: #27ae60; }
.text-primary { color: var(--primary); }

.d-flex { display: flex; }
.d-grid { display: grid; }
.d-none { display: none; }
.d-block { display: block; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }

.align-items-center { align-items: center; }
.align-items-start { align-items: flex-start; }
.align-items-end { align-items: flex-end; }

.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }
.justify-content-start { justify-content: flex-start; }
.justify-content-end { justify-content: flex-end; }

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }

.p-0 { padding: 0; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

.rounded { border-radius: 6px; }
.rounded-lg { border-radius: 10px; }

.shadow-sm { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); }
.shadow { box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12); }

/* ==========================================
   FOOTER STYLES
   ========================================== */

.footer {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 40px 0 0;
    margin-top: 60px;
    border-top: 3px solid var(--primary-dark);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    padding: 40px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-section h6 {
    font-weight: 600;
    margin-bottom: 15px;
    color: white;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.footer-section p {
    font-size: 14px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 10px;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-section ul li a:hover {
    color: white;
    padding-left: 5px;
}

.footer-bottom {
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.3s;
}

.footer-bottom a:hover {
    color: white;
    text-decoration: underline;
}

/* Dark mode footer */
body.dark-mode .footer {
    background: linear-gradient(135deg, #3d2817 0%, #2a1810 100%);
    border-top-color: #1a1a1a;
}

body.dark-mode .footer-bottom {
    background: rgba(0, 0, 0, 0.5);
}

/* ==========================================
   DASHBOARD CARD ICONS
   ========================================== */

.card-icon {
    font-size: 32px;
    color: var(--primary);
    margin-bottom: 10px;
}

.card-stat {
    padding: 30px;
    text-align: center;
}

.card-stat .card-icon {
    font-size: 48px;
}

.card-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark);
    margin: 10px 0;
}

.card-stat-label {
    font-size: 14px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

body.dark-mode .card-stat-value {
    color: #f0f0f0;
}

body.dark-mode .card-stat-label {
    color: #aaa;
}

/* ==========================================
   SIDEBAR ICONS
   ========================================== */

.sidebar-menu i {
    width: 18px;
    text-align: center;
    font-size: 14px;
    transition: all 0.3s;
}

.sidebar-menu a:hover i {
    transform: scale(1.15);
}

.sidebar-menu a.active i {
    color: var(--primary);
    font-weight: 600;
}

/* ==========================================
   FORM MODAL FIX
   ========================================== */

/* Hide forms by default */
.modal-form,
.form-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    align-items: center;
    justify-content: center;
}

.modal-form.show,
.form-container.show {
    display: flex;
}

.modal-form .modal-dialog,
.form-container .modal-dialog {
    position: relative;
    width: 90%;
    max-width: 600px;
    margin: 0;
}

/* Ensure inline forms are hidden */
.form-inline {
    display: none !important;
}

.form-inline.show {
    display: block !important;
}



@media (max-width: 992px) {
    .navbar-collapse {
        justify-content: flex-start;
    }

    .navbar-nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .container-main {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        max-height: 300px;
        border-right: none;
        border-bottom: 2px solid var(--cream);
    }

    .content {
        padding: 20px;
    }

    .navbar-brand {
        font-size: 18px;
        margin-right: 15px;
    }

    .navbar-brand span {
        display: none;
    }

    .user-info {
        display: none;
    }

    .card {
        margin-bottom: 15px;
    }

    .form-control,
    .form-select {
        padding: 8px 10px;
    }

    .table {
        font-size: 12px;
    }

    .table thead th,
    .table tbody td {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .content {
        padding: 15px;
    }

    .navbar {
        padding: 10px 0;
        min-height: 60px;
    }

    .navbar-brand {
        font-size: 16px;
    }

    .sidebar-menu a {
        padding: 10px 15px;
        font-size: 12px;
    }

    .menu-section-title {
        padding: 12px 15px;
        font-size: 10px;
    }

    .btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .card {
        border-radius: 8px;
    }
}

/* ==========================================
   PRINT MEDIA QUERIES
   ========================================== */

@media print {
    .navbar,
    .sidebar,
    #floating-theme-btn,
    .btn-close,
    [data-bs-dismiss],
    .btn-print,
    .no-print,
    .hide-on-print {
        display: none !important;
    }

    .container-main {
        flex-direction: column;
    }

    .content {
        width: 100%;
        padding: 0;
    }

    body {
        background: white;
    }

    .modal {
        display: block !important;
        position: static;
        background: white;
        box-shadow: none;
    }

    .modal-dialog {
        max-width: 100%;
        margin: 0;
    }

    table {
        border-collapse: collapse;
        width: 100%;
    }

    th, td {
        border: 1px solid #ddd;
        padding: 8px;
        text-align: left;
    }

    th {
        background-color: #f0f0f0;
        font-weight: bold;
    }

    .card {
        page-break-inside: avoid;
        break-inside: avoid;
    }
}
