:root {
    --lk-bg: #f3f6fb;
    --lk-surface: #ffffff;
    --lk-surface-soft: #f8fbff;
    --lk-border: #d9e0ee;
    --lk-text: #1d2a3b;
    --lk-muted: #637084;
    --lk-primary: #0f6fda;
    --lk-primary-dark: #0c61be;
    --lk-success: #1f9d62;
    --lk-danger: #c13d3d;
    --lk-shadow: 0 10px 24px rgba(18, 33, 64, 0.08);
    --lk-shadow-lg: 0 16px 36px rgba(18, 33, 64, 0.12);
    --lk-radius: 8px;
    --lk-radius-lg: 8px;
    --lk-field-height: 42px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Inter", "Segoe UI", Tahoma, sans-serif;
    color: var(--lk-text);
    background: var(--lk-bg);
    line-height: 1.42;
    font-size: 0.96rem;
    overflow-x: hidden;
}

html {
    overflow-x: hidden;
}

.g-sidenav-show {
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--lk-text);
    font-weight: 700;
    letter-spacing: 0;
}

.form-label {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 0.4rem;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0;
    color: #344256;
}

p, label, span, small {
    color: inherit;
}

a {
    color: var(--lk-primary);
    text-decoration: none;
}

a:hover {
    color: var(--lk-primary-dark);
}

.main-content,
.container-fluid,
.container {
    color: var(--lk-text);
}

.main-content .container-fluid.py-4 {
    padding-top: 1.1rem !important;
    padding-bottom: 1.1rem !important;
}

.main-content .lk-section {
    position: relative;
}

.main-content .lk-section::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255,255,255,0.42), transparent 26%);
}

.card {
    background: var(--lk-surface);
    border: 1px solid var(--lk-border);
    border-radius: var(--lk-radius);
    box-shadow: var(--lk-shadow);
    overflow: hidden;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
    box-shadow: var(--lk-shadow-lg);
    border-color: rgba(15, 111, 218, 0.22);
}

.card-header {
    padding-top: 1rem;
    padding-bottom: 0.95rem;
}

.card-header {
    background: var(--lk-surface-soft);
    border-bottom: 1px solid var(--lk-border);
}

.navbar-brand {
    font-weight: 700;
}

.navbar-main,
.page_header,
.navbar {
    box-shadow: 0 8px 24px rgba(18, 33, 64, 0.06);
}

.btn {
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0;
    font-size: 0.92rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

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

.lk-workflow-actions .btn {
    font-size: 0.75rem;
    line-height: 1;
    padding: 0.45rem 0.7rem;
    white-space: nowrap;
}

.lk-workflow-actions .lk-action-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.lk-workflow-actions .lk-action-chip i {
    font-size: 0.85em;
}

.btn-primary,
.bg-gradient-primary {
    background-color: var(--lk-primary) !important;
    border-color: var(--lk-primary) !important;
    color: #fff !important;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--lk-primary-dark) !important;
    border-color: var(--lk-primary-dark) !important;
}

.btn-success {
    background-color: var(--lk-success);
    border-color: var(--lk-success);
}

.btn-danger {
    background-color: var(--lk-danger);
    border-color: var(--lk-danger);
}

.form-control,
.form-select,
.input-group-outline .form-control,
textarea,
select.form-control {
    border-color: var(--lk-border);
    border-radius: 8px;
    color: var(--lk-text);
    background: var(--lk-surface);
    font-size: 0.95rem;
    min-height: var(--lk-field-height);
    padding: 0.58rem 0.75rem;
    box-shadow: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

select.form-control,
.form-select {
    appearance: auto;
    cursor: pointer;
}

.form-control-sm,
select.form-control-sm {
    min-height: 38px;
    padding: 0.47rem 0.65rem;
    font-size: 0.9rem;
}

textarea.form-control,
textarea.form-control-sm {
    min-height: auto;
    resize: vertical;
}

.form-control:focus,
.form-select:focus,
textarea:focus {
    border-color: var(--lk-primary);
    box-shadow: 0 0 0 0.2rem rgba(15, 111, 218, 0.15);
}

.form-control[readonly],
.form-control:disabled,
.form-select:disabled {
    background: #f4f7fb;
    color: #667085;
    cursor: not-allowed;
}

.is-invalid,
.form-control.is-invalid,
.form-select.is-invalid,
.was-validated .form-control:invalid,
.was-validated .form-select:invalid {
    border-color: var(--lk-danger);
    box-shadow: 0 0 0 0.15rem rgba(193, 61, 61, 0.12);
}

.invalid-feedback,
.text-danger.text-xs,
.text-danger.small {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.35;
}

.lk-form {
    display: block;
}

.lk-form-section {
    margin-bottom: 1rem;
    border: 1px solid var(--lk-border);
    border-radius: var(--lk-radius);
    background: #fff;
    box-shadow: var(--lk-shadow);
    overflow: hidden;
}

.lk-form-section__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.95rem 1rem;
    background: #f8fbff;
    border-bottom: 1px solid var(--lk-border);
}

.lk-form-section__title {
    margin: 0;
    font-size: 0.96rem;
    font-weight: 800;
    color: var(--lk-text);
}

.lk-form-section__meta {
    margin-top: 0.2rem;
    color: var(--lk-muted);
    font-size: 0.82rem;
}

.lk-form-section__body {
    padding: 1rem;
}

.lk-field {
    margin-bottom: 0;
}

.lk-required {
    color: var(--lk-danger);
    font-weight: 800;
}

.lk-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 0.9rem 1rem;
    margin-top: 1rem;
    border: 1px solid var(--lk-border);
    border-radius: var(--lk-radius);
    background: #fff;
    box-shadow: var(--lk-shadow);
}

.load-active-card {
    border: 1px solid var(--lk-border);
    border-radius: 8px;
    background: #fff;
    padding: 1rem;
}

.load-route-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--lk-text);
}

/* Keep helper copy visually separated from inputs across all form styles. */
.form-text,
.text-muted.text-sm,
.small.text-muted,
small.form-text {
    display: block;
    margin-top: 0.55rem;
    margin-bottom: 0;
    line-height: 1.45;
    clear: both;
}

.form-group > .form-text,
.form-group > .text-muted.text-sm,
.form-group > .small.text-muted,
.form-group > small.form-text {
    margin-bottom: 0;
}

/* Material outline groups in this project behave more reliably as stacked fields. */
.input-group.input-group-outline {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    margin-bottom: 1rem;
}

.input-group.input-group-outline .form-label {
    position: static !important;
    top: auto;
    margin: 0 0 0.35rem 0;
    transform: none;
    line-height: 1.2;
}

.input-group.input-group-outline .form-control,
.input-group.input-group-outline .form-select {
    width: 100%;
    margin: 0;
}

.input-group.input-group-outline .form-text,
.input-group.input-group-outline .text-muted.text-sm,
.input-group.input-group-outline .small.text-muted,
.input-group.input-group-outline small.form-text {
    margin-top: 0.35rem;
    margin-left: 0;
}

.input-group.input-group-outline + .form-text,
.input-group.input-group-outline + .text-muted.text-sm,
.input-group.input-group-outline + .small.text-muted,
.input-group.input-group-outline + small.form-text {
    margin-top: 0.45rem;
}

::placeholder {
    color: #8c97aa;
}

.table {
    color: var(--lk-text);
    border-color: var(--lk-border);
    margin-bottom: 0;
}

table.table thead th {
    background: #eef3fb;
    color: var(--lk-text);
    border-bottom: 1px solid var(--lk-border);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.35px;
    font-size: 0.76rem;
}

table.table tbody tr {
    border-bottom: 1px solid #edf1f7;
    transition: background-color 0.18s ease, transform 0.18s ease;
}

table.table tbody tr:nth-child(even),
.table-striped tbody tr:nth-of-type(even) {
    background: #fafcff;
}

table.table tbody tr:hover {
    background: #f4f8ff;
}

table.table td,
table.table th {
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
}

.lk-trip-list-table td,
.lk-trip-list-table th {
    vertical-align: middle;
}

.lk-trip-actions-cell {
    min-width: 320px;
}

.lk-trip-actions .btn {
    white-space: nowrap;
    font-size: 0.7rem;
    padding: 0.34rem 0.55rem;
    line-height: 1;
}

.lk-trip-actions .btn i {
    font-size: 0.82em;
}

.lk-trip-actions .btn-outline-info,
.lk-trip-actions .btn-outline-primary,
.lk-trip-actions .btn-outline-warning,
.lk-trip-actions .btn-outline-danger,
.lk-trip-actions .btn-outline-success,
.lk-trip-actions .btn-outline-dark,
.lk-trip-actions .btn-outline-secondary {
    background: #fff;
}

.lk-trip-command-table th {
    white-space: nowrap;
}

.lk-trip-command-table td {
    vertical-align: middle;
    min-width: 150px;
}

.lk-trip-command-table td:nth-child(2) {
    min-width: 240px;
}

.lk-trip-command-table td:nth-child(4) {
    min-width: 220px;
}

.lk-trip-command-table td:last-child {
    min-width: 270px;
}

.lk-trip-title {
    color: var(--lk-text);
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.25;
}

.lk-trip-route {
    color: var(--lk-text);
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.35;
    max-width: 320px;
    white-space: normal;
}

.lk-trip-sub {
    color: var(--lk-muted);
    font-size: 0.76rem;
    line-height: 1.35;
    margin-top: 0.2rem;
}

.lk-trip-money-cell {
    font-size: 0.78rem;
}

.lk-trip-progress {
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: #eef2f7;
}

.lk-trip-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #16a34a, #0f6fda);
}

.lk-trip-action-stack .btn {
    min-width: 2.2rem;
    border-radius: 8px;
    box-shadow: none;
}

