/* ========================================
   BMEDmgt - Global Styles
   ======================================== */

/* Base Reset */
body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #ecf0f1;
    color: #333;
    line-height: 1.5;
}

* {
    box-sizing: border-box;
}

/* ========================================
   Container & Page Layout
   ======================================== */

.container {
    max-width: 1200px;
    margin: 0px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.container-fluid {
    max-width: 100%;
    margin: 20px;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.container-narrow {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* ========================================
   Page Header
   ======================================== */

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.page-header h2 {
    margin: 0;
    color: #333;
    font-size: 24px;
}

.page-header h3 {
    margin: 0;
    color: #333;
    font-size: 20px;
}

.page-subtitle {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 14px;
}

.header-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ========================================
   Buttons
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    color: white;
    background-color: #007bff;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.btn-primary { background-color: #007bff; }
.btn-primary:hover { background-color: #0056b3; }

.btn-secondary { background-color: #6c757d; }
.btn-secondary:hover { background-color: #5a6268; }

.btn-success { background-color: #28a745; }
.btn-success:hover { background-color: #218838; }

.btn-info { background-color: #17a2b8; }
.btn-info:hover { background-color: #138496; }

.btn-warning { background-color: #ffc107; color: #333; }
.btn-warning:hover { background-color: #e0a800; }

.btn-danger { background-color: #dc3545; }
.btn-danger:hover { background-color: #c82333; }

.btn-light { background-color: #f8f9fa; color: #333; }
.btn-light:hover { background-color: #e2e6ea; }

.btn-outline {
    background: white;
    color: #333;
    border: 1px solid #ddd;
}
.btn-outline:hover {
    background: #f8f9fa;
}

.btn-outline-primary {
    background: white;
    color: #007bff;
    border: 1px solid #007bff;
}
.btn-outline-primary:hover {
    background: #007bff;
    color: white;
}

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

.btn-block { width: 100%; }

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ========================================
   Search Box & Filters
   ======================================== */

.search-box {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid #e9ecef;
}

.search-form .form-row,
.filter-form .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: stretch;
}

.search-form .form-group,
.filter-form .form-group {
    justify-content: flex-end;
}

.search-form .form-row.cols-2 { grid-template-columns: repeat(2, 1fr); }
.search-form .form-row.cols-3 { grid-template-columns: repeat(3, 1fr); }
.search-form .form-row.cols-4 { grid-template-columns: repeat(4, 1fr); }

.search-actions div {
    display: flex;
    gap: 10px;
}

.search-btn {
    margin-right: 5px;
}

/* ========================================
   Forms
   ======================================== */

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 15px;
}

.form-group label {
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.form-group label .required {
    color: #dc3545;
}

.form-control {
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
}

.form-control:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-control:disabled,
.form-control[readonly] {
    background-color: #e9ecef;
    color: #495057;
    cursor: not-allowed;
}

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

.form-text {
    font-size: 12px;
    color: #6c757d;
    margin-top: 4px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.form-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.form-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.form-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    margin-bottom: 20px;
}

.form-section h3 {
    margin: 0 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #007bff;
    color: #333;
    font-size: 16px;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
    padding-top: 15px;
    margin-top: 15px;
    border-top: 1px solid #eee;
}

.form-actions.right {
    justify-content: flex-end;
}

.form-actions.center {
    justify-content: center;
}

/* Readonly field style */
.readonly-field {
    background-color: #e9ecef;
    color: #495057;
    cursor: not-allowed;
}

/* Radio & Checkbox Groups */
.radio-group,
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.radio-label,
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.radio-label:hover,
.checkbox-label:hover {
    border-color: #007bff;
    background: #f0f7ff;
}

.radio-label:has(input:checked),
.checkbox-label:has(input:checked) {
    border-color: #007bff;
    background: #f0f7ff;
}

.radio-label input[type="radio"]:checked + span,
.checkbox-label input[type="checkbox"]:checked + span {
    color: #007bff;
    font-weight: 600;
}

/* ========================================
   Tables
   ======================================== */

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
}

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

.table th {
    background-color: #f2f2f2;
    font-weight: bold;
    color: #555;
    white-space: nowrap;
}

.table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.table tbody tr:hover {
    background-color: #f1f1f1;
}

.table a {
    color: #007bff;
    text-decoration: none;
}

.table a:hover {
    text-decoration: underline;
}

.table .actions {
    white-space: normal;
}

.table .actions a {
    color: white;
}

.table .checkbox-col {
    width: 40px;
    text-align: center;
}

.table .checkbox-col input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Truncated text in tables */
.trouble-desc,
.text-truncate {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Striped table */
.table-striped tbody tr:nth-child(odd) {
    background-color: #f9f9f9;
}

/* Hover effect */
.table-hover tbody tr:hover {
    background-color: #f1f1f1;
}

/* Compact table */
.table-sm th,
.table-sm td {
    padding: 6px 8px;
    font-size: 13px;
}

/* Responsive table wrapper */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ========================================
   Status Badges
   ======================================== */

.badge,
.status-badge,
.mgmt-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
    white-space: nowrap;
}

/* Status Colors */
.status-active,
.status-operational,
.badge-success { background: #d4edda; color: #155724; }

.status-inactive,
.status-pending,
.badge-warning { background: #fff3cd; color: #856404; }

.status-maintenance,
.status-under_repair,
.status-in_progress,
.badge-info { background: #cce5ff; color: #004085; }

.status-retired,
.status-decommissioned,
.status-cancelled,
.status-rejected,
.badge-danger { background: #f8d7da; color: #721c24; }

.status-completed,
.status-approved,
.badge-primary { background: #d4edda; color: #155724; }

/* Management Type Colors */
.mgmt-hospital_property { background: #d4edda; color: #155724; }
.mgmt-vendor_lease { background: #fff3cd; color: #856404; }
.mgmt-borrowed { background: #cce5ff; color: #004085; }
.mgmt-no_property { background: #e2e3e5; color: #383d41; }
.mgmt-project { background: #d1ecf1; color: #0c5460; }

/* Chinese Status Text Badges */
.status-未處理 { background: #fff3cd; color: #856404; }
.status-處理中 { background: #cce5ff; color: #004085; }
.status-已結案 { background: #d4edda; color: #155724; }
.status-待審核 { background: #fff3cd; color: #856404; }
.status-已審核 { background: #d4edda; color: #155724; }
.status-已退回 { background: #f8d7da; color: #721c24; }

/* Generic status helpers */
.status-done { background: #d4edda; color: #155724; }
.status-muted { background: #e2e8f0; color: #475569; }

/* Role Badges */
.role-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.role-admin {
    background-color: #dc3545;
    color: white;
}

.role-engineer {
    background-color: #17a2b8;
    color: white;
}

.role-user {
    background-color: #28a745;
    color: white;
}

.role-manager {
    background-color: #6f42c1;
    color: white;
}

/* ========================================
   Bulk Actions Bar
   ======================================== */

.bulk-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: #e3f2fd;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid #90caf9;
}

.bulk-info {
    font-weight: 500;
    color: #1565c0;
}

.bulk-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ========================================
   Cards
   ======================================== */

.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

.card-header {
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

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

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.stats-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.stats-value {
    font-size: 32px;
    font-weight: bold;
    color: #333;
}

.stats-label {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

/* KPI Cards */
.kpi-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.kpi-card {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-left: 4px solid #007bff;
}

.kpi-value {
    font-size: 28px;
    font-weight: bold;
    color: #333;
}

.kpi-label {
    font-size: 13px;
    color: #666;
}

/* Summary Cards */
.summary-card {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 18px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.summary-item .label {
    color: #94a3b8;
    font-size: 13px;
    text-transform: uppercase;
}

.summary-item strong {
    font-size: 22px;
    color: #0f172a;
}

/* ========================================
   Modals
   ======================================== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 8px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.close-btn,
.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    line-height: 1;
    padding: 0;
}

.close-btn:hover,
.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

.modal-body p {
    margin-bottom: 15px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid #eee;
}

/* ========================================
   Alerts & Messages
   ======================================== */

.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-info {
    background: #cce5ff;
    color: #004085;
    border: 1px solid #b8daff;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.alert-danger,
.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.error-message {
    color: #dc3545;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.success-message {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.no-data {
    text-align: center;
    color: #666;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 8px;
}

/* ========================================
   Pagination
   ======================================== */

.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 20px;
    padding: 10px 0;
}

.pagination a,
.pagination span {
    padding: 8px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    transition: all 0.2s;
}

.pagination a:hover {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.pagination .active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.pagination .disabled {
    color: #999;
    cursor: not-allowed;
}

/* Alternative pagination layout */
.pagination-info {
    color: #666;
    font-size: 14px;
}

.pagination-controls {
    display: flex;
    gap: 5px;
    align-items: center;
}

.pagination-controls .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-indicator {
    padding: 5px 12px;
    font-weight: bold;
    color: #333;
}

/* Full-width pagination bar */
.pagination.pagination-bar {
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 5px;
}

/* ========================================
   Tabs
   ======================================== */

.tabs {
    display: flex;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 20px;
}

.tab {
    padding: 10px 20px;
    text-decoration: none;
    color: #666;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.tab:hover {
    color: #007bff;
}

.tab.active {
    color: #007bff;
    border-bottom-color: #007bff;
    font-weight: 600;
}

/* ========================================
   Autocomplete
   ======================================== */

.autocomplete-wrapper {
    position: relative;
}

.autocomplete-suggestions,
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 250px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ced4da;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 1000;
    display: none;
}

.autocomplete-suggestions.show,
.autocomplete-dropdown.show {
    display: block;
}

.autocomplete-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.active {
    background-color: #e9ecef;
}

.autocomplete-item .item-main {
    font-weight: 500;
    color: #333;
}

.autocomplete-item .item-sub {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

.autocomplete-item .item-code {
    font-size: 11px;
    color: #999;
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 8px;
}

.autocomplete-loading {
    padding: 10px;
    text-align: center;
    color: #666;
}

.autocomplete-no-results,
.autocomplete-item.no-result {
    padding: 10px;
    text-align: center;
    color: #999;
    font-style: italic;
    cursor: default;
}

.autocomplete-item.no-result:hover {
    background: transparent;
}

/* ========================================
   Detail View
   ======================================== */

.detail-section {
    margin-bottom: 30px;
}

.detail-section h3 {
    font-size: 16px;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #007bff;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.detail-item {
    background: #f8f9fa;
    padding: 12px 15px;
    border-radius: 6px;
    border-left: 3px solid #007bff;
}

.detail-item .label {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

.detail-item .value {
    font-size: 15px;
    color: #333;
    font-weight: 500;
}

/* ========================================
   Loading & Spinners
   ======================================== */

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.spinner {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================
   Utilities
   ======================================== */

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

.text-primary { color: #007bff; }
.text-success { color: #28a745; }
.text-warning { color: #ffc107; }
.text-danger { color: #dc3545; }
.text-muted { color: #6c757d; }

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

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

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

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

.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.align-center { align-items: center; }

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

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

/* ========================================
   Sidebar Styles
   ======================================== */

/* 可收合選單樣式 */
.sidebar-nav > ul > li {
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.sidebar-dropdown > a {
    position: relative;
    cursor: pointer;
}

.sidebar-dropdown > a::after {
    content: '▶';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    transition: transform 0.2s ease;
    opacity: 0.7;
}

.sidebar-submenu {
    display: none;
    list-style: none;
    padding: 0;
    margin: 0;
    background-color: rgba(0,0,0,0.15);
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.sidebar-submenu li a {
    padding: 8px 16px 8px 35px !important;
    font-size: 12px !important;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.sidebar-submenu li a:hover {
    background-color: rgba(52, 152, 219, 0.3) !important;
    border-left-color: #3498db;
}

.sidebar-dropdown.open > a {
    background-color: rgba(52, 152, 219, 0.2);
}

.sidebar-dropdown.open > a::after {
    transform: translateY(-50%) rotate(90deg);
}

.sidebar-dropdown.open .sidebar-submenu {
    display: block;
}

/* 選單圖標樣式 */
.menu-icon {
    margin-right: 10px;
    font-style: normal;
    font-size: 14px;
}

/* 側邊欄底部連結 */
.sidebar-footer-links {
    display: flex;
    justify-content: space-around;
    padding: 15px 10px;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 10px;
    background-color: rgba(0,0,0,0.1);
}

.sidebar-footer-links a {
    color: #ecf0f1;
    text-decoration: none;
    font-size: 13px;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background-color 0.2s ease;
}

.sidebar-footer-links a:hover {
    background-color: rgba(255,255,255,0.1);
}

.sidebar-footer-links .logout-link:hover {
    background-color: rgba(231, 76, 60, 0.3);
}

/* ========================================
   Responsive Styles
   ======================================== */

@media (max-width: 768px) {
    .container {
        margin: 10px;
        padding: 15px;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-actions {
        width: 100%;
    }

    .header-actions .btn {
        flex: 1;
    }

    .search-form .form-row,
    .filter-form .form-row {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .bulk-actions-bar {
        flex-direction: column;
        gap: 10px;
    }

    .bulk-buttons {
        width: 100%;
        justify-content: center;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .kpi-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .summary-card {
        grid-template-columns: repeat(2, 1fr);
    }

    .modal-content {
        margin: 10px;
        max-width: calc(100% - 20px);
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }

    .pagination {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .stats-grid,
    .kpi-cards,
    .summary-card {
        grid-template-columns: 1fr;
    }

    .btn-group {
        flex-direction: column;
    }

    .btn-group .btn {
        width: 100%;
    }
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
    .sidebar,
    .main-header,
    .main-footer,
    .fab-container,
    .bulk-actions-bar,
    .btn,
    .search-box,
    .pagination {
        display: none !important;
    }

    .main-content-wrapper {
        margin-left: 0 !important;
    }

    .container {
        box-shadow: none;
        margin: 0;
        padding: 0;
    }

    .table {
        page-break-inside: auto;
    }

    .table tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }
}
