.module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
}

.module-header h1 {
    margin: 0;
    font-size: 28px;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 10px;
}

.module-header p {
    margin: 6px 0 0;
    color: #6b7280;
}

.kpi-grid {
    margin: 16px 24px;
    display: grid;
    grid-template-columns: repeat(5, minmax(140px, 1fr));
    gap: 10px;
}

.kpi-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px;
}

.kpi-title {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.kpi-value {
    margin-top: 4px;
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
}

.panel {
    margin: 0 24px 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
}

.panel h3 {
    margin: 0 0 12px;
    font-size: 16px;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 10px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 12px;
    color: #475569;
    font-weight: 700;
}

.form-group input,
.form-group select,
.form-group textarea {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 9px;
}

.form-group.full-width {
    grid-column: span 4;
}

.form-actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
}

.alerts-list {
    display: grid;
    gap: 8px;
}

.alert-item {
    border-radius: 8px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
}

.alert-item.overdue { background: #fef2f2; border-color: #fecaca; }
.alert-item.due-today { background: #fff7ed; border-color: #fed7aa; }
.alert-item.upcoming { background: #eff6ff; border-color: #bfdbfe; }

.alert-title {
    font-weight: 800;
    font-size: 13px;
}

.alert-desc {
    margin-top: 2px;
    font-size: 13px;
    color: #334155;
}

.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.filters {
    display: flex;
    gap: 8px;
}

.table-wrap { overflow: auto; }

#chequesTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

#chequesTable th,
#chequesTable td {
    border-bottom: 1px solid #f1f5f9;
    padding: 10px;
    text-align: left;
    white-space: nowrap;
}

#chequesTable th { background: #f8fafc; }

.amount { text-align: right; font-weight: 700; }

.status {
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: capitalize;
}

.status.pending { background: #fef3c7; color: #92400e; }
.status.cleared { background: #dcfce7; color: #166534; }
.status.bounced { background: #fee2e2; color: #991b1b; }
.status.cancelled { background: #e2e8f0; color: #334155; }

.alert-tag {
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.alert-tag.overdue { background: #fee2e2; color: #991b1b; }
.alert-tag.due-today { background: #ffedd5; color: #9a3412; }
.alert-tag.upcoming { background: #dbeafe; color: #1e40af; }
.alert-tag.scheduled { background: #ecfeff; color: #155e75; }
.alert-tag.none { background: #e2e8f0; color: #475569; }

.btn {
    border: none;
    border-radius: 8px;
    padding: 9px 12px;
    font-weight: 700;
    cursor: pointer;
}

.btn-primary { background: #0d47a1; color: #fff; }
.btn-secondary { background: #e5e7eb; color: #111827; }
.btn-success { background: #15803d; color: #fff; }
.btn-danger { background: #b91c1c; color: #fff; }
.btn-muted { background: #64748b; color: #fff; }
.btn-sm { padding: 6px 8px; font-size: 11px; }

.empty { color: #64748b; text-align: center; padding: 16px; }

/* ========== PROFESSIONAL CHEQUE SYSTEM STYLES ========== */

/* Bank Selector Dropdown */
.bank-select {
    background: linear-gradient(to right, #f5f5f5, white) !important;
    border: 2px solid #34495e !important;
    color: #2c3e50 !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
}

.bank-select:hover {
    border-color: #27ae60 !important;
    box-shadow: 0 2px 6px rgba(39, 174, 96, 0.2) !important;
}

.bank-select:focus {
    outline: none;
    border-color: #3498db !important;
    box-shadow: 0 0 8px rgba(52, 152, 219, 0.3) !important;
}

/* Print Button Styles */
.btn-info {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: #fff;
    border: none;
    padding: 9px 14px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 6px rgba(52, 152, 219, 0.3);
}

.btn-info:hover {
    background: linear-gradient(135deg, #2980b9, #2471a3);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.4);
}

.btn-info:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(52, 152, 219, 0.3);
}

.btn-info i {
    font-size: 13px;
}

.header-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

/* Professional Cheque Container */
.professional-cheque-page {
    background: white;
    border: 1px solid #bbb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 2px;
}

.cheque-container {
    background: white;
    border: 2px solid #333;
    position: relative;
}

.bank-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    border-bottom: 3px solid #2c3e50;
    background: linear-gradient(to bottom, #f8f9fa, white);
}

.micr-zone {
    font-family: 'OCR-B', 'Courier New', monospace;
    letter-spacing: 2px;
    border: 2px dashed #999;
    padding: 4px 0;
}

/* Print Toolbar Professional Styling */
.print-toolbar {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    border-radius: 6px 6px 0 0;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.toolbar-right {
    display: flex;
    gap: 10px;
}

.print-button {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 2px 6px rgba(39, 174, 96, 0.3);
}

.print-button:hover {
    background: linear-gradient(135deg, #229954, #1e8449);
    box-shadow: 0 4px 10px rgba(39, 174, 96, 0.4);
    transform: translateY(-2px);
}

.print-button:active {
    transform: translateY(0);
}

.close-button {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 2px 6px rgba(231, 76, 60, 0.3);
}

.close-button:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    box-shadow: 0 4px 10px rgba(231, 76, 60, 0.4);
    transform: translateY(-2px);
}

.print-stats {
    background: white;
    padding: 15px 20px;
    border-top: 2px solid #ecf0f1;
    font-size: 12px;
    color: #2c3e50;
    display: flex;
    gap: 30px;
    font-weight: 500;
}

/* ========== PRINT MEDIA QUERIES ========== */
@media print {
    .sidebar, .header, .module-header, .header-actions, 
    .kpi-grid, .form-panel, .alerts-panel, .panel-head,
    .filters, .watermark-container, .print-toolbar, .print-stats {
        display: none !important;
    }
    
    body {
        margin: 0;
        padding: 0;
        background: white;
    }
    
    .main-content {
        margin: 0;
        padding: 0;
    }
    
    @page {
        size: 210mm 140mm landscape;
        margin: 0;
    }
    
    .professional-cheque-page {
        page-break-after: always;
        page-break-inside: avoid;
        margin: 0;
        padding: 0;
    }
}

@media (max-width: 980px) {
    .kpi-grid { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
    .form-grid { grid-template-columns: repeat(2, minmax(160px, 1fr)); }
    .form-group.full-width { grid-column: span 2; }
    .header-actions { gap: 8px; }
}

@media (max-width: 768px) {
    .module-header { flex-direction: column; align-items: flex-start; gap: 10px; }
    .kpi-grid, .panel { margin-left: 12px; margin-right: 12px; }
    .form-grid { grid-template-columns: 1fr; }
    .form-group.full-width { grid-column: span 1; }
    .panel-head { flex-direction: column; align-items: flex-start; }
    .filters { width: 100%; flex-direction: column; }
    .header-actions { flex-direction: column; width: 100%; gap: 8px; }
    .btn-info { width: 100%; justify-content: center; }
}

/* ============================================================================
   Full-Screen Layout Override - fills width, no right alerts-sidebar gap
   ============================================================================ */

.dashboard-container {
    width: 100%;
    min-height: 100vh;
}

.main-content {
    margin-left: var(--sidebar-width, 270px);
    margin-right: 0 !important;
    width: calc(100% - var(--sidebar-width, 270px));
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

@media (max-width: 1200px) {
    .main-content {
        margin-left: var(--sidebar-width, 230px);
        width: calc(100% - var(--sidebar-width, 230px));
        margin-right: 0 !important;
    }
}

@media (max-width: 768px) {
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        padding-top: 56px;
    }
}

.page-content {
    width: 100%;
}

