body { background: #f6f7fb; }
.card { border-radius: 12px; }
th { white-space: nowrap; }
.table td, .table th { vertical-align: middle; }

/* Ensure DataTables occupy 100% width and maintain full size */
.table-responsive {
    width: 100%;
}
table.dataTable,
.datatable {
    width: 100% !important;
    margin-bottom: 0 !important;
}
.dataTables_wrapper {
    width: 100%;
}

/* Top Navbar Navigation Highlight */
.navbar-dark .navbar-nav .nav-link {
    padding: 0.4rem 0.85rem;
    margin: 0 0.15rem;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.navbar-dark .navbar-nav .nav-link:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.navbar-dark .navbar-nav .nav-link.active {
    color: #ffffff !important;
    font-weight: 600;
    background-color: #0d6efd;
    box-shadow: 0 2px 4px rgba(13, 110, 253, 0.35);
}

/* Dropdown Menus inside Dark Navbar */
.navbar-dark .dropdown-menu {
    border-radius: 8px;
    padding: 0.35rem;
    min-width: 175px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.navbar-dark .dropdown-item,
.navbar-dark .dropdown-menu .nav-link {
    border-radius: 6px;
    font-weight: 500;
    padding: 0.45rem 1rem;
    color: rgba(255, 255, 255, 0.85);
    transition: all 0.15s ease-in-out;
    margin: 0;
    display: block;
    width: 100%;
    text-decoration: none;
}

.navbar-dark .dropdown-item:hover,
.navbar-dark .dropdown-item:focus,
.navbar-dark .dropdown-menu .nav-link:hover,
.navbar-dark .dropdown-menu .nav-link:focus {
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.navbar-dark .dropdown-item.active,
.navbar-dark .dropdown-menu .nav-link.active {
    background-color: #0d6efd !important;
    color: #ffffff !important;
    font-weight: 600;
}

/* Header Top Row Sizing & Alignment */
.header-welcome {
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff !important;
}

.header-btn {
    font-size: 0.825rem;
    font-weight: 500;
    padding: 0.2rem 0.55rem;
    border-radius: 5px;
    line-height: 1.4;
}

.header-user-badge {
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.25rem 0.55rem;
    border-radius: 5px;
}

.navbar-dark .admin-dropdown-menu,
.navbar-dark .user-dropdown-menu {
    min-width: 175px;
    padding: 0.35rem;
}

.navbar-dark .admin-dropdown-menu .dropdown-item,
.navbar-dark .user-dropdown-menu .dropdown-item {
    font-size: 0.85rem;
    padding: 0.42rem 0.8rem;
    border-radius: 6px;
}

/* Submenu inside Admin/User Dropdown */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu > .dropdown-toggle::after {
    display: inline-block;
    margin-left: auto;
    vertical-align: middle;
    content: "";
    border-top: 0.3em solid transparent;
    border-right: 0.32em solid;
    border-bottom: 0.3em solid transparent;
    border-left: 0;
    transition: transform 0.15s ease-in-out;
}

/* For dropstart (submenus opening to the left of the header user menu) */
.dropdown-submenu.dropstart > .dropdown-menu {
    top: 0;
    right: 100%;
    left: auto;
    margin-top: -4px;
    margin-right: 0; /* No physical gap between parent and child menu */
    min-width: 195px;
    padding: 0.35rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45) !important;
    z-index: 1060;
}

/* Invisible bridge extending to the right and vertically so mouse never drops hover when moving across */
.dropdown-submenu.dropstart > .dropdown-menu::before {
    content: "";
    position: absolute;
    top: -12px;
    bottom: -12px;
    right: -25px;
    width: 30px;
    background: transparent;
    pointer-events: auto;
}

@media (hover: hover) and (pointer: fine) {
    .dropdown-submenu:hover > .dropdown-menu {
        display: block;
    }
    .dropdown-submenu:hover > .dropdown-toggle::after {
        transform: translateX(-2px);
    }
}

.dropdown-submenu > .dropdown-menu.show {
    display: block !important;
}


/* DataTable Search Bar Styling (DataTables 1 & 2) */
.dt-search,
.dataTables_filter {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 0.6rem !important;
    margin-bottom: 0.75rem !important;
}

.dt-search label,
.dataTables_filter label {
    font-weight: 700 !important;
    font-size: 1.05rem !important;
    color: #212529 !important;
    margin-bottom: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
}

.dt-search input:not([type="checkbox"]):not([type="radio"]),
.dt-search input.dt-input,
.dt-search .form-control:not([type="checkbox"]):not([type="radio"]),
.dataTables_filter input:not([type="checkbox"]):not([type="radio"]) {
    min-width: 280px !important;
    height: 42px !important;
    padding: 0.45rem 1rem !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    border: 2px solid #0d6efd !important;
    border-radius: 8px !important;
    background-color: #ffffff !important;
    color: #212529 !important;
    box-shadow: 0 2px 6px rgba(13, 110, 253, 0.15) !important;
    outline: none !important;
    transition: all 0.2s ease-in-out !important;
}

.dt-search input:not([type="checkbox"]):not([type="radio"]):focus,
.dt-search input.dt-input:focus,
.dt-search .form-control:not([type="checkbox"]):not([type="radio"]):focus,
.dataTables_filter input:not([type="checkbox"]):not([type="radio"]):focus {
    border-color: #0a58ca !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.3) !important;
    background-color: #ffffff !important;
}

/* Explicit Checkbox Styling inside DataTables controls */
#tableShiftControl .form-check-input,
.dt-search input[type="checkbox"],
.dataTables_filter input[type="checkbox"] {
    min-width: 1.15rem !important;
    max-width: 1.15rem !important;
    width: 1.15rem !important;
    height: 1.15rem !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 1.5px solid #6c757d !important;
    border-radius: 4px !important;
    background-color: #ffffff !important;
    box-shadow: none !important;
    cursor: pointer !important;
    display: inline-block !important;
    vertical-align: middle !important;
    flex-shrink: 0 !important;
}

#tableShiftControl .form-check-input:checked,
.dt-search input[type="checkbox"]:checked,
.dataTables_filter input[type="checkbox"]:checked {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
}

/* Prominent Shift Mode Tabs Highlighting */
#shiftModeTabs .nav-link {
    border-radius: 8px !important;
    transition: all 0.2s ease-in-out !important;
    font-size: 1.05rem !important;
    letter-spacing: 0.3px;
}

#shiftModeTabs .nav-link.active {
    background-color: #0d6efd !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.4) !important;
    border: 2px solid #0d6efd !important;
}

#shiftModeTabs .nav-link:not(.active) {
    background-color: #ffffff !important;
    color: #495057 !important;
    border: 2px solid #dee2e6 !important;
}

