/* ==========================================================================
Indemnifier Insurance Broker - Catch Technology Theme & Refined Styling
   ========================================================================== */

:root {
    /* Brand & Background Palette - Indemnifier Logo Palette */
    --erp-sidebar-bg: #ffffff;
    --erp-sidebar-hover: #f5f2fa;
    --erp-sidebar-active: #43368e;
    --erp-sidebar-text: #374151;
    --erp-sidebar-active-text: #ffffff;

    --erp-bg-main: #f8f7fc;
    --erp-card-bg: #ffffff;
    --erp-border-color: #e5e0f2;
    --erp-text-main: #1f2937;
    --erp-text-muted: #6b7280;

    /* Functional Colors */
    --erp-blue: #43368e;
    --erp-brand: #43368e;
    --erp-brand-dark: #18113c;
    --erp-accent: #f07f3c;
    --erp-green: #16a34a;
    --erp-purple: #43368e;
    --erp-red: #dc2626;
    --erp-orange: #f07f3c;
    --erp-amber: #d97706;

    /* Radius & Shadows */
    --erp-radius: 10px;
    --erp-radius-lg: 14px;
    --erp-shadow: 0 2px 8px rgba(67, 54, 142, 0.05);
    --erp-shadow-hover: 0 8px 24px rgba(67, 54, 142, 0.12);
}

/* Compact 80% scale: every rem-based size (fonts, cards, paddings) shrinks to 80%
   while the layout still fills 100% of the viewport (no CSS zoom used). */
html {
    font-size: 80%;
}

body {
    font-family: "Roboto", sans-serif;
    background-color: var(--erp-bg-main);
    color: var(--erp-text-main);
    font-size: 0.8125rem;
    /* 13px baseline for compact ERP interface */
    line-height: 1.45;
    overflow: hidden;
    height: 100vh;
}

/* Headings Typography */
h1,
.h1 {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.2px;
}

h2,
.h2 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.2px;
}

h3,
.h3 {
    font-size: 1.15rem;
    font-weight: 700;
}

h4,
.h4 {
    font-size: 1.05rem;
    font-weight: 700;
}

h5,
.h5 {
    color: #669afc;
    font-size: 0.925rem;
    font-weight: 600;
}

h6,
.h6 {
    font-size: 0.825rem;
    font-weight: 600;
}

/* Font Size Utility Scale */
.fs-7 {
    font-size: 0.775rem !important;
}

.fs-8 {
    font-size: 0.7rem !important;
}

.fs-9 {
    font-size: 0.65rem !important;
}

/* Font Weight Utilities */
.TC-bold {
    font-weight: 700 !important;
}

.TC-semibold {
    font-weight: 600 !important;
}

.TC-medium {
    font-weight: 500 !important;
}

.TC-normal {
    font-weight: 400 !important;
}

/* Form Controls Sizing & Polish */
.form-control,
.form-select {
    font-size: 0.8125rem;
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    border-color: #cbd5e1;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--erp-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.form-control-sm,
.form-select-sm {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 5px;
}

.form-label {
    font-size: 0.775rem;
    margin-bottom: 0.25rem;
}

/* Button Sizing & Radius */
.btn {
    font-size: 0.8125rem;
    padding: 0.35rem 0.85rem;
    border-radius: 6px;
    transition: all 0.15s ease-in-out;
}

.btn-sm {
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
}

/* ==========================================================================
   Sidebar Navigation
   ========================================================================== */

#wrapper {
    display: flex;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

#sidebar-wrapper {
    width: 12.8125rem;
    min-width: 12.8125rem;
    max-width: 12.8125rem;
    height: 100vh;
    overflow-y: auto;
    background-color: var(--erp-sidebar-bg);
    color: #669afc;
    transition: margin-left 0.25s ease-in-out;
    display: flex;
    flex-direction: column;
    z-index: 1050;
}
.sidebar-brand-header {
    height: 62px;
    min-height: 62px;
    max-height: 62px;
    padding: 8px 16px;
    border-bottom: 1px solid rgba(100, 116, 139, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.sidebar-brand-header .sidebar-brand-icon {
    flex: 1;
    min-width: 0;
    width: auto;
    height: auto;
    background: transparent;
    border-radius: 0;
}

.sidebar-logo {
    display: block;
    width: auto;
    max-width: 140px;
    height: 28px;
    max-height: 28px;
    margin: 0 auto;
    object-fit: contain;
}

.auth-logo {
    display: block;
    width: 100%;
    max-width: 280px;
    height: auto;
    margin-left: auto;
    margin-right: auto;
}

.sidebar-nav-container {
    flex: 1;
    padding: 0.35rem 0.45rem;
    overflow-y: auto;
}

.sidebar-nav-section-title {
    padding: 0.4rem 0.65rem 0.15rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #475569;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    padding: 0.32rem 0.55rem;
    color: var(--erp-sidebar-text);
    font-size: 0.77rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 6px;
    margin-bottom: 0.1rem;
    transition: all 0.15s ease-in-out;
}

.sidebar-nav-item i {
    width: 1.15rem;
    font-size: 0.85rem;
    margin-right: 0.45rem;
    color: #64748b;
    transition: color 0.15s ease;
}

.sidebar-nav-item:hover {
    color: #ffffff;
    background-color: var(--erp-sidebar-hover);
}

.sidebar-nav-item:hover i {
    color: #38bdf8;
}

.sidebar-nav-item.active {
    color: #ffffff;
    background-color: var(--erp-sidebar-active);
    font-weight: 600;
}

.sidebar-nav-item.active i {
    color: #38bdf8;
}

/* Sidebar Dropdown & Submenu */
.sidebar-dropdown {
    margin-bottom: 0.2rem;
}

.sidebar-nav-item .sidebar-chevron {
    transition: transform 0.2s ease-in-out;
    width: auto;
    font-size: 0.7rem;
    color: #64748b;
    margin-right: 0;
}

.sidebar-nav-item[aria-expanded="true"] .sidebar-chevron {
    transform: rotate(180deg);
    color: #38bdf8;
}

.sidebar-submenu {
    padding-left: 0.75rem;
    margin-top: 0.05rem;
    margin-bottom: 0.2rem;
    margin-left: 1.1rem;
    border-left: 1.5px solid rgba(255, 255, 255, 0.08);
}

.sidebar-subnav-item {
    display: flex;
    align-items: center;
    padding: 0.3rem 0.6rem;
    color: var(--erp-sidebar-text);
    font-size: 0.775rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 5px;
    margin-bottom: 0.05rem;
    transition: all 0.15s ease-in-out;
}

.sidebar-subnav-item i {
    width: 1.15rem;
    font-size: 0.8rem;
    margin-right: 0.4rem;
    color: #64748b;
    transition: color 0.15s ease;
}

.sidebar-subnav-item:hover {
    color: #ffffff;
    background-color: var(--erp-sidebar-hover);
}

.sidebar-subnav-item:hover i {
    color: #38bdf8;
}

.sidebar-subnav-item.active {
    color: #38bdf8;
    background-color: rgba(56, 189, 248, 0.12);
    font-weight: 600;
}

.sidebar-subnav-item.active i {
    color: #38bdf8;
}

.sidebar-footer {
    padding: 0.85rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.7rem;
    color: #475569;
}

/* Translucent Backdrop Layer */
#sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    z-index: 1040;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

@media (min-width: 992px) {
    #wrapper.toggled #sidebar-wrapper {
        margin-left: -12.8125rem;
    }

    #sidebar-backdrop {
        display: none !important;
    }
}

@media (max-width: 991.98px) {
    #sidebar-wrapper {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        height: 100vh;
        margin-left: -13.4375rem;
        box-shadow: 4px 0 25px rgba(0, 0, 0, 0.4);
    }

    #wrapper.toggled #sidebar-wrapper {
        margin-left: 0;
    }

    #wrapper.toggled #sidebar-backdrop {
        opacity: 1;
        visibility: visible;
    }

    #page-content-wrapper {
        width: 100% !important;
        min-width: 100% !important;
        flex: 1 1 100% !important;
    }
}

/* ==========================================================================
   Page Content & Navbar
   ========================================================================== */

#page-content-wrapper {
    flex: 1;
    min-width: 0;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    background-color: var(--erp-bg-main);
    width: 100%;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    border: 1px solid var(--erp-border-color);
}


