.zone-entry-banner {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    background: #198754;
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    font-size: 14px;
}

.zone-entry-banner.hidden {
    display: none;
}

.sidebar .nav-item .nav-link {
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, padding 0.2s ease;
}

.sidebar .nav-item .nav-link i {
    transition: transform 0.2s ease;
}

.sidebar .nav-item .nav-link:hover i {
    transform: translateY(-1px);
}

@media (min-width: 768px) {
    .sidebar .nav-item .nav-link {
        display: flex;
        align-items: center;
        gap: 0.7rem;
    }

    .sidebar .nav-item .nav-link span {
        display: inline-block;
        white-space: nowrap;
    }

    .sidebar.toggled .nav-item .nav-link {
        position: relative;
        justify-content: center;
        gap: 0;
        min-height: 3.45rem;
        padding: 0.85rem 0.75rem;
    }

    .sidebar.toggled .nav-item .nav-link span {
        display: none;
    }

    .sidebar.toggled .nav-item .nav-link i {
        margin-right: 0;
        font-size: 1rem;
    }

    .sidebar.toggled .nav-item .nav-link:hover::after,
    .sidebar.toggled .nav-item .nav-link:focus::after,
    .sidebar.toggled .nav-item .nav-link:focus-visible::after {
        content: attr(data-nav-label);
        position: absolute;
        left: calc(100% + 0.75rem);
        top: 50%;
        transform: translateY(-50%);
        padding: 0.45rem 0.7rem;
        border-radius: 0.7rem;
        background: rgba(33, 37, 41, 0.92);
        color: #fff;
        font-size: 0.78rem;
        font-weight: 700;
        letter-spacing: 0.01em;
        line-height: 1;
        white-space: nowrap;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.24);
        pointer-events: none;
        z-index: 20;
    }
}

.dashboard-status-card {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.dashboard-map-wrap {
    position: relative;
}

.dashboard-map {
    width: 100%;
    height: 400px;
}

.map-view-switch {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(209, 211, 226, 0.95);
    box-shadow: 0 8px 18px rgba(31, 45, 61, 0.14);
}

.map-action-controls {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 5;
    display: inline-flex;
    flex-direction: column;
    gap: 6px;
    width: 132px;
}

.map-action-menu {
    position: relative;
    display: flex;
    justify-content: flex-end;
    width: 100%;
}

.map-action-dropdown {
    position: absolute;
    top: 0;
    right: calc(100% + 8px);
    display: flex;
    min-width: 132px;
    flex-direction: column;
    gap: 2px;
    padding: 4px;
    border: 1px solid rgba(209, 211, 226, 0.95);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 12px 24px rgba(31, 45, 61, 0.18);
    opacity: 0;
    pointer-events: none;
    transform: translateX(4px);
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.map-action-menu:hover:not(.is-suppressed) .map-action-dropdown,
.map-action-menu.is-pinned .map-action-dropdown {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.map-action-menu.is-suppressed .map-action-dropdown {
    opacity: 0;
    pointer-events: none;
    transform: translateX(4px);
}

.map-action-dropdown__item {
    width: 100%;
    min-height: 32px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #4f5d75;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.1;
    text-align: left;
    white-space: nowrap;
    padding: 0.45rem 0.6rem;
}

.map-action-dropdown__item:hover:not(:disabled),
.map-action-dropdown__item:focus-visible:not(:disabled),
.map-action-dropdown__item.is-active {
    background: rgba(118, 186, 27, 0.14);
    color: #2D5A27;
    outline: none;
}

.map-action-dropdown__item:disabled {
    color: #a5adbf;
    cursor: not-allowed;
}

.map-telemetry-stack {
    position: absolute;
    right: 8px;
    bottom: 56px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
    max-width: min(280px, calc(100% - 16px));
    pointer-events: none;
}

.map-telemetry-chip {
    min-width: 200px;
    padding: 0.75rem 0.9rem;
    border: 1px solid rgba(209, 211, 226, 0.95);
    border-left-width: 4px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 10px 22px rgba(31, 45, 61, 0.16);
    color: #42526e;
}

.map-telemetry-chip__label {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #70809f;
}

.map-telemetry-chip__value {
    margin-top: 0.22rem;
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.3;
    color: #22304d;
}

.map-telemetry-chip__meta {
    margin-top: 0.18rem;
    font-size: 0.78rem;
    line-height: 1.35;
    color: #61708f;
}

.map-telemetry-chip--fixed {
    border-left-color: #76BA1B;
}

.map-telemetry-chip--float {
    border-left-color: #F1C40F;
}

.map-telemetry-chip--poor {
    border-left-color: #C0392B;
}

.map-telemetry-chip--stale,
.map-telemetry-chip--unknown {
    border-left-color: #858796;
}

.map-marker-legend {
    position: absolute;
    left: 8px;
    bottom: 8px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.55rem 0.8rem;
    border: 1px solid rgba(209, 211, 226, 0.95);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 18px rgba(31, 45, 61, 0.14);
    color: #4f5d75;
    font-size: 0.8rem;
    font-weight: 700;
}

.map-marker-legend__item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    white-space: nowrap;
}

.map-marker-legend__dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.14);
}

.map-marker-legend__dot--host {
    background: #4e73df;
}

.map-marker-legend__dot--rtk {
    background: linear-gradient(90deg, #e74a3b 0 50%, #1cc88a 50% 100%);
}

.map-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: 100%;
    min-width: 46px;
    height: 42px;
    padding: 0 0.8rem;
    border: 1px solid rgba(209, 211, 226, 0.95);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.96);
    color: #4f5d75;
    box-shadow: 0 8px 18px rgba(31, 45, 61, 0.14);
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.map-action-button i {
    font-size: 0.92rem;
}

.map-action-button:hover:not(:disabled),
.map-action-button:focus-visible:not(:disabled) {
    transform: translateY(-1px);
    border-color: rgba(118, 186, 27, 0.45);
    background: rgba(255, 255, 255, 0.99);
    color: #2D5A27;
    box-shadow: 0 12px 24px rgba(31, 45, 61, 0.18);
    outline: none;
}

.map-action-button.is-active {
    background: #76BA1B;
    border-color: #76BA1B;
    color: #17320F;
    box-shadow: 0 12px 24px rgba(45, 90, 39, 0.18);
}

.map-action-button:disabled {
    opacity: 0.56;
    cursor: not-allowed;
    box-shadow: 0 6px 14px rgba(31, 45, 61, 0.1);
}

.dashboard-map-wrap:fullscreen {
    background: #F8FAF7;
    padding: 0;
}

.dashboard-map-wrap:fullscreen .dashboard-map {
    height: 100vh;
}

.map-view-switch__button {
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #5a5c69;
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1;
    padding: 0.52rem 0.7rem;
    min-width: 78px;
    text-align: center;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.map-view-switch__button:hover {
    background: rgba(118, 186, 27, 0.12);
    color: #2D5A27;
}

.map-view-switch__button:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(118, 186, 27, 0.22);
}

.map-view-switch__button.active {
    background: rgba(118, 186, 27, 0.16);
    color: #2D5A27;
}

.dashboard-map-wrap [class*="gotoymaps"],
.dashboard-map-wrap [class*="gototech"],
.dashboard-map-wrap [class*="map-copyrights-promo"] {
    display: none !important;
}

.dashboard-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.dashboard-status-pill.online {
    color: #0f6848;
    background: #d9f7ea;
}

.dashboard-status-pill.offline {
    color: #6c757d;
    background: #e9ecef;
}

.dashboard-status-value {
    font-size: 1.15rem;
    font-weight: 700;
    color: #5a5c69;
    line-height: 1.35;
    word-break: break-word;
}

.dashboard-current-state .dashboard-inline-state {
    display: flex;
    align-items: flex-start;
    padding: 0.8rem 1rem;
    margin-bottom: 1.25rem;
    border: 1px solid transparent;
    border-radius: 0.9rem;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.45;
}

.dashboard-current-state .dashboard-inline-state--info {
    color: #35506b;
    background: #eef5ff;
    border-color: #d8e6ff;
}

.dashboard-current-state .dashboard-inline-state--warning {
    color: #7a4f00;
    background: #fff6dd;
    border-color: #f2dfad;
}

.dashboard-current-state .dashboard-inline-state--danger {
    color: #842029;
    background: #f8d7da;
    border-color: #f1aeb5;
}

.dashboard-current-state .dashboard-mode-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.8rem;
    min-width: 140px;
    padding: 0.55rem 1rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.2;
}

.dashboard-current-state .dashboard-mode-badge--idle {
    color: #6c757d;
    background: #e9ecef;
}

.dashboard-current-state .dashboard-mode-badge--loading {
    color: #2f5ecc;
    background: #e8efff;
}

.dashboard-current-state .dashboard-mode-badge--unloading {
    color: #8a4b00;
    background: #ffe7c2;
}

.dashboard-current-state .dashboard-mode-badge--unknown {
    color: #4f5d75;
    background: #eef1f6;
}

.dashboard-current-state .dashboard-mode-badge.is-stale {
    border-color: rgba(138, 75, 0, 0.35);
    box-shadow: inset 0 0 0 1px rgba(138, 75, 0, 0.08);
}

.dashboard-section {
    margin-bottom: 1.5rem;
}

.dashboard-section:last-of-type {
    margin-bottom: 1.25rem;
}

.dashboard-section-meta {
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 600;
}

.dashboard-warning-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.85rem;
    margin-bottom: 1.5rem;
}

.dashboard-warning-empty {
    padding: 1rem 1.05rem;
    border: 1px dashed #d7ddeb;
    border-radius: 0.95rem;
    background: linear-gradient(180deg, #fbfcff 0%, #f6f8fc 100%);
    color: #858796;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.45;
}

.dashboard-warning-item {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    min-height: 100%;
    padding: 1rem 1.05rem;
    border: 1px solid #e3e6f0;
    border-left-width: 4px;
    border-radius: 0.95rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fc 100%);
    box-shadow: 0 10px 24px rgba(31, 45, 61, 0.06);
}