#shiftModeTabs .nav-link:not(.active):hover {
    background-color: #e7f1ff !important;
    color: #0d6efd !important;
    border-color: #86b7fe !important;
}

/* Gentle light yellow styling for parts carried from previous shift */
.table tbody tr.carried-over-row,
.table tbody tr.carried-over-row > td,
.table-striped > tbody > tr.carried-over-row:nth-of-type(odd) > *,
.table-striped > tbody > tr.carried-over-row:nth-of-type(even) > * {
    --bs-table-bg: #fef9c3 !important;
    --bs-table-striped-bg: #fef08a !important;
    --bs-table-accent-bg: #fef9c3 !important;
    background-color: #fef9c3 !important;
    box-shadow: inset 0 0 0 9999px #fef9c3 !important;
    color: #713f12 !important;
}
.table tbody tr.carried-over-row {
    border-left: 4px solid #eab308 !important;
}
.table tbody tr.carried-over-row:hover > td {
    --bs-table-bg: #fef08a !important;
    box-shadow: inset 0 0 0 9999px #fef08a !important;
}

/* Distinct light purple/lavender styling for parts with Low Priority */
.table tbody tr.carried-over-low-priority-row,
.table tbody tr.carried-over-low-priority-row > td,
.table tbody tr.low-priority-row,
.table tbody tr.low-priority-row > td,
.table-striped > tbody > tr.carried-over-low-priority-row:nth-of-type(odd) > *,
.table-striped > tbody > tr.carried-over-low-priority-row:nth-of-type(even) > *,
.table-striped > tbody > tr.low-priority-row:nth-of-type(odd) > *,
.table-striped > tbody > tr.low-priority-row:nth-of-type(even) > * {
    --bs-table-bg: #f3e8ff !important;
    --bs-table-striped-bg: #ede9fe !important;
    --bs-table-accent-bg: #f3e8ff !important;
    background-color: #f3e8ff !important;
    box-shadow: inset 0 0 0 9999px #f3e8ff !important;
    color: #581c87 !important;
}
.table tbody tr.carried-over-low-priority-row,
.table tbody tr.low-priority-row {
    border-left: 4px solid #9333ea !important;
}
.table tbody tr.carried-over-low-priority-row:hover > td,
.table tbody tr.low-priority-row:hover > td {
    --bs-table-bg: #e9d5ff !important;
    box-shadow: inset 0 0 0 9999px #e9d5ff !important;
}

