body {
    background: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.ms-auto{
    color: white;
    float: right;
}
.login-container {
    max-width: 400px;
    margin: 10vh auto;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.btn-primary {
    background-color: #0d6efd;
    border: none;
}

.btn-primary:hover {
    background-color: #0b5ed7;
}

.form-label {
    font-weight: 500;
}

.forgot-password {
    font-size: 0.875rem;
}

.logo {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    font-weight: bold;
    color: #0d6efd;
}

.form-container {
    max-width: 450px;
    margin: 10vh auto;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.dashboard-title {
    font-size: 1.35rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: #212529;
}

.card {
    border: 1px solid #dee2e6;
    border-radius: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.card-icon {
    font-size: 2rem;
    color: #6c757d;
    background: #f8f9fa;
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.card-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: #212529;
}

.card-subtitle {
    font-size: 0.875rem;
    color: #6c757d;
}

.card-arrow {
    font-size: 0.75rem;
    color: #6c757d;
    margin-left: auto;
}

.card-external {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    font-size: 0.75rem;
    color: #6c757d;
}

.navbar {
    background: #729285;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.vehicle-details-sticky-header {
    position: sticky;
    top: 0;
    z-index: 1020;
    background: #f8f9fa;
    padding-top: 0.5rem;
    margin-top: -0.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.vehicle-details-sticky-header + .tab-content {
    padding-top: 0.25rem;
}

.navbar-brand {
    font-weight: 600;
    color: white;
    margin-right: auto;
}

.footer-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: space-around;
    padding: 0.75rem 0;
    z-index: 1000;
}

.fab-quick-handover {
    position: fixed;
    right: 16px;
    bottom: 96px; /* above footer-nav */
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
    z-index: 1001; /* above footer-nav */
}

.fab-quick-handover i {
    font-size: 1.1rem;
}

.footer-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.75rem;
    color: #6c757d;
    text-decoration: none;
}

.footer-nav-item.active {
    color: #0d6efd;
}

.footer-nav-item i {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.container-fluid {
    padding-bottom: 90px; /* Отступ для фиксированного футера */
}
.footer-booter{
    padding-bottom: 0px !important;
}
.grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 0 0.5rem;
}

/* На планшетах и десктопах — больше колонок */
@media (min-width: 576px) {
    .grid-container {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (min-width: 768px) {
    .grid-container {
        grid-template-columns: repeat(4, 1fr);
    }
}
@media (min-width: 992px) {
    .grid-container {
        grid-template-columns: repeat(4, 1fr);
    }
}
@media (min-width: 1200px) {
    .grid-container {
        grid-template-columns: repeat(6, 1fr);
    }
}

.page-title {
    font-size: 1.35rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: #212529;
}

.filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    width: 100%;
}

.search-wrapper {
    width: 100%;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.role-select {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid #ced4da;
    background: white;
    width: 100%;
    font-size: 0.9rem;
    height: 40px;
}

.search-input {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid #ced4da;
    width: 100%;
    font-size: 0.9rem;
    height: 40px;
}

.search-input-wrapper {
    position: relative;
}

.search-input-with-icon {
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    border-radius: 0.5rem;
    border: 1px solid #ced4da;
    width: 100%;
    font-size: 0.9rem;
    height: 40px;
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    pointer-events: none;
    z-index: 1;
}

.clear-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    cursor: pointer;
    z-index: 1;
    padding: 0.25rem;
}

.clear-icon:hover {
    color: #212529;
}

.search-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-select {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid #ced4da;
    background: white;
    width: 100%;
    font-size: 0.9rem;
    height: 40px;
}

.apply-btn {
    padding: 0.5rem 1.25rem;
    background: #0d6efd;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
}

.apply-btn:hover {
    background: #0b5ed7;
}

.user-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: box-shadow 0.2s;
}

.user-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #0d6efd;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.25rem;
}

.role-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
}

.role-admin {
    background: #e7f5ff;
    color: #0c64c0;
    border: 1px solid #bedcf2;
}

.role-manager {
    background: #e2f7e2;
    color: #1c7e1c;
    border: 1px solid #b8e0b8;
}

.role-driver {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.btn-edit,
.btn-details {
    background: #212529;
    color: white;
    border: none;
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    font-size: 0.74em;
    border-radius: 12px;
    height: 30px;
}

.btn-edit:hover,
.btn-details:hover {
    background: #1a1e21;
}

/* users.php: light hover for edit button */
.btn-edit-users:hover,
.btn-edit-users:focus {
    background: #f8f9fa;
    color: #212529;
    border: 1px solid #212529;
}

.btn-reset {
    background: white;
    color: #212529;
    border: 1px solid #dee2e6;
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    font-size: 0.74em;
    border-radius: 12px;
    height: 30px;
}

.btn-reset:hover {
    background: #f8f9fa;
}

.user-info {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.5rem;
}

.vehicle-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: box-shadow 0.2s;
}

.vehicle-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Bedding list tooltip (fa-users): force readable contrast for HTML content + .text-muted */
.tooltip.bedding-items-tooltip {
    --bs-tooltip-bg: #212529;
    --bs-tooltip-color: #fff;
}

.tooltip.bedding-items-tooltip .tooltip-inner {
    background-color: var(--bs-tooltip-bg) !important;
    color: var(--bs-tooltip-color) !important;
    text-align: left;
    max-width: min(320px, 90vw);
    font-size: 0.9rem;
    line-height: 1.35;
}

.tooltip.bedding-items-tooltip .tooltip-inner b,
.tooltip.bedding-items-tooltip .tooltip-inner strong {
    color: #fff;
    font-weight: 600;
}

.tooltip.bedding-items-tooltip .tooltip-inner .text-muted {
    color: rgba(255, 255, 255, 0.82) !important;
    font-size: 1em;
}

.tooltip.bedding-items-tooltip .tooltip-inner .small {
    font-size: 1em;
}

.tooltip.bedding-items-tooltip.bs-tooltip-top .tooltip-arrow::before,
.tooltip.bedding-items-tooltip.bs-tooltip-auto[data-popper-placement^="top"] .tooltip-arrow::before {
    border-top-color: var(--bs-tooltip-bg) !important;
}

.tooltip.bedding-items-tooltip.bs-tooltip-bottom .tooltip-arrow::before,
.tooltip.bedding-items-tooltip.bs-tooltip-auto[data-popper-placement^="bottom"] .tooltip-arrow::before {
    border-bottom-color: var(--bs-tooltip-bg) !important;
}

.tooltip.bedding-items-tooltip.bs-tooltip-start .tooltip-arrow::before,
.tooltip.bedding-items-tooltip.bs-tooltip-auto[data-popper-placement^="left"] .tooltip-arrow::before {
    border-left-color: var(--bs-tooltip-bg) !important;
}

.tooltip.bedding-items-tooltip.bs-tooltip-end .tooltip-arrow::before,
.tooltip.bedding-items-tooltip.bs-tooltip-auto[data-popper-placement^="right"] .tooltip-arrow::before {
    border-right-color: var(--bs-tooltip-bg) !important;
}

.btn-outline-secondary{
    font-size: 0.75em;
    border-radius: 12px;
    height: 38px;
}
.btn-outline-secondary-compact{
    font-size: 0.75em;
    border-radius: 12px;
    height: 30px;
    border: 1px solid #6c757d;
    color: #6c757d;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.75rem;
}

.btn-outline-secondary-compact:hover{
    background: #6c757d;
    color: white;
}
.btn-outline-secondary-compact:focus{
    background: #6c757d;
    color: white;
    box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.25);
}
.btn-resolve-compact{
    border-color: #198754;
    color: #198754;
}

