@charset "UTF-8";
/*--------- Fonts ---------------
RobotoThin         w-100
RobotoLight        w-300
Roboto             w-400
RobotoMedium       w-500
RobotoBold         w-700
RobotoBlack        w-900

(prior font, kept vendored but unused, see fonts/inter_fonts.css)
InterLight         w-300
Inter              w-400
InterMedium        w-500
---------------------------------*/

/* A scrollbar appearing on longer pages must not shift the page sideways. */
html {
    scrollbar-gutter: stable;
}

body {
    text-decoration: none !important;
    font-family: RobotoLight, sans-serif;
    /* font-family: InterLight, sans-serif; */
    font-size: 1rem;
}

h5, h6 {
    font-weight: 700;
}

@media (max-width: 768px) {
    .breadcrumb-main {
        display: none;
    }

}

.flex-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.flex-col {
    flex-basis: calc(50% - 10px);
}

.alert-danger {
    padding: 0;
    height: auto;
    line-height: 30px;
    text-align: center;
    border: 1px solid red;
    font-weight: 700;
}

.alert-danger ul {
    list-style-type: none;
    text-align: center;
    padding: inherit;
    color: #aa2222;
}

/* -------------------top-line START ----------------------------*/
.top-line {
    font-family: Roboto, sans-serif;
    /* font-family: Inter, sans-serif; */
    background-color: rgba(200, 200, 220, 0.7);
    color: rgba(55, 2, 2, 0.9);
    font-size: 1rem;
    padding: 4px 50px 4px 50px;
}

.top-line a {
    color: rgba(55, 2, 2, 0.9);
    text-decoration: inherit;
}

.top-line a:hover {
    font-family: Roboto, sans-serif;
    /* font-family: Inter, sans-serif; */
    color: blue;
}

.top-line-text {
    font-size: 1.2rem;
    padding-left: 10px;
}

/*---------------- top-line END --------------------------*/

/*---------------- top-nav START --------------------------*/
/* see nav.css */
/*---------------- top-nav END --------------------------*/

/*---------------breadcrumbs START ----------------*/
nav {
    text-align: center;

    a {
        text-decoration: none;
    }
}

.btn-grow {
    white-space: nowrap;
    min-width: 180px;
}

/*--------------slider START ----------------------------*/
/* see css/slider.css */
/*--------------slider END ----------------------------*/

/*-------------- category START ----------------------------*/
.category-section {
    margin: 2% 2% 2% 2%;

}

.cat-card {
    margin: 15px;
    padding: 10px;
    border: 1px solid;
    border-radius: 10px 10px 0 0;
    box-shadow: 5px 5px 7px #a1a4a9;
}

.feature-icon {
    width: 4rem;
    height: 4rem;
    border-radius: .75rem;
}

.icon-square {
    width: 3rem;
    height: 3rem;
    border-radius: .75rem;
}

.text-shadow-1 {
    text-shadow: 0 .125rem .25rem rgba(0, 0, 0, .25);
}

.text-shadow-2 {
    text-shadow: 0 .25rem .5rem rgba(0, 0, 0, .25);
}

.text-shadow-3 {
    text-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .25);
}

.card-cover {
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
}

.feature-icon-small {
    width: 3rem;
    height: 3rem;
}
/* -------------- category END ---------------------------- */
/* ------------- footer START ---------------------------- */
footer {
    font-family: Roboto, sans-serif;
    /* font-family: Inter, sans-serif; */
    color: #000;
    background-color: rgba(200, 200, 220, 0.7);
}

.copyright {
    text-align: center;
    font-size: 1rem;
}

.social a:hover {
    color: blue;
}

.social a {
    text-decoration: none;
    color: #000;
    font-size: 1rem;
}

.form-label {
    display: inline-block;
    min-width: 250px;
    vertical-align: top;
}

.form-error {
    color: red;
    font-weight: 600;
}