/* Distinct genuine warm orange styling for previous shift pending parts received again */
.table tbody tr.repeat-pending-row,
.table tbody tr.repeat-pending-row > td,
.table-striped > tbody > tr.repeat-pending-row:nth-of-type(odd) > *,
.table-striped > tbody > tr.repeat-pending-row:nth-of-type(even) > * {
    --bs-table-bg: #ffedd5 !important;
    --bs-table-striped-bg: #fed7aa !important;
    --bs-table-accent-bg: #ffedd5 !important;
    background-color: #ffedd5 !important;
    box-shadow: inset 0 0 0 9999px #ffedd5 !important;
    color: #431407 !important;
}
.table tbody tr.repeat-pending-row {
    border-left: 4px solid #ea580c !important;
}
.table tbody tr.repeat-pending-row:hover > td {
    --bs-table-bg: #fed7aa !important;
    box-shadow: inset 0 0 0 9999px #fed7aa !important;
}

/* Clean 2x2 Grid for Action column */
.action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    min-width: 210px;
}

.action-grid .btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.73rem;
    font-weight: 600;
    padding: 3px 6px;
    height: 28px;
    border-radius: 5px;
    white-space: nowrap;
    text-decoration: none;
    transition: all 0.15s ease-in-out;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.action-grid .btn-action i {
    font-size: 0.8rem;
    margin-right: 4px;
}

/* 1. Outward Button: Vibrant amber */
.btn-action-outward {
    background-color: #f59e0b;
    border: 1px solid #d97706;
    color: #1e293b;
}
.btn-action-outward:hover {
    background-color: #d97706;
    border-color: #b45309;
    color: #ffffff;
}

/* 2. Waiting for Inspection Button */
.btn-action-waiting {
    background-color: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #475569;
}
.btn-action-waiting:hover {
    background-color: #e2e8f0;
    border-color: #94a3b8;
    color: #0f172a;
}
.btn-action-reason-set {
    background-color: #fef2f2;
    border: 1px solid #fca5a5;
    color: #dc2626;
}
.btn-action-reason-set:hover {
    background-color: #fee2e2;
    border-color: #ef4444;
    color: #b91c1c;
}

/* 3. Modify Button: Clean outline blue */
.btn-action-modify {
    background-color: #f0f9ff;
    border: 1px solid #bae6fd;
    color: #0284c7;
}
.btn-action-modify:hover {
    background-color: #0284c7;
    border-color: #0284c7;
    color: #ffffff;
}

/* 4. Delete Button: Clean outline red */
.btn-action-delete {
    background-color: #fff1f2;
    border: 1px solid #fecdd3;
    color: #e11d48;
}
.btn-action-delete:hover {
    background-color: #e11d48;
    border-color: #e11d48;
    color: #ffffff;
}

/* Collapsible Sidebar Styles matching Image 2 & 3 */
:root {
    --sidebar-collapsed-width: 64px;
    --sidebar-expanded-width: 265px;
    --sidebar-bg: #1e293b;
    --sidebar-hover-bg: #334155;
    --sidebar-active-bg: #2563eb;
    --sidebar-text: #94a3b8;
}

body.has-sidebar {
    overflow-x: hidden;
}

.app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-collapsed-width);
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    z-index: 1040;
    display: flex;
    flex-direction: column;
    transition: width 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    overflow-x: hidden;
    overflow-y: auto;
}

.app-sidebar.expanded {
    width: var(--sidebar-expanded-width);
}