.badge,
.btn-sm {
    border-radius: 8px;
}

.btn-sm {
    font-size: 0.8rem;
    padding: 0.35rem 0.65rem;
}

.btn i {
    font-size: 0.9em;
}

.alert {
    border-radius: 8px;
    border: 1px solid var(--lk-border);
}

.sidenav .nav-link {
    border-radius: 8px;
    margin-bottom: 4px;
    transition: background-color 0.2s ease, transform 0.2s ease;
    font-size: 0.94rem;
}

.nav-link-text {
    font-size: 0.92rem;
}

.lk-nav-icon {
    width: 24px;
    min-width: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    line-height: 1;
}

.lk-admin-sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.sidenav .nav-link:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: translateX(2px);
}

.sidenav .nav-link.active,
.sidenav .nav-item.active > .nav-link {
    background: rgba(255, 255, 255, 0.2);
}

.lk-sidenav-submenu {
    margin: 0.35rem 0 0.35rem 1.05rem;
    padding: 0.35rem 0 0.35rem 0.75rem;
    border-left: 1px solid rgba(255, 255, 255, 0.14);
    max-width: calc(100% - 1.05rem);
}

.lk-sidenav-submenu .nav-item {
    margin-bottom: 0.15rem;
}

.lk-sidenav-submenu .nav-link {
    padding: 0.46rem 0.75rem;
    font-size: 0.84rem;
    opacity: 0.9;
    white-space: normal;
}

.lk-admin-sidebar .lk-sidenav-submenu .nav-link {
    gap: 0.45rem;
}

.lk-admin-sidebar .collapse.navbar-collapse {
    width: 100% !important;
    max-width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    overscroll-behavior: contain;
}

.lk-admin-sidebar .collapse.navbar-collapse::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.lk-admin-sidebar .navbar-nav {
    width: 100%;
    min-width: 0;
}

.lk-admin-sidebar .nav-item,
.lk-admin-sidebar .nav-link {
    min-width: 0;
    max-width: 100%;
}

.lk-admin-sidebar .nav-link,
.lk-admin-sidebar .nav-link .nav-link-text,
.lk-admin-sidebar .nav-link .lk-nav-icon,
.lk-admin-sidebar .nav-link i {
    color: #fff !important;
}

.lk-admin-sidebar .nav-link-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lk-sidenav-submenu .nav-link.active {
    background: rgba(255, 255, 255, 0.16);
    opacity: 1;
}

.lk-admin-sidebar .nav-link.active,
.lk-admin-sidebar .nav-item.active > .nav-link,
.lk-admin-sidebar .nav-link[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.18) !important;
    color: #fff !important;
}

.lk-admin-sidebar .nav-link.active .nav-link-text,
.lk-admin-sidebar .nav-link.active .lk-nav-icon,
.lk-admin-sidebar .nav-link[aria-expanded="true"] .nav-link-text,
.lk-admin-sidebar .nav-link[aria-expanded="true"] .lk-nav-icon {
    color: #fff !important;
}

.lk-page-title {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.lk-page-subtitle {
    font-size: 0.88rem;
    color: var(--lk-muted);
}

.lk-surface {
    background: var(--lk-surface);
    border: 1px solid var(--lk-border);
    border-radius: var(--lk-radius);
    box-shadow: var(--lk-shadow);
}

.lk-panel {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--lk-border);
    border-radius: var(--lk-radius-lg);
    background: #fff;
    box-shadow: var(--lk-shadow);
}

.lk-section {
    margin-bottom: 1rem;
    padding: 1rem 1.15rem;
}

.lk-hero-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    padding: 0.9rem 1rem;
    background: linear-gradient(120deg, #ffffff 0%, #eef4ff 100%);
    border: 1px solid var(--lk-border);
    border-radius: var(--lk-radius);
}

.lk-admin-hero-bar {
    box-shadow: var(--lk-shadow);
}

.lk-admin-sidebar {
    background: linear-gradient(180deg, #0f172a 0%, #111d36 50%, #0b1222 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.32);
    width: 280px !important;
    max-width: calc(100vw - 1rem);
    overflow: hidden;
}

.lk-sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.5rem 0.1rem;
}

.lk-sidebar-brand .navbar-brand-img {
    max-height: 52px;
    object-fit: contain;
}

.lk-admin-topbar {
    position: sticky;
    top: 0.9rem;
    z-index: 1020;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(217, 224, 238, 0.9);
    border-radius: var(--lk-radius);
    box-shadow: var(--lk-shadow);
}

.lk-admin-topbar .container-fluid {
    min-height: 64px;
}

.lk-admin-eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.55rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #edf4ff, #e3efff);
    color: var(--lk-primary-dark);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.25px;
    text-transform: uppercase;
}

.lk-admin-topbar .nav-link {
    font-size: 0.92rem;
}

.lk-admin-topbar #iconNavbarSidenav,
.lk-admin-topbar .nav-item.d-xl-none.ps-3.d-flex.align-items-center,
#iconNavbarSidenav,
#iconSidenav,
.sidenav-toggler-inner {
    display: none !important;
}

@media (max-width: 1199.98px) {
    .lk-admin-topbar #iconNavbarSidenav,
    .lk-admin-topbar .nav-item.d-xl-none.ps-3.d-flex.align-items-center,
    #iconNavbarSidenav,
    #iconSidenav,
    .sidenav-toggler-inner {
        display: flex !important;
    }

    .sidenav-toggler-inner {
        flex-direction: column;
    }
}

.lk-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 55%, #0ea5e9 100%);
    color: #fff;
    border-radius: var(--lk-radius-lg);
    box-shadow: var(--lk-shadow-lg);
}

.lk-grid-animate > * {
    animation: lkFadeUp 0.55s ease both;
}

.lk-grid-animate > *:nth-child(2) { animation-delay: 0.05s; }
.lk-grid-animate > *:nth-child(3) { animation-delay: 0.10s; }
.lk-grid-animate > *:nth-child(4) { animation-delay: 0.15s; }
.lk-grid-animate > *:nth-child(5) { animation-delay: 0.20s; }
.lk-grid-animate > *:nth-child(6) { animation-delay: 0.25s; }
.lk-grid-animate > *:nth-child(7) { animation-delay: 0.30s; }
.lk-grid-animate > *:nth-child(8) { animation-delay: 0.35s; }

.lk-metric {
    position: relative;
    overflow: hidden;
    min-height: 100%;
    border: 1px solid rgba(15, 111, 218, 0.12);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.lk-metric::after {
    content: "";
    position: absolute;
    right: -24px;
    top: -24px;
    width: 88px;
    height: 88px;
    border-radius: 999px;
    background: rgba(15, 111, 218, 0.08);
}

.lk-metric-value {
    font-size: 1.24rem;
    font-weight: 800;
    letter-spacing: 0;
}

.lk-admin-dashboard {
    display: grid;
    gap: 1rem;
}

.lk-admin-stat-card {
    border: 1px solid rgba(15, 111, 218, 0.14);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.lk-admin-stat-card .card-body {
    padding: 1.05rem 1.1rem;
}

.lk-admin-stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 8px;
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.12);
    flex: 0 0 auto;
}

.lk-admin-stat-icon i {
    font-size: 1.1rem;
}

.lk-admin-panel-card {
    height: 100%;
}

.lk-admin-panel-card .card-body {
    padding: 1rem 1.1rem 1.15rem;
}

.lk-badge-soft {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #edf4ff, #e4f0ff);
    color: var(--lk-primary-dark);
    font-size: 0.78rem;
    font-weight: 700;
    box-shadow: inset 0 0 0 1px rgba(15, 111, 218, 0.08);
}

.lk-mini-stat {
    display: grid;
    gap: 0.35rem;
    padding: 1rem;
    border-radius: var(--lk-radius);
    border: 1px solid var(--lk-border);
    background: linear-gradient(180deg, #ffffff, #f9fbff);
}

.lk-mini-stat-value {
    font-size: 1.1rem;
    font-weight: 800;
}

.lk-kpi {
    padding: 1rem 1.05rem;
    border-radius: var(--lk-radius);
    border: 1px solid var(--lk-border);
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    box-shadow: var(--lk-shadow);
}

.lk-kpi-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--lk-muted);
}

.lk-kpi-value {
    font-size: 1.12rem;
    font-weight: 800;
    letter-spacing: 0;
}

