@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Common Styles for all pages */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', Arial, Helvetica, sans-serif;
    font-size: 8pt;
    color: #1a202c;
    background-color: #f0f4f8;
    line-height: 1.5;
    min-height: 100vh;
}

.padding-top-10px{ padding-top: 10px;}

td {
    padding-top: 10px;
    padding-bottom: 10px;
    padding-left: 5px;
    padding-right: 5px;
}



/* Navigation Menu */
.nav-menu {
    background: #2c3e50;
    color: white;
    padding: 15px 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo img {
    height: 40px;
    width: auto;
}

.nav-logo span {
    font-size: 18px;
    font-weight: bold;
    color: white;
}

.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 4px;
    transition: background 0.3s;
    font-size: 14px;
}

.nav-link:hover {
    background: #1a252f;
}

.nav-link.active {
    background: #3498db;
}

.print-button {
    background: #27ae60;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.print-button:hover {
    background: #219653;
}

/* Page Container */
.page-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

/* A4 Page Styling */
.a4-page {
    background: white;
    width: 100%;
    max-width: 210mm;
    min-height: 297mm;
    padding: 20mm;
    margin: 20px auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* Common Form Elements */
.form-group {
    margin-bottom: 15px;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.form-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.form-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background-color: white;
}

.form-textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    resize: vertical;
    min-height: 100px;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

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

.btn-success:hover {
    background: #219653;
}

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

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

/* Table Styles */
.table {
    width: 100%;
    border-collapse: collapse;
    margin: 14px 0;
    vertical-align: top;
}

tr{
    margin: 10px 0;
}


.table th, .table td {
    border: 1px solid #ddd;
    padding: 8px;
    vertical-align: top;
}

.table th {
    background: #f8f9fa;
    font-weight: bold;
    text-align: left;
}


tbody{
    margin: 10px 0;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    justify-content: center;
}

/* Common Layout Classes */
.section-title {
    font-size: 18px;
    margin: 20px 0 15px 0;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 5px;
}

.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 20px 0;
}

/* Print Styles */
@media print {
    .nav-menu,
    .topbar,
    .sidebar,
    .sidebar-overlay,
    .page-container > *:not(.a4-page):not(.printable),
    .action-buttons {
        display: none !important;
    }

    body {
        background: white !important;
    }

    .page-container {
        margin-left: 0 !important;
        margin-top: 0 !important;
    }

    .a4-page {
        margin: 0 !important;
        box-shadow: none !important;
        page-break-after: always;
    }
}

/* ============================
   LISTING PAGES - Modern Design
   ============================ */

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

.list-page-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 4px 0;
}

.list-page-header .record-count {
    color: #718096;
    font-size: 13px;
    font-weight: 400;
}

.btn-create {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #667eea 0%, #5a67d8 100%);
    color: white;
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(90, 103, 216, 0.3);
}

.btn-create:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(90, 103, 216, 0.4);
}

.btn-create .plus-icon {
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
}

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

.kpi-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    border-left: 4px solid transparent;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.kpi-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.kpi-card .kpi-value {
    font-size: 28px;
    font-weight: 700;
    color: #1a202c;
    line-height: 1.2;
}

.kpi-card .kpi-label {
    font-size: 12px;
    font-weight: 500;
    color: #a0aec0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.kpi-card .kpi-amount {
    font-size: 13px;
    font-weight: 600;
    color: #4a5568;
    margin-top: 6px;
}