.app-main {
    margin-left: var(--sidebar-collapsed-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: #f8fafc;
}

.app-sidebar.expanded ~ .app-main {
    margin-left: var(--sidebar-expanded-width);
}

.app-sidebar .sidebar-header {
    height: 62px;
    padding: 0.75rem 0.85rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.app-sidebar.collapsed .sidebar-header {
    justify-content: center;
    padding: 0.75rem 0;
}

.app-sidebar.expanded .sidebar-header {
    justify-content: space-between;
}

.app-sidebar .sidebar-brand {
    display: none;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
}

.app-sidebar.expanded .sidebar-brand {
    display: flex;
}

.badge-cm {
    width: 32px;
    height: 32px;
    background-color: #2563eb;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.82rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.brand-title {
    color: #ffffff;
    font-weight: 700;
    font-size: 1.05rem;
    white-space: nowrap;
}

.sidebar-toggle-btn {
    width: 38px;
    height: 38px;
    background-color: rgba(255, 255, 255, 0.08);
    border: none;
    border-radius: 8px;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    padding: 0;
    flex-shrink: 0;
}

.sidebar-toggle-btn:hover {
    background-color: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

.sidebar-nav {
    padding: 0.85rem 0;
    margin: 0;
    list-style: none;
    flex-grow: 1;
}

.sidebar-nav .nav-item {
    margin: 0.25rem 0.5rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    border-radius: 10px;
    color: var(--sidebar-text);
    transition: all 0.15s ease-in-out;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    width: 100%;
    border: none;
    background: transparent;
}

.app-sidebar.collapsed .sidebar-link {
    justify-content: center;
    padding: 0.5rem 0;
    height: 46px;
}

.app-sidebar.expanded .sidebar-link {
    padding: 0.65rem 0.85rem;
    gap: 0.75rem;
}

.sidebar-link:hover {
    background-color: var(--sidebar-hover-bg);
    color: #ffffff;
}

.sidebar-link.active {
    background-color: #2563eb !important;
    color: #ffffff !important;
}

.sidebar-link .nav-icon-box {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    flex-shrink: 0;
}

.app-sidebar.collapsed .sidebar-link.active .nav-icon-box {
    background-color: #2563eb;
    color: #ffffff;
}

.sidebar-link .nav-label,
.sidebar-link .nav-arrow {
    display: none;
    white-space: nowrap;
}

.app-sidebar.expanded .sidebar-link .nav-label {
    display: inline-block;
    flex-grow: 1;
    font-size: 0.88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-sidebar.expanded .sidebar-link .nav-arrow {
    display: inline-block;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
}

.sidebar-submenu {
    list-style: none;
    padding: 0.25rem 0 0.25rem 2.85rem;
    margin: 0;
}

#masterSubmenu {
    display: none;
}

#masterSubmenu.show,
.app-sidebar.expanded #masterSubmenu.show {
    display: block !important;
}

.app-sidebar.collapsed #masterSubmenu {
    display: none !important;
}

.sidebar-dropdown-toggle .nav-arrow {
    transition: transform 0.2s ease-in-out;
}

.sidebar-dropdown-toggle[aria-expanded="true"] .nav-arrow,
#masterSubmenu.show ~ .sidebar-link .nav-arrow {
    transform: rotate(90deg);
}

.sidebar-submenu a {
    display: block;
    padding: 0.4rem 0.5rem;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 0.88rem;
    border-radius: 6px;
    transition: all 0.15s;
}

.sidebar-submenu a:hover,
.sidebar-submenu a.active {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.08);
}

.sidebar-footer {
    padding: 1rem 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.app-sidebar.collapsed .sidebar-footer {
    text-align: center;
    padding: 0.75rem 0;
}

.app-sidebar.collapsed .sidebar-user-text {
    display: none;
}

.app-sidebar.expanded .sidebar-user-text {
    display: block;
}

/* ==========================================================================
   CMM Executive Inspection Dashboard (Matching Target Mockup)
   ========================================================================== */

/* Top Dashboard Header Banner */
.cmm-dash-header {
    background: linear-gradient(135deg, #091e3a 0%, #0d274c 50%, #081930 100%);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(10, 30, 60, 0.12);
    margin-bottom: 1.25rem;
}

.cmm-dash-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.cmm-brand-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #ffffff;
}

.cmm-logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #0284c7 0%, #06b6d4 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.35);
}

.cmm-brand-text {
    line-height: 1.1;
}

.cmm-brand-title {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.2px;
    color: #ffffff;
}

.cmm-brand-subtitle {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.8px;
    color: #38bdf8;
    text-transform: uppercase;
}

.cmm-header-divider {
    width: 1px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 6px;
}

.cmm-dash-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.3px;
    line-height: 1.2;
    margin: 0;
}

