/* FuelTracker Modern Application Styling */

:root {
    --ft-primary: #2563eb;
    --ft-primary-dark: #1d4ed8;
    --ft-primary-light: #eff6ff;
    --ft-success: #10b981;
    --ft-warning: #f59e0b;
    --ft-danger: #ef4444;
    --ft-dark: #0f172a;
    --ft-gray: #64748b;
    --ft-card-bg: #ffffff;
    --ft-border: #e2e8f0;
    --ft-bg: #f8fafc;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--ft-bg);
    color: #1e293b;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    padding-left: env(safe-area-inset-left, 0);
    padding-right: env(safe-area-inset-right, 0);
}

main {
    flex: 1;
}

/* Navbar */
.navbar-brand {
    font-weight: 700;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-icon {
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    color: white;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    font-size: 1.1rem;
}

.navbar .dropdown-menu {
    max-width: calc(100vw - 1.5rem);
    border-radius: 12px;
}

/* Metric Cards */
.stat-card {
    background: var(--ft-card-bg);
    border-radius: 14px;
    border: 1px solid var(--ft-border);
    padding: 1.15rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.06);
}

.stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.stat-val,
.stat-value {
    font-size: clamp(1.2rem, 3.2vw, 1.6rem);
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.2;
    word-break: break-word;
}

.stat-label {
    font-size: 0.78rem;
    color: var(--ft-gray);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Modern Card Layout */
.card-modern {
    background: var(--ft-card-bg);
    border-radius: 14px;
    border: 1px solid var(--ft-border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    margin-bottom: 1.5rem;
}

.card-modern .card-header {
    background: transparent;
    border-bottom: 1px solid var(--ft-border);
    padding: 1rem 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-modern .card-body {
    padding: 1.25rem;
}

.unified-refuel-box {
    background: #f8fafc !important;
    color: #0f172a !important;
    border-radius: 16px;
    border: 1.5px solid #e2e8f0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: border-color 0.2s;
}

.unified-refuel-box .form-label {
    color: #0f172a !important;
    font-weight: 700;
}

.unified-refuel-box:hover {
    border-color: #cbd5e1 !important;
}

.unified-refuel-box .form-control {
    background-color: #030712 !important;
    border: 1.5px solid #334155 !important;
    color: #ffffff !important;
    font-size: 1.35rem;
    padding: 0.75rem 1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-radius: 10px;
}

.unified-refuel-box .form-control:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25) !important;
}

/* Service Title Input - Crisp, standard readable font size & white background */
.unified-refuel-box .service-title-input,
.service-title-input {
    background-color: #ffffff !important;
    color: #1e293b !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    padding: 0.55rem 0.85rem !important;
    letter-spacing: normal !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 8px !important;
    box-shadow: none !important;
}

.unified-refuel-box .service-title-input:focus,
.service-title-input:focus {
    background-color: #ffffff !important;
    color: #0f172a !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
}

.unified-refuel-box .input-group-text {
    background-color: #030712 !important;
    border: 1.5px solid #334155 !important;
    color: #94a3b8;
    font-size: 1.1rem;
    border-radius: 10px;
}

.unified-refuel-box .input-group-text .fa-tachometer-alt,
.unified-refuel-box .input-group-text .fa-gauge-high,
.unified-refuel-box .input-group-text .fa-gauge {
    color: #38bdf8 !important;
    font-size: 1.25rem;
}

@media (max-width: 575.98px) {
    .unified-refuel-box {
        border-radius: 12px;
    }
    .unified-refuel-box .card-body {
        padding: 0.75rem !important;
    }
    .unified-refuel-box .form-control {
        font-size: 1.2rem;
        padding: 0.6rem 0.75rem;
    }
}

/* Quick Refuel Minimal Details Drawer */
#quickRefuelMoreDetails {
    transition: all 0.25s ease-in-out;
}
.more-toggle-icon {
    transition: transform 0.2s ease-in-out;
}

/* ODOMETER SMART ENTRY WIDGET */
.odometer-box {
    background: linear-gradient(145deg, #1e293b, #0f172a);
    color: #f8fafc;
    border-radius: 14px;
    padding: 1.25rem;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.4), 0 4px 6px rgba(0,0,0,0.1);
}

