/*
 * Paul Cab Service Management System - Global Design System & Stylesheet
 * PDP Ventures Group
 * Modern Executive Enterprise Theme - Full Responsive & Ultra-Modern UI
 */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,600&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
    /* Bootstrap 5 Core Variable Inversion for Zero-Faint-Text Guarantee */
    --bs-body-color: #0f172a;
    --bs-body-color-rgb: 15, 23, 42;
    --bs-secondary-color: #1e293b;
    --bs-secondary-color-rgb: 30, 41, 59;
    --bs-tertiary-color: #334155;
    --bs-tertiary-color-rgb: 51, 65, 85;
    --bs-heading-color: #0f172a;
    --bs-link-color: #1d4ed8;
    --bs-link-hover-color: #1e40af;

    /* Rich Executive Color Palette */
    --pcs-navy-950: #050a18;
    --pcs-navy-900: #0b132b;
    --pcs-navy-850: #0f1a3a;
    --pcs-navy-800: #14224d;
    --pcs-navy-700: #1c2b59;
    --pcs-navy-600: #283a73;
    
    /* Vibrant Accent Colors */
    --pcs-primary: #2563eb;
    --pcs-primary-hover: #1d4ed8;
    --pcs-primary-light: #eff6ff;
    --pcs-primary-glow: rgba(37, 99, 235, 0.25);
    
    --pcs-accent: #f59e0b;
    --pcs-accent-hover: #d97706;
    --pcs-accent-light: #fffbeb;
    
    --pcs-cyan: #06b6d4;
    --pcs-cyan-light: #ecfeff;
    --pcs-cyan-glow: rgba(6, 182, 212, 0.25);
    
    --pcs-emerald: #10b981;
    --pcs-emerald-hover: #059669;
    --pcs-emerald-light: #ecfdf5;
    
    --pcs-danger: #ef4444;
    --pcs-danger-hover: #dc2626;
    --pcs-danger-light: #fef2f2;
    
    --pcs-indigo: #6366f1;
    --pcs-indigo-light: #eef2ff;
    
    --pcs-purple: #8b5cf6;
    --pcs-purple-light: #f5f3ff;
    
    /* Neutral Surfaces */
    --pcs-bg: #f8fafc;
    --pcs-bg-alt: #f1f5f9;
    --pcs-surface: #ffffff;
    --pcs-surface-alt: #f8fafc;
    --pcs-surface-glass: rgba(255, 255, 255, 0.85);
    
    --pcs-border: #cbd5e1;
    --pcs-border-light: #e2e8f0;
    --pcs-border-dark: #94a3b8;
    
    /* High-Contrast Typography */
    --pcs-text: #0f172a;
    --pcs-text-secondary: #1e293b;
    --pcs-text-muted: #1e293b; /* Set to Slate-800 (>14:1 contrast) to permanently eradicate faint labels */
    --pcs-text-light: #334155;
    --pcs-text-white: #ffffff;
    
    /* Radius & Elevation */
    --pcs-radius-xs: 6px;
    --pcs-radius-sm: 10px;
    --pcs-radius: 14px;
    --pcs-radius-lg: 20px;
    --pcs-radius-xl: 28px;
    --pcs-radius-full: 9999px;
    
    --pcs-shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
    --pcs-shadow-sm: 0 2px 6px -1px rgba(15, 23, 42, 0.06), 0 1px 4px -1px rgba(15, 23, 42, 0.04);
    --pcs-shadow: 0 8px 20px -4px rgba(15, 23, 42, 0.08), 0 4px 8px -2px rgba(15, 23, 42, 0.04);
    --pcs-shadow-lg: 0 16px 36px -6px rgba(15, 23, 42, 0.12), 0 6px 14px -3px rgba(15, 23, 42, 0.06);
    --pcs-shadow-xl: 0 24px 52px -10px rgba(15, 23, 42, 0.18), 0 10px 22px -5px rgba(15, 23, 42, 0.08);
}

/* Driver Mobile Cockpit - WCAG Compliant High Contrast Hierarchy */
.driver-hero-cockpit {
    background: #ffffff !important;
    border: 2px solid #cbd5e1 !important;
    border-radius: 16px;
    padding: 1.25rem 1.35rem;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
    position: relative;
}

.driver-avatar-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eff6ff;
    color: #1d4ed8;
    border: 2px solid #93c5fd;
    border-radius: 50%;
    flex-shrink: 0;
}

