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

/* ==========================================================================
   PAWS Custom Design System & Colorful UI Theme
   Light background & attractive foreground colors
   ========================================================================== */

:root {
    /* Color Palette */
    --primary: #4361ee;
    --primary-hover: #3a0ca3;
    --primary-light: #eef2ff;
    --primary-gradient: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
    
    --success: #10b981;
    --success-light: #ecfdf5;
    --success-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
    
    --danger: #ef4444;
    --danger-light: #fff1f2;
    --danger-gradient: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    
    --warning: #f59e0b;
    --warning-light: #fffbeb;
    --warning-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    
    --info: #06b6d4;
    --info-light: #ecfeff;
    --info-gradient: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    
    --purple: #8b5cf6;
    --purple-light: #f5f3ff;
    --purple-gradient: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    
    --slate: #64748b;
    --slate-light: #f1f5f9;
    --slate-gradient: linear-gradient(135deg, #64748b 0%, #475569 100%);
    
    /* Background & Surfaces */
    --bg-body: #f1f5f9;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --border-focus: #818cf8;
    
    /* Text */
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-heading: #1e293b;
}

/* Base Body Styling */
body {
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f1f5f9 0%, #e8eef6 50%, #f0f4fb 100%) !important;
    background-attachment: fixed !important;
    color: var(--text-main);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* Typography Enhancements */
h1, .h1 {
    font-size: 1.35rem;
    font-weight: 650;
    letter-spacing: -0.02em;
    color: var(--text-heading);
}

h2, .h2 {
    font-size: 1.2rem;
    font-weight: 650;
    letter-spacing: -0.015em;
    color: var(--text-heading);
}

h3, .h3 {
    font-size: 1.05rem;
    font-weight: 650;
    letter-spacing: -0.01em;
    color: var(--text-heading);
}

h4, .h4 {
    font-size: 0.94rem;
    font-weight: 650;
    color: var(--text-heading);
}

h5, .h5 {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-heading);
}

h6, .h6 {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-heading);
}

main.py-4, main[class*="py-4"] {
    padding-top: 0.85rem !important;
    padding-bottom: 1.25rem !important;
}

main.px-md-4, main[class*="px-md-4"] {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

main > .d-flex.border-bottom {
    padding-top: 0.25rem !important;
    padding-bottom: 0.5rem !important;
    margin-bottom: 0.75rem !important;
}

main > h4,
main .d-flex + h4,
main .row + h4,
main h4:not(.card-header h4):not(.card h4):not(.modal h4) {
    color: #334155 !important;
    font-weight: 650 !important;
    font-size: 0.92rem !important;
    padding-left: 0.55rem !important;
    border-left: 3.5px solid #4361ee !important;
    border-bottom: none !important;
    margin-top: 1.1rem !important;
    margin-bottom: 0.5rem !important;
}

.card-header h4, .card h4 {
    border-left: none !important;
    padding-left: 0 !important;
    margin-top: 0 !important;
    font-size: 0.9rem !important;
}

/* ==========================================================================
   Topbar (Compact, Luminous Light Header with Vibrant Accents)
   ========================================================================== */
.topbar-header, .navbar.sticky-top, header.navbar {
    background: linear-gradient(90deg, #ffffff 0%, #f8faff 50%, #edf2f9 100%) !important;
    border-bottom: 1.5px solid #e0e7ff !important;
    box-shadow: 0 2px 10px rgba(67, 97, 238, 0.06) !important;
    backdrop-filter: blur(10px);
    min-height: 48px !important;
    max-height: 48px !important;
}

.navbar-brand {
    font-weight: 650 !important;
    font-size: 1.05rem !important;
    color: #1e293b !important;
    letter-spacing: -0.3px;
    min-height: 48px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Tenant Selector Pill */
.tenant-select {
    background: linear-gradient(135deg, #ffffff 0%, #eef2ff 100%) !important;
    border: 1.2px solid #c7d2fe !important;
    box-shadow: 0 1px 4px rgba(99, 102, 241, 0.08) !important;
    padding: 0.15rem 0.65rem !important;
    transition: all 0.25s ease !important;
}

.tenant-select:hover {
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%) !important;
    border-color: #818cf8 !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(99, 102, 241, 0.15) !important;
}

.tenant-select select {
    color: #1e1b4b !important;
    font-weight: 600 !important;
    font-size: 0.8rem !important;
    padding-top: 0.15rem !important;
    padding-bottom: 0.15rem !important;
}

.tenant-select i {
    color: #4361ee !important;
    font-size: 0.95rem;
}

/* ==========================================================================
   Sidebar (Clean & Professional Enterprise Navigation)
   ========================================================================== */
#sidebarMenu, .sidebar {
    background: #ffffff !important;
    border-right: 1px solid #e2e8f0 !important;
    min-height: 100vh;
    box-shadow: 1px 0 3px rgba(0, 0, 0, 0.02);
}

/* Edge Collapse Toggle */
#edgeSidebarToggle {
    background: #4361ee !important;
    box-shadow: 0 4px 10px rgba(67, 97, 238, 0.25) !important;
    transition: all 0.2s ease;
}

#edgeSidebarToggle:hover {
    transform: translateY(-50%) scale(1.06) !important;
    background: #3730a3 !important;
}

/* Sidebar Section Headings - Clean, muted, modern enterprise style */
.sidebar-heading {
    margin: 0.8rem 0.6rem 0.25rem 0.6rem !important;
    padding: 0.35rem 0.55rem !important;
    border-radius: 6px !important;
    font-size: 0.68rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.55px !important;
    text-transform: uppercase !important;
    color: #64748b !important;
    background: transparent !important;
    border: none !important;
    border-left: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    cursor: pointer !important;
    user-select: none !important;
    transition: color 0.15s ease, background-color 0.15s ease !important;
}

.sidebar-heading:hover {
    color: #0f172a !important;
    background-color: #f8fafc !important;
}

.sidebar-heading span {
    color: inherit !important;
    font-size: 0.68rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.55px !important;
}

.sidebar-heading i:first-child {
    font-size: 0.95rem !important;
}

.sidebar-heading .bi-chevron-down {
    font-size: 0.72rem !important;
    color: #94a3b8 !important;
    transition: transform 0.2s ease-in-out, color 0.15s ease !important;
}

.sidebar-heading.collapsed .bi-chevron-down {
    transform: rotate(-90deg) !important;
}

.sidebar-heading:not(.collapsed) .bi-chevron-down {
    transform: rotate(0deg) !important;
}

.sidebar-heading:hover .bi-chevron-down {
    color: #475569 !important;
}

/* Nav Links inside Sidebar */
.sidebar .nav-link {
    color: #475569 !important;
    font-weight: 500 !important;
    font-size: 0.82rem !important;
    padding: 0.38rem 0.7rem !important;
    border-radius: 6px !important;
    margin: 0.08rem 0.5rem !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
    display: flex !important;
    align-items: center !important;
    text-decoration: none !important;
    transition: all 0.15s ease !important;
}

.sidebar .nav-link:hover {
    color: #0f172a !important;
    background-color: #f1f5f9 !important;
    border-color: transparent !important;
    transform: none !important;
    box-shadow: none !important;
}

.sidebar .nav-link.active {
    color: #2563eb !important;
    background-color: #eff6ff !important;
    border-color: #dbeafe !important;
    font-weight: 600 !important;
    box-shadow: none !important;
    transform: none !important;
}