.lk-tally-overview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.lk-tally-scorecard {
    display: flex;
    min-height: 132px;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem;
    border: 1px solid var(--lk-border);
    border-radius: var(--lk-radius);
    background: linear-gradient(180deg, #fff, #f8fbff);
    box-shadow: var(--lk-shadow);
}

.lk-tally-scorecard-success {
    border-color: rgba(21, 128, 61, 0.22);
    background: linear-gradient(180deg, #ffffff, #f2fbf5);
}

.lk-tally-scorecard-danger {
    border-color: rgba(220, 38, 38, 0.22);
    background: linear-gradient(180deg, #ffffff, #fff5f5);
}

.lk-tally-score-value {
    color: var(--lk-text);
    font-size: clamp(1.35rem, 2vw, 1.9rem);
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1.1;
}

.lk-tally-score-icon {
    display: inline-flex;
    width: 3.2rem;
    height: 3.2rem;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #e8f5ee;
    color: #15803d;
    font-size: 1.2rem;
}

.lk-tally-scorecard-danger .lk-tally-score-icon {
    background: #fff1f2;
    color: #dc2626;
}

.lk-tally-score-icon-muted {
    background: #eef4ff;
    color: var(--lk-primary-dark);
}

.lk-tally-ring {
    --value: 0;
    display: inline-flex;
    width: 4.25rem;
    height: 4.25rem;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background:
        radial-gradient(circle at center, #fff 0 58%, transparent 59%),
        conic-gradient(#16a34a calc(var(--value) * 1%), #e8edf5 0);
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.lk-tally-ring span {
    color: var(--lk-text);
    font-size: 0.82rem;
    font-weight: 800;
}

.lk-tally-chart {
    display: grid;
    gap: 0.95rem;
}

.lk-tally-chart-row {
    display: grid;
    gap: 0.4rem;
}

.lk-tally-chart-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: var(--lk-muted);
    font-size: 0.86rem;
}

.lk-tally-chart-label strong {
    color: var(--lk-text);
    font-weight: 800;
}

.lk-tally-bar,
.lk-tally-health-bar {
    height: 0.68rem;
    overflow: hidden;
    border-radius: 999px;
    background: #edf1f7;
}

.lk-tally-bar span,
.lk-tally-health-bar span {
    display: block;
    height: 100%;
    min-width: 0;
    border-radius: inherit;
}

.lk-tally-bar-rent {
    background: linear-gradient(90deg, #2563eb, #0ea5e9);
}

.lk-tally-bar-expense {
    background: linear-gradient(90deg, #ef4444, #f97316);
}

.lk-tally-bar-toll {
    background: linear-gradient(90deg, #f59e0b, #eab308);
}

.lk-tally-bar-wage {
    background: linear-gradient(90deg, #7c3aed, #a855f7);
}

.lk-tally-bar-recovery {
    background: linear-gradient(90deg, #059669, #22c55e);
}

.lk-tally-bar-success {
    background: linear-gradient(90deg, #15803d, #16a34a);
}

.lk-tally-bar-danger,
.lk-tally-health-bar span {
    background: linear-gradient(90deg, #dc2626, #f97316);
}

.lk-tally-formula {
    display: grid;
    gap: 0.55rem;
}

.lk-tally-formula-step,
.lk-tally-formula-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.7rem 0.78rem;
    border: 1px solid var(--lk-border);
    border-radius: 8px;
    background: #fff;
    color: var(--lk-muted);
    font-size: 0.86rem;
}

.lk-tally-formula-step strong,
.lk-tally-formula-total strong {
    color: var(--lk-text);
    font-weight: 800;
    text-align: right;
}

.lk-tally-formula-step.positive {
    border-left: 3px solid #16a34a;
}

.lk-tally-formula-step.negative {
    border-left: 3px solid #ef4444;
}

.lk-tally-formula-total {
    margin-top: 0.2rem;
    color: var(--lk-text);
    font-weight: 800;
}

.lk-tally-formula-total.success {
    border-color: rgba(21, 128, 61, 0.28);
    background: #f0fdf4;
}

.lk-tally-formula-total.danger {
    border-color: rgba(220, 38, 38, 0.28);
    background: #fff5f5;
}

.lk-tally-health {
    display: grid;
    gap: 0.55rem;
    padding: 0.85rem;
    border: 1px solid var(--lk-border);
    border-radius: 8px;
    background: #f8fafc;
}

.lk-tally-health > div:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    color: var(--lk-muted);
    font-size: 0.86rem;
}

.lk-tally-health strong {
    color: var(--lk-text);
    font-weight: 800;
}

.nav-tabs {
    border-bottom: 1px solid var(--lk-border);
    gap: 0.35rem;
}

.nav-tabs .nav-link {
    border: 1px solid transparent;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    color: var(--lk-muted);
    font-size: 0.88rem;
    font-weight: 600;
    padding: 0.55rem 0.9rem;
}

.nav-tabs .nav-link:hover {
    border-color: rgba(15, 111, 218, 0.14);
    color: var(--lk-primary-dark);
}

.nav-tabs .nav-link.active {
    color: var(--lk-primary-dark);
    background: #fff;
    border-color: var(--lk-border) var(--lk-border) #fff;
    box-shadow: 0 -1px 0 #fff, 0 8px 18px rgba(18, 33, 64, 0.06);
}

.nav-pills .nav-link {
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 600;
}

.nav-pills .nav-link.active {
    background: var(--lk-primary);
}

.lk-toolbar {
    padding: 1rem 1.1rem;
    border-radius: var(--lk-radius);
    border: 1px solid var(--lk-border);
    background: linear-gradient(180deg, #fff, #f7fbff);
    box-shadow: var(--lk-shadow);
}

.lk-table-wrap {
    border: 1px solid var(--lk-border);
    border-radius: var(--lk-radius-lg);
    overflow: hidden;
    background: #fff;
    box-shadow: var(--lk-shadow);
}

.lk-table-wrap .table {
    margin-bottom: 0;
}

.lk-pagination {
    border-top: 1px solid var(--lk-border);
    background: #fff;
    padding-top: 1rem;
}

.lk-pagination .pagination {
    gap: 0.35rem;
}

.lk-pagination .page-link {
    min-width: 2rem;
    border: 1px solid var(--lk-border);
    border-radius: 8px;
    color: var(--lk-primary-dark);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
    padding: 0.5rem 0.7rem;
    text-align: center;
}

.lk-pagination .page-link:hover {
    background: #eef6ff;
    border-color: rgba(15, 111, 218, 0.28);
    color: var(--lk-primary-dark);
}

.lk-pagination .page-item.active .page-link {
    background: var(--lk-primary);
    border-color: var(--lk-primary);
    color: #fff;
}

.lk-pagination .page-item.disabled .page-link {
    background: #f6f8fb;
    color: var(--lk-muted);
    opacity: 0.65;
}

/* Professional refresh layer shared by admin, backend, passenger, web, and guest layouts. */
body {
    background:
        linear-gradient(180deg, #eef4fb 0%, #f6f8fc 42%, #eef3f8 100%);
}

.main-content {
    min-height: 100vh;
}

.container-fluid,
.container {
    max-width: 100%;
}

.main-content .container-fluid.py-4,
.page_content,
.content-wrapper {
    position: relative;
}

.lk-section,
.lk-surface,
.card,
.lk-panel,
.lk-toolbar,
.lk-table-wrap,
.lk-form-section,
.lk-form-actions,
.load-active-card {
    border-color: rgba(148, 163, 184, 0.42);
}

.lk-section,
.lk-surface {
    background: rgba(255, 255, 255, 0.9);
}

.lk-panel,
.card,
.lk-toolbar,
.lk-form-section,
.lk-table-wrap {
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

.card,
.lk-panel,
.lk-mini-stat,
.lk-kpi,
.lk-toolbar,
.lk-form-section,
.lk-table-wrap {
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.card:hover,
.lk-panel:hover,
.lk-mini-stat:hover,
.lk-kpi:hover {
    border-color: rgba(15, 111, 218, 0.22);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.1);
}

.lk-page-title,
.card-title,
.card-header h1,
.card-header h2,
.card-header h3,
.card-header h4,
.card-header h5,
.card-header h6,
.lk-panel h1,
.lk-panel h2,
.lk-panel h3,
.lk-panel h4,
.lk-panel h5,
.lk-panel h6 {
    letter-spacing: 0;
}

.lk-page-title {
    color: #142033;
    font-size: clamp(1.18rem, 1.5vw, 1.48rem);
}

.lk-page-subtitle {
    max-width: 760px;
}

.lk-hero-bar {
    position: relative;
    overflow: hidden;
    padding: 1rem 1.15rem;
    background:
        linear-gradient(120deg, rgba(255,255,255,0.96) 0%, rgba(238,246,255,0.96) 58%, rgba(240,253,244,0.92) 100%);
}

.lk-hero-bar::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--lk-primary), #16a34a, #f59e0b);
}

.lk-hero {
    background: linear-gradient(135deg, #0f172a 0%, #0f6fda 58%, #16a34a 100%);
}

.lk-hero h1,
.lk-hero h2,
.lk-hero h3,
.lk-hero h4,
.lk-hero h5,
.lk-hero h6 {
    color: #fff;
}

.lk-badge-soft {
    border: 1px solid rgba(15, 111, 218, 0.1);
}

.card-header,
.lk-form-section__header {
    background: linear-gradient(180deg, #fbfdff 0%, #f2f6fb 100%);
}

.card-body {
    padding: 1.1rem 1.15rem;
}

.lk-metric .card-body,
.lk-admin-stat-card .card-body {
    min-height: 118px;
}

.lk-metric-value,
.lk-mini-stat-value,
.lk-kpi-value {
    color: #172033;
}

.lk-mini-stat,
.lk-kpi {
    background: linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 38px;
    box-shadow: none;
}

.btn:not(.btn-link):hover {
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.12);
}

.lk-section .material-icons,
.lk-section .fas,
.lk-section .fa {
    line-height: 1;
    vertical-align: middle;
}

.lk-section .btn .material-icons,
.lk-section .btn .fas,
.lk-section .btn .fa {
    font-size: 0.95rem;
}

.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-success,
.btn-outline-danger,
.btn-outline-warning,
.btn-outline-info,
.btn-outline-dark {
    background: #fff;
}

.btn-outline-primary:hover {
    color: #fff;
    background: var(--lk-primary);
    border-color: var(--lk-primary);
}

/* Application consistency layer: keep legacy Blade pages visually aligned. */
.main-content {
    background:
        radial-gradient(circle at top left, rgba(15, 111, 218, 0.08), transparent 28rem),
        linear-gradient(180deg, #f4f7fb 0%, #eef3f9 100%);
}

.lk-section,
.lk-surface {
    width: 100%;
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.34);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.lk-section > *:last-child,
.lk-surface > *:last-child,
.card-body > *:last-child,
.lk-panel > *:last-child {
    margin-bottom: 0 !important;
}

.lk-section > .container,
.lk-section > .container-fluid,
.lk-surface > .container,
.lk-surface > .container-fluid {
    padding: 0 !important;
}

.lk-section > .container.mt-4,
.lk-section > .container-fluid.py-4,
.lk-surface > .container.mt-4,
.lk-surface > .container-fluid.py-4 {
    margin-top: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.lk-section .card,
.lk-section .lk-panel,
.lk-section .truck-panel,
.lk-section .intelligence-card,
.lk-section .intelligence-right-card,
.lk-section .intel-prediction-card,
.lk-section .intel-chart-card,
.lk-section .intelligence-table-card,
.lk-section .suggestion-card,
.lk-section .truck-intel-card,
.lk-section .details-card,
.lk-section .lead-card {
    border: 1px solid rgba(148, 163, 184, 0.38) !important;
    border-radius: 8px !important;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07) !important;
}

.lk-section .card-header,
.lk-section .lk-form-section__header,
.lk-section .truck-panel-header,
.lk-section .intelligence-table-card .card-header,
.lk-section .suggestion-card .card-header,
.lk-section .intel-prediction-card .card-header,
.lk-section .intel-chart-card .card-header,
.lk-section .truck-intel-card .card-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: 56px;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.34) !important;
    background: linear-gradient(180deg, #ffffff 0%, #f5f8fc 100%) !important;
    color: var(--lk-text) !important;
}

.lk-section .card-header h1,
.lk-section .card-header h2,
.lk-section .card-header h3,
.lk-section .card-header h4,
.lk-section .card-header h5,
.lk-section .card-header h6,
.lk-section .lk-form-section__title {
    margin: 0;
    color: var(--lk-text) !important;
    font-size: 0.98rem;
    line-height: 1.28;
}

.lk-section .card-body,
.lk-section .lk-form-section__body,
.lk-section .truck-panel-body {
    padding: 1rem;
}

.lk-section .row {
    --bs-gutter-x: 1rem;
    --bs-gutter-y: 1rem;
}

.lk-section form .row {
    --bs-gutter-y: 0.9rem;
}

.lk-section form,
.lk-section .lk-form,
.lk-section .form-row {
    max-width: 100%;
}

.lk-section label,
.lk-section .form-label {
    margin-bottom: 0.38rem;
    color: #344256;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.25;
}

.lk-section .form-control,
.lk-section .form-select,
.lk-section select.form-control,
.lk-section textarea.form-control,
.lk-section .input-group-text {
    border: 1px solid var(--lk-border) !important;
    border-radius: 8px !important;
    color: var(--lk-text);
    background-color: #fff;
}

.lk-section .form-control,
.lk-section .form-select,
.lk-section select.form-control {
    width: 100%;
    min-height: 42px;
}

.lk-section textarea.form-control {
    min-height: 96px;
}

.lk-section .form-control::placeholder {
    color: #98a2b3;
}

.lk-section .input-group {
    align-items: stretch;
}

.lk-section .input-group > .form-control,
.lk-section .input-group > .form-select,
.lk-section .input-group > .input-group-text {
    min-height: 42px;
}

.lk-section .form-check {
    display: flex;
    align-items: center;
    min-height: 32px;
    gap: 0.45rem;
    padding-left: 0;
}

.lk-section .form-check-input {
    flex: 0 0 auto;
    width: 1.05rem;
    height: 1.05rem;
    margin: 0;
}

.lk-section .form-switch .form-check-input {
    width: 2.25rem;
    height: 1.2rem;
}

.lk-section .form-check-label {
    margin: 0;
    font-weight: 600;
    color: #4b5565;
}

.lk-section .btn {
    min-height: 38px;
    max-width: 100%;
    border-radius: 8px;
    white-space: normal;
    text-align: center;
}

.lk-section .btn-sm {
    min-height: 32px;
    padding: 0.42rem 0.62rem;
    font-size: 0.78rem;
}

.lk-section .btn-link {
    min-height: auto;
    padding-right: 0.25rem;
    padding-left: 0.25rem;
}

.lk-section .btn i,
.lk-section .btn .material-icons {
    flex: 0 0 auto;
}

.lk-section .table-responsive,
.lk-section .dataTables_wrapper,
.lk-section .table-wrap,
.lk-section .lk-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.lk-section table,
.lk-section .table {
    width: 100%;
    margin-bottom: 0;
    color: var(--lk-text);
    vertical-align: middle;
}

.lk-section .table thead th,
.lk-section table thead th {
    position: relative;
    padding: 0.78rem 0.85rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.42) !important;
    background: #f5f8fc;
    color: #344256;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
    white-space: nowrap;
}

.lk-section .table tbody td,
.lk-section table tbody td {
    padding: 0.78rem 0.85rem;
    border-color: rgba(226, 232, 240, 0.86) !important;
    color: #334155;
    font-size: 0.9rem;
}

.lk-section .table-hover tbody tr:hover {
    background-color: #f8fbff;
}

.lk-section .badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.45rem;
    border-radius: 999px;
    padding: 0.28rem 0.55rem;
    font-weight: 700;
    letter-spacing: 0;
}

.lk-section img,
.lk-section svg {
    max-width: 100%;
}

.lk-section .material-icons,
.lk-section .fas,
.lk-section .fa,
.lk-section .fab,
.lk-section .far {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1 !important;
    vertical-align: middle;
}

.lk-section .material-icons {
    font-size: 1.08rem !important;
}

.lk-section .card .material-icons,
.lk-section .lk-panel .material-icons,
.lk-section .card .fas,
.lk-section .lk-panel .fas,
.lk-section .card .fa,
.lk-section .lk-panel .fa {
    max-width: 1.4rem;
    max-height: 1.4rem;
}

.lk-section .progress {
    height: 0.58rem;
    border-radius: 999px;
    background: #e8eef7;
    overflow: hidden;
}

.lk-section .progress-bar {
    border-radius: inherit;
}

.lk-section .list-group,
.lk-section .list-group-item {
    border-color: rgba(148, 163, 184, 0.34);
}

.lk-section .list-group-item {
    padding: 0.75rem 0.9rem;
}

.lk-section .alert {
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.34);
}

.modal-content {
    border: 1px solid rgba(148, 163, 184, 0.34);
    border-radius: 8px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
}

.modal-header {
    min-height: 56px;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.34);
    background: linear-gradient(180deg, #ffffff 0%, #f5f8fc 100%);
}

.modal-title {
    color: var(--lk-text);
    font-size: 1rem;
    font-weight: 800;
}

.modal-body,
.modal-footer {
    padding: 1rem;
}

.modal-footer {
    gap: 0.55rem;
    border-top: 1px solid rgba(148, 163, 184, 0.34);
}

.modal .form-control,
.modal .form-select,
.modal select.form-control,
.modal textarea.form-control {
    min-height: 42px;
    border: 1px solid var(--lk-border);
    border-radius: 8px;
}

.modal .material-icons,
.modal .fas,
.modal .fa {
    font-size: 1rem !important;
    line-height: 1 !important;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    color: var(--lk-muted);
    font-size: 0.86rem;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    min-height: 36px;
    margin-left: 0.35rem;
    border: 1px solid var(--lk-border);
    border-radius: 8px;
    background: #fff;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 8px !important;
    border: 1px solid transparent !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    border-color: var(--lk-primary) !important;
    background: var(--lk-primary) !important;
    color: #fff !important;
}

.site-shell {
    color: var(--lk-text);
}

.site-shell .card,
.site-shell .load-search-card,
.site-shell .alert,
.site-shell .border.rounded-4,
.site-shell .p-3.rounded-4,
.site-shell .p-4.rounded-4 {
    border-radius: 8px !important;
    border-color: rgba(148, 163, 184, 0.34) !important;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

.site-shell .card {
    background: #fff;
}

.site-shell .card-header {
    min-height: 56px;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.34);
    background: linear-gradient(180deg, #ffffff 0%, #f5f8fc 100%);
    color: var(--lk-text);
}

.site-shell .card-body {
    padding: 1rem;
}

.site-shell .form-control,
.site-shell .form-select,
.site-shell select.form-control,
.site-shell textarea.form-control {
    min-height: 42px;
    border: 1px solid var(--lk-border);
    border-radius: 8px;
    color: var(--lk-text);
    background-color: #fff;
}

.site-shell textarea.form-control {
    min-height: 96px;
}

.site-shell .btn,
.site-shell .btn-market-primary,
.site-shell .btn-market-secondary {
    border-radius: 8px;
}

.site-shell .table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.site-shell .table thead th,
.site-shell table thead th {
    background: #f5f8fc;
    color: #344256;
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    white-space: nowrap;
}

.site-shell .table tbody td,
.site-shell table tbody td {
    color: #334155;
    font-size: 0.9rem;
}

.site-shell img,
.site-shell svg {
    max-width: 100%;
}

.site-shell .fa,
.site-shell .fas,
.site-shell .far,
.site-shell .fab,
.site-shell .material-icons {
    line-height: 1 !important;
    vertical-align: middle;
}

@media (max-width: 1199.98px) {
    .sidenav {
        z-index: 1040;
    }

    .main-content .container-fluid.py-4 {
        padding-right: 0.85rem !important;
        padding-left: 0.85rem !important;
    }
}

@media (max-width: 767.98px) {
    body {
        font-size: 0.93rem;
    }

    .navbar-main {
        margin-right: 0.75rem !important;
        margin-left: 0.75rem !important;
    }

    .lk-section,
    .lk-surface {
        padding: 0.75rem;
    }

    .lk-hero-bar {
        padding: 0.85rem;
    }

    .lk-page-title {
        font-size: 1.12rem;
    }

    .lk-page-subtitle {
        font-size: 0.82rem;
    }

    .lk-section .card-header,
    .lk-section .lk-form-section__header {
        align-items: flex-start;
        padding: 0.82rem;
    }

    .lk-section .card-body,
    .lk-section .lk-form-section__body,
    .lk-section .truck-panel-body,
    .site-shell .card-body {
        padding: 0.82rem;
    }

    .lk-section .btn,
    .lk-form-actions .btn,
    .site-shell .btn,
    .site-shell .btn-market-primary,
    .site-shell .btn-market-secondary {
        width: 100%;
    }

    .lk-section .table thead th,
    .lk-section table thead th,
    .lk-section .table tbody td,
    .lk-section table tbody td,
    .site-shell .table thead th,
    .site-shell table thead th,
    .site-shell .table tbody td,
    .site-shell table tbody td {
        padding: 0.65rem 0.7rem;
        font-size: 0.84rem;
    }

    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter,
    .dataTables_wrapper .dataTables_info,
    .dataTables_wrapper .dataTables_paginate {
        float: none !important;
        width: 100%;
        text-align: left !important;
        margin: 0.45rem 0;
    }

    .dataTables_wrapper .dataTables_filter input,
    .dataTables_wrapper .dataTables_length select {
        width: 100%;
        margin: 0.35rem 0 0;
    }
}

/* Advanced layout system applied across Blade pages. */
.main-content {
    isolation: isolate;
}

.main-content::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px),
        linear-gradient(180deg, rgba(148, 163, 184, 0.07) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.42), transparent 64%);
}

.lk-section > .container.py-4,
.lk-section > .container-fluid.py-4,
.lk-surface > .container.py-4,
.lk-surface > .container-fluid.py-4 {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.lk-admin-dashboard,
.backend-portal-grid,
.passenger-portal-grid,
.landing-shell,
.d-grid {
    min-width: 0;
}

.backend-hero,
.passenger-hero,
.landing-hero,
.lk-hero {
    position: relative;
    border-radius: 8px !important;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.backend-hero::after,
.passenger-hero::after,
.landing-hero::after,
.lk-hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 4px;
    background: linear-gradient(90deg, #0f6fda, #16a34a, #f59e0b);
    pointer-events: none;
}

.backend-hero > *,
.passenger-hero > *,
.landing-hero > *,
.lk-hero > *:not(.lk-hero-asset) {
    position: relative;
    z-index: 1;
}

.hero-badge,
.landing-kicker,
.section-kicker,
.summary-pill,
.market-pill,
.lead-chip,
.lead-soft-chip,
.reason-pill,
.truck-chip,
.wa-hero-pill,
.wa-soft-chip,
.lk-tally-chip,
.lk-tally-list-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
    border-radius: 999px !important;
    line-height: 1.2;
}

.hero-badge i,
.landing-kicker i,
.section-kicker i,
.summary-pill i,
.market-pill i,
.lead-chip i,
.lead-soft-chip i,
.reason-pill i,
.truck-chip i,
.wa-hero-pill i,
.wa-soft-chip i,
.lk-tally-chip i,
.lk-tally-list-chip i {
    flex: 0 0 auto;
}

.metric-card,
.panel-card,
.mini-stat,
.lead-panel,
.truck-panel,
.wa-panel,
.details-card,
.load-card,
.market-card,
.profile-card,
.landing-surface,
.landing-media-card,
.intelligence-card,
.intelligence-right-card,
.intel-prediction-card,
.intel-chart-card,
.intelligence-table-card,
.suggestion-card,
.truck-intel-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.32) !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.96) !important;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07) !important;
}

.metric-card::before,
.lk-kpi::before,
.lk-mini-stat::before,
.lk-admin-stat-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, rgba(15, 111, 218, 0.86), rgba(22, 163, 74, 0.78));
}

.metric-card,
.lk-kpi,
.lk-mini-stat,
.lk-admin-stat-card {
    padding-top: max(1rem, var(--lk-card-pad-top, 1rem));
}

.metric-label,
.lk-kpi-label,
.metric-subtext,
.lk-trip-sub,
.small,
small {
    letter-spacing: 0;
}

.metric-value,
.lk-metric-value,
.lk-kpi-value,
.lk-mini-stat-value {
    font-size: clamp(1.18rem, 1.6vw, 1.85rem);
    line-height: 1.08;
}

.panel-card .card-header,
.lead-panel-header,
.truck-panel-header,
.wa-panel-header,
.intelligence-table-card .card-header,
.suggestion-card .card-header,
.intel-prediction-card .card-header,
.intel-chart-card .card-header,
.truck-intel-card .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: 56px;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.28);
    background: linear-gradient(180deg, #ffffff, #f7fafc);
}

.lead-panel-header > *,
.truck-panel-header > *,
.wa-panel-header > * {
    min-width: 0;
}

.lk-toolbar,
.hero-search,
.load-search-panel,
.filter-panel,
.search-panel {
    border: 1px solid rgba(148, 163, 184, 0.34) !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.98)) !important;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06) !important;
}