.cmm-dash-subnav {
    font-size: 0.76rem;
    color: #94a3b8;
    margin-top: 3px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.cmm-dash-subnav .subnav-item {
    color: #94a3b8;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s ease;
}

.cmm-dash-subnav .subnav-item:hover {
    color: #38bdf8;
}

.cmm-dash-subnav .subnav-sep {
    color: #475569;
    font-size: 0.7rem;
}

/* Header Filters (Date & Shift Controls) */
.cmm-header-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.cmm-filter-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    padding: 6px 12px;
    color: #ffffff;
    min-height: 42px;
}

.cmm-filter-icon {
    color: #38bdf8;
    flex-shrink: 0;
}

.cmm-filter-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.15;
}

.cmm-filter-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    color: #94a3b8;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.cmm-filter-control {
    background: transparent;
    border: none;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.85rem;
    outline: none;
    padding: 0;
    cursor: pointer;
}

.cmm-filter-control::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

.cmm-filter-control option {
    background: #0f172a;
    color: #ffffff;
}

/* Top 4 KPI Cards */
.cmm-kpi-card {
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    height: 100%;
}

.cmm-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.cmm-kpi-card.kpi-blue {
    border-color: #dbeafe;
    background: linear-gradient(135deg, #ffffff 0%, #f0f7ff 100%);
}

.cmm-kpi-card.kpi-green {
    border-color: #dcfce7;
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
}

.cmm-kpi-card.kpi-red {
    border-color: #fee2e2;
    background: linear-gradient(135deg, #ffffff 0%, #fef2f2 100%);
}

.cmm-kpi-card.kpi-purple {
    border-color: #f3e8ff;
    background: linear-gradient(135deg, #ffffff 0%, #faf5ff 100%);
}

.kpi-icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}

.kpi-icon-blue {
    background-color: #2563eb;
    color: #ffffff;
}

.kpi-icon-green {
    background-color: #16a34a;
    color: #ffffff;
}

.kpi-icon-red {
    background-color: #ef4444;
    color: #ffffff;
}

.kpi-icon-purple {
    background-color: #7c3aed;
    color: #ffffff;
}

.kpi-meta {
    flex-grow: 1;
}

.kpi-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 2px;
}

.kpi-value {
    font-size: 2.1rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.text-kpi-blue {
    color: #1e3a8a;
}

.text-kpi-green {
    color: #14532d;
}

.text-kpi-red {
    color: #991b1b;
}

.text-kpi-purple {
    color: #581c87;
}

/* Panel Cards */
.cmm-card {
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.cmm-card-header {
    padding: 14px 18px;
    border-bottom: 1px solid #f1f5f9;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cmm-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.cmm-card-body {
    padding: 16px;
    flex-grow: 1;
}

/* Grouped Bar Chart Legend */
.bar-chart-legend {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #475569;
}

.legend-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.legend-swatch {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    display: inline-block;
}

/* Part Wise Pending Table */
.cmm-table-pending {
    width: 100%;
    margin-bottom: 0;
}

.cmm-table-pending thead th {
    background-color: #f8fafc;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    font-weight: 700;
    padding: 10px 14px;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 1;
}

.cmm-table-pending tbody td {
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.85rem;
    vertical-align: middle;
}

.cmm-table-pending tbody tr:hover {
    background-color: #f8fafc;
}

.cmm-table-pending .part-no {
    font-weight: 600;
    color: #475569;
}

.cmm-table-pending .part-name {
    font-weight: 600;
    color: #0f172a;
}

.cmm-table-pending .pending-qty {
    font-weight: 700;
    color: #dc2626;
    text-align: right;
}

/* Overall Pending Slices Legend */
.pending-breakdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px dashed #f1f5f9;
    font-size: 0.8rem;
}

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

.pending-item-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.pending-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.pending-label {
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pending-item-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.pending-count {
    font-weight: 700;
    color: #0f172a;
}

.pending-pct {
    font-size: 0.72rem;
    color: #64748b;
    min-width: 38px;
    text-align: right;
}

/* Sender Info Tabview Button in front of Search box */
.sender-tab-btn {
    background: #eff6ff !important;
    border: 1.5px solid #3b82f6 !important;
    color: #1d4ed8 !important;
    border-radius: 6px !important;
    padding: 5px 12px !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.15s ease-in-out !important;
    cursor: pointer !important;
    white-space: nowrap !important;
}

.sender-tab-btn:hover {
    background: #2563eb !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3) !important;
}

.sender-tab-btn:active,
.sender-tab-btn:focus {
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25) !important;
}