.odometer-display-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(4px, 1.5vw, 10px);
    background: #020617;
    border: 2px solid #334155;
    border-radius: 10px;
    padding: 8px clamp(6px, 1.5vw, 14px);
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.8);
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.odo-prefix-block {
    background: #1e293b;
    color: #94a3b8;
    padding: clamp(3px, 1vw, 6px) clamp(6px, 1.5vw, 12px);
    border-radius: 6px;
    font-family: 'Courier New', Courier, monospace;
    font-weight: 700;
    font-size: clamp(1.1rem, 3.5vw, 1.45rem);
    letter-spacing: clamp(1px, 0.5vw, 2px);
    user-select: none;
    border: 1px solid #334155;
    display: inline-block;
    min-width: 36px;
    text-align: center;
}

.odo-input-highlight {
    background: #0f172a;
    color: #38bdf8;
    border: 2px solid #38bdf8;
    border-radius: 6px;
    font-family: 'Courier New', Courier, monospace;
    font-weight: 700;
    font-size: clamp(1.1rem, 3.5vw, 1.45rem);
    width: clamp(84px, 28vw, 135px);
    text-align: center;
    letter-spacing: clamp(1px, 0.5vw, 2px);
    padding: clamp(3px, 1vw, 5px) clamp(4px, 1vw, 8px);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
    box-sizing: border-box;
}

.odo-input-highlight:focus {
    outline: none;
    border-color: #60a5fa;
    box-shadow: 0 0 15px rgba(96, 165, 250, 0.4);
    background: #000;
}

.odo-sep-dot {
    font-size: 1.1rem;
    color: #64748b;
    user-select: none;
}

.quick-step-btn {
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 4px 8px;
    transition: all 0.15s ease-in-out;
    flex: 1 1 auto;
    text-align: center;
    min-height: 32px;
}

.quick-step-btn:hover {
    transform: translateY(-1px);
}

/* SMART FUEL PRICE & LITERS CALCULATOR WIDGET */
.price-calculator-box {
    background: linear-gradient(145deg, #064e3b, #022c22);
    color: #f8fafc;
    border-radius: 14px;
    padding: 1.15rem;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.4), 0 4px 6px rgba(0,0,0,0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.price-display-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(4px, 1.5vw, 10px);
    background: #011d16;
    border: 2px solid #065f46;
    border-radius: 10px;
    padding: 8px clamp(6px, 1.5vw, 14px);
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.8);
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.price-prefix-block {
    background: #064e3b;
    color: #6ee7b7;
    padding: clamp(3px, 1vw, 6px) clamp(6px, 1.5vw, 12px);
    border-radius: 6px;
    font-family: 'Courier New', Courier, monospace;
    font-weight: 700;
    font-size: clamp(1rem, 3.2vw, 1.35rem);
    letter-spacing: 1px;
    user-select: none;
    border: 1px solid #059669;
    min-width: 38px;
    text-align: center;
}

.price-input-highlight {
    background: #022c22;
    color: #34d399;
    border: 2px solid #10b981;
    border-radius: 6px;
    font-family: 'Courier New', Courier, monospace;
    font-weight: 700;
    font-size: clamp(1.1rem, 3.5vw, 1.45rem);
    width: clamp(88px, 28vw, 145px);
    text-align: center;
    letter-spacing: clamp(1px, 0.5vw, 2px);
    padding: clamp(3px, 1vw, 5px) clamp(4px, 1vw, 8px);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.25);
    box-sizing: border-box;
}

.price-input-highlight:focus {
    outline: none;
    border-color: #34d399;
    box-shadow: 0 0 15px rgba(52, 211, 153, 0.45);
    background: #01140f;
}

/* Country Live Price Badge */
.live-price-badge {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    padding: 6px 12px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 0.85rem;
}

.live-price-badge .pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #22c55e;
    border-radius: 50%;
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* Vehicle Badge Avatar */
.vehicle-avatar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
    font-size: 1.1rem;
}

/* Quick Fill Buttons */
.btn-pill {
    border-radius: 50px;
    padding-left: 1.1rem;
    padding-right: 1.1rem;
}

/* Table styling */
.table-entries tbody tr {
    transition: background 0.15s;
}