.kpi-card.kpi-total { border-left-color: #5a67d8; }
.kpi-card.kpi-total .kpi-value { color: #5a67d8; }

.kpi-card.kpi-draft { border-left-color: #a0aec0; }
.kpi-card.kpi-draft .kpi-value { color: #718096; }

.kpi-card.kpi-sent { border-left-color: #4299e1; }
.kpi-card.kpi-sent .kpi-value { color: #3182ce; }

.kpi-card.kpi-success { border-left-color: #48bb78; }
.kpi-card.kpi-success .kpi-value { color: #38a169; }

.kpi-card.kpi-warning { border-left-color: #ed8936; }
.kpi-card.kpi-warning .kpi-value { color: #dd6b20; }

.kpi-card.kpi-danger { border-left-color: #fc8181; }
.kpi-card.kpi-danger .kpi-value { color: #e53e3e; }

/* Search & Filter Bar */
.list-toolbar {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 240px;
}

.search-box .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    font-size: 14px;
    pointer-events: none;
}

.search-box input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    background: white;
    color: #1a202c;
    transition: all 0.2s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #5a67d8;
    box-shadow: 0 0 0 3px rgba(90, 103, 216, 0.15);
}

.search-box input::placeholder {
    color: #cbd5e0;
}

.filter-select {
    padding: 10px 36px 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    background: white;
    color: #4a5568;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23718096' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: all 0.2s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #5a67d8;
    box-shadow: 0 0 0 3px rgba(90, 103, 216, 0.15);
}

/* Table Card Container */
.list-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    overflow: hidden;
}

.list-card table {
    width: 100%;
    border-collapse: collapse;
}

.list-card thead th {
    background: #f7fafc;
    padding: 10px 8px;
    font-size: 10px;
    font-weight: 600;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    text-align: left;
    border-bottom: 2px solid #edf2f7;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
}

.list-card thead th.text-right {
    text-align: right;
}

.list-card tbody tr {
    cursor: pointer;
    transition: all 0.15s ease;
    border-bottom: 1px solid #f0f4f8;
}

.list-card tbody tr:last-child {
    border-bottom: none;
}

.list-card tbody tr:hover {
    background: #f0f4ff;
}

.list-card tbody td {
    padding: 10px 8px;
    font-size: 12px;
    color: #4a5568;
    vertical-align: middle;
}

.list-card tbody td.text-right {
    text-align: right;
}

.list-card .doc-number {
    font-weight: 600;
    color: #5a67d8;
    text-decoration: none;
    transition: color 0.2s;
}

.list-card .doc-number:hover {
    color: #4c51bf;
    text-decoration: underline;
}

.list-card .client-name {
    font-weight: 500;
    color: #2d3748;
}

.list-card .amount-cell {
    font-weight: 600;
    color: #2d3748;
    font-variant-numeric: tabular-nums;
}

.list-card .secondary-text {
    color: #a0aec0;
    font-size: 12px;
}

.list-card .link-ref {
    color: #4299e1;
    text-decoration: none;
    font-weight: 500;
    font-size: 12px;
}

.list-card .link-ref:hover {
    text-decoration: underline;
}

/* Month Group Accordion */
.month-group-header {
    cursor: pointer;
    background: #edf2f7;
    transition: background 0.15s ease;
    border-bottom: 1px solid #e2e8f0;
    user-select: none;
}
.month-group-header:hover {
    background: #e2e8f0;
}
.month-group-header.expanded {
    background: #e8edf5;
    border-bottom: 2px solid #cbd5e0;
}
.month-group-header td {
    padding: 12px 16px !important;
    font-size: 13px;
    color: #2d3748;
}
.month-chevron {
    display: inline-block;
    width: 16px;
    font-size: 10px;
    color: #718096;
    transition: transform 0.2s;
    margin-right: 6px;
}
.month-label {
    font-weight: 700;
    font-size: 14px;
    color: #2d3748;
}
.month-badge {
    display: inline-block;
    background: #5a67d8;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 12px;
    margin-left: 10px;
    vertical-align: middle;
}
.month-total {
    float: right;
    font-weight: 700;
    font-size: 14px;
    color: #2d3748;
    font-variant-numeric: tabular-nums;
}

/* Status Badges - Enhanced */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.status-pill::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-pill.s-draft { background: #edf2f7; color: #718096; }
.status-pill.s-draft::before { background: #a0aec0; }

.status-pill.s-sent { background: #ebf8ff; color: #2b6cb0; }
.status-pill.s-sent::before { background: #4299e1; }

.status-pill.s-accepted { background: #f0fff4; color: #276749; }
.status-pill.s-accepted::before { background: #48bb78; }

.status-pill.s-converted { background: #fffff0; color: #975a16; }
.status-pill.s-converted::before { background: #ed8936; }

.status-pill.s-partially_invoiced { background: #fffaf0; color: #c05621; }
.status-pill.s-partially_invoiced::before { background: #dd6b20; }

.status-pill.s-void { background: #fff5f5; color: #9b2c2c; }
.status-pill.s-void::before { background: #fc8181; }

.status-pill.s-paid { background: #f0fff4; color: #276749; }
.status-pill.s-paid::before { background: #48bb78; }

.status-pill.s-partial { background: #fffff0; color: #975a16; }
.status-pill.s-partial::before { background: #ed8936; }

.status-pill.s-overdue { background: #fff5f5; color: #9b2c2c; }
.status-pill.s-overdue::before { background: #fc8181; }

.status-pill.s-issued { background: #ebf8ff; color: #2b6cb0; }
.status-pill.s-issued::before { background: #4299e1; }

.status-pill.s-applied { background: #f0fff4; color: #276749; }
.status-pill.s-applied::before { background: #48bb78; }

.status-pill.s-rejected { background: #fff5f5; color: #9b2c2c; }
.status-pill.s-rejected::before { background: #fc8181; }

.status-pill.s-expired { background: #fffaf0; color: #c05621; }
.status-pill.s-expired::before { background: #ed8936; }

.status-pill.s-confirmed { background: #f0fff4; color: #276749; }
.status-pill.s-confirmed::before { background: #48bb78; }

.status-pill.s-unpaid { background: #fffaf0; color: #c05621; }
.status-pill.s-unpaid::before { background: #ed8936; }

.status-pill.s-partially_paid { background: #fffaf0; color: #975a16; }
.status-pill.s-partially_paid::before { background: #ed8936; }

/* Status Change Controls */
.status-change-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.status-change-label {
    font-size: 13px;
    font-weight: 600;
    color: #4a5568;
    white-space: nowrap;
}

.status-change-select {
    padding: 4px 24px 4px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 11px;
    font-family: 'Inter', sans-serif;
    background: white;
    color: #4a5568;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%23718096' d='M5 7L1 3h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    transition: all 0.2s ease;
    min-width: 85px;
}

.status-change-select:focus {
    outline: none;
    border-color: #5a67d8;
    box-shadow: 0 0 0 2px rgba(90, 103, 216, 0.15);
}

.status-change-select:hover {
    border-color: #a0aec0;
}

/* Action Button */
.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
    background: white;
    color: #4a5568;
}

.btn-action:hover {
    background: #5a67d8;
    color: white;
    border-color: #5a67d8;
}

/* Row Number */
.row-num {
    color: #cbd5e0;
    font-size: 12px;
    font-weight: 500;
}

/* Empty State */
.empty-state-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    text-align: center;
    padding: 60px 40px;
}

.empty-state-card .empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.4;
}

.empty-state-card p {
    color: #718096;
    font-size: 15px;
    margin-bottom: 20px;
}

/* Outstanding / Danger text */
.text-outstanding {
    color: #e53e3e;
    font-weight: 600;
}

/* ============================
   TOPBAR
   ============================ */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: #1a202c;
    color: #fff;
    display: flex;
    align-items: center;
    padding: 0 20px;
    z-index: 1100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.topbar-toggle {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.topbar-toggle:hover {
    background: rgba(255,255,255,0.1);
}

.topbar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 16px;
    flex: 1;
}

.topbar-logo img {
    height: 32px;
    width: auto;
}

.topbar-logo span {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.3px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.topbar-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    color: #a0aec0;
    text-decoration: none;
    transition: all 0.2s;
}

.topbar-icon:hover,
.topbar-icon.active {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

/* ============================
   SIDEBAR
   ============================ */
.sidebar {
    position: fixed;
    top: 56px;
    left: 0;
    bottom: 0;
    width: 230px;
    background: #fff;
    border-right: 1px solid #e2e8f0;
    overflow-y: auto;
    z-index: 1050;
    transition: transform 0.25s ease;
}

.sidebar-inner {
    padding: 16px 0;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
}

.sb-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: #4a5568;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.15s ease;
    border-left: 3px solid transparent;
}

.sb-link:hover {
    background: #f7fafc;
    color: #2d3748;
}

.sb-link.active {
    background: #ebf4ff;
    color: #3182ce;
    border-left-color: #3182ce;
    font-weight: 600;
}

.sb-link svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.sb-link.active svg {
    opacity: 1;
}

.sb-group-label {
    padding: 18px 20px 6px;
    font-size: 10px;
    font-weight: 700;
    color: #a0aec0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1040;
}

.sidebar-overlay.open {
    display: block;
}

/* ============================
   PAGE CONTAINER (with sidebar offset)
   ============================ */
body:has(.topbar) .page-container {
    margin-left: 230px;
    margin-top: 56px;
    padding: 24px 28px;
    max-width: none;
}

body:has(.topbar) .a4-page {
    margin-left: auto;
    margin-right: auto;
}

/* ============================
   DASHBOARD FINANCIAL KPI
   ============================ */
.fin-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.fin-kpi {
    background: #fff;
    border-radius: 12px;
    padding: 22px 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border-top: 3px solid transparent;
    transition: all 0.2s;
}

.fin-kpi:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.fin-kpi .fin-label {
    font-size: 11px;
    font-weight: 600;
    color: #a0aec0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.fin-kpi .fin-value {
    font-size: 22px;
    font-weight: 700;
    color: #1a202c;
}

.fin-kpi.kpi-invoiced { border-top-color: #5a67d8; }
.fin-kpi.kpi-invoiced .fin-value { color: #5a67d8; }

.fin-kpi.kpi-collected { border-top-color: #38a169; }
.fin-kpi.kpi-collected .fin-value { color: #38a169; }

.fin-kpi.kpi-outstanding { border-top-color: #d69e2e; }
.fin-kpi.kpi-outstanding .fin-value { color: #d69e2e; }

.fin-kpi.kpi-overdue { border-top-color: #e53e3e; }
.fin-kpi.kpi-overdue .fin-value { color: #e53e3e; }

.fin-kpi.kpi-credit { border-top-color: #805ad5; }
.fin-kpi.kpi-credit .fin-value { color: #805ad5; }

.fin-kpi.kpi-spend { border-top-color: #d97706; }
.fin-kpi.kpi-spend .fin-value { color: #d97706; }

/* Dashboard doc-count cards */
.doc-count-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
    margin-bottom: 28px;
}

.doc-count-card {
    background: #fff;
    border-radius: 10px;
    padding: 18px 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.2s;
}

.doc-count-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

.doc-count-card .doc-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.doc-count-card .doc-info .doc-num {
    font-size: 20px;
    font-weight: 700;
    color: #1a202c;
    line-height: 1;
}

.doc-count-card .doc-info .doc-label {
    font-size: 11px;
    color: #718096;
    margin-top: 3px;
}

/* Dashboard sections */
.dash-section {
    background: #fff;
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    margin-bottom: 20px;
}

.dash-section h2 {
    font-size: 15px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 16px;
}

/* Dashboard two-panel */
.dash-two-panel {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* Activity feed */
.activity-feed {
    list-style: none;
    padding: 0;
    margin: 0;
}

.activity-feed li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f4f8;
    font-size: 13px;
    color: #4a5568;
}

.activity-feed li:last-child {
    border-bottom: none;
}

.activity-feed .act-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
}

.activity-feed .act-date {
    color: #a0aec0;
    font-size: 11px;
    margin-top: 2px;
}

/* Status breakdown list */
.status-breakdown {
    list-style: none;
    padding: 0;
    margin: 0;
}

.status-breakdown li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 13px;
    border-bottom: 1px solid #f0f4f8;
}

.status-breakdown li:last-child {
    border-bottom: none;
}

.status-breakdown .sb-count {
    font-weight: 700;
    color: #2d3748;
    background: #edf2f7;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
}

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 15px;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .two-column {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .a4-page {
        padding: 15mm;
    }

    .kpi-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .kpi-card {
        padding: 14px;
    }

    .kpi-card .kpi-value {
        font-size: 22px;
    }

    .list-page-header {
        flex-direction: column;
        gap: 12px;
    }

    .list-toolbar {
        flex-direction: column;
    }

    .search-box {
        min-width: 100%;
    }

    .filter-select {
        width: 100%;
    }

    .list-card {
        border-radius: 8px;
        overflow-x: auto;
    }

    .list-card table {
        min-width: 700px;
    }

    /* Sidebar: hidden by default on mobile, shown on toggle */
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    body:has(.topbar) .page-container {
        margin-left: 0;
        padding: 20px 16px;
    }

    .topbar-logo span {
        font-size: 14px;
    }

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

    .dash-two-panel {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .fin-kpi-grid {
        grid-template-columns: 1fr;
    }

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

