/* ==========================================================================
   Howrah Lions Hospital (Charushila Manmathanath Dey Memorial Unit)
   Master Design System & Stylesheet
   ========================================================================== */

:root {
    --primary: #0f4c81;
    --primary-dark: #092c4c;
    --primary-light: #e0f2fe;
    --secondary: #0284c7;
    --accent-red: #e63946;
    --accent-green: #10b981;
    --accent-orange: #f59e0b;
    --accent-purple: #8b5cf6;
    --accent-rose: #f43f5e;
    --bg-main: #0b1329;
    --bg-card: #111c38;
    --bg-card-hover: #172447;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-light: rgba(255, 255, 255, 0.15);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dark: #1e293b;
    --glass-bg: rgba(17, 28, 56, 0.75);
    --glass-border: rgba(255, 255, 255, 0.12);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.2);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.3);
    --shadow-lg: 0 16px 40px rgba(0,0,0,0.4);
    --sidebar-width: 270px;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #0b1329;
}
::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #334155;
}

/* App Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #0d1730 0%, #080e1e 100%);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    overflow-y: auto;
}

.sidebar-brand {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid var(--border-color);
}

.brand-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--accent-red), #b91c1c);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.4);
}

.brand-text h2 {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #fff;
}

.brand-text span {
    font-size: 10px;
    color: #38bdf8;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    display: block;
}

.nav-menu {
    list-style: none;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.nav-menu li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.nav-menu li a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.nav-menu li a.active {
    color: #fff;
    background: linear-gradient(90deg, rgba(2, 132, 199, 0.25) 0%, rgba(2, 132, 199, 0.08) 100%);
    border-left: 3px solid #38bdf8;
    font-weight: 600;
}

.nav-menu li a i {
    font-size: 16px;
    width: 22px;
    text-align: center;
    color: var(--text-muted);
}

.nav-menu li a.active i {
    color: #38bdf8;
}

.badge-nav {
    margin-left: auto;
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: 700;
}

.badge-free {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-special {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-blood {
    background: rgba(244, 63, 94, 0.2);
    color: #fb7185;
    border: 1px solid rgba(244, 63, 94, 0.3);
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    font-size: 11px;
    color: #64748b;
    line-height: 1.4;
}

.sidebar-footer strong {
    color: #94a3b8;
}

/* Main Content Area */
.main-wrapper {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: calc(100% - var(--sidebar-width));
    max-width: calc(100% - var(--sidebar-width));
    overflow-x: hidden;
}