.btn-resolve-compact:hover{
    background: #198754;
    border-color: #198754;
    color: #ffffff;
}

.btn-resolve-compact:focus{
    background: #198754;
    border-color: #198754;
    color: #ffffff;
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
}
.btn-outline-danger{
    font-size: 0.75em;
    border-radius: 12px;
    height: 30px;
}

.btn-defects{
    background: #dc3545;
    color: #ffffff;
    border: 1px solid #dc3545;
    border-radius: 50px;
    height: 30px;
    font-size: 0.75em;
    padding: 0 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-defects:hover{
    background: #ff5a6a;
    border-color: #ff5a6a;
    color: #ffffff;
}

.btn-defects:focus{
    background: #ff5a6a;
    border-color: #ff5a6a;
    color: #ffffff;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* All defects fixed or none — distinct from btn-success (Pick Up) */
.btn-defects.btn-defects-ok{
    background: #0f766e;
    border-color: #0f766e;
    color: #ffffff;
}
.btn-defects.btn-defects-ok:hover{
    background: #115e59;
    border-color: #115e59;
    color: #ffffff;
}
.btn-defects.btn-defects-ok:focus{
    background: #115e59;
    border-color: #115e59;
    color: #ffffff;
    box-shadow: 0 0 0 0.2rem rgba(15, 118, 110, 0.25);
}

/* Make Bootstrap action buttons match pill style */
.btn-primary,
.btn-danger,
.btn-secondary,
.btn-outline-primary,
.btn-outline-danger {
    border-radius: 50px;
    height: 30px;
    font-size: 0.75em;
}

/* Utility: force-hide elements (overrides Bootstrap !important) */
.force-hidden {
    display: none !important;
}

.btn-handover {
    background: white;
    color: #212529;
    border: 1px solid #dee2e6;
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    font-size: 0.75em;
    border-radius: 12px;
    height: 30px;
}

.btn-handover:hover {
    background: #f8f9fa;
}

.vehicle-info {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.5rem;
}

.info-item {
    font-size: 0.74rem;
    color: #6c757d;
}

.info-value {
    font-weight: 600;
    color: #212529;
}

.no-results {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

.two-fa-icon {
    font-size: 0.75rem;
    color: #198754;
}
.suspended-fa-icon {
    font-size: 0.75rem;
    color: #f16e1e;
}

.edit-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.btn-success,
.btn-save,
.btn-cancel {
    border-radius: 50px;
    height: 30px;
    font-size: 0.75em;
}
.btn-save {
    background: #198754;
    border: none;
    color: white;
}

.btn-save:hover {
    background: #157347;
}

.btn-cancel {
    background: white;
    color: #212529;
    border: 1px solid #dee2e6;
}

.btn-cancel:hover {
    background: #f8f9fa;
}

.avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #0d6efd;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
}

.row-section {
    border-bottom: 1px solid #eee;
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
}

.row-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.status-badge {
    font-size: 0.875rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
}

.vehicle-status {
    font-size: 0.875rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
    color: black;
    text-transform: capitalize;
    border: 1px solid #6c757d;
}

.status-inuse, .status-in-use {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #721c24;
}
.status-inoperation {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #856404;
}

.status-available {
    background: #d1f7d1;
    color: #1e7e34;
    border: 1px solid #1e7e34;
}


.status-service {
    background: #111;
    color: #eee;
    border: 1px solid #1e1c1c;
}

/* Vignette type letter on vehicle list (distinct from status badge colors) */
.vignette-type-badge {
    font-size: 0.875rem;
    padding: 0.25rem 0.55rem;
    min-width: 1.75rem;
    border-radius: 20px;
    font-weight: 600;
    line-height: 1.2;
    border: 1px solid transparent;
    cursor: pointer;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.vignette-type-badge:focus {
    outline: 2px solid rgba(13, 110, 253, 0.45);
    outline-offset: 2px;
}

.vignette-type-R {
    background: #e8e4fc;
    color: #3d2a7a;
    border-color: #6f42c1;
}

.vignette-type-M {
    background: #d8f4f0;
    color: #0d5c52;
    border-color: #20c997;
}

.vignette-type-D {
    background: #fdebd8;
    color: #a04000;
    border-color: #fd7e14;
}

.vignette-type-J {
    background: #e2e8f4;
    color: #1e4a8c;
    border-color: #4c6ef5;
}

.vignette-type-other {
    background: #ececf0;
    color: #495057;
    border-color: #adb5bd;
}

.info-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.info-label {
    font-weight: 500;
    color: #6c757d;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem;
    color: #212529;
}

.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.card-link:hover {
    text-decoration: none;
}

.card-icon {
    font-size: 1.5rem;
    color: #6c757d;
    background: #f8f9fa;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.card-title {
    font-weight: 500;
    font-size: 0.9rem;
    color: #212529;
}

.card-subtitle {
    font-size: 0.875rem;
    color: #6c757d;
}

.handover-btn {
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: #212529;
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    text-align: center;
}

.handover-btn:hover {
    background: #1a1e21;
}

.no-data {
    text-align: center;
    padding: 1rem;
    color: #6c757d;
    font-style: italic;
}

.info-item-v {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.ref-card {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.badge-severity {
    padding: 0.35em 0.65em;
    border-radius: 0.375rem;
    font-weight: 700;
    font-size: 0.75em;
    line-height: 1;
    display: inline-block;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
}

.badge-severity-default {
    background: #e9ecef;
    color: #495057;
}

.badge-cosmetic {
    background: #e2f7e2;
    color: #1c7e1c;
}

.badge-moderate {
    background: #fff3cd;
    color: #856404;
}

.badge-serious {
    background: #f8d7da;
    color: #721c24;
}

/* Backward compatibility for old severity codes. */
.badge-minor {
    background: #e2f7e2;
    color: #1c7e1c;
}

.badge-critical {
    background: #f8d7da;
    color: #721c24;
}

.badge-somehow {
    background: #f8d7da;
    color: #666464;
}

.badge-damage-status {
    padding: 0.35em 0.65em;
    border-radius: 0.375rem;
    font-weight: 700;
    font-size: 0.75em;
    line-height: 1;
    display: inline-block;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
}

.badge-damage-status-default {
    background: #eef1f4;
    color: #5f6b78;
    border: 1px solid #c8d0d8;
}

/* One line on narrow screens: horizontal scroll instead of wrapping */
.defect-badges-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.35rem;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 2px;
    margin-bottom: 2px;
}

.defect-badges-row .badge {
    flex-shrink: 0;
    white-space: nowrap;
}

@media (max-width: 576px) {
    .defect-badges-row .badge {
        font-size: 0.65rem;
        padding: 0.28em 0.5em;
    }
}

/* Damage status palette (normalized class slug from status code). */
.badge-status-fixed,
.badge-status-opraveno {
    background: #dff7dc;
    color: #2f6f34;
    border: 1px solid #7fcd86;
}

.badge-status-not-fixed,
.badge-status-neopraveno {
    background: #ffe9d4;
    color: #9a4f14;
    border: 1px solid #f2b883;
}

.badge-status- {
    background: #eef1f4;
    color: #5f6b78;
    border: 1px solid #c8d0d8;
}
.text-muted{
    font-size: 0.76em;
}
.btn-edit-handover{
    border-radius: 50px;
    font-size: 1.1em;
}

.lightbox-carousel-image{
    max-height: 70vh;
    width: 100%;
    object-fit: contain;
}

.handover-edit-thumb {
    object-fit: cover;
}

.media-thumb-delete-btn {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.media-thumb-wrap {
    position: relative;
    width: 100%;
}

.media-thumb-link {
    width: 100%;
}

.media-thumb-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

tr.vignette-row[role="button"] {
    cursor: pointer;
}
tr.vignette-row[role="button"]:hover {
    background-color: rgba(0, 0, 0, 0.035);
}

/* Bedding Sets: catalog variant note (handover_view) */
.handover-bedding-catalog-note-label {
    font-size: 0.72rem;
}
.handover-bedding-catalog-note-body {
    font-size: 0.75rem;
    line-height: 1.35;
}

/* Handover start: bedding tab card note preview */
#linen-card-text {
    font-size: 1rem !important;
    line-height: 1.35;
}