.table-entries tbody tr:hover {
    background-color: #f1f5f9;
}

/* Custom scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

/* INTELLIGENT REPORTS & ANALYTICS STYLING */

/* Executive Grade Badges */
.grade-circle {
    width: 90px;
    height: 90px;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease;
}
.grade-circle:hover {
    transform: scale(1.04);
}
.grade-letter {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1;
}
.grade-sub {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    opacity: 0.9;
}

.grade-A {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
}
.grade-B {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
}
.grade-C {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff;
}
.grade-D {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #ffffff;
}
.grade-F {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
}

/* Insight Digest Cards */
.insight-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 16px;
    transition: all 0.2s ease;
}
.insight-item:hover {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}
.insight-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* Tank Level Indicator */
.tank-gauge-track {
    height: 12px;
    background: #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}
.tank-gauge-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Commuter Calculator Card */
.calculator-card {
    background: linear-gradient(135deg, #f8fafc, #edf2f7);
    border: 1px solid #cbd5e1;
    border-radius: 14px;
}

/* Anomaly Tagging */
.row-anomaly {
    background-color: #fff7ed !important;
}
.row-anomaly:hover {
    background-color: #ffedd5 !important;
}

/* PRINT-READY STYLESHEET */
@media print {
    body {
        background-color: #ffffff !important;
        color: #000000 !important;
        font-size: 11pt !important;
    }
    nav, footer, .btn, .no-print, .dropdown, #quickRefuelModal {
        display: none !important;
    }
    .container-fluid {
        padding: 0 !important;
        max-width: 100% !important;
    }
    .card-modern, .stat-card {
        border: 1px solid #cccccc !important;
        box-shadow: none !important;
        page-break-inside: avoid;
        margin-bottom: 1rem !important;
    }
    .grade-circle {
        box-shadow: none !important;
        border: 2px solid #000000 !important;
    }
    canvas {
        max-width: 100% !important;
        height: auto !important;
    }
    .print-only-header {
        display: block !important;
        margin-bottom: 20px;
    }
}
.print-only-header {
    display: none;
}

/* Service Category Pills & Presets */
.service-pills-bar {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.service-cat-pill {
    border-radius: 50px !important;
    font-size: 0.8rem !important;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    transition: all 0.15s ease-in-out;
}

.service-cat-pill:hover {
    transform: translateY(-1px);
}

.service-cat-pill.active {
    box-shadow: 0 2px 5px rgba(37, 99, 235, 0.25);
}

.service-preset-chip {
    border-radius: 8px !important;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.4rem 0.75rem;
    transition: all 0.15s ease-in-out;
    border: 1px solid #cbd5e1;
}

.service-preset-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.service-preset-chip.btn-primary {
    border-color: #2563eb !important;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

.service-reminder-feedback {
    font-weight: 600;
    letter-spacing: 0.2px;
}

/* ========================================================
   RESPONSIVE PRIMARY ACTION CARDS (HOME DASHBOARD)
   ======================================================== */
/* Seamless vertical centering for Home Dashboard across all screens (iPhone / Mobile & Desktop) */
body.page-home main,
main:has(.minimal-hub-wrap) {
    display: flex;
    flex-direction: column;
    flex: 1;
}

body.page-home main > .container-fluid,
main:has(.minimal-hub-wrap) > .container-fluid {
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: center;
    justify-content: safe center;
    align-items: center;
    width: 100%;
}

.minimal-hub-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: auto;
    margin-bottom: auto;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    width: 100%;
}

@media (min-width: 768px) {
    .minimal-hub-wrap {
        flex: 1;
        padding-top: 1.5rem;
        padding-bottom: 2rem;
    }

    .btn-minimal-action {
        padding: 2.25rem 1.75rem !important;
        border-radius: 20px !important;
    }

    .btn-minimal-action .btn-minimal-icon {
        width: 62px;
        height: 62px;
        margin-bottom: 1.25rem !important;
    }

    .btn-minimal-action h2 {
        font-size: 1.85rem !important;
    }
}

.btn-minimal-action {
    padding: 1.35rem 1.25rem !important;
    border-radius: 16px !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    text-decoration: none !important;
}

.btn-minimal-action:hover {
    transform: translateY(-3px) scale(1.008);
}

.btn-minimal-action:active {
    transform: translateY(0) scale(0.99);
}

.btn-fuel-action {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 60%, #3b82f6 100%) !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25) !important;
}

.btn-fuel-action:hover {
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35) !important;
}

.btn-service-action {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 60%, #334155 100%) !important;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.25) !important;
}

.btn-service-action:hover {
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.35) !important;
}

