/* =========================================================
   VMS - PROFESSIONAL MODERN THEME
   Vehicle & Store Management System
   ========================================================= */

:root {
    --navy: #0f2747;
    --navy-2: #173b67;
    --blue: #2563eb;
    --blue-2: #1d4ed8;
    --sky: #eaf2ff;
    --bg: #f3f6fb;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --text: #172033;
    --muted: #64748b;
    --line: #d9e2ef;
    --line-dark: #c2cedd;
    --success: #16803a;
    --warning: #b66a00;
    --danger: #c92a2a;
    --shadow: 0 8px 24px rgba(15, 39, 71, 0.08);
    --shadow-hover: 0 12px 30px rgba(15, 39, 71, 0.14);
    --radius: 12px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: "Segoe UI", Arial, Helvetica, sans-serif;
    background: linear-gradient(135deg, #f7f9fd 0%, #eef3f9 100%);
    color: var(--text);
    font-size: 13px;
    line-height: 1.45;
}

/* ========================= SIDEBAR ========================= */
.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 248px;
    height: 100vh;
    padding: 22px 16px;
    overflow-y: auto;
    z-index: 1000;
    background:
        radial-gradient(circle at 20% 0%, rgba(71, 134, 255, .24), transparent 32%),
        linear-gradient(180deg, #102b4e 0%, #0b1f39 100%);
    box-shadow: 8px 0 30px rgba(3, 18, 38, .12);
}

.sidebar h2 {
    margin: 0 0 20px;
    color: #fff;
    text-align: center;
    font-size: 30px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: 5px;
    text-shadow: 0 2px 10px rgba(0,0,0,.18);
}

.created-by {
    text-align: center;
    margin: 0 0 22px;
    padding: 13px 10px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.11);
    border-radius: 11px;
}
.created-by span {
    display: block;
    color: #9fb5d0;
    font-size: 9px;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.created-by strong {
    display: block;
    color: #fff;
    font-size: 13px;
    letter-spacing: .7px;
}
.created-by small {
    display: block;
    color: #8299b5;
    font-size: 9px;
    margin-top: 3px;
}

.sidebar ul { list-style: none; padding: 0; margin: 0; }
.sidebar li {
    position: relative;
    color: #dbe7f5;
    margin: 5px 0;
    border-radius: 9px;
    font-size: 13px;
    transition: .2s ease;
}
.sidebar li a,
.sidebar li:not(:has(a)) {
    display: block;
    padding: 10px 12px;
}
.sidebar a { color: inherit; text-decoration: none; }
.sidebar li:hover {
    color: #fff;
    background: rgba(255,255,255,.08);
    transform: translateX(2px);
}
.sidebar li.active {
    color: #fff;
    background: linear-gradient(90deg, #2f70e8, #245ec7);
    box-shadow: 0 6px 16px rgba(37,99,235,.25);
    font-weight: 700;
}
.sidebar li.active::before {
    content: "";
    position: absolute;
    left: -16px;
    top: 7px;
    bottom: 7px;
    width: 4px;
    border-radius: 0 4px 4px 0;
    background: #86b6ff;
}

/* ========================= MAIN ========================= */
.main-content {
    margin-left: 248px;
    padding: 25px 30px 40px;
    min-height: 100vh;
}
.main-content > h1 {
    margin: 0;
    color: #102846;
    font-size: 25px;
    font-weight: 750;
    letter-spacing: -.3px;
}
.page-title {
    margin: 4px 0 20px !important;
    color: var(--muted) !important;
    font-size: 13px !important;
    font-weight: 500;
}
.main-content > h1::after {
    content: "";
    display: block;
    width: 46px;
    height: 3px;
    margin-top: 9px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--blue), #60a5fa);
}

/* ========================= DASHBOARD CARDS ========================= */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 8px;
}
.card {
    position: relative;
    overflow: hidden;
    min-height: 108px;
    padding: 18px 18px 15px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #2563eb, #60a5fa);
}
.card::after {
    content: "";
    position: absolute;
    right: -28px;
    top: -28px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(37,99,235,.055);
}
.card:hover {
    transform: translateY(-2px);
    border-color: #c3d3eb;
    box-shadow: var(--shadow-hover);
}
.card h3 {
    margin: 0 0 9px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
    letter-spacing: .15px;
}
.card p {
    margin: 0 !important;
    color: #102846 !important;
    font-size: 23px !important;
    font-weight: 800;
    line-height: 1.15;
}
.dashboard-cards .card:nth-child(2)::before { background: linear-gradient(180deg,#dc2626,#fb7185); }
.dashboard-cards .card:nth-child(3)::before { background: linear-gradient(180deg,#d97706,#fbbf24); }
.dashboard-cards .card:nth-child(5)::before { background: linear-gradient(180deg,#0891b2,#22d3ee); }
.dashboard-cards .card:nth-child(6)::before { background: linear-gradient(180deg,#7c3aed,#a78bfa); }
.dashboard-cards .card:nth-child(7)::before { background: linear-gradient(180deg,#059669,#34d399); }
.dashboard-cards .card:nth-child(8)::before { background: linear-gradient(180deg,#ea580c,#fb923c); }

/* ========================= PANELS / FORMS ========================= */
.vehicle-form,
.trip-report,
.document-alerts {
    background: rgba(255,255,255,.96);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.vehicle-form { padding: 18px; margin: 14px 0 18px; }
.trip-report { padding: 18px; margin: 16px 0 18px; }
.document-alerts { padding: 15px; margin-top: 14px; }

.vehicle-form h2,
.trip-report h2,
.document-alerts h2 {
    margin: 0 0 15px;
    color: #173354;
    font-size: 16px;
    font-weight: 750;
}
.trip-report h2,
.document-alerts h2 {
    padding-bottom: 10px;
    border-bottom: 1px solid #e7edf5;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 14px;
}
.form-group { display: flex; flex-direction: column; min-width: 0; }
.form-group label {
    margin-bottom: 5px;
    color: #40526b;
    font-size: 11px;
    font-weight: 700;
}

.form-group input,
.form-group select,
.form-group textarea,
.trip-filters input,
.trip-filters select,
.vehicle-search input {
    width: 100%;
    min-height: 36px;
    padding: 7px 10px;
    color: #1f2c3d;
    background: #fff;
    border: 1px solid #cbd6e4;
    border-radius: 7px;
    font: inherit;
    font-size: 12px;
    transition: border .18s ease, box-shadow .18s ease, background .18s ease;
}
.form-group textarea { min-height: 72px; resize: vertical; }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.trip-filters input:focus,
.trip-filters select:focus,
.vehicle-search input:focus {
    outline: none;
    border-color: #6d9df5;
    box-shadow: 0 0 0 3px rgba(37,99,235,.11);
}
input[readonly] { background: #f2f5f9 !important; color: #59697d; }

/* ========================= BUTTONS ========================= */
button,
.save-btn {
    font-family: inherit;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.save-btn,
.trip-filters button {
    min-height: 36px;
    padding: 0 16px;
    border: 0;
    border-radius: 7px;
    color: #fff;
    background: linear-gradient(135deg, #2d6be3, #1d55bd);
    box-shadow: 0 4px 12px rgba(37,99,235,.18);
    font-size: 11px;
    font-weight: 750;
    cursor: pointer;
}
.save-btn { margin-top: 11px; }
.save-btn:hover,
.trip-filters button:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, #2563eb, #174aa8);
    box-shadow: 0 6px 15px rgba(37,99,235,.24);
}

.vehicle-search { display: flex; gap: 8px; margin-bottom: 14px; }
.vehicle-search input { max-width: 390px; }
.vehicle-search button {
    min-height: 36px;
    padding: 0 14px;
    border: 0;
    border-radius: 7px;
    background: #173b67;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}
.vehicle-search button:hover { background: #102d52; transform: translateY(-1px); }

/* ========================= FILTERS ========================= */
.trip-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    margin-bottom: 14px;
    background: #f7f9fc;
    border: 1px solid #e1e8f1;
    border-radius: 9px;
}
.trip-filters label { color: #495a70; font-size: 11px; font-weight: 700; }
.trip-filters input,
.trip-filters select { width: auto; min-width: 130px; }

/* ========================= STORE TABS ========================= */
.store-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 7px;
    margin-bottom: 16px;
    background: #eaf0f8;
    border: 1px solid #d8e1ed;
    border-radius: 10px;
}
.store-tabs button {
    min-height: 34px;
    padding: 0 15px;
    border: 1px solid transparent;
    border-radius: 7px;
    background: transparent;
    color: #40546d;
    font-size: 11px;
    font-weight: 750;
    cursor: pointer;
}
.store-tabs button:hover { background: rgba(255,255,255,.75); color: #1d4ed8; }
.store-tabs button.active {
    color: #fff;
    background: linear-gradient(135deg,#2d6be3,#1d55bd);
    box-shadow: 0 4px 10px rgba(37,99,235,.2);
}

/* ========================= SUMMARY ========================= */
.trip-summary,
#inventorySummaryContainer .trip-summary,
#inwardTableContainer .trip-summary,
#outwardTableContainer .trip-summary,
#spareHistoryContent .trip-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 10px;
    margin: 12px 0 14px;
}
#spareHistoryContent .trip-summary { grid-template-columns: repeat(4,minmax(0,1fr)); }
.trip-summary > div,
#inventorySummaryContainer .trip-summary > div,
#inwardTableContainer .trip-summary > div,
#outwardTableContainer .trip-summary > div,
#spareHistoryContent .trip-summary > div {
    padding: 11px 10px;
    text-align: center;
    background: linear-gradient(180deg,#fbfcfe,#f5f8fc);
    border: 1px solid #dce5f0;
    border-radius: 9px;
}
.trip-summary strong,
#spareHistoryContent .trip-summary strong {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 10px;
}
.trip-summary span,
#spareHistoryContent .trip-summary span {
    display: block;
    color: #18314f;
    font-size: 16px;
    font-weight: 800;
}

/* ========================= TABLES ========================= */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin-top: 10px;
    border: 1px solid var(--line-dark);
    border-radius: 9px;
    background: #fff;
}

#vehicleTable,
#tripTable,
#dieselTable,
#inventorySummaryContainer table,
#inwardTableContainer table,
#outwardTableContainer table,
#storeTableContainer table,
#vehicleHistoryContainer table,
#spareHistoryContent table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    background: #fff;
    font-size: 11px;
}

#vehicleTable th, #vehicleTable td,
#tripTable th, #tripTable td,
#dieselTable th, #dieselTable td,
#inventorySummaryContainer th, #inventorySummaryContainer td,
#inwardTableContainer th, #inwardTableContainer td,
#outwardTableContainer th, #outwardTableContainer td,
#storeTableContainer th, #storeTableContainer td,
#vehicleHistoryContainer th, #vehicleHistoryContainer td,
#spareHistoryContent th, #spareHistoryContent td {
    padding: 8px 9px;
    border: 1px solid #d5dee9;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}

#vehicleTable th,
#tripTable th,
#dieselTable th,
#inventorySummaryContainer th,
#inwardTableContainer th,
#outwardTableContainer th,
#storeTableContainer th,
#vehicleHistoryContainer th,
#spareHistoryContent th {
    color: #173354;
    background: #eaf0f7;
    border-color: #c8d4e2;
    font-weight: 800;
    letter-spacing: .1px;
}
#vehicleTable tbody tr:nth-child(even),
#tripTable tbody tr:nth-child(even),
#dieselTable tbody tr:nth-child(even),
#inventorySummaryContainer tbody tr:nth-child(even),
#inwardTableContainer tbody tr:nth-child(even),
#outwardTableContainer tbody tr:nth-child(even),
#storeTableContainer tbody tr:nth-child(even),
#vehicleHistoryContainer tbody tr:nth-child(even),
#spareHistoryContent tbody tr:nth-child(even) { background: #fbfcfe; }

#vehicleTable tbody tr:hover,
#tripTable tbody tr:hover,
#dieselTable tbody tr:hover,
#inventorySummaryContainer tbody tr:hover,
#inwardTableContainer tbody tr:hover,
#outwardTableContainer tbody tr:hover,
#storeTableContainer tbody tr:hover,
#vehicleHistoryContainer tbody tr:hover,
#spareHistoryContent tbody tr:hover { background: #eef5ff; }

#inventorySummaryContainer tfoot th,
#inventorySummaryContainer tfoot td { background: #e9eff7; font-weight: 800; }

#inventorySummaryContainer,
#inwardTableContainer,
#outwardTableContainer,
#storeTableContainer,
#vehicleHistoryContainer,
#spareHistoryContent { width: 100%; overflow-x: auto; }

/* ========================= STATUS / ALERTS ========================= */
.document-expired, .doc-expired { color: var(--danger); font-weight: 800; }
.document-expiring, .doc-expiring { color: var(--warning); font-weight: 800; }
.document-valid, .doc-valid { color: var(--success); font-weight: 800; }
.doc-none { color: #748397; }

.document-alert {
    padding: 10px 12px;
    margin-bottom: 7px;
    border-radius: 8px;
    font-size: 12px;
}
.alert-expired { background: #fff0f0; color: #a92121; border-left: 4px solid #dc2626; font-weight: 700; }
.alert-warning { background: #fff8e7; color: #8a5200; border-left: 4px solid #f59e0b; font-weight: 700; }
.alert-valid { background: #edf9f1; color: #176535; border-left: 4px solid #22a447; }

.vehicle-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 20px;
    background: #edf1f6;
    color: #42536a;
    font-size: 10px;
    font-weight: 750;
}

/* ========================= ACTION BUTTONS ========================= */
.action-buttons { display: flex; gap: 5px; justify-content: center; }
.action-buttons button,
.edit-trip-btn, .delete-trip-btn,
#tripTable button {
    border: 0;
    padding: 5px 9px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 10px;
    font-weight: 700;
}
.edit-btn, .edit-trip-btn { background: #e8f0ff; color: #1d55bd; }
.edit-btn:hover, .edit-trip-btn:hover { background: #d8e7ff; }
.delete-btn, .delete-trip-btn { background: #fff0f0; color: #bd2525; }
.delete-btn:hover, .delete-trip-btn:hover { background: #ffe0e0; }

/* ========================= SCROLLBAR ========================= */
.sidebar::-webkit-scrollbar { width: 5px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 8px; }
.table-wrapper::-webkit-scrollbar,
#inventorySummaryContainer::-webkit-scrollbar,
#inwardTableContainer::-webkit-scrollbar,
#outwardTableContainer::-webkit-scrollbar,
#storeTableContainer::-webkit-scrollbar,
#vehicleHistoryContainer::-webkit-scrollbar { height: 7px; }
.table-wrapper::-webkit-scrollbar-thumb,
#inventorySummaryContainer::-webkit-scrollbar-thumb,
#inwardTableContainer::-webkit-scrollbar-thumb,
#outwardTableContainer::-webkit-scrollbar-thumb,
#storeTableContainer::-webkit-scrollbar-thumb,
#vehicleHistoryContainer::-webkit-scrollbar-thumb { background: #c2cfdf; border-radius: 8px; }

/* ========================= RESPONSIVE ========================= */
@media (max-width: 1150px) {
    .dashboard-cards { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 900px) {
    .dashboard-cards { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .trip-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
    #spareHistoryContent .trip-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 768px) {
    .sidebar { position: relative; width: 100%; height: auto; padding: 16px; }
    .sidebar h2 { font-size: 25px; margin-bottom: 14px; }
    .sidebar ul { display: grid; grid-template-columns: repeat(2,1fr); gap: 5px; }
    .sidebar li { margin: 0; }
    .sidebar li.active::before { display: none; }
    .main-content { margin-left: 0; padding: 18px 14px 30px; }
    .main-content > h1 { font-size: 21px; }
    .form-grid { grid-template-columns: 1fr; }
    .dashboard-cards { grid-template-columns: 1fr; }
    .store-tabs button { flex: 1 1 42%; }
    .trip-summary,
    #inventorySummaryContainer .trip-summary,
    #inwardTableContainer .trip-summary,
    #outwardTableContainer .trip-summary,
    #spareHistoryContent .trip-summary { grid-template-columns: 1fr; }
    .vehicle-search { flex-direction: column; }
    .vehicle-search input { max-width: 100%; }
}
@media (max-width: 460px) {
    .sidebar ul { grid-template-columns: 1fr; }
    .vehicle-form, .trip-report { padding: 13px; }
    .card { min-height: 95px; }
}

/* ========================= EDIT LOG ========================= */
.edit-log-filter { margin-bottom: 16px; }
.report-heading-row { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
.report-heading-row h2 { margin:0; }
.edit-log-table th { white-space: nowrap; }
.edit-log-table td { vertical-align: top; }
.edit-log-table .old-value { background:#fff5f5; color:#9b2c2c; font-weight:650; }
.edit-log-table .new-value { background:#f0fff4; color:#176b38; font-weight:650; }
.log-module { display:inline-block; padding:4px 8px; border-radius:999px; background:#eaf1ff; color:#2459b5; font-size:10px; font-weight:800; }
.empty-log { text-align:center; color:#718096; padding:28px !important; }
.secondary-btn { background:#eef2f7 !important; color:#334155 !important; }

/* ================= MAINTENANCE ENHANCED ================= */
.maintenance-repeat-panel{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:14px 0;padding:12px;background:#f7faff;border:1px solid #d8e5f5;border-radius:10px}
.maintenance-repeat-panel>div{background:#fff;border:1px solid #dfe8f3;border-radius:8px;padding:10px;text-align:center}
.maintenance-repeat-panel strong{display:block;font-size:10px;color:#6b7a90;margin-bottom:5px;text-transform:uppercase;letter-spacing:.3px}
.maintenance-repeat-panel span{font-size:13px;font-weight:800;color:#18314f}
.maintenance-description-box{margin-top:12px}.maintenance-description-box textarea{width:100%;resize:vertical;min-height:82px;border:1px solid #cfd9e6;border-radius:8px;padding:10px;font:inherit;background:#fff;color:#22364e;outline:none}.maintenance-description-box textarea:focus{border-color:#7da8e8;box-shadow:0 0 0 3px rgba(37,99,235,.08)}
#maintenanceTable{width:100%;border-collapse:collapse;background:#fff;font-size:10.5px}#maintenanceTable th,#maintenanceTable td{border:1px solid #d5dee9;padding:7px 8px;text-align:center;vertical-align:middle;white-space:nowrap}#maintenanceTable th{background:#eaf0f7;color:#173354;font-weight:800}.description-cell{white-space:normal!important;min-width:180px;max-width:280px;text-align:left!important}.maintenance-summary{grid-template-columns:repeat(5,minmax(0,1fr))!important}.status-active,.status-cancelled{display:inline-block;padding:4px 7px;border-radius:12px;font-size:9px;font-weight:800}.status-active{background:#e9f8ef;color:#16743a}.status-cancelled{background:#fff0f0;color:#b42323}.cancel-btn{border:0;padding:5px 9px;border-radius:6px;cursor:pointer;font-size:10px;font-weight:700;background:#fff4e5;color:#a85b00}.cancel-btn:hover{background:#ffe7c0}.cancelled-row{background:#fff7f7!important;color:#7d7d7d}.cancelled-row td{text-decoration:none}.cancelled-text{font-weight:800;color:#b42323}
@media(max-width:900px){.maintenance-repeat-panel{grid-template-columns:repeat(2,1fr)}.maintenance-summary{grid-template-columns:repeat(2,1fr)!important}}@media(max-width:600px){.maintenance-repeat-panel,.maintenance-summary{grid-template-columns:1fr!important}}

/* ================= MECHANIC MASTER ================= */
.field-help{display:block;margin-top:5px;font-size:10px}.field-help a{color:#2563eb;text-decoration:none;font-weight:700}.field-help a:hover{text-decoration:underline}
#mechanicTable{width:100%;border-collapse:collapse;background:#fff;font-size:11px}#mechanicTable th,#mechanicTable td{border:1px solid #d5dee9;padding:8px 9px;text-align:center;vertical-align:middle}#mechanicTable th{background:#eaf0f7;color:#173354;font-weight:800}.mechanic-summary{grid-template-columns:repeat(3,minmax(0,1fr))!important}
@media(max-width:700px){.mechanic-summary{grid-template-columns:1fr!important}}

/* ================= STORE OUTWARD + MAINTENANCE ================= */
.section-note{margin:-4px 0 14px;color:#65758a;font-size:11px;line-height:1.55;background:#f7faff;border:1px solid #dce7f4;border-left:4px solid #2563eb;border-radius:8px;padding:9px 11px}
.outward-item-editor{margin-top:16px;padding:14px;border:1px solid #d9e4f1;border-radius:10px;background:#f9fbfe}.outward-item-editor h3{margin:0 0 12px;color:#173354;font-size:14px}.outward-item-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.outward-edit-cancel{border:0;padding:9px 14px;border-radius:7px;cursor:pointer;font-size:11px;font-weight:800}.outward-summary{grid-template-columns:repeat(3,minmax(0,1fr))!important}.outward-items-table{width:100%;border-collapse:collapse;background:#fff;font-size:11px}.outward-items-table th,.outward-items-table td{border:1px solid #d5dee9;padding:8px 9px;text-align:center;vertical-align:middle;white-space:nowrap}.outward-items-table th{background:#eaf0f7;color:#173354;font-weight:800}.outward-repeat-panel{margin-top:14px}
@media(max-width:700px){.outward-summary{grid-template-columns:1fr!important}}

/* =====================================================
   GATE PASS
===================================================== */
.gate-pass-section{margin-top:24px;background:#fff;border:1px solid #d8e2ee;border-radius:12px;padding:18px;box-shadow:0 4px 14px rgba(15,23,42,.05)}
.gate-pass-section h2{margin:0 0 6px;color:#17324d;font-size:18px}
.gatepass-card{border:1px solid #d7e1ec;border-radius:10px;padding:14px;margin-top:12px;background:#f8fbff}
.gatepass-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:10px}
.gatepass-meta{display:grid;grid-template-columns:repeat(4,minmax(130px,1fr));gap:10px}
.gatepass-meta div{background:#fff;border:1px solid #e2e8f0;border-radius:8px;padding:9px}
.gatepass-meta strong{display:block;font-size:11px;color:#64748b;margin-bottom:4px;text-transform:uppercase}
.status-bd{display:inline-block;padding:5px 10px;border-radius:999px;background:#fff1f2;color:#b42318;font-weight:700;font-size:12px}
.status-ok{display:inline-block;padding:5px 10px;border-radius:999px;background:#ecfdf3;color:#027a48;font-weight:700;font-size:12px}
.gatepass-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.gatepass-print-btn{background:#0f766e;color:#fff;border:0;border-radius:7px;padding:8px 14px;font-weight:700;cursor:pointer}
.mark-ok-btn{background:#166534;color:#fff;border:0;border-radius:7px;padding:8px 14px;font-weight:700;cursor:pointer}
.gatepass-blocked{color:#b42318;font-weight:700;margin-top:10px}
@media(max-width:900px){.gatepass-meta{grid-template-columns:repeat(2,minmax(120px,1fr))}}
@media(max-width:560px){.gatepass-meta{grid-template-columns:1fr}}


/* =====================================================
   PROFIT & LOSS MODULE
===================================================== */
.soft-report-table{width:100%;border-collapse:collapse;background:#fff;font-size:12px}.soft-report-table th,.soft-report-table td{border:1px solid #d9e2ef;padding:8px 9px;vertical-align:middle;white-space:nowrap}.soft-report-table th{background:#f5f8fc;color:#18324f;font-weight:700}.soft-report-table tbody tr:hover{background:#f9fbff}.soft-report-table tfoot th{background:#eef4fb;font-weight:800}.master-compact{max-width:1050px}.pnl-filter-card{background:#fff;border:1px solid #d5dfeb;border-radius:12px;padding:14px 16px;margin-bottom:14px;box-shadow:0 3px 12px rgba(15,39,71,.05)}.pnl-filter-field{display:flex;flex-direction:column;gap:5px}.pnl-filter-field label{font-size:11px;font-weight:700;color:#5c6f86}.pnl-filter-field select{min-width:165px;padding:10px;border:1px solid #cfd9e6;border-radius:7px;background:#fff}.pnl-summary{display:grid;grid-template-columns:repeat(5,minmax(140px,1fr));gap:10px;margin:12px 0}.pnl-summary>div{background:#fff;border:1px solid #d8e2ee;border-radius:10px;padding:13px 14px;box-shadow:0 2px 8px rgba(15,39,71,.04)}.pnl-summary strong{display:block;color:#61748b;font-size:11px;margin-bottom:7px}.pnl-summary span{font-size:19px;font-weight:800;color:#17375e}.pnl-positive{color:#12823b!important}.pnl-negative{color:#c62828!important}.pnl-warning{background:#fff8e6;border:1px solid #efd48b;border-radius:9px;padding:11px 13px;margin:10px 0 14px;color:#704f00;font-size:12px}.pnl-warning a{font-weight:700;color:#145fd1}.pnl-warning-list{margin-top:7px;font-size:11px;color:#806522}.pnl-report{background:#fff;border:1px solid #d8e2ee;border-radius:12px;padding:15px}.pnl-table-wrap{overflow-x:auto}.pnl-table{min-width:2050px}.cell-sub{display:block;font-size:9px;color:#718096;margin-top:3px;font-weight:400}.pnl-note{margin:14px 0;padding:11px 13px;background:#eef5ff;border-left:4px solid #2563d9;border-radius:6px;font-size:12px;color:#334b68}.no-data-cell{text-align:center!important;color:#718096;padding:20px!important}@media(max-width:900px){.pnl-summary{grid-template-columns:repeat(2,1fr)}}@media print{.sidebar,.pnl-filter-card,.pnl-note{display:none!important}.main-content{margin-left:0!important;padding:8px!important}.pnl-report{border:0!important;padding:0!important}.pnl-table{min-width:100%;font-size:8px}.soft-report-table th,.soft-report-table td{padding:4px 3px}.pnl-summary{grid-template-columns:repeat(5,1fr)}body{background:#fff!important}}

/* =========================================================
   COMPACT ACCORDION SIDEBAR
   ========================================================= */
.sidebar {
    width: 210px;
    padding: 16px 12px;
    overflow-x: hidden;
    transition: width .22s ease, padding .22s ease;
}
.main-content {
    margin-left: 210px;
    transition: margin-left .22s ease;
}
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.sidebar-brand h2 {
    flex: 1;
    margin: 0;
    text-align: left;
    font-size: 24px;
    letter-spacing: 3px;
}
.sidebar-toggle {
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 8px;
    background: rgba(255,255,255,.08);
    color: #fff;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}
.sidebar-toggle:hover { background: rgba(255,255,255,.14); }
.sidebar .created-by {
    margin-bottom: 13px;
    padding: 9px 7px;
}
.side-nav { display: grid; gap: 5px; }
.nav-home,
.nav-group-btn {
    width: 100%;
    min-height: 39px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #dbe7f5;
    font: inherit;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    text-decoration: none;
    transition: .18s ease;
}
.nav-group-btn > span:first-child,
.nav-home {
    align-items: center;
}
.nav-group-btn > span:first-child { display: flex; gap: 9px; }
.nav-icon {
    width: 18px;
    display: inline-flex;
    justify-content: center;
    color: #9fc0ed;
    font-size: 15px;
    flex: 0 0 18px;
}
.nav-home:hover,
.nav-group-btn:hover {
    color: #fff;
    background: rgba(255,255,255,.08);
}
.nav-home.active,
.nav-submenu a.active {
    color: #fff;
    background: linear-gradient(90deg, #2f70e8, #245ec7);
    box-shadow: 0 5px 14px rgba(37,99,235,.22);
}
.nav-group .chevron {
    font-size: 19px;
    line-height: 1;
    transition: transform .2s ease;
}
.nav-group.open .chevron { transform: rotate(90deg); }
.nav-submenu {
    display: none;
    margin: 4px 0 5px 27px;
    padding-left: 7px;
    border-left: 1px solid rgba(159,192,237,.28);
}
.nav-group.open .nav-submenu { display: grid; gap: 3px; }
.nav-submenu a {
    display: block;
    padding: 7px 9px;
    border-radius: 7px;
    color: #b9cbe0;
    text-decoration: none;
    font-size: 11.5px;
    line-height: 1.25;
}
.nav-submenu a:hover {
    color: #fff;
    background: rgba(255,255,255,.07);
}

body.sidebar-collapsed .sidebar {
    width: 62px;
    padding-left: 10px;
    padding-right: 10px;
}
body.sidebar-collapsed .main-content { margin-left: 62px; }
body.sidebar-collapsed .sidebar-brand h2,
body.sidebar-collapsed .created-by,
body.sidebar-collapsed .nav-label,
body.sidebar-collapsed .chevron,
body.sidebar-collapsed .nav-submenu { display: none !important; }
body.sidebar-collapsed .sidebar-brand { justify-content: center; }
body.sidebar-collapsed .sidebar-toggle { width: 40px; }
body.sidebar-collapsed .nav-home,
body.sidebar-collapsed .nav-group-btn {
    justify-content: center;
    padding: 8px 6px;
}
body.sidebar-collapsed .nav-group-btn > span:first-child { gap: 0; }
body.sidebar-collapsed .nav-icon { width: 22px; flex-basis: 22px; }

@media (max-width: 760px) {
    .sidebar { width: 62px; padding-left: 10px; padding-right: 10px; }
    .main-content { margin-left: 62px; padding-left: 14px; padding-right: 14px; }
    .sidebar-brand h2, .created-by, .nav-label, .chevron, .nav-submenu { display: none !important; }
    .nav-home, .nav-group-btn { justify-content: center; padding-left: 6px; padding-right: 6px; }
    .nav-group-btn > span:first-child { gap: 0; }
}

/* COMPLETE DASHBOARD OVERVIEW */
.overview-head{display:flex;justify-content:space-between;gap:18px;align-items:flex-end;margin-bottom:18px}.overview-filter{display:flex;gap:10px;align-items:flex-end;background:#fff;border:1px solid #dbe3ee;padding:10px 12px;border-radius:10px}.overview-filter div{display:flex;flex-direction:column;gap:4px}.overview-filter label{font-size:11px;font-weight:700;color:#64748b}.overview-filter input{padding:8px 10px;border:1px solid #cbd5e1;border-radius:6px}.overview-filter button{padding:9px 14px;border:0;border-radius:6px;background:#1d4ed8;color:#fff;font-weight:700;cursor:pointer}.overview-section{background:#fff;border:1px solid #dbe3ee;border-radius:12px;padding:16px;margin-bottom:16px;box-shadow:0 3px 12px rgba(15,23,42,.04)}.section-title-row{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}.section-title-row h2{margin:0;font-size:16px}.section-title-row span,.section-title-row a{font-size:12px;color:#64748b;text-decoration:none}.overview-card-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.overview-card{display:flex;flex-direction:column;min-height:105px;padding:14px;border:1px solid #e2e8f0;border-radius:10px;text-decoration:none;background:linear-gradient(180deg,#fff,#f8fafc)}.overview-card:hover{box-shadow:0 7px 18px rgba(15,23,42,.08);border-color:#bfdbfe}.overview-card span{font-size:12px;font-weight:700;color:#64748b}.overview-card strong{font-size:22px;color:#0f172a;margin:8px 0 5px}.overview-card small{font-size:11px;color:#64748b}.pnl-highlight{border-left:4px solid #2563eb}.mini-stat-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}.mini-stat{border:1px solid #e2e8f0;border-radius:9px;padding:12px;background:#f8fafc}.mini-stat span{display:block;font-size:11px;color:#64748b;font-weight:700}.mini-stat strong{display:block;font-size:17px;margin:7px 0 4px}.mini-stat small{font-size:10px;color:#64748b}.overview-two-col{display:grid;grid-template-columns:1fr 1fr;gap:16px}.compact-alerts{display:flex;flex-direction:column;gap:7px}.dash-alert{display:grid;grid-template-columns:110px 1fr auto;gap:8px;align-items:center;border:1px solid #e2e8f0;border-radius:7px;padding:8px 10px;font-size:11px}.dash-alert span{color:#64748b}.dash-good{padding:14px;border:1px solid #bbf7d0;background:#f0fdf4;border-radius:7px;color:#166534;font-size:12px}.dash-ok,.dash-positive{color:#15803d!important}.dash-bd,.dash-negative{color:#dc2626!important}.dashboard-performance th,.dashboard-performance td{white-space:nowrap;font-size:11px}@media(max-width:1200px){.overview-card-grid{grid-template-columns:repeat(2,1fr)}.mini-stat-grid{grid-template-columns:repeat(3,1fr)}}@media(max-width:760px){.overview-head{align-items:stretch;flex-direction:column}.overview-filter{flex-wrap:wrap}.overview-card-grid,.mini-stat-grid,.overview-two-col{grid-template-columns:1fr}}

/* =========================================================
   ENTRY EXPERIENCE - ATTRACTIVE & QUICK DATA ENTRY
   ========================================================= */
.vehicle-form{
    position:relative;
    overflow:hidden;
    padding:22px 22px 20px;
    border:1px solid #d7e3f2;
    border-top:4px solid #2f6fe4;
    border-radius:16px;
    background:
      radial-gradient(circle at 100% 0%,rgba(96,165,250,.12),transparent 28%),
      linear-gradient(180deg,#ffffff 0%,#fbfdff 100%);
    box-shadow:0 12px 30px rgba(15,39,71,.09);
}
.vehicle-form::after{
    content:"";position:absolute;right:-55px;top:-55px;width:150px;height:150px;border-radius:50%;
    background:rgba(37,99,235,.045);pointer-events:none;
}
.vehicle-form h2{
    position:relative;display:flex;align-items:center;gap:9px;margin:0 -22px 18px;padding:0 22px 14px;
    border-bottom:1px solid #e5edf7;color:#12345d;font-size:17px;font-weight:800;letter-spacing:.1px;
}
.vehicle-form h2::before{
    content:"✦";display:grid;place-items:center;width:27px;height:27px;border-radius:8px;
    background:linear-gradient(135deg,#2f70e8,#60a5fa);color:#fff;font-size:12px;
    box-shadow:0 5px 12px rgba(37,99,235,.22);
}
.form-grid{gap:15px 16px}.form-group label{margin-bottom:6px;color:#344a67;font-size:11px;font-weight:800;letter-spacing:.18px}
.form-group input,.form-group select,.form-group textarea{
    min-height:40px;padding:8px 11px;border:1px solid #cbd8e8;border-radius:9px;background:#fff;
    box-shadow:inset 0 1px 2px rgba(15,23,42,.02);
}
.form-group input:hover,.form-group select:hover,.form-group textarea:hover{border-color:#9eb8dc}
.form-group input:focus,.form-group select:focus,.form-group textarea:focus{
    border-color:#4c83eb;box-shadow:0 0 0 4px rgba(37,99,235,.10),0 5px 12px rgba(37,99,235,.05);background:#fff;
}
input[readonly],textarea[readonly]{background:linear-gradient(180deg,#f4f7fb,#eef3f8)!important;color:#52657c!important;border-color:#d7e0ea!important}
.save-btn{
    min-height:42px;padding:0 22px;border-radius:10px;font-size:12px;letter-spacing:.2px;
    background:linear-gradient(135deg,#2563eb 0%,#174db0 100%);
    box-shadow:0 7px 16px rgba(37,99,235,.23);
}
.save-btn:hover{transform:translateY(-2px);box-shadow:0 10px 20px rgba(37,99,235,.28)}
#storeOutwardSection>.vehicle-form,#storeInwardSection>.vehicle-form{border-top-color:#0f766e}
#storeOutwardSection>.vehicle-form h2::before,#storeInwardSection>.vehicle-form h2::before{background:linear-gradient(135deg,#0f766e,#14b8a6)}
#storeOutwardSection .trip-report,#storeInwardSection .trip-report{border-radius:12px;border-color:#dce6f0;background:#fff}
.maintenance-repeat-panel,.gate-pass-section{border-radius:12px!important;box-shadow:0 5px 14px rgba(15,39,71,.04)}
.field-help{margin-top:5px;font-size:10px}.field-help a{color:#2563eb;font-weight:700;text-decoration:none}

/* EXCEL EXPORT */
.excel-export-btn{
    float:right;margin:-46px 0 14px 10px;min-height:36px;padding:0 15px;border:1px solid #b9d8c4;border-radius:8px;
    background:linear-gradient(135deg,#15803d,#0f6a31);color:#fff;font-size:11px;font-weight:800;cursor:pointer;
    box-shadow:0 5px 12px rgba(21,128,61,.18);transition:.16s ease;
}
.excel-export-btn:hover{transform:translateY(-1px);box-shadow:0 7px 16px rgba(21,128,61,.24)}
@media(max-width:760px){.excel-export-btn{float:none;margin:0 0 14px;width:100%}.vehicle-form{padding:17px}.vehicle-form h2{margin-left:-17px;margin-right:-17px;padding-left:17px;padding-right:17px}}


/* =========================================================
   VMS PREMIUM DASHBOARD THEME
   Visual-only layer: no business logic changed
========================================================= */
:root{
  --vms-navy:#0b1f3a;
  --vms-blue:#155eef;
  --vms-blue2:#3b82f6;
  --vms-cyan:#0ea5e9;
  --vms-bg:#eef4fb;
  --vms-card:#ffffff;
  --vms-text:#10233f;
  --vms-muted:#6b7a90;
  --vms-line:#dbe6f2;
  --vms-soft:#f7faff;
}

body{
  background:
    radial-gradient(circle at 85% 0%, rgba(59,130,246,.10), transparent 27%),
    radial-gradient(circle at 25% 100%, rgba(14,165,233,.07), transparent 25%),
    var(--vms-bg);
}

.main-content{
  background:transparent !important;
  padding-top:22px !important;
}

.overview-head{
  position:relative;
  overflow:hidden;
  padding:22px 24px;
  border-radius:18px;
  background:linear-gradient(120deg,#0b1f3a 0%,#123d72 55%,#155eef 100%);
  box-shadow:0 14px 34px rgba(15,46,91,.18);
  color:#fff;
}
.overview-head:after{
  content:"VMS";
  position:absolute;
  right:28px;
  top:-22px;
  font-size:110px;
  font-weight:900;
  letter-spacing:8px;
  color:rgba(255,255,255,.045);
  pointer-events:none;
}
.overview-head h1{color:#fff !important;font-size:27px !important;letter-spacing:.2px}
.overview-head .page-title{color:#dbeafe !important;margin-bottom:0}
.overview-filter{
  position:relative;
  z-index:1;
  background:rgba(255,255,255,.12) !important;
  border:1px solid rgba(255,255,255,.22) !important;
  backdrop-filter:blur(8px);
  box-shadow:none !important;
}
.overview-filter label{color:#dbeafe !important}
.overview-filter input{
  background:#fff;
  border-color:rgba(255,255,255,.35) !important;
}
.overview-filter button{
  background:#fff !important;
  color:#123d72 !important;
  box-shadow:0 5px 14px rgba(0,0,0,.12);
}
.overview-filter button:hover{transform:translateY(-1px)}

.overview-section{
  border:1px solid rgba(203,216,232,.85) !important;
  border-radius:16px !important;
  box-shadow:0 8px 24px rgba(31,55,86,.065) !important;
  background:rgba(255,255,255,.94) !important;
}
.section-title-row{
  padding-bottom:10px;
  border-bottom:1px solid #edf2f7;
}
.section-title-row h2{
  position:relative;
  padding-left:12px;
  color:var(--vms-text) !important;
}
.section-title-row h2:before{
  content:"";
  position:absolute;
  left:0;top:2px;bottom:2px;
  width:4px;border-radius:5px;
  background:linear-gradient(var(--vms-blue2),var(--vms-cyan));
}

.overview-card{
  position:relative;
  overflow:hidden;
  min-height:118px !important;
  border:1px solid #e1eaf4 !important;
  border-radius:14px !important;
  background:linear-gradient(145deg,#ffffff 0%,#f7faff 100%) !important;
  box-shadow:0 5px 15px rgba(34,65,105,.055);
}
.overview-card:before{
  content:"";
  position:absolute;
  left:0;top:0;bottom:0;width:4px;
  background:linear-gradient(#3b82f6,#0ea5e9);
}
.overview-card:after{
  content:"";
  position:absolute;
  width:70px;height:70px;border-radius:50%;
  right:-25px;top:-28px;
  background:rgba(59,130,246,.06);
}
.overview-card:hover{
  transform:translateY(-4px) !important;
  box-shadow:0 12px 25px rgba(31,71,125,.12) !important;
}
.overview-card span{
  color:#60728b !important;
  text-transform:uppercase;
  letter-spacing:.55px;
  font-size:10px !important;
}
.overview-card strong{
  color:#12345b !important;
  font-size:24px !important;
}
.overview-card small{color:#75869b !important}
.pnl-highlight{
  background:linear-gradient(145deg,#f3f8ff,#eaf3ff) !important;
  border-color:#bfdbfe !important;
}

.mini-stat{
  position:relative;
  overflow:hidden;
  background:linear-gradient(145deg,#f8fbff,#fff) !important;
  border:1px solid #e0e9f3 !important;
  border-radius:12px !important;
  box-shadow:0 3px 10px rgba(30,64,110,.04);
}
.mini-stat:after{
  content:"";
  position:absolute;left:0;right:0;bottom:0;height:3px;
  background:linear-gradient(90deg,#3b82f6,#0ea5e9);
  opacity:.65;
}
.mini-stat strong{color:#173b66 !important}

.dashboard-performance{
  border-collapse:separate !important;
  border-spacing:0 !important;
  border:1px solid #dbe6f2 !important;
  border-radius:10px;
  overflow:hidden;
}
.dashboard-performance thead th{
  background:linear-gradient(180deg,#eaf2fb,#dfeaf7) !important;
  color:#173b66 !important;
  border-color:#cbd9e8 !important;
  font-weight:800 !important;
}
.dashboard-performance tbody tr:nth-child(even){background:#f9fbfe}
.dashboard-performance tbody tr:hover{background:#eef6ff}
.dashboard-performance td{border-color:#e3ebf4 !important}

.dash-alert{
  background:#fbfdff;
  border-color:#dfe8f2 !important;
  border-left:3px solid #60a5fa !important;
}
.dash-good{
  border-color:#b7e4c7 !important;
  background:linear-gradient(90deg,#effcf4,#f8fffb) !important;
}

.sidebar{
  background:linear-gradient(180deg,#071a30 0%,#0b2747 55%,#0c3159 100%) !important;
  box-shadow:7px 0 24px rgba(10,31,57,.12);
}
.sidebar-brand{
  border-bottom:1px solid rgba(255,255,255,.08);
  padding-bottom:12px;
}
.sidebar h2{letter-spacing:2px}
.nav-home,.nav-group-btn{
  border:1px solid transparent;
}
.nav-home:hover,.nav-group-btn:hover{
  background:rgba(255,255,255,.08) !important;
  border-color:rgba(255,255,255,.07);
}
.nav-submenu a:hover{
  background:rgba(59,130,246,.18) !important;
}

@media(max-width:760px){
  .overview-head{padding:18px}
  .overview-head:after{font-size:70px}
}


/* =========================================================
   VMS FINAL COMPACT PREMIUM SIZE
========================================================= */
.sidebar{width:210px !important;padding:14px 12px !important}
.sidebar h2{font-size:21px !important;margin-bottom:14px !important}
.created-by{padding:8px 4px !important;margin-bottom:12px !important}
.created-by strong{font-size:12px !important}
.created-by span,.created-by small{font-size:9px !important}
.main-content{margin-left:210px !important;padding:16px 18px !important}
.sidebar.collapsed{width:68px !important}
.sidebar.collapsed + .main-content{margin-left:68px !important}
.nav-home,.nav-group-btn{min-height:36px !important;padding:8px 9px !important;font-size:12px !important}
.nav-submenu a{padding:7px 10px 7px 34px !important;font-size:11px !important}
.overview-head{padding:18px 20px !important;border-radius:14px !important}
.overview-head h1{font-size:24px !important}
.overview-head .page-title{font-size:12px !important}
.overview-filter{padding:8px 10px !important}
.overview-filter input{height:34px !important;padding:6px 8px !important}
.overview-filter button{height:34px !important;padding:6px 12px !important}
.overview-section{padding:13px !important;margin-bottom:12px !important;border-radius:12px !important}
.section-title-row{margin-bottom:9px !important;padding-bottom:8px !important}
.section-title-row h2{font-size:15px !important}
.overview-card-grid{gap:9px !important}
.overview-card{min-height:98px !important;padding:11px 12px !important;border-radius:11px !important}
.overview-card strong{font-size:20px !important;margin:6px 0 3px !important}
.overview-card span{font-size:9.5px !important}
.overview-card small{font-size:10px !important}
.mini-stat-grid{gap:8px !important}
.mini-stat{padding:9px 10px !important}
.mini-stat strong{font-size:15px !important;margin:5px 0 3px !important}
.vehicle-form,.trip-report,.report-section,.store-section,.entry-card,.master-card{padding:14px !important;border-radius:12px !important}
.form-grid{gap:10px 12px !important}
.form-group label{font-size:11px !important;margin-bottom:4px !important}
input,select,textarea{font-size:12px !important}
.form-group input,.form-group select,.form-group textarea{min-height:36px !important;padding:7px 9px !important}
button,.btn,.save-btn,.primary-btn{min-height:34px;font-size:11px !important}
table th,table td{padding:7px 8px !important;font-size:11px !important}
.main-content h1{font-size:22px !important}
.main-content h2{font-size:16px}
.page-title{font-size:12px !important}
@media(max-width:760px){
 .sidebar{width:68px !important}
 .main-content{margin-left:68px !important;padding:12px !important}
}
\n/* TRIP EXCEL IMPORT */\n.trip-import-card{margin:0 0 14px;background:linear-gradient(135deg,#f7fbff,#eef6ff);border:1px solid #cfe0f3;border-left:4px solid #2563eb;border-radius:12px;padding:13px 14px;box-shadow:0 4px 14px rgba(30,64,110,.05)}.trip-import-head{display:flex;align-items:center;justify-content:space-between;gap:15px}.trip-import-head h2{margin:0 0 3px!important;color:#153b68;font-size:15px!important}.trip-import-head p{margin:0;color:#6b7a90;font-size:11px}.trip-import-actions{display:flex;gap:8px;flex-wrap:wrap}.trip-import-actions button{border:0;border-radius:7px;padding:8px 12px;cursor:pointer;font-weight:700}.template-btn{background:#fff!important;color:#17406f!important;border:1px solid #b9cee5!important}.import-btn{background:linear-gradient(135deg,#155eef,#0ea5e9)!important;color:#fff!important}.trip-import-note{margin-top:9px;padding-top:8px;border-top:1px dashed #c9d9ea;color:#5d6f84;font-size:10.5px}.import-result{margin-top:9px;border-radius:7px;padding:9px 10px;font-size:11px}.import-result.success{background:#effcf4;border:1px solid #b7e4c7;color:#166534}.import-result.error{background:#fff4f4;border:1px solid #fecaca;color:#991b1b}.import-result.warn{background:#fffbea;border:1px solid #fde68a;color:#854d0e}.import-result.info{background:#eff6ff;border:1px solid #bfdbfe;color:#1e40af}.import-error-list{margin-top:7px;max-height:190px;overflow:auto;background:rgba(255,255,255,.65);padding:7px;border-radius:5px}.import-error-list div{padding:3px 0;border-bottom:1px solid rgba(0,0,0,.05)}@media(max-width:760px){.trip-import-head{align-items:flex-start;flex-direction:column}}\n
.store-import-panel{margin:14px 0 18px;padding:14px 16px;border:1px solid #cfe0f3;border-left:4px solid #2563eb;border-radius:12px;background:linear-gradient(135deg,#f8fbff,#eef6ff);display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap}.store-import-panel h3{margin:0 0 4px;color:#163a66}.store-import-panel p{margin:0;color:#64748b;font-size:11px}.store-import-actions{display:flex;gap:8px;flex-wrap:wrap}.store-import-actions button{border:0;border-radius:7px;padding:9px 12px;background:#174a82;color:#fff;font-weight:700;cursor:pointer}.store-import-actions button:first-child{background:#0f766e}.store-import-result{width:100%;font-size:11px;line-height:1.55;color:#334155}.store-import-result strong{color:#0f3d69}

/* ===== WEEKLY STORE PURCHASE PLANNING ===== */
.planning-page-head{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:14px}.planning-status-box{background:#fff;border:1px solid #dce6f2;border-radius:10px;padding:8px 14px;min-width:150px}.planning-status-box span{display:block;font-size:9px;text-transform:uppercase;color:#64748b;font-weight:700}.planning-status-box strong{display:block;margin-top:4px;color:#1d4ed8}.planning-flow{display:flex;align-items:center;justify-content:center;margin:12px 0 18px}.flow-step{display:flex;align-items:center;gap:7px;color:#94a3b8;font-size:11px;font-weight:700}.flow-step b{display:flex;width:27px;height:27px;align-items:center;justify-content:center;border-radius:50%;background:#e2e8f0;color:#64748b}.flow-step.active{color:#155eef}.flow-step.active b{background:#155eef;color:#fff}.flow-line{height:2px;width:65px;background:#dbe4ef;margin:0 10px}.planning-card{margin-bottom:16px}.planning-card-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:12px}.planning-card-head h2{margin:0 0 4px}.planning-card-head p{margin:0;color:#64748b;font-size:11px}.planning-period-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:9px;margin:10px 0 12px}.planning-period-item{border:1px solid #e1e8f0;border-radius:9px;background:#f8fbff;padding:10px}.planning-period-item span{display:block;font-size:9px;text-transform:uppercase;color:#64748b;font-weight:700}.planning-period-item strong{display:block;margin-top:5px;color:#163a66;font-size:14px}.planning-note{border-left:4px solid #3b82f6;background:#eff6ff;border-radius:7px;padding:9px 11px;margin:10px 0 13px;font-size:10.5px;color:#475569}.planning-table th,.planning-table td{font-size:10.5px!important}.planning-cat{display:block;color:#94a3b8;font-size:9px;margin-top:2px}.planning-low{color:#b91c1c;font-weight:800}.approval-qty-input,.po-rate-input{width:90px!important;min-height:30px!important;height:30px!important;padding:4px 6px!important;text-align:right}.approval-box{margin-top:14px;border-top:1px solid #e5edf5;padding-top:13px}.planning-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:12px}.planning-actions button{border:0;border-radius:7px;background:#64748b;color:#fff;padding:9px 13px;font-weight:700;cursor:pointer}.planning-actions .approve-plan-btn{background:#15803d}.po-section{border-left:4px solid #15803d}.po-status{font-size:10px;font-weight:800;color:#15803d;border:1px solid #bbf7d0;background:#f0fdf4;border-radius:20px;padding:6px 10px}.po-total-row{display:flex;justify-content:flex-end;gap:20px;align-items:center;border-top:1px solid #e2e8f0;margin-top:10px;padding-top:12px}.po-total-row span{font-size:11px;color:#64748b;font-weight:700}.po-total-row strong{font-size:18px;color:#163a66}.history-status{font-size:9px;font-weight:800;padding:4px 7px;border-radius:12px;background:#eef2ff;color:#3730a3}.plan-approved,.plan-po-generated{color:#15803d!important}.plan-draft{color:#1d4ed8!important}@media(max-width:900px){.planning-period-grid{grid-template-columns:repeat(2,1fr)}.planning-page-head,.planning-card-head{flex-direction:column}.flow-line{width:25px}}@media(max-width:560px){.planning-period-grid{grid-template-columns:1fr}.planning-flow{justify-content:flex-start;overflow:auto}}
.item-approve-btn{border:0;border-radius:6px;background:#15803d;color:#fff;padding:7px 10px;font-size:9px;font-weight:800;cursor:pointer;white-space:nowrap}.item-approve-btn:hover{filter:brightness(.95)}.item-approved-badge{display:inline-block;border:1px solid #bbf7d0;background:#f0fdf4;color:#15803d;border-radius:14px;padding:5px 8px;font-size:9px;font-weight:800;white-space:nowrap}.plan-partially-approved{color:#15803d!important}

/* ===== ITEM CONSUMPTION / AUDIT / DIRECTOR WORKFLOW ===== */
.item-workflow-actions{display:flex;gap:6px;flex-wrap:wrap;align-items:center;min-width:190px}
.item-view-btn,.item-audit-btn,.item-director-btn{border:0;border-radius:5px;padding:7px 9px;font-size:10px;font-weight:700;cursor:pointer;white-space:nowrap}
.item-view-btn{background:#eaf2ff;color:#1755a5;border:1px solid #bfd4f5}
.item-audit-btn{background:#fff7df;color:#805b00;border:1px solid #ead38b}
.item-director-btn{background:#e9f8ef;color:#087234;border:1px solid #a9ddbd}
.audit-badge,.director-badge{display:inline-block;border-radius:12px;padding:4px 7px;font-size:9px;font-weight:700;line-height:1.35}
.audit-badge{background:#fff7df;color:#805b00;border:1px solid #ead38b}
.director-badge{background:#e9f8ef;color:#087234;border:1px solid #a9ddbd}
.workflow-meta{display:block;font-size:9px;color:#64748b;margin-top:3px;line-height:1.3}
.consumption-modal{position:fixed;inset:0;background:rgba(11,24,41,.58);z-index:9999;padding:26px;overflow:auto}
.consumption-modal-card{max-width:1120px;margin:20px auto;background:#fff;border-radius:12px;box-shadow:0 20px 55px rgba(0,0,0,.25);padding:18px}
.consumption-modal-head{display:flex;justify-content:space-between;align-items:flex-start;border-bottom:1px solid #dbe4ef;padding-bottom:10px;margin-bottom:12px}
.consumption-modal-head h2{margin:0;color:#0f3158}.consumption-modal-head p{margin:4px 0 0;color:#66758a}
.modal-close-btn{border:0;background:#eef3f8;border-radius:6px;width:34px;height:34px;cursor:pointer;font-weight:700}
.consumption-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:12px 0}
.consumption-summary>div{border:1px solid #d7e1ee;border-radius:8px;padding:10px;background:#f8fbff}.consumption-summary span{display:block;font-size:10px;color:#637287;text-transform:uppercase}.consumption-summary strong{display:block;margin-top:4px;color:#0e335e;font-size:15px}
@media(max-width:850px){.consumption-summary{grid-template-columns:repeat(2,1fr)}}

/* Director reject / cancel control */
.item-director-reject-btn{background:#b42318;color:#fff;border:0;border-radius:6px;padding:7px 10px;font-size:11px;font-weight:700;cursor:pointer;margin-left:6px}.item-director-reject-btn:hover{filter:brightness(.94)}.director-reject-badge{display:inline-block;background:#fee4e2;color:#b42318;border:1px solid #fda29b;border-radius:999px;padding:5px 9px;font-size:10px;font-weight:800;letter-spacing:.2px}

/* Urgent Purchase Requirement */
.urgent-purchase-card{border-top:4px solid #e09b23}
.urgent-purchase-card .planning-card-head h2{margin-bottom:4px}
.urgent-form-grid{align-items:end}
@media(max-width:900px){.urgent-form-grid .form-group[style]{grid-column:span 1!important}}

/* =====================================================
   PURCHASE ORDER - BILL / INVOICE STYLE
===================================================== */
.po-bill-preview{background:#fff;border:2px solid #222;border-radius:4px;overflow:hidden;margin-top:12px}
.po-bill-title-row{display:grid;grid-template-columns:1fr 310px;border-bottom:2px solid #222}
.po-bill-company{padding:18px 20px;display:flex;flex-direction:column;gap:4px}
.po-bill-company .po-doc-caption{font-size:25px;font-weight:800;letter-spacing:1.5px}
.po-bill-company strong{font-size:16px}
.po-bill-company small{font-size:11px;color:#666}
.po-bill-meta{border-left:2px solid #222}
.po-bill-meta>div{display:grid;grid-template-columns:95px 1fr;align-items:center;border-bottom:1px solid #999;min-height:42px}
.po-bill-meta>div:last-child{border-bottom:0}
.po-bill-meta span{padding:9px 10px;font-size:11px;font-weight:700;border-right:1px solid #999}
.po-bill-meta input{border:0!important;box-shadow:none!important;border-radius:0!important;background:#fff!important;margin:0!important;height:40px;padding:7px 9px;width:100%}
.po-bill-party-row{display:grid;grid-template-columns:1fr 1fr;border-bottom:2px solid #222}
.po-bill-party-row>div{padding:12px 14px;min-height:78px}
.po-bill-party-row>div+div{border-left:1px solid #999}
.po-mini-label{display:block;font-size:10px;font-weight:700;text-transform:uppercase;color:#666;margin-bottom:7px}
.po-bill-party-row input{width:100%;border:0!important;border-bottom:1px solid #555!important;border-radius:0!important;box-shadow:none!important;padding:7px 2px;font-weight:700;background:#fff!important}
.po-bill-items .table-wrapper{margin:0;overflow-x:auto}
.po-bill-items table{margin:0!important;border:0!important;border-collapse:collapse!important;width:100%}
.po-bill-items table th,.po-bill-items table td{border:1px solid #777!important;padding:8px 7px!important}
.po-bill-items table th:first-child,.po-bill-items table td:first-child{border-left:0!important}
.po-bill-items table th:last-child,.po-bill-items table td:last-child{border-right:0!important}
.po-bill-items table th{background:#f1f1f1!important;color:#111!important}
.po-bill-total{display:flex;justify-content:flex-end;align-items:center;border-top:2px solid #222;min-height:50px}
.po-bill-total span,.po-bill-total strong{padding:13px 16px;border-left:1px solid #999}
.po-bill-total span{min-width:170px;font-weight:700}
.po-bill-total strong{min-width:150px;text-align:right;font-size:17px}
.po-bill-terms{border-top:1px solid #999;padding:12px 14px;font-size:11px;line-height:1.6;min-height:90px}
.po-bill-signature-row{display:grid;grid-template-columns:1fr 230px;gap:70px;padding:55px 20px 18px}
.po-store-signature{border-top:1px solid #222;padding-top:7px;text-align:center;font-size:12px;font-weight:700}
@media(max-width:900px){.po-bill-title-row,.po-bill-party-row{grid-template-columns:1fr}.po-bill-meta{border-left:0;border-top:2px solid #222}.po-bill-party-row>div+div{border-left:0;border-top:1px solid #999}.po-bill-signature-row{grid-template-columns:1fr 190px}}

/* === COMPACT PO CREATION / HIDDEN BILL PREVIEW === */
.po-create-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.po-create-total{display:flex;justify-content:flex-end;align-items:center;gap:18px;padding:10px 12px;border:1px solid #ddd;border-top:0;background:#fff;font-size:14px}
.po-create-total strong{font-size:18px}
@media(max-width:900px){.po-create-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.po-create-grid{grid-template-columns:1fr}}


/* ================= MONTHLY PURCHASE SUMMARY LAYOUT FIX ================= */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

.main-content {
    width: calc(100% - 248px);
    max-width: calc(100% - 248px);
    min-width: 0;
}

.monthly-purchase-report {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

.monthly-purchase-report .trip-filters,
#monthlyPurchaseSummaryCards,
#monthlyPurchaseSummaryContainer {
    max-width: 100%;
    min-width: 0;
}

#monthlyPurchaseSummaryContainer .table-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
}

#monthlyPurchaseSummaryContainer table {
    width: 100%;
    min-width: 850px;
    border-collapse: collapse;
    table-layout: auto;
}

#monthlyPurchaseSummaryContainer th,
#monthlyPurchaseSummaryContainer td {
    padding: 8px 9px;
    border: 1px solid #d5dee9;
    white-space: nowrap;
}

#monthlyPurchaseSummaryContainer th:first-child,
#monthlyPurchaseSummaryContainer td:first-child {
    width: 48px;
    text-align: center;
}

#monthlyPurchaseSummaryContainer th:nth-child(2),
#monthlyPurchaseSummaryContainer td:nth-child(2) {
    min-width: 210px;
    white-space: normal;
    text-align: left;
}

@media (max-width: 768px) {
    .main-content {
        width: 100%;
        max-width: 100%;
    }
}

/* ================= STORE SPLIT REPORT PAGES ================= */
.entry-saved-notice{
  margin:14px 0 18px;padding:15px 16px;background:#ecfdf3;border:1px solid #86d7a4;
  border-left:5px solid #16a34a;border-radius:10px;box-shadow:0 5px 14px rgba(22,163,74,.08)
}
.entry-saved-title{font-size:15px;font-weight:800;color:#166534;margin-bottom:10px}
.entry-saved-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.entry-saved-grid>div{background:#fff;border:1px solid #d9eee0;border-radius:8px;padding:9px 10px}
.entry-saved-grid strong{display:block;font-size:10px;color:#64748b;text-transform:uppercase;margin-bottom:4px}
.entry-saved-grid span{font-size:12px;font-weight:700;color:#1f2937}
.entry-saved-foot{margin-top:9px;font-size:10px;color:#4b6654}
.store-report-page{min-width:0}
.store-report-launch-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:18px}
.store-report-launch{display:flex;flex-direction:column;gap:5px;padding:20px;background:#fff;border:1px solid #d8e2ef;border-radius:12px;text-decoration:none;color:#173354;box-shadow:0 5px 16px rgba(30,64,175,.06);transition:.2s}
.store-report-launch:hover{transform:translateY(-2px);border-color:#8bb1ef;box-shadow:0 9px 20px rgba(30,64,175,.11)}
.store-report-launch strong{font-size:16px}.store-report-launch span{font-size:11px;color:#64748b}
.party-purchase-group{margin:15px 0 20px;border:1px solid #cfdbea;border-radius:11px;background:#fff;overflow:hidden}
.party-purchase-heading{display:flex;justify-content:space-between;align-items:center;padding:13px 15px;background:#eaf2ff;border-bottom:1px solid #cbd9eb;color:#17365d}
.party-purchase-heading strong{font-size:14px}.party-purchase-heading small{display:block;color:#64748b;margin-top:3px}
.party-total{font-size:15px;font-weight:800}
.party-purchase-group .table-wrapper{margin:0;border:0;border-radius:0}
@media(max-width:900px){.entry-saved-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.store-report-launch-grid{grid-template-columns:1fr}}

/* ================= STOCK SUMMARY QTY / RATE / AMOUNT ================= */
.stock-value-table{
  min-width:1450px;
  width:100%;
}
.stock-value-table th{
  text-align:center;
  vertical-align:middle;
}
.stock-value-table td{
  text-align:right;
}
.stock-value-table td:nth-child(2),
.stock-value-table td:nth-child(3),
.stock-value-table td:nth-child(4),
.stock-value-table td:nth-child(5){
  text-align:left;
}


/* ================= TOP HORIZONTAL SCROLL FOR REPORT TABLES ================= */
.table-top-scroll{
    width:100%;
    max-width:100%;
    overflow-x:auto;
    overflow-y:hidden;
    height:18px;
    margin:8px 0 4px;
    border:1px solid #d5dee9;
    border-radius:7px;
    background:#f8fafc;
}
.table-top-scroll-spacer{
    height:1px;
}
.table-top-scroll::-webkit-scrollbar{
    height:12px;
}
.table-top-scroll::-webkit-scrollbar-track{
    background:#eef3f8;
    border-radius:7px;
}
.table-top-scroll::-webkit-scrollbar-thumb{
    background:#9eafc2;
    border-radius:7px;
    border:2px solid #eef3f8;
}
.table-top-scroll::-webkit-scrollbar-thumb:hover{
    background:#71859b;
}

.inline-field-action{display:flex;gap:7px;align-items:center}
.inline-field-action input{flex:1;min-width:0}
.inline-field-action button{min-height:36px;padding:7px 11px;white-space:nowrap}


/* ================= DASHBOARD ANALYTICS ================= */
.analytics-row{align-items:stretch}
.analytics-panel{min-width:0}
.analytics-stack{display:grid;grid-template-columns:1fr;gap:11px}
.chart-card{border:1px solid #dce5f1;border-radius:10px;background:#fbfdff;padding:11px 12px}
.chart-title-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:9px}
.chart-title-row strong{font-size:12px;color:#173354}
.chart-title-row small{font-size:9px;color:#7b8ba1;text-transform:uppercase;letter-spacing:.4px}
.vehicle-pnl-chart,.expense-breakdown-chart{display:flex;flex-direction:column;gap:7px}
.pnl-chart-row{display:grid;grid-template-columns:105px minmax(80px,1fr) 70px;gap:8px;align-items:center}
.pnl-label{min-width:0}
.pnl-label strong{display:block;font-size:10px;color:#253a55;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pnl-label small{display:block;font-size:8px;color:#8a98aa;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pnl-track,.expense-track{height:9px;border-radius:999px;background:#e9eef5;overflow:hidden}
.pnl-fill,.expense-fill{height:100%;border-radius:999px}
.pnl-positive{background:linear-gradient(90deg,#43a66f,#82c99d)}
.pnl-negative{background:linear-gradient(90deg,#e05f62,#f5a3a5)}
.pnl-value{font-size:9px;font-weight:800;text-align:right;white-space:nowrap}
.expense-chart-row{display:grid;grid-template-columns:95px minmax(80px,1fr) 64px;gap:8px;align-items:center}
.expense-label{display:flex;justify-content:space-between;gap:5px;font-size:9px;color:#344963}
.expense-label small{color:#8a98aa}
.expense-fill{background:linear-gradient(90deg,#3d7be0,#79a6f3)}
.expense-value{font-size:9px;font-weight:750;text-align:right;color:#263b56;white-space:nowrap}
.chart-empty{padding:18px;text-align:center;color:#8290a3;font-size:10px}
@media(max-width:1050px){
  .pnl-chart-row{grid-template-columns:90px minmax(70px,1fr) 62px}
  .expense-chart-row{grid-template-columns:85px minmax(70px,1fr) 58px}
}

/* ================= LOADER MANAGEMENT ================= */
.loader-page{min-width:0}
.loader-energy-box{margin:15px 0;padding:14px;background:#f8fbff;border:1px solid #d9e5f3;border-radius:10px}
.loader-energy-box h3{margin:0 0 12px;color:#23466f;font-size:13px}


/* ================= FINAL PROFESSIONAL POLISH ================= */
.table-wrapper{
  position:relative;
  scrollbar-gutter:stable;
}
.table-wrapper table thead th{
  position:sticky;
  top:0;
  z-index:3;
  box-shadow:inset 0 -1px 0 #cfd8e5;
}
input:focus,select:focus,textarea:focus,button:focus-visible,a:focus-visible{
  outline:2px solid rgba(37,99,235,.32);
  outline-offset:1px;
}
button,.save-btn,.edit-btn,.cancel-btn,.secondary-btn{
  transition:transform .12s ease,box-shadow .12s ease,opacity .12s ease;
}
button:active,.save-btn:active,.edit-btn:active,.cancel-btn:active,.secondary-btn:active{
  transform:translateY(1px);
}
.overview-card[href="loader-report.html"]{
  border-left:4px solid #0f766e;
}
.overview-card[href="store-planning.html"]{
  border-left:4px solid #d97706;
}
@media print{
  .sidebar,.sidebar-toggle,.no-export,.overview-filter,.table-top-scroll,button{display:none!important}
  .main-content{margin:0!important;width:100%!important;max-width:100%!important;padding:0!important}
  body{background:#fff!important}
  .overview-section,.trip-report,.vehicle-form{box-shadow:none!important;border-color:#cbd5e1!important}
  .table-wrapper{overflow:visible!important}
  table{font-size:9pt!important}
  thead{display:table-header-group}
  tr{page-break-inside:avoid}
}

/* ================= SHIFTING + RAKE LOADING ================= */
.rake-calculation-grid{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:14px 0;
}
.rake-calc-card{
  background:#f8fbff;border:1px solid #d9e5f3;border-radius:10px;padding:12px;
}
.rake-calc-card span{display:block;font-size:10px;color:#64748b;text-transform:uppercase;margin-bottom:5px}
.rake-calc-card strong{display:block;font-size:17px;color:#173354}
.rake-calc-card small{display:block;font-size:9px;color:#8390a2;margin-top:5px}
.shortage-card strong{color:#b42318}
.rake-link-card{margin:14px 0;padding:13px;border:1px solid #cfddec;border-radius:11px;background:#fbfdff}
@media(max-width:1000px){.rake-calculation-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* ================= ALL OVER COST MANAGEMENT REPORT ================= */
.all-cost-page{min-width:0}
.all-cost-head{display:flex;justify-content:space-between;align-items:flex-start;gap:14px}
.all-cost-badge{background:#17365d;color:#fff;border-radius:999px;padding:7px 12px;font-size:9px;font-weight:800;letter-spacing:.7px}
.all-cost-filter{margin-bottom:14px}
.all-cost-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:11px}
.all-cost-kpi{border:1px solid #d9e4ef;border-radius:11px;padding:14px;background:#fbfdff}
.all-cost-kpi span{display:block;font-size:9px;text-transform:uppercase;color:#73839a;font-weight:700}
.all-cost-kpi strong{display:block;font-size:20px;margin:7px 0;color:#173354}
.all-cost-kpi small{font-size:9px;color:#8795a8}
.all-cost-kpi.output{border-top:3px solid #2563eb}.all-cost-kpi.cost{border-top:3px solid #dc2626}.all-cost-kpi.net{border-top:3px solid #059669}.all-cost-kpi.margin{border-top:3px solid #7c3aed}
.all-cost-bridge{display:grid;gap:7px}
.bridge-line{display:flex;justify-content:space-between;gap:15px;padding:9px 11px;border-radius:8px;background:#f8fafc;border:1px solid #e3e9f0}
.bridge-line.plus strong{color:#166534}.bridge-line.minus strong{color:#b42318}.bridge-line.result{background:#eaf2ff;border-color:#9ebce8;font-size:13px}.bridge-line.result strong{color:#17365d}
.all-cost-two-col{align-items:stretch}
.all-cost-mini-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.all-cost-mini-grid>div{padding:10px;border:1px solid #e0e7ef;border-radius:8px;background:#fafcff}
.all-cost-mini-grid span{display:block;font-size:9px;color:#718197;text-transform:uppercase}.all-cost-mini-grid strong{display:block;font-size:13px;margin-top:5px;color:#243b58}
.all-cost-reference-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.all-cost-reference-grid>div{padding:12px;border:1px dashed #aebfd2;border-radius:9px;background:#fbfcfe}
.all-cost-reference-grid span{display:block;font-size:9px;color:#65758b;text-transform:uppercase}.all-cost-reference-grid strong{display:block;font-size:14px;margin:5px 0;color:#243b58}.all-cost-reference-grid small{font-size:9px;color:#8794a5}
.all-cost-warning{margin:0 0 13px;padding:10px 12px;border:1px solid #f0c36a;border-left:4px solid #d97706;border-radius:8px;background:#fff8e8;color:#7c4a03;font-size:10px}
.all-cost-notes{display:grid;gap:7px}.all-cost-notes p{margin:0;padding:9px 11px;border-left:3px solid #90acd0;background:#f8fbff;border-radius:5px;font-size:10px;line-height:1.5}
@media(max-width:1050px){.all-cost-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.all-cost-reference-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.all-cost-mini-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* ================= WASHERY PRODUCTION ================= */
.washery-custom-box{margin:15px 0;padding:13px;border:1px solid #d8e4f0;border-radius:10px;background:#fbfdff}
.washery-custom-row{display:grid;grid-template-columns:2fr 1fr .8fr auto;gap:8px;margin:8px 0;align-items:center}
.washery-custom-row input{min-width:0}
.diesel-stock-inward-card{border-top:3px solid #0f766e}
@media(max-width:800px){.washery-custom-row{grid-template-columns:1fr 1fr}.washery-custom-row button{grid-column:span 2}}

/* ================= MONTHLY COSTING STATEMENT ================= */
.monthly-cost-page{background:#eef2f6;min-height:100vh}
.cost-sheet-toolbar{display:flex;gap:10px;align-items:end;flex-wrap:wrap;margin-bottom:14px;padding:12px;background:#fff;border:1px solid #d4dbe3;border-radius:8px}
.cost-sheet-toolbar>div{display:flex;flex-direction:column;gap:4px}.cost-sheet-toolbar label{font-weight:700;font-size:12px}
.monthly-cost-sheet{background:#fff;border:1px solid #222;padding:14px;box-shadow:0 3px 14px rgba(0,0,0,.08);font-family:Calibri,Arial,sans-serif}
.cost-company-head{text-align:center;border-bottom:2px solid #222;padding-bottom:8px;margin-bottom:8px}
.cost-company-head h1{font-size:20px;margin:0 0 3px;text-transform:uppercase}.cost-company-head h2{font-size:17px;margin:8px 0 2px;text-decoration:underline}
.cost-period{font-weight:700}.cost-section-title{font-weight:800;font-size:15px;background:#d9e7f5;border:1px solid #222;padding:6px 8px;margin-top:12px}
.cost-matrix{border-collapse:collapse;width:100%;min-width:1050px;font-size:12px}.cost-matrix th,.cost-matrix td{border:1px solid #333;padding:5px 6px;vertical-align:middle}
.cost-matrix thead th{background:#e8edf3;text-align:center}.cost-matrix tfoot th,.cost-matrix .total-row th,.cost-matrix .total-row td{background:#e2e2e2;font-weight:800}
.cost-matrix .cost-per-row th{background:#fff1c7}.cost-matrix .num{text-align:right;white-space:nowrap}.cost-matrix .strong{font-weight:800}
.washery-performance-grid{display:grid;grid-template-columns:1fr 1.3fr;gap:10px}.washery-performance-grid .cost-matrix{min-width:0}
.cost-management-cards{display:grid;grid-template-columns:repeat(4,1fr);border:1px solid #333}.cost-management-cards>div{padding:10px;border-right:1px solid #333}.cost-management-cards>div:last-child{border-right:0}.cost-management-cards span{display:block;font-size:11px}.cost-management-cards strong{font-size:16px}
@media(max-width:900px){.washery-performance-grid{grid-template-columns:1fr}.cost-management-cards{grid-template-columns:1fr 1fr}}
@media print{
 .sidebar,.no-print{display:none!important}.main-content{margin:0!important;padding:0!important}.monthly-cost-page{background:#fff}.monthly-cost-sheet{box-shadow:none;border:0;padding:0}
 .cost-matrix{font-size:9px;min-width:0}.cost-matrix th,.cost-matrix td{padding:3px}.table-wrapper{overflow:visible!important}
 @page{size:landscape;margin:8mm}
}

.exact-cost-table{border-collapse:collapse;width:100%;font-size:11px;background:#fff}
.exact-cost-table th,.exact-cost-table td{border:1px solid #222;padding:3px 4px;white-space:nowrap}
.exact-cost-table thead th{background:#fff;color:#111;font-weight:700;text-align:center}
.exact-cost-table td:nth-child(2),.exact-cost-table th:nth-child(2){text-align:left;min-width:205px}
.exact-cost-table .total-row th,.exact-cost-table .cost-per-row th{background:#fff;color:#111;font-weight:700}
.monthly-cost-sheet .cost-section-title{background:#fff;color:#111;border:0;margin:14px 0 2px;padding:2px 0;font-weight:700}

/* EXACT USER COST SHEET FORMAT */
.monthly-cost-sheet{background:#fff!important;color:#111!important;padding:0 0 8px!important;border:1px solid #333!important}
.monthly-cost-sheet .costing-head{display:none!important}
.monthly-cost-sheet .costing-title{
 text-align:left!important;text-decoration:none!important;font-size:14px!important;font-weight:700!important;
 margin:0!important;padding:3px 2px!important;border:0!important
}
.monthly-cost-sheet .cost-section-title{
 margin:0!important;padding:2px 2px!important;background:#fff!important;color:#111!important;
 border:0!important;font-size:12px!important;font-weight:700!important;line-height:1.15!important
}
.monthly-cost-sheet .table-wrapper{margin:0 0 14px!important;overflow-x:auto!important}
.monthly-cost-sheet .exact-cost-table{border-collapse:collapse!important;width:100%!important;min-width:1100px!important;font-family:Arial,sans-serif!important;font-size:11px!important;background:#fff!important}
.monthly-cost-sheet .exact-cost-table th,.monthly-cost-sheet .exact-cost-table td{
 border:1px solid #222!important;padding:2px 3px!important;height:19px!important;line-height:1.05!important;
 background:#fff!important;color:#111!important;white-space:nowrap!important
}
.monthly-cost-sheet .exact-cost-table thead th{font-weight:700!important;text-align:left!important}
.monthly-cost-sheet .exact-cost-table th:first-child,.monthly-cost-sheet .exact-cost-table td:first-child{width:34px!important;text-align:center!important}
.monthly-cost-sheet .exact-cost-table th:nth-child(2),.monthly-cost-sheet .exact-cost-table td:nth-child(2){width:205px!important;min-width:205px!important;text-align:left!important}
.monthly-cost-sheet .exact-cost-table .num{text-align:right!important}
.monthly-cost-sheet .exact-cost-table .total-row th,.monthly-cost-sheet .exact-cost-table .cost-per-row th{
 font-weight:700!important;background:#fff!important;color:#111!important
}
@media print{
 body{background:#fff!important}
 .sidebar,.topbar,.all-cost-filter{display:none!important}
 .main-content{margin:0!important;padding:0!important}
 .monthly-cost-sheet{border:0!important}
 .monthly-cost-sheet .table-wrapper{overflow:visible!important;margin-bottom:10px!important}
 .monthly-cost-sheet .exact-cost-table{min-width:0!important;font-size:8px!important}
}

/* TALLY-STYLE VMS COST REPORT */
.tally-report{--tn:#163b68;--tb:#d9e8f7;--tp:#fffbdc;--tl:#7890a8;background:var(--tp)!important;border:1px solid #667b90!important;color:#111!important;font-family:Arial,Helvetica,sans-serif!important;padding:0!important}
.tally-titlebar{min-height:32px;display:flex;align-items:center;justify-content:space-between;background:var(--tn);color:#fff;padding:5px 10px;font-size:12px;border-bottom:1px solid #0d2745}.tally-title-left{display:flex;align-items:center;gap:18px}.tally-title-left strong{font-size:14px}.tally-title-left span,.tally-title-right{font-weight:700}
.tally-company-head{text-align:center!important;background:var(--tp)!important;padding:8px 6px 7px!important;border-bottom:1px solid var(--tl)!important}.tally-company-head h1{font-size:15px!important;margin:0 0 3px!important;color:#111!important}.tally-company-head div{font-size:10px!important;line-height:1.35!important}
.tally-report .cost-section-title{margin:0!important;padding:4px 6px!important;background:var(--tb)!important;color:#111!important;border-top:1px solid var(--tl)!important;border-bottom:1px solid var(--tl)!important;font-size:11px!important;font-weight:700!important;text-transform:uppercase}
.tally-report .table-wrapper{margin:0!important;overflow-x:auto!important;background:var(--tp)!important}.tally-report .exact-cost-table,.tally-report .cost-matrix{border-collapse:collapse!important;width:100%!important;min-width:1120px!important;background:var(--tp)!important;font-size:10px!important}
.tally-report .exact-cost-table th,.tally-report .exact-cost-table td,.tally-report .cost-matrix th,.tally-report .cost-matrix td{border-left:1px solid #aeb9c4!important;border-right:1px solid #aeb9c4!important;border-top:0!important;border-bottom:1px dotted #c3bfa6!important;padding:3px 4px!important;height:19px!important;line-height:1.05!important;background:var(--tp)!important;color:#111!important;white-space:nowrap!important}
.tally-report .exact-cost-table thead th,.tally-report .cost-matrix thead th{background:var(--tb)!important;border-bottom:1px solid var(--tl)!important;font-weight:700!important;text-align:center!important}.tally-report .exact-cost-table th:nth-child(2),.tally-report .exact-cost-table td:nth-child(2),.tally-report .cost-matrix th:nth-child(2),.tally-report .cost-matrix td:nth-child(2){min-width:205px!important;text-align:left!important}
.tally-report .num{text-align:right!important;font-variant-numeric:tabular-nums}.tally-report .total-row th,.tally-report .cost-per-row th{background:#f6edb7!important;border-top:1px solid #596d80!important;border-bottom:1px solid #596d80!important;font-weight:700!important;color:#111!important}
.tally-hidden-analytics{display:none!important}.tally-keybar{display:flex;justify-content:flex-end;gap:16px;padding:5px 8px;background:var(--tb);border-top:1px solid var(--tl);font-size:10px}.tally-keybar b{display:inline-block;padding:1px 4px;margin-right:3px;background:#fff;border:1px solid #7890a8}
.cost-sheet-toolbar{background:#e7eef6!important;border:1px solid #a4b3c1!important;box-shadow:none!important}.cost-sheet-toolbar button{border:1px solid #7a8da0!important;background:#f8f8f8!important;color:#111!important;border-radius:0!important}
@media print{.tally-titlebar{background:#fff!important;color:#111!important;border:0!important}.tally-keybar,.tally-hidden-analytics{display:none!important}.tally-report{border:0!important;background:#fff!important}}

/* =========================================================
   MECHANIC PERFORMANCE REPORT
   Source: Store Outward only
   ========================================================= */
.mechanic-source-note{margin:12px 0;padding:10px 12px;border:1px solid #9aafc2;background:#f3f8fc;font-size:12px;line-height:1.45}
.mechanic-kpi-grid{display:grid;grid-template-columns:repeat(6,minmax(130px,1fr));border:1px solid #53677a;margin-top:12px;background:#fff}
.mechanic-kpi-grid>div{padding:10px;border-right:1px solid #9aa9b7}.mechanic-kpi-grid>div:last-child{border-right:0}
.mechanic-kpi-grid span{display:block;font-size:10px;text-transform:uppercase;color:#53606c;font-weight:700}.mechanic-kpi-grid strong{display:block;margin-top:4px;font-size:18px;color:#102d49}
.mechanic-report-wrap{width:100%;overflow:auto;border:1px solid #3d4e5d;background:#fff}
.mechanic-performance-table,.mechanic-detail-table{width:100%;border-collapse:collapse;min-width:1150px;font-size:11px}
.mechanic-performance-table th,.mechanic-performance-table td,.mechanic-detail-table th,.mechanic-detail-table td{border:1px solid #596b7a;padding:5px 6px;text-align:center;vertical-align:middle;background:#fff}
.mechanic-performance-table thead th,.mechanic-detail-table thead th{position:sticky;top:0;z-index:3;background:#dbe8f4;color:#102d49;font-weight:700}
.mechanic-performance-table .left,.mechanic-detail-table .left{text-align:left}.mechanic-detail-table .wrap{white-space:normal;min-width:190px}
.performance-meter{position:relative;height:22px;min-width:115px;border:1px solid #778899;background:#eef2f5;overflow:hidden}
.performance-meter span{position:absolute;left:0;top:0;bottom:0;background:#b9d8bb}
.performance-meter b{position:relative;z-index:1;line-height:20px;font-size:10px}
.performance-badge,.repeat-badge{display:inline-block;padding:3px 6px;border:1px solid #667;font-size:10px;font-weight:700;white-space:nowrap}
.perf-excellent{background:#e4f5e7}.perf-good{background:#eef5dc}.perf-average{background:#fff0c8}.perf-poor,.repeat-badge{background:#f7dada}
.repeat-work-row td{background:#fff7f7}
.mechanic-empty{padding:20px;text-align:center;border:1px solid #aeb8c1;background:#fff}
@media(max-width:1000px){.mechanic-kpi-grid{grid-template-columns:repeat(3,1fr)}.mechanic-kpi-grid>div:nth-child(3){border-right:0}}
@media(max-width:650px){.mechanic-kpi-grid{grid-template-columns:1fr 1fr}}

/* =========================================================
   TRIP REPORT - TOP & BOTTOM HORIZONTAL SCROLL + STICKY HEADER
   ========================================================= */
.trip-dual-scroll-report{width:100%;border:1px solid #5e7080;background:#fff}
.trip-top-scroll{width:100%;overflow-x:auto;overflow-y:hidden;height:18px;border-bottom:1px solid #9ba8b3;background:#eef3f7}
.trip-top-scroll-inner{height:1px}
.trip-table-viewport{width:100%;max-height:68vh;overflow:auto;position:relative}
#tripTable{border-collapse:collapse;min-width:1500px;width:max-content;background:#fff}
#tripTable th,#tripTable td{border:1px solid #536575;padding:5px 7px;white-space:nowrap}
#tripTable thead th{position:sticky;top:0;z-index:6;background:#dce8f2;color:#102d49;box-shadow:0 1px 0 #536575}
#tripTable tfoot th{position:sticky;bottom:0;z-index:5;background:#e9edf1}
#tripTableViewport::-webkit-scrollbar,#tripTopScroll::-webkit-scrollbar{height:14px;width:14px}
@media print{.trip-top-scroll{display:none!important}.trip-table-viewport{max-height:none!important;overflow:visible!important}#tripTable{min-width:0!important;width:100%!important}#tripTable thead th,#tripTable tfoot th{position:static!important}}

/* =========================================================
   FINAL PROFESSIONAL UI PASS - SIDEBAR + REPORT USABILITY
   ========================================================= */
:root{
  --vms-sidebar:#0d2946;
  --vms-sidebar-2:#12395f;
  --vms-active:#2f6fe4;
  --vms-line:#d2dce6;
  --vms-soft:#f5f8fb;
  --vms-text:#15314d;
}
.sidebar{
  position:fixed!important;
  left:0!important;top:0!important;bottom:0!important;
  width:232px!important;
  height:100vh!important;
  background:linear-gradient(180deg,var(--vms-sidebar) 0%,#0a2340 100%)!important;
  border-right:1px solid #274967!important;
  box-shadow:3px 0 16px rgba(0,0,0,.10)!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  z-index:1000!important;
}
.main-content{
  margin-left:232px!important;
  min-height:100vh!important;
  transition:margin-left .18s ease!important;
}
.sidebar-brand{
  position:sticky!important;top:0!important;z-index:5!important;
  min-height:62px!important;padding:12px 14px!important;
  background:rgba(8,31,56,.98)!important;
  border-bottom:1px solid rgba(255,255,255,.10)!important;
}
.sidebar-brand h2{font-size:22px!important;letter-spacing:1px!important;color:#fff!important}
.sidebar-toggle{
  width:36px!important;height:36px!important;border-radius:8px!important;
  border:1px solid rgba(255,255,255,.18)!important;background:#173c60!important;color:#fff!important;
}
.created-by{
  margin:12px 12px 16px!important;padding:11px 10px!important;
  background:rgba(255,255,255,.055)!important;border:1px solid rgba(255,255,255,.13)!important;
  border-radius:10px!important;text-align:center!important;color:#fff!important;
}
.created-by span,.created-by small{color:#a9bfd3!important}
.side-nav{padding:0 10px 18px!important}
.side-nav>a,.nav-group-btn{
  min-height:42px!important;border-radius:8px!important;margin:3px 0!important;
  color:#d7e4f0!important;font-size:12px!important;font-weight:600!important;
}
.nav-group-btn{width:100%!important;padding:0 10px!important}
.nav-group-btn:hover,.side-nav>a:hover{background:rgba(255,255,255,.07)!important;color:#fff!important}
.side-nav a.active,.nav-submenu a.active{
  background:linear-gradient(90deg,#2f6fe4,#346fd0)!important;
  color:#fff!important;box-shadow:0 4px 10px rgba(25,85,175,.25)!important
}
.nav-icon{width:26px!important;display:inline-flex!important;justify-content:center!important;opacity:.95}
.nav-label{display:inline!important}
.nav-submenu{
  margin:2px 0 7px 32px!important;
  padding-left:10px!important;border-left:1px solid rgba(163,195,225,.28)!important;
}
.nav-submenu a{
  display:block!important;padding:8px 9px!important;margin:2px 0!important;border-radius:6px!important;
  color:#bcd0e2!important;font-size:11px!important;text-decoration:none!important;
}
.nav-submenu a:hover{background:rgba(255,255,255,.07)!important;color:#fff!important}
body.sidebar-collapsed .sidebar{width:72px!important}
body.sidebar-collapsed .main-content{margin-left:72px!important}
body.sidebar-collapsed .sidebar-brand h2,
body.sidebar-collapsed .created-by,
body.sidebar-collapsed .nav-label,
body.sidebar-collapsed .nav-group-btn .chevron,
body.sidebar-collapsed .nav-submenu{display:none!important}
body.sidebar-collapsed .sidebar-brand{justify-content:center!important;padding:12px 8px!important}
body.sidebar-collapsed .side-nav{padding:8px!important}
body.sidebar-collapsed .side-nav>a,
body.sidebar-collapsed .nav-group-btn{justify-content:center!important;padding:0!important}
body.sidebar-collapsed .nav-icon{width:auto!important;font-size:16px!important}

/* Global report/table polish */
.trip-report,.vehicle-form,.trip-import-card{
  border:1px solid var(--vms-line)!important;
  box-shadow:0 2px 8px rgba(27,54,82,.045)!important;
}
.trip-report h2,.vehicle-form h2{color:var(--vms-text)!important}
.table-wrapper{
  border:1px solid #7d8f9f!important;
  background:#fff!important;
}
.table-wrapper table{border-collapse:collapse!important}
.table-wrapper th,.table-wrapper td{border:1px solid #7d8f9f!important}
.table-wrapper thead th{
  position:sticky!important;top:0!important;z-index:4!important;
  background:#dce8f2!important;color:#102d49!important;
}

/* Global top horizontal scrollbar for report tables */
.table-top-scroll{
  height:18px!important;
  overflow-x:scroll!important;
  overflow-y:hidden!important;
  border:1px solid #899aa9!important;
  border-bottom:0!important;
  background:#e9f0f5!important;
}
.table-top-scroll-spacer{height:1px!important}

/* Trip report - visible dual scroll system */
.trip-dual-scroll-report{
  width:100%!important;
  border:1px solid #607587!important;
  background:#fff!important;
  overflow:hidden!important;
}
.trip-top-scroll{
  display:block!important;
  width:100%!important;
  height:20px!important;
  overflow-x:scroll!important;
  overflow-y:hidden!important;
  border-bottom:1px solid #607587!important;
  background:#dfe9f1!important;
  scrollbar-gutter:stable!important;
}
.trip-top-scroll-inner{height:1px!important;min-width:1501px}
.trip-table-viewport{
  width:100%!important;
  height:clamp(310px,48vh,430px)!important;
  max-height:none!important;
  overflow-x:scroll!important;
  overflow-y:scroll!important;
  position:relative!important;
  scrollbar-gutter:stable both-edges!important;
  background:#fff!important;
}
#tripTable{
  min-width:1550px!important;
  width:max-content!important;
  border-collapse:separate!important;
  border-spacing:0!important;
}
#tripTable th,#tripTable td{
  border-right:1px solid #617789!important;
  border-bottom:1px solid #617789!important;
  padding:7px 8px!important;
  white-space:nowrap!important;
  background:#fff!important;
}
#tripTable thead th{
  position:sticky!important;
  top:0!important;
  z-index:20!important;
  background:#d9e6f0!important;
  color:#102d49!important;
  box-shadow:0 2px 0 #607587!important;
}
#tripTable tfoot th{
  position:sticky!important;
  bottom:0!important;
  z-index:18!important;
  background:#e8eef3!important;
  border-top:2px solid #607587!important;
}
.trip-top-scroll::-webkit-scrollbar,
.trip-table-viewport::-webkit-scrollbar{height:16px!important;width:16px!important}
.trip-top-scroll::-webkit-scrollbar-thumb,
.trip-table-viewport::-webkit-scrollbar-thumb{background:#889aa9!important;border:3px solid #e5edf3!important;border-radius:8px!important}
.trip-top-scroll::-webkit-scrollbar-track,
.trip-table-viewport::-webkit-scrollbar-track{background:#e5edf3!important}

@media(max-width:900px){
  .sidebar{width:210px!important}.main-content{margin-left:210px!important}
  .trip-table-viewport{height:45vh!important}
}
@media print{
  .sidebar{display:none!important}.main-content{margin-left:0!important}
  .trip-top-scroll,.table-top-scroll{display:none!important}
  .trip-table-viewport{height:auto!important;overflow:visible!important}
}

/* =========================================================
   FINAL FULL-SCREEN LAYOUT OVERRIDES
   Fixes legacy conflicting width rules throughout the VMS.
   ========================================================= */
html,body{width:100%!important;max-width:none!important;min-width:0!important;overflow-x:hidden!important}
body{box-sizing:border-box!important}

/* Professional compact sidebar: enough labels, more working area */
.sidebar{
  width:198px!important;
  padding:0!important;
}
.main-content{
  margin-left:198px!important;
  width:auto!important;
  max-width:none!important;
  min-width:0!important;
  box-sizing:border-box!important;
  padding:18px 20px 36px!important;
}
.sidebar-brand{padding:11px 12px!important;min-height:58px!important}
.sidebar-brand h2{font-size:20px!important;margin:0!important}
.created-by{margin:10px 10px 12px!important;padding:9px 7px!important}
.created-by strong{font-size:11px!important}
.created-by span,.created-by small{font-size:8px!important}
.side-nav{padding:0 8px 16px!important}
.side-nav>a,.nav-group-btn{min-height:38px!important;font-size:11px!important;border-radius:7px!important}
.nav-submenu{margin-left:27px!important;padding-left:8px!important}
.nav-submenu a{padding:7px 7px!important;font-size:10px!important}

/* Collapsed state stays usable and compact */
body.sidebar-collapsed .sidebar{width:62px!important}
body.sidebar-collapsed .main-content{margin-left:62px!important;width:auto!important;max-width:none!important}

/* Every main card/report uses available width */
.main-content>.vehicle-form,
.main-content>.trip-report,
.main-content>.trip-import-card,
.main-content>.overview-section,
.main-content>.pnl-filter-card,
.main-content>.gate-pass-section,
.main-content>.monthly-cost-sheet,
.main-content>.cost-sheet-toolbar{
  width:100%!important;
  max-width:none!important;
  box-sizing:border-box!important;
}

/* Diesel: use screen width properly */
.diesel-page{width:auto!important;max-width:none!important}
.diesel-page>.vehicle-form{width:100%!important;max-width:none!important}
.diesel-page .diesel-stock-inward-card>.form-grid,
.diesel-page>.vehicle-form>.form-grid{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
}
.diesel-page #loaderDieselPanel{
  grid-column:1/-1!important;
  width:100%!important;
  box-sizing:border-box!important;
}
.diesel-page #loaderDieselPanel .form-grid{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
}
.diesel-page .trip-report{width:100%!important;max-width:none!important}

/* Cards should fill rows cleanly */
#dieselStockCards{
  display:grid!important;
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:10px!important;
  width:100%!important;
}
#dieselStockCards>div{min-width:0!important}

/* All dynamic reports: no clipping */
[id$="Container"],[id$="Table"],[id$="Report"],[id$="Recent"]{
  max-width:100%;
}
.trip-report,.vehicle-form{overflow:visible!important}
.table-wrapper{width:100%!important;max-width:100%!important;overflow-x:auto!important}

/* Sticky headings for all report tables inside scrolling wrappers */
.table-wrapper thead th{
  position:sticky!important;
  top:0!important;
  z-index:10!important;
}

/* Visible top scroll bar globally */
.table-top-scroll{
  display:block;
  width:100%!important;
  height:19px!important;
  overflow-x:scroll!important;
  overflow-y:hidden!important;
  box-sizing:border-box!important;
  scrollbar-gutter:stable!important;
}

/* Trip report: browser-independent scroll container */
.trip-dual-scroll-report{width:100%!important;max-width:100%!important}
.trip-top-scroll{display:block!important;height:20px!important;overflow-x:scroll!important}
.trip-table-viewport{
  width:100%!important;
  max-width:100%!important;
  height:420px!important;
  overflow:scroll!important;
}
#tripTable{min-width:1550px!important;width:1550px!important}
#tripTable thead th{position:sticky!important;top:0!important;z-index:30!important}
#tripTable tfoot th{position:sticky!important;bottom:0!important;z-index:25!important}

/* Wide screens use available width instead of blank margins */
@media(min-width:1450px){
  .main-content{padding-left:24px!important;padding-right:24px!important}
  .diesel-page .diesel-stock-inward-card>.form-grid,
  .diesel-page>.vehicle-form>.form-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}
}
@media(max-width:1050px){
  .diesel-page .diesel-stock-inward-card>.form-grid,
  .diesel-page>.vehicle-form>.form-grid,
  .diesel-page #loaderDieselPanel .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  #dieselStockCards{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}
@media(max-width:760px){
  .sidebar{width:62px!important}
  .main-content{margin-left:62px!important;width:auto!important;max-width:none!important;padding:12px!important}
  .diesel-page .diesel-stock-inward-card>.form-grid,
  .diesel-page>.vehicle-form>.form-grid,
  .diesel-page #loaderDieselPanel .form-grid{grid-template-columns:1fr!important}
  #dieselStockCards{grid-template-columns:1fr 1fr!important}
}

/* =========================================================
   DIESEL STOCK FINAL - STORE INWARD IS SINGLE SOURCE
   ========================================================= */
.diesel-stock-summary-bar{
  width:100%;box-sizing:border-box;margin:12px 0 14px;padding:10px 12px;
  background:#fff;border:1px solid #d4dfeb;border-radius:10px;box-shadow:0 2px 8px rgba(20,45,70,.04)
}
.diesel-stock-summary-bar h2{margin:0 0 8px;font-size:14px;color:#17365d}
#dieselStockCards{display:block!important;width:100%!important}
.diesel-stock-mini-grid{
  display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:8px!important;width:100%!important
}
.diesel-stock-mini-grid>div{
  min-width:0!important;height:54px!important;padding:7px 9px!important;box-sizing:border-box!important;
  border:1px solid #cbd8e5!important;border-radius:7px!important;background:#f8fbfe!important;
  display:flex!important;align-items:center!important;justify-content:space-between!important;gap:7px!important
}
.diesel-stock-mini-grid span{
  font-size:9px!important;font-weight:700!important;color:#65758a!important;line-height:1.15!important
}
.diesel-stock-mini-grid strong{
  font-size:13px!important;color:#102f50!important;white-space:nowrap!important;text-align:right!important
}
.diesel-stock-source-note{margin-top:7px;font-size:9px;color:#68788a}
.store-diesel-hint{
  grid-column:1/-1;padding:9px 11px;border:1px solid #9fc4e8;border-left:4px solid #2563eb;
  background:#f2f8ff;border-radius:7px;font-size:10px;color:#34506d
}
@media(max-width:900px){
 .diesel-stock-mini-grid{grid-template-columns:repeat(5,minmax(105px,1fr))!important;overflow-x:auto!important}
}

/* =========================================================
   MASTER / ENTRY / REPORT SEPARATED SYSTEM
   ========================================================= */
.separated-hidden-tabs{display:none!important}
.store-mode-inward #storeOutwardSection,.store-mode-inward #storeDirectExpenseSection{display:none!important}
.store-mode-outward #storeInwardSection,.store-mode-outward #storeDirectExpenseSection,.store-mode-outward .store-import-panel{display:none!important}
.store-mode-direct #storeInwardSection,.store-mode-direct #storeOutwardSection,.store-mode-direct .store-import-panel{display:none!important}
.store-mode-direct #storeDirectExpenseSection{display:block!important}

/* Trip Entry page does not show report */
.trip-entry-only .trip-report{display:none!important}
/* Trip Report page shows only report area, hides entry/import */
.trip-report-only .trip-import-card,
.trip-report-only #tripPlanningGateMessage,
.trip-report-only .vehicle-form>h2,
.trip-report-only .vehicle-form>.form-grid,
.trip-report-only .vehicle-form>#saveTripBtn,
.trip-report-only .page-title + .trip-import-card{display:none!important}
.trip-report-only .vehicle-form{
 display:block!important;
 border:0!important;
 background:transparent!important;
 padding:0!important;
 margin:0!important;
 box-shadow:none!important;
}
.trip-report-only .trip-report{display:block!important;margin-top:10px!important}

/* Master layout */
.master-split-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;align-items:start}
.master-add-row{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:end;margin-bottom:10px}
.master-add-row input{min-height:38px;border:1px solid #cbd6e4;border-radius:7px;padding:7px 10px}
.master-add-row .save-btn{margin:0!important;white-space:nowrap}
@media(max-width:900px){.master-split-grid{grid-template-columns:1fr}}

/* Menu category distinction */
.nav-group[data-group="masters"]>.nav-group-btn{border-left:3px solid #60a5fa!important}
.nav-group[data-group="entries"]>.nav-group-btn{border-left:3px solid #34d399!important}
.nav-group[data-group="reports"]>.nav-group-btn{border-left:3px solid #f59e0b!important}

.nav-group[data-group="store"]>.nav-group-btn{border-left:3px solid #a78bfa!important}

.direct-expense-subhead-group{border-left:3px solid #2563eb;padding-left:10px;background:#f7fbff;border-radius:5px}
.direct-expense-subhead-group .field-help{font-size:9px;color:#52677d;margin-top:4px;line-height:1.35}

/* =========================================================
   DEDICATED STORE ENTRY PAGE VISIBILITY - FINAL FIX
   ========================================================= */
body.store-mode-inward #storeInwardSection{
  display:block!important;
}
body.store-mode-inward #storeOutwardSection,
body.store-mode-inward #storeDirectExpenseSection{
  display:none!important;
}

body.store-mode-outward #storeOutwardSection{
  display:block!important;
}
body.store-mode-outward #storeInwardSection,
body.store-mode-outward #storeDirectExpenseSection,
body.store-mode-outward .store-import-panel{
  display:none!important;
}

body.store-mode-direct #storeDirectExpenseSection{
  display:block!important;
}
body.store-mode-direct #storeInwardSection,
body.store-mode-direct #storeOutwardSection,
body.store-mode-direct .store-import-panel{
  display:none!important;
}

/* Dedicated pages should use full content width */
body.store-separated-entry .main-content{
  width:auto!important;
  max-width:none!important;
}
body.store-separated-entry #storeInwardSection,
body.store-separated-entry #storeOutwardSection,
body.store-separated-entry #storeDirectExpenseSection{
  width:100%!important;
  max-width:none!important;
}
body.store-separated-entry #storeOutwardSection>.vehicle-form,
body.store-separated-entry #storeInwardSection>.vehicle-form,
body.store-separated-entry #storeDirectExpenseSection>.vehicle-form{
  width:100%!important;
  max-width:none!important;
  box-sizing:border-box!important;
}

/* FINAL EXPENSE HEAD DROPDOWN */
#storeCostHead,#outwardCostHead,#directExpenseHead,#directExpenseSubHead{
 min-height:38px;border:1px solid #cbd6e4;border-radius:7px;background:#fff;padding:7px 9px;color:#17324f
}
.direct-expense-subhead-group{display:flex;flex-direction:column}

/* =========================================================
   FINAL ERP / TALLY FORM STANDARD
   ========================================================= */
.main-content h1{font-size:20px!important;letter-spacing:.1px;color:#102f50!important}
.vehicle-form,.trip-report,.store-import-panel,.diesel-stock-summary-bar{
 border-radius:6px!important;border:1px solid #aebdcb!important;box-shadow:none!important;background:#fff!important
}
.vehicle-form h2,.trip-report h2{
 border-radius:0!important;background:#dce8f2!important;color:#15314b!important;
 border-bottom:1px solid #91a6b9!important;font-size:13px!important;padding-top:8px!important;padding-bottom:8px!important
}
.form-group label{font-size:10px!important;font-weight:700!important;color:#233f5a!important}
.form-group input,.form-group select,.form-group textarea{
 border-radius:3px!important;border:1px solid #aab9c8!important;box-shadow:none!important;
 background:#fff!important;min-height:36px!important
}
.form-group input:focus,.form-group select:focus,.form-group textarea:focus{
 outline:1px solid #3b6fa5!important;border-color:#3b6fa5!important;box-shadow:none!important
}
.save-btn{
 border-radius:3px!important;background:#1f4f82!important;box-shadow:none!important;min-height:38px!important
}
.soft-report-table,.mechanic-performance-table,.mechanic-detail-table{
 border-collapse:collapse!important
}
.soft-report-table th,.soft-report-table td{border:1px solid #778b9e!important}
#storeCostLocation,#outwardCostLocation,#directExpenseLocation,#storeCostSubHead,#outwardCostSubHead{
 min-height:38px;border:1px solid #aab9c8;border-radius:3px;background:#fff;padding:7px 9px
}
.erp-trace-note{font-size:9px;color:#5b6e80}

/* Cost Head & Location Master - Edit / Cancel */
.master-action-table th,.master-action-table td{vertical-align:middle!important}
.master-actions{display:flex;gap:6px;justify-content:center;white-space:nowrap}
.master-actions button{min-width:68px;padding:5px 8px;border-radius:3px;border:1px solid #8da0b1;cursor:pointer;font-size:10px;font-weight:700}
.master-actions .edit-btn{background:#e9f2ff;color:#174a82;border-color:#8ab0da}
.master-actions .cancel-btn{background:#fff0f0;color:#8a2525;border-color:#d7a0a0}
.master-actions .reactivate-btn{background:#e9f8ec;color:#236b34;border-color:#8fbe99}
.master-status{display:inline-block;padding:3px 7px;border-radius:10px;font-size:9px;font-weight:700}
.master-status.active{background:#e8f6ea;color:#246b32}
.master-status.cancelled{background:#f8e4e4;color:#8b2c2c}
.master-cancelled-row td{background:#faf5f5!important;color:#7a6b6b!important}
.master-default-tag{display:inline-block;margin-left:8px;padding:2px 5px;border:1px solid #bdc9d4;border-radius:8px;font-size:8px;color:#6b7d8d;font-weight:400}

/* Cost Master Delete action */
.master-actions .delete-btn{
  background:#fff0f0!important;
  color:#8a2525!important;
  border:1px solid #d78f8f!important;
}
.master-actions .delete-btn:hover{background:#ffe1e1!important}

/* =========================================================
   COMPACT MANAGEMENT DASHBOARD - FINAL
   ========================================================= */
.overview-section{padding:12px 13px!important;margin-bottom:12px!important}
.section-title-row{min-height:28px!important;margin-bottom:8px!important}
.section-title-row h2{font-size:14px!important;margin:0!important}
.overview-grid{
  grid-template-columns:repeat(6,minmax(0,1fr))!important;
  gap:8px!important;
}
.overview-card{
  min-height:78px!important;
  padding:9px 10px!important;
  border-radius:8px!important;
}
.overview-card span{font-size:9px!important;line-height:1.15!important}
.overview-card strong{font-size:18px!important;margin:5px 0 2px!important;line-height:1!important}
.overview-card small{font-size:8px!important;line-height:1.25!important}

.mini-stat-grid{
  grid-template-columns:repeat(8,minmax(0,1fr))!important;
  gap:7px!important;
}
.mini-stat{
  min-height:72px!important;padding:9px!important;border-radius:8px!important
}
.mini-stat span{font-size:8.5px!important}
.mini-stat strong{font-size:14px!important;margin:5px 0!important}
.mini-stat small{font-size:7.5px!important;line-height:1.25!important}

.dashboard-control-section{background:#f8fbfe!important}
.dashboard-status-group{margin-top:8px}
.status-group-title{
  font-size:10px;font-weight:800;color:#52687d;text-transform:uppercase;
  letter-spacing:.4px;margin:3px 0 5px;padding-left:3px
}
.compact-status-grid{
  display:grid;
  grid-template-columns:repeat(8,minmax(0,1fr));
  gap:6px;
}
.compact-status-card{
  min-width:0;min-height:58px;padding:7px 8px;box-sizing:border-box;
  border:1px solid #cbd7e3;border-left:3px solid #6b9ac4;border-radius:5px;
  background:#fff;text-decoration:none;color:#17324f;display:flex;flex-direction:column;
  justify-content:center;transition:.12s ease
}
.compact-status-card:hover{background:#f3f8fd;transform:translateY(-1px)}
.compact-status-card span{
  font-size:8px;font-weight:800;color:#65778a;text-transform:uppercase;line-height:1.1
}
.compact-status-card strong{
  font-size:16px;line-height:1;margin:5px 0 2px;color:#102f50
}
.compact-status-card small{
  font-size:7.5px;color:#748597;line-height:1.15;white-space:normal
}
.compact-status-card.status-good{border-left-color:#22a05a}
.compact-status-card.status-good strong{color:#197344}
.compact-status-card.status-alert{border-left-color:#e6a51a}
.compact-status-card.status-alert strong{color:#946300}
.compact-status-card.status-danger{border-left-color:#d9534f}
.compact-status-card.status-danger strong{color:#9c302c}

.dashboard-performance th,.dashboard-performance td{padding:4px 5px!important;font-size:9px!important}

@media(max-width:1250px){
 .overview-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}
 .compact-status-grid{grid-template-columns:repeat(6,minmax(0,1fr))}
 .mini-stat-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}
}
@media(max-width:900px){
 .overview-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
 .compact-status-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media(max-width:650px){
 .overview-grid,.compact-status-grid,.mini-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

/* =========================================================
   DASHBOARD V2 - SMALLER OVERVIEW + SELECTABLE PROFESSIONAL GRAPH
   ========================================================= */
.overview-grid{
  grid-template-columns:repeat(8,minmax(0,1fr))!important;
  gap:6px!important;
}
.overview-card{
  min-height:62px!important;
  padding:7px 8px!important;
  border-radius:6px!important;
}
.overview-card span{font-size:7.8px!important;letter-spacing:.2px!important}
.overview-card strong{font-size:15px!important;margin:4px 0 2px!important}
.overview-card small{font-size:7px!important;line-height:1.15!important}
.overview-section{padding:10px 12px!important}
.section-title-row{min-height:24px!important;margin-bottom:6px!important}

.analytics-row{grid-template-columns:minmax(320px,.75fr) minmax(520px,1.25fr)!important}
.analytics-title-row{align-items:center!important;gap:10px!important}
.analytics-controls{display:flex;align-items:center;gap:7px}
.analytics-controls label{font-size:9px;font-weight:800;color:#536a80;text-transform:uppercase}
.analytics-controls select{
 min-width:205px;height:32px;border:1px solid #9fb0c0;border-radius:4px;background:#fff;
 padding:4px 8px;font-size:10px;font-weight:700;color:#173451
}
.professional-chart-shell{width:100%}
.main-selectable-chart{
 border:1px solid #cbd8e5!important;border-radius:7px!important;background:#fff!important;
 padding:10px!important;min-height:330px!important
}
.chart-title-row{display:flex!important;justify-content:space-between!important;align-items:flex-start!important;gap:10px!important}
.chart-title-row>div{display:flex;flex-direction:column;gap:2px}
.chart-title-row strong{font-size:12px!important;color:#102f50!important}
.chart-title-row small{font-size:8px!important;color:#75879a!important;text-transform:uppercase!important}
.chart-summary-pill{
 display:inline-block;padding:4px 8px;border-radius:12px;background:#eaf2fb;color:#254f78;
 font-size:8px;font-weight:800;white-space:nowrap
}
.dashboard-selected-graph{margin-top:10px}
.pro-bar-chart{display:flex;flex-direction:column;gap:8px}
.pro-bar-row{
 display:grid;grid-template-columns:145px minmax(140px,1fr) 78px;gap:9px;align-items:center
}
.pro-bar-label{display:flex;flex-direction:column;min-width:0}
.pro-bar-label strong{
 font-size:9px;color:#163653;white-space:nowrap;overflow:hidden;text-overflow:ellipsis
}
.pro-bar-label small{font-size:7px;color:#7a8b9b;margin-top:1px}
.pro-bar-track{
 height:9px;border-radius:6px;background:#e7edf4;overflow:hidden;position:relative
}
.pro-bar-track span{
 display:block;height:100%;border-radius:6px;background:linear-gradient(90deg,#3c78d8,#72a4f0)
}
.pro-bar-value{text-align:right;font-size:8.5px;font-weight:800;color:#173b5e;white-space:nowrap}
.chart-empty{
 min-height:230px;display:flex;align-items:center;justify-content:center;
 color:#7c8c9b;font-size:10px;border:1px dashed #ccd7e1;border-radius:5px
}

@media(max-width:1250px){
 .overview-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}
 .analytics-row{grid-template-columns:1fr!important}
}
@media(max-width:800px){
 .overview-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .pro-bar-row{grid-template-columns:105px minmax(100px,1fr) 65px}
 .analytics-controls{width:100%}.analytics-controls select{flex:1;min-width:0}
 .analytics-title-row{align-items:flex-start!important;flex-direction:column!important}
}

/* =========================================================
   DASHBOARD ALL OVERVIEW - MULTI GRAPH + DONUT
   ========================================================= */
.main-selectable-chart:has(.all-graph-grid){min-height:520px!important}
.all-graph-grid{
 display:grid;
 grid-template-columns:1fr 1fr;
 gap:10px;
 margin-top:4px
}
.all-graph-card{
 border:1px solid #d1dce7;
 border-radius:7px;
 background:#fbfdff;
 padding:10px;
 min-height:230px;
 box-sizing:border-box
}
.all-graph-head{
 display:flex;justify-content:space-between;align-items:center;
 padding-bottom:7px;margin-bottom:8px;border-bottom:1px solid #e4ebf2
}
.all-graph-head strong{font-size:10px;color:#143654}
.all-graph-head small{font-size:7px;color:#7a8b9b;text-transform:uppercase}
.all-graph-card .pro-bar-row{
 grid-template-columns:105px minmax(90px,1fr) 60px;
 gap:6px
}
.all-graph-card .pro-bar-chart{gap:7px}
.all-graph-card .pro-bar-track{height:8px}

.donut-layout{
 display:grid;
 grid-template-columns:170px 1fr;
 gap:16px;
 align-items:center;
 min-height:175px
}
.donut-chart{
 width:160px;height:160px;border-radius:50%;
 position:relative;margin:auto;
 box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)
}
.donut-hole{
 position:absolute;inset:34px;border-radius:50%;
 background:#fff;display:flex;flex-direction:column;
 align-items:center;justify-content:center;text-align:center;
 box-shadow:0 0 0 1px #e0e8ef
}
.donut-hole strong{font-size:13px;color:#153755}
.donut-hole small{font-size:7px;color:#78899a;margin-top:3px;text-transform:uppercase}
.donut-legend{display:flex;flex-direction:column;gap:5px}
.donut-legend>div{
 display:grid;grid-template-columns:9px minmax(80px,1fr) 44px 58px;
 gap:5px;align-items:center;font-size:7.5px;color:#4e6377
}
.legend-dot{width:8px;height:8px;border-radius:2px}
.donut-legend b{font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.donut-legend em{font-style:normal;text-align:right;color:#6c7e8f}
.donut-legend small{text-align:right;font-weight:700;color:#173b5e}

@media(max-width:1150px){
 .all-graph-grid{grid-template-columns:1fr}
 .donut-layout{grid-template-columns:160px 1fr}
}
@media(max-width:650px){
 .donut-layout{grid-template-columns:1fr}
 .donut-chart{width:145px;height:145px}
}

/* =========================================================
   FINAL VMS TALLY THEME + COMMON REPORT FORMAT
   ========================================================= */
:root{
 --vms-tally-navy:#173f70;
 --vms-tally-blue:#d9e8f7;
 --vms-tally-paper:#fffbdc;
 --vms-tally-line:#8799aa;
 --vms-tally-bg:#edf3f8;
}
body{background:var(--vms-tally-bg)!important}
.sidebar{background:#0f3155!important;border-right:1px solid #315777!important}
.sidebar-brand{background:#123a63!important}
.nav-group-btn.active,.side-nav a.active,.nav-submenu a.active{background:#2f73d9!important}
.main-content{background:linear-gradient(180deg,#edf4fb 0,#f5f8fb 100%)!important}
.trip-report,.pnl-report,.overview-section,.store-report-page .trip-report{
 border:1px solid #9babb9!important;border-radius:3px!important;box-shadow:none!important;background:#fff!important
}
.vms-tally-report-page .trip-report>h2,
.vms-tally-report-page .trip-report .report-title,
.vms-tally-report-page .section-title-row{
 background:var(--vms-tally-blue)!important;color:#102e4c!important;
 border-bottom:1px solid var(--vms-tally-line)!important;border-radius:0!important
}
.vms-tally-report-page table{
 border-collapse:collapse!important;background:var(--vms-tally-paper)!important;
 font-family:Arial,Helvetica,sans-serif!important;font-size:10px!important
}
.vms-tally-report-page table th{
 background:var(--vms-tally-blue)!important;color:#111!important;font-weight:700!important;
 border:1px solid #899aaa!important;padding:4px 5px!important
}
.vms-tally-report-page table td{
 background:var(--vms-tally-paper)!important;color:#111!important;
 border-left:1px solid #a9b5c0!important;border-right:1px solid #a9b5c0!important;
 border-bottom:1px dotted #c8c1a2!important;padding:4px 5px!important
}
.vms-tally-report-page table tfoot th,.vms-tally-report-page table tfoot td{
 background:#f4eebf!important;border-top:1px solid #718395!important;font-weight:800!important
}
.vms-tally-report-page input,.vms-tally-report-page select{
 border:1px solid #8297aa!important;border-radius:1px!important;background:#fff!important
}
.vms-tally-report-page button{
 border-radius:1px!important;border:1px solid #6f8498!important
}

/* Cost sheet remains exact user format, with Tally title bars. */
.tally-report{background:var(--vms-tally-paper)!important}
.tally-report .exact-cost-table,.tally-report .cost-matrix{background:var(--vms-tally-paper)!important}

/* FINAL: fit the complete Cost Report to ONE A4 landscape print page. */
@media print{
 @page{size:A4 landscape;margin:3mm}
 html,body{width:100%!important;height:auto!important;margin:0!important;padding:0!important}
 body.vms-tally-report-page .sidebar,
 body.vms-tally-report-page .no-print,
 body.vms-tally-report-page .cost-sheet-toolbar{display:none!important}
 body.vms-tally-report-page .main-content{margin:0!important;padding:0!important;background:#fff!important}
 #monthlyCostSheet{
   width:100%!important;max-width:none!important;margin:0!important;padding:0!important;
   border:0!important;box-shadow:none!important;page-break-inside:avoid!important;
   break-inside:avoid-page!important;
 }
 #monthlyCostSheet .tally-titlebar{min-height:16px!important;padding:2px 4px!important;font-size:6px!important}
 #monthlyCostSheet .tally-title-left strong{font-size:7px!important}
 #monthlyCostSheet .tally-company-head{padding:2px 3px!important}
 #monthlyCostSheet .tally-company-head h1{font-size:8px!important;margin:0!important}
 #monthlyCostSheet .tally-company-head div{font-size:5.5px!important;line-height:1.05!important}
 #monthlyCostSheet .cost-section-title{font-size:6.5px!important;padding:1px 2px!important;line-height:1!important}
 #monthlyCostSheet .table-wrapper{margin:0 0 2px!important;overflow:visible!important}
 #monthlyCostSheet .exact-cost-table,#monthlyCostSheet .cost-matrix{
   width:100%!important;min-width:0!important;table-layout:auto!important;font-size:5.4px!important
 }
 #monthlyCostSheet .exact-cost-table th,#monthlyCostSheet .exact-cost-table td,
 #monthlyCostSheet .cost-matrix th,#monthlyCostSheet .cost-matrix td{
   padding:0.5px 1px!important;height:8px!important;line-height:1!important;
   white-space:nowrap!important
 }
 #monthlyCostSheet .exact-cost-table th:nth-child(2),#monthlyCostSheet .exact-cost-table td:nth-child(2),
 #monthlyCostSheet .cost-matrix th:nth-child(2),#monthlyCostSheet .cost-matrix td:nth-child(2){
   width:auto!important;min-width:70px!important
 }
 #monthlyCostSheet .tally-hidden-analytics,#monthlyCostSheet .tally-keybar{display:none!important}
 #monthlyCostSheet *{box-shadow:none!important}
}

/* =========================================================
   COST REPORT - HARD ONE PAGE LANDSCAPE PRINT FIX
   ========================================================= */
@media print{
  @page{
    size:A4 landscape;
    margin:2mm;
  }

  html,body{
    margin:0!important;
    padding:0!important;
    width:100%!important;
    min-width:0!important;
    height:auto!important;
    overflow:visible!important;
    background:#fff!important;
  }

  body.cost-one-page-print{
    margin:0!important;
    padding:0!important;
  }

  body.cost-one-page-print .sidebar,
  body.cost-one-page-print .cost-sheet-toolbar,
  body.cost-one-page-print .no-print{
    display:none!important;
  }

  body.cost-one-page-print .main-content{
    margin:0!important;
    padding:0!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    background:#fff!important;
    overflow:visible!important;
  }

  #monthlyCostSheet{
    margin:0!important;
    padding:0!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    border:0!important;
    box-shadow:none!important;
    page-break-before:avoid!important;
    page-break-after:avoid!important;
    page-break-inside:avoid!important;
    break-before:avoid-page!important;
    break-after:avoid-page!important;
    break-inside:avoid-page!important;
    overflow:visible!important;
  }

  #monthlyCostSheet,
  #monthlyCostSheet > *,
  #monthlyCostSheet .table-wrapper,
  #monthlyCostSheet table,
  #monthlyCostSheet thead,
  #monthlyCostSheet tbody,
  #monthlyCostSheet tr{
    page-break-inside:avoid!important;
    break-inside:avoid-page!important;
  }

  #monthlyCostSheet .tally-titlebar{
    min-height:12px!important;
    padding:1px 3px!important;
    font-size:5px!important;
    line-height:1!important;
  }

  #monthlyCostSheet .tally-title-left{
    gap:6px!important;
  }

  #monthlyCostSheet .tally-title-left strong,
  #monthlyCostSheet .tally-title-right{
    font-size:5.8px!important;
  }

  #monthlyCostSheet .tally-company-head{
    padding:1px 2px!important;
    line-height:1!important;
  }

  #monthlyCostSheet .tally-company-head h1{
    font-size:7px!important;
    margin:0!important;
    line-height:1!important;
  }

  #monthlyCostSheet .tally-company-head div{
    font-size:4.5px!important;
    line-height:1!important;
    margin:0!important;
  }

  #monthlyCostSheet .cost-section-title{
    font-size:5.5px!important;
    line-height:1!important;
    padding:1px 2px!important;
    margin:0!important;
    min-height:0!important;
  }

  #monthlyCostSheet .table-wrapper{
    margin:0!important;
    padding:0!important;
    overflow:visible!important;
    border:0!important;
  }

  #monthlyCostSheet .exact-cost-table,
  #monthlyCostSheet .cost-matrix{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    table-layout:auto!important;
    border-collapse:collapse!important;
    font-size:4.6px!important;
    line-height:.95!important;
    margin:0!important;
  }

  #monthlyCostSheet .exact-cost-table th,
  #monthlyCostSheet .exact-cost-table td,
  #monthlyCostSheet .cost-matrix th,
  #monthlyCostSheet .cost-matrix td{
    padding:0 0.7px!important;
    height:6px!important;
    min-height:0!important;
    line-height:.95!important;
    white-space:nowrap!important;
    border-width:.4px!important;
  }

  #monthlyCostSheet .exact-cost-table th:first-child,
  #monthlyCostSheet .exact-cost-table td:first-child,
  #monthlyCostSheet .cost-matrix th:first-child,
  #monthlyCostSheet .cost-matrix td:first-child{
    width:15px!important;
  }

  #monthlyCostSheet .exact-cost-table th:nth-child(2),
  #monthlyCostSheet .exact-cost-table td:nth-child(2),
  #monthlyCostSheet .cost-matrix th:nth-child(2),
  #monthlyCostSheet .cost-matrix td:nth-child(2){
    min-width:62px!important;
    width:62px!important;
  }

  #monthlyCostSheet .tally-hidden-analytics,
  #monthlyCostSheet .tally-keybar{
    display:none!important;
  }

  #monthlyCostSheet *{
    box-shadow:none!important;
  }
}

/* Measurement class prevents accidental clipping while calculating scale. */
.cost-print-measuring{
  overflow:visible!important;
  max-height:none!important;
}

/* =========================================================
   COST REPORT - TWO SHARED SCROLLERS + WRAPPED HEADINGS
   ========================================================= */
.cost-shared-scroll-top,
.cost-shared-scroll-bottom{
  width:100%;
  height:18px;
  overflow-x:scroll;
  overflow-y:hidden;
  background:#e7eef5;
  border:1px solid #8da0b2;
  box-sizing:border-box;
}
.cost-shared-scroll-top{margin-bottom:2px}
.cost-shared-scroll-bottom{margin-top:2px}
#costSharedTopInner,#costSharedBottomInner{height:1px}

.cost-shared-viewport{
  width:100%;
  overflow-x:scroll;
  overflow-y:visible;
  box-sizing:border-box;
  scrollbar-width:none;
}
.cost-shared-viewport::-webkit-scrollbar{height:0!important}

/* Remove all middle/section horizontal scrollers */
#monthlyCostSheet .table-wrapper{
  overflow:visible!important;
  width:max-content!important;
  min-width:100%!important;
  border-left:0!important;
  border-right:0!important;
}
#monthlyCostSheet .table-top-scroll,
#monthlyCostSheet .trip-top-scroll{
  display:none!important;
}

/* All three summaries move as one wide sheet */
#monthlyCostSheet{
  width:max-content!important;
  min-width:100%!important;
}
#monthlyCostSheet .exact-cost-table,
#monthlyCostSheet .cost-matrix{
  width:max-content!important;
  min-width:100%!important;
}

/* Wrap location headings to reduce unnecessary width */
#monthlyCostSheet .exact-cost-table thead th,
#monthlyCostSheet .cost-matrix thead th{
  white-space:normal!important;
  word-break:normal!important;
  overflow-wrap:anywhere!important;
  text-align:center!important;
  vertical-align:middle!important;
  line-height:1.08!important;
  min-width:52px!important;
  max-width:82px!important;
  height:auto!important;
  padding:4px 3px!important;
}
#monthlyCostSheet .exact-cost-table thead th:first-child,
#monthlyCostSheet .cost-matrix thead th:first-child{
  min-width:34px!important;max-width:34px!important;
}
#monthlyCostSheet .exact-cost-table thead th:nth-child(2),
#monthlyCostSheet .cost-matrix thead th:nth-child(2){
  min-width:190px!important;max-width:190px!important;text-align:left!important;
}
#monthlyCostSheet .exact-cost-table tbody td,
#monthlyCostSheet .cost-matrix tbody td{
  white-space:nowrap!important;
}

@media print{
  .cost-shared-scroll-top,.cost-shared-scroll-bottom{display:none!important}
  .cost-shared-viewport{overflow:visible!important;width:100%!important}
  #monthlyCostSheet{width:100%!important;min-width:0!important}
  #monthlyCostSheet .table-wrapper{width:100%!important;min-width:0!important}
  #monthlyCostSheet .exact-cost-table,#monthlyCostSheet .cost-matrix{
    width:100%!important;min-width:0!important;table-layout:auto!important
  }
  #monthlyCostSheet .exact-cost-table thead th,
  #monthlyCostSheet .cost-matrix thead th{
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    max-width:none!important;
  }
}

/* =========================================================
   SIDEBAR PRIORITY: COST REPORT FIRST, DASHBOARD SECOND
   ========================================================= */
.side-nav>.nav-cost-home{
  display:flex!important;
  align-items:center!important;
  min-height:44px!important;
  margin:6px 0 4px!important;
  padding:0 10px!important;
  border-radius:7px!important;
  background:#f4d77a!important;
  color:#17324f!important;
  font-weight:800!important;
  text-decoration:none!important;
  border-left:4px solid #c78b00!important;
  box-shadow:0 2px 6px rgba(0,0,0,.12)!important;
}
.side-nav>.nav-cost-home:hover{
  background:#ffe79b!important;
  color:#102b47!important;
}
.side-nav>.nav-cost-home.active{
  background:#ffd45c!important;
  color:#0f2741!important;
}
.side-nav>.nav-home{
  margin-top:2px!important;
  border-left:3px solid #7aa7d8!important;
}
body.sidebar-collapsed .side-nav>.nav-cost-home{
  justify-content:center!important;
  padding:0!important;
}

/* =========================================================
   MONTHLY AUDIT REPORT
   ========================================================= */
.side-nav>.nav-audit-home{
 display:flex!important;align-items:center!important;min-height:40px!important;margin:2px 0 6px!important;
 padding:0 10px!important;border-radius:5px!important;background:#dce9f6!important;color:#153b62!important;
 font-weight:800!important;text-decoration:none!important;border-left:4px solid #417db7!important;
}
.side-nav>.nav-audit-home:hover,.side-nav>.nav-audit-home.active{background:#bcd8f1!important;color:#0f3155!important}
.audit-shell{background:#fffbdc;border:1px solid #8799aa;min-height:400px}
.audit-titlebar{display:flex;justify-content:space-between;align-items:center;background:#173f70;color:#fff;padding:6px 9px;font-size:13px}
.audit-actions{display:flex;gap:6px}
.audit-actions button,.audit-filter button,#saveAuditRemarksBtn{background:#e8eef6;border:1px solid #71869a;padding:5px 9px;font-weight:700;cursor:pointer}
.audit-company-head{text-align:center;background:#d9e8f7;border-bottom:1px solid #8799aa;padding:5px}
.audit-company-head h1{font-size:16px;margin:0 0 2px}
.audit-company-head div{font-size:10px}
.audit-filter{display:flex;gap:8px;align-items:end;flex-wrap:wrap;padding:7px;background:#f4eebf;border-bottom:1px solid #8799aa}
.audit-filter label{font-size:10px;font-weight:700;display:flex;flex-direction:column;gap:2px}
.audit-filter input,.audit-filter select{height:29px;min-width:140px}
.audit-kpis{display:grid;grid-template-columns:repeat(5,minmax(130px,1fr));gap:5px;padding:6px;background:#edf3f8}
.audit-kpis>div{background:#fffbdc;border:1px solid #98a8b7;padding:6px;min-height:48px}
.audit-kpis span{display:block;font-size:9px;font-weight:700;color:#465b6d}
.audit-kpis strong{display:block;font-size:14px;color:#173f70;margin-top:4px}
.audit-section{padding:5px 6px 8px}
.audit-section h2{font-size:11px;margin:0;background:#d9e8f7;border:1px solid #8799aa;padding:4px 6px;color:#17324f}
.audit-table-scroll{overflow:auto;border:1px solid #8799aa;border-top:0;max-width:100%}
.audit-section table{width:100%;border-collapse:collapse;background:#fffbdc;font-size:9px}
.audit-section th{background:#d9e8f7;border:1px solid #8799aa;padding:4px;white-space:normal;line-height:1.1}
.audit-section td{border:1px solid #b6b29b;padding:3px 4px;vertical-align:top}
.audit-section td.num{text-align:right;white-space:nowrap}
.audit-total-row td{font-weight:800;background:#f4eebf}
.audit-flag{display:inline-block;padding:2px 4px;border-radius:2px;font-size:8px;font-weight:800;white-space:nowrap}
.audit-flag.ok{background:#dcefdc;color:#225a22}.audit-flag.warn{background:#ffe9a8;color:#745400}.audit-flag.danger{background:#ffd4d4;color:#8b1f1f}
.audit-remark-input{width:220px;min-height:26px;font-size:9px;border:1px solid #8799aa;padding:3px}
.audit-note,.audit-footer{font-size:8px;padding:4px 6px;color:#586b7c;background:#f7f4d7;border:1px solid #c8c1a2;border-top:0}
.empty-cell{text-align:center;padding:12px!important;color:#657789}
@media(max-width:1100px){.audit-kpis{grid-template-columns:repeat(2,minmax(130px,1fr))}}
@media print{
 @page{size:A4 landscape;margin:5mm}
 body.audit-report-page .sidebar,.audit-report-page .no-print{display:none!important}
 body.audit-report-page .main-content{margin:0!important;padding:0!important;width:100%!important;background:#fff!important}
 .audit-shell{border:0!important}
 .audit-titlebar{font-size:10px!important;padding:3px!important}
 .audit-company-head{padding:2px!important}.audit-company-head h1{font-size:10px!important}
 .audit-kpis{grid-template-columns:repeat(5,1fr)!important;padding:2px!important;gap:2px!important}
 .audit-kpis>div{min-height:30px!important;padding:2px!important}.audit-kpis strong{font-size:9px!important}
 .audit-section{page-break-inside:avoid!important;padding:2px!important}
 .audit-section h2{font-size:7px!important;padding:2px!important}
 .audit-section table{font-size:5.5px!important}
 .audit-section th,.audit-section td{padding:1px!important}
 .audit-table-scroll{overflow:visible!important}
 .audit-remark-input{border:0!important;width:100px!important;font-size:5.5px!important;background:transparent!important}
 .audit-note,.audit-footer{font-size:5.5px!important;padding:2px!important}
}

/* AUDIT REPORT SIDEBAR / RETURN NAVIGATION FIX */
@media screen{
 body.audit-report-page .sidebar{display:block!important;visibility:visible!important;opacity:1!important;position:fixed!important;left:0!important;top:0!important;bottom:0!important;z-index:9999!important}
 body.audit-report-page .main-content{margin-left:198px!important;width:calc(100% - 198px)!important}
 body.audit-report-page.sidebar-collapsed .main-content{margin-left:58px!important;width:calc(100% - 58px)!important}
}
@media print{
 body.audit-report-page .sidebar{display:none!important}
 body.audit-report-page .main-content{margin-left:0!important;width:100%!important}
}

/* STORE TRACEABILITY / HISTORY */
.traceable-asset-panel{margin:8px 0;padding:8px;border:1px solid #7890a7;background:#eef5fb}
.traceable-asset-panel h3{margin:0 0 6px;color:#173f70;font-size:12px}
.asset-preview-img{max-width:180px;max-height:120px;border:1px solid #8799aa;padding:2px;background:#fff}
.history-thumb{width:54px;height:40px;object-fit:cover;border:1px solid #8799aa}
.stock-value-table tbody tr{cursor:pointer}
.stock-value-table tbody tr:hover{background:#e5f1fb!important}
.vms-modal{position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:30000;align-items:center;justify-content:center;padding:18px}
.vms-modal-card{width:min(96vw,1500px);max-height:90vh;overflow:auto;background:#fffbdc;border:2px solid #173f70;box-shadow:0 6px 30px rgba(0,0,0,.35)}
.vms-modal-head{position:sticky;top:0;z-index:2;display:flex;justify-content:space-between;align-items:center;background:#173f70;color:#fff;padding:7px 10px}
.vms-modal-head button{font-size:20px;background:#fff;border:0;cursor:pointer}

/* =========================================================
   REPORT SECTION +/- COLLAPSE
   ========================================================= */
.vms-collapsible-heading{
  position:relative!important;
  display:flex!important;
  align-items:center!important;
  gap:6px!important;
  cursor:default!important;
}
.vms-collapse-toggle{
  flex:0 0 auto!important;
  width:22px!important;
  height:22px!important;
  min-width:22px!important;
  padding:0!important;
  border:1px solid #60758a!important;
  border-radius:3px!important;
  background:#f6f8fa!important;
  color:#173f70!important;
  font-size:16px!important;
  font-weight:900!important;
  line-height:18px!important;
  text-align:center!important;
  cursor:pointer!important;
  box-shadow:none!important;
}
.vms-collapse-toggle:hover{
  background:#d9e8f7!important;
}
.vms-collapsible-heading.collapsed{
  opacity:.96;
}
.vms-collapsible-body{
  width:100%;
}
.cost-section-title.vms-collapsible-heading{
  justify-content:flex-start!important;
}
@media print{
  .vms-collapsible-body{display:block!important}
  .vms-collapse-toggle{display:none!important}
}

/* =========================================================
   VMS PROFESSIONAL SIDEBAR REDESIGN - 2026
   ========================================================= */
.sidebar{
  background:linear-gradient(180deg,#123a61 0%,#0f3152 100%)!important;
  border-right:1px solid #274f73!important;
  box-shadow:3px 0 14px rgba(11,38,64,.18)!important;
}
.sidebar-brand{
  min-height:58px!important;
  padding:8px 10px!important;
  background:#0d2f50!important;
  border-bottom:1px solid rgba(255,255,255,.12)!important;
}
.sidebar-brand h2{
  font-size:22px!important;
  letter-spacing:.6px!important;
  font-weight:800!important;
}
.sidebar-toggle{
  width:36px!important;
  height:36px!important;
  border-radius:7px!important;
  border:1px solid rgba(255,255,255,.24)!important;
  background:rgba(255,255,255,.06)!important;
  transition:.18s ease!important;
}
.sidebar-toggle:hover{
  background:rgba(255,255,255,.15)!important;
  transform:translateY(-1px)!important;
}
.created-by{
  margin:10px 10px 14px!important;
  padding:10px 8px!important;
  border-radius:10px!important;
  border:1px solid rgba(255,255,255,.14)!important;
  background:linear-gradient(145deg,rgba(255,255,255,.08),rgba(255,255,255,.035))!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.05)!important;
}
.created-by span{
  font-size:7px!important;
  letter-spacing:1.2px!important;
  color:#9fc0de!important;
}
.created-by strong{
  font-size:11px!important;
  letter-spacing:.35px!important;
  margin-top:4px!important;
}
.created-by small{
  font-size:7px!important;
  color:#b8cce0!important;
}

/* Primary cards: COST, DASHBOARD, AUDIT */
.side-nav>.nav-cost-home,
.side-nav>.nav-home,
.side-nav>.nav-audit-home{
  min-height:43px!important;
  margin:5px 9px!important;
  padding:0 10px!important;
  border-radius:8px!important;
  border:1px solid rgba(255,255,255,.10)!important;
  border-left-width:4px!important;
  box-shadow:0 3px 8px rgba(0,0,0,.12)!important;
  font-size:10.5px!important;
  font-weight:800!important;
  letter-spacing:.15px!important;
  transition:transform .15s ease, box-shadow .15s ease, background .15s ease!important;
}
.side-nav>.nav-cost-home{
  background:linear-gradient(90deg,#ffd45a,#ffe181)!important;
  color:#17324d!important;
  border-left-color:#f1a700!important;
}
.side-nav>.nav-home{
  background:linear-gradient(90deg,#eaf2fa,#dceaf7)!important;
  color:#173a5c!important;
  border-left-color:#6ea1cf!important;
}
.side-nav>.nav-audit-home{
  background:linear-gradient(90deg,#dcebf8,#c9dff2)!important;
  color:#173a5c!important;
  border-left-color:#5d97ca!important;
}
.side-nav>.nav-cost-home:hover,
.side-nav>.nav-home:hover,
.side-nav>.nav-audit-home:hover{
  transform:translateY(-1px)!important;
  box-shadow:0 5px 12px rgba(0,0,0,.16)!important;
}
.side-nav>.nav-cost-home.active,
.side-nav>.nav-home.active,
.side-nav>.nav-audit-home.active{
  outline:2px solid rgba(255,255,255,.35)!important;
  outline-offset:-2px!important;
}
.side-nav>.nav-cost-home .nav-icon,
.side-nav>.nav-home .nav-icon,
.side-nav>.nav-audit-home .nav-icon{
  width:22px!important;
  height:22px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:6px!important;
  background:rgba(23,58,92,.09)!important;
  margin-right:5px!important;
  font-size:12px!important;
}

/* MASTER / ENTRY / STORE / REPORT main group cards */
.side-nav .nav-group{
  margin:8px 9px!important;
  border:0!important;
  background:transparent!important;
}
.side-nav .nav-group-btn{
  width:100%!important;
  min-height:42px!important;
  padding:0 10px!important;
  border-radius:8px!important;
  border:1px solid rgba(255,255,255,.15)!important;
  background:linear-gradient(90deg,rgba(255,255,255,.075),rgba(255,255,255,.035))!important;
  color:#f5f9fd!important;
  box-shadow:0 2px 6px rgba(0,0,0,.12)!important;
  font-size:10.5px!important;
  font-weight:800!important;
  letter-spacing:.35px!important;
  transition:.17s ease!important;
}
.side-nav .nav-group-btn:hover{
  background:linear-gradient(90deg,rgba(255,255,255,.14),rgba(255,255,255,.07))!important;
  border-color:rgba(255,255,255,.28)!important;
}
.side-nav .nav-group.open .nav-group-btn{
  background:#f5f9fc!important;
  color:#173a5c!important;
  border-color:#c8d8e8!important;
  box-shadow:0 4px 10px rgba(0,0,0,.16)!important;
}
.side-nav .nav-group[data-group="masters"] .nav-group-btn{border-left:4px solid #6ba6dc!important}
.side-nav .nav-group[data-group="entries"] .nav-group-btn{border-left:4px solid #62c0b0!important}
.side-nav .nav-group[data-group="store"] .nav-group-btn{border-left:4px solid #9c7bdb!important}
.side-nav .nav-group[data-group="reports"] .nav-group-btn{border-left:4px solid #e6b949!important}
.side-nav .nav-group-btn>span:first-child{
  display:flex!important;
  align-items:center!important;
  gap:6px!important;
}
.side-nav .nav-group-btn .nav-icon{
  width:22px!important;
  height:22px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:6px!important;
  background:rgba(255,255,255,.08)!important;
  font-size:12px!important;
}
.side-nav .nav-group.open .nav-group-btn .nav-icon{
  background:#e4edf5!important;
}
.side-nav .chevron{
  font-size:18px!important;
  opacity:.9!important;
  transition:transform .18s ease!important;
}
.side-nav .nav-group.open .chevron{
  transform:rotate(90deg)!important;
}

/* Professional submenu panel */
.side-nav .nav-submenu{
  margin:5px 2px 0 7px!important;
  padding:5px 0 3px 8px!important;
  border-left:1px solid rgba(183,211,235,.34)!important;
  background:transparent!important;
}
.side-nav .nav-submenu .nav-sub-link{
  position:relative!important;
  display:grid!important;
  grid-template-columns:23px minmax(0,1fr) 12px!important;
  align-items:center!important;
  column-gap:6px!important;
  min-height:34px!important;
  margin:3px 0!important;
  padding:4px 6px!important;
  border-radius:7px!important;
  border:1px solid transparent!important;
  color:#dceaf6!important;
  background:rgba(255,255,255,.025)!important;
  text-decoration:none!important;
  font-size:9px!important;
  line-height:1.25!important;
  transition:.14s ease!important;
}
.side-nav .nav-submenu .nav-sub-link:hover{
  background:rgba(255,255,255,.10)!important;
  color:#fff!important;
  border-color:rgba(255,255,255,.13)!important;
  transform:translateX(2px)!important;
}
.side-nav .nav-submenu .nav-sub-link.active{
  background:#e8f1f8!important;
  color:#173a5c!important;
  border-color:#c1d4e5!important;
  box-shadow:0 2px 7px rgba(0,0,0,.13)!important;
  font-weight:800!important;
}
.side-nav .nav-submenu .sub-icon{
  width:22px!important;
  height:22px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:6px!important;
  background:rgba(255,255,255,.08)!important;
  font-size:10px!important;
  overflow:hidden!important;
}
.side-nav .nav-submenu .nav-sub-link.active .sub-icon{
  background:#d4e4f2!important;
}
.side-nav .nav-submenu .sub-label{
  min-width:0!important;
  white-space:normal!important;
  word-break:break-word!important;
}
.side-nav .nav-submenu .sub-arrow{
  opacity:.55!important;
  font-size:14px!important;
  text-align:right!important;
}
.side-nav .nav-submenu .nav-sub-link:hover .sub-arrow,
.side-nav .nav-submenu .nav-sub-link.active .sub-arrow{
  opacity:1!important;
}

/* Cleaner scrollbar */
.sidebar{
  scrollbar-width:thin!important;
  scrollbar-color:#557895 transparent!important;
}
.sidebar::-webkit-scrollbar{width:5px!important}
.sidebar::-webkit-scrollbar-track{background:transparent!important}
.sidebar::-webkit-scrollbar-thumb{background:#557895!important;border-radius:8px!important}

/* collapsed sidebar: keep clean icon cards */
body.sidebar-collapsed .created-by{display:none!important}
body.sidebar-collapsed .side-nav>.nav-cost-home,
body.sidebar-collapsed .side-nav>.nav-home,
body.sidebar-collapsed .side-nav>.nav-audit-home{
  margin:5px 6px!important;
  padding:0!important;
  justify-content:center!important;
}
body.sidebar-collapsed .side-nav>.nav-cost-home .nav-icon,
body.sidebar-collapsed .side-nav>.nav-home .nav-icon,
body.sidebar-collapsed .side-nav>.nav-audit-home .nav-icon{
  margin:0!important;
}
body.sidebar-collapsed .side-nav .nav-group{
  margin:6px!important;
}
body.sidebar-collapsed .side-nav .nav-group-btn{
  padding:0!important;
  justify-content:center!important;
}
body.sidebar-collapsed .side-nav .nav-group-btn>span:first-child{
  justify-content:center!important;
}
body.sidebar-collapsed .side-nav .nav-submenu{display:none!important}

/* MULTI DRIVER / AUDIT P&L */
textarea#assignedDrivers{min-height:72px;resize:vertical}
.audit-profit-positive{color:#0a6a2a!important;font-weight:800!important;background:#e9f8ee!important}
.audit-profit-negative{color:#a21818!important;font-weight:800!important;background:#fdecec!important}
.driver-trip-detail{min-width:220px;white-space:normal!important;line-height:1.35!important}
#vehicleAuditTable th,#vehicleAuditTable td{vertical-align:top}

/* AUDIT DROPDOWN SELECTOR CENTER */
.audit-selector-shell{background:#fffbdc;border:1px solid #8799aa;min-height:520px}
.audit-selector-panel{padding:9px;background:#f7edb5;border-bottom:1px solid #9ca8b2}
.audit-selector-main{display:grid;grid-template-columns:minmax(280px,2fr) repeat(4,minmax(145px,1fr)) auto;gap:8px;align-items:end}
.audit-selector-main label{display:flex;flex-direction:column;gap:3px;font-size:10px;font-weight:800;color:#173a5c}
.audit-selector-main select,.audit-selector-main input{height:34px;border:1px solid #7e93a7;background:#fff;padding:4px 7px;font-size:11px}
#auditReportType{font-weight:800;background:#edf5fc;border:2px solid #4f7fa9}
#auditRunBtn{height:34px;padding:0 15px;background:#173f70;color:#fff;border:1px solid #102f54;font-weight:800;cursor:pointer}
.audit-selector-help{font-size:8px;color:#5d6c79;margin-top:6px}
.audit-current-title{display:flex;justify-content:space-between;align-items:center;padding:6px 9px;background:#d9e8f7;border-bottom:1px solid #8799aa;color:#173a5c;font-size:11px}
.audit-current-title span{font-size:9px;font-weight:700}
.audit-single-section{padding-top:6px}
.audit-compare-note{padding:5px 7px;background:#f2f6fa;border:1px solid #a9b8c5;border-bottom:0;font-size:9px;font-weight:700;color:#41596d}
@media(max-width:1200px){.audit-selector-main{grid-template-columns:repeat(3,minmax(160px,1fr))}}
@media(max-width:800px){.audit-selector-main{grid-template-columns:1fr 1fr}}
@media print{
 .audit-selector-panel{display:none!important}
 .audit-current-title{font-size:8px!important;padding:3px!important}
 .audit-single-section h2{font-size:7px!important}
}

.audit-single-section h3{margin:8px 0 0;padding:5px 7px;background:#e8f0f7;border:1px solid #9aabba;color:#173a5c;font-size:10px}

/* DAILY REPORT CENTER */
.nav-daily-home{display:flex;align-items:center;gap:9px;margin:4px 7px;padding:8px 9px;border-radius:7px;text-decoration:none;background:linear-gradient(135deg,#315f43,#214c34);color:#fff!important;border:1px solid rgba(255,255,255,.13);box-shadow:0 3px 8px rgba(0,0,0,.15)}
.nav-daily-home:hover,.nav-daily-home.active{background:linear-gradient(135deg,#3e7653,#2a6041)}
.daily-report-shell{background:#fff;border:1px solid #8ba0b1;box-shadow:0 2px 8px rgba(25,55,85,.08)}
.daily-report-titlebar{display:flex;align-items:center;justify-content:space-between;padding:10px 12px;background:#173f70;color:#fff}
.daily-report-titlebar h1{margin:0;font-size:18px;color:#fff}.daily-report-titlebar p{margin:3px 0 0;font-size:10px;color:#e8f1fa}
.daily-report-titlebar button{background:#fff;color:#173f70;border:0;padding:8px 12px;font-weight:800;border-radius:4px}
.daily-company-head{text-align:center;padding:8px;background:#fffbdc;border-bottom:1px solid #a5b1bb}
.daily-company-head h2{margin:0 0 3px;font-size:15px;color:#173f70}
.daily-company-head div{font-size:9px}
.daily-report-controls{display:grid;grid-template-columns:180px 210px auto;gap:10px;align-items:end;padding:9px 12px;background:#edf4fa;border-bottom:1px solid #a5b1bb}
.daily-report-controls label{display:flex;flex-direction:column;gap:3px;font-size:10px;font-weight:800;color:#173f70}
.daily-report-controls input,.daily-report-controls select{height:33px;border:1px solid #7e93a7;padding:4px 7px;background:#fff}
.daily-report-controls button{height:33px;background:#173f70;color:#fff;border:0;padding:0 15px;font-weight:800}
.daily-report-meta{display:flex;justify-content:space-between;padding:7px 10px;background:#d9e8f7;border-bottom:1px solid #9fb0bf;color:#173f70;font-size:10px}
.daily-report-section{margin:8px 10px 12px;border:1px solid #9daebb;background:#fff}
.daily-report-section>h2{margin:0;padding:6px 8px;background:#d9e8f7;color:#173f70;font-size:11px;border-bottom:1px solid #9daebb}
.daily-mini-summary{display:flex;gap:18px;flex-wrap:wrap;padding:6px 8px;background:#fffbdc;border-bottom:1px solid #d0c997;font-size:9px}
.daily-mini-summary strong{font-size:11px;color:#173f70}
.daily-subdate{padding:5px 8px;font-size:9px;background:#f3f6f8}
.daily-table-wrap{width:100%;overflow:auto}
.daily-report-table{width:100%;border-collapse:collapse;font-size:8.5px}
.daily-report-table th{background:#173f70;color:#fff;border:1px solid #778b9d;padding:4px 5px;white-space:nowrap}
.daily-report-table td{border:1px solid #aeb9c2;padding:4px 5px;vertical-align:top}
.daily-report-table tbody tr:nth-child(even){background:#f8fbfd}
.daily-status{display:inline-block;padding:2px 7px;border-radius:9px;font-weight:800}
.status-ok{background:#e0f4e7;color:#176b32}.status-bd{background:#fde3e3;color:#9b1d1d}
.daily-warning{margin:6px;padding:6px;background:#fff3cd;border:1px solid #e2c66c;color:#785d00;font-size:9px}
.daily-report-footer{padding:6px;text-align:center;font-size:8px;color:#637485}
@media(max-width:900px){.daily-report-controls{grid-template-columns:1fr}.daily-report-meta{display:block}.daily-report-meta span{display:block;margin-top:3px}}
@media print{
 body.daily-report-page .sidebar{display:none!important}
 body.daily-report-page .main-content{margin:0!important;padding:0!important;width:100%!important}
 .daily-report-shell{border:0!important;box-shadow:none!important}
 .daily-report-titlebar{padding:5px 7px!important}.daily-report-titlebar h1{font-size:12px!important}.daily-report-titlebar p{font-size:7px!important}
 .daily-company-head{padding:4px!important}.daily-company-head h2{font-size:11px!important}
 .daily-report-meta{padding:4px!important;font-size:7px!important}
 .daily-report-section{margin:4px 0 6px!important;break-inside:avoid}
 .daily-report-section>h2{font-size:8px!important;padding:3px 4px!important}
 .daily-mini-summary{font-size:6.5px!important;padding:3px!important}.daily-mini-summary strong{font-size:7px!important}
 .daily-report-table{font-size:6px!important}.daily-report-table th,.daily-report-table td{padding:2px 3px!important}
 @page{size:A4 landscape;margin:6mm}
}

/* DIRECTOR DAILY REPORTS V3 - SEPARATE REPORTS */
.daily-control-panel{background:#fff;border:1px solid #9aaaba;margin-bottom:10px}
.daily-control-panel>h1{margin:0;padding:9px 12px;background:#173f70;color:#fff;font-size:17px}
.daily-control-panel>p{margin:0;padding:5px 12px;background:#d9e8f7;font-size:10px}
.daily-controls-v3{grid-template-columns:2fr 1fr 1fr 1.3fr auto auto!important}
.director-report-sheet{background:#fff;border:2px solid #173f70;min-height:500px}
.director-report-header{border-bottom:2px solid #173f70}
.report-company{text-align:center;padding:6px 8px 3px}.report-company h1{margin:0;color:#173f70;font-size:16px}.report-company div{font-size:8px}
.report-name{text-align:center;background:#173f70;color:#fff;font-size:13px;font-weight:900;padding:5px;letter-spacing:.4px}
.report-head-meta{display:grid;grid-template-columns:1fr 1fr 1fr;background:#fffbdc;border-bottom:1px solid #9aaaba}
.report-head-meta span{padding:5px 8px;border-right:1px solid #9aaaba;font-size:9px}.report-head-meta i{font-style:normal;font-weight:700}
.director-table-wrap{width:100%;overflow:auto}
.director-table{width:100%;border-collapse:collapse;font-size:8.5px}
.director-table th{background:#d9e8f7;color:#173f70;border:1px solid #8295a6;padding:5px 4px;text-align:center}
.director-table td{border:1px solid #a8b4be;padding:5px 4px;vertical-align:top}
.director-table tbody tr:nth-child(even){background:#fffdf0}
.director-summary-line{margin-top:7px;border-top:2px solid #173f70;border-bottom:1px solid #8295a6;background:#fffbdc;padding:6px 8px;font-size:9px;font-weight:800;color:#173f70}
.director-signatures{display:grid;grid-template-columns:1fr 1fr;gap:100px;padding:24px 55px 10px;text-align:center}
.director-signatures div span{display:block;border-top:1px solid #222;margin-bottom:4px}.director-signatures b{font-size:9px}
.plan-reason-cell{display:flex;gap:3px}.plan-reason-cell input{min-width:160px;border:1px solid #9aaaba;padding:3px;font-size:8px}.plan-reason-cell button{font-size:8px;padding:2px 5px}
.text-ok{color:#176b32}.text-bd{color:#a21c1c}
@media(max-width:1000px){.daily-controls-v3{grid-template-columns:1fr 1fr!important}}
@media print{
 body.daily-report-page .sidebar,.daily-control-panel,.no-print{display:none!important}
 body.daily-report-page .main-content{margin:0!important;padding:0!important;width:100%!important}
 .director-report-sheet{border:1.2px solid #173f70!important;min-height:0!important;width:100%!important}
 .report-company{padding:2px 5px!important}.report-company h1{font-size:11px!important}.report-company div{font-size:6px!important}
 .report-name{font-size:9px!important;padding:3px!important}
 .report-head-meta span{font-size:6.5px!important;padding:3px 5px!important}
 .director-table{font-size:6.3px!important;table-layout:auto!important}
 .director-table th,.director-table td{padding:2.2px 2.5px!important;line-height:1.12!important}
 .director-table-wrap{overflow:visible!important}
 .director-summary-line{font-size:6.5px!important;padding:3px 5px!important;margin-top:3px!important}
 .director-signatures{padding:16px 45px 3px!important;gap:90px!important}.director-signatures b{font-size:6.5px!important}
 .plan-reason-cell input{border:0!important;padding:0!important;min-width:90px!important;font-size:6px!important;background:transparent!important}
 @page{size:A4 landscape;margin:5mm}
}

/* COMPACT MANAGEMENT DASHBOARD V4 */
.executive-dashboard-section{padding:9px 10px!important}
.exec-kpi-grid{display:grid;grid-template-columns:repeat(6,minmax(118px,1fr));gap:6px}
.exec-kpi{min-height:62px;border:1px solid #c7d3df;border-left:3px solid #173f70;border-radius:5px;padding:7px 8px;background:#fff;text-decoration:none;color:#263746;box-shadow:0 1px 2px rgba(0,0,0,.04)}
.exec-kpi span{display:block;font-size:9px;font-weight:800;color:#526678;text-transform:uppercase;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.exec-kpi strong{display:block;font-size:16px;line-height:21px;color:#173f70;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.exec-kpi small{display:block;font-size:7.5px;color:#728292;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.exec-kpi.pnl-highlight{border-left-color:#168044;background:#f4fbf6}
.compact-control-v3{padding:8px 10px!important}
.ops-control-row{display:grid;grid-template-columns:72px repeat(10,minmax(62px,1fr));gap:4px;margin:5px 0;align-items:stretch}
.ops-control-row:nth-of-type(2){grid-template-columns:72px repeat(8,minmax(70px,1fr))}
.ops-row-label{display:flex;align-items:center;justify-content:center;background:#173f70;color:#fff;font-size:9px;font-weight:900;border-radius:4px}
.ops-mini{background:#f8fbfe;border:1px solid #cbd8e3;border-radius:4px;padding:4px 5px;text-align:center;text-decoration:none;min-height:38px}
.ops-mini span{display:block;font-size:7.5px;font-weight:700;color:#617486;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ops-mini strong{display:block;font-size:13px;line-height:16px;color:#173f70}
.ops-mini.status-good{background:#f2faf4}.ops-mini.status-danger{background:#fff3f3}.ops-mini.status-alert{background:#fff9e8}
.dashboard-resource-control{padding:8px 10px!important}
.resource-kpi-grid{display:grid;grid-template-columns:repeat(7,minmax(105px,1fr));gap:5px}
.resource-kpi{background:#fffbdc;border:1px solid #d8cf9e;border-radius:4px;padding:6px 7px;text-decoration:none;min-height:48px}
.resource-kpi span{display:block;font-size:8px;font-weight:800;color:#665e35;text-transform:uppercase;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.resource-kpi strong{display:block;color:#173f70;font-size:13px;line-height:18px;white-space:nowrap}
.resource-kpi small{font-size:7.5px;color:#756f55}.resource-kpi.resource-total{background:#eaf3fc;border-color:#9bb8d2}
@media(max-width:1250px){.exec-kpi-grid{grid-template-columns:repeat(4,1fr)}.ops-control-row,.ops-control-row:nth-of-type(2){grid-template-columns:72px repeat(5,1fr)}.resource-kpi-grid{grid-template-columns:repeat(4,1fr)}}
@media(max-width:800px){.exec-kpi-grid,.resource-kpi-grid{grid-template-columns:repeat(2,1fr)}.ops-control-row,.ops-control-row:nth-of-type(2){grid-template-columns:70px repeat(2,1fr)}}

/* DASHBOARD DAILY CONTROL - SINGLE LINE COMPACT FIX */
@media (min-width: 1050px){
  .compact-control-v3 .ops-control-row{
    display:grid!important;
    grid-template-columns:68px repeat(10,minmax(0,1fr))!important;
    gap:3px!important;
    margin:4px 0!important;
    width:100%!important;
  }
  .compact-control-v3 .ops-control-row:nth-of-type(2){
    grid-template-columns:68px repeat(8,minmax(0,1fr))!important;
  }
  .compact-control-v3 .ops-mini{
    min-width:0!important;
    min-height:32px!important;
    padding:2px 3px!important;
    border-radius:3px!important;
  }
  .compact-control-v3 .ops-mini span{
    font-size:6.8px!important;
    line-height:10px!important;
  }
  .compact-control-v3 .ops-mini strong{
    font-size:12px!important;
    line-height:15px!important;
  }
  .compact-control-v3 .ops-row-label{
    font-size:8px!important;
    min-height:32px!important;
  }
}

/* DAILY / OPERATIONAL CONTROL - EXTRA TIGHT SINGLE ROW FIX */
@media (min-width: 950px){
  .compact-control-v3 .ops-control-row{
    grid-template-columns:64px repeat(10,minmax(48px,1fr))!important;
    gap:2px!important;
  }
  .compact-control-v3 .ops-control-row:nth-of-type(2){
    grid-template-columns:64px repeat(8,minmax(54px,1fr))!important;
  }
  .compact-control-v3 .ops-row-label{
    min-width:0!important;
    font-size:7px!important;
    padding:0 2px!important;
  }
  .compact-control-v3 .ops-mini{
    min-width:0!important;
    max-width:none!important;
    padding:1px 2px!important;
    min-height:30px!important;
  }
  .compact-control-v3 .ops-mini span{
    font-size:5.8px!important;
    line-height:8px!important;
    letter-spacing:-0.1px!important;
  }
  .compact-control-v3 .ops-mini strong{
    font-size:11px!important;
    line-height:14px!important;
  }
}

/* VMS MANAGEMENT AUDIT COMMAND CENTER V5 */
.audit-command-center{background:#f4f7fa;border:1px solid #b9c7d4}
.audit-titlebar{display:flex;justify-content:space-between;align-items:center;background:#173f70;color:#fff;padding:9px 12px}
.audit-titlebar strong{display:block;font-size:15px}.audit-titlebar small{display:block;font-size:8px;opacity:.85;margin-top:2px}
.audit-titlebar button{background:#fff;color:#173f70;border:0;border-radius:4px;padding:6px 9px;font-size:9px;font-weight:800;margin-left:5px}
.audit-company-head{text-align:center;background:#fff;padding:6px;border-bottom:1px solid #b9c7d4}.audit-company-head h1{font-size:15px;color:#173f70;margin:0}.audit-company-head div{font-size:8px}
.audit-control-strip{display:grid;grid-template-columns:1fr 1fr .8fr 1.2fr auto;gap:6px;padding:7px 9px;background:#d9e8f7}
.audit-control-strip label{font-size:8px;font-weight:800;color:#173f70}.audit-control-strip input,.audit-control-strip select{display:block;width:100%;box-sizing:border-box;border:1px solid #9fb1c1;padding:5px;font-size:9px;background:#fff}
.audit-control-strip button{align-self:end;background:#173f70;color:#fff;border:0;border-radius:3px;padding:6px 10px;font-size:9px;font-weight:800}
.audit-period-line{display:flex;justify-content:space-between;padding:6px 9px;background:#fffbdc;border-bottom:1px solid #cfc9a5;font-size:9px;color:#173f70}
.audit-health-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:5px;padding:7px 9px}
.audit-health{background:#fff;border:1px solid #c8d2dc;border-top:3px solid #173f70;border-radius:4px;padding:6px 7px;min-height:48px}.audit-health span{display:block;font-size:7px;font-weight:900}.audit-health strong{display:block;font-size:17px;line-height:20px}.audit-health small{font-size:7px;color:#6b7883}
.audit-health.critical{border-top-color:#a82020}.audit-health.critical strong{color:#a82020}.audit-health.warning{border-top-color:#d88700}.audit-health.warning strong{color:#a86100}.audit-health.attention{border-top-color:#a48900}.audit-health.clear{border-top-color:#178147}.audit-health.clear strong{color:#178147}.audit-health.impact{border-top-color:#6f42c1}.audit-health.open{border-top-color:#245f9d}
.audit-exception-section,.audit-action-section,.audit-detail-section{background:#fff;margin:0 9px 8px;border:1px solid #bdc9d4}
.audit-section-heading{display:flex;align-items:center;justify-content:space-between;background:#e8f0f8;border-bottom:1px solid #bdc9d4;padding:5px 7px}.audit-section-heading h2{font-size:10px;color:#173f70;margin:0}.audit-section-heading span,.audit-section-heading label{font-size:8px;color:#526474}
.audit-section-heading select{font-size:8px;padding:3px;margin-left:4px}
.audit-table-scroll{overflow:auto}.audit-table-scroll table{width:100%;border-collapse:collapse;font-size:8px}.audit-table-scroll th{background:#173f70;color:#fff;padding:5px 4px;border:1px solid #7890a7;white-space:nowrap}.audit-table-scroll td{padding:4px;border:1px solid #c8d1da;vertical-align:top}.audit-table-scroll tbody tr:nth-child(even){background:#fffdf0}
.audit-severity{display:inline-block;padding:2px 5px;border-radius:10px;font-size:7px;font-weight:900}.sev-critical{background:#fde5e5;color:#9d1717}.sev-warning{background:#fff0d5;color:#9b5b00}.sev-attention{background:#fff9cc;color:#756500}
.audit-action-status{font-size:7px;font-weight:900}.audit-action-status.open{color:#9b5b00}.audit-action-status.resolved{color:#178147}
.audit-source-btn,.audit-action-section button{border:0;background:#173f70;color:#fff;border-radius:3px;padding:3px 5px;font-size:7px}
.audit-action-section input,.audit-action-section select{width:100%;min-width:90px;box-sizing:border-box;font-size:7px;padding:3px;border:1px solid #b4c0cb}
.audit-all-clear{padding:18px;text-align:center;color:#178147;font-weight:900}.audit-detail-note{padding:5px;font-size:8px}
.audit-director-footer{background:#fff;margin:0 9px 9px;border:1px solid #bdc9d4;padding:6px 9px;font-size:7px;color:#566775}
.audit-signatures{display:grid;grid-template-columns:repeat(3,1fr);gap:80px;text-align:center;padding:28px 35px 3px}.audit-signatures span{display:block;border-top:1px solid #222}.audit-signatures b{font-size:8px;color:#222}
@media(max-width:1100px){.audit-health-grid{grid-template-columns:repeat(3,1fr)}.audit-control-strip{grid-template-columns:repeat(2,1fr)}}
@media print{
 body.audit-report-page .sidebar,.audit-control-strip,.audit-action-section,.audit-detail-section,.no-print{display:none!important}
 body.audit-report-page .main-content{margin:0!important;padding:0!important;width:100%!important}
 .audit-command-center{border:0!important}.audit-titlebar{padding:4px 7px!important}.audit-titlebar strong{font-size:10px!important}.audit-titlebar small{font-size:6px!important}
 .audit-company-head{padding:3px!important}.audit-company-head h1{font-size:10px!important}.audit-company-head div{font-size:6px!important}
 .audit-period-line{padding:3px 5px!important;font-size:6px!important}.audit-health-grid{grid-template-columns:repeat(6,1fr)!important;padding:4px!important;gap:3px!important}
 .audit-health{min-height:32px!important;padding:3px!important}.audit-health span,.audit-health small{font-size:5.5px!important}.audit-health strong{font-size:11px!important;line-height:13px!important}
 .audit-exception-section{margin:0 3px 3px!important}.audit-section-heading{padding:3px!important}.audit-section-heading h2{font-size:7px!important}.audit-section-heading span{font-size:5.5px!important}
 .audit-table-scroll{overflow:visible!important}.audit-table-scroll table{font-size:5.8px!important}.audit-table-scroll th,.audit-table-scroll td{padding:2px!important}
 .audit-director-footer{margin:0 3px!important;padding:3px!important;font-size:5.5px!important}.audit-signatures{padding:18px 25px 2px!important}.audit-signatures b{font-size:6px!important}
 @page{size:A4 landscape;margin:5mm}
}

/* FINAL SYSTEM CONTROL + UNIVERSAL EXCEL */
.vms-mode-badge{margin-left:auto;align-self:center;border-radius:5px;padding:5px 8px;min-width:82px;text-align:center;border:1px solid rgba(255,255,255,.35)}
.vms-mode-badge strong{display:block;font-size:8px;letter-spacing:.5px}.vms-mode-badge small{display:block;font-size:6px;margin-top:1px}
.vms-mode-badge.live{background:#136b3a;color:#fff}.vms-mode-badge.demo{background:#a65b00;color:#fff}
.excel-export-btn{background:#16823d!important;color:#fff!important;border:1px solid #0d652d!important;border-radius:5px!important;padding:6px 10px!important;font-size:9px!important;font-weight:800!important;cursor:pointer!important;margin:5px 6px 7px 0!important}
.excel-export-btn:hover{filter:brightness(.95)}
@media print{.excel-export-btn,.vms-mode-badge{display:none!important}}

/* AI NOTICE MANAGEMENT */
.notice-ai-shell{background:#f4f7fa;border:1px solid #bdc9d4}
.notice-ai-titlebar{display:flex;justify-content:space-between;align-items:center;background:#6b1d1d;color:#fff;padding:9px 12px}
.notice-ai-titlebar strong{display:block;font-size:14px}.notice-ai-titlebar small{display:block;font-size:7px;margin-top:2px;opacity:.9}
.notice-ai-titlebar button{background:#fff;color:#6b1d1d;border:0;border-radius:4px;padding:6px 9px;font-size:8px;font-weight:900;margin-left:4px}
.notice-company-head{text-align:center;background:#fff;padding:6px;border-bottom:1px solid #bdc9d4}.notice-company-head h1{font-size:14px;margin:0;color:#173f70}.notice-company-head div{font-size:8px}
.notice-ai-generator,.notice-register-section,.notice-reply-section{background:#fff;margin:8px;border:1px solid #bdc9d4}
.notice-section-title{display:flex;justify-content:space-between;align-items:center;background:#e8f0f8;border-bottom:1px solid #bdc9d4;padding:6px 8px}.notice-section-title h2{font-size:10px;margin:0;color:#173f70}.notice-section-title span{font-size:7px;font-weight:800;color:#6b1d1d}
.notice-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;padding:7px}.notice-grid label,.notice-full{font-size:8px;font-weight:800;color:#263b4d}
.notice-grid input,.notice-grid select,.notice-full textarea{display:block;width:100%;box-sizing:border-box;margin-top:2px;border:1px solid #aab9c6;padding:5px;font-size:8px;background:#fff}
.notice-full{display:block;padding:0 7px 7px}.notice-ai-actions,.notice-approval-grid{display:flex;gap:5px;align-items:end;padding:0 7px 7px}.notice-ai-actions button,.notice-approval-grid button,.notice-reply-section button{background:#173f70;color:#fff;border:0;border-radius:4px;padding:6px 9px;font-size:8px;font-weight:900}
.notice-ai-policy{margin:0 7px 7px;padding:6px;background:#fff7d6;border:1px solid #e3d385;font-size:7px;color:#5c4a00}
.notice-approval-grid{display:grid;grid-template-columns:1fr auto auto}.notice-approval-grid label{font-size:8px;font-weight:800}.notice-approval-grid select{display:block;width:100%;padding:5px;font-size:8px}
.notice-filterbar{display:flex;gap:5px;padding:6px}.notice-filterbar input{flex:1}.notice-filterbar input,.notice-filterbar select{padding:5px;border:1px solid #aab9c6;font-size:8px}.notice-filterbar button{background:#173f70;color:#fff;border:0;padding:5px 9px;font-size:8px}
.notice-register-section table button{font-size:7px;padding:3px 5px;border:0;border-radius:3px;background:#173f70;color:#fff;margin:1px}
.notice-status{display:inline-block;padding:2px 5px;border-radius:10px;font-size:7px;font-weight:900}.notice-draft{background:#e9eef4;color:#475569}.notice-issued{background:#dcecff;color:#174b82}.notice-replied{background:#fff1c7;color:#825c00}.notice-closed{background:#daf1df;color:#1b6a32}.notice-cancelled{background:#f5dada;color:#8a2222}
.notice-print-sheet{display:none}.notice-paper{background:#fff;color:#111;padding:18mm;min-height:190mm;font-family:Arial,sans-serif}.notice-paper-company{text-align:center;border-bottom:2px solid #222;padding-bottom:7px}.notice-paper-company h1{font-size:17px;margin:0}.notice-paper-company div{font-size:10px}.notice-paper-meta{display:flex;justify-content:space-between;margin:10px 0;font-size:11px}.notice-paper pre{font:12px/1.65 Arial,sans-serif;white-space:pre-wrap}.notice-paper-sign{display:grid;grid-template-columns:1fr 1fr;gap:100px;margin-top:50px;text-align:center;border-top:0}.notice-paper-sign div{border-top:1px solid #222;padding-top:4px}
@media(max-width:1100px){.notice-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media print{
 body.printing-notice .sidebar,body.printing-notice .notice-ai-titlebar,body.printing-notice .notice-company-head,body.printing-notice .notice-ai-generator,body.printing-notice .notice-register-section,body.printing-notice .notice-reply-section{display:none!important}
 body.printing-notice .main-content{margin:0!important;padding:0!important;width:100%!important}
 body.printing-notice .notice-ai-shell{border:0!important}body.printing-notice .notice-print-sheet{display:block!important}
 @page{size:A4 portrait;margin:7mm}
}

.notice-auto-note{margin:7px;padding:7px 9px;background:#eaf7ee;border:1px solid #9bc9a8;color:#205c31;font-size:8px;line-height:1.45}
.notice-auto-tag{display:inline-block;background:#d7ecff;color:#174b82;border:1px solid #9fc6e8;border-radius:8px;padding:1px 4px;font-size:6px;font-weight:900;margin-top:2px}