.lk-toolbar form,
.hero-search form,
.load-search-panel form,
.filter-panel form,
.search-panel form {
    min-width: 0;
}

.lk-toolbar .form-control,
.lk-toolbar .form-select,
.hero-search .form-control,
.load-search-panel .form-control,
.filter-panel .form-control,
.search-panel .form-control {
    background: #fff;
}

.dashboard-table,
.lk-table-wrap table,
.table {
    border-collapse: separate;
    border-spacing: 0;
}

.dashboard-table thead th,
.lk-table-wrap thead th,
.table thead th {
    box-shadow: inset 0 -1px 0 rgba(148, 163, 184, 0.34);
}

.dashboard-table tbody tr,
.lk-table-wrap tbody tr,
.table tbody tr {
    transition: background-color 0.16s ease, box-shadow 0.16s ease;
}

.dashboard-table tbody tr:hover,
.lk-table-wrap tbody tr:hover,
.table tbody tr:hover {
    background: #f8fbff;
}

.dashboard-table td:first-child,
.lk-table-wrap td:first-child,
.table td:first-child {
    font-weight: 600;
}

.empty-state,
.table-empty,
td.text-center.py-5,
.lk-empty-state {
    background:
        linear-gradient(180deg, #ffffff, #f8fbff);
    color: var(--lk-muted) !important;
}

td.text-center.py-5::before,
.empty-state::before,
.table-empty::before,
.lk-empty-state::before {
    content: "\f07b";
    display: inline-flex;
    width: 2.25rem;
    height: 2.25rem;
    margin-right: 0.55rem;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #eef6ff;
    color: var(--lk-primary);
    font-family: "Font Awesome 5 Pro";
    font-weight: 900;
    vertical-align: middle;
}

.landing-surface,
.feature-card,
.hero-search {
    border-radius: 8px !important;
}

.feature-grid {
    align-items: stretch;
}

.feature-card,
.landing-surface {
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.feature-card:hover,
.landing-surface:hover,
.metric-card:hover,
.panel-card:hover {
    transform: translateY(-2px);
    border-color: rgba(15, 111, 218, 0.26) !important;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.1) !important;
}

.feature-icon,
.lk-admin-stat-icon,
.lk-workqueue-icon,
.lk-tally-score-icon,
.lk-tally-title-icon,
.lk-tally-list-title-icon,
.lk-tally-list-metric-icon,
.profile-icon,
.icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 8px !important;
}