.btn-minimal-icon {
    width: 52px;
    height: 52px;
    transition: transform 0.2s ease;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-minimal-action:hover .btn-minimal-icon {
    transform: scale(1.06);
}

.transition-icon {
    transition: transform 0.25s ease;
}

.collapsed-flipped {
    transform: rotate(180deg);
}

/* Clean minimal navbar on Home Page */
.home-minimal-nav .nav-link-item-full {
    display: none !important;
}

/* ========================================================
   COMPREHENSIVE MOBILE RESPONSIVENESS & TOUCH ENHANCEMENTS
   ======================================================== */

/* Prevent iOS Safari auto-zoom on input focus by ensuring >= 16px font size */
@media (max-width: 767.98px) {
    input.form-control,
    select.form-select,
    textarea.form-control {
        font-size: 16px !important;
        min-height: 44px;
    }
    .form-control-sm,
    .form-select-sm {
        font-size: 15px !important;
        min-height: 38px;
    }
    .input-group-text {
        font-size: 14px;
    }
    .btn {
        min-height: 40px;
    }
    .btn-sm {
        min-height: 34px;
    }
}

/* Modern Card & Stat Card Mobile Scaling */
@media (max-width: 575.98px) {
    .card-modern {
        border-radius: 12px;
        margin-bottom: 1rem;
    }
    .card-modern .card-header {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }
    .card-modern .card-body {
        padding: 1rem;
    }
    .stat-card {
        padding: 0.95rem;
        border-radius: 12px;
    }
    .stat-val,
    .stat-value {
        font-size: clamp(1.15rem, 4.5vw, 1.45rem);
    }
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
        border-radius: 10px;
    }
    .stat-label {
        font-size: 0.75rem;
        letter-spacing: 0.3px;
    }
    .btn-minimal-action {
        padding: 1.1rem 0.95rem !important;
        border-radius: 14px !important;
    }
    .btn-minimal-action h2 {
        font-size: 1.35rem !important;
    }
    .btn-minimal-action p {
        font-size: 0.8rem !important;
        margin-bottom: 0.5rem !important;
    }
    .btn-minimal-icon {
        width: 44px !important;
        height: 44px !important;
        border-radius: 12px !important;
        margin-bottom: 0.5rem !important;
    }
    .btn-minimal-icon i {
        font-size: 1.4rem !important;
    }
}

/* ODOMETER SMART ENTRY WIDGET RESPONSIVE SCALING */
@media (max-width: 575.98px) {
    .odometer-box {
        padding: 0.85rem 0.65rem;
        border-radius: 12px;
    }
    .odometer-display-wrap {
        padding: 6px 4px;
        gap: 4px;
        border-radius: 8px;
        justify-content: space-evenly;
        max-width: 100%;
    }
    .odo-prefix-block {
        padding: 4px 6px;
        font-size: 1.2rem;
        letter-spacing: 1px;
    }
    .odo-input-highlight {
        width: 92px;
        max-width: 32vw;
        font-size: 1.2rem;
        padding: 4px 2px;
        letter-spacing: 1px;
    }
    .quick-step-btn {
        font-size: 0.75rem;
        padding: 4px 6px;
        flex: 1 1 calc(25% - 6px);
        text-align: center;
    }
}

@media (max-width: 360px) {
    .odo-prefix-block {
        font-size: 1.05rem;
        padding: 3px 5px;
    }
    .odo-input-highlight {
        width: 78px;
        font-size: 1.05rem;
    }
}