/* Compact Topbar Elements */
.erp-topbar .header-brand-title {
    color: #ffffff !important;
    font-weight: 700;
    letter-spacing: -0.01em;
    font-size: 0.88rem;
    line-height: 1.15;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.erp-topbar .header-legal-badge {
    background: rgba(240, 127, 60, 0.28) !important;
    border: 1px solid rgba(240, 127, 60, 0.55) !important;
    color: #ffb885 !important;
    font-size: 0.62rem !important;
    letter-spacing: 0.3px;
    font-weight: 700;
    padding: 0.08rem 0.4rem !important;
    line-height: 1.2;
}

.erp-topbar .header-scope-label {
    color: rgba(255, 255, 255, 0.72) !important;
    font-size: 0.7rem !important;
    font-weight: 500;
}

.erp-topbar .header-time-pill {
    color: rgba(255, 255, 255, 0.85) !important;
    font-size: 0.76rem !important;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.2rem 0.65rem !important;
    border-radius: 9999px;
    backdrop-filter: blur(8px);
    line-height: 1.2;
}

.erp-topbar #sidebar-toggle {
    height: 32px;
    width: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.erp-topbar #headerNotificationBtn {
    height: 32px;
    width: 32px;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.erp-topbar .user-profile-btn {
    height: 32px;
    padding: 0.15rem 0.6rem !important;
    display: inline-flex;
    align-items: center;
}

.erp-topbar {
    background-color: #ffffff;
    border-bottom: 1px solid var(--erp-border-color);
    padding: 0.6rem 1.25rem;
}

/* Custom Nav Tabs */
.custom-tabs {
    border-bottom: 2px solid #e2e8f0;
}

.nav-item-tab {
    background: transparent;
    border: none;
    padding: 0.6rem 1.25rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #64748b;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
}

.nav-item-tab:hover {
    color: var(--erp-blue);
}

.nav-item-tab.active {
    color: var(--erp-blue);
    border-bottom-color: var(--erp-blue);
    background-color: #f1f5f9;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

/* KPI Cards */
.demo-kpi-card {
    background: #ffffff;
    border-radius: var(--erp-radius);
    padding: 1rem 1.1rem;
    border: 1px solid var(--erp-border-color);
    box-shadow: var(--erp-shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.demo-kpi-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--erp-text-muted);
    margin-bottom: 0.25rem;
}

.demo-kpi-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--erp-text-main);
    line-height: 1.1;
}

.demo-kpi-icon-wrapper {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #ffffff;
    flex-shrink: 0;
}

.icon-blue {
    background-color: var(--erp-blue);
}

.icon-green {
    background-color: var(--erp-green);
}

.icon-purple {
    background-color: var(--erp-purple);
}

.icon-red {
    background-color: var(--erp-red);
}

.icon-orange {
    background-color: var(--erp-orange);
}

/* Quick Action Cards */
.quick-action-card {
    border-radius: var(--erp-radius);
    padding: 1rem 0.6rem;
    text-align: center;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    border: none;
    font-weight: 600;
    font-size: 0.8rem;
}

.quick-action-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--erp-shadow-hover);
}

.qa-blue {
    background-color: #eff6ff;
    color: #2563eb;
}

.qa-green {
    background-color: #f0fdf4;
    color: #16a34a;
}

.qa-purple {
    background-color: #faf5ff;
    color: #9333ea;
}

.qa-orange {
    background-color: #fff7ed;
    color: #ea580c;
}

.card-erp,
.card-demo {
    background-color: #ffffff;
    border-radius: var(--erp-radius);
    border: 1px solid var(--erp-border-color);
    box-shadow: var(--erp-shadow);
    margin-bottom: 1rem;
}

/* Costing & Valuation Metric Card */
.costing-card-ui {
    background: linear-gradient(135deg, #0e1628 0%, #1e293b 100%) !important;
    border-radius: var(--erp-radius);
    padding: 1.25rem 1.5rem;
    border: 1px solid #334155;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.25);
    color: #ffffff !important;
}

.costing-card-ui .border-secondary {
    border-color: rgba(255, 255, 255, 0.15) !important;
}

.costing-card-ui .text-muted {
    color: #94a3b8 !important;
}

.card-erp .card-header,
.card-demo .card-header-demo {
    padding: 0.75rem 1rem;
    background-color: #f8fafc;
    border-bottom: 1px solid var(--erp-border-color);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--erp-text-main);
}

.table-erp,
.table-demo {
    width: 100%;
    margin-bottom: 0;
    vertical-align: middle;
}

.table-erp th,
.table-demo th {
    background-color: #f8fafc;
    color: var(--erp-text-muted);
    font-size: 0.725rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.6rem 0.85rem;
    border-bottom: 1px solid var(--erp-border-color);
    white-space: nowrap;
}

.table-erp td,
.table-demo td {
    padding: 0.6rem 0.85rem;
    border-bottom: 1px solid var(--erp-border-color);
    font-size: 0.8125rem;
}

/* Badges */
.badge-erp-success {
    background-color: #dcfce7;
    color: #15803d;
}

.badge-erp-warning {
    background-color: #fef3c7;
    color: #b45309;
}

.badge-erp-danger {
    background-color: #fee2e2;
    color: #b91c1c;
}

.badge-erp-info {
    background-color: #e0f2fe;
    color: #0369a1;
}

.badge-erp-secondary {
    background-color: #f1f5f9;
    color: #475569;
}

.badge-demo {
    padding: 0.3em 0.65em;
    font-size: 0.725rem;
    font-weight: 600;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.badge-demo-success {
    background-color: #dcfce7;
    color: #15803d;
}

.badge-demo-warning {
    background-color: #fef3c7;
    color: #b45309;
}

.badge-demo-danger {
    background-color: #fee2e2;
    color: #b91c1c;
}

.badge-demo-info {
    background-color: #e0f2fe;
    color: #0369a1;
}

.badge-demo-secondary {
    background-color: #f1f5f9;
    color: #475569;
}

/* Filter Pill Buttons */
.btn-pill {
    border-radius: 16px;
    font-size: 0.775rem;
    font-weight: 500;
    padding: 0.3rem 0.75rem;
}

/* ===================================================================
   SCROLLBAR STYLING (Ultra-Thin, Arrow-Free, Hover-Only Display)
   =================================================================== */

/* 1. WebKit / Blink (Chrome, Edge, Safari, Opera) */

/* Scrollbar dimensions: Ultra-thin */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

/* Eliminate ALL stepper buttons & up/down/left/right arrows */
::-webkit-scrollbar-button,
*::-webkit-scrollbar-button,
::-webkit-scrollbar-button:single-button,
::-webkit-scrollbar-button:vertical:decrement,
::-webkit-scrollbar-button:vertical:increment,
::-webkit-scrollbar-button:horizontal:decrement,
::-webkit-scrollbar-button:horizontal:increment {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
}

::-webkit-scrollbar-track {
    background: transparent !important;
}

/* By default, hide the thumb (completely transparent) */
::-webkit-scrollbar-thumb {
    background-color: transparent;
    border-radius: 9999px;
    transition: background-color 0.25s ease-in-out;
}

/* Show scrollbar thumb ONLY when container is hovered */
*:hover::-webkit-scrollbar-thumb {
    background-color: rgba(203, 213, 225, 0.7);
}

/* Direct thumb hover/drag state */
::-webkit-scrollbar-thumb:hover {
    background-color: #94a3b8 !important;
}

::-webkit-scrollbar-corner {
    background: transparent !important;
}

/* Sidebar Specific (Ultra-Thin 4px Dark Theme, Hover-Only) */
#sidebar-wrapper::-webkit-scrollbar,
.sidebar-nav-container::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

#sidebar-wrapper::-webkit-scrollbar-track,
.sidebar-nav-container::-webkit-scrollbar-track {
    background: transparent !important;
}

#sidebar-wrapper::-webkit-scrollbar-thumb,
.sidebar-nav-container::-webkit-scrollbar-thumb {
    background-color: transparent;
    border-radius: 9999px;
    transition: background-color 0.25s ease-in-out;
}

/* Show sidebar scrollbar only when hovering over the sidebar */
#sidebar-wrapper:hover::-webkit-scrollbar-thumb,
.sidebar-nav-container:hover::-webkit-scrollbar-thumb {
    background-color: rgba(51, 65, 85, 0.85);
}

#sidebar-wrapper::-webkit-scrollbar-thumb:hover,
.sidebar-nav-container::-webkit-scrollbar-thumb:hover {
    background-color: #515a5e !important;
}

/* Main Content Wrapper Specific */
#page-content-wrapper::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

#page-content-wrapper::-webkit-scrollbar-track {
    background: transparent !important;
}