.sidebar .nav-link.active span {
    color: #2563eb !important;
}

.sidebar .nav-link i {
    margin-right: 8px !important;
    font-size: 0.95rem !important;
    width: 18px !important;
    text-align: center !important;
    display: inline-block !important;
    vertical-align: middle !important;
    flex-shrink: 0 !important;
    transition: transform 0.15s ease !important;
}

.sidebar .nav-link:hover i {
    transform: scale(1.1);
}

/* Stage sub-items indentation and styling */
.sidebar .nav-stage-link {
    padding-left: 1.15rem !important;
    font-size: 0.8rem !important;
    color: #64748b !important;
}

.sidebar .nav-stage-link:hover {
    color: #0f172a !important;
}

.sidebar .nav-stage-link.active {
    color: #2563eb !important;
    background-color: #eff6ff !important;
    border-color: #dbeafe !important;
}

/* Small, elegant status dots for stages */
.sidebar .stage-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 9px;
    flex-shrink: 0;
}
.sidebar .stage-dot-draft { background-color: #94a3b8; }
.sidebar .stage-dot-submitted { background-color: #3b82f6; }
.sidebar .stage-dot-under-review { background-color: #06b6d4; }
.sidebar .stage-dot-returned { background-color: #ef4444; }
.sidebar .stage-dot-approved { background-color: #10b981; }
.sidebar .stage-dot-accepted { background-color: #8b5cf6; }
.sidebar .stage-dot-active { background-color: #f59e0b; }
.sidebar .stage-dot-closed { background-color: #64748b; }

/* ==========================================================================
   Cards & Surface Containers
   ========================================================================== */
.card {
    background-color: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.02);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

/* ==========================================================================
   Stat & Dashboard Cards: Light Color Backgrounds + Attractive Foreground Colors
   ========================================================================== */

/* Primary Stat Card (Organisations / Plants / General Primary) */
.card.bg-primary,
.card.border-primary:not(.btn) {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%) !important;
    border: 1.5px solid #93c5fd !important;
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.1) !important;
    color: #1e3a8a !important;
}
.card.bg-primary .card-title,
.card.bg-primary h5,
.card.bg-primary h6,
.card.bg-primary .text-white-50 {
    color: #1d4ed8 !important;
    opacity: 1 !important;
    font-weight: 600 !important;
    font-size: 0.82rem !important;
}
.card.bg-primary .card-text,
.card.bg-primary .display-6,
.card.bg-primary .h2,
.card.bg-primary p {
    color: #1e3a8a !important;
    font-weight: 700 !important;
}
.card.bg-primary a,
.card.bg-primary span,
.card.bg-primary i,
.card.bg-primary .text-white {
    color: #2563eb !important;
    opacity: 1 !important;
}
.card.bg-primary a:hover {
    color: #1e3a8a !important;
    text-decoration: underline !important;
}

/* Success Stat Card (Users / Approvals) */
.card.bg-success,
.card.border-success:not(.btn) {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%) !important;
    border: 1.5px solid #6ee7b7 !important;
    box-shadow: 0 3px 10px rgba(16, 185, 129, 0.1) !important;
    color: #064e3b !important;
}
.card.bg-success .card-title,
.card.bg-success h5,
.card.bg-success h6,
.card.bg-success .text-white-50 {
    color: #059669 !important;
    opacity: 1 !important;
    font-weight: 600 !important;
    font-size: 0.82rem !important;
}
.card.bg-success .card-text,
.card.bg-success .display-6,
.card.bg-success .h2,
.card.bg-success p {
    color: #064e3b !important;
    font-weight: 700 !important;
}
.card.bg-success a,
.card.bg-success span,
.card.bg-success i,
.card.bg-success .text-white {
    color: #10b981 !important;
    opacity: 1 !important;
}
.card.bg-success a:hover {
    color: #064e3b !important;
    text-decoration: underline !important;
}

/* Info Stat Card (Permits / Contractors) */
.card.bg-info,
.card.border-info:not(.btn) {
    background: linear-gradient(135deg, #ecfeff 0%, #cffafe 100%) !important;
    border: 1.5px solid #67e8f9 !important;
    box-shadow: 0 3px 10px rgba(6, 182, 212, 0.1) !important;
    color: #0e7490 !important;
}
.card.bg-info .card-title,
.card.bg-info h5,
.card.bg-info h6,
.card.bg-info .text-white-50 {
    color: #0891b2 !important;
    opacity: 1 !important;
    font-weight: 600 !important;
    font-size: 0.82rem !important;
}
.card.bg-info .card-text,
.card.bg-info .display-6,
.card.bg-info .h2,
.card.bg-info p {
    color: #0e7490 !important;
    font-weight: 700 !important;
}
.card.bg-info a,
.card.bg-info span,
.card.bg-info i,
.card.bg-info .text-white {
    color: #0891b2 !important;
    opacity: 1 !important;
}
.card.bg-info a:hover {
    color: #155e75 !important;
    text-decoration: underline !important;
}

/* Warning Stat Card (Departments / Active work) */
.card.bg-warning,
.card.border-warning:not(.btn) {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%) !important;
    border: 1.5px solid #fcd34d !important;
    box-shadow: 0 3px 10px rgba(245, 158, 11, 0.1) !important;
    color: #78350f !important;
}
.card.bg-warning .card-title,
.card.bg-warning h5,
.card.bg-warning h6 {
    color: #d97706 !important;
    opacity: 1 !important;
    font-weight: 600 !important;
    font-size: 0.82rem !important;
}
.card.bg-warning .card-text,
.card.bg-warning .display-6,
.card.bg-warning .h2,
.card.bg-warning p {
    color: #78350f !important;
    font-weight: 700 !important;
}
.card.bg-warning a,
.card.bg-warning span,
.card.bg-warning i,
.card.bg-warning .text-dark {
    color: #b45309 !important;
    opacity: 1 !important;
}
.card.bg-warning a:hover {
    color: #78350f !important;
    text-decoration: underline !important;
}

/* Purple Stat Card (Visitor Logs) */
.card[style*="#6366f1"],
.card[style*="rgb(99, 102, 241)"],
.card.bg-purple {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%) !important;
    border: 1.5px solid #c4b5fd !important;
    box-shadow: 0 3px 10px rgba(139, 92, 246, 0.1) !important;
    color: #4c1d95 !important;
}
.card[style*="#6366f1"] .card-title,
.card[style*="#6366f1"] h5,
.card[style*="#6366f1"] h6,
.card.bg-purple .card-title,
.card.bg-purple h5,
.card.bg-purple h6,
.card[style*="#6366f1"] .text-white-50 {
    color: #7c3aed !important;
    opacity: 1 !important;
    font-weight: 600 !important;
    font-size: 0.82rem !important;
}
.card[style*="#6366f1"] .card-text,
.card[style*="#6366f1"] .display-6,
.card[style*="#6366f1"] .h2,
.card[style*="#6366f1"] p,
.card.bg-purple .card-text,
.card.bg-purple .display-6,
.card.bg-purple .h2,
.card.bg-purple p {
    color: #4c1d95 !important;
    font-weight: 700 !important;
}
.card[style*="#6366f1"] a,
.card[style*="#6366f1"] span,
.card[style*="#6366f1"] i,
.card.bg-purple a,
.card.bg-purple span,
.card.bg-purple i,
.card[style*="#6366f1"] .text-white {
    color: #8b5cf6 !important;
    opacity: 1 !important;
}

/* Compact Tile Body Padding & Sizing */
.card-body {
    padding: 0.8rem 1rem;
}

.card.bg-primary .card-body,
.card.bg-success .card-body,
.card.bg-info .card-body,
.card.bg-warning .card-body,
.card.bg-purple .card-body,
.card-hover .card-body,
.tile-hover .card-body,
.live-tile .card-body,
.visitor-tile .card-body {
    padding: 0.65rem 0.9rem !important;
}

.card .card-text.display-6,
.card .display-6,
.display-6 {
    font-size: 1.55rem !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
    margin-bottom: 0.15rem !important;
}

.card .rounded-circle[style*="width: 40px"],
.card .rounded-circle[style*="width: 38px"],
.card .rounded-circle[style*="width: 52px"] {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    padding: 0 !important;
}

.card .rounded-circle[style*="width: 40px"] i,
.card .rounded-circle[style*="width: 38px"] i,
.card .rounded-circle[style*="width: 52px"] i {
    font-size: 0.95rem !important;
}

/* Hover effect on stat cards */
.card-hover:hover,
.tile-hover:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.1) !important;
}

/* Live Support Tiles & Visitor Tiles: Colorful Light-Pastel Tints */
.live-tile, .visitor-tile {
    border-radius: 16px !important;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease !important;
}

.col-sm-6:nth-child(1) .live-tile,
.col-xl-3:nth-child(1) .live-tile,
.col-sm-6:nth-child(1) .visitor-tile,
.col-xl-3:nth-child(1) .visitor-tile {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%) !important;
    border: 1.5px solid #bfdbfe !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.08) !important;
}

.col-sm-6:nth-child(2) .live-tile,
.col-xl-3:nth-child(2) .live-tile,
.col-sm-6:nth-child(2) .visitor-tile,
.col-xl-3:nth-child(2) .visitor-tile {
    background: linear-gradient(135deg, #ecfeff 0%, #cffafe 100%) !important;
    border: 1.5px solid #a5f3fc !important;
    box-shadow: 0 4px 14px rgba(6, 182, 212, 0.08) !important;
}

.col-sm-6:nth-child(3) .live-tile,
.col-xl-3:nth-child(3) .live-tile {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%) !important;
    border: 1.5px solid #fde68a !important;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.08) !important;
}

.col-sm-6:nth-child(3) .visitor-tile,
.col-xl-3:nth-child(3) .visitor-tile {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%) !important;
    border: 1.5px solid #a7f3d0 !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.08) !important;
}