.dashboard-warning-item__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 0.85rem;
    flex-shrink: 0;
    font-size: 0.95rem;
}

.dashboard-warning-item__content {
    min-width: 0;
}

.dashboard-warning-item__title {
    color: #2f3a4f;
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.35;
}

.dashboard-warning-item__message {
    margin-top: 0.22rem;
    color: #6b7280;
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.5;
}

.dashboard-warning-item--danger {
    border-left-color: #C0392B;
}

.dashboard-warning-item--danger .dashboard-warning-item__icon {
    background: #F9E3E0;
    color: #C0392B;
}

.dashboard-warning-item--warning {
    border-left-color: #F1C40F;
}

.dashboard-warning-item--warning .dashboard-warning-item__icon {
    background: #FFF7DC;
    color: #6D4E00;
}

.dashboard-warning-item--info {
    border-left-color: #3A6F32;
}

.dashboard-warning-item--info .dashboard-warning-item__icon {
    background: #EAF3E5;
    color: #2D5A27;
}

.dashboard-progress-track {
    width: 100%;
    height: 14px;
    border-radius: 999px;
    background: #e9ecef;
    overflow: hidden;
}

.dashboard-progress-bar {
    height: 100%;
    width: 0;
    min-width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #76BA1B 0%, #5F9815 100%);
    transition: width 0.25s ease;
}

.dashboard-progress-bar.is-over {
    background: linear-gradient(90deg, #F1C40F 0%, #C0392B 100%);
}

.dashboard-mini-table-wrap {
    border: 1px solid #e3e6f0;
    border-radius: 0.75rem;
}

.dashboard-mini-table {
    min-width: 640px;
}

.dashboard-mini-table thead th {
    border-top: 0;
    border-bottom: 1px solid #e3e6f0;
    background: #F1F6EF;
    color: #2D5A27;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
}

.dashboard-mini-table td {
    vertical-align: middle;
    font-size: 0.9rem;
    color: #5a5c69;
}

.dashboard-mini-table-empty {
    padding: 1rem !important;
    text-align: center;
    color: #858796;
}

.dashboard-current-state .dashboard-last-packet {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 0.4rem;
    border-top: 1px solid #eaecf4;
}

.dashboard-current-state .dashboard-last-packet__label {
    color: #858796;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.dashboard-current-state .dashboard-last-packet__value {
    color: #3a3b45;
    font-size: 1rem;
    font-weight: 700;
    text-align: right;
}

.dashboard-bool-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    padding: 0.28rem 0.6rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
}

.dashboard-bool-badge.is-yes {
    color: #842029;
    background: #f8d7da;
}

.dashboard-bool-badge.is-no {
    color: #0f6848;
    background: #d9f7ea;
}

.batch-table-row {
    cursor: pointer;
    transition: background-color 0.18s ease, box-shadow 0.18s ease;
}

.batch-table-row:hover,
.batch-table-row:focus {
    background: #F8FAF7;
    box-shadow: inset 0 0 0 1px rgba(118, 186, 27, 0.2);
    outline: none;
}

.batch-detail-stat {
    height: 100%;
    padding: 1rem 1.1rem;
    border: 1px solid #e3e6f0;
    border-radius: 0.9rem;
    background: #fff;
}

.batch-detail-stat--accent {
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fc 100%);
}

.batch-detail-stat__label {
    color: #2D5A27;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-bottom: 0.55rem;
}

.batch-detail-stat__value {
    color: #5a5c69;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    word-break: break-word;
}

.batch-detail-chart-wrap {
    position: relative;
    min-height: 320px;
}

.batch-detail-chart-wrap canvas {
    width: 100% !important;
    height: 320px !important;
}

.batch-track-map-wrap {
    border-radius: 0.9rem;
    overflow: hidden;
    border: 1px solid #e3e6f0;
}

.batch-track-map {
    height: 360px;
}

.batch-track-empty {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
}

.batch-detail-empty {
    padding: 1rem !important;
    text-align: center;
    color: #858796;
}

.batch-edit-state {
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.85rem;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.45;
}

.batch-edit-state--info {
    color: #35506b;
    background: #eef5ff;
    border-color: #d8e6ff;
}

.batch-edit-state--warning {
    color: #7a4f00;
    background: #fff6dd;
    border-color: #f2dfad;
}

.batch-edit-state--danger {
    color: #842029;
    background: #f8d7da;
    border-color: #f1aeb5;
}

.batch-edit-label {
    display: inline-block;
    margin-bottom: 0.45rem;
    color: #2D5A27;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.batch-edit-hint {
    margin-top: 0.45rem;
    color: #6c757d;
    font-size: 0.84rem;
    line-height: 1.45;
}

.batch-edit-actions {
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.batch-edit-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 7.75rem;
    min-height: 2.375rem;
    margin-top: 0 !important;
    white-space: nowrap;
}

.batch-edit-meta {
    color: #858796;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.4;
}

.batch-ingredient-editor {
    min-width: 220px;
}

.batch-ingredient-editor__controls {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.batch-ingredient-editor__trigger {
    display: inline-flex;
    align-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: #2D5A27;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: underline;
    text-decoration-style: dashed;
    cursor: pointer;
}

.batch-ingredient-editor__trigger:hover:not(:disabled),
.batch-ingredient-editor__trigger:focus-visible:not(:disabled) {
    color: #5F9815;
    outline: none;
}

span.batch-ingredient-editor__trigger {
    color: #5a5c69;
    text-decoration: none;
    cursor: default;
}

.batch-ingredient-editor__trigger:disabled {
    color: #858796;
    text-decoration: none;
    cursor: not-allowed;
}

.batch-ingredient-editor__select {
    min-width: 220px;
    flex: 1 1 220px;
}

.batch-ingredient-editor__cancel {
    padding: 0;
    border: 0;
    background: transparent;
    color: #6c757d;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
}

.batch-ingredient-editor__cancel:hover:not(:disabled),
.batch-ingredient-editor__cancel:focus-visible:not(:disabled) {
    color: #2D5A27;
    outline: none;
}

.batch-ingredient-editor__cancel:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.batch-unloading-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    min-height: 100%;
    padding: 1.1rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, #FFFFFF 0%, #F8FAF7 100%);
    border: 1px solid #E0E4E0;
}

.batch-unloading-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 0.9rem;
    background: #76BA1B;
    color: #17320F;
    font-size: 1.1rem;
    box-shadow: 0 12px 24px rgba(45, 90, 39, 0.16);
    flex-shrink: 0;
}

.batch-unloading-card__content {
    min-width: 0;
}

.batch-unloading-card__label {
    color: #2D5A27;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.batch-unloading-card__value {
    color: #304270;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.45;
    word-break: break-word;
}

.batch-unloading-card__meta {
    color: #5f6f93;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.45;
}

.ration-groups-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ration-groups-preview__badge {
    display: inline-flex;
    align-items: center;
    padding: 0.38rem 0.72rem;
    border-radius: 999px;
    background: #EAF3E5;
    color: #2D5A27;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1;
}

.ration-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 104px;
    padding: 0.42rem 0.82rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.ration-status-badge.is-active {
    color: #0f6848;
    background: #d9f7ea;
}

.ration-status-badge.is-inactive {
    color: #5a5c69;
    background: #eef1f6;
}

.ration-table-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.ration-table-list__item {
    line-height: 1.35;
}

.ration-ingredients-cell {
    min-width: 460px;
}

.ration-ingredients-table-wrap {
    max-height: 360px;
    overflow: auto;
    border: 1px solid #e3e8f2;
    border-radius: 0.5rem;
    background: #fff;
}

.ration-ingredients-table {
    width: 100%;
    min-width: 430px;
    border-collapse: collapse;
    color: #3f4a5f;
    font-size: 0.86rem;
}

.ration-ingredients-table th,
.ration-ingredients-table td {
    padding: 0.5rem 0.65rem;
    border-bottom: 1px solid #edf1f7;
    vertical-align: middle;
}

.ration-ingredients-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f7f9fd;
    color: #5b6680;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.2;
    text-transform: uppercase;
}

.ration-ingredients-table tbody tr:nth-child(even) {
    background: #fbfcff;
}

.ration-ingredients-table tbody tr:last-child td {
    border-bottom: 0;
}

.ration-ingredients-table tfoot td {
    position: sticky;
    bottom: 0;
    border-top: 1px solid #dbe3f1;
    border-bottom: 0;
    background: #f2f6ff;
    color: #2f3a4f;
    font-weight: 800;
}

.ration-ingredients-table__index {
    width: 2.7rem;
    color: #7b879c;
    text-align: center;
}

.ration-ingredients-table__name {
    min-width: 160px;
    color: #2f3a4f;
    font-weight: 700;
    word-break: break-word;
}

.ration-ingredients-table__weight {
    width: 7.5rem;
    text-align: right;
    white-space: nowrap;
}

.ration-actions {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    min-width: 150px;
}

.ration-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 700;
    white-space: nowrap;
}

.ration-manual-table-wrap {
    border: 1px solid #e3e8f2;
    border-radius: 0.5rem;
}

.ration-manual-table {
    min-width: 760px;
}

.ration-manual-table thead th {
    background: #f7f9fd;
    color: #5b6680;
    font-size: 0.74rem;
    font-weight: 800;
    line-height: 1.2;
    text-transform: uppercase;
    white-space: nowrap;
    vertical-align: middle;
}

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