#page-content-wrapper::-webkit-scrollbar-thumb {
    background-color: transparent;
    border-radius: 9999px;
    transition: background-color 0.25s ease-in-out;
}

/* Show content scrollbar only on hover */
#page-content-wrapper:hover::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
}

#page-content-wrapper::-webkit-scrollbar-thumb:hover {
    background-color: #94a3b8 !important;
}

/* 2. Firefox & Standards-Only Fallback (Avoids activating Chromium's OS arrows) */
@supports not selector(::-webkit-scrollbar) {
    * {
        scrollbar-width: thin;
        scrollbar-color: transparent transparent;
        transition: scrollbar-color 0.25s ease-in-out;
    }

    *:hover {
        scrollbar-color: #cbd5e1 transparent;
    }

    #sidebar-wrapper,
    .sidebar-nav-container {
        scrollbar-color: transparent transparent;
    }

    #sidebar-wrapper:hover,
    .sidebar-nav-container:hover {
        scrollbar-color: #334155 transparent;
    }

    #page-content-wrapper {
        scrollbar-color: transparent transparent;
        scrollbar-gutter: stable;
    }

    #page-content-wrapper:hover {
        scrollbar-color: #cbd5e1 transparent;
    }
}

/* Chinese Text Typography */
.zh-text {
    font-family: "Roboto", sans-serif;
    color: #475569;
}

/* ===================================================================
   VOUCHER STYLING & PRINT MEDIA RULES
   =================================================================== */