/* PRICE CALCULATOR DISPLAY SCALING ON MOBILE */
@media (max-width: 575.98px) {
    .price-calculator-box {
        padding: 0.85rem 0.65rem;
        border-radius: 12px;
    }
    .price-display-wrap {
        padding: 6px 4px;
        gap: 4px;
        border-radius: 8px;
        justify-content: space-evenly;
        max-width: 100%;
    }
    .price-prefix-block {
        padding: 4px 6px;
        font-size: 1.15rem;
        letter-spacing: 0.5px;
    }
    .price-input-highlight {
        width: 95px;
        max-width: 30vw;
        font-size: 1.2rem;
        padding: 4px 2px;
        letter-spacing: 1px;
    }
    #prominent-liters-badge {
        font-size: 0.95rem !important;
        padding: 6px 8px !important;
    }
}

@media (max-width: 360px) {
    .price-prefix-block {
        font-size: 1rem;
        padding: 3px 5px;
    }
    .price-input-highlight {
        width: 80px;
        font-size: 1.05rem;
    }
    #prominent-liters-badge {
        font-size: 0.85rem !important;
        padding: 4px 6px !important;
    }
}

/* QUICK CASH & TANK PRESET BUTTONS GRID ON MOBILE */
@media (max-width: 575.98px) {
    .quick-cash-btn {
        flex: 1 1 calc(33.333% - 6px);
        text-align: center;
        min-height: 38px;
        padding: 6px 2px;
        font-size: 0.82rem;
    }
    .quick-full-tank-btn {
        flex: 1 1 100%;
        min-height: 38px;
        text-align: center;
        font-size: 0.82rem;
    }
}

/* SERVICE MODAL CATEGORY PILLS HORIZONTAL SLIDER */
@media (max-width: 767.98px) {
    .service-pills-bar {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 6px 4px !important;
        gap: 6px;
    }
    .service-pills-bar::-webkit-scrollbar {
        display: none;
    }
    .service-cat-pill {
        white-space: nowrap !important;
        flex-shrink: 0 !important;
        font-size: 0.8rem;
        padding: 5px 10px;
    }
    .service-sub-presets {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 4px 2px !important;
        gap: 6px;
    }
    .service-sub-presets::-webkit-scrollbar {
        display: none;
    }
    .service-preset-chip {
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }
}

/* RESPONSIVE TABLE UTILITIES & CLEAN SCROLLING */
.table-responsive {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    border-radius: 8px;
}

.table-entries th,
.table-entries td,
.table-responsive .table th,
.table-responsive .table td {
    vertical-align: middle;
}

@media (max-width: 767.98px) {
    .table-responsive .table th,
    .table-responsive .table td {
        white-space: nowrap;
        padding: 0.55rem 0.65rem;
        font-size: 0.85rem;
    }
    .table-responsive .badge {
        font-size: 0.75rem;
        padding: 0.3em 0.55em;
    }
    .table-responsive .btn-sm {
        padding: 0.25rem 0.45rem;
        font-size: 0.8rem;
        min-height: 30px;
    }
    .table-responsive td.cell-wrap {
        white-space: normal;
        min-width: 140px;
    }
}

/* MODAL MOBILE TUNING */
@media (max-width: 575.98px) {
    .modal-dialog {
        margin: 0.5rem;
    }
    .modal-body {
        padding: 1rem !important;
    }
    .modal-header {
        padding: 0.85rem 1rem !important;
    }
    .modal-footer {
        padding: 0.75rem 1rem !important;
    }
}

/* NAVBAR & DROPDOWNS OVERFLOW PROTECTION */
@media (max-width: 991.98px) {
    .navbar-collapse .dropdown-menu {
        max-width: calc(100vw - 2rem);
        width: 100%;
    }
    .navbar-nav .nav-link {
        padding: 0.5rem 0.75rem;
        border-radius: 8px;
    }
    .navbar-nav .nav-link.active {
        background-color: rgba(255, 255, 255, 0.08);
    }
}

/* REPORTS & ANALYTICS MOBILE ENHANCEMENTS */
@media (max-width: 767.98px) {
    .btn-group-responsive {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        scrollbar-width: none;
    }
    .btn-group-responsive::-webkit-scrollbar {
        display: none;
    }
    .btn-group-responsive .btn {
        white-space: nowrap;
        flex-shrink: 0;
    }
    .grade-circle {
        width: 76px;
        height: 76px;
        border-radius: 20px;
    }
    .grade-letter {
        font-size: 1.8rem;
    }
}