.col-sm-6:nth-child(4) .live-tile,
.col-xl-3:nth-child(4) .live-tile {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%) !important;
    border: 1.5px solid #a7f3d0 !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.08) !important;
}

.col-sm-6:nth-child(4) .visitor-tile,
.col-xl-3:nth-child(4) .visitor-tile {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%) !important;
    border: 1.5px solid #fde68a !important;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.08) !important;
}

.live-tile:hover, .visitor-tile:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.1) !important;
}

.card-header {
    background: linear-gradient(135deg, #f8faff 0%, #f1f5f9 100%) !important;
    border-bottom: 1.5px solid #e2e8f0 !important;
    color: #1e293b !important;
    font-weight: 650 !important;
    font-size: 0.88rem !important;
    border-radius: 12px 12px 0 0 !important;
    padding: 0.45rem 0.85rem !important;
}

.card-header.bg-white {
    background: linear-gradient(135deg, #ffffff 0%, #f8faff 100%) !important;
    border-bottom: 1.5px solid #e2e8f0 !important;
    color: #1e293b !important;
    padding: 0.45rem 0.85rem !important;
}

.card-header.bg-light {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%) !important;
    color: #1e293b !important;
    border-bottom: 1.5px solid #cbd5e1 !important;
    padding: 0.45rem 0.85rem !important;
}

/* Primary Header */
.card-header.bg-primary {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%) !important;
    border-bottom: 1.5px solid #93c5fd !important;
}
.card-header.bg-primary,
.card-header.bg-primary h1, .card-header.bg-primary h2, .card-header.bg-primary h3,
.card-header.bg-primary h4, .card-header.bg-primary h5, .card-header.bg-primary h6,
.card-header.bg-primary p, .card-header.bg-primary strong,
.card-header.bg-primary span:not(.badge), .card-header.bg-primary div:not(.badge),
.card-header.bg-primary i:not(.badge i), .card-header.bg-primary.text-white,
.card-header.bg-primary .text-white:not(.badge) {
    color: #1e40af !important;
}
.card-header.bg-primary .text-white-50, .card-header.bg-primary .opacity-75 {
    color: #2563eb !important;
    opacity: 1 !important;
}

/* Success Header */
.card-header.bg-success {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%) !important;
    border-bottom: 1.5px solid #6ee7b7 !important;
}
.card-header.bg-success,
.card-header.bg-success h1, .card-header.bg-success h2, .card-header.bg-success h3,
.card-header.bg-success h4, .card-header.bg-success h5, .card-header.bg-success h6,
.card-header.bg-success p, .card-header.bg-success strong,
.card-header.bg-success span:not(.badge), .card-header.bg-success div:not(.badge),
.card-header.bg-success i:not(.badge i), .card-header.bg-success.text-white,
.card-header.bg-success .text-white:not(.badge) {
    color: #065f46 !important;
}
.card-header.bg-success .text-white-50, .card-header.bg-success .opacity-75 {
    color: #059669 !important;
    opacity: 1 !important;
}

/* Info Header */
.card-header.bg-info {
    background: linear-gradient(135deg, #ecfeff 0%, #cffafe 100%) !important;
    border-bottom: 1.5px solid #67e8f9 !important;
}
.card-header.bg-info,
.card-header.bg-info h1, .card-header.bg-info h2, .card-header.bg-info h3,
.card-header.bg-info h4, .card-header.bg-info h5, .card-header.bg-info h6,
.card-header.bg-info p, .card-header.bg-info strong,
.card-header.bg-info span:not(.badge), .card-header.bg-info div:not(.badge),
.card-header.bg-info i:not(.badge i), .card-header.bg-info.text-white,
.card-header.bg-info .text-white:not(.badge) {
    color: #0e7490 !important;
}
.card-header.bg-info .text-white-50, .card-header.bg-info .opacity-75 {
    color: #0891b2 !important;
    opacity: 1 !important;
}

/* Warning Header */
.card-header.bg-warning {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%) !important;
    border-bottom: 1.5px solid #fcd34d !important;
}
.card-header.bg-warning,
.card-header.bg-warning h1, .card-header.bg-warning h2, .card-header.bg-warning h3,
.card-header.bg-warning h4, .card-header.bg-warning h5, .card-header.bg-warning h6,
.card-header.bg-warning p, .card-header.bg-warning strong,
.card-header.bg-warning span:not(.badge), .card-header.bg-warning div:not(.badge),
.card-header.bg-warning i:not(.badge i), .card-header.bg-warning.text-white,
.card-header.bg-warning .text-white:not(.badge), .card-header.bg-warning.text-dark,
.card-header.bg-warning .text-dark {
    color: #92400e !important;
}
.card-header.bg-warning .text-white-50, .card-header.bg-warning .opacity-75 {
    color: #b45309 !important;
    opacity: 1 !important;
}