.success {
    margin: 50px;
    text-align: center;
}

/* ---------- CABINET PAGES START -------------- */
/* Centered content column for every личный кабинет page (cabinet_base.html).
   Plain max-width + margin: 0 auto instead of a Bootstrap grid offset (the
   previous col-lg-10, col-xl-8 pair without a surrounding .row) — those
   percentages compound with the .container's own max-width per breakpoint,
   which centers correctly but isn't a single readable number. This is the
   same visual width, expressed directly. */
.cabinet-content {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
}

/* Wider column for ListView tables (many columns and/or an inline filter row) —
   see cabinet_base.html's cabinet_content_class block. 1300px stays just under
   Bootstrap's own xxl .container max-width (1320px). */
.cabinet-content-wide {
    max-width: 1300px;
    width: 100%;
    margin: 0 auto;
}

/* One wide block inside a narrow (900px) detail page, e.g. the tractor card's
   «Навигационные блоки» table (8 columns): breaks out of the column up to the
   cabinet-content-wide width, centered on the column, never wider than the
   viewport (48px leaves the 16px gutters plus room for a vertical scrollbar). */
.detail-breakout {
    width: min(1300px, calc(100vw - 48px));
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

/* For tables too wide even for cabinet-content-wide (e.g. shifts:list, 16
   columns) — pairs with cabinet_container_class overridden to container-fluid
   in the same template, otherwise the outer .container still caps this at
   1320px and this class has no effect. */
.cabinet-content-xwide {
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
}

/* A table cell whose text may hold a long run with no spaces (a part name
   like «[2направляющие+2винта+...]»): break inside it rather than stretch the
   table past the screen. min-width keeps the column from collapsing, since
   «anywhere» lets the browser make it as narrow as one letter. */
.cell-wrap-anywhere {
    overflow-wrap: anywhere;
    min-width: 16rem;
}

.header-title-h1 {
    text-align: center;
    color: #082e8f;
    font-weight: 700;
}

.header-title-h2 {
    text-align: center;
    color: #050d22;
    font-size: 1.2rem;
    font-weight: 600;
}

/* Table START */

td a {
    text-decoration: none;
    color: #040f49;
}

td a:hover {
    color: blue;
}

.td-sel {
    background: #d1e7dd;
    font-weight: 700;
}

.table-header-title {
    text-align: left;
    color: #082e8f !important;
    font-size: 1.2rem;
    font-weight: 700;
}

th, td {
    text-decoration: none;
    vertical-align: middle;
}

.table-head {
    --bs-table-color: #000;
    --bs-table-bg: rgba(129, 124, 140, 0.3);
    --bs-table-border-color: #a7b9b1;
    --bs-table-striped-bg: #c7dbd2;
    --bs-table-striped-color: #000;
    --bs-table-active-bg: #bcd0c7;
    --bs-table-active-color: #000;
    --bs-table-hover-bg: #c1d6cc;
    --bs-table-hover-color: #000;
    color: var(--bs-table-color);
    border-color: var(--bs-table-border-color);
}

/* Table END */
/* CABINET PAGES END */


/* Show ENTITY DETAIL START */
.person-head {
    font-weight: bold;
    font-size: 1.2rem;
    color: #0a48e6;
}

.person-head-sm {
    font-weight: bold;
    font-size: 1.1rem;
    color: #0a48e6 !important;
}

.person-text {
    font-size: 1.2rem;
    padding-bottom: 15px;
}

.person-text a {
    text-decoration: none;
    color: black;
}

.person-text a:hover {
    color: blue;
}

/* Sections of a detail card (every *_detail.html with person-head fields): the title is underlined
   and the rows of fields inside a section are split by a thin line, so the
   eye doesn't have to separate them by spacing alone. */
.detail-section-title {
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid #0a48e6;
}

.detail-section {
    margin-bottom: 28px;
}

.detail-section > .row + .row {
    position: relative;
    padding-top: 12px;
}

/* A pseudo-element instead of border-top: .row has negative side margins,
   a border would stick out past the title's underline. */
.detail-section > .row + .row::before {
    content: "";
    position: absolute;
    top: 0;
    left: calc(var(--bs-gutter-x) * .5);
    right: calc(var(--bs-gutter-x) * .5);
    border-top: 1px solid var(--bs-border-color);
}

.detail-section .person-text {
    padding-bottom: 8px;
}

/* Show ENTITY DETAIL END */

/* Text formatting START */
.paragraph {
    text-indent: 40px;
    text-align: justify;
}

/* Text formatting END */

.pe-10 .input-group > .input-group-text {
    margin: 50px;
    width: 50px;
}

/* ---------- DELETE CONFIRM START --------------- */
.delete-danger {
    font-weight: bolder;
    color: red;
}

.bg-delete {
    background: #f2e7c3;
    border: solid #e43b07;
    border-radius: 15px;
    padding: 3rem 1rem 3rem 1rem;
    margin-bottom: 6rem;
    box-shadow: 5px 5px 5px red;
}

/* -------------- DELETE CONFIRM END ------------- */
/********** PAGINATION START **************/
.pagination-text {
    text-decoration: none !important;
    align-content: center;
}

.pagination-lg {
    font-size: 1.5rem;
}

/********** PAGINATION END **************/

/* ******* EXPIRY / MILEAGE HIGHLIGHT START ******** */
.thirty_days {
    background: rgba(251, 2, 2, 0.3) !important;
    font-weight: 700;
}

.sixty_days {
    background: rgba(246, 216, 16, 0.3) !important;
    font-weight: 700;
}

/* ******* EXPIRY / MILEAGE HIGHLIGHT END ******** */

/* ------------ BOLD TEXT ------------ */
.bld {
    font-weight: 700;
}

.bld-total {
    font-weight: 900;
    color: #0936aa !important;
    background: rgba(251, 232, 3, 0.15) !important;
}
/* ------------ BOLD TEXT END ------------ */

/* **************** TOOLTIP SETTINGS START *************************** */
.tooltip {
    --bs-tooltip-bg: rgba(0, 0, 255, 0.7);
    --bs-tooltip-max-width: auto;
}
/* **************** TOOLTIP SETTINGS END *************************** */

/* **************** HORIZONTAL <ul> **************************** */

.choice {
    a {
        text-decoration: none;
        color: black;
        font-weight: 600;
        padding: 3px 5px 3px 5px;
    }

    a:hover {
        background: rgba(0, 0, 0, 0.1);
    }

    ul {
        list-style-type: none;
        padding: 0;
    }

    li {
        display: inline-block;
        margin-right: 10px;
    }
}
/* **************** HORIZONTAL <ul> END ************************** */

.fw-bold {
    color: #0a48e6;
}

/* ********************** BIRTHDAY (BACKGROUND) ********************* */
/* One color cycle repeated outward as concentric rings (like ripples on
   water); background-size is animated (not background-position — that only
   slides a radial gradient sideways, it doesn't make rings expand) so the
   rings visibly grow from the cell's center and radiate outward. `alternate`
   reverses smoothly (grow, then shrink back) instead of snapping from
   300% straight back to the start each loop — a plain `infinite` loop would
   jump discontinuously at the wrap point, flashing the cell's plain
   background for a frame. Never animates down to a literal 0% size either,
   since some browsers skip painting a background layer entirely at exactly
   zero size — 10% keeps rings present (just tightly packed) at the low end. */
.birthday-glow {
    background-image: repeating-radial-gradient(
            circle,
            rgba(250, 7, 17, 0.4) 0%,
            rgba(243, 213, 15, 0.4) 20%,
            rgba(6, 237, 26, 0.4) 40%,
            rgba(4, 244, 201, 0.4) 60%,
            rgba(182, 15, 236, 0.3) 80%,
            rgba(250, 7, 17, 0.4) 100%
    );
    background-repeat: no-repeat;
    background-position: center;
    animation: birthday-ripple 2.4s ease-in-out infinite alternate;
}

@keyframes birthday-ripple {
    0% {
        background-size: 10% 10%;
    }
    100% {
        background-size: 300% 300%;
    }
}

/* ***************** BIRTHDAY (BACKGROUND) END *************************** */
.btn-outline-primary {
    --bs-btn-color: #000;
    --bs-btn-border-color: #0d6efd;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #0d6efd;
    --bs-btn-hover-border-color: #0d6efd;
    --bs-btn-focus-shadow-rgb: 13, 110, 253;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: rgba(0, 0, 0, 0.15);
    --bs-btn-active-border-color: #0d6efd;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #0d6efd;
    --bs-btn-disabled-bg: transparent;
    --bs-btn-disabled-border-color: #0d6efd;
    --bs-gradient: none;
}

legend {
    font-size: 1rem;
    color: #082e8f;
    font-weight: 600;
}

/* --------------- TIRE CONDITION HIGHLIGHT ------------------ */
.w-new{
    border: 1px solid lightgray;
}
.w-slotted{
    background-color: rgba(7, 241, 210, 0.3) !important;
}
.w-restored{
    background-color: rgba(241, 7, 112, 0.3) !important;
}
.w-scrap td {
    background-color: rgba(7, 62, 241, 0.1) !important;
}
.w-scrap {
    font-weight: 700;
}
/* --------------- TIRE CONDITION HIGHLIGHT END--------------- */

.form-container {
    display: flex;
    justify-content: center;
    background-color: rgb(13 202 240 / 0.1);
    border-radius: 15px;
}

.search-field {
   display: flex;
   justify-content: flex-end;
}

/* Fixed-size thumbnails for photo/video galleries (e.g. VehicleFault media) —
   object-fit: cover crops instead of letting each cell take its source's own
   aspect ratio, so a grid of mixed portrait/landscape/video files stays even. */
.media-thumb {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

/* Bigger tap targets for the vendored bootstrap-datetimepicker calendar grid
   (static/css/bootstrap-datetimepicker.min.css) on narrow/touch screens — it
   ships 20x20px day cells, well under the ~44px minimum recommended touch
   target, and the popup (19em wide) has plenty of slack to grow into. Kept
   here rather than editing the vendored file directly. */
@media (max-width: 576px) {
    .bootstrap-datetimepicker-widget table td.day,
    .bootstrap-datetimepicker-widget table th {
        height: 40px;
        line-height: 40px;
        width: 40px;
    }
}

/* ---------- ERROR PAGES (403/404/500) START -------------- */
.error-page {
    max-width: 640px;
    margin: 3rem auto;
    padding: 2.5rem 1.5rem;
    text-align: center;
    border: 1px solid #a7b9b1;
    border-radius: 15px;
    background: rgba(199, 219, 210, 0.35);
    box-shadow: 5px 5px 7px #a1a4a9;
}

.error-page-icon {
    font-size: 4rem;
    color: #0936aa;
}

.error-page-code {
    font-family: RobotoBlack, sans-serif;
    font-size: 5rem;
    line-height: 1;
    color: rgba(55, 2, 2, 0.9);
    margin: .5rem 0 1rem;
}

.error-page-title {
    font-family: RobotoMedium, sans-serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.error-page-text {
    margin-bottom: 2rem;
}

@media (max-width: 576px) {
    .error-page {
        margin: 1.5rem 16px;
    }

    .error-page-code {
        font-size: 3.5rem;
    }
}
/* ---------- ERROR PAGES END -------------- */

/* Route point form map (trips/forms.py RoutePointForm, static/js/routepoint-form.js).
   isolation keeps Leaflet's own z-indexed panes/controls (up to 1000) inside
   the map, below the address suggestion dropdown above it. */
.routepoint-map {
    height: 360px;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    isolation: isolate;
}

/* Рейсы: body cells never wrap, so every row stays one line high (the header
   still wraps). Long text columns are capped in width; static/js/trip-list.js
   shrinks the font of a value that doesn't fit, down to a floor, and only then
   cuts it with an ellipsis, full text in the tooltip. */
/* Columns sized by their content instead of stretching to the full width;
   a table narrower than the screen is centered. */
.trip-table {
    width: auto;
    margin-left: auto;
    margin-right: auto;
}
.trip-table td {
    white-space: nowrap;
    padding-top: 2px;
    padding-bottom: 2px;
}
.trip-table .trip-fit {
    max-width: 16rem;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* Compact «Копировать рейс» button so it doesn't set the row height. */
.trip-table td .btn-sm {
    padding: 0 0.4rem;
    line-height: 1.3;
}

/* Vehicle map (tracking/templates/tracking/map.html, docs/project_plan.md §17). */
.vehicle-map {
    height: 65vh;
    min-height: 360px;
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

/* Marker anchored at its point: the round badge is centered on it (half its
   30px width), the plate label sits to the right. Big and filled so it
   stands out against roadside buildings on the tiles (user feedback). */
.vehicle-marker {
    position: absolute;
    display: flex;
    align-items: center;
    transform: translate(-15px, -50%);
    white-space: nowrap;
    color: #0d6efd;
}

.vehicle-marker-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: currentColor;
    border: 3px solid #fff;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.7);
}

/* Parked: a white dot in the badge instead of the arrow. */
.vehicle-marker-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
}

/* Rotated by the unit's course in vehicle-map.js. */
.vehicle-marker-arrow {
    display: inline-block;
    color: #fff;
    font-size: 16px;
    line-height: 16px;
}

/* Direction-of-travel chevron on a route history line (route-history.js),
   colored like its line, with a white outline so it reads on top of it. */
.route-arrow svg {
    display: block;
    overflow: visible;
}

.route-arrow path {
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    paint-order: stroke;
    filter: drop-shadow(0 0 1px #fff) drop-shadow(0 0 1px #fff);
}

/* One pass in the route history click popup (route-history.js). */
.route-pass {
    margin-top: 0.4rem;
    padding-top: 0.4rem;
    border-top: 1px solid #dee2e6;
}

.vehicle-marker-label {
    margin-left: 4px;
    padding: 1px 5px;
    font-size: 13px;
    font-weight: 600;
    color: #212529;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 3px;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.4);
}

.vehicle-marker-stale {
    color: #6c757d;
}

.vehicle-marker-stale .vehicle-marker-label {
    color: #6c757d;
}

.vehicle-map-row {
    cursor: pointer;
}

.vehicle-map-check {
    width: 2.5rem;
}

/* Distance measuring tool on the vehicle map pages (static/js/map-measure.js):
   a bar of icon buttons, and under it a panel with the result. */
.map-measure {
    font-size: 13px;
}

.leaflet-bar a.map-measure-button {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
}

.leaflet-bar a.map-measure-button.active {
    background: #0d6efd;
    color: #fff;
}

.map-measure-panel {
    margin-top: 6px;
    background: #fff;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    background-clip: padding-box;
    max-width: 230px;
}

.map-measure-vehicle,
.map-measure-status {
    padding: 5px 10px;
}

.map-measure-vehicle + .map-measure-status {
    border-top: 1px solid #ccc;
}

.map-measure-vehicle label {
    display: block;
    margin: 0;
    cursor: pointer;
}

.leaflet-container.map-measure-active {
    cursor: crosshair;
}

.map-measure-vertex {
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
    background: #c62828;
}

.map-measure-vertex-start {
    background: #2e7d32;
}

.map-measure-vertex-end {
    background: #6a1b9a;
}

.map-measure-label {
    font-weight: 600;
}