.ration-manual-row {
    transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

.ration-manual-row.is-highlighted td {
    background: #fff8db;
    box-shadow: inset 0 0 0 999px rgba(241, 196, 15, 0.12);
}

.ration-manual-row.is-highlighted td:first-child {
    box-shadow: inset 4px 0 0 #F1C40F, inset 0 0 0 999px rgba(241, 196, 15, 0.12);
}

.ration-manual-table__action {
    width: 6rem;
    text-align: center;
}

.ration-manual-number {
    min-width: 130px;
}

.ration-manual-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
}

.ration-manual-compound-row td {
    background: #f8fafc;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.ration-compound-editor {
    border-left: 3px solid #6c757d;
    padding-left: 0.75rem;
}

.ration-compound-editor__header {
    align-items: center;
    color: #5b6680;
    display: flex;
    font-size: 0.8rem;
    font-weight: 800;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.ration-compound-editor__rows {
    display: grid;
    gap: 0.5rem;
}

.ration-compound-editor__row {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: minmax(220px, 1fr) minmax(130px, 180px) 2rem;
}

.ration-ingredient-components-list {
    color: #6b7280;
    font-size: 0.78rem;
    line-height: 1.45;
    margin-top: 0.35rem;
    padding-left: 0.75rem;
}

@media (max-width: 767.98px) {
    .ration-compound-editor__row {
        grid-template-columns: 1fr;
    }
}

.groups-form-hint {
    color: #6b7280;
    font-size: 0.8rem;
    line-height: 1.45;
}

.groups-ration-select.is-unavailable,
.groups-zone-select.is-unavailable {
    background-color: #f8f9fc;
}

.groups-ration-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.38rem 0.72rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1;
}

.groups-ration-badge.is-active {
    background: #E5F4DD;
    color: #24501F;
}

.groups-ration-badge.is-inactive {
    background: #fff1d6;
    color: #9a5b00;
}

.groups-ration-badge.is-empty {
    background: #eef1f6;
    color: #5a5c69;
}

.groups-coordinate-cell,
.groups-zone-cell {
    font-variant-numeric: tabular-nums;
    color: #3a3b45;
    line-height: 1.45;
}

.groups-coordinate-cell__meta,
.groups-zone-cell__meta {
    color: #858796;
    font-size: 0.78rem;
    margin-top: 0.2rem;
}

.groups-zone-name {
    font-weight: 700;
}

.groups-headcount {
    font-weight: 700;
    color: #2D5A27;
    white-space: nowrap;
}

.groups-radius {
    white-space: nowrap;
}

.groups-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-width: 150px;
}

.groups-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    font-weight: 700;
    white-space: nowrap;
}

.telemetry-page-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.telemetry-switch {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.telemetry-switch__button {
    border: 1px solid #d1d3e2;
    background: #fff;
    color: #5a5c69;
    border-radius: 0.35rem;
    padding: 0.5rem 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.telemetry-switch__button:hover {
    background: #F8FAF7;
    color: #2D5A27;
}

.telemetry-switch__button.active {
    background: #76BA1B;
    color: #17320F;
    border-color: #76BA1B;
}

.telemetry-panel {
    display: none;
}

.telemetry-panel.active {
    display: block;
}

.telemetry-panel-status {
    font-size: 0.9rem;
    font-weight: 600;
    color: #6c757d;
}

.telemetry-table-wrap {
    overflow: auto;
}

.telemetry-table {
    min-width: 1400px;
    margin-bottom: 0;
}

.telemetry-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #F1F6EF;
    color: #44506d;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.telemetry-table td {
    vertical-align: middle;
    white-space: nowrap;
    font-size: 0.88rem;
}

.telemetry-empty-state {
    padding: 26px 18px !important;
    text-align: center;
    color: #858796;
    background: #fff;
}

.telemetry-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}

.telemetry-badge.ok {
    color: #0f6848;
    background: #d9f7ea;
}

.telemetry-badge.warn {
    color: #8a5a00;
    background: #fff1cc;
}

.telemetry-badge.offline {
    color: #842029;
    background: #f8d7da;
}

.telemetry-sms-text,
.telemetry-extra {
    max-width: 100%;
    min-width: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.4;
}

.telemetry-sms-text {
    display: block;
}

.telemetry-extra {
    max-width: 320px;
    color: #6b7280;
}

.telemetry-table td.telemetry-extra {
    white-space: pre-wrap;
}

@media (max-width: 768px) {
    .map-marker-legend {
        gap: 0.65rem;
        padding: 0.48rem 0.68rem;
        font-size: 0.74rem;
    }

    .telemetry-page-meta {
        width: 100%;
    }

    .dashboard-current-state .dashboard-last-packet {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-current-state .dashboard-last-packet__value {
        text-align: left;
    }

    .map-view-switch {
        top: 6px;
        left: 6px;
    }

    .map-telemetry-stack {
        right: 6px;
        bottom: 54px;
        max-width: calc(100% - 12px);
    }

    .map-telemetry-chip {
        min-width: 0;
        padding: 0.65rem 0.78rem;
    }

    .map-action-controls {
        top: 6px;
        right: 6px;
        gap: 5px;
    }

    .map-action-button {
        min-width: 42px;
        height: 38px;
        padding: 0 0.65rem;
        border-radius: 11px;
        font-size: 0.75rem;
    }

    .map-view-switch__button {
        min-width: 70px;
        padding: 0.48rem 0.64rem;
        font-size: 0.75rem;
    }

    .dashboard-section-meta {
        font-size: 0.82rem;
    }

    .dashboard-warning-list {
        grid-template-columns: 1fr;
    }

    .dashboard-mini-table {
        min-width: 560px;
    }

    .batch-edit-actions {
        align-items: stretch;
        flex-direction: column;
        justify-content: flex-start;
    }

    .batch-unloading-card {
        flex-direction: column;
    }
}

.admin-panel-tabs {
    border-bottom: 1px solid #d8deef;
}

.admin-panel-tabs .nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    border-radius: 0.35rem 0.35rem 0 0;
    font-weight: 800;
}

.admin-panel-tabs .nav-link.active {
    color: #2D5A27;
    background: #fff;
    border-color: #d8deef #d8deef #fff;
}

.admin-panel-tab-content > .tab-pane {
    outline: none;
}

.admin-users-table-wrap {
    overflow: auto;
}

.admin-users-table {
    min-width: 860px;
}

.admin-users-table thead th {
    background: #F1F6EF;
    color: #44506d;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
    vertical-align: middle;
}

.admin-users-table td {
    vertical-align: middle;
    white-space: nowrap;
    font-size: 0.9rem;
}

.admin-users-table td:nth-child(2),
.admin-users-table td:nth-child(3),
.admin-users-table td:nth-child(5) {
    white-space: normal;
}

.admin-users-role-select {
    min-width: 148px;
    max-width: 170px;
    font-weight: 700;
}

.admin-users-delete-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 999px;
    transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.admin-users-delete-button:hover:not(:disabled),
.admin-users-delete-button:focus-visible:not(:disabled) {
    background: rgba(192, 57, 43, 0.12);
    color: #C0392B !important;
    text-decoration: none;
    transform: translateY(-1px);
    outline: none;
}

.admin-users-delete-button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    text-decoration: none;
}

.admin-users-actions {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
}

.admin-users-edit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 999px;
    transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.admin-users-edit-button:hover:not(:disabled),
.admin-users-edit-button:focus-visible:not(:disabled) {
    background: rgba(118, 186, 27, 0.14);
    color: #2D5A27 !important;
    text-decoration: none;
    transform: translateY(-1px);
    outline: none;
}

.admin-users-edit-button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    text-decoration: none;
}

.telemetry-settings-grid .form-control {
    font-weight: 700;
}

.digest-hero-card {
    border: 1px solid #e3e6f0;
    border-radius: 1rem;
    background: #fff;
}

.digest-hero-card::after {
    content: none;
}

.digest-hero-card .card-body {
    position: static;
}

.digest-hero-eyebrow {
    display: none;
}

.digest-hero-title {
    display: none;
}

.digest-hero-text {
    display: none;
}

.digest-hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
    margin-top: 0;
}

.digest-hero-stat {
    padding: 1rem 1.05rem;
    border-radius: 0.9rem;
    border: 1px solid #e3e6f0;
    background: #f8f9fc;
}

.digest-hero-stat__label {
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #2D5A27;
}

.digest-hero-stat__value {
    margin-top: 0.42rem;
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.35;
    word-break: break-word;
}

.digest-section-label {
    display: inline-block;
    margin-bottom: 0.45rem;
    color: #2D5A27;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #3a3b45;
}

.digest-state {
    padding: 0.75rem 0.9rem;
    border: 1px solid #e3e6f0;
    border-radius: 0.9rem;
    background: #f8f9fc;
    color: #5a5c69;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.45;
}

.digest-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.digest-toggle-card {
    border: 1px solid #e3e6f0;
    border-radius: 1rem;
    background: #fff;
}

.digest-toggle-card__row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.digest-toggle-card__title {
    color: #2f3a4f;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.4;
}

.digest-toggle-card__text {
    display: none;
}

.digest-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
}

.digest-switch__input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.digest-switch__control {
    position: relative;
    width: 54px;
    height: 30px;
    border-radius: 999px;
    background: #cfd7ea;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.digest-switch__control::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 4px 10px rgba(34, 48, 77, 0.18);
    transition: transform 0.2s ease;
}

.digest-switch__input:checked + .digest-switch__control {
    background: #1cc88a;
}

.digest-switch__input:checked + .digest-switch__control::after {
    transform: translateX(24px);
}

.digest-switch__label {
    color: #304270;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.4;
}

.digest-recipient-entry {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.digest-recipient-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.digest-recipient-empty {
    padding: 1rem 1.1rem;
    border: 1px dashed #cfd9ef;
    border-radius: 0.9rem;
    color: #858796;
    font-size: 0.9rem;
    line-height: 1.5;
    background: #f8faff;
}

.digest-recipient-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid #e3e8f4;
    border-radius: 0.95rem;
    background: #fff;
}