.timeline,
.activity-list,
.wa-route-list,
.wa-history-list {
    scrollbar-color: #b6c5d8 #eef3f8;
}

.timeline-item,
.activity-list > *,
.wa-route-list > *,
.wa-history-list > * {
    min-width: 0;
}

.modal-dialog {
    margin-right: auto;
    margin-left: auto;
}

.modal-header .close,
.modal-header .btn-close {
    margin-left: auto;
}

@media (max-width: 991.98px) {
    .backend-hero,
    .passenger-hero,
    .landing-hero,
    .lk-hero {
        padding: 1.15rem !important;
    }

    .metric-card,
    .panel-card,
    .mini-stat {
        min-height: auto;
    }
}

@media (max-width: 767.98px) {
    .backend-hero .row,
    .passenger-hero .row,
    .landing-hero .row {
        --lk-gutter-y: 1rem;
    }

    .hero-badge,
    .landing-kicker,
    .section-kicker,
    .summary-pill,
    .market-pill,
    .lead-chip,
    .lead-soft-chip,
    .reason-pill,
    .truck-chip,
    .wa-hero-pill,
    .wa-soft-chip {
        white-space: normal;
    }

    .panel-card .card-header,
    .lead-panel-header,
    .truck-panel-header,
    .wa-panel-header {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 575.98px) {
    .main-content .container-fluid.py-4 {
        padding-right: 0.65rem !important;
        padding-left: 0.65rem !important;
    }

    .lk-section .row {
        --bs-gutter-x: 0.75rem;
        --bs-gutter-y: 0.75rem;
    }

    .lk-section .card,
    .lk-section .lk-panel,
    .lk-section .truck-panel,
    .lk-section .details-card,
    .site-shell .card {
        box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06) !important;
    }
}

.form-control,
.form-select,
textarea,
select.form-control {
    border-color: #cfd8e6;
}

.form-control:hover,
.form-select:hover,
textarea:hover,
select.form-control:hover {
    border-color: #b6c5d8;
}

.form-control:focus,
.form-select:focus,
textarea:focus {
    background: #fff;
}

.form-label,
label {
    letter-spacing: 0;
}

.input-group-text {
    border-color: #cfd8e6;
    background: #f8fafc;
    color: var(--lk-muted);
}

.table-responsive,
.dataTables_wrapper,
.lk-table-wrap {
    scrollbar-color: #b6c5d8 #eef3f8;
}

.table-responsive::-webkit-scrollbar,
.dataTables_wrapper::-webkit-scrollbar,
.lk-table-wrap::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.table-responsive::-webkit-scrollbar-track,
.dataTables_wrapper::-webkit-scrollbar-track,
.lk-table-wrap::-webkit-scrollbar-track {
    background: #eef3f8;
}