/* Danger Header */
.card-header.bg-danger {
    background: linear-gradient(135deg, #fff1f2 0%, #fee2e2 100%) !important;
    border-bottom: 1.5px solid #fca5a5 !important;
}
.card-header.bg-danger,
.card-header.bg-danger h1, .card-header.bg-danger h2, .card-header.bg-danger h3,
.card-header.bg-danger h4, .card-header.bg-danger h5, .card-header.bg-danger h6,
.card-header.bg-danger p, .card-header.bg-danger strong,
.card-header.bg-danger span:not(.badge), .card-header.bg-danger div:not(.badge),
.card-header.bg-danger i:not(.badge i), .card-header.bg-danger.text-white,
.card-header.bg-danger .text-white:not(.badge) {
    color: #991b1b !important;
}
.card-header.bg-danger .text-white-50, .card-header.bg-danger .opacity-75 {
    color: #dc2626 !important;
    opacity: 1 !important;
}

/* Secondary Header */
.card-header.bg-secondary {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%) !important;
    border-bottom: 1.5px solid #cbd5e1 !important;
}
.card-header.bg-secondary,
.card-header.bg-secondary h1, .card-header.bg-secondary h2, .card-header.bg-secondary h3,
.card-header.bg-secondary h4, .card-header.bg-secondary h5, .card-header.bg-secondary h6,
.card-header.bg-secondary p, .card-header.bg-secondary strong,
.card-header.bg-secondary span:not(.badge), .card-header.bg-secondary div:not(.badge),
.card-header.bg-secondary i:not(.badge i), .card-header.bg-secondary.text-white,
.card-header.bg-secondary .text-white:not(.badge) {
    color: #334155 !important;
}

/* Dark Header */
.card-header.bg-dark {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
    border-bottom: 1.5px solid #0f172a !important;
}
.card-header.bg-dark,
.card-header.bg-dark h1, .card-header.bg-dark h2, .card-header.bg-dark h3,
.card-header.bg-dark h4, .card-header.bg-dark h5, .card-header.bg-dark h6,
.card-header.bg-dark p, .card-header.bg-dark strong,
.card-header.bg-dark span:not(.badge), .card-header.bg-dark div:not(.badge),
.card-header.bg-dark i:not(.badge i), .card-header.bg-dark.text-white,
.card-header.bg-dark .text-white:not(.badge) {
    color: #ffffff !important;
}

/* ==========================================================================
   Quick Action "Create New Permit" Tiles (Vibrant & Colorful)
   ========================================================================== */
main a[href*="type="] {
    padding: 0.38rem 0.75rem !important;
    min-width: 110px !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
}
main a[href*="type="] i {
    font-size: 1.15rem !important;
    margin-bottom: 0.15rem !important;
}
main a[href*="type="] span {
    font-size: 0.78rem !important;
    font-weight: 600 !important;
}

main a[href*="type=cold"] {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%) !important;
    border: 1.5px solid #7dd3fc !important;
    color: #0369a1 !important;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.12) !important;
    transition: all 0.25s ease !important;
}
main a[href*="type=cold"]:hover {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
    color: #ffffff !important;
    border-color: #0284c7 !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 20px rgba(2, 132, 199, 0.3) !important;
}
main a[href*="type=cold"]:hover i, main a[href*="type=cold"]:hover span {
    color: #ffffff !important;
}

main a[href*="type=hot"] {
    background: linear-gradient(135deg, #fff1f2 0%, #fee2e2 100%) !important;
    border: 1.5px solid #fca5a5 !important;
    color: #b91c1c !important;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.12) !important;
    transition: all 0.25s ease !important;
}
main a[href*="type=hot"]:hover {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%) !important;
    color: #ffffff !important;
    border-color: #ef4444 !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.3) !important;
}
main a[href*="type=hot"]:hover i, main a[href*="type=hot"]:hover span {
    color: #ffffff !important;
}

main a[href*="type=entry"] {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%) !important;
    border: 1.5px solid #fcd34d !important;
    color: #92400e !important;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.12) !important;
    transition: all 0.25s ease !important;
}
main a[href*="type=entry"]:hover {
    background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%) !important;
    color: #ffffff !important;
    border-color: #f59e0b !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 20px rgba(217, 119, 6, 0.3) !important;
}
main a[href*="type=entry"]:hover i, main a[href*="type=entry"]:hover span {
    color: #ffffff !important;
}

main a[href*="type=excavation"] {
    background: linear-gradient(135deg, #f0fdf4 0%, #d1fae5 100%) !important;
    border: 1.5px solid #6ee7b7 !important;
    color: #065f46 !important;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.12) !important;
    transition: all 0.25s ease !important;
}
main a[href*="type=excavation"]:hover {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%) !important;
    color: #ffffff !important;
    border-color: #10b981 !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 20px rgba(5, 150, 105, 0.3) !important;
}
main a[href*="type=excavation"]:hover i, main a[href*="type=excavation"]:hover span {
    color: #ffffff !important;
}