/* MOBILE BOTTOM NAVIGATION BAR (PWA / NATIVE APP FEEL) */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    z-index: 1040;
    padding-bottom: max(6px, env(safe-area-inset-bottom, 0));
    padding-top: 6px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
}

.mobile-bottom-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-around;
    max-width: 520px;
    margin: 0 auto;
    padding: 0 10px;
    position: relative;
}

.mobile-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 8px;
    transition: all 0.15s ease;
    min-width: 52px;
    position: relative;
}

.mobile-nav-link i {
    font-size: 1.15rem;
    margin-bottom: 2px;
}

.mobile-nav-link.active,
.mobile-nav-link:hover {
    color: #38bdf8;
}

.mobile-nav-fab {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    color: #ffffff;
    border: 3px solid #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.45);
    margin-top: -22px;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.mobile-nav-fab:active {
    transform: scale(0.92);
}

.mobile-nav-dot {
    position: absolute;
    top: 3px;
    right: 12px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

/* Reserve space at bottom on mobile devices so bottom nav does not obstruct content */
@media (max-width: 991.98px) {
    body {
        padding-bottom: 74px;
    }
}

/* Mobile Settings Nav Pills & Modals */
@media (max-width: 576px) {
    #settingsTab {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none;
        padding: 4px !important;
        border-radius: 14px !important;
    }
    #settingsTab::-webkit-scrollbar {
        display: none;
    }
    #settingsTab .nav-item {
        flex: 0 0 auto !important;
    }
    #settingsTab .nav-link {
        white-space: nowrap !important;
        font-size: 0.85rem !important;
        padding: 0.45rem 0.85rem !important;
    }
    .modal-dialog {
        margin: 0.5rem !important;
    }
    .modal-content {
        border-radius: 16px !important;
    }
}

/* Modal z-index so mobile bottom nav doesn't overlap dialogs */
.modal {
    z-index: 1060 !important;
}
.modal-backdrop {
    z-index: 1055 !important;
}

/* Admin Stat Cards Uniform Sizing & Flex Column */
.admin-stat-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.15rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    transition: transform 0.15s, box-shadow 0.15s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.admin-stat-card .fs-2 {
    font-size: clamp(1.35rem, 3.2vw, 1.85rem) !important;
    line-height: 1.2;
}