/* Top Navigation Bar */
.topbar {
    min-height: 65px;
    height: auto;
    background: rgba(13, 23, 48, 0.92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 90;
    width: 100%;
    box-sizing: border-box;
}

.topbar-left {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.hospital-live-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    font-weight: 600;
    color: #34d399;
    background: rgba(16, 185, 129, 0.12);
    padding: 5px 12px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(16, 185, 129, 0.25);
    white-space: nowrap;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: #34d399;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7);
    animation: pulse-ring 1.8s infinite;
}

@keyframes pulse-ring {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.topbar-contacts {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: #e2e8f0;
    white-space: nowrap;
}

.topbar-contacts a {
    color: #38bdf8;
    text-decoration: none;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.topbar-right {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-left: auto;
}

/* Bilingual Language Switcher */
.lang-switcher {
    display: flex;
    background: #172447;
    border: 1px solid var(--border-color-light);
    border-radius: var(--radius-full);
    padding: 2px;
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s;
}

.lang-btn.active {
    background: var(--secondary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.4);
}

.btn-quick-action {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    transition: all 0.2s;
}

.btn-quick-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.4);
}

/* Page Content */
.content-body {
    padding: 24px;
    flex: 1;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

.section-view {
    display: none;
    width: 100%;
    max-width: 100%;
}

.section-view.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 25px;
}

.page-title h1 {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 4px;
}

.page-title p {
    font-size: 13.5px;
    color: var(--text-muted);
}

.page-actions {
    display: flex;
    gap: 12px;
}

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

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.25s ease;
    box-shadow: var(--shadow-sm);
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-color-light);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.stat-icon.red { background: rgba(244, 63, 94, 0.15); color: #fb7185; }
.stat-icon.blue { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }
.stat-icon.green { background: rgba(52, 211, 153, 0.15); color: #34d399; }
.stat-icon.amber { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.stat-icon.purple { background: rgba(167, 139, 250, 0.15); color: #a78bfa; }

.stat-info span {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    display: block;
}

.stat-info h3 {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    margin: 3px 0;
}

.stat-info small {
    font-size: 11px;
    color: #38bdf8;
    font-weight: 600;
}

/* Glass Panels */
.glass-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-md);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.panel-header h3 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Blood Bank Matrix Grid */
.stock-matrix-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.matrix-card {
    background: #172447;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 10px;
    text-align: center;
    transition: all 0.2s;
}

.matrix-card:hover {
    border-color: #38bdf8;
    background: #1e305e;
}

.matrix-group {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 800;
    color: #fb7185;
    margin-bottom: 8px;
}

.matrix-items {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ==========================================================================
   RESPONSIVE TABLES & DATA GRIDS
   ========================================================================== */
.table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 10px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 13px;
    min-width: 600px;
}

.custom-table th {
    background: rgba(15, 23, 42, 0.95);
    color: #94a3b8;
    padding: 12px 14px;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.custom-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    color: #e2e8f0;
    vertical-align: middle;
}

.custom-table tbody tr {
    transition: background 0.2s;
}

.custom-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.04);
}

/* ==========================================================================
   INTERACTIVE COMPONENT TREE VISUALIZER (Matching Handwritten Diagram)
   ========================================================================== */
.tree-container {
    background: #0d1730;
    border: 1px solid var(--border-color-light);
    border-radius: var(--radius-lg);
    padding: 30px;
    overflow-x: auto;
    margin-bottom: 30px;
}

.tree-root {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.tree-card-node {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.tree-card-node.donor-node {
    border-left: 4px solid #38bdf8;
}

.tree-card-node.bag-node {
    border-left: 4px solid #fb7185;
}

.node-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.node-title {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tree-branches {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed var(--border-color);
}

.component-branch-card {
    background: #172447;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 14px;
    transition: all 0.2s;
}

.component-branch-card:hover {
    border-color: #38bdf8;
    transform: translateY(-2px);
}

.comp-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.comp-type {
    font-size: 12.5px;
    font-weight: 700;
    color: #fff;
}

.comp-shelf {
    font-size: 10.5px;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.comp-meta {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.5;
}

.comp-storage-temp {
    display: inline-block;
    background: rgba(255, 255, 255, 0.06);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    margin-top: 6px;
    color: #cbd5e1;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    width: 100%;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}

.custom-table th {
    background: #172447;
    color: #94a3b8;
    padding: 14px 16px;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
}

.custom-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    color: #e2e8f0;
}

.custom-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Badges */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.status-pill.available { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.status-pill.quarantine { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.status-pill.reactive { background: rgba(244, 63, 94, 0.15); color: #fb7185; border: 1px solid rgba(244, 63, 94, 0.3); }
.status-pill.issued { background: rgba(56, 189, 248, 0.15); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.3); }
.status-pill.expired { background: rgba(148, 163, 184, 0.15); color: #94a3b8; border: 1px solid rgba(148, 163, 184, 0.3); }
.status-pill.discarded { background: rgba(239, 68, 68, 0.2); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.4); }

/* Buttons */
.btn {
    padding: 9px 18px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary { background: linear-gradient(135deg, #0284c7, #0369a1); color: #fff; }
.btn-primary:hover { box-shadow: 0 4px 15px rgba(2, 132, 199, 0.4); transform: translateY(-1px); }

.btn-danger { background: linear-gradient(135deg, var(--accent-red), #b91c1c); color: #fff; }
.btn-danger:hover { box-shadow: 0 4px 15px rgba(230, 57, 70, 0.4); transform: translateY(-1px); }

.btn-success { background: linear-gradient(135deg, #10b981, #047857); color: #fff; }
.btn-success:hover { box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4); transform: translateY(-1px); }

.btn-secondary { background: #1e293b; color: #e2e8f0; border: 1px solid var(--border-color); }
.btn-secondary:hover { background: #334155; }

.btn-sm { padding: 5px 10px; font-size: 11.5px; border-radius: var(--radius-sm); }

/* Form Controls & Inputs */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

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

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

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

.form-control {
    background: #0f1830;
    border: 1px solid var(--border-color-light);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    color: #fff;
    font-size: 13.5px;
    outline: none;
    transition: all 0.2s;
}

.form-control:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(4, 9, 20, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.modal-overlay.active {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    z-index: 10000 !important;
    animation: modalFadeIn 0.2s ease forwards;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.modal-card, .modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color-light);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover { color: #fff; }

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 18px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Tabs inside modules */
.tab-nav {
    display: flex;
    gap: 10px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    overflow-x: auto;
}

.tab-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
}

.tab-btn.active {
    background: #172447;
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.3);
}

/* Responsive */
/* Modal Responsive */
.modal-card {
    background: #111c38;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    width: min(92vw, 680px);
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    animation: modalSlide 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Responsive Overhaul for Laptops & Desktops */
@media (max-width: 1366px) {
    .content-body { padding: 18px; }
    .topbar { padding: 8px 18px; }
    .stock-matrix-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
    .stat-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
}

@media (max-width: 1180px) {
    .sidebar { width: 75px; }
    .sidebar-brand { padding: 18px 12px; justify-content: center; }
    .sidebar-brand .brand-text, .nav-menu li a span, .badge-nav, .sidebar-footer { display: none; }
    .nav-menu li a { justify-content: center; padding: 12px; }
    .nav-menu li a i { font-size: 18px; }
    .main-wrapper { 
        margin-left: 75px; 
        width: calc(100% - 75px);
        max-width: calc(100% - 75px);
    }
    .stock-matrix-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 768px) {
    .sidebar { display: none; }
    .main-wrapper { 
        margin-left: 0; 
        width: 100%;
        max-width: 100%;
    }
    .topbar { padding: 8px 12px; flex-direction: column; align-items: flex-start; }
    .topbar-right { width: 100%; justify-content: flex-start; }
    .stock-matrix-grid { grid-template-columns: repeat(2, 1fr); }
    .content-body { padding: 12px; }
    .page-header { flex-direction: column; align-items: flex-start; gap: 10px; }
    .page-actions { width: 100%; flex-wrap: wrap; }
}

@media (max-width: 480px) {
    .stock-matrix-grid { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
}



/* =========================================================================
   DEPARTMENT MODULAR STYLESHEETS
   ========================================================================= */

/* Department: 01_dashboard */
/* 01_dashboard/style.css - Executive Dashboard Styles */
.stat-kpi-card { background: linear-gradient(135deg, rgba(17,28,56,0.9), rgba(15,23,42,0.9)); border: 1px solid rgba(56,189,248,0.2); border-radius: 14px; padding: 20px; transition: all 0.3s ease; }
.stat-kpi-card:hover { transform: translateY(-3px); border-color: rgba(56,189,248,0.4); box-shadow: 0 10px 25px rgba(2,132,199,0.2); }
.kpi-pulse-live { width: 10px; height: 10px; border-radius: 50%; background: #10b981; display: inline-block; animation: pulseGlow 1.8s infinite; }
@keyframes pulseGlow { 0% { box-shadow: 0 0 0 0 rgba(16,185,129,0.7); } 70% { box-shadow: 0 0 0 10px rgba(16,185,129,0); } 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); } }


/* Department: 02_blood_bank */
/* 02_blood_bank/style.css - BBMS Component Tree & Stock Styles */
.blood-tree-container { background: #070e22; border: 1.5px solid #1e293b; border-radius: 16px; padding: 24px; position: relative; }
.blood-group-chip { display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; border-radius: 8px; padding: 4px 10px; background: rgba(244,63,94,0.15); color: #fb7185; border: 1px solid rgba(244,63,94,0.3); }
.comp-badge-prbc { background: rgba(225,29,72,0.2); color: #fda4af; border: 1px solid #e11d48; }
.comp-badge-ffp { background: rgba(234,179,8,0.2); color: #fef08a; border: 1px solid #eab308; }
.comp-badge-plt { background: rgba(56,189,248,0.2); color: #bae6fd; border: 1px solid #38bdf8; }
.comp-badge-cryo { background: rgba(168,85,247,0.2); color: #e9d5ff; border: 1px solid #a855f7; }


/* Department: 03_thalassemia */
/* 03_thalassemia/style.css - Free Thalassemia Unit Styles */
.thal-free-banner { background: linear-gradient(135deg, rgba(16,185,129,0.15), rgba(5,150,105,0.25)); border: 1.5px solid #10b981; border-radius: 14px; padding: 18px 24px; margin-bottom: 24px; }
.badge-free-transfusion { background: #10b981; color: #fff; font-weight: 700; padding: 4px 12px; border-radius: 20px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }


/* Department: 04_opd */
/* 04_opd/style.css - OPD Clinic & Token Styles */
.opd-token-card { background: #111c38; border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; padding: 16px; margin-bottom: 12px; }
.token-badge-number { font-size: 20px; font-weight: 900; color: #38bdf8; background: rgba(56,189,248,0.15); border-radius: 8px; padding: 6px 14px; }
.badge-thu-special { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; font-weight: 800; border-radius: 6px; padding: 3px 8px; font-size: 11px; }


/* Department: 05_ipd */
/* 05_ipd/style.css - IPD Bed Grid & Khata Styles */
.ward-bed-box { background: #0c152d; border: 1.5px solid #1e293b; border-radius: 12px; padding: 14px; text-align: center; cursor: pointer; transition: all 0.2s; }
.ward-bed-box.vacant { border-color: #10b981; background: rgba(16,185,129,0.08); }
.ward-bed-box.occupied { border-color: #f59e0b; background: rgba(245,158,11,0.08); }
.ward-bed-box.critical-icu { border-color: #ef4444; background: rgba(239,68,68,0.12); animation: pulseAlert 2s infinite; }
@keyframes pulseAlert { 0% { box-shadow: 0 0 0 0 rgba(239,68,68,0.4); } 70% { box-shadow: 0 0 0 8px rgba(239,68,68,0); } 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); } }
.khata-section-divider { border-top: 1px dashed rgba(255,255,255,0.15); margin: 20px 0; padding-top: 15px; }


/* Department: 06_operation_theatre */
/* 06_operation_theatre/style.css - Operation Theatre Styles */
.ot-case-card { background: #111c38; border-left: 4px solid #f43f5e; border-radius: 10px; padding: 18px; margin-bottom: 14px; }
.ot-status-scheduled { background: rgba(56,189,248,0.2); color: #38bdf8; }
.ot-status-running { background: rgba(244,63,94,0.2); color: #fb7185; }
.ot-status-done { background: rgba(16,185,129,0.2); color: #34d399; }


/* Department: 07_dialysis */
/* 07_dialysis/style.css - Dialysis Bay Styles */
.dialysis-bay-badge { background: linear-gradient(135deg, #6366f1, #4f46e5); color: #fff; font-weight: 700; padding: 4px 12px; border-radius: 8px; font-size: 12px; }
.reuse-cycle-counter { font-size: 13px; font-weight: 700; color: #fbbf24; background: rgba(245,158,11,0.15); padding: 4px 10px; border-radius: 6px; }


/* Department: 08_pathology */
/* 08_pathology/style.css - Pathology LIS & Specimen Tube Styles */
.tube-indicator { width: 14px; height: 14px; border-radius: 50%; display: inline-block; vertical-align: middle; margin-right: 6px; }
.tube-edta { background: #9333ea; box-shadow: 0 0 8px rgba(147,51,234,0.5); }
.tube-plain { background: #ef4444; box-shadow: 0 0 8px rgba(239,68,68,0.5); }
.tube-gel { background: #eab308; box-shadow: 0 0 8px rgba(234,179,8,0.5); }
.tube-fluoride { background: #94a3b8; box-shadow: 0 0 8px rgba(148,163,184,0.5); }
.panic-value-badge { background: #ef4444; color: #fff; font-weight: 800; padding: 3px 8px; border-radius: 6px; font-size: 11px; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: 0.4; } }

/* ==========================================================================
   NIRNOY PATHOLOGY SINGLE-SCREEN WORKSTATION STYLES (ENGLISH EDITION)
   ========================================================================== */
.master-counter-wrapper {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 100%;
  margin: 0 auto;
}

.active-patient-card {
  background: linear-gradient(135deg, #f0fdf4 0%, #e0f2fe 100%);
  border: 1.5px solid #86efac;
  border-radius: 8px;
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  flex-wrap: wrap;
  gap: 10px;
}

.master-counter-grid {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 1024px) {
  .master-counter-grid {
    grid-template-columns: 1fr;
  }
}

.master-box {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 10px 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  box-sizing: border-box;
  overflow: visible !important;
}

.master-counter-wrapper input,
.master-counter-wrapper select,
.master-box input,
.master-box select,
.master-box .form-control {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 4px;
}

.master-counter-wrapper input:focus,
.master-counter-wrapper select:focus,
.master-box input:focus,
.master-box select:focus,
.master-box .form-control:focus {
  border-color: #0284c7 !important;
  box-shadow: 0 0 0 2.5px rgba(2, 132, 199, 0.2) !important;
  background: #ffffff !important;
  color: #0f172a !important;
}

.master-box-title {
  font-size: 12px;
  font-weight: 800;
  color: #1e3a8a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1.5px solid #f1f5f9;
  text-transform: uppercase;
  letter-spacing: 0.2px;
}

.ws-input {
  height: 28px;
  padding: 0 8px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #0f172a;
  outline: none;
  background: #ffffff;
}

.ws-input:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15);
}

.ws-bill-summary {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 6px;
  padding: 8px 12px;
  margin-top: 4px;
}

.ws-bill-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  margin-bottom: 4px;
  color: #334155;
}

.ws-bill-row.total-row {
  border-top: 1.5px dashed #cbd5e1;
  padding-top: 5px;
  margin-top: 5px;
  font-size: 14px;
  font-weight: 900;
  color: #059669;
}

.ws-bill-row.due-row {
  font-weight: 800;
  color: #dc2626;
}

.ws-master-buttons {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.ws-btn-main {
  height: 38px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.ws-btn-main:active {
  transform: translateY(1px);
}

.ws-btn-bill {
  background: #1e40af;
  color: #ffffff;
}

.ws-btn-bill:hover {
  background: #1d4ed8;
}

.ws-btn-report {
  background: #059669;
  color: #ffffff;
}

.ws-btn-report:hover {
  background: #047857;
}

.pack-pills-container {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  white-space: nowrap;
  flex-wrap: nowrap;
  width: 100%;
  margin-top: 3px;
  margin-bottom: 5px;
  padding: 3px 2px 6px 2px;
  box-sizing: border-box;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.quick-tests-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  white-space: nowrap;
  flex-wrap: nowrap;
  padding: 3px 6px;
  background: #f8fafc;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.pack-pill {
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #166534;
  padding: 3px 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.12s ease;
}

.pack-pill:hover {
  background: #dcfce7;
  border-color: #22c55e;
  transform: translateY(-1px);
}

.pack-pill .price-tag {
  background: #15803d;
  color: #ffffff;
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 10px;
}

.cat-chips-bar {
  display: flex;
  gap: 4px;
  margin-top: 5px;
  margin-bottom: 5px;
  flex-wrap: wrap;
  width: 100%;
  box-sizing: border-box;
}

.cat-chip {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  cursor: pointer;
  color: #475569;
  white-space: nowrap;
}

.cat-chip.active {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
  font-weight: 700;
}

.ws-selected-tests-list {
  min-height: 420px;
  max-height: calc(100vh - 270px);
  overflow-y: auto;
  border: 1.5px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  padding: 4px;
}

.ws-test-item {
  border-bottom: 1px solid #e2e8f0;
  padding: 8px 12px;
  background: #ffffff;
}

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

.ws-test-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.ws-test-title {
  font-size: 12.5px;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ws-test-name-input {
  font-size: 12.5px;
  font-weight: 800;
  color: #0f172a;
  border: 1px dashed #cbd5e1;
  border-radius: 4px;
  padding: 2px 6px;
  background: #f8fafc;
  min-width: 220px;
  max-width: 380px;
}

.ws-test-price-box {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ws-single-print-btn {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ws-params-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: #f8fafc;
  border-radius: 6px;
  padding: 6px 8px;
}

.ws-subheading-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #e2e8f0;
  border-left: 3.5px solid #0284c7;
  padding: 3px 8px;
  margin: 6px 0 2px 0;
  border-radius: 0 4px 4px 0;
}

.ws-subheading-edit-input {
  background: transparent;
  border: 1px dashed transparent;
  font-size: 11px;
  font-weight: 800;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 4px;
  flex: 1;
}

.ws-param-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  padding: 3px 6px;
  border-radius: 3px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
}

.ws-param-row:hover,
.ws-param-row:focus-within {
  background: #f0f7ff;
  border-color: #93c5fd;
}

.ws-param-name {
  font-weight: 600;
  color: #1e293b;
  flex: 1;
  min-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ws-param-input {
  width: 90px;
  height: 25px;
  padding: 0 6px;
  font-size: 12px;
  font-weight: 700;
  border: 1.5px solid #cbd5e1;
  border-radius: 4px;
  text-align: center;
  outline: none;
  background: #ffffff;
  color: #0f172a;
}

.ws-param-unit {
  font-size: 11px;
  color: #475569;
  width: 70px;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ws-param-range {
  font-size: 10.5px;
  color: #64748b;
  width: 160px;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ws-param-del-btn {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid #fca5a5;
  background: #fee2e2;
  color: #ef4444;
  font-size: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.master-patient-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #ffffff;
  border: 2px solid #0284c7;
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 380px;
  overflow-y: auto;
  box-shadow: 0 16px 36px rgba(0,0,0,0.25);
  z-index: 99999;
}

.master-patient-item {
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.12s ease;
}

.master-patient-item:hover {
  background: #eff6ff;
}

#wsTestDropdown {
  max-height: 540px !important;
  min-height: 180px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35) !important;
  border-radius: 0 0 10px 10px !important;
  background: #ffffff !important;
}

.ws-search-toolbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.ws-search-item {
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: all 0.15s ease;
  background: #ffffff;
}

.ws-search-item:hover {
  background: #f0f9ff;
}

.ws-search-item.is-selected {
  background: #f0fdf4;
  border-left: 4px solid #16a34a;
}

.ws-search-item-btn {
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

@media print {
  .page-header, .tab-nav, .active-patient-card, .ws-master-buttons, .quick-tests-bar, .ws-test-search-wrap, .cat-chips-bar {
    display: none !important;
  }
}


/* Department: 09_pharmacy */
/* 09_pharmacy/style.css - Pharmacy & POS Styles */
.pharmacy-pos-item { display: flex; justify-content: space-between; align-items: center; padding: 10px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.expiry-alert-tag { background: rgba(239,68,68,0.2); color: #f87171; border: 1px solid #ef4444; font-size: 11px; padding: 2px 6px; border-radius: 4px; font-weight: 700; }


/* Department: 10_hospital_billing */
/* 10_hospital_billing/style.css - Hospital Billing Styles */
.billing-filter-btn { padding: 8px 18px; border-radius: 20px; font-size: 13px; font-weight: 700; cursor: pointer; transition: all 0.2s; border: 1px solid rgba(255,255,255,0.1); background: rgba(15,23,42,0.6); color: #94a3b8; }
.billing-filter-btn.active { background: linear-gradient(135deg, #0284c7, #0369a1); color: #fff; border-color: #38bdf8; box-shadow: 0 4px 15px rgba(2,132,199,0.3); }
.invoice-serial-chip { font-family: monospace; font-size: 13px; font-weight: 700; color: #38bdf8; background: rgba(56,189,248,0.1); padding: 4px 10px; border-radius: 6px; }


/* Department: 11_print_hub */
/* 11_print_hub/style.css - Print Hub & Templates Styles */
.print-template-card { background: #111c38; border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; padding: 20px; text-align: center; cursor: pointer; transition: all 0.2s; }
.print-template-card:hover { transform: translateY(-3px); border-color: #38bdf8; }


/* Department: 12_doctors */
/* 12_doctors/style.css - Doctor Directory Styles */
.doctor-profile-card { background: #111c38; border: 1px solid rgba(255,255,255,0.08); border-radius: 14px; padding: 22px; margin-bottom: 16px; }
.doctor-timing-badge { background: rgba(56,189,248,0.15); color: #38bdf8; font-size: 12px; font-weight: 700; border-radius: 6px; padding: 3px 8px; }


/* Department: 13_users_and_security */
/* 13_users_and_security/style.css - Users & RBAC Styles */
.role-badge-manager { background: rgba(245,158,11,0.2); color: #fbbf24; border: 1px solid #f59e0b; padding: 3px 8px; border-radius: 6px; font-weight: 700; font-size: 11px; }
.role-badge-lab { background: rgba(20,184,166,0.2); color: #2dd4bf; border: 1px solid #14b8a6; padding: 3px 8px; border-radius: 6px; font-weight: 700; font-size: 11px; }
.role-badge-blood { background: rgba(244,63,94,0.2); color: #fb7185; border: 1px solid #f43f5e; padding: 3px 8px; border-radius: 6px; font-weight: 700; font-size: 11px; }


/* Department: 14_knowledge_base */
/* 14_knowledge_base/style.css - Knowledge Base Styles */
.icd-code-item { background: rgba(15,23,42,0.8); border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; padding: 12px 16px; margin-bottom: 8px; }
.icd-code-chip { font-family: monospace; font-size: 12px; font-weight: 800; color: #10b981; background: rgba(16,185,129,0.15); padding: 3px 8px; border-radius: 4px; }


/* Department: 15_tv_queue_display */
/* 15_tv_queue_display/style.css - Public TV Display Styles */
.tv-display-viewport { background: #060b18; border-radius: 16px; padding: 30px; text-align: center; }
.tv-token-huge { font-size: 72px; font-weight: 900; color: #38bdf8; text-shadow: 0 0 30px rgba(56,189,248,0.5); }
.tv-doctor-box { font-size: 24px; font-weight: 700; color: #f8fafc; margin-top: 12px; }


/* Department: 16_eye_care */
/* =========================================================================
   MODULE 16: DEDICATED EYE CARE & OPHTHALMOLOGY UNIT STYLES
   ========================================================================= */

#section-eye-care .stat-card {
    background: #111c38;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: transform 0.2s, box-shadow 0.2s;
}

#section-eye-care .stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

#section-eye-care .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

#section-eye-care .stat-content h3 {
    font-size: 24px;
    font-weight: 800;
    font-family: var(--font-heading);
    color: #f8fafc;
    margin: 0;
    line-height: 1.1;
}

#section-eye-care .stat-content p {
    font-size: 12px;
    color: #94a3b8;
    margin: 2px 0;
}



/* Department: 17_radiology */
/* ========================================================================= */
/* SECTION 17: RADIOLOGY & IMAGING STYLING                                  */
/* ========================================================================= */

.badge-rad-xray {
    background: rgba(6, 182, 212, 0.18);
    color: #22d3ee;
    border: 1px solid rgba(6, 182, 212, 0.35);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}

.badge-rad-usg {
    background: rgba(16, 185, 129, 0.18);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.35);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}

.badge-rad-ecg {
    background: rgba(244, 63, 94, 0.18);
    color: #fb7185;
    border: 1px solid rgba(244, 63, 94, 0.35);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}

.badge-rad-dent {
    background: rgba(245, 158, 11, 0.18);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.35);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}

.badge-rad-ct {
    background: rgba(168, 85, 247, 0.18);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.35);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}

.text-cyan {
    color: #06b6d4 !important;
}



/* Department: 18_dept_revenue_matrix */
/* ========================================================================= */
/* SECTION 18: DEPARTMENT REVENUE & AUDIT MATRIX STYLES */
/* ========================================================================= */

.matrix-scroll-wrapper {
    position: relative;
    overflow-x: auto;
    overflow-y: auto;
    max-height: 68vh;
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 8px;
    background: #0b1329;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.matrix-scroll-wrapper::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.matrix-scroll-wrapper::-webkit-scrollbar-track {
    background: #090d1a;
}

.matrix-scroll-wrapper::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.matrix-scroll-wrapper::-webkit-scrollbar-thumb:hover {
    background: #0284c7;
}

.dept-matrix-table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
    width: 100%;
    white-space: nowrap;
    font-size: 11.5px;
    margin: 0;
}

.dept-matrix-table thead tr th {
    border-top: none;
    border-bottom: 1px solid #334155;
    border-right: 1px solid #1e293b;
    padding: 7px 10px;
    font-size: 11px;
    font-weight: 700;
    vertical-align: middle;
}

.dept-matrix-table tbody td {
    padding: 6px 10px;
    border-bottom: 1px solid #1e293b;
    border-right: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: middle;
    font-variant-numeric: tabular-nums;
}

.dept-matrix-table tbody tr:hover td {
    background: rgba(56, 189, 248, 0.09) !important;
    cursor: pointer;
}

.dept-matrix-table tbody tr.sunday-row td {
    background: rgba(239, 68, 68, 0.035);
}

.dept-matrix-table tbody tr.sunday-row td.sticky-col-date {
    color: #f87171 !important;
    font-weight: 800;
}

/* Sticky Columns */
.dept-matrix-table .sticky-col-date {
    position: sticky;
    left: 0;
    z-index: 6;
    background: #0f172a;
    border-right: 2px solid #0284c7 !important;
    box-shadow: 2px 0 6px rgba(0, 0, 0, 0.4);
    font-weight: 600;
}

.dept-matrix-table thead th.sticky-col-date {
    z-index: 12;
    background: #0f172a;
}

.dept-matrix-table .sticky-col-total {
    position: sticky;
    right: 0;
    z-index: 6;
    background: #064e3b;
    color: #34d399 !important;
    border-left: 2px solid #10b981 !important;
    box-shadow: -2px 0 6px rgba(0, 0, 0, 0.4);
    font-weight: 800;
    text-align: right;
}

.dept-matrix-table thead th.sticky-col-total {
    z-index: 12;
    background: #064e3b;
    color: #34d399;
}

.dept-matrix-table tfoot td.sticky-col-date,
.dept-matrix-table tfoot th.sticky-col-date {
    position: sticky;
    left: 0;
    z-index: 12;
    background: #0f172a;
    border-top: 2px solid #38bdf8 !important;
    border-right: 2px solid #0284c7 !important;
}

.dept-matrix-table tfoot td.sticky-col-total,
.dept-matrix-table tfoot th.sticky-col-total {
    position: sticky;
    right: 0;
    z-index: 12;
    background: #047857;
    color: #ffffff !important;
    border-top: 2px solid #38bdf8 !important;
    border-left: 2px solid #10b981 !important;
    font-size: 13px;
    font-weight: 900;
}

.dept-matrix-table tfoot th,
.dept-matrix-table tfoot td {
    background: #0b1329;
    border-top: 2px solid #38bdf8 !important;
    border-bottom: 2px solid #38bdf8 !important;
    padding: 8px 10px;
    font-size: 12px;
    color: #f1f5f9;
}

.matrix-val-cell {
    text-align: right;
    color: #cbd5e1;
}

.matrix-val-cell.val-zero {
    color: #475569;
}

.matrix-val-cell.val-positive {
    color: #f8fafc;
    font-weight: 600;
}

.matrix-input:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.3);
}

/* Print styling specifically for Matrix */
@media print {
    @page {
        size: A4 landscape;
        margin: 6mm;
    }

    body {
        background: #ffffff !important;
        color: #000000 !important;
        font-family: Arial, sans-serif !important;
    }

    .sidebar, .top-navbar, .page-actions, .btn, .btn-group, #matrix-month-picker-wrap, #matrix-year-picker-wrap, .modal-overlay {
        display: none !important;
    }

    .matrix-scroll-wrapper {
        max-height: none !important;
        overflow: visible !important;
        box-shadow: none !important;
        border: 1px solid #000 !important;
        background: #fff !important;
    }

    .dept-matrix-table {
        font-size: 7.5pt !important;
        color: #000 !important;
        width: 100% !important;
    }

    .dept-matrix-table thead tr th,
    .dept-matrix-table tbody tr td,
    .dept-matrix-table tfoot tr th,
    .dept-matrix-table tfoot tr td {
        border: 0.5pt solid #333 !important;
        color: #000 !important;
        background: #fff !important;
        padding: 2.5pt 4pt !important;
    }

    .dept-matrix-table thead tr.matrix-header-row-1 th,
    .dept-matrix-table thead tr.matrix-header-row-2 th {
        background: #f1f5f9 !important;
        font-weight: bold !important;
    }

    .dept-matrix-table .sticky-col-date,
    .dept-matrix-table .sticky-col-total {
        position: static !important;
        box-shadow: none !important;
    }

    .matrix-val-cell.val-zero {
        color: #888 !important;
    }
}