.digest-recipient-item__meta {
    min-width: 0;
}

.digest-recipient-item__email {
    color: #2f3a4f;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.4;
    word-break: break-word;
}

.digest-recipient-item__remove {
    flex-shrink: 0;
}

.digest-preview-card {
    position: sticky;
    top: 1.5rem;
}

.digest-preview-stack {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.digest-preview-block {
    padding: 0.9rem 1rem;
    border: 1px solid #e3e6f0;
    border-radius: 0.9rem;
    background: #fff;
}

.digest-preview-block__label {
    color: #7a869f;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.digest-preview-block__value {
    margin-top: 0.35rem;
    color: #2f3a4f;
    font-size: 0.96rem;
    font-weight: 700;
    line-height: 1.45;
    word-break: break-word;
}

.digest-recipient-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.7rem;
}

.digest-recipient-preview__badge {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.72rem;
    border-radius: 999px;
    background: #f1f3f8;
    color: #5a5c69;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.2;
}

.digest-readonly-banner {
    margin-top: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 0.9rem;
    background: #fff6dd;
    border: 1px solid #f2dfad;
    color: #7a4f00;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.45;
}

@media (max-width: 768px) {
    .admin-users-table {
        min-width: 760px;
    }

    .admin-users-role-select {
        min-width: 132px;
    }

    .digest-hero-stats {
        grid-template-columns: 1fr;
    }

    .digest-toggle-card__row,
    .digest-recipient-entry,
    .digest-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .digest-preview-card {
        position: static;
    }
}

.violations-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.violations-summary-card {
    padding: 1rem 1.1rem;
    border: 1px solid #e3e6f0;
    border-left: 4px solid #76BA1B;
    border-radius: 1rem;
    background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
    box-shadow: 0 10px 24px rgba(31, 45, 61, 0.08);
}

.violations-summary-card--critical {
    border-left-color: #e74a3b;
}

.violations-summary-card--attention {
    border-left-color: #f6c23e;
}

.violations-summary-card--progress {
    border-left-color: #3A6F32;
}

.violations-summary-card--closed {
    border-left-color: #1cc88a;
}

.violations-summary-card__label {
    color: #7a869f;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.violations-summary-card__value {
    margin-top: 0.35rem;
    color: #25324a;
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
}

.violations-summary-card__hint {
    margin-top: 0.45rem;
    color: #6f7d95;
    font-size: 0.86rem;
    line-height: 1.4;
}

.violations-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.violations-filters {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
}

.violations-source-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: #EAF3E5;
    color: #2D5A27;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.2;
}

.violations-source-badge--mock {
    background: #fff4dd;
    color: #8a5a00;
}

.violations-table {
    min-width: 1180px;
}

.violations-table thead th {
    white-space: nowrap;
    vertical-align: middle;
}

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

.violations-cell-primary {
    color: #25324a;
    font-weight: 700;
}

.violations-cell-secondary {
    color: #6f7d95;
    font-size: 0.86rem;
}

.violations-number {
    font-weight: 700;
    white-space: nowrap;
}

.violations-number--positive {
    color: #1e7a3b;
}

.violations-number--negative {
    color: #b42318;
}

.violations-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.38rem 0.72rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1.2;
    white-space: nowrap;
}

.violations-status--critical {
    background: #fde7e9;
    color: #a61d24;
}

.violations-status--open {
    background: #fff4dd;
    color: #8a5a00;
}

.violations-status--progress {
    background: #e3f6fb;
    color: #0f6c80;
}

.violations-status--closed {
    background: #dff8eb;
    color: #146c43;
}

.violations-empty-state {
    padding: 1.5rem 1rem;
    color: #858796;
    text-align: center;
}

@media (max-width: 1200px) {
    .violations-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .violations-summary-grid {
        grid-template-columns: 1fr;
    }

    .violations-toolbar,
    .violations-filters {
        flex-direction: column;
        align-items: stretch;
    }
}

.reports-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.reports-source-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: #EAF3E5;
    color: #2D5A27;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.2;
}

.reports-source-badge--mock {
    background: #fff4dd;
    color: #8a5a00;
}

.reports-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.reports-filters {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
}

.reports-toolbar-meta {
    min-width: 220px;
    padding: 0.95rem 1rem;
    border: 1px solid #e3e6f0;
    border-radius: 0.95rem;
    background: linear-gradient(180deg, #fbfcff 0%, #f6f8fc 100%);
}

.reports-toolbar-meta__value {
    color: #25324a;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.3;
}

.reports-toolbar-meta__label {
    margin-top: 0.25rem;
    color: #6f7d95;
    font-size: 0.84rem;
    line-height: 1.45;
}

.reports-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.reports-summary-card {
    padding: 1rem 1.1rem;
    border: 1px solid #e3e6f0;
    border-left: 4px solid #76BA1B;
    border-radius: 1rem;
    background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
    box-shadow: 0 10px 24px rgba(31, 45, 61, 0.08);
}

.reports-summary-card--primary {
    border-left-color: #76BA1B;
}

.reports-summary-card--danger {
    border-left-color: #e74a3b;
}

.reports-summary-card--warning {
    border-left-color: #f6c23e;
}

.reports-summary-card--attention {
    border-left-color: #3A6F32;
}

.reports-summary-card--success {
    border-left-color: #1cc88a;
}

.reports-summary-card__label {
    color: #7a869f;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.reports-summary-card__value {
    margin-top: 0.35rem;
    color: #25324a;
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
}

.reports-summary-card__hint {
    margin-top: 0.45rem;
    color: #6f7d95;
    font-size: 0.86rem;
    line-height: 1.4;
}

.reports-table {
    min-width: 1120px;
}

.reports-table--wide {
    min-width: 1180px;
}

.reports-table thead th {
    white-space: nowrap;
    vertical-align: middle;
}

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

.reports-cell-primary {
    color: #25324a;
    font-weight: 700;
}

.reports-cell-secondary {
    color: #6f7d95;
    font-size: 0.86rem;
}

.reports-number {
    font-weight: 700;
    white-space: nowrap;
}

.reports-number--positive {
    color: #1e7a3b;
}

.reports-number--negative {
    color: #b42318;
}

.reports-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.1rem;
    padding: 0.34rem 0.55rem;
    border-radius: 999px;
    background: #EAF3E5;
    color: #2D5A27;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1;
}

.reports-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.38rem 0.72rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1.2;
    white-space: nowrap;
}

.reports-status--danger {
    background: #fde7e9;
    color: #a61d24;
}

.reports-status--success {
    background: #dff8eb;
    color: #146c43;
}

.reports-batch-link {
    color: #2D5A27;
    font-weight: 700;
    text-decoration: none;
}

.reports-batch-link:hover,
.reports-batch-link:focus {
    color: #5F9815;
    text-decoration: underline;
}

.reports-empty-state {
    padding: 1.5rem 1rem;
    color: #858796;
    text-align: center;
}

@media (max-width: 1200px) {
    .reports-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .reports-summary-grid {
        grid-template-columns: 1fr;
    }

    .reports-header-actions,
    .reports-toolbar,
    .reports-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .reports-toolbar-meta {
        min-width: 0;
    }
}

/* KOROVKI modern agrotech theme */
:root {
    --korovki-sidebar: #2D5A27;
    --korovki-sidebar-hover: #3A6F32;
    --korovki-primary: #76BA1B;
    --korovki-primary-hover: #5F9815;
    --korovki-background: #F8FAF7;
    --korovki-text: #2C3E50;
    --korovki-muted: #7F8C8D;
    --korovki-border: #E0E4E0;
    --korovki-danger: #C0392B;
    --korovki-danger-hover: #A93226;
    --korovki-warning: #F1C40F;
    --korovki-warning-text: #6D4E00;
    --korovki-card: #FFFFFF;
    --korovki-primary-text: #17320F;
}

body,
#wrapper #content-wrapper {
    font-family: "Manrope", "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--korovki-text);
    background-color: var(--korovki-background);
}

button,
input,
select,
textarea,
.btn,
.form-control,
.custom-select,
.dropdown-menu,
.table {
    font-family: "Manrope", "Segoe UI", Roboto, Arial, sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6,
.sidebar-brand-text,
.card-header,
.card-header-custom,
.page-title {
    font-weight: 800 !important;
}

body,
.form-control,
.custom-select,
.table td,
.dashboard-status-value,
.batch-detail-stat__value,
.reports-number,
.violations-number {
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.bg-gradient-primary {
    background-color: var(--korovki-sidebar) !important;
    background-image: none !important;
}

.sidebar-dark .sidebar-brand,
.sidebar-dark .nav-item .nav-link,
.sidebar-dark .nav-item .nav-link:active,
.sidebar-dark .nav-item .nav-link:focus {
    color: rgba(255, 255, 255, 0.86);
}

.sidebar-dark .nav-item .nav-link i {
    color: rgba(255, 255, 255, 0.7);
}

.sidebar-dark .nav-item .nav-link:hover {
    background-color: var(--korovki-sidebar-hover);
    color: #fff;
}

.sidebar-dark .nav-item .nav-link:hover i,
.sidebar-dark .nav-item .nav-link:focus i,
.sidebar-dark .nav-item.active .nav-link i {
    color: var(--korovki-primary);
}

.sidebar-dark .nav-item.active .nav-link {
    background-color: rgba(118, 186, 27, 0.16);
    color: #fff;
}

.sidebar-dark hr.sidebar-divider {
    border-top-color: rgba(255, 255, 255, 0.16);
}

.sidebar-dark #sidebarToggle {
    background-color: rgba(255, 255, 255, 0.18);
}

.sidebar-dark #sidebarToggle:hover {
    background-color: rgba(118, 186, 27, 0.28);
}