main a[href*="type=electrical"] {
    background: linear-gradient(135deg, #ecfeff 0%, #cffafe 100%) !important;
    border: 1.5px solid #67e8f9 !important;
    color: #0f766e !important;
    box-shadow: 0 4px 12px rgba(8, 145, 178, 0.12) !important;
    transition: all 0.25s ease !important;
}
main a[href*="type=electrical"]:hover {
    background: linear-gradient(135deg, #06b6d4 0%, #0e7490 100%) !important;
    color: #ffffff !important;
    border-color: #06b6d4 !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 20px rgba(8, 145, 178, 0.3) !important;
}
main a[href*="type=electrical"]:hover i, main a[href*="type=electrical"]:hover span {
    color: #ffffff !important;
}

main a[href*="type=height"] {
    background: linear-gradient(135deg, #faf5ff 0%, #ede9fe 100%) !important;
    border: 1.5px solid #c4b5fd !important;
    color: #5b21b6 !important;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.12) !important;
    transition: all 0.25s ease !important;
}
main a[href*="type=height"]:hover {
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%) !important;
    color: #ffffff !important;
    border-color: #8b5cf6 !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.3) !important;
}
main a[href*="type=height"]:hover i, main a[href*="type=height"]:hover span {
    color: #ffffff !important;
}

main a[href*="type=radiography"] {
    background: linear-gradient(135deg, #fdf4ff 0%, #fae8ff 100%) !important;
    border: 1.5px solid #f0abfc !important;
    color: #701a75 !important;
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.12) !important;
    transition: all 0.25s ease !important;
}
main a[href*="type=radiography"]:hover {
    background: linear-gradient(135deg, #c026d3 0%, #86198f 100%) !important;
    color: #ffffff !important;
    border-color: #c026d3 !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 20px rgba(168, 85, 247, 0.3) !important;
}
main a[href*="type=radiography"]:hover i, main a[href*="type=radiography"]:hover span {
    color: #ffffff !important;
}

/* ==========================================================================
   Permit & JHA Stages Metric Cards (Rich Tints & Deep Foreground Colors)
   ========================================================================== */
main a[href*="status="],
main a.hover-lift[href*="/jhas"] {
    padding: 0.42rem 0.75rem !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
}
main a[href*="status="] h6,
main a.hover-lift[href*="/jhas"] h6 {
    font-size: 0.68rem !important;
    font-weight: 650 !important;
    letter-spacing: 0.35px !important;
    margin-bottom: 0.1rem !important;
}
main a[href*="status="] p,
main a.hover-lift[href*="/jhas"] p {
    font-size: 1.25rem !important;
    line-height: 1.15 !important;
    font-weight: 700 !important;
    margin-bottom: 0 !important;
}
main a[href*="status="] i,
main a.hover-lift[href*="/jhas"] i {
    font-size: 1.15rem !important;
}

/* All JHA's Live Tile */
main a.hover-lift[href$="/jhas"],
main a.hover-lift[href*="/jhas?"]:not([href*="status="]) {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%) !important;
    border: 1.5px solid #93c5fd !important;
    color: #1e40af !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1) !important;
}
main a.hover-lift[href$="/jhas"]:hover,
main a.hover-lift[href*="/jhas?"]:not([href*="status="]):hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    border-color: #1d4ed8 !important;
}
main a.hover-lift[href$="/jhas"] h6,
main a.hover-lift[href*="/jhas?"]:not([href*="status="]) h6 { color: #2563eb !important; }
main a.hover-lift[href$="/jhas"] p,
main a.hover-lift[href*="/jhas?"]:not([href*="status="]) p { color: #1e3a8a !important; }
main a.hover-lift[href$="/jhas"] i,
main a.hover-lift[href*="/jhas?"]:not([href*="status="]) i { color: #2563eb !important; }
main a.hover-lift[href$="/jhas"]:hover h6,
main a.hover-lift[href$="/jhas"]:hover p,
main a.hover-lift[href$="/jhas"]:hover i,
main a.hover-lift[href*="/jhas?"]:not([href*="status="]):hover h6,
main a.hover-lift[href*="/jhas?"]:not([href*="status="]):hover p,
main a.hover-lift[href*="/jhas?"]:not([href*="status="]):hover i { color: #ffffff !important; }

main a[href*="status=draft"] {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%) !important;
    border: 1.5px solid #cbd5e1 !important;
    color: #334155 !important;
    box-shadow: 0 4px 12px rgba(100, 116, 139, 0.08) !important;
}
main a[href*="status=draft"]:hover {
    background: linear-gradient(135deg, #475569 0%, #334155 100%) !important;
    border-color: #334155 !important;
}
main a[href*="status=draft"] h6 { color: #64748b !important; }
main a[href*="status=draft"] p { color: #1e293b !important; }
main a[href*="status=draft"] i { color: #64748b !important; }
main a[href*="status=draft"]:hover h6,
main a[href*="status=draft"]:hover p,
main a[href*="status=draft"]:hover i { color: #ffffff !important; }

main a[href*="status=submitted"] {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%) !important;
    border: 1.5px solid #93c5fd !important;
    color: #1e40af !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1) !important;
}
main a[href*="status=submitted"]:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    border-color: #1d4ed8 !important;
}
main a[href*="status=submitted"] h6 { color: #2563eb !important; }
main a[href*="status=submitted"] p { color: #1e3a8a !important; }
main a[href*="status=submitted"] i { color: #2563eb !important; }
main a[href*="status=submitted"]:hover h6,
main a[href*="status=submitted"]:hover p,
main a[href*="status=submitted"]:hover i { color: #ffffff !important; }

main a[href*="status=under_review"] {
    background: linear-gradient(135deg, #ecfeff 0%, #cffafe 100%) !important;
    border: 1.5px solid #67e8f9 !important;
    color: #0e7490 !important;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.1) !important;
}
main a[href*="status=under_review"]:hover {
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%) !important;
    border-color: #0e7490 !important;
}
main a[href*="status=under_review"] h6 { color: #0891b2 !important; }
main a[href*="status=under_review"] p { color: #155e75 !important; }
main a[href*="status=under_review"] i { color: #0891b2 !important; }
main a[href*="status=under_review"]:hover h6,
main a[href*="status=under_review"]:hover p,
main a[href*="status=under_review"]:hover i { color: #ffffff !important; }

main a[href*="status=approved"] {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%) !important;
    border: 1.5px solid #6ee7b7 !important;
    color: #047857 !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.1) !important;
}
main a[href*="status=approved"]:hover {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    border-color: #059669 !important;
}
main a[href*="status=approved"] h6 { color: #059669 !important; }
main a[href*="status=approved"] p { color: #064e3b !important; }
main a[href*="status=approved"] i { color: #10b981 !important; }
main a[href*="status=approved"]:hover h6,
main a[href*="status=approved"]:hover p,
main a[href*="status=approved"]:hover i { color: #ffffff !important; }

main a[href*="status=returned"] {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%) !important;
    border: 1.5px solid #fca5a5 !important;
    color: #b91c1c !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.1) !important;
}
main a[href*="status=returned"]:hover {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    border-color: #dc2626 !important;
}
main a[href*="status=returned"] h6 { color: #dc2626 !important; }
main a[href*="status=returned"] p { color: #991b1b !important; }
main a[href*="status=returned"] i { color: #ef4444 !important; }
main a[href*="status=returned"]:hover h6,
main a[href*="status=returned"]:hover p,
main a[href*="status=returned"]:hover i { color: #ffffff !important; }

main a[href*="status=archived"] {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%) !important;
    border: 1.5px solid #94a3b8 !important;
    color: #334155 !important;
    box-shadow: 0 4px 12px rgba(51, 65, 85, 0.08) !important;
}
main a[href*="status=archived"]:hover {
    background: linear-gradient(135deg, #475569 0%, #334155 100%) !important;
    border-color: #1e293b !important;
}
main a[href*="status=archived"] h6 { color: #475569 !important; }
main a[href*="status=archived"] p { color: #0f172a !important; }
main a[href*="status=archived"] i { color: #475569 !important; }
main a[href*="status=archived"]:hover h6,
main a[href*="status=archived"]:hover p,
main a[href*="status=archived"]:hover i { color: #ffffff !important; }

main a[href*="status=accepted"] {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%) !important;
    border: 1.5px solid #c4b5fd !important;
    color: #6d28d9 !important;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.1) !important;
}
main a[href*="status=accepted"]:hover {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%) !important;
    border-color: #7c3aed !important;
}
main a[href*="status=accepted"] h6 { color: #7c3aed !important; }
main a[href*="status=accepted"] p { color: #4c1d95 !important; }
main a[href*="status=accepted"] i { color: #8b5cf6 !important; }
main a[href*="status=accepted"]:hover h6,
main a[href*="status=accepted"]:hover p,
main a[href*="status=accepted"]:hover i { color: #ffffff !important; }

main a[href*="status=active"] {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%) !important;
    border: 1.5px solid #fcd34d !important;
    color: #b45309 !important;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.1) !important;
}
main a[href*="status=active"]:hover {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    border-color: #d97706 !important;
}
main a[href*="status=active"] h6 { color: #d97706 !important; }
main a[href*="status=active"] p { color: #78350f !important; }
main a[href*="status=active"] i { color: #f59e0b !important; }
main a[href*="status=active"]:hover h6,
main a[href*="status=active"]:hover p,
main a[href*="status=active"]:hover i { color: #ffffff !important; }

main a[href*="status=closed"] {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%) !important;
    border: 1.5px solid #94a3b8 !important;
    color: #334155 !important;
    box-shadow: 0 4px 12px rgba(51, 65, 85, 0.08) !important;
}
main a[href*="status=closed"]:hover {
    background: linear-gradient(135deg, #334155 0%, #1e293b 100%) !important;
    border-color: #1e293b !important;
}
main a[href*="status=closed"] h6 { color: #475569 !important; }
main a[href*="status=closed"] p { color: #0f172a !important; }
main a[href*="status=closed"] i { color: #475569 !important; }
main a[href*="status=closed"]:hover h6,
main a[href*="status=closed"]:hover p,
main a[href*="status=closed"]:hover i { color: #ffffff !important; }

/* ==========================================================================
   Buttons (Vibrant Gradients & Soft Shadows)
   ========================================================================== */
.btn {
    border-radius: 7px !important;
    font-weight: 550 !important;
    font-size: 0.84rem !important;
    padding: 0.38rem 0.95rem !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    letter-spacing: 0.15px;
}

.btn-sm {
    padding: 0.22rem 0.55rem !important;
    font-size: 0.78rem !important;
    border-radius: 6px !important;
}

.btn-lg {
    padding: 0.48rem 1.25rem !important;
    font-size: 0.92rem !important;
    border-radius: 8px !important;
}

.btn-primary {
    background: var(--primary-gradient) !important;
    border: none !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3) !important;
}
.btn-primary:hover {
    background: linear-gradient(135deg, #3a0ca3 0%, #300a89 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 18px rgba(67, 97, 238, 0.45) !important;
}

.btn-success {
    background: var(--success-gradient) !important;
    border: none !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3) !important;
}
.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.45) !important;
}

.btn-danger {
    background: var(--danger-gradient) !important;
    border: none !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3) !important;
}
.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.45) !important;
}

.btn-warning {
    background: var(--warning-gradient) !important;
    border: none !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3) !important;
}
.btn-warning:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.45) !important;
}

.btn-info {
    background: var(--info-gradient) !important;
    border: none !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3) !important;
}
.btn-info:hover {
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 18px rgba(6, 182, 212, 0.45) !important;
}

.btn-secondary {
    background: var(--slate-gradient) !important;
    border: none !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(100, 116, 139, 0.25) !important;
}
.btn-secondary:hover {
    background: linear-gradient(135deg, #475569 0%, #334155 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 18px rgba(100, 116, 139, 0.4) !important;
}

/* General Outline Buttons - Soft Light Backgrounds so none look hollow */
.btn-outline-primary:not([href*="type="]):not([href*="status="]) {
    background-color: #eef2ff !important;
    color: #3730a3 !important;
    border: 1.5px solid #a5b4fc !important;
}
.btn-outline-primary:not([href*="type="]):not([href*="status="]):hover {
    background: var(--primary-gradient) !important;
    color: #ffffff !important;
    border-color: #4361ee !important;
}

.btn-outline-secondary:not([href*="type="]):not([href*="status="]) {
    background-color: #f1f5f9 !important;
    color: #334155 !important;
    border: 1.5px solid #cbd5e1 !important;
}
.btn-outline-secondary:not([href*="type="]):not([href*="status="]):hover {
    background: var(--slate-gradient) !important;
    color: #ffffff !important;
    border-color: #475569 !important;
}

.btn-outline-success:not([href*="type="]):not([href*="status="]) {
    background-color: #ecfdf5 !important;
    color: #065f46 !important;
    border: 1.5px solid #6ee7b7 !important;
}
.btn-outline-success:not([href*="type="]):not([href*="status="]):hover {
    background: var(--success-gradient) !important;
    color: #ffffff !important;
    border-color: #10b981 !important;
}

.btn-outline-danger:not([href*="type="]):not([href*="status="]) {
    background-color: #fff1f2 !important;
    color: #991b1b !important;
    border: 1.5px solid #fca5a5 !important;
}
.btn-outline-danger:not([href*="type="]):not([href*="status="]):hover {
    background: var(--danger-gradient) !important;
    color: #ffffff !important;
    border-color: #ef4444 !important;
}

.btn-outline-warning:not([href*="type="]):not([href*="status="]) {
    background-color: #fffbeb !important;
    color: #92400e !important;
    border: 1.5px solid #fcd34d !important;
}
.btn-outline-warning:not([href*="type="]):not([href*="status="]):hover {
    background: var(--warning-gradient) !important;
    color: #ffffff !important;
    border-color: #f59e0b !important;
}

.btn-outline-info:not([href*="type="]):not([href*="status="]) {
    background-color: #ecfeff !important;
    color: #0e7490 !important;
    border: 1.5px solid #67e8f9 !important;
}
.btn-outline-info:not([href*="type="]):not([href*="status="]):hover {
    background: var(--info-gradient) !important;
    color: #ffffff !important;
    border-color: #06b6d4 !important;
}

/* ==========================================================================
   Tables & Data Tables (Polished Compact Rows with Tinted Aesthetics)
   ========================================================================== */
.table {
    border-collapse: separate !important;
    border-spacing: 0 2px !important;
    margin-top: 0 !important;
    margin-bottom: 0.5rem !important;
}

.table thead th {
    background: linear-gradient(135deg, #eef2ff 0%, #f0f7ff 100%) !important;
    color: #3730a3 !important;
    font-weight: 650 !important;
    font-size: 0.73rem !important;
    letter-spacing: 0.35px !important;
    text-transform: uppercase !important;
    border: none !important;
    padding: 0.42rem 0.75rem !important;
    vertical-align: middle !important;
    line-height: 1.3 !important;
}

.table thead th:first-child {
    border-radius: 7px 0 0 7px !important;
}

.table thead th:last-child {
    border-radius: 0 7px 7px 0 !important;
}

.table tbody td {
    background-color: #ffffff !important;
    border-top: 1px solid #f1f5f9 !important;
    border-bottom: 1px solid #f1f5f9 !important;
    padding: 0.38rem 0.75rem !important;
    vertical-align: middle !important;
    color: #334155 !important;
    font-size: 0.83rem !important;
    font-weight: 450 !important;
    line-height: 1.35 !important;
    transition: all 0.15s ease !important;
}

.table tbody tr:hover td {
    background-color: #f0f7ff !important;
    color: #1e1b4b !important;
}

.table tbody td:first-child {
    border-left: 1px solid #f1f5f9 !important;
    border-radius: 7px 0 0 7px !important;
}

.table tbody td:last-child {
    border-right: 1px solid #f1f5f9 !important;
    border-radius: 0 7px 7px 0 !important;
}

.table .btn-sm {
    padding: 0.18rem 0.45rem !important;
    font-size: 0.74rem !important;
    line-height: 1.25 !important;
    border-radius: 5px !important;
}

.table .badge {
    padding: 0.25em 0.55em !important;
    font-size: 0.73rem !important;
}

/* List group compact rows */
.list-group-item {
    padding: 0.42rem 0.85rem !important;
    font-size: 0.83rem !important;
}

/* DataTables pagination and controls */
.dataTables_wrapper {
    position: relative !important;
    clear: both !important;
    padding: 0 !important;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    font-size: 0.8rem !important;
    color: #475569 !important;
    padding: 0.35rem 0 0.5rem 0 !important;
}

.dataTables_wrapper .dataTables_length {
    display: inline-flex !important;
    align-items: center !important;
}

.dataTables_wrapper .dataTables_length label {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.35rem !important;
    margin-bottom: 0 !important;
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    color: #475569 !important;
}

.dataTables_wrapper .dataTables_length select,
.dataTables_length select,
select[name$="_length"],
select[name*="_length"] {
    width: auto !important;
    min-width: 68px !important;
    display: inline-block !important;
    padding-top: 0.22rem !important;
    padding-bottom: 0.22rem !important;
    padding-left: 0.65rem !important;
    padding-right: 1.85rem !important;
    background-position: right 0.5rem center !important;
    background-size: 14px 10px !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 6px !important;
    line-height: 1.4 !important;
    vertical-align: middle !important;
    margin: 0 0.25rem !important;
    cursor: pointer !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
}

.dataTables_wrapper .dataTables_length select:focus,
.dataTables_length select:focus {
    border-color: #4361ee !important;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.18) !important;
    outline: none !important;
}

.dataTables_wrapper .dataTables_filter {
    text-align: right !important;
}

.dataTables_wrapper .dataTables_filter label {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 0.4rem !important;
    margin-bottom: 0 !important;
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    color: #475569 !important;
}

.dataTables_wrapper .dataTables_filter input {
    margin-left: 0.25rem !important;
    display: inline-block !important;
    width: auto !important;
    min-width: 190px !important;
    font-size: 0.8rem !important;
    padding: 0.24rem 0.65rem !important;
    border-radius: 6px !important;
    border: 1.5px solid #cbd5e1 !important;
    height: auto !important;
    color: #1e293b !important;
    line-height: 1.4 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: #4361ee !important;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.18) !important;
    outline: none !important;
}

/* Info text: Showing X to Y of Z entries */
.dataTables_wrapper .dataTables_info {
    font-size: 0.78rem !important;
    font-weight: 500 !important;
    color: #64748b !important;
    padding: 0.45rem 0 !important;
    line-height: 1.5 !important;
}

/* Pagination container */
.dataTables_wrapper .dataTables_paginate {
    padding: 0.35rem 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
}

/* Unify Pagination UL across DataTables & standard Bootstrap 5 */
.pagination,
.dataTables_wrapper .dataTables_paginate ul.pagination {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 4px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    flex-wrap: wrap !important;
}

/* Reset Bootstrap's li spacing & border collapsing */
.pagination .page-item,
.dataTables_wrapper .dataTables_paginate .page-item,
.dataTables_wrapper .dataTables_paginate li.paginate_button {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
}

/* Individual Pill Buttons */
.pagination .page-item .page-link,
.dataTables_wrapper .dataTables_paginate .page-item .page-link,
.dataTables_wrapper .dataTables_paginate a.paginate_button,
.dataTables_wrapper .dataTables_paginate span .paginate_button {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 30px !important;
    height: 30px !important;
    padding: 0.22rem 0.6rem !important;
    font-size: 0.78rem !important;
    font-weight: 550 !important;
    color: #334155 !important;
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    margin: 0 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
    transition: all 0.15s ease-in-out !important;
    cursor: pointer !important;
}

/* Ensure first & last child are also individually rounded */
.pagination .page-item:first-child .page-link,
.pagination .page-item:last-child .page-link,
.dataTables_wrapper .dataTables_paginate .page-item:first-child .page-link,
.dataTables_wrapper .dataTables_paginate .page-item:last-child .page-link {
    border-radius: 6px !important;
}

/* Hover state on clickable buttons */
.pagination .page-item:not(.active):not(.disabled) .page-link:hover,
.dataTables_wrapper .dataTables_paginate .page-item:not(.active):not(.disabled) .page-link:hover,
.dataTables_wrapper .dataTables_paginate a.paginate_button:not(.current):not(.disabled):hover {
    background-color: #eef2ff !important;
    border-color: #a5b4fc !important;
    color: #4361ee !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 6px rgba(67, 97, 238, 0.15) !important;
    z-index: 1 !important;
}

/* Active Page State */
.pagination .page-item.active .page-link,
.dataTables_wrapper .dataTables_paginate .page-item.active .page-link,
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover,
.dataTables_wrapper .dataTables_paginate span .paginate_button.current {
    background: var(--primary-gradient, linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%)) !important;
    border-color: #4361ee !important;
    color: #ffffff !important;
    font-weight: 650 !important;
    box-shadow: 0 2px 6px rgba(67, 97, 238, 0.32) !important;
    z-index: 2 !important;
}

/* Disabled State (e.g. Previous when on first page, Next when on last page) */
.pagination .page-item.disabled .page-link,
.dataTables_wrapper .dataTables_paginate .page-item.disabled .page-link,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
    background-color: #f8fafc !important;
    border-color: #e2e8f0 !important;
    color: #94a3b8 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    box-shadow: none !important;
    opacity: 0.8 !important;
}

/* Previous / Next buttons styling */
.pagination .page-item:first-child .page-link,
.pagination .page-item:last-child .page-link,
.dataTables_wrapper .dataTables_paginate .previous .page-link,
.dataTables_wrapper .dataTables_paginate .next .page-link,
.dataTables_wrapper .dataTables_paginate a.previous,
.dataTables_wrapper .dataTables_paginate a.next {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    min-width: auto !important;
    font-weight: 550 !important;
}

/* Focus state */
.pagination .page-item .page-link:focus,
.dataTables_wrapper .dataTables_paginate .page-item .page-link:focus,
.dataTables_wrapper .dataTables_paginate .paginate_button:focus {
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.18) !important;
    outline: none !important;
}

/* ==========================================================================
   Badges (Rich Pastel Backgrounds with Vivid Text)
   ========================================================================== */
.badge {
    padding: 0.28em 0.6em !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    letter-spacing: 0.2px !important;
    font-size: 0.74rem !important;
}

.badge.bg-success, .badge-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%) !important;
    color: #065f46 !important;
    border: 1px solid #6ee7b7 !important;
}

.badge.bg-primary, .badge-primary {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%) !important;
    color: #1e40af !important;
    border: 1px solid #93c5fd !important;
}

.badge.bg-info, .badge-info {
    background: linear-gradient(135deg, #cffafe 0%, #a5f3fc 100%) !important;
    color: #0e7490 !important;
    border: 1px solid #67e8f9 !important;
}

.badge.bg-warning, .badge-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%) !important;
    color: #92400e !important;
    border: 1px solid #fcd34d !important;
}

.badge.bg-danger, .badge-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%) !important;
    color: #991b1b !important;
    border: 1px solid #fca5a5 !important;
}

.badge.bg-secondary, .badge-secondary {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%) !important;
    color: #334155 !important;
    border: 1px solid #cbd5e1 !important;
}

.badge.bg-dark, .badge-dark {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%) !important;
    color: #0f172a !important;
    border: 1px solid #94a3b8 !important;
}

/* ==========================================================================
   Tabs & Nav Pills
   ========================================================================== */
.nav-pills .nav-link {
    color: #475569 !important;
    font-weight: 550 !important;
    font-size: 0.83rem !important;
    border-radius: 7px !important;
    background: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    margin-right: 0.35rem !important;
    padding: 0.32rem 0.75rem !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03) !important;
}

.nav-pills .nav-link:hover {
    background: #eef2ff !important;
    color: #3730a3 !important;
    border-color: #c7d2fe !important;
    transform: translateY(-1px) !important;
}

.nav-pills .nav-link.active {
    background: var(--primary-gradient) !important;
    color: #ffffff !important;
    border-color: #4361ee !important;
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3) !important;
}

.nav-pills .nav-link.active span.badge {
    background: rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
    border: none !important;
}

/* ==========================================================================
   Form Controls & Inputs
   ========================================================================== */
.form-control {
    background-color: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 7px !important;
    color: #1e293b !important;
    font-weight: 500 !important;
    font-size: 0.84rem !important;
    padding: 0.35rem 0.65rem !important;
    min-height: calc(1.5em + 0.7rem + 2px) !important;
    transition: all 0.2s ease !important;
}

.form-control[readonly],
.form-control:disabled {
    background-color: #f8fafc !important;
    color: #334155 !important;
    cursor: not-allowed;
    border-color: #cbd5e1 !important;
}

.form-control[readonly]:focus {
    background-color: #f8fafc !important;
    border-color: #cbd5e1 !important;
    box-shadow: none !important;
}

.form-select {
    background-color: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 7px !important;
    color: #1e293b !important;
    font-weight: 500 !important;
    font-size: 0.84rem !important;
    padding-top: 0.35rem !important;
    padding-bottom: 0.35rem !important;
    padding-left: 0.65rem !important;
    padding-right: 2.25rem !important;
    background-position: right 0.75rem center !important;
    min-height: calc(1.5em + 0.7rem + 2px) !important;
    transition: all 0.2s ease !important;
}

.form-control-sm {
    padding: 0.22rem 0.55rem !important;
    font-size: 0.78rem !important;
    min-height: calc(1.5em + 0.44rem + 2px) !important;
}

.form-select-sm {
    padding-top: 0.22rem !important;
    padding-bottom: 0.22rem !important;
    padding-left: 0.55rem !important;
    padding-right: 2rem !important;
    background-position: right 0.55rem center !important;
    background-size: 14px 10px !important;
    font-size: 0.78rem !important;
    min-height: calc(1.5em + 0.44rem + 2px) !important;
}

.form-control:focus, .form-select:focus {
    background-color: #ffffff !important;
    border-color: #4361ee !important;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.18) !important;
    color: #0f172a !important;
}

label, .form-label {
    font-weight: 600 !important;
    color: #334155 !important;
    font-size: 0.8rem !important;
    margin-bottom: 0.25rem !important;
}

/* Input group subtle badges */
.input-group-sm > .input-group-text {
    padding: 0.22rem 0.55rem !important;
    font-size: 0.78rem !important;
    border-radius: 6px !important;
}
.input-group-text.bg-success-subtle {
    background-color: #ecfdf5 !important;
    color: #065f46 !important;
    border-color: #6ee7b7 !important;
}
.input-group-text.bg-danger-subtle {
    background-color: #fff1f2 !important;
    color: #991b1b !important;
    border-color: #fca5a5 !important;
}

/* Meta fields & highlights */
.meta-field:focus {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2) !important;
}

/* ==========================================================================
   Modals & Alerts
   ========================================================================== */
.modal-content {
    border: 1px solid #e0e7ff !important;
    border-radius: 14px !important;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16) !important;
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(135deg, #f8faff 0%, #eef2ff 100%) !important;
    border-bottom: 1.5px solid #e0e7ff !important;
    padding: 0.75rem 1.25rem !important;
}

.modal-header .modal-title {
    color: #1e1b4b !important;
    font-size: 1.05rem !important;
    font-weight: 650 !important;
}

.modal-body {
    padding: 1rem 1.25rem !important;
}

.modal-footer {
    background: #f8faff !important;
    border-top: 1.5px solid #e0e7ff !important;
    padding: 0.6rem 1.25rem !important;
}

.alert {
    border-radius: 9px !important;
    font-weight: 500 !important;
    font-size: 0.85rem !important;
    padding: 0.55rem 0.95rem !important;
    border: 1px solid transparent !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03) !important;
}

.alert-info {
    background: linear-gradient(135deg, #ecfeff 0%, #cffafe 100%) !important;
    color: #0e7490 !important;
    border-color: #67e8f9 !important;
    border-left: 5px solid #06b6d4 !important;
}

.alert-success {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%) !important;
    color: #047857 !important;
    border-color: #6ee7b7 !important;
    border-left: 5px solid #10b981 !important;
}

.alert-warning {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%) !important;
    color: #92400e !important;
    border-color: #fcd34d !important;
    border-left: 5px solid #f59e0b !important;
}

.alert-danger {
    background: linear-gradient(135deg, #fff1f2 0%, #fee2e2 100%) !important;
    color: #991b1b !important;
    border-color: #fca5a5 !important;
    border-left: 5px solid #ef4444 !important;
}

/* ==========================================================================
   Footer (Polished Light Surface)
   ========================================================================== */
footer, footer.bg-white {
    background: linear-gradient(180deg, #f8faff 0%, #edf2f9 100%) !important;
    border-top: 1.5px solid #e0e7ff !important;
    color: #475569 !important;
}

footer a {
    color: #4361ee !important;
    font-weight: 600 !important;
}

footer a:hover {
    color: #3a0ca3 !important;
    text-decoration: underline !important;
}

/* ==========================================================================
   Permit Details Stepper
   ========================================================================== */
.step-circle {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

.step.completed .step-circle {
    background: var(--success-gradient) !important;
    border-color: #059669 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35) !important;
}

.step.active .step-circle {
    background: linear-gradient(135deg, #06b6d4 0%, #0284c7 100%) !important;
    border-color: #0284c7 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4) !important;
}

/* ==========================================================================
   Sidebar Mini (Collapsed Mode)
   ========================================================================== */
@media (min-width: 768px) {
    body.sidebar-mini .col-md-3.col-lg-2:not(.navbar-brand) {
        width: 72px !important;
        flex: 0 0 72px !important;
        transition: all 0.3s ease;
    }
    body.sidebar-mini .col-md-9.col-lg-10 {
        width: calc(100% - 72px) !important;
        flex: 0 0 calc(100% - 72px) !important;
        transition: all 0.3s ease;
    }
    body.sidebar-mini #sidebarMenu span {
        display: none !important;
    }
    body.sidebar-mini #sidebarMenu .nav-link {
        text-align: center;
        padding: 0.42rem 0 !important;
        margin: 0.12rem 0.35rem !important;
        justify-content: center !important;
        border-radius: 8px !important;
    }
    body.sidebar-mini #sidebarMenu .nav-link i {
        margin-right: 0 !important;
        font-size: 0.95rem !important;
        width: auto !important;
    }
    body.sidebar-mini .sidebar-heading {
        text-align: center;
        padding: 0.45rem 0 !important;
        margin: 0.5rem 0.35rem 0.12rem 0.35rem !important;
        justify-content: center !important;
    }
    body.sidebar-mini .sidebar-heading div {
        margin: 0 auto;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    body.sidebar-mini .sidebar-heading div i {
        margin-right: 0 !important;
        font-size: 0.95rem !important;
    }
    body.sidebar-mini .sidebar-heading .bi-chevron-down {
        display: none !important;
    }
}

/* Hover lift effect for live tiles and cards */
.hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hover-lift:hover {
    transform: translateY(-3px);
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15) !important;
}