/* Admin Subnav Smooth Touch Swipe */
.admin-subnav ul {
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.admin-subnav ul::-webkit-scrollbar {
    display: none;
}
.admin-subnav .nav-link {
    white-space: nowrap;
}

/* Universal Dropdown Overflow Protection */
@media (max-width: 991.98px) {
    .dropdown-menu {
        max-width: calc(100vw - 20px) !important;
    }
    .dropdown-menu-end {
        right: 0 !important;
        left: auto !important;
    }
}

/* Vehicle Card 2x2 Info Grid for Pixel-Perfect Alignment */
.vehicle-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
.vehicle-info-cell {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 6px 10px;
    min-height: 52px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Wallet Impact Cards on Reports & Analytics */
.wallet-spend-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}
.wallet-spend-card h3 {
    font-size: clamp(1.15rem, 2.5vw, 1.55rem);
    word-break: break-word;
}

/* Modern Segmented Navigation Tabs for Reports */
.nav-pills-reports {
    background: #f1f5f9;
    padding: 5px;
    border-radius: 12px;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    border: 1px solid #e2e8f0;
}
.nav-pills-reports .nav-link {
    color: #475569;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 8px 18px;
    border-radius: 8px;
    transition: all 0.15s ease;
    border: none;
    background: transparent;
}
.nav-pills-reports .nav-link:hover {
    color: #1e293b;
    background: rgba(255, 255, 255, 0.7);
}
.nav-pills-reports .nav-link.active {
    color: #2563eb !important;
    background: #ffffff !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Compact Modern Filter Bar */
.reports-filter-bar {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 16px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

/* Print Overrides: Show all tabs when printing */
@media print {
    .nav-pills-reports, .reports-filter-bar {
        display: none !important;
    }
    .tab-content > .tab-pane {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        margin-bottom: 2rem;
    }
}

/* Compact Space-Saving Unified Date & Time Controls */
input[type="datetime-local"] {
    letter-spacing: -0.2px;
}
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
    transform: scale(1.1);
}
#quick-entry-datetime-addon {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}
#quick-entry-datetime-addon:hover {
    background-color: #e2e8f0 !important;
    color: #2563eb !important;
}

/* SERVICE FAST PRESETS & UNCLUTTERED MODAL STYLING */
.service-presets-box {
    background: #f8fafc;
    border-color: #e2e8f0 !important;
}
.service-preset-chip {
    border-radius: 50px !important;
    padding: 0.35rem 0.85rem !important;
    font-size: 0.825rem !important;
    font-weight: 500 !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    border: 1px solid #cbd5e1 !important;
    background: #ffffff;
}
.service-preset-chip:hover {
    border-color: #0d6efd !important;
    background-color: #eff6ff !important;
    color: #0d6efd !important;
    transform: translateY(-1px);
}
.service-preset-chip.btn-primary {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(13, 110, 253, 0.25) !important;
}
.service-preset-chip .badge {
    border-radius: 20px !important;
    font-size: 0.725rem !important;
    font-weight: 600 !important;
    padding: 0.2rem 0.5rem !important;
    letter-spacing: -0.2px;
}
.service-reminder-scope-card {
    background: #f8fafc;
    border-color: #e2e8f0 !important;
}
.service-reminder-scope-card .form-control {
    background-color: #ffffff !important;
    border-color: #cbd5e1;
}
.service-reminder-scope-card .form-control:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* ==========================================================================
   CAR & FUEL TELEMETRY ANIMATIONS (Pure CSS & SVG 60FPS Flicker-Free)
   ========================================================================== */

/* 1. Animated Night Highway & Driving Car Stage */
.car-stage-wrapper {
    position: relative;
    width: 100%;
    height: 160px;
    background: linear-gradient(180deg, #070d1e 0%, #0f172a 65%, #1e293b 100%);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.5), 0 8px 24px rgba(0,0,0,0.25);
    border: 1px solid rgba(255,255,255,0.12);
    contain: paint;
}

/* Night starry sky with steady stars (zero flicker) */
.car-stage-sky {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 105px;
    background-image: 
        radial-gradient(1px 1px at 25px 25px, #ffffff, rgba(0,0,0,0)),
        radial-gradient(1.5px 1.5px at 110px 18px, #60a5fa, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 220px 40px, #ffffff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 340px 20px, #93c5fd, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 450px 35px, #ffffff, rgba(0,0,0,0));
    opacity: 0.75;
    pointer-events: none;
}

/* Road surface - sits strictly at the bottom */
.car-stage-road {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 48px;
    background: #090e1a;
    border-top: 1px solid #1e293b;
    overflow: hidden;
}

/* Moving road center dashed line - positioned safely near the bottom of road */
.car-stage-stripes {
    position: absolute;
    bottom: 12px;
    left: 0;
    width: 200%;
    height: 3px;
    background: repeating-linear-gradient(90deg, #f59e0b 0, #f59e0b 24px, transparent 24px, transparent 48px);
    animation: roadMove 0.8s linear infinite;
    will-change: transform;
    transform: translateZ(0);
}

@keyframes roadMove {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-48px, 0, 0); }
}

/* Animated Car Chassis & Suspension - Pure GPU translation, zero repaint */
.animated-car-body {
    position: absolute;
    bottom: 16px;
    left: 24px;
    width: 280px;
    height: 75px;
    animation: carBounce 1.4s ease-in-out infinite;
    z-index: 5;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

@media (max-width: 400px) {
    .animated-car-body {
        transform: scale(0.88) translateZ(0);
        transform-origin: left bottom;
        left: 10px;
    }
}

.car-stage-wrapper:hover .animated-car-body {
    transform: translate3d(14px, 0, 0);
}

@keyframes carBounce {
    0%, 100% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(0, -1.5px, 0); }
}

/* High Speed Spinning Wheels - Smooth, non-strobing, properly centered */
.car-wheel-rim {
    transform-box: fill-box;
    transform-origin: center;
    animation: wheelSpin 1.4s linear infinite;
    will-change: transform;
}

@keyframes wheelSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 2. Animated Fuel Gauge HUD & Liquid Shimmer */
.fuel-meter-hud {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 14px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(8px);
}

.animated-fuel-track {
    position: relative;
    width: 100%;
    height: 14px;
    background: #1e293b;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.animated-fuel-liquid {
    height: 100%;
    width: 82%;
    background: linear-gradient(90deg, #10b981 0%, #0ea5e9 60%, #38bdf8 100%);
    border-radius: 6px;
    position: relative;
    animation: fuelLiquidPulse 3s ease-in-out infinite alternate;
}

@keyframes fuelLiquidPulse {
    0% { width: 78%; filter: brightness(0.95); }
    100% { width: 86%; filter: brightness(1.15); box-shadow: 0 0 12px rgba(14, 165, 233, 0.5); }
}

.animated-fuel-liquid::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
    animation: liquidShimmer 2.2s infinite;
}

@keyframes liquidShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Fuel Drop Pulse & Glow */
.fuel-drop-icon {
    display: inline-block;
    color: #38bdf8;
    animation: fuelDropDrip 1.8s ease-in-out infinite;
}

@keyframes fuelDropDrip {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.9; }
    50% { transform: translateY(2px) scale(1.15); opacity: 1; filter: drop-shadow(0 0 4px #38bdf8); }
}

/* 3. Hero Action Buttons (Home Dashboard - Clean & Professional) */
.btn-fuel-action .btn-minimal-icon,
.btn-service-action .btn-minimal-icon {
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-fuel-action:hover .btn-minimal-icon,
.btn-service-action:hover .btn-minimal-icon {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12) !important;
}

/* ==========================================================================
   4. LIVE INTERFACE SHOWCASE (UPRIGHT, CRISP & MODERN BROWSER MOCKUP)
   ========================================================================== */

/* Upright Realistic Showcase Browser Window (Zero tilt, crisp, proportional) */
.showcase-browser-window {
    width: 100%;
    background: #f8fafc;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.1);
    overflow: hidden;
    transform: none !important;
    transition: box-shadow 0.3s ease;
}

.showcase-browser-window:hover {
    box-shadow: 0 22px 46px -8px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.15);
}

/* Chrome / Browser Header */
.browser-chrome {
    background: #ffffff;
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
    border-bottom: 1px solid #e2e8f0;
}

.window-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
}

.dot-close { background: #ef4444; }
.dot-min { background: #f59e0b; }
.dot-max { background: #10b981; }

.browser-address-bar {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    min-width: 175px;
}

/* App Header inside Mockup */
.mockup-app-nav {
    background: #0f172a !important;
}

/* Mockup Body */
.mockup-app-body {
    background: #f8fafc;
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 14px;
}

.preview-tab {
    transition: all 0.2s ease;
    white-space: nowrap;
}

/* Showcase Switcher Bar */
.showcase-switcher-bar {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Landing Page Responsive Mobile Clean Styles */
.refuel-mobile-card {
    transition: background-color 0.15s ease;
}

@media (max-width: 991.98px) {
    .landing-hero {
        padding: 30px 0 34px !important;
    }
}

@media (max-width: 767.98px) {
    .landing-hero {
        padding: 22px 0 26px !important;
    }
    .landing-card {
        border-radius: 14px !important;
    }
    .icon-bubble {
        width: 46px !important;
        height: 46px !important;
        font-size: 1.3rem !important;
        border-radius: 12px !important;
    }
    .browser-address-bar {
        min-width: 0 !important;
        max-width: 160px !important;
    }
    .showcase-browser-window {
        border-radius: 14px !important;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45) !important;
    }
}

@media (max-width: 575.98px) {
    .showcase-header-bar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }
    .showcase-badge {
        align-self: center !important;
    }
    .showcase-switcher-bar {
        width: 100% !important;
        display: flex !important;
        justify-content: space-between !important;
        padding: 3px !important;
    }
    .showcase-switcher-bar .preview-tab {
        flex: 1 1 0 !important;
        text-align: center !important;
        padding: 5px 3px !important;
        font-size: 0.72rem !important;
    }
    .hero-btn-cta,
    .hero-btn-secondary {
        font-size: 0.88rem !important;
        padding: 7px 18px !important;
    }
}