.sidebar-brand-logo {
    display: block;
    width: 3.25rem;
    height: 3.25rem;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

a,
.page-link,
.text-primary,
.batch-ingredient-editor__trigger,
.reports-batch-link {
    color: var(--korovki-sidebar) !important;
}

a:hover,
.page-link:hover,
.batch-ingredient-editor__trigger:hover:not(:disabled),
.reports-batch-link:hover,
.reports-batch-link:focus {
    color: var(--korovki-primary-hover) !important;
}

.page-item.active .page-link,
.pagination .active > .page-link,
.dataTables_wrapper .pagination .page-item.active .page-link {
    color: var(--korovki-primary-text) !important;
    background-color: var(--korovki-primary) !important;
    border-color: var(--korovki-primary) !important;
}

.page-link {
    border-color: var(--korovki-border) !important;
}

.page-item.disabled .page-link {
    color: var(--korovki-muted) !important;
    background-color: #F1F6EF !important;
    border-color: var(--korovki-border) !important;
}

.btn-primary,
.btn-success {
    color: var(--korovki-primary-text);
    background-color: var(--korovki-primary);
    border-color: var(--korovki-primary);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:not(:disabled):not(.disabled):active,
.btn-success:hover,
.btn-success:focus,
.btn-success:not(:disabled):not(.disabled):active,
.show > .btn-primary.dropdown-toggle,
.show > .btn-success.dropdown-toggle {
    color: #fff;
    background-color: var(--korovki-primary-hover);
    border-color: var(--korovki-primary-hover);
}

.btn-primary:focus,
.btn-primary.focus,
.btn-success:focus,
.btn-success.focus,
.form-control:focus,
.custom-select:focus {
    border-color: rgba(118, 186, 27, 0.78);
    box-shadow: 0 0 0 0.2rem rgba(118, 186, 27, 0.22);
}

.btn-outline-primary {
    color: var(--korovki-sidebar);
    border-color: var(--korovki-sidebar);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:not(:disabled):not(.disabled):active {
    color: var(--korovki-primary-text);
    background-color: var(--korovki-primary);
    border-color: var(--korovki-primary);
}

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

.btn-danger:hover,
.btn-danger:focus,
.btn-danger:not(:disabled):not(.disabled):active {
    background-color: var(--korovki-danger-hover);
    border-color: var(--korovki-danger-hover);
}

.btn-outline-danger,
.btn-soft-danger {
    color: var(--korovki-danger) !important;
    background-color: #fff !important;
    border-color: var(--korovki-danger) !important;
}

.btn-outline-danger:hover,
.btn-outline-danger:focus,
.btn-outline-danger:not(:disabled):not(.disabled):active,
.btn-soft-danger:hover,
.btn-soft-danger:focus {
    color: #fff !important;
    background-color: var(--korovki-danger) !important;
    border-color: var(--korovki-danger) !important;
}

.btn-warning {
    color: var(--korovki-warning-text);
    background-color: var(--korovki-warning);
    border-color: var(--korovki-warning);
}

.text-danger {
    color: var(--korovki-danger) !important;
}

.text-warning {
    color: var(--korovki-warning-text) !important;
}

.text-muted,
.small,
.auth-card-note,
.dashboard-section-meta,
.dashboard-warning-item__message,
.batch-edit-hint,
.batch-edit-meta,
.digest-preview-block__label,
.reports-cell-secondary,
.violations-cell-secondary {
    color: var(--korovki-muted) !important;
}

.card,
.modal-content,
.dropdown-menu,
.map-card,
.panel-card,
.table-card,
.digest-hero-card,
.digest-toggle-card,
.digest-preview-block,
.batch-detail-stat,
.reports-toolbar-meta {
    background-color: var(--korovki-card) !important;
    border-color: var(--korovki-border) !important;
}

.card-header,
.card-header-custom,
.table thead th,
.dashboard-mini-table thead th,
.telemetry-table thead th,
.admin-users-table thead th {
    color: var(--korovki-sidebar) !important;
    background-color: #F1F6EF !important;
    border-color: var(--korovki-border) !important;
}

.form-control,
.custom-select,
.input-group-text,
.table,
.table td,
.table th,
.dashboard-mini-table-wrap,
.digest-recipient-item,
.digest-state,
.status-box,
.zones-separator-cell {
    border-color: var(--korovki-border) !important;
}

.form-control,
.custom-select,
.page-title,
.form-section-title,
.dashboard-status-value,
.dashboard-warning-item__title,
.batch-detail-stat__value,
.digest-toggle-card__title,
.digest-preview-block__value,
.reports-cell-primary,
.reports-toolbar-meta__value,
.violations-cell-primary {
    color: var(--korovki-text) !important;
}

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

.border-left-primary,
.reports-summary-card,
.reports-summary-card--primary,
.violations-summary-card {
    border-left-color: var(--korovki-primary) !important;
}

.border-left-success,
.reports-summary-card--success,
.violations-summary-card--closed {
    border-left-color: var(--korovki-primary) !important;
}

.border-left-danger,
.reports-summary-card--danger,
.violations-summary-card--critical,
.dashboard-warning-item--danger {
    border-left-color: var(--korovki-danger) !important;
}

.border-left-warning,
.reports-summary-card--warning,
.violations-summary-card--attention,
.dashboard-warning-item--warning {
    border-left-color: var(--korovki-warning) !important;
}

.alert-warning,
.dashboard-inline-state--warning,
.batch-edit-state--warning,
.digest-readonly-banner {
    color: var(--korovki-warning-text) !important;
    background-color: #FFF7DC !important;
    border-color: #EBD68B !important;
}

.alert-danger,
.dashboard-inline-state--danger,
.batch-edit-state--danger {
    color: #7B241C !important;
    background-color: #F9E3E0 !important;
    border-color: #E8B6AF !important;
}

.alert-success,
.dashboard-status-pill.online,
.badge-soft.active,
.telemetry-badge.ok,
.reports-status--success,
.violations-status--closed {
    color: #24501F !important;
    background-color: #E5F4DD !important;
}

.badge-soft.inactive,
.telemetry-badge.offline,
.reports-status--danger,
.violations-status--critical {
    color: #7B241C !important;
    background-color: #F9E3E0 !important;
}

.dashboard-warning-item--danger .dashboard-warning-item__icon,
.admin-users-delete-button:hover:not(:disabled),
.admin-users-delete-button:focus-visible:not(:disabled) {
    color: var(--korovki-danger) !important;
    background-color: #F9E3E0 !important;
}

.dashboard-warning-item--warning .dashboard-warning-item__icon,
.violations-status--open,
.reports-source-badge--mock,
.violations-source-badge--mock,
.telemetry-badge.warn {
    color: var(--korovki-warning-text) !important;
    background-color: #FFF7DC !important;
}

.dashboard-warning-item--info .dashboard-warning-item__icon,
.reports-source-badge,
.violations-source-badge,
.reports-count-badge {
    color: var(--korovki-sidebar) !important;
    background-color: #EAF3E5 !important;
}

.map-action-dropdown__item:hover:not(:disabled),
.map-action-dropdown__item:focus-visible:not(:disabled),
.map-action-dropdown__item.is-active,
.map-view-switch__button.active,
.map-view-switch__button:hover,
.telemetry-switch__button:hover {
    color: var(--korovki-sidebar) !important;
    background-color: rgba(118, 186, 27, 0.14) !important;
}

.map-action-button:hover:not(:disabled),
.map-action-button:focus-visible:not(:disabled) {
    color: var(--korovki-sidebar) !important;
    border-color: rgba(118, 186, 27, 0.45) !important;
}

.map-action-button.is-active,
.telemetry-switch__button.active,
.digest-switch__input:checked + .digest-switch__control {
    color: var(--korovki-primary-text) !important;
    background: var(--korovki-primary) !important;
    border-color: var(--korovki-primary) !important;
}

.zone-entry-banner {
    background: var(--korovki-sidebar);
}

.zone-row.selected {
    background-color: #EAF3E5 !important;
}

.zones-separator-cell,
.dashboard-warning-empty,
.dashboard-mini-table thead th,
.digest-hero-stat,
.digest-state,
.telemetry-empty-state {
    background-color: #F1F6EF !important;
}

.password-toggle-button {
    color: var(--korovki-sidebar) !important;
}

.small.text-primary,
label.text-primary,
h6.text-primary {
    color: var(--korovki-sidebar) !important;
}

.sidebar-dark .sidebar-brand,
.sidebar-dark .sidebar-heading,
.sidebar-dark .nav-item .nav-link,
.sidebar-dark .nav-item .nav-link span {
    color: rgba(255, 255, 255, 0.88) !important;
}

.sidebar-dark .nav-item .nav-link:hover,
.sidebar-dark .nav-item .nav-link:focus,
.sidebar-dark .nav-item.active .nav-link,
.sidebar-dark .nav-item.active .nav-link span {
    color: #fff !important;
}

.sidebar-dark .nav-item .nav-link i {
    color: rgba(255, 255, 255, 0.72) !important;
}

.sidebar-dark .nav-item .nav-link:hover i,
.sidebar-dark .nav-item .nav-link:focus i,
.sidebar-dark .nav-item.active .nav-link i {
    color: var(--korovki-primary) !important;
}

/* Final Modern Agro-tech accent normalization */
.btn-link,
.admin-users-edit-button:hover:not(:disabled),
.admin-users-edit-button:focus-visible:not(:disabled),
.batch-ingredient-editor__cancel:hover:not(:disabled),
.batch-ingredient-editor__cancel:focus-visible:not(:disabled),
.reports-batch-link,
.page-link {
    color: var(--korovki-sidebar) !important;
}

.bg-primary,
.badge-primary,
.nav-pills .nav-link.active,
.nav-pills .show > .nav-link,
.list-group-item.active,
.dropdown-item.active,
.dropdown-item:active,
.progress-bar,
.batch-unloading-card__icon {
    color: var(--korovki-primary-text) !important;
    background-color: var(--korovki-primary) !important;
    border-color: var(--korovki-primary) !important;
}

.badge-success,
.bg-success {
    color: #24501F !important;
    background-color: #E5F4DD !important;
}

.badge-warning,
.bg-warning {
    color: var(--korovki-warning-text) !important;
    background-color: var(--korovki-warning) !important;
}

.badge-danger,
.bg-danger {
    color: #fff !important;
    background-color: var(--korovki-danger) !important;
}

.custom-control-input:checked ~ .custom-control-label::before,
.custom-checkbox .custom-control-input:checked ~ .custom-control-label::before,
.custom-radio .custom-control-input:checked ~ .custom-control-label::before {
    border-color: var(--korovki-primary) !important;
    background-color: var(--korovki-primary) !important;
}

.custom-control-input:focus ~ .custom-control-label::before {
    box-shadow: 0 0 0 0.2rem rgba(118, 186, 27, 0.22) !important;
}

.map-action-dropdown__item,
.map-action-button,
.map-view-switch__button,
.telemetry-switch__button {
    color: var(--korovki-text) !important;
}

.map-action-button.is-active,
.telemetry-switch__button.active {
    box-shadow: 0 12px 24px rgba(45, 90, 39, 0.18) !important;
}

.dashboard-warning-item--info {
    border-left-color: var(--korovki-sidebar-hover) !important;
}

.dashboard-warning-item--info .dashboard-warning-item__icon,
.reports-source-badge,
.violations-source-badge,
.reports-count-badge {
    color: var(--korovki-sidebar) !important;
    background-color: #EAF3E5 !important;
}

.batch-detail-stat__label,
.batch-edit-label,
.digest-hero-stat__label,
.digest-section-label,
.reports-toolbar-meta__label,
.reports-summary-card__label,
.violations-summary-card__label,
.dashboard-mini-table thead th,
.telemetry-table thead th,
.admin-users-table thead th {
    color: var(--korovki-sidebar) !important;
}

.violations-summary-card--progress,
.reports-summary-card--attention {
    border-left-color: var(--korovki-sidebar-hover) !important;
}

.reports-summary-card--primary,
.violations-summary-card {
    border-left-color: var(--korovki-primary) !important;
}

.reports-summary-card,
.violations-summary-card,
.dashboard-warning-item,
.batch-detail-stat--accent,
.batch-unloading-card,
.reports-toolbar-meta {
    background: linear-gradient(180deg, #FFFFFF 0%, #F8FAF7 100%) !important;
}

.reports-status--danger,
.violations-status--critical,
.dashboard-bool-badge.is-yes {
    color: #7B241C !important;
    background-color: #F9E3E0 !important;
}

.reports-status--success,
.violations-status--closed,
.dashboard-bool-badge.is-no {
    color: #24501F !important;
    background-color: #E5F4DD !important;
}

.violations-status--progress {
    color: var(--korovki-sidebar) !important;
    background-color: #EAF3E5 !important;
}
:root {
  --bg-page: #F7F8F6;
  --bg-surface: #FFFFFF;
  --bg-surface-soft: #F1F0EA;
  --bg-surface-warm: #F7F2E4;

  --dark-main: #080D0E;
  --dark-sidebar: #19262D;
  --dark-sidebar-2: #24394C;
  --dark-muted: #47525F;

  --text-main: #1A2730;
  --text-secondary: #47525F;
  --text-muted: #7A8188;
  --text-inverse: #FFFFFF;

  --border-soft: #DADDD8;
  --border-strong: #C5C9C2;
  --shadow-soft: 0 8px 24px rgba(8, 13, 14, 0.08);
  --shadow-card: 0 4px 14px rgba(8, 13, 14, 0.06);

  --accent-yellow: #D6B84A;
  --accent-yellow-hover: #C5A63A;
  --accent-yellow-soft: #F4EBC7;
  --accent-yellow-bg: #FBF6E3;

  --neutral-gray: #D2D2D2;
  --neutral-gray-dark: #8A8F93;

  --vehicle-owner: #3F6FAE;
  --vehicle-owner-soft: rgba(63, 111, 174, 0.18);

  --vehicle-loader-gps: #B65F55;
  --vehicle-loader-gps-soft: rgba(182, 95, 85, 0.18);

  --vehicle-loader-rtk: #5F8A6B;
  --vehicle-loader-rtk-soft: rgba(95, 138, 107, 0.18);

  --role-admin: #B65F55;
  --role-admin-bg: #F4E2DE;

  --role-director: #5F8A6B;
  --role-director-bg: #E3EEE5;

  --role-guest: #3F6FAE;
  --role-guest-bg: #E0E9F5;

  --zone-storage-fill: rgba(47, 159, 85, 0.36);
  --zone-storage-stroke: #18B35B;

  --zone-barn-fill: rgba(63, 111, 174, 0.34);
  --zone-barn-stroke: #3F6FAE;

  --zone-edit-fill: rgba(232, 185, 0, 0.40);
  --zone-edit-stroke: #F3C21D;

  --zone-inactive-fill: rgba(89, 97, 104, 0.28);
  --zone-inactive-stroke: #5E6770;

  --danger-main: #B65F55;
  --danger-hover: #A94F45;
  --danger-soft: #F4E2DE;
  --danger-bg: #FBF0EE;
  --danger-border: #D8A49D;

  --warning-main: #A9842B;
  --warning-bg: #FBF6E3;
  --warning-border: #D6B84A;
}

/* KOROVKI graphite and warm-yellow theme layer */
:root {
  --bg-page: #F7F8F6;
  --bg-surface: #FFFFFF;
  --bg-surface-soft: #F1F0EA;
  --bg-surface-warm: #F7F2E4;

  --dark-main: #080D0E;
  --dark-sidebar: #19262D;
  --dark-sidebar-2: #24394C;
  --dark-muted: #47525F;

  --text-main: #1A2730;
  --text-secondary: #47525F;
  --text-muted: #7A8188;
  --text-inverse: #FFFFFF;

  --border-soft: #DADDD8;
  --border-strong: #C5C9C2;
  --shadow-soft: 0 8px 24px rgba(8, 13, 14, 0.08);
  --shadow-card: 0 4px 14px rgba(8, 13, 14, 0.06);

  --accent-yellow: #D6B84A;
  --accent-yellow-hover: #C5A63A;
  --accent-yellow-soft: #F4EBC7;
  --accent-yellow-bg: #FBF6E3;

  --neutral-gray: #D2D2D2;
  --neutral-gray-dark: #8A8F93;

  --vehicle-owner: #3F6FAE;
  --vehicle-owner-soft: rgba(63, 111, 174, 0.18);

  --vehicle-loader-gps: #B65F55;
  --vehicle-loader-gps-soft: rgba(182, 95, 85, 0.18);

  --vehicle-loader-rtk: #5F8A6B;
  --vehicle-loader-rtk-soft: rgba(95, 138, 107, 0.18);

  --role-admin: #B65F55;
  --role-admin-bg: #F4E2DE;

  --role-director: #5F8A6B;
  --role-director-bg: #E3EEE5;

  --role-guest: #3F6FAE;
  --role-guest-bg: #E0E9F5;

  --zone-storage-fill: rgba(47, 159, 85, 0.36);
  --zone-storage-stroke: #18B35B;

  --zone-barn-fill: rgba(63, 111, 174, 0.34);
  --zone-barn-stroke: #3F6FAE;

  --zone-edit-fill: rgba(232, 185, 0, 0.40);
  --zone-edit-stroke: #F3C21D;

  --zone-inactive-fill: rgba(89, 97, 104, 0.28);
  --zone-inactive-stroke: #5E6770;

  --danger-main: #B65F55;
  --danger-hover: #A94F45;
  --danger-soft: #F4E2DE;
  --danger-bg: #FBF0EE;
  --danger-border: #D8A49D;

  --warning-main: #A9842B;
  --warning-bg: #FBF6E3;
  --warning-border: #D6B84A;

  --korovki-sidebar: var(--dark-sidebar);
  --korovki-sidebar-hover: var(--dark-sidebar-2);
  --korovki-primary: var(--accent-yellow);
  --korovki-primary-hover: var(--accent-yellow-hover);
  --korovki-background: var(--bg-page);
  --korovki-text: var(--text-main);
  --korovki-muted: var(--text-muted);
  --korovki-border: var(--border-soft);
  --korovki-danger: var(--danger-main);
  --korovki-danger-hover: var(--danger-hover);
  --korovki-warning: var(--warning-border);
  --korovki-warning-text: var(--warning-main);
  --korovki-card: var(--bg-surface);
  --korovki-primary-text: var(--dark-main);
}

body,
#wrapper #content-wrapper,
#content,
.container-fluid {
  background: var(--bg-page) !important;
  color: var(--text-main) !important;
}

body.bg-gradient-primary {
  background: linear-gradient(135deg, #080D0E 0%, #19262D 45%, #24394C 100%) !important;
}

.text-gray-900,
.text-gray-800,
.page-title,
h1, h2, h3, h4, h5, h6 {
  color: var(--text-main) !important;
  font-weight: 700 !important;
}

.text-muted,
.small,
small,
.text-gray-600,
.text-gray-500 {
  color: var(--text-muted) !important;
}

a,
.btn-link,
.page-link,
.reports-batch-link,
.batch-ingredient-editor__trigger {
  color: var(--dark-sidebar-2) !important;
}

a:hover,
a:focus,
.btn-link:hover,
.btn-link:focus,
.page-link:hover,
.reports-batch-link:hover,
.reports-batch-link:focus,
.batch-ingredient-editor__trigger:hover:not(:disabled),
.batch-ingredient-editor__trigger:focus-visible:not(:disabled) {
  color: var(--accent-yellow-hover) !important;
}

.topbar,
.navbar.topbar,
.sticky-footer.bg-white,
.bg-white {
  background: var(--bg-surface) !important;
}

.topbar {
  border-bottom: 1px solid var(--border-soft) !important;
  box-shadow: 0 4px 16px rgba(8, 13, 14, 0.05) !important;
}

.sidebar.bg-gradient-primary,
ul.sidebar.bg-gradient-primary,
.sidebar-dark.bg-gradient-primary {
  background-color: var(--dark-sidebar) !important;
  background-image: linear-gradient(180deg, #19262D 0%, #24394C 100%) !important;
}

.sidebar-dark .sidebar-brand,
.sidebar-dark .sidebar-brand .sidebar-brand-text,
.sidebar-dark .sidebar-heading,
.sidebar-dark .nav-item .nav-link,
.sidebar-dark .nav-item .nav-link span {
  color: rgba(255, 255, 255, 0.82) !important;
}

.sidebar-dark .sidebar-brand,
.sidebar-dark .sidebar-brand .sidebar-brand-text {
  color: var(--text-inverse) !important;
}

.sidebar-dark .nav-item .nav-link {
  position: relative;
  border-radius: 0;
}

.sidebar-dark .nav-item .nav-link i {
  color: rgba(255, 255, 255, 0.7) !important;
}

.sidebar-dark .nav-item .nav-link:hover,
.sidebar-dark .nav-item .nav-link:focus {
  background: rgba(255, 255, 255, 0.08) !important;
  color: var(--text-inverse) !important;
}

.sidebar-dark .nav-item .nav-link:hover i,
.sidebar-dark .nav-item .nav-link:focus i {
  color: rgba(255, 255, 255, 0.92) !important;
}

.sidebar-dark .nav-item.active .nav-link {
  background: rgba(214, 184, 74, 0.18) !important;
  color: var(--text-inverse) !important;
}

.sidebar-dark .nav-item.active .nav-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35rem;
  bottom: 0.35rem;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--accent-yellow);
}

.sidebar-dark .nav-item.active .nav-link i {
  color: var(--accent-yellow) !important;
}

.sidebar-dark hr.sidebar-divider {
  border-top-color: rgba(255, 255, 255, 0.14) !important;
}

.sidebar-dark #sidebarToggle {
  background: rgba(255, 255, 255, 0.14) !important;
}

.sidebar-dark #sidebarToggle:hover {
  background: rgba(214, 184, 74, 0.28) !important;
}

.card,
.modal-content,
.dropdown-menu,
.map-card,
.panel-card,
.table-card,
.digest-hero-card,
.digest-toggle-card,
.digest-preview-block,
.batch-detail-stat,
.batch-unloading-card,
.reports-toolbar-meta,
.reports-summary-card,
.violations-summary-card,
.dashboard-warning-item,
.status-box {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border-soft) !important;
  border-radius: 12px !important;
  box-shadow: var(--shadow-card) !important;
}

.card-header,
.card-header-custom,
.modal-header,
.modal-footer {
  background: var(--bg-surface-warm) !important;
  color: var(--text-main) !important;
  border-color: var(--border-soft) !important;
}

.card-header .text-primary,
.card-header h6,
.card-header .m-0,
.form-section-title,
.batch-detail-stat__label,
.batch-edit-label,
.digest-hero-stat__label,
.digest-section-label,
.reports-toolbar-meta__label,
.reports-summary-card__label,
.violations-summary-card__label {
  color: var(--text-main) !important;
}

.border-left-primary,
.reports-summary-card--primary,
.violations-summary-card {
  border-left-color: var(--accent-yellow) !important;
}

.border-left-success,
.reports-summary-card--success,
.violations-summary-card--closed {
  border-left-color: var(--vehicle-loader-rtk) !important;
}

.border-left-info,
.reports-summary-card--attention,
.violations-summary-card--progress {
  border-left-color: var(--vehicle-owner) !important;
}

.border-left-warning,
.reports-summary-card--warning,
.dashboard-warning-item--warning {
  border-left-color: var(--warning-border) !important;
}

.border-left-danger,
.reports-summary-card--danger,
.violations-summary-card--critical,
.dashboard-warning-item--danger {
  border-left-color: var(--danger-main) !important;
}

.btn,
.form-control,
.custom-select,
.input-group-text {
  border-radius: 8px !important;
}

.btn-primary,
.btn-success,
.btn-warning,
.page-item.active .page-link,
.pagination .active > .page-link,
.dataTables_wrapper .pagination .page-item.active .page-link,
.nav-pills .nav-link.active,
.nav-pills .show > .nav-link,
.list-group-item.active,
.dropdown-item.active,
.dropdown-item:active,
.progress-bar,
.batch-unloading-card__icon {
  color: var(--dark-main) !important;
  background-color: var(--accent-yellow) !important;
  border-color: var(--accent-yellow) !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:not(:disabled):not(.disabled):active,
.btn-success:hover,
.btn-success:focus,
.btn-success:not(:disabled):not(.disabled):active,
.btn-warning:hover,
.btn-warning:focus,
.show > .btn-primary.dropdown-toggle,
.show > .btn-success.dropdown-toggle {
  color: var(--dark-main) !important;
  background-color: var(--accent-yellow-hover) !important;
  border-color: var(--accent-yellow-hover) !important;
}

.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-success,
.btn-secondary,
.btn-light.border,
.map-action-button,
.map-view-switch__button,
.map-action-dropdown__item,
.telemetry-switch__button {
  color: var(--text-main) !important;
  background: var(--bg-surface) !important;
  border-color: var(--border-strong) !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:not(:disabled):not(.disabled):active,
.btn-outline-secondary:hover,
.btn-outline-secondary:focus,
.btn-outline-secondary:not(:disabled):not(.disabled):active,
.btn-outline-success:hover,
.btn-outline-success:focus,
.btn-outline-success:not(:disabled):not(.disabled):active,
.btn-secondary:hover,
.btn-secondary:focus,
.map-action-button:hover:not(:disabled),
.map-action-button:focus-visible:not(:disabled),
.map-view-switch__button:hover,
.map-action-dropdown__item:hover:not(:disabled),
.map-action-dropdown__item:focus-visible:not(:disabled),
.telemetry-switch__button:hover {
  color: var(--dark-main) !important;
  background: var(--accent-yellow-bg) !important;
  border-color: var(--accent-yellow) !important;
}

.map-action-button.is-active,
.map-view-switch__button.active,
.map-action-dropdown__item.is-active,
.telemetry-switch__button.active,
.digest-switch__input:checked + .digest-switch__control {
  color: var(--dark-main) !important;
  background: var(--accent-yellow) !important;
  border-color: var(--accent-yellow) !important;
  box-shadow: 0 10px 20px rgba(214, 184, 74, 0.22) !important;
}

.btn-danger,
.btn-outline-danger,
.btn-soft-danger,
.admin-users-delete-button {
  color: var(--danger-main) !important;
  background: var(--bg-surface) !important;
  border-color: var(--danger-main) !important;
}

.btn-danger:hover,
.btn-danger:focus,
.btn-danger:not(:disabled):not(.disabled):active,
.btn-outline-danger:hover,
.btn-outline-danger:focus,
.btn-outline-danger:not(:disabled):not(.disabled):active,
.btn-soft-danger:hover,
.btn-soft-danger:focus,
.admin-users-delete-button:hover:not(:disabled),
.admin-users-delete-button:focus-visible:not(:disabled) {
  color: var(--text-inverse) !important;
  background: var(--danger-main) !important;
  border-color: var(--danger-main) !important;
}

.btn:focus,
.btn.focus,
.form-control:focus,
.custom-select:focus,
.custom-control-input:focus ~ .custom-control-label::before,
.map-view-switch__button:focus {
  border-color: var(--accent-yellow) !important;
  box-shadow: 0 0 0 3px rgba(214, 184, 74, 0.22) !important;
  outline: none !important;
}

.form-control,
.custom-select,
textarea.form-control,
.input-group-text {
  color: var(--text-main) !important;
  background: var(--bg-surface) !important;
  border-color: var(--border-soft) !important;
}

.form-control::placeholder {
  color: var(--text-muted) !important;
}

.custom-control-input:checked ~ .custom-control-label::before,
.custom-checkbox .custom-control-input:checked ~ .custom-control-label::before,
.custom-radio .custom-control-input:checked ~ .custom-control-label::before {
  border-color: var(--accent-yellow) !important;
  background-color: var(--accent-yellow) !important;
}

.table,
.table td,
.table th,
.table-bordered,
.table-bordered td,
.table-bordered th,
.dashboard-mini-table-wrap,
.admin-users-table-wrap {
  border-color: var(--border-soft) !important;
}

.table thead th,
.dashboard-mini-table thead th,
.telemetry-table thead th,
.admin-users-table thead th {
  color: var(--text-main) !important;
  background: var(--bg-surface-warm) !important;
  border-color: var(--border-soft) !important;
}

.table td,
.table tbody td,
.dashboard-mini-table td,
.telemetry-table td,
.admin-users-table td {
  color: var(--text-secondary) !important;
  background: var(--bg-surface) !important;
}

.table-hover tbody tr:hover,
.table tbody tr:hover,
.batch-table-row:hover,
.batch-table-row:focus,
.admin-users-table tbody tr:hover {
  background: var(--accent-yellow-bg) !important;
  box-shadow: inset 0 0 0 1px rgba(214, 184, 74, 0.18) !important;
}

.table-hover tbody tr:hover td,
.table tbody tr:hover td,
.batch-table-row:hover td,
.admin-users-table tbody tr:hover td {
  background: var(--accent-yellow-bg) !important;
}

.dashboard-status-pill,
.dashboard-mode-badge,
.dashboard-bool-badge,
.reports-status,
.violations-status,
.telemetry-badge,
.badge-soft,
.reports-source-badge,
.violations-source-badge,
.reports-count-badge,
.app-auth-account__role-badge {
  border-radius: 999px !important;
  border: 0 !important;
}

.dashboard-status-pill.online,
.telemetry-badge.ok,
.alert-success,
.badge-success,
.bg-success,
.reports-status--success,
.violations-status--closed,
.dashboard-bool-badge.is-no {
  color: #3F6D4C !important;
  background: #E3EEE5 !important;
}

.dashboard-status-pill.offline,
.telemetry-badge.offline,
.badge-soft.inactive,
.dashboard-mode-badge--idle,
.dashboard-mode-badge--unknown {
  color: #6F777C !important;
  background: #ECEDEF !important;
}

.dashboard-mode-badge--loading,
.dashboard-mode-badge--unloading,
.violations-status--open,
.violations-status--progress,
.telemetry-badge.warn,
.reports-source-badge--mock,
.violations-source-badge--mock,
.badge-warning,
.bg-warning {
  color: #6F5517 !important;
  background: var(--accent-yellow-soft) !important;
}

.alert-danger,
.alert-error,
.badge-danger,
.bg-danger,
.reports-status--danger,
.violations-status--critical,
.dashboard-bool-badge.is-yes,
.batch-edit-state--danger,
.dashboard-inline-state--danger,
.badge-soft.inactive.danger {
  color: var(--danger-main) !important;
  background: var(--danger-bg) !important;
  border-color: var(--danger-border) !important;
}

.alert-warning,
.batch-edit-state--warning,
.dashboard-inline-state--warning,
.digest-readonly-banner {
  color: var(--warning-main) !important;
  background: var(--warning-bg) !important;
  border-color: var(--warning-border) !important;
}

.alert-info,
.batch-edit-state--info,
.dashboard-inline-state--info,
.reports-source-badge,
.violations-source-badge {
  color: var(--vehicle-owner) !important;
  background: var(--role-guest-bg) !important;
  border-color: rgba(63, 111, 174, 0.28) !important;
}

.dashboard-warning-item {
  background: var(--bg-surface) !important;
}

.dashboard-warning-item--danger {
  background: var(--danger-bg) !important;
  border-color: var(--danger-border) !important;
  border-left-color: var(--danger-main) !important;
}

.dashboard-warning-item--danger .dashboard-warning-item__icon {
  color: var(--danger-main) !important;
  background: var(--danger-soft) !important;
}

.dashboard-warning-item--warning {
  background: var(--warning-bg) !important;
  border-color: var(--warning-border) !important;
  border-left-color: var(--warning-main) !important;
}

.dashboard-warning-item--warning .dashboard-warning-item__icon {
  color: var(--warning-main) !important;
  background: var(--accent-yellow-soft) !important;
}

.dashboard-warning-item--info {
  border-left-color: var(--vehicle-owner) !important;
}

.dashboard-warning-item--info .dashboard-warning-item__icon {
  color: var(--vehicle-owner) !important;
  background: var(--vehicle-owner-soft) !important;
}

.app-auth-account__name {
  color: var(--text-main) !important;
}

.app-auth-account__role {
  color: var(--text-muted) !important;
}

.app-auth-account__role-badge--admin {
  color: var(--role-admin) !important;
  background: var(--role-admin-bg) !important;
}

.app-auth-account__role-badge--director {
  color: var(--role-director) !important;
  background: var(--role-director-bg) !important;
}

.app-auth-account__role-badge--guest {
  color: var(--role-guest) !important;
  background: var(--role-guest-bg) !important;
}

.map-view-switch,
.map-action-dropdown,
.map-marker-legend,
.map-telemetry-chip {
  background: rgba(255, 255, 255, 0.96) !important;
  border-color: var(--border-soft) !important;
  box-shadow: var(--shadow-soft) !important;
  color: var(--text-secondary) !important;
}

.map-telemetry-chip__label,
.dashboard-section-meta,
.dashboard-warning-item__message,
.batch-edit-hint,
.batch-edit-meta,
.digest-preview-block__label,
.reports-cell-secondary,
.violations-cell-secondary {
  color: var(--text-muted) !important;
}

.map-telemetry-chip__value,
.dashboard-status-value,
.dashboard-warning-item__title,
.batch-detail-stat__value,
.reports-cell-primary,
.violations-cell-primary,
.reports-summary-card__value,
.violations-summary-card__value {
  color: var(--text-main) !important;
}

.map-telemetry-chip--fixed {
  border-left-color: var(--vehicle-loader-rtk) !important;
}

.map-telemetry-chip--float {
  border-left-color: var(--vehicle-loader-gps) !important;
}

.map-telemetry-chip--poor {
  border-left-color: var(--danger-main) !important;
}

.map-telemetry-chip--stale,
.map-telemetry-chip--unknown {
  border-left-color: var(--neutral-gray-dark) !important;
}

.map-marker-legend__dot--host {
  background: var(--vehicle-owner) !important;
}

.map-marker-legend__dot--rtk {
  background: linear-gradient(90deg, var(--vehicle-loader-gps) 0 50%, var(--vehicle-loader-rtk) 50% 100%) !important;
}

.zone-entry-banner {
  background: var(--vehicle-loader-rtk) !important;
  color: var(--text-inverse) !important;
  box-shadow: var(--shadow-soft) !important;
}

.zone-row.selected {
  background: var(--accent-yellow-bg) !important;
}

.zones-separator-cell,
.dashboard-warning-empty,
.digest-hero-stat,
.digest-state,
.telemetry-empty-state {
  background: var(--bg-surface-soft) !important;
  color: var(--text-muted) !important;
}

.dashboard-progress-track,
.progress {
  background: #ECEDEF !important;
}

.dashboard-progress-bar {
  background: linear-gradient(90deg, var(--accent-yellow) 0%, var(--accent-yellow-hover) 100%) !important;
}

.dashboard-progress-bar.is-over {
  background: linear-gradient(90deg, var(--warning-main) 0%, var(--danger-main) 100%) !important;
}

.admin-panel-tabs {
  border-bottom-color: var(--border-soft) !important;
}

.admin-panel-tabs .nav-link {
  color: var(--text-secondary) !important;
  border-color: transparent !important;
}

.admin-panel-tabs .nav-link.active {
  color: var(--text-main) !important;
  background: var(--bg-surface) !important;
  border-color: var(--border-soft) var(--border-soft) var(--bg-surface) !important;
}

.reports-number--positive {
  color: var(--vehicle-loader-rtk) !important;
}

.reports-number--negative,
.text-danger {
  color: var(--danger-main) !important;
}

.text-success {
  color: var(--vehicle-loader-rtk) !important;
}

.border-success {
  border-color: var(--vehicle-loader-rtk) !important;
}

.text-warning {
  color: var(--warning-main) !important;
}

.text-primary,
.small.text-primary,
label.text-primary,
h6.text-primary {
  color: var(--dark-sidebar-2) !important;
}

.bg-primary,
.badge-primary {
  color: var(--dark-main) !important;
  background: var(--accent-yellow) !important;
}

.login-card,
body.bg-gradient-primary .card {
  background: var(--bg-surface) !important;
  border-radius: 18px !important;
  box-shadow: 0 22px 60px rgba(8, 13, 14, 0.28) !important;
}

body.bg-gradient-primary .bg-login-image,
body.bg-gradient-primary .bg-password-image {
  background-color: var(--dark-sidebar) !important;
}

body.bg-gradient-primary .bg-login-image {
  position: relative;
  min-height: 31rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 42%, rgba(214, 184, 74, 0.12) 0, rgba(214, 184, 74, 0) 34%),
    linear-gradient(135deg, #080D0E 0%, #19262D 55%, #24394C 100%) !important;
}

body.bg-gradient-primary .bg-login-image::before {
  content: "";
  position: absolute;
  inset: 1.25rem;
  border: 1px solid rgba(214, 184, 74, 0.12);
  border-radius: 16px;
  pointer-events: none;
}

body.bg-gradient-primary .bg-login-image::after {
  content: "";
  position: absolute;
  width: 14rem;
  height: 14rem;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  background: rgba(214, 184, 74, 0.08);
  filter: blur(42px);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

@media (min-width: 992px) {
  body.bg-gradient-primary .bg-login-image {
    display: flex !important;
    align-items: center;
    justify-content: center;
  }
}

.login-brand {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: inherit;
  padding: 3rem;
  text-align: center;
}

.login-brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 5.5rem;
  height: 5.5rem;
  margin-bottom: 1.35rem;
  border: 1px solid rgba(214, 184, 74, 0.28);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 18px 42px rgba(8, 13, 14, 0.28), 0 0 0 8px rgba(214, 184, 74, 0.06);
}

.login-brand-logo img {
  display: block;
  width: 3rem;
  height: 3rem;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(77%) sepia(31%) saturate(761%) hue-rotate(6deg) brightness(91%) contrast(90%);
}

.login-brand-title {
  color: #FFFFFF;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.16em;
}

.login-brand-title::after {
  content: "";
  display: block;
  width: 3.25rem;
  height: 2px;
  margin: 1rem auto 0;
  border-radius: 999px;
  background: #D6B84A;
}

.login-brand-subtitle {
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.45;
}

body.bg-gradient-primary .password-toggle-button {
  color: var(--dark-sidebar-2) !important;
}

body.bg-gradient-primary [data-page-alerts] .alert,
body.bg-gradient-primary .alert-danger {
  color: var(--danger-main) !important;
  background: var(--danger-bg) !important;
  border-color: var(--danger-border) !important;
}