.vehicle-plate {
    display: inline-block;
    padding: 3px 9px;
    background: #0f172a;
    border: 1px solid #050a18;
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
    color: #ffffff !important;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Dedicated Driver Information Box & Field System */
.driver-info-box,
.driver-particular-card {
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    padding: 0.75rem 0.9rem;
    transition: border-color 0.15s ease;
}

.driver-info-box:hover {
    border-color: #94a3b8;
}

.driver-info-label,
.driver-field-label,
.field-label,
.pcs-label,
.ui-label {
    color: #1e293b !important; /* Deep Slate-800 for crystal-clear readability */
    font-size: 0.76rem !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.6px !important;
    display: block !important;
    margin-bottom: 2px !important;
}

.driver-info-value {
    color: #050a18 !important; /* Rich Jet Black */
    font-size: 1rem !important;
    font-weight: 800 !important;
    line-height: 1.4 !important;
    display: block !important;
}

/* ==========================================================================
   GLOBAL RESET & TYPOGRAPHY
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--pcs-text);
    background-color: var(--pcs-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    letter-spacing: -0.012em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .brand-font {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--pcs-text);
    letter-spacing: -0.025em;
}

/* WCAG-Compliant Typography Utilities for Light Surfaces */
.text-muted { color: #1e293b !important; font-weight: 600; } /* Slate-800 for absolute contrast on light backgrounds */
.text-secondary { color: #0f172a !important; font-weight: 600; }
.text-dark { color: #050a18 !important; font-weight: 700; }
.text-primary { color: #1d4ed8 !important; }
.text-accent { color: #b45309 !important; }
.text-warning { color: #b45309 !important; } /* High-contrast amber (>5.0:1 on white) replacing standard yellow */
.text-warning-emphasis { color: #92400e !important; }
.text-info { color: #0369a1 !important; } /* High-contrast deep cyan (>5.6:1 on white) */
.text-info-emphasis { color: #075985 !important; }
.text-success { color: #047857 !important; } /* High-contrast rich emerald (>4.8:1 on white) */
.text-danger { color: #dc2626 !important; } /* High-contrast crimson (>4.8:1 on white) */

/* Contextual Inversion: High-Contrast Light Text on Dark Surfaces & Banners */
.bg-dark,
.bg-navy,
.pcs-hero-banner,
.pcs-offcanvas,
.pcs-header-fixed,
.pcs-dropdown-menu,
.dropdown-menu-dark,
.pcs-sidebar,
.modal-header.bg-dark,
.modal-header.bg-primary,
.modal-header.bg-danger {
    color: #ffffff;
}

.bg-dark .text-muted,
.pcs-hero-banner .text-muted,
.pcs-offcanvas .text-muted,
.pcs-header-fixed .text-muted,
.pcs-dropdown-menu .text-muted,
.dropdown-menu-dark .text-muted,
.pcs-sidebar .text-muted,
.modal-header.bg-dark .text-muted,
.modal-header.bg-primary .text-muted,
.modal-header.bg-danger .text-muted {
    color: #cbd5e1 !important;
}

.bg-dark .text-secondary,
.pcs-hero-banner .text-secondary,
.pcs-offcanvas .text-secondary,
.pcs-header-fixed .text-secondary,
.pcs-dropdown-menu .text-secondary,
.dropdown-menu-dark .text-secondary,
.pcs-sidebar .text-secondary,
.modal-header.bg-dark .text-secondary,
.modal-header.bg-primary .text-secondary {
    color: #e2e8f0 !important;
}

.bg-dark .text-warning,
.pcs-hero-banner .text-warning,
.pcs-offcanvas .text-warning {
    color: #fbbf24 !important; /* Bright amber on dark */
}

.bg-dark .text-info,
.pcs-hero-banner .text-info,
.pcs-offcanvas .text-info {
    color: #38bdf8 !important; /* Bright sky cyan on dark */
}

.bg-dark .text-success,
.pcs-hero-banner .text-success,
.pcs-offcanvas .text-success {
    color: #34d399 !important; /* Vibrant mint green on dark */
}

.bg-dark .text-danger,
.pcs-hero-banner .text-danger,
.pcs-offcanvas .text-danger {
    color: #f87171 !important; /* Light coral red on dark */
}

.bg-dark small,
.pcs-hero-banner small,
.pcs-offcanvas small,
.pcs-header-fixed small {
    color: #cbd5e1;
}

.text-white-50 {
    color: rgba(255, 255, 255, 0.88) !important; /* Enhanced from 50% to 88% for crisp dark-surface legibility */
}

small, .small {
    font-size: 0.835rem;
    font-weight: 500;
}

p {
    color: var(--pcs-text-secondary);
    line-height: 1.65;
}

strong, b, .fw-bold {
    font-weight: 700 !important;
    color: var(--pcs-text);
}

.fw-semibold { font-weight: 600 !important; }
.fw-extrabold { font-weight: 800 !important; }

code, pre {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85em;
    background: #f1f5f9;
    color: #0f172a;
    padding: 3px 7px;
    border-radius: var(--pcs-radius-xs);
    border: 1px solid #e2e8f0;
}

.font-mono {
    font-family: 'JetBrains Mono', monospace;
}

/* ==========================================================================
   PROJECT-WIDE ACCESSIBILITY & WCAG AA UI CONTRAST SYSTEM
   Guarantees readable contrast across all components, badges, modals & forms
   ========================================================================== */

/* 1. Global Badge & Status Pill High-Contrast Tokens */
.badge {
    font-weight: 700;
    letter-spacing: 0.25px;
    padding: 0.35em 0.65em;
    border-radius: var(--pcs-radius-xs, 4px);
    vertical-align: middle;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    line-height: 1.25;
}

/* Monospace Badges (Driver codes, Trip IDs, Invoice sequence) */
.badge.font-mono {
    font-family: 'JetBrains Mono', monospace !important;
    font-size: 0.8em;
    letter-spacing: 0.3px;
}

/* Dark Badge (Login ID, System Codes) */
.badge.bg-dark,
.badge.text-bg-dark {
    background-color: #0f172a !important;
    color: #ffffff !important;
    border: 1px solid #334155 !important;
}

.badge.bg-dark.font-mono,
.badge.text-bg-dark.font-mono {
    color: #ffffff !important;
    background-color: #0f172a !important;
}

/* Primary / Brand Badges */
.badge.bg-primary,
.badge.text-bg-primary {
    background-color: #2563eb !important;
    color: #ffffff !important;
}

/* Success / Active Badges */
.badge.bg-success,
.badge.text-bg-success {
    background-color: #16a34a !important;
    color: #ffffff !important;
}

/* Danger / Inactive / Cancelled Badges */
.badge.bg-danger,
.badge.text-bg-danger {
    background-color: #dc2626 !important;
    color: #ffffff !important;
}

/* Warning / Pending Badges - Strictly dark text on amber for >11:1 WCAG AA contrast */
.badge.bg-warning,
.badge.text-bg-warning {
    background-color: #f59e0b !important;
    color: #0f172a !important;
    border: 1px solid #d97706 !important;
}

/* Info Badges */
.badge.bg-info,
.badge.text-bg-info {
    background-color: #0284c7 !important;
    color: #ffffff !important;
}

/* Secondary Badges */
.badge.bg-secondary,
.badge.text-bg-secondary {
    background-color: #475569 !important;
    color: #ffffff !important;
}

/* Light Badges */
.badge.bg-light,
.badge.text-bg-light {
    background-color: #f8fafc !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
}

/* White Badges */
.badge.bg-white,
.badge.text-bg-white {
    background-color: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
}

/* 2. Contextual Dark Surface Typography Inversion */
/* In dark surfaces (sidebar, dark modal headers, hero banner, dark table headers), invert muted & secondary text */
.pcs-sidebar .text-muted,
.pcs-dropdown-menu .text-muted,
.modal-header.bg-dark .text-muted,
.table-dark .text-muted,
.pcs-hero-banner .text-muted,
.dropdown-menu-dark .text-muted,
.bg-dark .text-muted,
.text-bg-dark .text-muted {
    color: #cbd5e1 !important;
}

.pcs-sidebar .text-secondary,
.modal-header.bg-dark .text-secondary,
.table-dark .text-secondary,
.pcs-hero-banner .text-secondary,
.bg-dark .text-secondary {
    color: #e2e8f0 !important;
}

/* Modal Headers */
.modal-header.bg-dark {
    background-color: #090e1d !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.modal-header.bg-dark .modal-title {
    color: #ffffff !important;
}

.modal-header.bg-dark .btn-close,
.modal-header.bg-dark .btn-close-white {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.85;
}

.modal-header.bg-dark .btn-close:hover {
    opacity: 1;
}

/* 3. Button & Icon Contrast Enhancement */
.btn-outline-info {
    color: #0369a1 !important;
    border-color: #0284c7 !important;
}

.btn-outline-info:hover,
.btn-outline-info:focus,
.btn-outline-info:active {
    background-color: #0284c7 !important;
    color: #ffffff !important;
}

.btn-outline-warning {
    color: #b45309 !important;
    border-color: #d97706 !important;
}

.btn-outline-warning:hover,
.btn-outline-warning:focus,
.btn-outline-warning:active {
    background-color: #f59e0b !important;
    color: #0f172a !important;
}

.btn-outline-secondary {
    color: #334155 !important;
    border-color: #64748b !important;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus,
.btn-outline-secondary:active {
    background-color: #64748b !important;
    color: #ffffff !important;
}

.btn-outline-dark {
    color: #0f172a !important;
    border-color: #334155 !important;
}

.btn-outline-dark:hover,
.btn-outline-dark:focus,
.btn-outline-dark:active {
    background-color: #0f172a !important;
    color: #ffffff !important;
}

/* Ensure icons inside outline buttons follow text color */
.btn-outline-info i,
.btn-outline-warning i,
.btn-outline-secondary i,
.btn-outline-dark i {
    color: inherit !important;
}

/* 4. Form Controls, Select Options & Placeholders */
.form-control,
.form-select {
    color: #0f172a;
    background-color: #ffffff;
    border-color: var(--pcs-border, #cbd5e1);
}

.form-control::placeholder {
    color: #94a3b8 !important;
    opacity: 1;
}

.form-select option {
    background-color: #ffffff;
    color: #0f172a;
}

.form-control:disabled,
.form-select:disabled {
    background-color: #f1f5f9 !important;
    color: #64748b !important;
    opacity: 0.9;
}

.form-text {
    color: #64748b !important;
}

/* 5. Navigation Tabs & Pagination Contrast */
.nav-pills .nav-link {
    color: #334155;
    font-weight: 600;
}

.nav-pills .nav-link.active {
    background-color: #2563eb;
    color: #ffffff;
}

.pagination .page-link {
    color: #334155;
    border-color: #e2e8f0;
}

.pagination .page-item.active .page-link {
    background-color: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

/* 6. Tooltips & Popovers Contrast */
.tooltip .tooltip-inner {
    background-color: #0f172a;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.popover {
    border-color: #cbd5e1;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.popover-header {
    background-color: #f8fafc;
    color: #0f172a;
    font-weight: 700;
}

.popover-body {
    color: #334155;
}



/* Dropdown Menus */
.dropdown-menu {
    background: #ffffff;
    border: 1px solid var(--pcs-border);
    box-shadow: var(--pcs-shadow-xl);
    border-radius: var(--pcs-radius);
    padding: 8px;
    min-width: 220px;
    animation: dropdownFadeIn 0.2s ease-out;
}

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

.dropdown-header {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--pcs-text-muted);
    letter-spacing: 0.6px;
    padding: 6px 12px 4px 12px;
}

.dropdown-item {
    color: var(--pcs-text);
    font-weight: 600;
    font-size: 0.88rem;
    padding: 9px 14px;
    border-radius: var(--pcs-radius-xs);
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.dropdown-item:hover {
    background-color: var(--pcs-bg);
    color: var(--pcs-primary);
    transform: translateX(3px);
}

/* ==========================================================================
   MODERN CARD ARCHITECTURE & GLASSMORPHISM
   ========================================================================== */
.pcs-card {
    background: var(--pcs-surface);
    border: 1px solid var(--pcs-border);
    border-radius: var(--pcs-radius);
    box-shadow: var(--pcs-shadow);
    position: relative;
    overflow: hidden;
    color: var(--pcs-text);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.pcs-card:hover {
    border-color: var(--pcs-border-dark);
    box-shadow: var(--pcs-shadow-lg);
}

.pcs-card-glass {
    background: var(--pcs-surface-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: var(--pcs-shadow-lg);
    border-radius: var(--pcs-radius-lg);
}

/* Hero Executive Banner */
.pcs-hero-banner {
    background: linear-gradient(135deg, #050a18 0%, #0b132b 50%, #1c2b59 100%);
    color: #ffffff;
    border-radius: var(--pcs-radius-lg);
    padding: 2.2rem 2.4rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--pcs-shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.pcs-hero-banner::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.25) 0%, transparent 70%);
    pointer-events: none;
    border-radius: 50%;
}

.pcs-hero-banner h1, 
.pcs-hero-banner h2, 
.pcs-hero-banner h3, 
.pcs-hero-banner h4, 
.pcs-hero-banner .h3, 
.pcs-hero-banner .h4 {
    color: #ffffff !important;
}

.pcs-hero-banner p, 
.pcs-hero-banner .lead, 
.pcs-hero-banner small, 
.pcs-hero-banner .small {
    color: #e2e8f0 !important;
}

/* Pro Stat Metric Cards */
.stat-card-pro {
    background: var(--pcs-surface);
    border: 1px solid var(--pcs-border);
    border-radius: var(--pcs-radius);
    padding: 1.35rem 1.4rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--pcs-shadow);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.stat-card-pro:hover {
    transform: translateY(-4px);
    box-shadow: var(--pcs-shadow-lg);
    border-color: var(--pcs-border-dark);
}

.stat-card-pro::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.stat-card-pro.theme-primary::before { background: linear-gradient(90deg, #2563eb, #3b82f6); }
.stat-card-pro.theme-success::before { background: linear-gradient(90deg, #10b981, #34d399); }
.stat-card-pro.theme-accent::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.stat-card-pro.theme-danger::before { background: linear-gradient(90deg, #ef4444, #f87171); }
.stat-card-pro.theme-purple::before { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.stat-card-pro.theme-cyan::before { background: linear-gradient(90deg, #06b6d4, #38bdf8); }

.stat-label {
    color: var(--pcs-text-secondary) !important;
    font-size: 0.78rem;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-icon-pro {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.stat-card-pro:hover .stat-icon-pro {
    transform: scale(1.1);
}

.stat-value-pro {
    font-family: 'Outfit', sans-serif;
    font-size: 2.1rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--pcs-text);
    letter-spacing: -0.03em;
    margin: 8px 0;
}

/* Quick Action Command Center */
.quick-action-btn {
    background: var(--pcs-surface);
    border: 1px solid var(--pcs-border);
    border-radius: var(--pcs-radius);
    padding: 1.1rem;
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: var(--pcs-text) !important;
    font-weight: 700;
    font-size: 0.92rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--pcs-shadow-sm);
}

.quick-action-btn:hover {
    background: #ffffff;
    transform: translateY(-3px);
    box-shadow: var(--pcs-shadow-lg);
    border-color: var(--pcs-primary);
    color: var(--pcs-primary) !important;
}

.quick-action-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.quick-action-btn:hover .quick-action-icon {
    transform: scale(1.12);
}

/* ==========================================================================
   BADGES & STATUS PILLS
   ========================================================================== */
.badge {
    font-weight: 700;
    letter-spacing: 0.3px;
    padding: 6px 11px;
    border-radius: var(--pcs-radius-xs);
    font-size: 0.78rem;
}

.badge.bg-dark {
    background-color: #0f172a !important;
    color: #ffffff !important;
    border: 1px solid #334155 !important;
}

.badge.bg-primary {
    background-color: #1d4ed8 !important;
    color: #ffffff !important;
}

.badge.bg-success {
    background-color: #047857 !important;
    color: #ffffff !important;
}

.badge.bg-danger {
    background-color: #dc2626 !important;
    color: #ffffff !important;
}

.badge.bg-warning {
    background-color: #f59e0b !important;
    color: #0f172a !important; /* WCAG AAA compliant dark text on amber */
}

.badge.bg-info {
    background-color: #0284c7 !important;
    color: #ffffff !important;
}

.badge.bg-white, .badge.bg-white.text-dark {
    background-color: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
}

.badge.bg-light, .badge.bg-light.text-dark {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
}

.badge.bg-secondary {
    background-color: #475569 !important;
    color: #ffffff !important;
}

.badge.bg-primary-subtle {
    background-color: #dbeafe !important;
    color: #1e40af !important;
    border: 1px solid #93c5fd !important;
}

.badge.bg-success-subtle {
    background-color: #d1fae5 !important;
    color: #065f46 !important;
    border: 1px solid #6ee7b7 !important;
}

.badge.bg-warning-subtle {
    background-color: #fef3c7 !important;
    color: #92400e !important;
    border: 1px solid #fcd34d !important;
}

.badge.bg-danger-subtle {
    background-color: #fee2e2 !important;
    color: #991b1b !important;
    border: 1px solid #fca5a5 !important;
}

.badge.bg-info-subtle {
    background-color: #e0f2fe !important;
    color: #0369a1 !important;
    border: 1px solid #7dd3fc !important;
}

.badge.font-mono,
.badge .font-mono {
    font-family: 'JetBrains Mono', monospace;
}

/* Status Pills */
.status-pill {
    padding: 5px 12px;
    border-radius: var(--pcs-radius-full);
    font-weight: 700;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.status-assigned { background: #fef3c7; color: #92400e; border: 1px solid #d97706; }
.status-acknowledged { background: #e0e7ff; color: #3730a3; border: 1px solid #6366f1; }
.status-in_progress { background: #d1fae5; color: #065f46; border: 1px solid #059669; }
.status-completed { background: #dbeafe; color: #1e40af; border: 1px solid #2563eb; }
.status-cancelled { background: #fee2e2; color: #991b1b; border: 1px solid #dc2626; }
.status-draft { background: #f1f5f9; color: #334155; border: 1px solid #94a3b8; }
.status-generated { background: #fef3c7; color: #92400e; border: 1px solid #d97706; }
.status-manager_approved { background: #e0f2fe; color: #0369a1; border: 1px solid #0284c7; }
.status-audited { background: #d1fae5; color: #065f46; border: 1px solid #059669; }
.status-query_raised { background: #fee2e2; color: #991b1b; border: 1px solid #dc2626; }

/* Navigation Pills & Tabs Contrast Guarantee */
.nav-pills .nav-link {
    color: #1e293b;
    font-weight: 600;
    border-radius: var(--pcs-radius-sm);
    padding: 0.5rem 1rem;
    transition: all 0.15s ease;
}

.nav-pills .nav-link:hover {
    color: #1d4ed8;
    background-color: rgba(37, 99, 235, 0.08);
}

.nav-pills .nav-link.active {
    background-color: #2563eb !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

/* Pagination Contrast */
.pagination .page-link {
    color: #1e293b;
    background-color: #ffffff;
    border-color: #cbd5e1;
    font-weight: 600;
    font-size: 0.85rem;
}

.pagination .page-link:hover {
    color: #1d4ed8;
    background-color: #f1f5f9;
    border-color: #94a3b8;
}

.pagination .page-item.active .page-link {
    background-color: #2563eb;
    border-color: #2563eb;
    color: #ffffff !important;
}

.pagination .page-item.disabled .page-link {
    color: #94a3b8;
    background-color: #f8fafc;
}

/* Pulsing Radar Beacon */
.pulse-beacon {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #10b981;
    position: relative;
    box-shadow: 0 0 0 rgba(16, 185, 129, 0.5);
    animation: beaconPulse 1.8s infinite;
}

@keyframes beaconPulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* ==========================================================================
   RESPONSIVE TABLES & MOBILE CARDS
   ========================================================================== */
.table-responsive {
    border-radius: var(--pcs-radius);
    border: 1px solid var(--pcs-border);
    background: #ffffff;
    box-shadow: var(--pcs-shadow-sm);
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 100%;
}

.pcs-table {
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

.pcs-table thead th {
    background: #f8fafc !important;
    color: #1e293b !important;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 12px 14px;
    border-bottom: 2px solid var(--pcs-border);
    white-space: nowrap;
}

.pcs-table tbody td {
    padding: 12px 14px;
    vertical-align: middle;
    border-bottom: 1px solid var(--pcs-border-light);
    font-size: 0.88rem;
    color: var(--pcs-text);
}

.pcs-table tbody tr:hover td {
    background-color: #f8fafc;
}

.pcs-table tbody tr:last-child td {
    border-bottom: none;
}

/* Desktop Responsive Duty Review Table System */
.pcs-table-compact {
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    table-layout: auto;
}

.pcs-table-compact thead th {
    background: #0f172a !important;
    color: #f8fafc !important;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 10px;
    border-bottom: 2px solid #334155;
    white-space: nowrap;
    vertical-align: middle;
}

.pcs-table-compact tbody td {
    padding: 10px 10px;
    vertical-align: middle;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.82rem;
    color: var(--pcs-text);
    line-height: 1.4;
}

.pcs-table-compact tbody tr:hover td {
    background-color: #f8fafc;
}

.pcs-table-compact tbody tr:last-child td {
    border-bottom: none;
}

/* Fluid Desktop Column Sizing with Sensible Minimums */
.pcs-col-chk { width: 36px; min-width: 36px; text-align: center; }
.pcs-col-date { min-width: 105px; white-space: nowrap; }
.pcs-col-duty-no { min-width: 125px; }
.pcs-col-driver { min-width: 130px; }
.pcs-col-customer { min-width: 150px; }
.pcs-col-vehicle { min-width: 110px; }
.pcs-col-timings { min-width: 140px; white-space: nowrap; }
.pcs-col-duty-hrs { min-width: 60px; text-align: center; }
.pcs-col-km { min-width: 75px; text-align: right; }
.pcs-col-ot { min-width: 85px; text-align: center; }
.pcs-col-allow { min-width: 115px; }
.pcs-col-status { min-width: 90px; text-align: center; }
.pcs-col-actions { min-width: 135px; text-align: right; white-space: nowrap; }

/* Responsive Mobile Duty Cards (< 992px) */
.pcs-mobile-card-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pcs-duty-card-mobile {
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    padding: 0.9rem;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    position: relative;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pcs-duty-card-mobile:hover {
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.pcs-duty-card-mobile.border-status-pending_review {
    border-left: 4px solid #f59e0b !important;
}

.pcs-duty-card-mobile.border-status-approved {
    border-left: 4px solid #10b981 !important;
}

.pcs-duty-card-mobile.border-status-rejected {
    border-left: 4px solid #ef4444 !important;
}

.pcs-metric-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.4rem 0.5rem;
    text-align: center;
}

.pcs-metric-box .pcs-metric-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    display: block;
    margin-bottom: 2px;
}

.pcs-metric-box .pcs-metric-val {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
    font-size: 0.88rem;
    color: #0f172a;
    display: block;
    line-height: 1.2;
}

/* Number Plate Badge */
.vehicle-plate {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    background: #0f172a;
    color: #ffffff;
    padding: 4px 10px;
    border-radius: var(--pcs-radius-xs);
    letter-spacing: 0.6px;
    font-size: 0.8rem;
    display: inline-block;
    border: 1px solid #334155;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Driver Avatar Circle */
.driver-avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.95rem;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

/* ==========================================================================
   BUTTONS & INTERACTIONS
   ========================================================================== */
.btn {
    font-weight: 600;
    border-radius: var(--pcs-radius-sm);
    padding: 0.55rem 1.15rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.btn:active {
    transform: scale(0.97);
}

.btn-sm {
    padding: 0.38rem 0.8rem;
    font-size: 0.835rem;
    border-radius: var(--pcs-radius-xs);
}

.btn-lg {
    padding: 0.8rem 1.6rem;
    font-size: 1.05rem;
    border-radius: var(--pcs-radius);
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border-color: #1d4ed8;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    border-color: #1e40af;
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
    transform: translateY(-1px);
}

.btn-light {
    background-color: #f1f5f9;
    border-color: var(--pcs-border);
    color: var(--pcs-text);
}

.btn-light:hover {
    background-color: #e2e8f0;
    border-color: var(--pcs-border-dark);
    color: var(--pcs-text);
}

.btn-outline-secondary {
    color: var(--pcs-text-secondary);
    border-color: var(--pcs-border-dark);
    background-color: #ffffff;
}

.btn-outline-secondary:hover {
    background-color: var(--pcs-bg);
    color: var(--pcs-text);
    border-color: var(--pcs-text);
}

.btn-outline-light {
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
    background-color: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(8px);
}

.btn-outline-light:hover {
    background-color: #ffffff !important;
    color: var(--pcs-navy-950) !important;
    border-color: #ffffff !important;
    transform: translateY(-1px);
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-color: #d97706;
    color: #0f172a;
    font-weight: 700;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    border-color: #b45309;
    color: #ffffff;
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: #059669;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    border-color: #047857;
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-outline-primary {
    color: #1d4ed8 !important;
    border-color: #2563eb !important;
    background-color: transparent;
}

.btn-outline-primary:hover,
.btn-outline-primary:active {
    background-color: #2563eb !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}

.btn-outline-info {
    color: #0369a1 !important;
    border-color: #0284c7 !important;
    background-color: transparent;
}

.btn-outline-info:hover,
.btn-outline-info:active {
    background-color: #0284c7 !important;
    border-color: #0284c7 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}

.btn-outline-warning {
    color: #b45309 !important;
    border-color: #d97706 !important;
    background-color: transparent;
}

.btn-outline-warning:hover,
.btn-outline-warning:active {
    background-color: #d97706 !important;
    border-color: #d97706 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}

.btn-outline-success {
    color: #047857 !important;
    border-color: #059669 !important;
    background-color: transparent;
}

.btn-outline-success:hover,
.btn-outline-success:active {
    background-color: #059669 !important;
    border-color: #059669 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}

.btn-outline-danger {
    color: #dc2626 !important;
    border-color: #ef4444 !important;
    background-color: transparent;
}

.btn-outline-danger:hover,
.btn-outline-danger:active {
    background-color: #dc2626 !important;
    border-color: #dc2626 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}

.btn-outline-dark {
    color: #0f172a !important;
    border-color: #334155 !important;
    background-color: transparent;
}

.btn-outline-dark:hover,
.btn-outline-dark:active {
    background-color: #0f172a !important;
    border-color: #0f172a !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}

/* ==========================================================================
   FORMS, INPUTS & MODALS
   ========================================================================== */
.form-label {
    color: #0f172a !important;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 6px;
    display: inline-block;
}

.form-control, .form-select, input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="date"], input[type="time"], input[type="number"], input[type="search"], textarea {
    color: #0f172a !important;
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: var(--pcs-radius-sm);
    padding: 0.6rem 0.95rem;
    font-size: 0.92rem;
    font-weight: 500;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus, .form-select:focus, input:focus, textarea:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18) !important;
    color: #0f172a !important;
    background-color: #ffffff !important;
}

.form-control::placeholder, input::placeholder, textarea::placeholder {
    color: #64748b !important; /* Slate-500 for clear secondary visibility */
    opacity: 1 !important;
    font-weight: 400;
}

.form-control:disabled, .form-select:disabled, input:disabled, textarea:disabled {
    background-color: #f1f5f9 !important;
    color: #1e293b !important;
    border-color: #94a3b8 !important;
    opacity: 1 !important;
    cursor: not-allowed;
    -webkit-text-fill-color: #1e293b !important;
}

.form-control-sm, .form-select-sm {
    padding: 0.4rem 0.75rem !important;
    font-size: 0.84rem !important;
}

.text-break-word {
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
}

.table td, .table th, .pcs-table td, .pcs-table th {
    overflow-wrap: anywhere;
}

/* Select Option & Dropdown Option Legibility */
select option {
    background-color: #ffffff;
    color: #0f172a;
}

select option:disabled {
    color: #94a3b8;
    background-color: #f8fafc;
}

.form-text {
    color: #475569 !important;
    font-size: 0.8rem;
    font-weight: 500;
}

.input-group-text {
    background-color: #f8fafc;
    color: #1e293b;
    border: 1px solid #cbd5e1;
    font-weight: 600;
    border-radius: var(--pcs-radius-sm);
}

/* Modals */
.modal-content {
    background: #ffffff;
    border: 1px solid var(--pcs-border);
    border-radius: var(--pcs-radius-lg);
    box-shadow: var(--pcs-shadow-xl);
    color: var(--pcs-text);
    overflow: hidden;
}

.modal-header {
    background: #f8fafc;
    border-bottom: 1px solid var(--pcs-border-light);
    padding: 1.2rem 1.6rem;
}

.modal-header .modal-title {
    color: var(--pcs-text);
    font-weight: 800;
}

.modal-header.bg-dark,
.modal-header.bg-primary,
.modal-header.bg-danger {
    color: #ffffff !important;
}

.modal-header.bg-dark .modal-title,
.modal-header.bg-primary .modal-title,
.modal-header.bg-danger .modal-title {
    color: #ffffff !important;
}

.modal-header.bg-dark .btn-close,
.modal-header.bg-primary .btn-close,
.modal-header.bg-danger .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.85;
}

.modal-header.bg-dark .btn-close:hover,
.modal-header.bg-primary .btn-close:hover,
.modal-header.bg-danger .btn-close:hover {
    opacity: 1;
}

.modal-footer {
    background: #f8fafc;
    border-top: 1px solid var(--pcs-border-light);
    padding: 1rem 1.6rem;
}

/* Tooltips & Popovers */
.tooltip .tooltip-inner {
    background-color: #0f172a;
    color: #ffffff;
    font-size: 0.78rem;
    padding: 6px 10px;
    border-radius: var(--pcs-radius-xs);
}

.popover {
    background-color: #ffffff;
    border-color: var(--pcs-border);
    box-shadow: var(--pcs-shadow-lg);
}

.popover-header {
    background-color: #f8fafc;
    color: #0f172a;
    font-weight: 700;
}

.popover-body {
    color: #1e293b;
}

/* ==========================================================================
   MOBILE RESPONSIVENESS & TOUCH OPTIMIZATIONS
   ========================================================================== */
@media (max-width: 767.98px) {
    .stat-value-pro {
        font-size: 1.7rem;
    }
    .pcs-hero-banner {
        padding: 1.6rem 1.4rem;
        border-radius: var(--pcs-radius);
    }
    .quick-action-btn {
        padding: 0.85rem;
    }
    .pcs-table thead th,
    .pcs-table tbody td {
        padding: 10px 12px;
        font-size: 0.82rem;
    }
}

/* Custom Scrollbar for Smooth UI */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ==========================================================================
   EXECUTIVE RESPONSIVE NAVBAR & HEADER DESIGN SYSTEM
   ========================================================================== */
body.has-fixed-header {
    padding-top: 60px !important;
    overflow-x: hidden;
}

.pcs-header-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    width: 100%;
    height: 60px;
    background: linear-gradient(135deg, #0b132b 0%, #050a18 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.pcs-navbar {
    height: 100%;
    min-height: 60px;
    max-height: 60px;
    padding: 0 1rem;
    background: transparent !important;
    border: none;
    box-shadow: none;
    display: flex;
    align-items: center;
}

.pcs-header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    max-width: 100%;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
}

/* Sidebar Toggle Buttons */
.pcs-header-toggle-btn {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    color: #ffffff !important;
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    flex-shrink: 0;
    outline: none;
}

.pcs-header-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.16) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
}

.pcs-header-toggle-btn:focus-visible,
.pcs-header-toggle-btn:active {
    background: rgba(37, 99, 235, 0.25) !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.4) !important;
}

/* 1. Left Brand Section */
.pcs-header-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
    flex-shrink: 0;
    text-decoration: none;
    max-height: 48px;
    overflow: hidden;
}

.pcs-header-logo {
    height: 34px !important;
    max-height: 36px !important;
    width: auto !important;
    max-width: 130px !important;
    object-fit: contain !important;
    flex-shrink: 0 !important;
    border-radius: 6px;
    background: #ffffff;
    padding: 2px 4px;
    display: block;
}

.pcs-brand-name {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: #ffffff !important;
    letter-spacing: -0.2px;
    white-space: nowrap;
}

.pcs-brand-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.62rem;
    font-weight: 800;
    background: #f59e0b !important;
    color: #0f172a !important; /* High contrast dark navy on bright amber (>11:1) */
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    vertical-align: middle;
    white-space: nowrap;
}

.pcs-brand-sub {
    color: #94a3b8 !important; /* Crisp Slate-400 (>7.2:1 contrast against dark navy) */
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem !important;
    font-weight: 600 !important;
    line-height: 1.15 !important;
    letter-spacing: 0.35px !important;
    white-space: nowrap;
}

/* 2. Center & ERP Group Navigation Compatibility */
.pcs-header-nav {
    display: none !important; /* Replaced by Left Sidebar */
}

/* 3. Right Actions & Profile Section */
.pcs-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    min-width: 0;
}

.pcs-public-btn {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    color: #e2e8f0 !important;
    background: rgba(255, 255, 255, 0.08) !important;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    transition: all 0.18s ease;
    white-space: nowrap;
}

.pcs-public-btn i {
    color: #38bdf8 !important; /* Vibrant Cyan */
}

.pcs-public-btn:hover {
    background: rgba(255, 255, 255, 0.16) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
}

.pcs-notif-btn {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    color: #fbbf24 !important; /* Vibrant Amber Gold */
    position: relative;
    padding: 0;
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    cursor: pointer;
    outline: none;
}

.pcs-notif-btn:hover {
    background: rgba(255, 255, 255, 0.16) !important;
    color: #fde047 !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
}

.pcs-notif-btn:focus-visible {
    box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.4) !important;
}

/* User Profile Trigger Button */
.pcs-header-profile-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem 0.25rem 0.35rem;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 9999px;
    color: #ffffff !important;
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 270px;
    text-decoration: none;
    flex-shrink: 0;
    cursor: pointer;
    outline: none;
}

.pcs-header-profile-btn:hover {
    background: rgba(255, 255, 255, 0.16) !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
    color: #ffffff !important;
}

.pcs-header-profile-btn:focus-visible {
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.4) !important;
}

.pcs-profile-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff !important;
    font-weight: 800;
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.pcs-profile-name {
    font-weight: 700;
    font-size: 0.85rem;
    color: #ffffff !important;
    max-width: 130px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.1px;
}

.pcs-profile-badge {
    font-size: 0.65rem !important;
    font-weight: 800 !important;
    padding: 3px 7px !important;
    border-radius: 4px !important;
    text-transform: uppercase;
    letter-spacing: 0.4px !important;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.pcs-mobile-toggle-btn {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    color: #ffffff !important;
    padding: 0;
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.pcs-mobile-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.16) !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
    color: #ffffff !important;
}

.pcs-mobile-toggle-btn:focus-visible,
.pcs-mobile-toggle-btn:active {
    background: rgba(37, 99, 235, 0.25) !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.4) !important;
}

/* ==========================================================================
   ENTERPRISE ERP LAYOUT & COLLAPSIBLE SIDEBAR SYSTEM
   ========================================================================== */

/* ERP Main Wrapper */
.pcs-erp-wrapper {
    display: flex;
    min-height: calc(100vh - 60px);
    width: 100%;
    position: relative;
    padding-top: 60px;
}

body.has-fixed-header {
    padding-top: 0;
}

/* Left Sidebar Base */
.pcs-sidebar {
    position: fixed;
    top: 60px;
    left: 0;
    bottom: 0;
    width: 260px;
    z-index: 1030;
    background: #090e1d;
    background: linear-gradient(180deg, #0b132b 0%, #060b17 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.07);
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pcs-sidebar-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 0.85rem 0.65rem 0.65rem 0.65rem;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.pcs-sidebar-inner::-webkit-scrollbar {
    width: 5px;
}

.pcs-sidebar-inner::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

/* Sidebar Navigation Items */
.pcs-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1 0 auto;
    list-style: none !important;
    padding-left: 0 !important;
    margin: 0 !important;
}

.pcs-nav-item {
    position: relative;
    list-style: none !important;
    margin: 0;
    padding: 0;
}

.pcs-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.85rem;
    color: #94a3b8 !important;
    text-decoration: none !important;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    transition: all 0.15s ease;
    white-space: nowrap;
    border: 1px solid transparent;
    cursor: pointer;
}

.pcs-nav-link:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
    text-decoration: none !important;
}

.pcs-nav-link.active,
.pcs-nav-link.active-parent {
    color: #ffffff !important;
    background: rgba(37, 99, 235, 0.18);
    border-color: rgba(37, 99, 235, 0.35);
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.15);
    text-decoration: none !important;
}

.pcs-nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.pcs-nav-text {
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: opacity 0.2s ease;
}

.pcs-nav-arrow {
    font-size: 0.72rem;
    transition: transform 0.2s ease;
    opacity: 0.6;
    flex-shrink: 0;
}

.pcs-nav-dropdown.open > .pcs-dropdown-toggle .pcs-nav-arrow {
    transform: rotate(180deg);
    opacity: 1;
}

/* Submenu Accordion */
.pcs-submenu {
    display: none;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.35rem 0 0.35rem 1.6rem;
    margin: 0;
    position: relative;
    list-style: none !important;
}

.pcs-submenu::before {
    content: '';
    position: absolute;
    left: 1.5rem;
    top: 0.4rem;
    bottom: 0.4rem;
    width: 1.5px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 1px;
}

.pcs-nav-dropdown.open > .pcs-submenu {
    display: flex;
}

.pcs-submenu-link {
    display: flex;
    align-items: center;
    padding: 0.42rem 0.75rem;
    color: #94a3b8 !important;
    text-decoration: none !important;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 500;
    transition: all 0.15s ease;
    white-space: nowrap;
    border: 1px solid transparent;
}

.pcs-submenu-link:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.05);
    text-decoration: none !important;
}

.pcs-submenu-link.active {
    color: #38bdf8 !important;
    font-weight: 700;
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.25);
    text-decoration: none !important;
}

.pcs-submenu-link i {
    font-size: 0.95rem;
}

.pcs-badge-counter {
    font-size: 0.65rem;
    padding: 2px 6px;
    font-weight: 700;
}

/* Sidebar Footer & Collapse Button */
.pcs-sidebar-footer {
    display: flex;
    flex-direction: column;
    margin-top: auto;
}

.pcs-public-site-link {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}

.pcs-public-site-link:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.pcs-sidebar-toggle-btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.5rem 0.85rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: #94a3b8;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pcs-sidebar-toggle-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.pcs-collapse-icon {
    font-size: 0.9rem;
    transition: transform 0.25s ease;
}

/* Main Content Area */
.pcs-main-content {
    margin-left: 260px;
    min-height: calc(100vh - 60px);
    width: calc(100% - 260px);
    transition: margin-left 0.25s cubic-bezier(0.4, 0, 0.2, 1), width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-x: hidden;
    position: relative;
}

/* Non-logged in / guest full width fallback */
body:not(.has-erp-sidebar) .pcs-main-content {
    margin-left: 0 !important;
    width: 100% !important;
}

/* COLLAPSED STATE (Desktop Icon-Only Mode) */
body.sidebar-collapsed .pcs-sidebar {
    width: 70px;
}

body.sidebar-collapsed .pcs-main-content {
    margin-left: 70px;
    width: calc(100% - 70px);
}

body.sidebar-collapsed .pcs-nav-text,
body.sidebar-collapsed .pcs-nav-arrow,
body.sidebar-collapsed .pcs-badge-counter,
body.sidebar-collapsed .pcs-ext-icon {
    display: none !important;
}

body.sidebar-collapsed .pcs-nav-link {
    justify-content: center;
    padding: 0.65rem 0.5rem;
    gap: 0;
}

body.sidebar-collapsed .pcs-nav-icon {
    font-size: 1.25rem;
    margin: 0;
}

body.sidebar-collapsed .pcs-submenu {
    display: none !important;
}

body.sidebar-collapsed .pcs-collapse-icon {
    transform: rotate(180deg);
}

body.sidebar-collapsed .pcs-sidebar-toggle-btn {
    justify-content: center;
    padding: 0.5rem 0;
}

/* Executive Dropdown Menus */
.pcs-dropdown-menu {
    background: #0b132b !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    border-radius: 12px !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45) !important;
    padding: 0.4rem !important;
    backdrop-filter: blur(16px);
}

.pcs-dropdown-menu .dropdown-header {
    color: #94a3b8;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 0.4rem 0.75rem 0.2rem;
}

.pcs-dropdown-menu .dropdown-item {
    color: #e2e8f0;
    border-radius: 8px;
    padding: 0.45rem 0.75rem;
    font-size: 0.84rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    transition: all 0.15s ease;
}

.pcs-dropdown-menu .dropdown-item:hover,
.pcs-dropdown-menu .dropdown-item:focus {
    background: rgba(37, 99, 235, 0.25);
    color: #ffffff;
}

.pcs-dropdown-menu .dropdown-item.active {
    background: #2563eb;
    color: #ffffff;
}

.pcs-dropdown-menu .dropdown-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 0.35rem 0;
}

/* Mobile Offcanvas Drawer */
.pcs-offcanvas {
    background: #0b132b !important;
    color: #ffffff;
    width: 300px;
    max-width: 85vw;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
}

.pcs-offcanvas .offcanvas-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1rem 1.25rem;
    background: #050a18;
}

.pcs-offcanvas .offcanvas-body {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.pcs-drawer-section-title {
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin: 0.85rem 0 0.35rem 0.5rem;
}

.pcs-drawer-link {
    color: #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
    margin-bottom: 2px;
}

.pcs-drawer-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.pcs-drawer-link.active {
    background: rgba(37, 99, 235, 0.25);
    color: #ffffff;
    border: 1px solid rgba(37, 99, 235, 0.4);
}

.pcs-drawer-profile-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.85rem;
    margin-top: auto;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS & GLOBAL CONTAINMENT (Zero Horizontal Scrollbar Guarantee)
   ========================================================================== */
html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
    margin: 0;
    padding: 0;
}

.pcs-erp-wrapper {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
}

.pcs-main-content {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
}

.container-fluid {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden;
}

/* Modals Mobile Responsiveness */
@media (max-width: 767.98px) {
    .modal-dialog {
        margin: 0.5rem auto !important;
        max-width: calc(100% - 1rem) !important;
        width: calc(100% - 1rem) !important;
    }
    .modal-content {
        max-height: calc(100vh - 1rem);
        display: flex;
        flex-direction: column;
    }
    .modal-body {
        overflow-y: auto !important;
        max-height: calc(85vh - 120px) !important;
        -webkit-overflow-scrolling: touch;
        padding: 1rem !important;
    }
}

@media (max-width: 1199.98px) {
    .pcs-brand-badge {
        display: none !important;
    }
}

@media (max-width: 991.98px) {
    .pcs-sidebar {
        display: none !important;
    }
    
    .pcs-main-content {
        margin-left: 0 !important;
        width: 100% !important;
    }

    .pcs-profile-badge {
        display: none !important;
    }

    .pcs-public-btn span {
        display: none !important;
    }

    .pcs-public-btn {
        padding: 0.35rem 0.5rem;
    }
}

@media (max-width: 575.98px) {
    .pcs-header-fixed {
        height: 60px;
    }
    .pcs-navbar {
        min-height: 60px;
        max-height: 60px;
        padding: 0 0.5rem;
    }
    .pcs-brand-badge {
        display: none !important;
    }
    .pcs-brand-name {
        font-size: 0.92rem;
    }
    .pcs-header-logo {
        height: 30px !important;
        max-height: 30px !important;
        max-width: 100px !important;
    }
    .pcs-profile-name {
        display: none !important;
    }
    .pcs-header-profile-btn {
        padding: 0.15rem;
        background: transparent;
        border: none;
    }
    .pcs-header-profile-btn i {
        display: none !important;
    }
}

/* Specific Mobile Viewport Refinements (320px - 430px) */
@media (max-width: 430px) {
    body {
        font-size: 0.92rem;
    }
    .pcs-hero-banner {
        padding: 1.25rem 1rem !important;
    }
    .pcs-hero-banner h1, .pcs-hero-banner h2, .pcs-hero-banner .display-6 {
        font-size: 1.35rem !important;
    }
    .stat-card-pro {
        padding: 1rem 0.85rem !important;
    }
    .stat-value-pro {
        font-size: 1.55rem !important;
    }
    .stat-icon-pro {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }
    .pcs-table thead th, .pcs-table tbody td {
        padding: 9px 10px !important;
        font-size: 0.82rem !important;
    }
    .btn {
        padding: 0.45rem 0.85rem;
        font-size: 0.86rem;
    }
    .btn-sm {
        padding: 0.32rem 0.65rem;
        font-size: 0.8rem;
    }
    .modal-header {
        padding: 1rem 1.25rem;
    }
    .modal-body {
        padding: 1.1rem 1.25rem;
    }
    .modal-footer {
        padding: 0.85rem 1.25rem;
    }
}

/* Extra Small Viewports (320px - 360px) */
@media (max-width: 360px) {
    .pcs-brand-name {
        font-size: 0.84rem !important;
        max-width: 110px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .pcs-header-logo {
        height: 28px !important;
        max-height: 28px !important;
        max-width: 80px !important;
    }
    .stat-value-pro {
        font-size: 1.35rem !important;
    }
    .quick-action-btn {
        padding: 0.75rem !important;
        font-size: 0.82rem !important;
        gap: 8px !important;
    }
    .quick-action-icon {
        width: 36px !important;
        height: 36px !important;
        font-size: 1.1rem !important;
    }
}

/* ==========================================================================
   OFFICIAL DRIVER PAYSLIP & FINAL DUTY LOG A4 DESIGN SYSTEM
   ========================================================================== */
.payslip-a4-frame,
.dutylog-a4-frame {
    width: 196mm;
    max-width: 100%;
    min-height: 280mm;
    margin: 12px auto;
    background: #ffffff;
    border: 1.5px solid #0f172a;
    border-radius: 4px;
    padding: 7mm 9mm 6mm 9mm;
    box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.15);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #0f172a;
}

.payslip-a4-frame {
    page-break-after: always;
    break-after: page;
}

.dutylog-a4-frame {
    page-break-after: auto;
    break-after: auto;
}

.payslip-watermark {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 105mm;
    max-width: 320px;
    opacity: 0.05;
    pointer-events: none;
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    user-select: none;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
}

.payslip-watermark img {
    width: 100%;
    max-width: 260px;
    height: auto;
    max-height: 90mm;
    object-fit: contain;
    filter: grayscale(20%);
}

.payslip-content,
.dutylog-content {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.info-table th {
    font-weight: 700;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 4px 8px;
    vertical-align: middle;
}

.info-table td {
    padding: 4px 8px;
    vertical-align: middle;
}

.dutylog-table th {
    font-weight: 700;
    font-size: 7.5px;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    padding: 3px 2px;
    vertical-align: middle;
}

.dutylog-table td {
    padding: 2.5px 2px;
    vertical-align: middle;
    font-size: 7.5px;
}

/* Strict A4 Print Rules for 2-Page Payslip + Final Duty Log Statement */
@media print {
    .payslip-a4-frame {
        width: 100% !important;
        min-height: 275mm !important;
        margin: 0 !important;
        padding: 6mm 8mm 5mm 8mm !important;
        box-shadow: none !important;
        border: 1.5px solid #0f172a !important;
        border-radius: 2px !important;
        page-break-after: always !important;
        break-after: page !important;
        page-break-inside: avoid !important;
    }

    .dutylog-a4-frame {
        width: 100% !important;
        min-height: 275mm !important;
        margin: 0 !important;
        padding: 6mm 8mm 5mm 8mm !important;
        box-shadow: none !important;
        border: 1.5px solid #0f172a !important;
        border-radius: 2px !important;
        page-break-after: auto !important;
        break-after: auto !important;
        page-break-inside: auto !important;
    }

    .dutylog-table thead {
        display: table-header-group !important;
    }

    .dutylog-table tr {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }
}

