/* ============================================================
   Moven Fleet — brand theming & UI polish
   Loaded after Tabler so these rules win. Works in light & dark
   via Bootstrap 5.3 data-bs-theme.
   ============================================================ */

:root {
    --tblr-primary: #206bc4;
    --tblr-primary-rgb: 32, 107, 196;
    --moven-radius: 12px;
}

/* Slightly softer, more modern cards */
.card {
    border-radius: var(--moven-radius);
    border-color: var(--tblr-border-color, rgba(98, 105, 118, 0.16));
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.03), 0 2px 8px -2px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

/* Stat cards lift gently on hover when they are links */
a.card.card-link:hover {
    box-shadow: 0 4px 14px -4px rgba(var(--tblr-primary-rgb), 0.35);
    transform: translateY(-2px);
}

/* Page header spacing */
.page-header {
    padding-top: 1.25rem;
    padding-bottom: 0.25rem;
}

.page-title {
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* Status pills inside card headers act as filter tabs */
.card-header .nav-pills .nav-link {
    cursor: pointer;
    border: 0;
    background: transparent;
    color: var(--tblr-secondary, #667);
    font-weight: 500;
    padding: 0.35rem 0.75rem;
}

.card-header .nav-pills .nav-link.active {
    background: rgba(var(--tblr-primary-rgb), 0.12);
    color: var(--tblr-primary);
}

.card-header .nav-pills .nav-link:hover:not(.active) {
    background: var(--tblr-bg-surface-secondary, rgba(0, 0, 0, 0.03));
}

/* Tables: comfortable rows, clear hover, clickable feel */
.table tbody tr {
    transition: background-color 0.12s ease;
}

.table > :not(caption) > * > * {
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
}

/* Avatars used in stat cards */
.avatar .icon {
    width: 1.5rem;
    height: 1.5rem;
}

/* Buttons: a touch more rounded + smooth */
.btn {
    border-radius: 8px;
    transition: background-color 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

/* Sidebar brand */
.navbar-brand img {
    border-radius: 6px;
}

/* Active sidebar item — TabBlazor renders the Active param as an [active] attribute */
.navbar .nav-item[active] > .nav-link {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-weight: 600;
}

.navbar .nav-item[active] > .nav-link .nav-link-icon {
    color: var(--tblr-primary);
}

.navbar.navbar-dark .navbar-nav .nav-item[active] > .nav-link {
    box-shadow: inset 3px 0 0 var(--tblr-primary);
}

/* Timeline a little tighter */
.timeline {
    margin-top: 0.5rem;
}

/* Empty state padding */
.empty {
    padding: 2.5rem 1rem;
}

/* Reduce reconnect modal noise (kept from app.css behavior) */
#components-reconnect-modal {
    display: none !important;
}

/* Dark-mode niceties */
[data-bs-theme="dark"] .card {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.25), 0 2px 10px -2px rgba(0, 0, 0, 0.4);
}

/* Full addresses wrap instead of truncating / overflowing */
.moven-address {
    word-break: break-word;
    overflow-wrap: anywhere;
    white-space: normal;
    line-height: 1.35;
}

/* Copy button keeps its icon centred */
.btn-icon .icon {
    margin: 0;
}

/* Mobile: never wider than the screen */
@media (max-width: 767.98px) {
    .container-xl {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .page-header {
        padding-top: 0.75rem;
    }

    /* card-header toolbar (status pills + search) stacks cleanly */
    .card-header {
        row-gap: 0.5rem;
    }

    /* tighten stat cards so 2-per-row fits small phones */
    .card-sm .card-body {
        padding: 0.75rem;
    }

    .card-sm .h1 {
        font-size: 1.5rem;
    }
}

/* Print: drop the sidebar/chrome so the run-sheet prints clean */
@media print {
    .navbar,
    .navbar-vertical {
        display: none !important;
    }

    .page-wrapper {
        margin-inline-start: 0 !important;
        margin-left: 0 !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid #ccc;
    }

    a {
        text-decoration: none !important;
        color: inherit !important;
    }
}