.badge-cpv {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.badge-bpv {
    background-color: #ffedd5;
    color: #9a3412;
    border: 1px solid #fed7aa;
}

.badge-crv {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.badge-brv {
    background-color: #e0f2fe;
    color: #075985;
    border: 1px solid #bae6fd;
}

.badge-draft {
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.badge-posted {
    background-color: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.badge-cancelled {
    background-color: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
}

.signatory-box {
    background-color: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: var(--erp-radius, 8px);
    padding: 1rem 0.75rem;
    text-align: center;
    transition: all 0.2s ease;
}

.signatory-box:hover {
    border-color: #94a3b8;
    background-color: #f1f5f9;
}

.signatory-line {
    margin-top: 2rem;
    border-top: 1px solid #94a3b8;
    padding-top: 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #334155;
    text-transform: uppercase;
}

.signatory-role {
    font-size: 0.7rem;
    color: #64748b;
}

.voucher-total-banner {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: #ffffff;
    border-radius: var(--erp-radius, 8px);
    padding: 0.85rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.voucher-total-banner.receipt-theme {
    background: linear-gradient(135deg, #065f46 0%, #059669 100%);
}

.voucher-total-banner .total-label {
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0.9;
}

.voucher-total-banner .total-amount {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.amount-words-badge {
    font-size: 0.82rem;
    font-style: italic;
    color: #475569;
    background-color: #f8fafc;
    border-radius: 4px;
    padding: 0.45rem 0.85rem;
    border-left: 3px solid #2563eb;
}

.input-readonly-suggest {
    background-color: #f1f5f9;
    font-weight: 600;
    color: #334155;
    letter-spacing: 0.05em;
}

@media print {
    html {
        font-size: 100% !important;
    }

    body {
        background-color: #ffffff !important;
        color: #000000 !important;
    }

    #sidebar-wrapper,
    #sidebar-backdrop,
    .navbar,
    .no-print,
    .btn,
    .btn-group,
    .modal,
    .pagination {
        display: none !important;
    }

    #page-content-wrapper,
    #wrapper,
    main {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        background: transparent !important;
    }

    .voucher-print-container {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        padding: 6mm 10mm !important;
        border: none !important;
        box-shadow: none !important;
    }

    .voucher-print-table th,
    .voucher-print-table td {
        border: 1px solid #333333 !important;
        padding: 5px 8px !important;
    }

    .voucher-print-table th {
        background-color: #f0f0f0 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .voucher-signatory-grid {
        page-break-inside: avoid;
        margin-top: 30px !important;
    }

    .voucher-signatory-grid .sign-line {
        border-top: 1px solid #000000 !important;
        padding-top: 4px;
        font-weight: bold;
    }

    @page {
        size: A4 portrait;
        margin: 8mm;
    }
}
/* ==========================================================================
   Indemnifier Official Brand Theme (Indigo #43368E & Lighthouse Orange #F07F3C)
   Executive Design System: Modern Glassmorphism, Micro-Interactions & Elevation
   ========================================================================== */

:root {
    --erp-sidebar-bg: #ffffff;
    --erp-sidebar-hover: #f5f2fa;
    --erp-sidebar-active: #43368e;
    --erp-sidebar-text: #374151;
    --erp-sidebar-active-text: #ffffff;
    --erp-bg-main: #f8f7fc;
    --erp-card-bg: #ffffff;
    --erp-border-color: #e5e0f2;
    --erp-text-main: #1f2937;
    --erp-text-muted: #6b7280;
    --erp-blue: #43368e;
    --erp-primary: #43368e;
    --erp-primary-hover: #352a73;
    --erp-primary-active: #271e59;
    --erp-accent: #f07f3c;
    --erp-accent-hover: #d96d2b;
    --erp-radius: 10px;
    --erp-radius-lg: 14px;
    --erp-shadow: 0 2px 8px rgba(67, 54, 142, 0.05);
    --erp-shadow-hover: 0 8px 24px rgba(67, 54, 142, 0.12);
}

body {
    font-family: "Roboto", sans-serif;
    background-color: var(--erp-bg-main);
    color: var(--erp-text-main);
    font-size: 0.9375rem; /* 15px at 100% root; 12px at the 80% compact root */
    line-height: 1.5;
}

h5, .h5 {
    color: var(--erp-blue);
}

/* Sidebar Styling matching Brand Logo */
#sidebar-wrapper {
    background-color: #ffffff;
    color: var(--erp-text-main);
    border-right: 1px solid rgba(67, 54, 142, 0.1);
    box-shadow: 2px 0 16px rgba(67, 54, 142, 0.04);
}

.sidebar-brand-header {
    height: 62px;
    min-height: 62px;
    max-height: 62px;
    padding: 8px 16px;
    border-bottom: 1px solid rgba(67, 54, 142, 0.08);
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.sidebar-user-card {
    padding: 12px 16px 14px;
    border-bottom: 1px solid rgba(67, 54, 142, 0.08);
    background: linear-gradient(180deg, rgba(67, 54, 142, 0.02) 0%, rgba(67, 54, 142, 0.06) 100%);
}

.sidebar-user-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1e1548;
    margin-bottom: 6px;
    letter-spacing: -0.1px;
}

.sidebar-role-chip {
    display: inline-block;
    padding: 2.5px 10px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: #e06d28 !important;
    background: rgba(240, 127, 60, 0.12) !important;
    border: 1px solid rgba(240, 127, 60, 0.28) !important;
    box-shadow: 0 1px 3px rgba(240, 127, 60, 0.1);
}

.sidebar-role-chip-empty {
    color: #8c8fa3 !important;
    background: rgba(140, 143, 163, 0.12) !important;
    border-color: rgba(140, 143, 163, 0.25) !important;
}

.sidebar-nav-section-title {
    color: #7b8196;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 0.65rem 0.75rem 0.25rem;
}

.sidebar-nav-item,
.sidebar-subnav-item {
    color: var(--erp-sidebar-text) !important;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.15rem;
    display: flex;
    align-items: center;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.sidebar-nav-item i,
.sidebar-subnav-item i {
    color: #43368e;
    width: 1.35rem;
    font-size: 0.95rem;
    margin-right: 0.5rem;
    transition: all 0.22s ease;
}

.sidebar-nav-item .sidebar-chevron {
    color: #8c8fa3;
    font-size: 0.7rem;
    margin-left: auto;
    transition: transform 0.2s ease, color 0.2s ease;
}

.sidebar-nav-item[aria-expanded="true"] .sidebar-chevron {
    transform: rotate(180deg);
    color: #43368e;
}

.sidebar-nav-item:hover,
.sidebar-subnav-item:hover {
    color: #43368e !important;
    background: linear-gradient(90deg, rgba(67, 54, 142, 0.08) 0%, rgba(240, 127, 60, 0.04) 100%);
    transform: translateX(4px);
}

.sidebar-nav-item:hover i,
.sidebar-subnav-item:hover i {
    color: #f07f3c;
    transform: scale(1.1);
}

.sidebar-nav-item.active {
    color: #ffffff !important;
    background: linear-gradient(135deg, #261b5c 0%, #372978 40%, #43368e 80%, #5646b0 100%) !important;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(67, 54, 142, 0.35);
    border-radius: 8px;
    transform: none;
}

.sidebar-nav-item.active i {
    color: #ffffff !important;
}

.sidebar-submenu {
    border-left: 2px solid rgba(67, 54, 142, 0.16);
    margin-left: 1.25rem;
    padding-left: 0.65rem;
    margin-top: 0.15rem;
    margin-bottom: 0.25rem;
}

.sidebar-submenu .sidebar-submenu {
    margin-left: 0.65rem;
    padding-left: 0.5rem;
    border-left: 1.5px solid rgba(67, 54, 142, 0.14);
}

.sidebar-submenu .sidebar-submenu .sidebar-subnav-item {
    font-size: 0.745rem;
    padding: 0.35rem 0.5rem;
}

.sidebar-subnav-item.active {
    color: #43368e !important;
    background-color: rgba(67, 54, 142, 0.12) !important;
    font-weight: 700;
    border-left: 3px solid #43368e;
    border-radius: 6px;
    transform: none;
}

.sidebar-subnav-item.active i {
    color: #43368e !important;
}

.sidebar-footer {
    border-top: 1px solid rgba(67, 54, 142, 0.08);
    color: #8c8fa3;
    background: #ffffff;
    font-size: 0.7rem;
    padding: 0.85rem 1rem;
}

.sidebar-footer .text-light {
    color: var(--erp-text-main) !important;
}

/* ==========================================================================
   Header Topbar - Matching Brand Logo & Executive Glassmorphism
   ========================================================================== */


/* Compact Topbar Elements */
.erp-topbar .header-brand-title {
    color: #ffffff !important;
    font-weight: 700;
    letter-spacing: -0.01em;
    font-size: 0.88rem;
    line-height: 1.15;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.erp-topbar .header-legal-badge {
    background: rgba(240, 127, 60, 0.28) !important;
    border: 1px solid rgba(240, 127, 60, 0.55) !important;
    color: #ffb885 !important;
    font-size: 0.62rem !important;
    letter-spacing: 0.3px;
    font-weight: 700;
    padding: 0.08rem 0.4rem !important;
    line-height: 1.2;
}

.erp-topbar .header-scope-label {
    color: rgba(255, 255, 255, 0.72) !important;
    font-size: 0.7rem !important;
    font-weight: 500;
}

.erp-topbar .header-time-pill {
    color: rgba(255, 255, 255, 0.85) !important;
    font-size: 0.76rem !important;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.2rem 0.65rem !important;
    border-radius: 9999px;
    backdrop-filter: blur(8px);
    line-height: 1.2;
}

.erp-topbar #sidebar-toggle {
    height: 32px;
    width: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.erp-topbar #headerNotificationBtn {
    height: 32px;
    width: 32px;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.erp-topbar .user-profile-btn {
    height: 32px;
    padding: 0.15rem 0.6rem !important;
    display: inline-flex;
    align-items: center;
}

.erp-topbar {
    background: linear-gradient(135deg, #18113c 0%, #251a5c 35%, #3c2e82 70%, #43368e 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 20px rgba(24, 17, 60, 0.28) !important;
    height: 62px !important;
    min-height: 62px !important;
    max-height: 62px !important;
    padding: 0 1.25rem !important;
    display: flex !important;
    align-items: center !important;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1020;
    box-sizing: border-box;
}

.erp-topbar h5,
.erp-topbar .TC-bold {
    color: #ffffff !important;
    font-weight: 700;
    letter-spacing: -0.2px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.erp-topbar .text-muted {
    color: rgba(255, 255, 255, 0.85) !important;
}

.erp-topbar .text-warning,
.erp-topbar .fa-clock {
    color: #f07f3c !important;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
}

.erp-topbar .btn-light {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.14) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    border-radius: 8px !important;
    backdrop-filter: blur(4px);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.erp-topbar .btn-light i {
    color: #ffffff !important;
}

.erp-topbar .btn-light:hover,
.erp-topbar .btn-light:focus {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.25) !important;
    border-color: rgba(255, 255, 255, 0.45) !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2) !important;
    transform: translateY(-1px);
}

.erp-topbar .dropdown-menu {
    border-radius: 12px;
    box-shadow: 0 12px 36px rgba(24, 17, 60, 0.22) !important;
    border: 1px solid rgba(67, 54, 142, 0.16) !important;
    background: #ffffff !important;
    color: #1e293b !important;
    overflow: hidden;
    animation: erpDropdownSlide 0.2s ease-out;
}

.erp-topbar .dropdown-menu .header-dropdown-title,
.erp-topbar .dropdown-menu .TC-bold {
    color: #18113c !important;
    text-shadow: none !important;
    font-size: 0.95rem;
}

.erp-topbar .dropdown-menu a {
    color: #1e293b !important;
}

.erp-topbar .dropdown-menu a.notification-item {
    color: #1e293b !important;
    transition: all 0.18s ease;
    border-left: 3px solid transparent;
}

.erp-topbar .dropdown-menu a.notification-item.notification-unread {
    background: #f6f4fc !important;
    border-left-color: #f07f3c !important;
}

.erp-topbar .dropdown-menu a.notification-item:hover {
    background: #ede8f8 !important;
    transform: translateX(2px);
}

.erp-topbar .dropdown-menu a.notification-item .notification-text {
    font-size: 0.82rem;
    line-height: 1.35;
    color: #1e293b !important;
}

.erp-topbar .dropdown-menu a.notification-item.notification-read .notification-text {
    color: #64748b !important;
}

.erp-topbar .dropdown-menu a.notification-item .notification-time,
.erp-topbar .dropdown-menu .text-muted {
    color: #64748b !important;
}

.erp-topbar .dropdown-menu .btn-link {
    color: #43368e !important;
    font-weight: 600;
}

.erp-topbar .dropdown-menu .btn-link:hover {
    color: #f07f3c !important;
}

.erp-topbar a:not(.dropdown-menu a):not(.dropdown-item):not(.notification-item) {
    color: #ffffff;
}

.erp-topbar a:not(.dropdown-menu a):not(.dropdown-item):not(.notification-item):hover {
    color: #ffffff;
}

/* ==========================================================================
   Brand Buttons, Utilities & Interactive Links Across All Pages
   ========================================================================== */

.btn-primary,
.bg-primary {
    background-color: var(--erp-blue) !important;
    border-color: var(--erp-blue) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(67, 54, 142, 0.25);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: #352a73 !important;
    border-color: #352a73 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(67, 54, 142, 0.38);
    transform: translateY(-1px);
}

.btn-outline-primary {
    color: var(--erp-blue) !important;
    border-color: var(--erp-blue) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
    color: #ffffff !important;
    background-color: var(--erp-blue) !important;
    border-color: var(--erp-blue) !important;
    box-shadow: 0 4px 12px rgba(67, 54, 142, 0.25);
    transform: translateY(-1px);
}

.text-primary {
    color: var(--erp-blue) !important;
}

.border-primary {
    border-color: var(--erp-blue) !important;
}

.bg-primary-subtle {
    background-color: #f1edfa !important;
    color: var(--erp-blue) !important;
}

.border-primary-subtle {
    border-color: #d8d0f2 !important;
}

/* Links inside cards and tables */
.card-erp a:not(.btn):not(.nav-link):not(.dropdown-item):not(.badge):not(.list-group-item),
.table a:not(.btn):not(.badge) {
    color: var(--erp-blue);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}

.card-erp a:not(.btn):not(.nav-link):not(.dropdown-item):not(.badge):not(.list-group-item):hover,
.table a:not(.btn):not(.badge):hover {
    color: var(--erp-accent);
    text-decoration: underline;
}

/* Form Controls Focus & Accent */
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: var(--erp-blue) !important;
    box-shadow: 0 0 0 3px rgba(67, 54, 142, 0.15) !important;
}

.form-check-input:checked {
    background-color: var(--erp-blue) !important;
    border-color: var(--erp-blue) !important;
}

.page-item.active .page-link {
    background-color: var(--erp-blue) !important;
    border-color: var(--erp-blue) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(67, 54, 142, 0.25);
}

/* Custom Tabs Across All Pages */
.custom-tabs {
    border-bottom: 2px solid #e5e0f2;
}

.nav-item-tab {
    color: #64748b;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
}

.nav-item-tab:hover {
    color: var(--erp-blue);
}

.nav-item-tab.active {
    color: var(--erp-blue) !important;
    border-bottom-color: var(--erp-blue) !important;
    background-color: #f4f1fa;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

/* ==========================================================================
   Cards, Glass Effect, Shadows & Hover Animations
   ========================================================================== */

.card-erp,
.card-demo,
.card,
.profile-card {
    background-color: #ffffff;
    border-radius: 12px !important;
    border: 1px solid #e5e0f2 !important;
    box-shadow: 0 2px 8px rgba(67, 54, 142, 0.05);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s ease !important;
}

.card-erp:hover,
.card-demo:hover,
.card:hover,
.profile-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(67, 54, 142, 0.12);
    border-color: #d1c7f0 !important;
}

.card-erp .card-header,
.card-demo .card-header-demo,
.profile-card-header {
    background: #faf8fd !important;
    border-bottom: 1px solid #ece7f7 !important;
    border-top-left-radius: 11px !important;
    border-top-right-radius: 11px !important;
    color: #271c5b;
    font-weight: 700;
}

.card-erp .card-header i,
.card-demo .card-header-demo i,
.profile-card-header i {
    color: #43368e;
}

.table-responsive {
    border-radius: 10px;
    border: 1px solid #e5e0f2;
}

.dropdown-menu {
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(24, 17, 60, 0.14);
    border: 1px solid #e5e0f2;
}

/* Glassmorphism Panel Utilities */
.glass-panel {
    background: rgba(255, 255, 255, 0.88) !important;
    backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.75) !important;
    box-shadow: 0 8px 32px rgba(67, 54, 142, 0.08) !important;
    border-radius: 14px !important;
}

.glass-panel-dark {
    background: linear-gradient(135deg, rgba(34, 24, 82, 0.95) 0%, rgba(67, 54, 142, 0.9) 100%) !important;
    backdrop-filter: blur(14px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 10px 30px rgba(24, 17, 60, 0.25) !important;
    color: #ffffff !important;
    border-radius: 14px !important;
}

/* Animations */
@keyframes erpFadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-erp-fade {
    animation: erpFadeInUp 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes erpDropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Quick Action Cards */
.quick-action-card {
    border-radius: 12px;
    border: 1px solid #e5e0f2;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(67, 54, 142, 0.05);
}

.quick-action-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(67, 54, 142, 0.12);
}

.qa-blue {
    background-color: #f3f0fa;
    color: #43368e;
    border-color: #dcd4f5;
}
/* Keep employee dashboard cards compact and avoid double spacing inside grid rows. */
.employee-dashboard .card-erp {
    margin-bottom: 0;
}

/* ==========================================================================
   Professional ERP Workflow & Stage Badges
   ========================================================================== */

.badge.badge-stage-hr,
.badge-stage-hr {
    background-color: #f5f3ff !important;
    color: #6b21a8 !important;
    border: 1px solid #ddd6fe !important;
}

.badge.badge-stage-accounts,
.badge-stage-accounts {
    background-color: #fffbeb !important;
    color: #92400e !important;
    border: 1px solid #fde68a !important;
}

.badge.badge-stage-cfo,
.badge-stage-cfo {
    background-color: #f0f9ff !important;
    color: #0369a1 !important;
    border: 1px solid #bae6fd !important;
}

.badge.badge-stage-ceo,
.badge-stage-ceo {
    background-color: #eef2ff !important;
    color: #3730a3 !important;
    border: 1px solid #c7d2fe !important;
}

.badge.badge-stage-auditor,
.badge-stage-auditor {
    background-color: #f0fdfa !important;
    color: #0f766e !important;
    border: 1px solid #99f6e4 !important;
}

.badge.badge-stage-voucher,
.badge-stage-voucher {
    background-color: #fff7ed !important;
    color: #9a3412 !important;
    border: 1px solid #fed7aa !important;
}

.badge.badge-stage-bank,
.badge-stage-bank {
    background-color: #ecfeff !important;
    color: #0e7490 !important;
    border: 1px solid #a5f3fc !important;
}

.badge.badge-stage-salary,
.badge-stage-salary {
    background-color: #f0fdf4 !important;
    color: #15803d !important;
    border: 1px solid #bbf7d0 !important;
}

.badge.badge-stage-hod,
.badge-stage-hod {
    background-color: #eff6ff !important;
    color: #1d4ed8 !important;
    border: 1px solid #bfdbfe !important;
}

.badge.badge-stage-completed,
.badge-stage-completed {
    background-color: #ecfdf5 !important;
    color: #047857 !important;
    border: 1px solid #a7f3d0 !important;
}

.badge.badge-stage-rejected,
.badge-stage-rejected {
    background-color: #fef2f2 !important;
    color: #b91c1c !important;
    border: 1px solid #fecaca !important;
}

.badge.badge-stage-draft,
.badge-stage-draft,
.badge.badge-stage-cancelled,
.badge-stage-cancelled {
    background-color: #f8fafc !important;
    color: #475569 !important;
    border: 1px solid #cbd5e1 !important;
}

/* Decision Badges */
.badge.badge-decision-approved,
.badge-decision-approved {
    background-color: #ecfdf5 !important;
    color: #047857 !important;
    border: 1px solid #a7f3d0 !important;
}

.badge.badge-decision-pending,
.badge-decision-pending {
    background-color: #fffbeb !important;
    color: #b45309 !important;
    border: 1px solid #fde68a !important;
}

.badge.badge-decision-rejected,
.badge-decision-rejected {
    background-color: #fef2f2 !important;
    color: #b91c1c !important;
    border: 1px solid #fecaca !important;
}

.badge.badge-decision-returned,
.badge-decision-returned {
    background-color: #fff7ed !important;
    color: #c2410c !important;
    border: 1px solid #fed7aa !important;
}

.badge.badge-decision-secondary,
.badge-decision-secondary {
    background-color: #f8fafc !important;
    color: #475569 !important;
    border: 1px solid #cbd5e1 !important;
}

/* Subtle Color Utility Fallbacks */
.bg-purple-subtle {
    background-color: #f5f3ff !important;
}
.text-purple {
    color: #6b21a8 !important;
}
.border-purple-subtle {
    border-color: #ddd6fe !important;
}

.bg-indigo-subtle {
    background-color: #eef2ff !important;
}
.text-indigo {
    color: #3730a3 !important;
}
.border-indigo-subtle {
    border-color: #c7d2fe !important;
}

.bg-teal-subtle {
    background-color: #f0fdfa !important;
}
.text-teal {
    color: #0f766e !important;
}
.border-teal-subtle {
    border-color: #99f6e4 !important;
}

.bg-orange-subtle {
    background-color: #fff7ed !important;
}
.text-orange {
    color: #c2410c !important;
}
.border-orange-subtle {
    border-color: #fed7aa !important;
}

.bg-amber-subtle {
    background-color: #fffbeb !important;
}
.text-amber {
    color: #b45309 !important;
}
.border-amber-subtle {
    border-color: #fde68a !important;
}

/* Pagination styles & SVG overflow safeguard */
nav svg,
.pagination svg,
[role="navigation"] svg {
    width: 1.25rem !important;
    height: 1.25rem !important;
    max-width: 20px !important;
    max-height: 20px !important;
    display: inline-block !important;
    vertical-align: middle !important;
}

.pagination {
    margin-bottom: 0;
}

/* Sidebar user and role card */
.sidebar-user-card {
    padding: 12px 16px 14px;
    border-bottom: 1px solid rgba(67, 54, 142, 0.08);
    background: linear-gradient(180deg, rgba(67, 54, 142, 0.02) 0%, rgba(67, 54, 142, 0.06) 100%);
}

.sidebar-user-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1e1548;
    margin-bottom: 6px;
    letter-spacing: -0.1px;
}

.sidebar-role-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.sidebar-role-chip {
    display: inline-block;
    padding: 2.5px 10px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: #e06d28 !important;
    background: rgba(240, 127, 60, 0.12) !important;
    border: 1px solid rgba(240, 127, 60, 0.28) !important;
    box-shadow: 0 1px 3px rgba(240, 127, 60, 0.1);
}

.sidebar-role-chip-empty {
    color: #8c8fa3 !important;
    background: rgba(140, 143, 163, 0.12) !important;
    border-color: rgba(140, 143, 163, 0.25) !important;
}

#sidebar-wrapper .sidebar-submenu .sidebar-nav-section-title {
    padding: 0.5rem 0.65rem 0.1rem 1.1rem;
}

/* Header colour variants for action and approval cards */
.td-header-blue { background: linear-gradient(135deg, #251a5c 0%, #43368e 100%); }
.td-header-green { background: linear-gradient(135deg, #15803d 0%, #22c55e 100%); }

/* Workflow stepper */
.flow-title-icon { width: 30px; height: 30px; border-radius: 8px; background: #eff6ff; color: #2563eb; display: inline-flex; align-items: center; justify-content: center; font-size: 0.85rem; }
.flow-stepper { list-style: none; margin: 0; padding: 0 0 0.25rem; display: flex; gap: 0; overflow-x: auto; }
.flow-step { position: relative; flex: 1 0 96px; text-align: center; padding: 0 0.25rem; }
.flow-step::before { content: ""; position: absolute; top: 17px; left: -50%; width: 100%; height: 3px; background: #e2e8f0; z-index: 0; }
.flow-step:first-child::before { display: none; }
.flow-step.is-done::before, .flow-step.is-current::before { background: #16a34a; }
.flow-dot { position: relative; z-index: 1; width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 0.82rem; font-weight: 800; background: #f1f5f9; color: #94a3b8; border: 2px solid #e2e8f0; }
.flow-step.is-done .flow-dot { background: #16a34a; border-color: #16a34a; color: #fff; }
.flow-step.is-current .flow-dot { background: #2563eb; border-color: #2563eb; color: #fff; box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.18); }
.flow-label { display: block; margin-top: 0.45rem; font-size: 0.72rem; font-weight: 600; color: #64748b; line-height: 1.2; }
.flow-step.is-current .flow-label { color: #1d4ed8; font-weight: 800; }
.flow-step.is-done .flow-label { color: #15803d; }

/* Shared KPI tiles (x-stat-tile), same look as the employee dashboard */
.kpi-stat-card {
    border: 1px solid #e5e0f2;
    border-radius: 14px;
    padding: 1.1rem 1.25rem;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(67, 54, 142, 0.04);
    height: 100%;
    position: relative;
    overflow: hidden;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s ease, border-color 0.25s ease;
}

.kpi-stat-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 3.5px;
    height: 100%;
    background: linear-gradient(180deg, #43368e 0%, #f07f3c 100%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.kpi-stat-card:hover,
a.kpi-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 26px rgba(67, 54, 142, 0.11);
    border-color: #c7beea;
}

.kpi-stat-card:hover::before,
a.kpi-stat-card:hover::before {
    opacity: 1;
}

.kpi-stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.kpi-stat-card:hover .kpi-stat-icon {
    transform: scale(1.1) rotate(-3deg);
}

/* Shared detail-card and register-table system (tickets, motor, claims) */
.td-header {
    background:
        radial-gradient(600px 200px at 100% -20%, rgba(240, 127, 60, 0.22), transparent 60%),
        linear-gradient(135deg, #18113c 0%, #251a5c 40%, #43368e 100%);
    color: #fff;
    border-radius: 14px 14px 0 0;
    padding: 1.15rem 1.45rem;
}
.td-header-vouchers { background: linear-gradient(135deg, #c2591e 0%, #f07f3c 100%); }
.td-empty-vouchers { background: #fff7ed; color: #c2591e; }
.td-voucher { display: flex; align-items: center; gap: 0.85rem; padding: 0.75rem 0.9rem; border: 1px solid #e5e0f2; border-radius: 12px; background: #fff; transition: all 0.2s ease; }
.td-voucher:hover { border-color: #f07f3c; box-shadow: 0 6px 16px -6px rgba(240, 127, 60, 0.25); transform: translateY(-2px); }
.td-voucher-icon { width: 40px; height: 40px; border-radius: 10px; background: #fff7ed; color: #ea580c; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.td-voucher-main { flex: 1; min-width: 0; }
.td-voucher-amount { font-weight: 800; font-size: 1rem; color: #0f172a; white-space: nowrap; }
.td-header-docs { background: linear-gradient(135deg, #251a5c 0%, #43368e 100%); }
.td-header-icon { width: 44px; height: 44px; border-radius: 12px; background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.22); display: flex; align-items: center; justify-content: center; font-size: 1.15rem; }
.td-header .case-count { background: rgba(255, 255, 255, 0.18); border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 999px; padding: 0.2rem 0.8rem; font-size: 0.78rem; font-weight: 600; }
.td-group-title { display: flex; align-items: center; gap: 0.5rem; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.7px; text-transform: uppercase; color: #43368e; margin-bottom: 0.7rem; padding-bottom: 0.4rem; border-bottom: 2px solid #ece8f6; }
.td-fact { background: #faf9fd; border: 1px solid #ece8f6; border-radius: 10px; padding: 0.65rem 0.85rem; height: 100%; transition: border-color 0.2s ease, transform 0.2s ease; }
.td-fact:hover { border-color: #d8d0f2; transform: translateY(-1px); }
.td-fact-label { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: #64748b; margin-bottom: 0.15rem; }
.td-fact-value { font-size: 0.88rem; font-weight: 600; color: #0f172a; overflow-wrap: anywhere; }
.td-money { border-radius: 12px; padding: 0.75rem 0.9rem; text-align: center; height: 100%; }
.td-money .label { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; }
.td-money .amount { font-size: 1.05rem; font-weight: 800; }
.td-doc { display: flex; align-items: center; gap: 0.8rem; padding: 0.7rem 0.85rem; border: 1px solid #e5e0f2; border-radius: 12px; background: #fff; color: inherit; transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; }
.td-doc:hover { transform: translateY(-2px); border-color: #43368e; box-shadow: 0 8px 18px -6px rgba(67, 54, 142, 0.22); }
.td-doc-icon { width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; }
.td-doc-body { min-width: 0; flex: 1; display: block; }
.td-doc-name { display: block; font-weight: 600; font-size: 0.88rem; color: #0f172a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td-doc-meta { display: block; font-size: 0.74rem; color: #64748b; }
.td-doc-download { color: #43368e; font-size: 0.95rem; }
.td-empty-icon { width: 56px; height: 56px; border-radius: 50%; background: #f1edfa; color: #43368e; display: inline-flex; align-items: center; justify-content: center; font-size: 1.4rem; }

.case-history-header {
    background:
        radial-gradient(600px 200px at 100% -20%, rgba(240, 127, 60, 0.22), transparent 60%),
        linear-gradient(135deg, #18113c 0%, #251a5c 40%, #43368e 100%);
    color: #fff;
    border-radius: 14px 14px 0 0;
    padding: 1.15rem 1.45rem;
}
.case-history-header .case-count {
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    padding: 0.2rem 0.8rem;
    font-size: 0.78rem;
    font-weight: 600;
}
.case-timeline { position: relative; padding-left: 2.4rem; margin: 0; list-style: none; }
.case-timeline::before {
    content: "";
    position: absolute;
    left: 0.95rem;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 2px;
    background: #e5e0f2;
}
.case-node { position: relative; margin-bottom: 1.25rem; }
.case-node:last-child { margin-bottom: 0; }
.case-dot {
    position: absolute;
    left: -2.4rem;
    top: 0.9rem;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: #fff;
    box-shadow: 0 0 0 4px #fff;
}
.case-card {
    border: 1px solid #e5e0f2;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(67, 54, 142, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.case-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(67, 54, 142, 0.09); }
.case-card.is-current { border-color: #43368e; box-shadow: 0 0 0 3px rgba(67, 54, 142, 0.12); }
.case-card-head { padding: 0.9rem 1.1rem; border-bottom: 1px solid #ece8f6; background: #faf9fd; border-radius: 12px 12px 0 0; }
.case-fact-label { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: #64748b; }
.case-fact-value { font-size: 0.86rem; font-weight: 600; color: #0f172a; }
.case-money { border-radius: 10px; padding: 0.55rem 0.8rem; text-align: center; }
.case-money .amount { font-weight: 700; font-size: 0.98rem; }
.case-money .label { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; }
.case-events { list-style: none; margin: 0; padding: 0 0 0 1rem; border-left: 2px solid #e5e0f2; }
.case-events li { position: relative; padding: 0.15rem 0 0.55rem 0.9rem; font-size: 0.82rem; }
.case-events li::before {
    content: "";
    position: absolute;
    left: -1.38rem;
    top: 0.5rem;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: #94a3b8;
    box-shadow: 0 0 0 3px #fff;
}
.case-events li.is-approved::before { background: #16a34a; }
.case-events li.is-rejected::before { background: #dc2626; }
.case-events li.is-submitted::before { background: #43368e; }

.tl-header {
    background:
        radial-gradient(650px 220px at 100% -20%, rgba(240, 127, 60, 0.24), transparent 60%),
        linear-gradient(135deg, #18113c 0%, #251a5c 40%, #3c2e82 75%, #43368e 100%);
    color: #fff;
    border-radius: 12px 12px 0 0;
    padding: 0.55rem 1rem;
    position: relative;
    overflow: hidden;
}
.tl-header-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(240, 127, 60, 0.2);
    border: 1px solid rgba(240, 127, 60, 0.45);
    color: #ffb885;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
}
.tl-count {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 999px;
    padding: 0.15rem 0.6rem;
    font-size: 0.7rem;
    font-weight: 600;
}
.tl-table thead th {
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #475569;
    background: #faf9fd;
    border-bottom: 1px solid #e5e0f2;
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
    white-space: nowrap;
}
.tl-table tbody tr { transition: background-color 0.18s ease, transform 0.18s ease; }
.tl-table tbody tr:hover { background: #f6f4fc; }
.tl-table td { padding-top: 0.45rem; padding-bottom: 0.45rem; border-color: #ece8f6; }
.tl-ticket-link { font-weight: 700; color: #43368e; text-decoration: none; transition: color 0.15s ease; }
.tl-ticket-link:hover { color: #f07f3c; text-decoration: underline; }
.tl-avatar { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
.tl-class { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.22rem 0.7rem; border-radius: 999px; background: #f1edfa; color: #43368e; border: 1px solid #d8d0f2; font-size: 0.78rem; font-weight: 600; }
.tl-stage { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.8rem; font-weight: 600; color: #334155; }
.tl-stage::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #94a3b8; }
.tl-stage.is-active::before { background: #f07f3c; box-shadow: 0 0 0 3px rgba(240, 127, 60, 0.22); }
.tl-stage.is-done::before { background: #16a34a; }
.tl-stage.is-stopped::before { background: #dc2626; }
.tl-empty-icon { width: 64px; height: 64px; border-radius: 50%; background: #f1edfa; color: #43368e; display: inline-flex; align-items: center; justify-content: center; font-size: 1.6rem; }

/* Create-form banner and sticky action bar (tickets, motor) */
.ct-hero {
    background:
        radial-gradient(650px 220px at 100% -20%, rgba(240, 127, 60, 0.25), transparent 60%),
        linear-gradient(135deg, #18113c 0%, #251a5c 40%, #43368e 100%);
    color: #fff;
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 10px 26px rgba(24, 17, 60, 0.18);
}
.ct-hero code {
    display: inline-block;
    background: rgba(240, 127, 60, 0.2);
    color: #ffb885;
    border: 1px solid rgba(240, 127, 60, 0.45);
    border-radius: 10px;
    padding: 0.35rem 0.85rem;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.4px;
}
.ct-actions {
    position: sticky;
    bottom: 0;
    z-index: 5;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(8px);
    border: 1px solid #e5e0f2;
    border-radius: 14px;
    padding: 0.85rem 1.15rem;
    box-shadow: 0 -6px 20px -8px rgba(24, 17, 60, 0.16);
}

/* Ticket detail: financial snapshot, decision forms, voucher rows (brand-themed) */
.td-snapshot { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.65rem; margin-bottom: 1.1rem; }
.td-snapshot-item { display: flex; flex-direction: column; gap: 0.15rem; background: #faf9fd; border: 1px solid #ece8f6; border-radius: 12px; padding: 0.7rem 0.9rem; }
.td-snapshot-item.is-primary { background: linear-gradient(135deg, #251a5c 0%, #43368e 100%); border-color: transparent; box-shadow: 0 8px 18px -8px rgba(67, 54, 142, 0.55); }
.td-snapshot-label { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: #64748b; }
.td-snapshot-value { font-size: 1.05rem; font-weight: 800; color: #1f2937; font-variant-numeric: tabular-nums; }
.td-snapshot-item.is-primary .td-snapshot-label { color: rgba(255, 255, 255, 0.78); }
.td-snapshot-item.is-primary .td-snapshot-value { color: #fff; }
.td-decision { background: #faf9fd; border: 1px solid #ece8f6; border-radius: 12px; padding: 1rem 1.1rem; }
.td-decision + .td-decision { margin-top: 0.85rem; }
.td-decision .form-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase; color: #43368e; }
.td-decision .form-control { border-color: #e5e0f2; border-radius: 10px; }
.td-decision .form-control:focus { border-color: #43368e; box-shadow: 0 0 0 3px rgba(67, 54, 142, 0.14); }
.td-decision-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.85rem; }
.td-decision-return { background: #fff7f5; border-color: #fbd9d3; }
.td-decision-return .form-label { color: #b42318; }
#voucher-search-results .list-group-item { border: 1px solid #e5e0f2; border-radius: 12px; margin-bottom: 0.5rem; padding: 0.8rem 0.95rem; background: #fff; transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease; }
#voucher-search-results .list-group-item:hover { border-color: #f07f3c; box-shadow: 0 6px 16px -6px rgba(240, 127, 60, 0.28); transform: translateY(-1px); }
#voucher-search-results .list-group-item .fw-semibold { color: #43368e; font-size: 0.92rem; }
#voucher-search-results .form-control { border-color: #e5e0f2; border-radius: 8px; text-align: right; font-weight: 700; }
#voucher-search-results .btn-outline-primary { border-color: #43368e; color: #43368e; font-weight: 600; border-radius: 8px; }
#voucher-search-results .btn-outline-primary:hover { background: #43368e; color: #fff; }
#voucher-search { border-color: #e5e0f2; border-radius: 10px; padding: 0.6rem 0.9rem; }
#voucher-search:focus { border-color: #43368e; box-shadow: 0 0 0 3px rgba(67, 54, 142, 0.14); }

/* Prominent cards: stronger elevation, accent edge and larger headers on detail pages */
.card-erp:has(> .td-header),
.card-erp:has(> .case-history-header),
.card-erp:has(> .tl-header) {
    border: 1px solid #ddd6f1;
    border-radius: 18px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: 0 18px 40px -22px rgba(37, 26, 92, 0.55), 0 3px 10px rgba(37, 26, 92, 0.07);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.card-erp:has(> .td-header):hover,
.card-erp:has(> .case-history-header):hover,
.card-erp:has(> .tl-header):hover {
    box-shadow: 0 26px 52px -24px rgba(37, 26, 92, 0.62), 0 4px 14px rgba(37, 26, 92, 0.09);
}
.card-erp > .td-header,
.card-erp > .case-history-header,
.card-erp > .tl-header {
    position: relative;
    border-radius: 0;
    padding: 1.35rem 1.7rem;
    border-bottom: 4px solid #f07f3c;
}
.card-erp > .td-header h2,
.card-erp > .td-header .h5,
.card-erp > .case-history-header h2,
.card-erp > .tl-header h2 {
    font-size: 1.25rem !important;
    letter-spacing: 0.2px;
}
.card-erp > .td-header .td-header-icon,
.card-erp > .tl-header .tl-header-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    font-size: 1.3rem;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 6px 14px -6px rgba(0, 0, 0, 0.4);
}
.card-erp:has(> .td-header) > .card-body {
    padding: 1.6rem 1.7rem !important;
    background: linear-gradient(180deg, #ffffff 0%, #fcfbff 100%);
}
.td-group-title {
    font-size: 0.78rem;
    color: #251a5c;
    border-bottom: 2px solid #f07f3c33;
}
.td-group-title i {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: #43368e;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}
.td-fact {
    background: #ffffff;
    border: 1px solid #e5e0f2;
    border-left: 4px solid #43368e;
    box-shadow: 0 4px 10px -6px rgba(67, 54, 142, 0.35);
}
.td-fact-value { font-size: 0.95rem; font-weight: 700; }
.td-money { box-shadow: 0 8px 18px -10px rgba(37, 26, 92, 0.45); border: 1px solid rgba(37, 26, 92, 0.08); }
.td-money .amount { font-size: 1.2rem; }
.case-card { box-shadow: 0 10px 24px -14px rgba(37, 26, 92, 0.5); }
.kpi-stat-card {
    border: 1px solid #ddd6f1;
    border-top: 4px solid #43368e;
    box-shadow: 0 14px 28px -18px rgba(37, 26, 92, 0.5), 0 2px 6px rgba(37, 26, 92, 0.06);
}
.kpi-stat-card:hover { transform: translateY(-4px); box-shadow: 0 22px 36px -18px rgba(37, 26, 92, 0.55); }
.kpi-stat-card .fs-4 { font-size: 1.5rem !important; font-weight: 800 !important; color: #251a5c !important; }
.kpi-stat-card .kpi-stat-icon { width: 40px; height: 40px; border-radius: 12px; font-size: 1.05rem; }
.card-erp:has(> .card-body > .flow-stepper),
.card-erp:has(> .card-body > div > .flow-stepper) {
    border: 1px solid #ddd6f1;
    border-radius: 18px;
    box-shadow: 0 16px 34px -22px rgba(37, 26, 92, 0.5), 0 2px 8px rgba(37, 26, 92, 0.06);
}
.td-snapshot-item { box-shadow: 0 8px 18px -12px rgba(37, 26, 92, 0.45); }
.td-decision { box-shadow: inset 0 0 0 1px #ece8f6, 0 10px 22px -16px rgba(37, 26, 92, 0.4); border-left: 4px solid #43368e; }
.td-decision-return { border-left-color: #dc2626; }

/* Compact text inside KPI cards */
.kpi-stat-card { padding: 0.8rem 1rem; }
.kpi-stat-card .fs-8, .kpi-stat-card .text-uppercase { font-size: 0.62rem !important; letter-spacing: 0.4px; }
.kpi-stat-card .fs-4 { font-size: 1.05rem !important; font-weight: 700 !important; line-height: 1.25; overflow-wrap: anywhere; }
.kpi-stat-card .small { font-size: 0.68rem !important; line-height: 1.3; }
.kpi-stat-card .kpi-stat-icon { width: 30px; height: 30px; border-radius: 9px; font-size: 0.8rem; }
.kpi-stat-card .mb-2 { margin-bottom: 0.35rem !important; }

/* Compact text inside card headers */
.card-erp > .td-header,
.card-erp > .case-history-header,
.card-erp > .tl-header { padding: 0.85rem 1.2rem; }
.card-erp > .td-header h2,
.card-erp > .td-header .h5,
.card-erp > .case-history-header h2,
.card-erp > .tl-header h2 { font-size: 0.95rem !important; font-weight: 700 !important; letter-spacing: 0; }
.card-erp > .td-header .small,
.card-erp > .case-history-header .small,
.card-erp > .tl-header .small { font-size: 0.72rem !important; line-height: 1.3; }
.card-erp > .td-header .td-header-icon,
.card-erp > .tl-header .tl-header-icon,
.card-erp > .case-history-header > div > div:first-child { width: 36px; height: 36px; border-radius: 10px; font-size: 0.95rem; }
.card-erp > .td-header .case-count,
.card-erp > .case-history-header .case-count,
.card-erp > .tl-header .tl-count { font-size: 0.7rem; padding: 0.15rem 0.6rem; }
.flow-title-icon { transform: scale(0.85); }
.card-erp .h6 { font-size: 0.85rem; }
.flow-step .flow-role { display: block; font-size: 0.6rem; font-weight: 600; letter-spacing: 0.3px; text-transform: uppercase; color: #8a83ad; margin-top: 0.1rem; white-space: nowrap; }
.flow-step.is-current .flow-role { color: #f07f3c; }

/* Workflow progress: fit all steps on one row, no scrolling */
.flow-stepper { overflow: visible; }
.flow-step { flex: 1 1 0; min-width: 0; padding: 0 0.15rem; }
.flow-label { overflow-wrap: anywhere; hyphens: auto; font-size: 0.7rem; }
.flow-step .flow-role { white-space: normal; overflow-wrap: anywhere; font-size: 0.56rem; line-height: 1.15; }
@media (max-width: 767.98px) {
    .flow-stepper { flex-wrap: wrap; row-gap: 0.9rem; }
    .flow-step { flex: 0 0 25%; }
    .flow-step::before { display: none; }
}

/* Case history inside the narrow right-hand column */
.case-history-compact .card-body { padding: 1rem !important; }
.case-history-compact .case-timeline { padding-left: 1.9rem; }
.case-history-compact .case-card-head { padding: 0.7rem 0.85rem; }
.case-history-compact .case-card .p-3 { padding: 0.8rem !important; }
.case-history-compact .case-money { padding: 0.4rem 0.45rem; }
.case-history-compact .case-money .amount { font-size: 0.82rem; overflow-wrap: anywhere; }
.case-history-compact .case-money .label { font-size: 0.56rem; }
.case-history-compact .case-fact-value { font-size: 0.8rem; overflow-wrap: anywhere; }

/* ==========================================================================
   Custom Animated Biometric Check-In & Check-Out Icons & Pills
   ========================================================================== */
.att-punch-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 3.5px 10px 3.5px 5px;
    border-radius: 20px;
    font-size: 0.81rem;
    font-weight: 600;
    line-height: 1.2;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    border: 1px solid transparent;
    user-select: none;
    cursor: default;
}

.att-punch-pill.att-pill-sm {
    padding: 2px 7px 2px 4px;
    font-size: 0.74rem;
    gap: 5px;
}

.att-punch-pill.att-punch-in {
    background: #ecfdf5;
    color: #065f46;
    border-color: #a7f3d0;
}
.att-punch-pill.att-punch-in:hover {
    background: #d1fae5;
    border-color: #6ee7b7;
    box-shadow: 0 3px 10px rgba(16, 185, 129, 0.18);
    transform: translateY(-1px);
}

.att-punch-pill.att-punch-in.is-late {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
    font-weight: 700;
}
.att-punch-pill.att-punch-in.is-late:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    box-shadow: 0 3px 10px rgba(239, 68, 68, 0.2);
    transform: translateY(-1px);
}

.att-punch-pill.att-punch-out {
    background: #f0f9ff;
    color: #0369a1;
    border-color: #bae6fd;
}
.att-punch-pill.att-punch-out:hover {
    background: #e0f2fe;
    border-color: #7dd3fc;
    box-shadow: 0 3px 10px rgba(14, 165, 233, 0.18);
    transform: translateY(-1px);
}

.att-punch-icon-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.att-pill-sm .att-punch-icon-box {
    width: 18px;
    height: 18px;
}

.att-punch-pill:hover .att-punch-icon-box {
    transform: scale(1.08);
}

.att-svg-icon {
    width: 13.5px;
    height: 13.5px;
    display: block;
    overflow: visible;
}

.att-pill-sm .att-svg-icon {
    width: 11.5px;
    height: 11.5px;
}

/* Animations */
@keyframes attInArrowGlide {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(2.5px);
    }
}

@keyframes attOutArrowGlide {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(-2.5px);
    }
}

@keyframes attLateDotPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.85;
    }
    50% {
        transform: scale(1.4);
        opacity: 1;
    }
}

@keyframes attDoorSway {
    0%, 100% {
        transform: rotate(0deg);
    }
    50% {
        transform: rotate(-5deg);
    }
}

.att-svg-checkin .att-arrow-group {
    animation: attInArrowGlide 2.2s ease-in-out infinite;
    transform-origin: 8px 10px;
}

.att-svg-checkin.is-late .att-arrow-group {
    animation-duration: 1.5s;
}

.att-svg-checkin.is-late .att-threshold-dot {
    animation: attLateDotPulse 1.4s ease-in-out infinite;
    transform-origin: 14px 10px;
}

.att-svg-checkout .att-arrow-group {
    animation: attOutArrowGlide 2.2s ease-in-out infinite;
    transform-origin: 5px 10px;
}

.att-svg-checkout .att-open-door {
    animation: attDoorSway 3s ease-in-out infinite;
    transform-origin: 9px 10px;
}

.att-punch-pill:hover .att-svg-checkin .att-arrow-group,
.att-punch-pill:hover .att-svg-checkout .att-arrow-group {
    animation-duration: 0.85s;
}

/* Table Header Pill Badges */
.att-th-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 2px 7px;
    border-radius: 6px;
}
.att-th-badge.th-in {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}
.att-th-badge.th-out {
    background: #f0f9ff;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