.table-responsive::-webkit-scrollbar-thumb,
.dataTables_wrapper::-webkit-scrollbar-thumb,
.lk-table-wrap::-webkit-scrollbar-thumb {
    background: #b6c5d8;
    border-radius: 999px;
    border: 2px solid #eef3f8;
}

table.table {
    font-size: 0.9rem;
}

table.table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: linear-gradient(180deg, #f8fbff 0%, #eaf1fa 100%);
    white-space: nowrap;
}

table.table td {
    vertical-align: middle;
}

table.table tbody tr:hover {
    box-shadow: inset 3px 0 0 var(--lk-primary);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    min-height: 1.55rem;
    font-weight: 700;
    letter-spacing: 0;
}

.alert {
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.alert-success {
    background: #f0fdf4;
    border-color: rgba(22, 163, 74, 0.24);
    color: #166534;
}

.alert-danger {
    background: #fff5f5;
    border-color: rgba(220, 38, 38, 0.24);
    color: #991b1b;
}

.alert-warning {
    background: #fffbeb;
    border-color: rgba(245, 158, 11, 0.28);
    color: #92400e;
}

.modal-content,
.dropdown-menu {
    border: 1px solid rgba(148, 163, 184, 0.38);
    border-radius: 8px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
}

.dropdown-item {
    border-radius: 6px;
    font-size: 0.9rem;
}

.dropdown-menu {
    padding: 0.45rem;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: #eef6ff;
    color: var(--lk-primary-dark);
}

.pagination {
    flex-wrap: wrap;
}

.page-link {
    border-radius: 8px;
}

.breadcrumb {
    margin-bottom: 0;
}

.breadcrumb-item,
.breadcrumb-item a {
    color: var(--lk-muted);
    font-size: 0.86rem;
    font-weight: 600;
}

.breadcrumb-item.active {
    color: var(--lk-text);
}

.lk-admin-sidebar {
    border-radius: 8px;
}

.lk-admin-sidebar .nav-link {
    min-height: 40px;
}

.lk-admin-sidebar .nav-link.active,
.lk-admin-sidebar .nav-link[aria-expanded="true"] {
    box-shadow: inset 3px 0 0 #38bdf8;
}

.lk-admin-topbar {
    backdrop-filter: blur(14px);
}

.lk-admin-eyebrow {
    background: #eef6ff;
}

.nav-tabs .nav-link {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.nav-pills {
    gap: 0.35rem;
}

.nav-pills .nav-link {
    border: 1px solid transparent;
}

.nav-pills .nav-link:not(.active) {
    background: #fff;
    border-color: var(--lk-border);
    color: var(--lk-muted);
}

.nav-pills .nav-link:not(.active):hover {
    color: var(--lk-primary-dark);
    border-color: rgba(15, 111, 218, 0.24);
}

canvas {
    max-width: 100%;
}

img {
    max-width: 100%;
}

.text-muted {
    color: var(--lk-muted) !important;
}

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

.lk-svg-icon,
.lk-fleet-asset-icon {
    display: inline-flex;
    width: 2.65rem;
    height: 2.65rem;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    object-fit: contain;
}

.lk-svg-icon-sm {
    width: 1.55rem;
    height: 1.55rem;
}

.lk-svg-icon-md {
    width: 2.25rem;
    height: 2.25rem;
}

.lk-svg-icon-lg {
    width: 4.2rem;
    height: 4.2rem;
}

.lk-svg-icon-xl {
    width: min(13rem, 34vw);
    height: auto;
}

.lk-nav-svg-icon {
    width: 1.45rem;
    height: 1.45rem;
    object-fit: contain;
    filter: drop-shadow(0 4px 7px rgba(0, 0, 0, 0.18));
}

.lk-hero-asset {
    position: absolute;
    right: 1.5rem;
    bottom: -0.75rem;
    width: min(15rem, 34vw);
    max-height: 85%;
    object-fit: contain;
    opacity: 0.22;
    pointer-events: none;
}

.lk-table-identity {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}

.lk-table-identity span,
.lk-table-identity strong {
    min-width: 0;
}

.form-label .lk-svg-icon-sm,
.badge .lk-svg-icon-sm,
.lk-kpi-label .lk-svg-icon-sm,
.text-muted .lk-svg-icon-sm,
.text-xs .lk-svg-icon-sm,
.text-sm .lk-svg-icon-sm {
    margin-right: 0.25rem;
    vertical-align: middle;
}

@keyframes lkFadeUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lk-muted {
    color: var(--lk-muted) !important;
}

@media (max-width: 991px) {
    .lk-tally-overview {
        grid-template-columns: 1fr;
    }

    .lk-tally-scorecard {
        min-height: auto;
    }

    .lk-admin-sidebar {
        width: min(100vw - 1rem, 280px) !important;
        max-width: calc(100vw - 1rem);
    }

    .container-fluid {
        padding-left: 0.85rem;
        padding-right: 0.85rem;
    }

    .lk-page-title {
        font-size: 1.25rem;
    }

    .lk-hero {
        border-radius: 8px;
    }

    .lk-panel,
    .lk-table-wrap,
    .lk-toolbar {
        border-radius: 8px;
    }

    .lk-admin-topbar {
        top: 0.5rem;
        border-radius: 8px;
    }

    .lk-admin-sidebar .collapse.navbar-collapse {
        max-height: calc(100vh - 120px);
    }
}

@media (max-width: 767.98px) {
    body {
        font-size: 0.94rem;
    }

    .main-content .container-fluid.py-4 {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    .lk-section {
        padding: 0.75rem;
    }

    .lk-hero-bar,
    .lk-toolbar,
    .lk-form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .lk-hero-bar > *,
    .lk-toolbar > *,
    .lk-form-actions > * {
        width: 100%;
    }

    .card-body,
    .lk-panel,
    .lk-form-section__body {
        padding: 0.95rem;
    }

    .lk-hero-bar .btn,
    .lk-toolbar .btn,
    .lk-form-actions .btn,
    .card-header .btn {
        width: 100%;
    }

    .btn-sm {
        min-height: 36px;
    }

    .table-responsive table.table {
        min-width: 720px;
    }

    .lk-metric-value,
    .lk-mini-stat-value,
    .lk-kpi-value {
        font-size: 1.05rem;
    }
}

/* Alignment repair layer: supports pages that mix Bootstrap 4 markup with Bootstrap 5 utility classes. */
.g-0,
.gx-0 {
    --lk-gutter-x: 0;
}

.g-0,
.gy-0 {
    --lk-gutter-y: 0;
}

.g-1,
.gx-1 {
    --lk-gutter-x: 0.25rem;
}

.g-1,
.gy-1 {
    --lk-gutter-y: 0.25rem;
}

.g-2,
.gx-2 {
    --lk-gutter-x: 0.5rem;
}

.g-2,
.gy-2 {
    --lk-gutter-y: 0.5rem;
}

.g-3,
.gx-3 {
    --lk-gutter-x: 1rem;
}

.g-3,
.gy-3 {
    --lk-gutter-y: 1rem;
}

.g-4,
.gx-4 {
    --lk-gutter-x: 1.5rem;
}

.g-4,
.gy-4 {
    --lk-gutter-y: 1.5rem;
}

.row.g-0,
.row.g-1,
.row.g-2,
.row.g-3,
.row.g-4,
.row.gx-0,
.row.gx-1,
.row.gx-2,
.row.gx-3,
.row.gx-4 {
    margin-right: calc(var(--lk-gutter-x, 1rem) * -0.5);
    margin-left: calc(var(--lk-gutter-x, 1rem) * -0.5);
}

.row.g-0 > *,
.row.g-1 > *,
.row.g-2 > *,
.row.g-3 > *,
.row.g-4 > *,
.row.gx-0 > *,
.row.gx-1 > *,
.row.gx-2 > *,
.row.gx-3 > *,
.row.gx-4 > * {
    padding-right: calc(var(--lk-gutter-x, 1rem) * 0.5);
    padding-left: calc(var(--lk-gutter-x, 1rem) * 0.5);
}

.row.g-0 > *,
.row.g-1 > *,
.row.g-2 > *,
.row.g-3 > *,
.row.g-4 > *,
.row.gy-0 > *,
.row.gy-1 > *,
.row.gy-2 > *,
.row.gy-3 > *,
.row.gy-4 > * {
    margin-top: var(--lk-gutter-y, 1rem);
}

.row.g-0,
.row.g-1,
.row.g-2,
.row.g-3,
.row.g-4,
.row.gy-0,
.row.gy-1,
.row.gy-2,
.row.gy-3,
.row.gy-4 {
    margin-top: calc(var(--lk-gutter-y, 1rem) * -1);
}

.gap-1 {
    gap: 0.25rem !important;
}

.gap-2 {
    gap: 0.5rem !important;
}

.gap-3 {
    gap: 1rem !important;
}

.gap-4 {
    gap: 1.5rem !important;
}

.text-start {
    text-align: left !important;
}

.text-end {
    text-align: right !important;
}

.justify-content-end {
    justify-content: flex-end !important;
}

.align-items-end {
    align-items: flex-end !important;
}

.align-items-start {
    align-items: flex-start !important;
}

.align-items-center {
    align-items: center !important;
}

.align-items-stretch {
    align-items: stretch !important;
}

.justify-content-between {
    justify-content: space-between !important;
}

.justify-content-center {
    justify-content: center !important;
}

.d-grid {
    display: grid !important;
}

.me-1 {
    margin-right: 0.25rem !important;
}

.me-2 {
    margin-right: 0.5rem !important;
}

.me-3 {
    margin-right: 1rem !important;
}

.me-4 {
    margin-right: 1.5rem !important;
}

.ms-1 {
    margin-left: 0.25rem !important;
}

.ms-2 {
    margin-left: 0.5rem !important;
}

.ms-3 {
    margin-left: 1rem !important;
}

.ms-4 {
    margin-left: 1.5rem !important;
}

.ms-auto {
    margin-left: auto !important;
}

.pe-1 {
    padding-right: 0.25rem !important;
}

.pe-2 {
    padding-right: 0.5rem !important;
}

.pe-3 {
    padding-right: 1rem !important;
}

.ps-1 {
    padding-left: 0.25rem !important;
}

.ps-2 {
    padding-left: 0.5rem !important;
}

.ps-3 {
    padding-left: 1rem !important;
}

.flex-wrap {
    flex-wrap: wrap !important;
}

.flex-grow-1 {
    flex-grow: 1 !important;
}

.flex-column {
    flex-direction: column !important;
}

.flex-row {
    flex-direction: row !important;
}

.position-relative {
    position: relative !important;
}

.lk-admin-sidebar.sidenav {
    bottom: 1rem;
    height: calc(100vh - 2rem);
    margin-top: 1rem !important;
    margin-bottom: 1rem !important;
}

.main-content {
    width: auto;
    min-width: 0;
}

.g-sidenav-show .main-content {
    margin-left: 17.6rem;
}

.main-content .navbar-main,
.main-content .container-fluid.py-4 {
    max-width: calc(100vw - 17.6rem);
}

.main-content .navbar-main {
    margin-right: 1.25rem !important;
    margin-left: 1.25rem !important;
}

.main-content .container-fluid.py-4 {
    padding-right: 1.25rem !important;
    padding-left: 1.25rem !important;
}

.lk-admin-topbar .container-fluid,
.lk-hero-bar,
.lk-toolbar,
.lk-form-actions,
.card-header,
.modal-header,
.modal-footer {
    display: flex;
    align-items: center;
}

.lk-admin-topbar .container-fluid,
.lk-hero-bar,
.lk-toolbar,
.lk-form-actions,
.card-header,
.modal-header,
.modal-footer {
    min-width: 0;
}

.lk-hero-bar,
.lk-form-section__header,
.card-header {
    justify-content: space-between;
}

.lk-hero-bar > *,
.lk-toolbar > *,
.lk-form-actions > *,
.card-header > * {
    min-width: 0;
}

.lk-toolbar form.row,
.lk-form-section form .row,
form .row {
    align-items: flex-end;
}

.lk-toolbar .form-label,
.lk-form .form-label,
.lk-form-section .form-label {
    min-height: 1.1rem;
}

.lk-toolbar .btn,
.lk-form-actions .btn,
.card-header .btn,
.lk-hero .btn {
    white-space: nowrap;
}

.btn i,
.btn .fa,
.btn .fas,
.btn .far,
.btn .fab,
.btn .material-icons {
    flex: 0 0 auto;
}

.btn .material-icons {
    font-size: 1rem !important;
}

.lk-kpi {
    display: flex;
    min-height: 100%;
    flex-direction: column;
    justify-content: center;
}

.lk-kpi-label,
.lk-kpi-value,
.lk-mini-stat-value,
.lk-metric-value {
    overflow-wrap: anywhere;
}

.lk-table-wrap {
    width: 100%;
    max-width: 100%;
}

.lk-table-wrap > .table-responsive {
    margin: 0;
}

.table-responsive {
    width: 100%;
}

table.table th:first-child,
table.table td:first-child {
    padding-left: 1rem;
}

table.table th:last-child,
table.table td:last-child {
    padding-right: 1rem;
}

.table .form-check-input,
.lk-table-wrap .form-check-input {
    display: inline-block;
    vertical-align: middle;
}

.lk-trip-command-table td,
.lk-trip-command-table th,
.lk-trip-list-table td,
.lk-trip-list-table th {
    vertical-align: middle;
}

.lk-trip-action-stack {
    display: grid;
    justify-items: end;
    gap: 0.5rem;
}

.lk-trip-action-stack .d-flex {
    gap: 0.5rem;
}

.lk-trip-action-stack form {
    display: inline-flex;
}

.lk-trip-action-stack .btn {
    min-width: 2.25rem;
}

.lk-table-identity {
    max-width: 100%;
}

.lk-table-identity > div,
.lk-table-identity > span,
.lk-table-identity > strong {
    min-width: 0;
}

@media (min-width: 576px) {
    .me-sm-4 {
        margin-right: 1.5rem !important;
    }
}

@media (min-width: 768px) {
    .ms-md-auto {
        margin-left: auto !important;
    }

    .me-md-0 {
        margin-right: 0 !important;
    }

    .pe-md-3 {
        padding-right: 1rem !important;
    }
}

@media (max-width: 1199.98px) {
    .g-sidenav-show .main-content {
        margin-left: 0;
    }

    .main-content .navbar-main,
    .main-content .container-fluid.py-4 {
        max-width: 100vw;
    }

    .lk-admin-sidebar.sidenav {
        bottom: auto;
        height: calc(100vh - 2rem);
    }
}

@media (max-width: 767.98px) {
    .row.g-0,
    .row.g-1,
    .row.g-2,
    .row.g-3,
    .row.g-4,
    .row.gx-0,
    .row.gx-1,
    .row.gx-2,
    .row.gx-3,
    .row.gx-4 {
        margin-right: calc(var(--lk-gutter-x, 0.75rem) * -0.5);
        margin-left: calc(var(--lk-gutter-x, 0.75rem) * -0.5);
    }

    .lk-admin-topbar .container-fluid,
    .lk-hero-bar,
    .lk-toolbar,
    .lk-form-actions,
    .card-header,
    .modal-header,
    .modal-footer {
        align-items: stretch;
    }

    .lk-toolbar form.row,
    form .row {
        align-items: stretch;
    }

    .lk-trip-action-stack {
        justify-items: stretch;
    }

    .lk-trip-action-stack .d-flex {
        justify-content: flex-start !important;
    }
}

/* Whole-app UI polish layer for active Blade pages. */
:root {
    --lk-focus-ring: 0 0 0 0.18rem rgba(15, 111, 218, 0.16);
    --lk-soft-blue: #eef6ff;
    --lk-soft-green: #ecfdf5;
    --lk-soft-amber: #fffbeb;
    --lk-soft-red: #fff5f5;
}

body,
button,
input,
select,
textarea {
    text-rendering: optimizeLegibility;
}

.fw-bold {
    font-weight: 700 !important;
}

.fw-bolder {
    font-weight: 800 !important;
}

.text-xs {
    font-size: 0.75rem !important;
    line-height: 1.35;
}

.text-sm {
    font-size: 0.875rem !important;
    line-height: 1.45;
}

.text-lg {
    font-size: 1.125rem !important;
    line-height: 1.35;
}

.text-white-50 {
    color: rgba(255, 255, 255, 0.68) !important;
}

.text-body {
    color: var(--lk-text) !important;
}

.text-secondary {
    color: var(--lk-muted) !important;
}

.text-success {
    color: #15803d !important;
}

.text-danger {
    color: #b91c1c !important;
}

.text-warning {
    color: #b45309 !important;
}

.text-info {
    color: #0369a1 !important;
}

.bg-light,
.bg-gradient-light {
    background: #f8fafc !important;
}

.bg-white {
    background: #fff !important;
}

.bg-success,
.badge.bg-success {
    background: #16a34a !important;
    color: #fff !important;
}

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

.bg-warning,
.badge.bg-warning {
    background: #f59e0b !important;
    color: #111827 !important;
}

.bg-info,
.badge.bg-info {
    background: #0ea5e9 !important;
    color: #fff !important;
}

.bg-dark,
.badge.bg-dark {
    background: #111827 !important;
    color: #fff !important;
}

.border {
    border: 1px solid var(--lk-border) !important;
}

.border-top {
    border-top: 1px solid var(--lk-border) !important;
}

.border-bottom {
    border-bottom: 1px solid var(--lk-border) !important;
}

.rounded,
.rounded-1,
.rounded-2,
.rounded-3,
.border-radius-lg,
.border-radius-xl {
    border-radius: 8px !important;
}

.shadow,
.shadow-sm,
.shadow-primary {
    box-shadow: var(--lk-shadow) !important;
}

.opacity-7 {
    opacity: 0.7 !important;
}

.opacity-10 {
    opacity: 1 !important;
}

.w-30 {
    width: 30% !important;
}

.w-100 {
    width: 100% !important;
}

.h-100 {
    height: 100% !important;
}

.mt-auto {
    margin-top: auto !important;
}

.z-index-3 {
    z-index: 3 !important;
}

.z-index-sticky {
    z-index: 1020 !important;
}

.top-0 {
    top: 0 !important;
}

.start-0 {
    left: 0 !important;
}

.end-0 {
    right: 0 !important;
}

.position-sticky {
    position: sticky !important;
}

.position-absolute {
    position: absolute !important;
}

.position-fixed {
    position: fixed !important;
}

.overflow-hidden {
    overflow: hidden !important;
}

.d-none {
    display: none !important;
}

.d-inline {
    display: inline !important;
}

.d-inline-flex {
    display: inline-flex !important;
}

.d-block {
    display: block !important;
}

.d-flex {
    display: flex !important;
}

.float-left {
    float: left !important;
}

.float-right {
    float: right !important;
}

.card {
    border: 1px solid rgba(148, 163, 184, 0.36);
    background: #fff;
}

.card-header,
.card-footer {
    min-width: 0;
    border-color: rgba(148, 163, 184, 0.34) !important;
}

.card-header h1,
.card-header h2,
.card-header h3,
.card-header h4,
.card-header h5,
.card-header h6,
.card-header .card-title {
    margin-bottom: 0;
}

.card-footer {
    padding: 0.85rem 1rem;
    background: #fff;
}

.card .card-body,
.card-body {
    min-width: 0;
}

.btn {
    min-width: 0;
    border: 1px solid transparent;
    user-select: none;
}

.btn:focus,
.btn.focus,
.btn:active:focus,
.form-control:focus,
.form-select:focus,
.form-check-input:focus,
select:focus,
textarea:focus {
    outline: 0;
    box-shadow: var(--lk-focus-ring) !important;
}

.btn-light,
.btn-outline-light {
    background: #fff;
    border-color: var(--lk-border);
    color: var(--lk-text);
}

.btn-dark {
    background: #111827;
    border-color: #111827;
    color: #fff;
}

.btn-outline-secondary {
    color: #475569;
    border-color: #cbd5e1;
}

.btn-outline-secondary:hover,
.btn-light:hover {
    color: #0f172a;
    border-color: #94a3b8;
    background: #f8fafc;
}

.btn-outline-success:hover {
    color: #fff;
    background: #16a34a;
    border-color: #16a34a;
}

.btn-outline-danger:hover {
    color: #fff;
    background: #dc2626;
    border-color: #dc2626;
}

.btn-outline-info:hover {
    color: #fff;
    background: #0ea5e9;
    border-color: #0ea5e9;
}

.btn-outline-warning:hover {
    color: #111827;
    background: #f59e0b;
    border-color: #f59e0b;
}

.btn-group,
.btn-toolbar,
.action-buttons,
.table-actions,
.form-actions,
.filter-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.form-group,
.mb-form,
.input-group {
    min-width: 0;
}

.form-group {
    margin-bottom: 1rem;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -0.5rem;
    margin-left: -0.5rem;
}

.form-row > [class*="col"] {
    padding-right: 0.5rem;
    padding-left: 0.5rem;
}

.input-group-text {
    min-height: var(--lk-field-height);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.form-check,
.form-check-inline {
    min-width: 0;
}

.form-check-inline {
    display: inline-flex;
    align-items: center;
    margin-right: 1rem;
}

.form-check-label {
    cursor: pointer;
}

.table-responsive {
    border-radius: inherit;
}

.table-responsive > .table {
    min-width: 760px;
}

.table td,
.table th {
    max-width: 34rem;
}

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

.table td p:last-child,
.table td div:last-child,
.table td ul:last-child {
    margin-bottom: 0;
}

.table thead th,
.table tbody td {
    overflow-wrap: normal;
}

.table tbody td {
    word-break: normal;
}

.table .badge {
    white-space: nowrap;
}

.badge {
    border: 1px solid transparent;
}

.badge.bg-light,
.badge.text-dark,
.badge.border {
    background: #f8fafc !important;
    color: #334155 !important;
    border-color: #d9e0ee !important;
}

.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
}

.alert::before {
    flex: 0 0 auto;
    font-family: "Font Awesome 5 Pro";
    font-weight: 900;
}

.alert-success::before {
    content: "\f058";
}

.alert-danger::before {
    content: "\f057";
}

.alert-warning::before {
    content: "\f071";
}

.alert-info::before {
    content: "\f05a";
}

.fa,
.fas,
.far,
.fab,
.fal,
.fad,
.material-icons,
.material-icons-round,
.ni {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.1em;
    min-width: 1.1em;
    height: 1.1em;
    line-height: 1 !important;
    text-align: center;
    vertical-align: -0.12em;
}

.material-icons,
.material-icons-round {
    font-family: "Material Icons Round", "Material Icons", sans-serif;
    font-weight: normal;
    font-style: normal;
    letter-spacing: 0;
    text-transform: none;
    white-space: nowrap;
    direction: ltr;
    -webkit-font-feature-settings: "liga";
    -webkit-font-smoothing: antialiased;
    font-feature-settings: "liga";
}

.nav-link .fa,
.nav-link .fas,
.nav-link .material-icons,
.navbar .fa,
.navbar .fas,
.navbar .material-icons {
    flex: 0 0 auto;
}

.navbar,
.navbar-nav,
.nav,
.nav-item,
.nav-link {
    min-width: 0;
}

.navbar .container,
.navbar .container-fluid {
    min-width: 0;
}

.navbar-nav {
    align-items: center;
}

.navbar .dropdown-menu {
    min-width: 12rem;
}

.lk-admin-sidebar .navbar-brand-img,
.general-brand img,
.page_header .logo img {
    object-fit: contain;
}

.lk-admin-sidebar .nav-link img,
.lk-nav-svg-icon {
    flex: 0 0 auto;
}

.lk-admin-sidebar .nav-link {
    width: 100%;
}

.lk-admin-sidebar .material-icons,
.lk-admin-sidebar .fa,
.lk-admin-sidebar .fas {
    font-size: 1rem !important;
}

.lk-admin-sidebar .nav-link-text {
    line-height: 1.25;
}

.lk-admin-topbar .navbar-nav {
    flex-direction: row;
    gap: 0.85rem;
}

.lk-admin-topbar .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.lk-hero,
.hero-market-strip,
.load-active-card,
.truck-panel,
.details-card,
.lead-card,
.intelligence-card,
.intelligence-right-card,
.intel-prediction-card,
.intel-chart-card,
.intelligence-table-card,
.suggestion-card,
.truck-intel-card {
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 8px;
}

.lk-hero {
    min-width: 0;
}

.lk-hero > .d-flex,
.lk-hero-content,
.hero-market-strip {
    min-width: 0;
}

.lk-hero h1,
.lk-hero h2,
.lk-hero h3 {
    line-height: 1.15;
}

.lk-hero .text-white-50,
.lk-hero p {
    line-height: 1.55;
}

.general-main .container,
.general-main .container-fluid,
.site-shell .container,
.site-shell .container-fluid {
    max-width: 1320px;
}

.site-shell,
.general-main {
    color: #0f172a;
}

.site-shell section,
.general-main section {
    min-width: 0;
}

.site-shell .card,
.general-main .card,
.site-shell .load-active-card,
.general-main .load-active-card {
    border-color: rgba(148, 163, 184, 0.32);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.site-shell h1,
.site-shell h2,
.site-shell h3,
.site-shell h4,
.site-shell h5,
.site-shell h6 {
    letter-spacing: 0;
}

.market-nav .nav,
.general-links {
    min-width: 0;
}

.market-nav .sf-menu > li > a,
.market-nav .sf-menu > li > span,
.general-link,
.general-action,
.btn-market-primary,
.btn-market-secondary {
    white-space: nowrap;
}

.avatar,
img.avatar,
.avatar-sm {
    width: 2.25rem;
    height: 2.25rem;
    object-fit: cover;
    border-radius: 999px;
}

.avatar-sm {
    width: 2rem;
    height: 2rem;
}

.pagination {
    gap: 0.35rem;
    align-items: center;
}

.pagination .page-item {
    margin: 0;
}

.pagination .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.15rem;
    min-height: 2.15rem;
}

@media (min-width: 576px) {
    .d-sm-inline {
        display: inline !important;
    }

    .mt-sm-0 {
        margin-top: 0 !important;
    }
}

@media (min-width: 768px) {
    .d-md-grid {
        display: grid !important;
    }

    .mt-md-4 {
        margin-top: 1.5rem !important;
    }
}

@media (min-width: 992px) {
    .flex-lg-row {
        flex-direction: row !important;
    }

    .align-items-lg-center {
        align-items: center !important;
    }
}

@media (max-width: 991.98px) {
    .navbar-nav {
        align-items: stretch;
    }

    .lk-admin-topbar .navbar-nav {
        gap: 0.55rem;
    }

    .market-nav .sf-menu > li > a,
    .market-nav .sf-menu > li > span,
    .general-link,
    .general-action {
        min-height: 38px;
        padding: 0.55rem 0.75rem;
        font-size: 0.78rem;
    }
}

@media (max-width: 767.98px) {
    .card-header,
    .card-footer,
    .modal-header,
    .modal-footer {
        gap: 0.65rem;
        flex-wrap: wrap;
    }

    .card-header > *,
    .card-footer > *,
    .modal-header > *,
    .modal-footer > * {
        max-width: 100%;
    }

    .table-responsive > .table {
        min-width: 700px;
    }

    .btn-group,
    .btn-toolbar,
    .action-buttons,
    .table-actions,
    .form-actions,
    .filter-actions {
        align-items: stretch;
    }

    .btn-group .btn,
    .btn-toolbar .btn,
    .action-buttons .btn,
    .table-actions .btn,
    .form-actions .btn,
    .filter-actions .btn {
        flex: 1 1 auto;
    }

    .market-nav .nav,
    .general-links {
        align-items: stretch;
        justify-content: flex-start;
    }

    .market-nav .sf-menu > li,
    .general-links > * {
        max-width: 100%;
    }

    .market-nav .sf-menu > li > a,
    .market-nav .sf-menu > li > span,
    .general-link,
    .general-action,
    .btn-market-primary,
    .btn-market-secondary {
        white-space: normal;
    }
}

/* Keep Bootstrap popups above page overlays and fully editable/clickable. */
body.modal-open {
    overflow: hidden;
}

.modal {
    z-index: 2147483000 !important;
    pointer-events: auto !important;
}

.modal.show {
    display: block;
}

.modal.show .modal-dialog,
.modal.show .modal-content {
    position: relative;
    z-index: 2147483000 !important;
    pointer-events: auto !important;
}

.modal-backdrop {
    z-index: 2147482990 !important;
    pointer-events: none !important;
}

.modal-backdrop.show {
    opacity: 0.48;
}

.modal input,
.modal select,
.modal textarea,
.modal button,
.modal a {
    pointer-events: auto;
}

.modal .form-control,
.modal .form-select,
.modal select.form-control,
.modal textarea.form-control {
    background-color: #fff;
    color: var(--lk-text);
    opacity: 1;
}
