body {
    font-family: Arial, sans-serif;
    margin: 0 20px 20px;
    padding-top: 149px;
}

.app-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #f7f2ff;
    padding: 10px 20px 12px;
    z-index: 1000;
    border-bottom: 1px solid #e8e8e8;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}


.app-nav__stripe-divider {
    display: block;
    width: calc(100% + 40px);
    margin: 0 -20px -12px;
    height: 3mm;
    background: linear-gradient(
        to bottom,
        #c8ab95 0,
        #c8ab95 1mm,
        #efb6cd 1mm,
        #efb6cd 2mm,
        #b4c2f1 2mm,
        #b4c2f1 3mm
    );
}

.app-nav a {
    color: #1f2937;
    text-decoration: none;
}

.app-nav__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.app-nav__brand-row,
.app-nav__user-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.app-nav__brand {
    font-weight: 700;
    margin-right: 8px;
}

.app-nav__quick {
    font-size: 0.9rem;
    padding: 4px 8px;
    border-radius: 999px;
    background: #f4f5f7;
}

.app-nav__quick:hover {
    background: #ebedf0;
}

.app-nav__favorites {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.app-nav__favorites-empty {
    font-size: 0.8rem;
    color: #6b7280;
}

.app-nav__user-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    color: #4b5563;
}

.app-nav__company-form select {
    padding: 4px 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
}

.app-nav__groups {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.nav-group {
    position: relative;
    border: 1px solid #d8dee5;
    border-radius: 8px;
    background: #fafbfc;
}

.nav-group[open],
.nav-group:hover {
    background: #fff;
}

.nav-group.is-active {
    border-color: #8cb3ff;
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.2);
}

.nav-group > summary {
    list-style: none;
    cursor: pointer;
    padding: 6px 10px;
    font-weight: 600;
    color: #111827;
}

.nav-group > summary::-webkit-details-marker {
    display: none;
}

.nav-group__links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 260px;
    flex-direction: column;
    gap: 2px;
    padding: 8px;
    border: 1px solid #d8dee5;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.10);
    z-index: 1100;
}

.nav-group[open] .nav-group__links {
    display: flex;
}

.nav-link-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-radius: 6px;
    background: #f3f4f6;
    padding: 2px 6px;
}

.nav-link-row > a {
    flex: 1;
    padding: 4px 6px;
    border-radius: 6px;
    font-size: 0.9rem;
}

.nav-link-row:hover {
    background: #e5e7eb;
}

.nav-favorite {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1rem;
    color: #9ca3af;
    padding: 2px 4px;
}

.nav-favorite.is-favorite {
    color: #f59e0b;
}

a.is-active {
    background: #dbeafe !important;
    color: #1d4ed8 !important;
    font-weight: 600;
}

@media (max-width: 1200px) {
    body {
        padding-top: 189px;
    }

    .nav-group {
        width: 100%;
    }

    .nav-group__links {
        position: static;
        min-width: 0;
        box-shadow: none;
        margin-top: 0;
    }
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.welcome-title {
    font-size: 3em;
    margin-top: 0;
}
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1em; }
.add-btn { padding: 4px 8px; background-color: #4CAF50; color: white; text-decoration: none; border-radius: 4px; }
.header-actions { display: flex; gap: 6px; }
.save-btn {
    padding: 4px 8px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 10px;
    text-decoration: none;
    display: inline-block;
}
.leaflet-tooltip.region-label {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    font-size: 10px;
    font-weight: bold;
}

/* Excel-like DataTables styling */
table.dataTable {
    border-collapse: collapse;
    width: 100%;
    font-family: "Calibri", Arial, sans-serif;
}
table.dataTable th,
table.dataTable td {
    border: 1px solid #d0d0d0;
    padding: 2px 4px;
}
table.dataTable thead th {
    background-color: #f2f2f2;
    font-weight: bold;
}
table.dataTable tbody tr:nth-child(even) {
    background-color: #fafafa;
}
table.dataTable tbody tr:hover {
    background-color: #e8f0fe;
}

table.dataTable td.pk-vieta,
table.dataTable td.ik-vieta {
    padding: 0;
    position: relative;
}

table.dataTable td.status-load-cell,
table.dataTable td.status-unload-cell {
    padding: 0;
}

.location-cell {
    --location-cell-padding-block: 4px;
    --location-cell-padding-inline: 8px;
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: var(--location-cell-padding-block) var(--location-cell-padding-inline);
    border-radius: 0;
    line-height: 1.35;
    color: #1f1f1f;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.location-cell::before {
    content: '';
    position: absolute;
    top: calc(-1 * var(--location-cell-padding-block));
    right: calc(-1 * var(--location-cell-padding-inline));
    bottom: calc(-1 * var(--location-cell-padding-block));
    left: calc(-1 * var(--location-cell-padding-inline));
    background-position: center;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    opacity: 0.24;
    pointer-events: none;
    z-index: 0;
}

.location-cell .location-text {
    position: relative;
    z-index: 1;
    word-break: break-word;
    font-weight: 600;
    font-size: 1.1em;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    border: 1px solid #d0d0d0;
    padding: 2px 4px;
    font-family: "Calibri", Arial, sans-serif;
}

#map-container {
    overflow: hidden;
    position: relative;
}

#map-image {
    user-select: none;
    cursor: zoom-in;
    display: block;
    margin: 0 auto;
}

.save-row {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 2px 6px;
    border-radius: 4px;
    cursor: pointer;
}

.task-status-log {
    margin: 16px 0;
    padding: 12px;
    border: 1px solid #dcdcdc;
    border-radius: 6px;
    background: #fafafa;
}

.task-status-log__list {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
}

.task-status-log__item {
    padding: 6px 0;
    border-top: 1px solid #e4e4e4;
    line-height: 1.5;
}

.task-status-log__item:first-child {
    border-top: none;
}

.task-status-log__label {
    font-weight: 600;
}

.task-status-log__row {
    display: grid;
    grid-template-columns: minmax(160px, 2fr) minmax(180px, 1.4fr) minmax(200px, 1.6fr);
    gap: 12px;
    align-items: baseline;
    color: #444;
}

.routes-layout {
    display: grid;
    grid-template-columns: minmax(360px, 1fr) minmax(320px, 0.9fr);
    gap: 16px;
    align-items: start;
}

.route-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
    margin-bottom: 12px;
}

.route-detail {
    border: 1px solid #e6e6e6;
    border-radius: 12px;
    padding: 16px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
    min-height: 320px;
}

.route-detail__header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.route-detail__title {
    margin: 4px 0;
}

.route-detail__meta {
    color: #666;
    margin: 0;
}

.route-detail__eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 12px;
    color: #777;
    margin: 0;
}

.route-detail__close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    color: #999;
    transition: color 0.2s ease;
}

.route-detail__close:hover {
    color: #333;
}

.route-detail__content {
    margin-top: 12px;
    transform: translateY(8px);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.route-detail.is-visible .route-detail__content {
    transform: translateY(0);
    opacity: 1;
}

.route-summary {
    border: 1px solid #f1f1f1;
    border-radius: 10px;
    padding: 12px;
    background: #fafbff;
    margin-bottom: 12px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.summary-label {
    margin: 0;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #777;
}

.summary-value {
    margin: 4px 0 0;
    font-weight: 700;
    font-size: 18px;
}

.route-shipments {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.route-empty {
    margin: 0;
    color: #666;
}

.shipment-group {
    border: 1px solid #d9dee8;
    border-radius: 4px;
    padding: 7px 8px;
    background: #fff;
    box-shadow: none;
}

.shipment-group--loaded {
    background: #dcfce7;
    border-color: #4ade80;
    border-left: 4px solid #15803d;
}

.shipment-group--empty {
    background: #f8fafc;
    border-color: #cbd5e1;
    border-left: 4px solid #64748b;
}

.shipment-group h3 {
    margin: 0 0 4px;
    font-size: 13px;
}

.shipment-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
}

.shipment-list__item {
    border: 1px solid #eaeaea;
    border-radius: 8px;
    padding: 8px;
    background: linear-gradient(180deg, #fdfdfd 0%, #fafafa 100%);
}

.shipment-list__row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 4px;
}

.shipment-list__label {
    color: #777;
}

.shipment-list__value {
    font-weight: 700;
}

.shipment-list__meta {
    display: flex;
    gap: 6px;
    align-items: center;
    color: #555;
    font-size: 13px;
}

.shipment-list__explain {
    margin-top: 6px;
}

.shipment-list__explain > summary {
    cursor: pointer;
    color: #1d4ed8;
    font-weight: 600;
}


.shipment-empty__line--tip {
    position: relative;
    cursor: help;
}

.shipment-empty__line--tip::after {
    content: attr(data-tip);
    position: absolute;
    left: 0;
    top: calc(100% + 8px);
    white-space: pre-line;
    background: #0f172a;
    color: #fff;
    border-radius: 8px;
    padding: 8px 10px;
    min-width: 280px;
    max-width: 420px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(4px);
    transition: opacity 0.2s ease 0.35s, transform 0.2s ease 0.35s;
    z-index: 5;
}

.shipment-empty__line--tip:hover::after {
    opacity: 1;
    transform: translateY(0);
}

.shipment-group__head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 8px;
}

.shipment-group__head h3 {
    margin: 0;
}

.shipment-group__profit {
    font-weight: 700;
    color: #1d4ed8;
}

.shipment-group__caption {
    margin: 0 0 6px;
    font-size: 12px;
    color: #64748b;
}

.shipment-list--compact {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.shipment-list__item--compact {
    padding: 4px 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    border-radius: 4px;
}

.shipment-list__compact-email {
    color: #0f172a;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shipment-list__compact-client {
    font-weight: 700;
}

.shipment-list__compact-price {
    font-weight: 600;
    font-size: 12px;
    white-space: nowrap;
}

.route-rank-badge {
    display: inline-block;
    margin-right: 8px;
    padding: 1px 6px;
    border-radius: 10px;
    background: #eef2f7;
    color: #1e293b;
    font-weight: 700;
    font-size: 11px;
}

.route-rank-badge--variant {
    background: #0b4e8a;
    color: #ffffff;
}

.route-variant-input-label {
    display: inline-block;
    margin-right: 8px;
    font-size: 11px;
    font-weight: 700;
    color: #0f3b67;
}

.shipment-empty__line {
    margin: 0;
    font-size: 12px;
    color: #334155;
}

.route-map {
    margin-top: 12px;
    height: 360px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #eaeaea;
}

.route-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.route-card {
    border: 1px solid #d9dee8;
    border-radius: 4px;
    background: #fff;
    padding: 7px 8px;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.route-list__item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.route-card__line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.route-card__line--main {
    align-items: flex-start;
    justify-content: flex-start;
}

.route-card__line--sub {
    justify-content: flex-start;
    gap: 6px;
    flex-wrap: wrap;
    color: #4b5563;
    font-size: 12px;
}

.route-card__meta-item strong {
    font-weight: 700;
}

.route-card__meta-dot {
    opacity: 0.55;
}

.route-card__path {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    font-size: 13px;
}


.route-segment {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.route-segment--loaded {
    color: #1f2937;
}

.route-segment--empty {
    color: #7c2d12;
    background: #fff7ed;
    border: 1px dashed #fdba74;
    border-radius: 999px;
    padding: 1px 8px;
}

.route-segment__tag {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
}

.route-segment__dash {
    opacity: 0.55;
}

.route-segment__sep {
    display: inline-block;
    width: 14px;
}

.route-segment__sep--wide {
    width: 16px;
}

.route-flag {
    width: 16px;
    height: 12px;
    display: inline-flex;
    align-items: center;
}

.route-flag img {
    width: 16px;
    height: 12px;
    object-fit: cover;
    border: 1px solid #d1d5db;
}

.route-card__detail {
    display: none;
}

.route-card__detail.is-visible {
    display: block;
}

.route-card:hover {
    transform: none;
    box-shadow: none;
    background: #f8fafc;
    border-color: #c7d0de;
}

.route-card.is-active {
    border-color: #93a1b8;
    box-shadow: none;
    background: #f4f7fb;
}

.route-card__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.route-card__pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4652d9;
    font-weight: 700;
    font-size: 13px;
}

.route-card__metric {
    font-size: 18px;
    font-weight: 700;
}

.route-card__label {
    color: #666;
    font-size: 13px;
}

.route-card__value {
    font-weight: 700;
}

.route-card__footer {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
}

@media (max-width: 960px) {
    .routes-layout {
        grid-template-columns: 1fr;
    }

    .route-list {
        order: -1;
    }
}

.task-status-log__cell {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    min-height: 20px;
}

.task-status-log__cell--main {
    color: #222;
    flex-wrap: wrap;
}

.task-status-log__cell--time {
    justify-content: flex-start;
    white-space: nowrap;
}

.task-status-log__time-label {
    font-weight: 600;
    font-size: 0.9em;
}

.task-status-log__time-value {
    font-variant-numeric: tabular-nums;
}

.task-status-log__time-value--late {
    color: #c62828;
    font-weight: 600;
}

.task-status-log__location {
    color: #666;
    font-size: 0.9em;
}

.task-status-log__placeholder {
    color: #bbb;
}

@media (max-width: 900px) {
    .task-status-log__row {
        grid-template-columns: minmax(160px, 1fr);
        grid-auto-rows: auto;
        row-gap: 6px;
    }

    .task-status-log__cell--time {
        white-space: normal;
        flex-wrap: wrap;
    }

    .task-status-log__cell:nth-of-type(2),
    .task-status-log__cell:nth-of-type(3) {
        grid-column: 1 / -1;
    }
}

.status-timestamp-modal[hidden] {
    display: none;
}

.status-timestamp-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.status-timestamp-modal--anchored {
    align-items: flex-start;
    justify-content: flex-start;
}

.status-timestamp-modal__panel {
    background: #fff;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    min-width: 260px;
    max-width: 90vw;
}

.status-timestamp-modal--anchored .status-timestamp-modal__panel {
    position: fixed;
}

.status-timestamp-modal__title {
    margin: 0 0 12px;
    font-size: 1.05rem;
}

.status-timestamp-modal__fields {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.status-timestamp-modal__fields label {
    display: flex;
    flex-direction: column;
    font-size: 0.95rem;
    gap: 4px;
}

.status-timestamp-modal__fields input[type="date"],
.status-timestamp-modal__fields input[type="time"] {
    padding: 4px 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.95rem;
}

.status-timestamp-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 16px;
}

.status-timestamp-modal__actions button {
    padding: 10px 22px;
    border-radius: 6px;
    border: 1px solid #4CAF50;
    background: #4CAF50;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 600;
    min-width: 118px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(76, 175, 80, 0.25);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.status-timestamp-modal__actions button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(76, 175, 80, 0.3);
}

.status-timestamp-modal__actions button.status-timestamp-cancel {
    border-color: #999;
    background: #f5f5f5;
    color: #333;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.diff-ok {
    background-color: #c8e6c9;
}
.diff-minus {
    background-color: #fff9c4;
}
.diff-plus {
    background-color: #ffcdd2;
}

#updates-table tr.extra-stop-row td.diff-ok {
    background-color: #c8e6c9 !important;
}

#updates-table tr.extra-stop-row td.diff-minus {
    background-color: #fff9c4 !important;
}

#updates-table tr.extra-stop-row td.diff-plus {
    background-color: #ffcdd2 !important;
}

.plus-one {
    font-size: 0.8em;
    margin-left: 4px;
}

.sa-btn {
    padding: 4px 8px;
    margin-right: 2px;
    font-weight: bold;
    min-width: 32px;
}
.sa-btn.active {
    background: #c8f7c5;
    color: inherit;
    padding: 6px 12px;
    font-size: 1.2em;
    min-width: 40px;
}

/* Utility class for preventing text wrapping */
.nowrap {
    white-space: nowrap;
}

/* Narrow field for working hours input */
input.darbo_laikas,
input.likes_laikas {
    width: 5ch;
}

/* Width for time inputs to fit HH:MM */
input.time {
    width: 5ch;
}

.eta-autofill {
    background-color: #e0e0e0;
    font-style: italic;
}

input.manual-override {
    background-color: #ffffff;
    font-style: normal;
}

/* Consistent width for planned date inputs */
.plan-date {
    width: 10ch;
    max-width: 12ch;
    text-align: center;
    font-variant-numeric: proportional-nums;
    font-size-adjust: 0.5;
    font-size: clamp(0.75rem, 0.9vw + 0.35rem, 0.95rem);
    letter-spacing: -0.05em;
}

input.time {
    font-size-adjust: 0.5;
    font-size: clamp(0.75rem, 0.9vw + 0.35rem, 0.95rem);
}

/* Shorter width for numeric fields */
input.short {
    width: 12ch;
}

.manager-name { color: blue; }
.pk-vieta {
    font-weight: bold;
}

.ik-vieta {
    font-weight: bold;
}

.weekday-stack {
    float: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-left: 4px;
    line-height: 1;
}

.weekday-order,
.weekday-num {
    font-weight: bold;
    font-size: 1.3em;
    line-height: 1;
}

.weekday-num {
    margin-top: 2px;
}

button.date-dec,
button.date-inc {
    margin-left: 4px;
    padding: 0 4px;
}

/* Consistent width for working time columns */
#updates-table.dataTable {
    border-collapse: collapse;
    background-color: #f5f7fb;
}

#updates-table tbody tr { 
    position: relative;
    background-color: #ffffff;
}

#updates-table tbody td.load-arrival-cell,
#updates-table tbody td.unload-arrival-cell,
#updates-table tbody td.prognoze-cell {
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

#updates-table tbody tr.order-group-start td {
    border-top: 8px solid #d0d6e4;
    box-shadow: inset 0 2px 0 #8e98b2;
}

#updates-table tbody tr.order-group-end td {
    border-bottom: 8px solid #d0d6e4;
    box-shadow: inset 0 -2px 0 #8e98b2;
}

#updates-table tbody tr:hover {
    background-color: #eef4ff;
}

#updates-table tbody tr.updates-row-selected::after {
    content: '';
    position: absolute;
    inset: -1px;
    border: 2px solid #1976d2;
    border-radius: 4px;
    pointer-events: none;
    z-index: 1;
}

.status-cell {
    display: flex;
    align-items: stretch;
    gap: 2px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 4px;
    width: 100%;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}
.status-button-group {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 3px;
    width: 100%;
    min-height: 0;
}
.status-button {
    flex: 1 1 auto;
    width: 100%;
    box-sizing: border-box;
    padding: 4px 8px;
    border: 1px solid #c0c0c0;
    background: #ffffff;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    line-height: 1.25;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}
.status-button:hover { background-color: #f1f1f1; }
.status-button--active {
    background-color: #1976d2;
    border-color: #1976d2;
    color: #ffffff;
}
.status-cell--arrived {
    border-color: #2e7d32;
}
.status-cell--completed {
    border-color: #1b5e20;
    background-color: #2e7d32;
    color: #ffffff;
}
.status-cell--completed .status-button {
    background-color: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}
.status-cell--completed .status-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}
.status-cell--completed .status-button--active {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
    color: #ffffff;
}
.status-cell--completed .status-conversation-trigger {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.4);
}
#updates-table tbody tr.load-phase-active td.load-arrival-cell {
    border-top: 6px solid #2e7d32;
    border-bottom: 6px solid #2e7d32;
}
#updates-table tbody tr.load-phase-active td.load-arrival-start {
    border-left: 6px solid #2e7d32;
}
#updates-table tbody tr.load-phase-active td.load-arrival-end {
    border-right: 6px solid #2e7d32;
}
#updates-table tbody tr.load-phase-active .status-cell--arrived {
    border-color: transparent;
}
#updates-table tbody tr.unload-phase-active td.unload-arrival-cell {
    border-top: 6px solid #2e7d32;
    border-bottom: 6px solid #2e7d32;
}
#updates-table tbody tr.unload-phase-active td.unload-arrival-end {
    border-right: 6px solid #2e7d32;
}
#updates-table tbody tr.unload-phase-active .status-cell--arrived {
    border-color: transparent;
}
#updates-table tbody tr.load-phase-completed td.load-arrival-cell,
#updates-table tbody tr.unload-phase-completed td.unload-arrival-cell {
    background-color: #e6f4ea;
    color: #1b5e20;
}
#updates-table tbody tr.load-phase-completed td.load-arrival-cell .weekday-stack span,
#updates-table tbody tr.unload-phase-completed td.unload-arrival-cell .weekday-stack span {
    color: inherit;
}
#updates-table tbody tr.load-phase-completed td.load-arrival-cell input,
#updates-table tbody tr.unload-phase-completed td.unload-arrival-cell input {
    background-color: rgba(255, 255, 255, 0.85);
    color: #1b5e20;
    border-color: rgba(27, 94, 32, 0.5);
}
#updates-table tbody tr.load-phase-completed td.load-arrival-cell input.eta-autofill,
#updates-table tbody tr.unload-phase-completed td.unload-arrival-cell input.eta-autofill {
    background-color: #e0e0e0;
}
#updates-table tbody tr.load-phase-completed td.load-arrival-cell button.date-dec,
#updates-table tbody tr.load-phase-completed td.load-arrival-cell button.date-inc,
#updates-table tbody tr.unload-phase-completed td.load-arrival-cell button.date-dec,
#updates-table tbody tr.unload-phase-completed td.load-arrival-cell button.date-inc,
#updates-table tbody tr.unload-phase-completed td.unload-arrival-cell button.date-dec,
#updates-table tbody tr.unload-phase-completed td.unload-arrival-cell button.date-inc {
    background-color: rgba(255, 255, 255, 0.85);
    color: #1b5e20;
    border-color: rgba(27, 94, 32, 0.5);
}
#updates-table tbody tr.extra-stop-row.load-phase-active td.load-arrival-cell {
    border-top: 6px solid #2e7d32;
    border-bottom: 6px solid #2e7d32;
}
#updates-table tbody tr.extra-stop-row.load-phase-active td.load-arrival-start {
    border-left: 6px solid #2e7d32;
}
#updates-table tbody tr.extra-stop-row.load-phase-active td.load-arrival-end {
    border-right: 6px solid #2e7d32;
}
#updates-table tbody tr.extra-stop-row.load-phase-active .status-cell--arrived {
    border-color: transparent;
}
#updates-table tbody tr.extra-stop-row.unload-phase-active td.unload-arrival-cell {
    border-top: 6px solid #2e7d32;
    border-bottom: 6px solid #2e7d32;
}
#updates-table tbody tr.extra-stop-row.unload-phase-active td.unload-arrival-end {
    border-right: 6px solid #2e7d32;
}
#updates-table tbody tr.extra-stop-row.unload-phase-active .status-cell--arrived {
    border-color: transparent;
}
#updates-table tbody tr.extra-stop-row.load-phase-completed td.load-arrival-cell,
#updates-table tbody tr.extra-stop-row.unload-phase-completed td.unload-arrival-cell {
    background-color: #e6f4ea;
    color: #1b5e20;
}
#updates-table tbody tr.extra-stop-row.load-phase-completed td.load-arrival-cell .weekday-stack span,
#updates-table tbody tr.extra-stop-row.unload-phase-completed td.unload-arrival-cell .weekday-stack span {
    color: inherit;
}
#updates-table tbody tr.extra-stop-row.load-phase-completed td.load-arrival-cell input,
#updates-table tbody tr.extra-stop-row.unload-phase-completed td.unload-arrival-cell input {
    background-color: rgba(255, 255, 255, 0.85);
    color: #1b5e20;
    border-color: rgba(27, 94, 32, 0.5);
}
#updates-table tbody tr.extra-stop-row.load-phase-completed td.load-arrival-cell input.eta-autofill,
#updates-table tbody tr.extra-stop-row.unload-phase-completed td.unload-arrival-cell input.eta-autofill {
    background-color: #e0e0e0;
}
.status-conversation-trigger {
    border: none;
    background: #fff4e5;
    color: #bf360c;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.95rem;
}
.status-conversation-trigger:hover { background: #ffe0b2; }

.deadline-highlight {
    box-shadow: 0 0 0 2px #c62828 inset;
    position: relative;
}
.status-problem-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1700;
}
.status-problem-modal[hidden] { display: none; }
.status-problem-content {
    background: #ffffff;
    border-radius: 10px;
    padding: 16px;
    width: min(520px, 92vw);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}
.status-problem-context {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 4px;
}
.status-problem-context__btn {
    border: 1px solid #bdbdbd;
    border-radius: 18px;
    padding: 4px 12px;
    background: #f5f5f5;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.status-problem-context__btn:hover,
.status-problem-context__btn:focus {
    background: #e0f7fa;
    border-color: #0097a7;
    outline: none;
}
.status-problem-context__btn--active {
    background: #0097a7;
    color: #fff;
    border-color: #007c8a;
}
.status-problem-content textarea {
    min-height: 120px;
    resize: vertical;
    font-size: 0.95rem;
}
.status-problem-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}
.status-problem-actions button {
    padding: 6px 12px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
}
.status-problem-actions .problem-submit {
    background: #1976d2;
    color: #fff;
}
.status-problem-actions .problem-cancel {
    background: #e0e0e0;
}
.status-problem-confirmation {
    border-top: 1px solid #e0e0e0;
    padding-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.status-problem-confirmation__text {
    margin: 0;
    font-size: 0.9rem;
    color: #1b5e20;
}
.status-problem-confirmation__actions {
    display: flex;
    justify-content: flex-end;
}
.status-problem-view-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 4px;
    background: #1976d2;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
}
.status-problem-view-button:hover,
.status-problem-view-button:focus {
    text-decoration: none;
    background: #135ba1;
    outline: none;
}
.status-problem-messages {
    border-top: 1px solid #e0e0e0;
    padding-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 240px;
    overflow-y: auto;
}
.status-problem-message {
    font-size: 0.9rem;
    border-left: 3px solid #1976d2;
    padding-left: 8px;
}
.status-problem-message--critical { border-color: #c62828; }
.status-problem-message__meta { font-size: 0.8rem; color: #555; }

.dual-conversation-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 0.75rem;
    align-items: start;
}

@media (max-width: 720px) {
    .dual-conversation-container {
        grid-template-columns: 1fr;
    }
}

.dual-conversation-panel {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 0.75rem;
    background: #fff;
    display: flex;
    flex-direction: column;
    min-height: 260px;
}

.dual-conversation-panel--disabled {
    background: #f8f8f8;
    opacity: 0.85;
}

.dual-conversation-header {
    margin-bottom: 0.5rem;
}

.dual-conversation-title {
    margin: 0;
    font-size: 1rem;
}

.dual-conversation-subtitle {
    font-size: 0.85rem;
    color: #555;
}

.dual-conversation-messages {
    flex: 1 1 auto;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 0.4rem;
    overflow-y: auto;
    background: #fafafa;
}

.dual-conversation-message {
    border-bottom: 1px solid #e4e4e4;
    padding: 0.3rem 0;
    font-size: 0.9rem;
}

.dual-conversation-message:last-child {
    border-bottom: none;
}

.dual-conversation-message__header {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    font-size: 0.82rem;
}

.dual-conversation-message__time {
    color: #777;
    font-weight: normal;
    margin-left: 0.75rem;
}

.dual-conversation-message__body {
    margin-top: 0.3rem;
    white-space: pre-line;
}

.dual-conversation-empty,
.dual-conversation-loading,
.dual-conversation-error,
.dual-conversation-note {
    margin: 0.5rem 0;
    color: #555;
}

.dual-conversation-feedback {
    min-height: 1rem;
    font-size: 0.82rem;
    margin-top: 0.3rem;
}

.dual-conversation-feedback[data-level="error"] {
    color: #c62828;
}

.dual-conversation-feedback[data-level="success"] {
    color: #2e7d32;
}

.dual-conversation-form {
    margin-top: 0.6rem;
    display: flex;
    flex-direction: column;
}

.dual-conversation-input {
    resize: vertical;
    min-height: 64px;
    padding: 0.45rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.95rem;
}

.dual-conversation-actions {
    margin-top: 0.4rem;
    display: flex;
    justify-content: flex-end;
}

.dual-conversation-submit {
    background: #1976d2;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 0.35rem 0.75rem;
    font-size: 0.9rem;
    cursor: pointer;
}

.dual-conversation-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#updates-table th.time-col,
#updates-table td.time-col {
    min-width: 6ch;
}

#updates-table th.start-location-col,
#updates-table td.start-location-col,
#updates-table td.extra-stop-col-start-location {
    min-width: 30ch;
}

.start-location {
    line-height: 1.25;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.start-location-main {
    min-width: 0;
}

.start-location-line {
    display: block;
}

.start-location-line + .start-location-line {
    margin-top: 2px;
}

.start-location-time-stack {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: flex-end;
    text-align: right;
    flex-shrink: 0;
}

.start-location-time-stack .time-stack-item {
    display: flex;
    flex-direction: column;
}

.start-location-time-stack .time-stack-label {
    font-size: 0.75rem;
    color: #555;
    line-height: 1.1;
}

.start-location-time-stack .time-stack-value {
    font-size: 0.85rem;
    line-height: 1.2;
}

#updates-table th.time-stack-col span {
    display: block;
    line-height: 1.2;
}

#updates-table td.time-stack-col .time-stack {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

#updates-table td.time-stack-col .time-stack-item {
    display: flex;
    flex-direction: column;
}

#updates-table td.time-stack-col .time-stack-label {
    font-size: 0.75rem;
    color: #555;
    line-height: 1.1;
}

#updates-table td.time-stack-col input.time {
    width: 6ch;
    margin-top: 1px;
}

#updates-table tbody td {
    padding-top: 1px;
    padding-bottom: 1px;
}

#updates-table tbody .status-button-group {
    gap: 2px;
}

#updates-table tbody .status-button {
    padding: 3px 6px;
    font-size: 0.85rem;
    line-height: 1.1;
    min-height: 0;
}

#updates-table thead th.status-load-header,
#updates-table tbody td.status-load-cell {
    border-right: 1px solid #c0c0c0;
}

.nustatymai-cards {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.nustatymai-card {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    background: #f9f9f9;
}

.nustatymai-card:hover {
    background: #e0e0e0;
}

#nustatymai-content {
    margin-top: 20px;
}

.disabled-archive {
    color: gray;
    cursor: not-allowed;
    text-decoration: none;
}

#incident-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border: 1px solid #ccc;
    padding: 20px;
    z-index: 2000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

#incident-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 1500;
}

.readonly-field {
    background-color: #f5f5f5;
}

.form-row {
    display: flex;
    gap: 10px;
}
.form-row label {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.conversation-section {
    margin-top: 2rem;
    padding: 1rem;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    background: #fafbfc;
}

.conversation-section--inline {
    margin-top: 0;
    padding: 0;
    border: none;
    background: transparent;
    align-self: start;
}

.conversation-section--inline .dual-conversation-container {
    margin-top: 0.5rem;
}

.conversation-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.conversation-thread {
    max-height: 360px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-right: 0.5rem;
}

.conversation-message {
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    padding: 0.75rem;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(18, 18, 18, 0.04);
}

.conversation-message--transport {
    border-left: 4px solid #1565c0;
}

.conversation-message--responsible {
    border-left: 4px solid #2e7d32;
}

.conversation-message--other {
    border-left: 4px solid #6d4c41;
}

.conversation-message__header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #455a64;
    margin-bottom: 0.35rem;
}

.conversation-message__author {
    font-weight: 600;
}

.conversation-message__time {
    font-style: italic;
}

.conversation-message__body {
    white-space: pre-wrap;
    color: #263238;
    font-size: 0.95rem;
    line-height: 1.45;
}

.conversation-message--highlight {
    animation: conversation-highlight 1.8s ease-in-out 2;
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.35) inset;
}

@keyframes conversation-highlight {
    0%, 100% {
        box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.2) inset;
    }
    50% {
        box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.45) inset;
    }
}

.conversation-form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.conversation-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.conversation-form-row label {
    display: flex;
    flex-direction: column;
    font-size: 0.9rem;
    color: #37474f;
    font-weight: 600;
    min-width: 160px;
}

.conversation-form-row select,
.conversation-form-row input {
    margin-top: 0.35rem;
    padding: 0.45rem 0.6rem;
    border-radius: 4px;
    border: 1px solid #cfd8dc;
    background: #ffffff;
    font-size: 0.95rem;
}

.conversation-message-label textarea {
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.65rem 0.75rem;
    border-radius: 4px;
    border: 1px solid #cfd8dc;
    background: #ffffff;
    font-size: 0.95rem;
    resize: vertical;
}

.conversation-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
}

.conversation-actions button {
    padding: 0.55rem 1.25rem;
    background: #1976d2;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
}

.conversation-actions button:disabled {
    background: #90caf9;
    cursor: default;
}

.conversation-feedback {
    flex: 1;
    text-align: left;
    font-size: 0.9rem;
    color: #546e7a;
}

.conversation-feedback[data-level="error"] {
    color: #c62828;
}

.conversation-feedback[data-level="warning"] {
    color: #ef6c00;
}

.conversation-feedback[data-level="success"] {
    color: #2e7d32;
}

.conversation-empty,
.conversation-loading,
.conversation-empty-note {
    color: #546e7a;
    font-style: italic;
    margin: 0;
}

.conversation-error {
    color: #c62828;
    font-style: italic;
}

.alert {
    border-radius: 4px;
    padding: 10px 14px;
    margin: 10px 0;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.alert-info {
    background: #e8f4fd;
    color: #0d47a1;
    border: 1px solid #bbdefb;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.section-desc {
    color: #546e7a;
    margin-bottom: 0.75em;
}

.empty-placeholder {
    font-style: italic;
    color: #607d8b;
}

.contract-section {
    margin-bottom: 2em;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.contract-card {
    border: 1px solid #cfd8dc;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 16px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.contract-card__header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
}

.contract-card__actions {
    margin-top: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.contract-card__actions form {
    width: 100%;
}

.contract-card__actions button {
    width: 100%;
}

.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-badge--muted {
    background: #f1f5f9;
    color: #4b5563;
}

.status-awaiting_confirmation {
    background: #fff3cd;
    color: #856404;
}

.status-pending {
    background: transparent;
    color: #37474f;
    border: 1px solid #cfd8dc;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-inactive {
    background: #f8d7da;
    color: #721c24;
}

.status-scheduled {
    background: #d1ecf1;
    color: #0c5460;
}

.status-incoming {
    background: #d1ecf1;
    color: #0c5460;
}

.status-expired {
    background: #f8d7da;
    color: #721c24;
}

.status-rejected {
    background: #fdecea;
    color: #c53030;
}

.status-cancelled {
    background: #fdecea;
    color: #9b1c1c;
}

.response-pending {
    background: #fff3cd;
    color: #7a6206;
}

.response-accepted {
    background: #d4edda;
    color: #155724;
}

.response-rejected {
    background: #fdecea;
    color: #c53030;
}

.contract-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem 1.25rem;
    margin: 1rem 0 0;
}

.contract-meta dt {
    font-weight: 600;
    color: #37474f;
}

.contract-meta dd {
    margin: 0.25rem 0 0;
}

.card-actions {
    margin-top: 1rem;
}

.back-link {
    display: inline-block;
    margin-bottom: 0.5rem;
}

.detail-section {
    margin: 1.5rem 0;
}

.detail-section__alert {
    margin: 0 0 1rem;
}

.detail-layout {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 2rem;
}

.detail-main {
    flex: 2 1 520px;
    min-width: 0;
}

.detail-sidebar {
    flex: 1 1 280px;
    min-width: 260px;
}

@media (max-width: 960px) {
    .detail-layout {
        flex-direction: column;
    }

    .detail-sidebar {
        min-width: 100%;
    }
}

.status-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.summary-grid {
    display: grid;
    gap: 0.5rem;
    margin-top: 0.6rem;
}

.summary-grid > div {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: baseline;
    column-gap: 0.75rem;
}

.summary-grid .label {
    font-weight: 700;
    color: #374151;
}

.summary-grid > div span:last-child {
    text-align: right;
    font-variant-numeric: tabular-nums;
    color: #111827;
}

.status-summary.compact {
    margin-top: 0.5rem;
}

.status-pill {
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #eceff1;
    color: #37474f;
    font-weight: 600;
    font-size: 0.9rem;
}

.status-pill.status-active {
    background: #d4edda;
    color: #155724;
}

.status-pill.status-awaiting_confirmation {
    background: #fff3cd;
    color: #856404;
}

.status-pill.status-scheduled {
    background: #d1ecf1;
    color: #0c5460;
}

.status-pill.status-expired {
    background: #f8d7da;
    color: #721c24;
}

.status-pill.status-inactive {
    background: #f8d7da;
    color: #721c24;
}

.status-pill.status-cancelled {
    background: #fdecea;
    color: #9b1c1c;
}

.status-pill.status-incoming {
    background: #d1ecf1;
    color: #0c5460;
}

.status-pill__count {
    font-size: 1rem;
}

.timeline-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.timeline-card {
    border: 1px solid #cfd8dc;
    border-radius: 6px;
    padding: 14px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.timeline-card.current {
    border-color: #1976d2;
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.2);
}

.timeline-card header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
}

.timeline-card dl {
    margin: 0;
    display: grid;
    gap: 0.5rem;
}

.timeline-card dt {
    font-weight: 600;
    color: #455a64;
}

.timeline-card dd {
    margin: 0.1rem 0 0;
}

.timeline-card .link {
    font-weight: 600;
    color: #1976d2;
}

.overview-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1rem 0;
}

.summary-card {
    border-radius: 12px;
    padding: 1rem 1.25rem;
    background: #eceff1;
    min-width: 160px;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    border: 1px solid #cfd8dc;
}

.summary-card__label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #607d8b;
}

.summary-card__value {
    font-size: 1.6rem;
    color: #263238;
    font-weight: 700;
}

.table-toolbar {
    display: flex;
    justify-content: flex-end;
    margin: 0.5rem 0;
}


.contracts-table-scroll {
    overflow-x: auto;
    width: 100%;
}

.contracts-table--compact.dataTable,
.contract-history-table {
    font-size: 12px;
}

.contracts-table--compact.dataTable th,
.contracts-table--compact.dataTable td,
.contract-history-table th,
.contract-history-table td {
    white-space: nowrap;
    padding: 2px 4px;
    box-sizing: border-box;
}

.contracts-table--compact.dataTable thead th,
.contract-history-table thead th {
    font-size: 12px;
}

.contracts-table--compact.dataTable td,
.contract-history-table td {
    overflow: hidden;
    text-overflow: ellipsis;
}


.contracts-table .status-badge-group {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.contracts-table td.count-cell,
.contract-history-table td.count-cell {
    text-align: center;
    vertical-align: middle;
}

.count-cell .count-value {
    display: inline-block;
    font-weight: 600;
    min-width: 2ch;
}

.count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.5rem;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.count-badge--incoming {
    background: #e3f2fd;
    color: #1565c0;
}

.count-badge--response {
    background: #e8f5e9;
    color: #2e7d32;
}

.contracts-table col.col-company {
    width: 20%;
}

.contracts-table col.col-type {
    width: 12%;
}

.contracts-table col.col-carrier-role,
.contracts-table col.col-forwarder-role {
    width: 16%;
}

.contracts-table col.col-company-id {
    width: 10%;
}

.contracts-table col.col-status {
    width: 10%;
}

.contracts-table col.col-trucks {
    width: 8%;
}

.contracts-table col.col-days {
    width: 8%;
}

.contracts-table col.col-count {
    width: 10%;
}

.contract-history-table col.col-company {
    width: 34%;
}

.contract-history-table col.col-type {
    width: 14%;
}

.contract-history-table col.col-status {
    width: 14%;
}

.contract-history-table col.col-trucks {
    width: 12%;
}

.contract-history-table col.col-days {
    width: 12%;
}

.contract-history-table col.col-count {
    width: 14%;
}

.detail-section--termination {
    display: grid;
    gap: 1.5rem;
}

.termination-actions {
    display: grid;
    gap: 1rem;
}

@media (min-width: 768px) {
    .termination-actions {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }
}

.termination-card {
    padding: 1rem 1.1rem;
    border-radius: 10px;
    border: 1px solid #dbe6f4;
    background: #f8fbff;
    gap: 0.75rem;
}

.termination-card--custom {
    background: #ffffff;
}

.termination-card label {
    font-weight: 600;
    display: grid;
    gap: 0.4rem;
}

.termination-card input[type="date"] {
    padding: 0.45rem 0.55rem;
    border-radius: 6px;
    border: 1px solid #c5d4e4;
}

.termination-summary {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.85rem 1.1rem;
    border-radius: 10px;
    border: 1px solid #d9e8cd;
    background: #f5fbef;
}

.termination-summary__actions {
    margin-top: 0.25rem;
}

.termination-summary__actions .link-btn {
    padding-left: 0;
}

.termination-requests h4 {
    margin-bottom: 0.75rem;
}

.termination-request-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.75rem;
}

.termination-request {
    border: 1px solid #dbe6f4;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    background: #ffffff;
}

.termination-request--pending {
    border-color: #ffe082;
    background: #fff8e1;
}

.termination-request__summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-weight: 600;
    color: #2f3b52;
    margin-bottom: 0.4rem;
}

.termination-request__status {
    margin: 0;
    color: #546e7a;
}

.termination-request__actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.contract-history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.contract-history-table th,
.contract-history-table td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid #e0e6ed;
    vertical-align: middle;
    font-size: 0.95rem;
}

.contract-history-table th {
    text-align: left;
    font-weight: 600;
    color: #546e7a;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}

.contract-history-table tr:hover {
    background: #f5f8fb;
}

.contract-history-table td:first-child {
    font-weight: 600;
    color: #37474f;
}

.contract-history-table .status-badge {
    display: inline-flex;
    margin: 0;
}

.contract-history-table .truncate {
    max-width: 240px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.summary-card.status-active {
    background: #d4edda;
    border-color: #a5d6a7;
}

.summary-card.status-awaiting_confirmation {
    background: #fff3cd;
    border-color: #ffe0a3;
}

.summary-card.status-inactive {
    background: #f8d7da;
    border-color: #f1aeb5;
}

.summary-card.status-incoming {
    background: #d1ecf1;
    border-color: #9ed2df;
}

.summary-card.status-scheduled {
    background: #d1ecf1;
    border-color: #a6dcef;
}

.summary-card.status-expired {
    background: #f8d7da;
    border-color: #f1aeb5;
}

.summary-card.status-cancelled {
    background: #fdecea;
    border-color: #f5b3b3;
}

.truck-list {
    list-style: disc inside;
    padding-left: 1rem;
    margin: 0.5rem 0;
}

.truck-availability {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid #d9e2ec;
    background-color: #f7fafc;
}

.truck-availability__title {
    display: block;
    font-size: 1rem;
    margin: 0 0 0.5rem;
    font-weight: 600;
}

.truck-availability__table-wrapper {
    max-height: 18rem;
    overflow: auto;
    border-radius: 6px;
    border: 1px solid #dce5ef;
    background-color: #ffffff;
}

.truck-availability__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    max-height: 12rem;
    overflow-y: auto;
}

.truck-availability__item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.truck-availability__name {
    font-weight: 600;
    color: #1c313a;
}

.truck-availability__meta {
    font-size: 0.9rem;
    color: #455a64;
}

.truck-availability__meta--empty {
    color: #90a4ae;
}

.truck-summary-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 100%;
    table-layout: fixed;
}

.truck-summary-table__filters th {
    padding: 0.35rem 0.5rem;
    background-color: #f5f8fb;
    border-bottom: 1px solid #dce5ef;
}

.truck-summary-table__filters th:first-child {
    border-top-left-radius: 6px;
}

.truck-summary-table__filters th:last-child {
    border-top-right-radius: 6px;
}

.truck-summary-table__filter-input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.25rem 0.4rem;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
    background-color: #ffffff;
    font-size: 0.82rem;
    color: #1c313a;
}

.truck-summary-table__filter-input::placeholder {
    color: #90a4ae;
}

.truck-summary-table__filter-input:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.15);
}

.truck-summary-table--selectable .truck-summary-table__select {
    width: 3.5rem;
    text-align: center;
}

.truck-summary-table__select-cell {
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}

.truck-summary-table__checkbox {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    cursor: pointer;
}

.truck-summary-table__checkbox input[type="checkbox"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: inherit;
}

.truck-summary-table__toggle {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 4px;
    border: 2px solid #78909c;
    background-color: #ffffff;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.truck-summary-table__checkbox input[type="checkbox"]:focus-visible + .truck-summary-table__toggle {
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.25);
}

.truck-summary-table__checkbox input[type="checkbox"]:checked + .truck-summary-table__toggle {
    background-color: #2e7d32;
    border-color: #2e7d32;
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.25);
}

.truck-summary-table__checkbox input[type="checkbox"][disabled] + .truck-summary-table__toggle {
    border-color: #b0bec5;
    background-color: #eceff1;
    cursor: not-allowed;
    box-shadow: none;
}

.truck-summary-table__status {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: #c62828;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.truck-summary-table tbody tr[data-available="0"]:not(.is-selected) td {
    color: #607d8b;
}

.truck-summary-table tbody tr[data-available="0"]:not(.is-selected) td strong,
.truck-summary-table tbody tr[data-available="0"]:not(.is-selected) td span {
    color: inherit;
}

.truck-summary-table th,
.truck-summary-table td {
    padding: 0.45rem 0.6rem;
    text-align: left;
    border-bottom: 1px solid #e3ecf5;
    font-size: 0.92rem;
    color: #263238;
}

.truck-summary-table tbody tr:last-child td {
    border-bottom: none;
}

.truck-summary-table tbody tr.is-hidden {
    display: none;
}

.truck-summary-table tbody tr.is-selected {
    background-color: #e8f5e9;
}

.truck-summary-table tbody tr.is-selected:hover {
    background-color: #dcedc8;
}

.truck-summary-table tbody tr:hover {
    background-color: #f1f7ff;
}

.truck-summary-table th[data-sort-key] {
    cursor: pointer;
    user-select: none;
    position: relative;
    color: #1c313a;
    font-weight: 600;
}

.truck-summary-table th[data-sort-key]::after {
    content: '';
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
}

.truck-summary-table th[data-sort-key][data-sort-direction="asc"]::after {
    border-bottom-color: #1c7ed6;
}

.truck-summary-table th[data-sort-key][data-sort-direction="desc"]::after {
    border-top-color: #1c7ed6;
}

.truck-summary-table th[data-sort-key]:hover {
    background-color: #e8f4fd;
}

.truck-summary-table td {
    background-color: transparent;
}

.truck-col-resizable {
    position: relative;
}

.truck-col-resize-handle {
    position: absolute;
    top: 0;
    right: -2px;
    width: 8px;
    height: 100%;
    cursor: col-resize;
    z-index: 6;
}

body.truck-col-resize-active {
    cursor: col-resize !important;
    user-select: none;
}

@media (max-width: 720px) {
    .truck-summary-table {
        min-width: 100%;
    }
    .truck-summary-table thead {
        display: none;
    }
    .truck-summary-table tbody,
    .truck-summary-table tr,
    .truck-summary-table td {
        display: block;
        width: 100%;
    }
    .truck-summary-table__select-cell {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    .truck-summary-table__status {
        margin-top: 0;
    }
    .truck-summary-table tbody tr {
        border-bottom: 1px solid #dce5ef;
        padding: 0.5rem 0.25rem;
    }
    .truck-summary-table tbody tr:last-child {
        border-bottom: none;
    }
    .truck-summary-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.35rem 0.4rem;
        border: none;
    }
    .truck-summary-table td::before {
        content: attr(data-label);
        font-weight: 600;
        margin-right: 0.5rem;
        color: #1c313a;
    }
}

.truck-selection-filter {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}

.truck-selection-card {
    display: grid;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.truck-selection-card__intro {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.decision-field--trucks > .truck-selection-card {
    margin-top: 0.25rem;
}

.truck-selection-card__intro .hint {
    margin: 0;
}

.truck-selection-filter label {
    font-weight: 600;
    color: #1c313a;
}

.truck-selection-filter input[type="search"] {
    border: 1px solid #d9e2ec;
    border-radius: 4px;
    padding: 0.4rem 0.5rem;
    font-size: 0.95rem;
}

.truck-selection-filter__count {
    font-size: 0.85rem;
    color: #607d8b;
    display: block;
    margin-bottom: 0.5rem;
}

.truck-selection-insight {
    margin-top: 0.75rem;
}

.truck-selection-insight.is-empty {
    display: none;
}

.truck-add-card {
    margin-top: 1.5rem;
}

.truck-add-card__form {
    display: grid;
    gap: 1rem;
}

.truck-add-card__header {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.truck-add-card__title {
    margin: 0;
}

.truck-add-card__error {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: #dc2626;
}

.truck-availability__item--inline {
    display: block;
    font-weight: 600;
    color: #1c313a;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.form-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.form-grid label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.form-grid input,
.form-grid textarea {
    padding: 6px 8px;
    border-radius: 4px;
    border: 1px solid #cfd8dc;
    font-family: inherit;
}

.form-grid textarea {
    resize: vertical;
}

.form-grid .full-width {
    grid-column: 1 / -1;
}

.form-actions {
    grid-column: 1 / -1;
}

.proposal-form {
    background: #f7f9fc;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #d0d7de;
}

.proposal-form textarea,
.proposal-form input,
.proposal-form select {
    background-color: #fff;
}

.proposal-result textarea {
    width: 100%;
    margin: 0.5rem 0 1rem;
    padding: 0.75rem;
    border-radius: 6px;
    border: 1px solid #cfd8dc;
    font-family: 'Fira Code', 'Courier New', monospace;
}

.copy-feedback {
    margin-top: 0.5rem;
    color: #2e7d32;
    font-weight: 500;
}


.contract-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 1.5rem;
}

.form-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    border: 1px solid #d0d7de;
}

.form-card__header {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1rem;
}

.form-card__header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #0f172a;
}

.form-card__hint {
    margin: 0;
    color: #5f6b7a;
    font-size: 0.95rem;
}

.form-card__body {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.pricing-options {
    display: grid;
    gap: 0.75rem;
}

.pricing-fields {
    padding-left: 1.5rem;
}

.pricing-fields label {
    display: block;
}

.pricing-fields input[disabled] {
    background: #f1f3f5;
    color: #6c757d;
}

.pricing-fields:not(.is-active) {
    opacity: 0.5;
}

.form-section {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.form-section h2 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: #0f172a;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-grid label,
.form-section > label,
.form-card__body > label {
    display: flex;
    flex-direction: column;
    font-weight: 600;
    color: #334155;
    font-size: 0.95rem;
}

.form-section input[type="text"],
.form-section input[type="email"],
.form-section input[type="date"],
.form-section textarea,
.form-section select,
.form-card__body input[type="text"],
.form-card__body input[type="email"],
.form-card__body input[type="date"],
.form-card__body textarea,
.form-card__body select {
    margin-top: 0.4rem;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    border: 1px solid #cbd5f5;
    font-size: 0.95rem;
}

.form-section textarea,
.form-card__body textarea {
    resize: vertical;
}

.form-card__body textarea {
    min-height: 120px;
}

.form-rows {
    display: grid;
    gap: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: minmax(180px, 220px) minmax(180px, 1fr);
    align-items: center;
    column-gap: 1.5rem;
    row-gap: 0.35rem;
}

.form-row__label {
    font-weight: 600;
    color: #334155;
}

.form-row__input {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.inline-field-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.inline-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 140px;
}

.inline-field span {
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
}

.inline-field input,
.inline-field select,
.inline-field textarea {
    min-width: 160px;
}

.inline-choice-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
}

.inline-choice-group label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 500;
    color: #1f2937;
}

.region-preference {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    border: 1px solid #cbd5f5;
    border-radius: 10px;
    background-color: #f8fafc;
}

.region-preference__label {
    font-weight: 600;
    color: #334155;
}

.region-preference__add {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.region-preference__input {
    flex: 1 1 160px;
    min-width: 140px;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    border: 1px solid #94a3b8;
    font-size: 0.95rem;
    background-color: #ffffff;
}

.region-preference__add-btn {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    border: none;
    background-color: #1d4ed8;
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.region-preference__add-btn:hover {
    background-color: #1a3fa4;
}

.region-preference__add-btn:active {
    transform: translateY(1px);
}

.region-preference__hint {
    margin: 0;
    font-size: 0.85rem;
    color: #64748b;
}

.region-preference__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.region-preference__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.region-preference__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.25rem;
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    font-weight: 600;
    letter-spacing: 0.02em;
    background-color: #e0f2fe;
    color: #0f172a;
}

.region-preference__actions {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.region-preference__action {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #94a3b8;
    background-color: #ffffff;
    color: #1f2937;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.region-preference__action:hover:not(:disabled) {
    background-color: #e2e8f0;
    border-color: #64748b;
}

.region-preference__action:disabled {
    cursor: not-allowed;
    color: #94a3b8;
    border-color: #cbd5f5;
    background-color: #f1f5f9;
}

.region-preference__empty {
    margin: 0;
    font-size: 0.85rem;
    color: #94a3b8;
    font-style: italic;
}

@media (max-width: 720px) {
    .region-preference {
        padding: 0.75rem;
    }

    .region-preference__item {
        flex-direction: column;
        align-items: flex-start;
    }

    .region-preference__actions {
        width: 100%;
        justify-content: flex-start;
    }
}

.form-row__input input,
.form-row__input select,
.form-row__input textarea {
    max-width: 280px;
}

.multi-select {
    min-width: 220px;
    max-width: 320px;
    padding: 0.4rem 0.5rem;
    border-radius: 8px;
    border: 1px solid #94a3b8;
    background-color: #ffffff;
    font-size: 0.95rem;
}

.multi-select--compact {
    max-height: 9.5rem;
    overflow-y: auto;
}

.form-row__value {
    font-weight: 600;
    color: #0f172a;
}

.form-row__value.is-empty {
    color: #6b7280;
    font-weight: 500;
}

.form-row__hint {
    font-size: 0.85rem;
    color: #6b7280;
    margin: 0;
}

.pricing-accordion {
    border: 1px solid #d0d7de;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    background: #f8fafc;
}

.pricing-accordion summary {
    font-weight: 600;
    color: #0f172a;
    cursor: pointer;
    position: relative;
    list-style: none;
    padding-right: 1.5rem;
}

.pricing-accordion summary::-webkit-details-marker {
    display: none;
}

.pricing-accordion summary::after {
    content: '\25BE';
    position: absolute;
    right: 0;
    top: 0.15rem;
    font-size: 0.85rem;
    color: #475569;
    transition: transform 0.2s ease;
}

.pricing-accordion[open] summary::after {
    transform: rotate(180deg);
}

.pricing-accordion__content {
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pricing-accordion__content .form-row {
    margin: 0;
}

.payment-term__mode-row .form-row__input {
    max-width: 340px;
}

.payment-term__mode {
    width: 100%;
}

.payment-term__field {
    gap: 0.5rem;
}

.payment-term__field.is-hidden {
    display: none;
}

.country-rate {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.country-rate__grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.country-rate__field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-weight: 600;
    color: #334155;
    font-size: 0.9rem;
}

.country-rate__input,
.country-rate__select {
    border: 1px solid #cbd5f5;
    border-radius: 8px;
    padding: 0.55rem 0.65rem;
    font-size: 0.95rem;
    width: 100%;
}

.country-rate__actions {
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
}

.country-rate__add {
    background: #2563eb;
    color: #ffffff;
    border: none;
    padding: 0.55rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.country-rate__add:hover {
    background: #1d4ed8;
}

.country-rate__add:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

.country-rate__hint {
    margin: 0;
    font-size: 0.85rem;
    color: #64748b;
}

.country-rate__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.country-rate__item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    background: #ffffff;
}

.country-rate__tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e0e7ff;
    color: #1e3a8a;
    font-weight: 600;
    border-radius: 6px;
    padding: 0.2rem 0.55rem;
    min-width: 3rem;
}

.country-rate__summary {
    flex: 1;
    font-size: 0.9rem;
    color: #1f2937;
}

.country-rate__remove {
    border: none;
    background: none;
    color: #dc2626;
    font-weight: 600;
    cursor: pointer;
}

.country-rate__remove:hover {
    text-decoration: underline;
}

.country-rate__empty {
    margin: 0;
    font-size: 0.85rem;
    color: #94a3b8;
}

.form-row.is-textarea .form-row__input textarea {
    min-height: 120px;
    max-width: 100%;
}

.pricing-dependent.is-hidden {
    display: none;
}

@media (max-width: 720px) {
    .form-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .form-row__input input,
    .form-row__input select,
    .form-row__input textarea {
        max-width: 100%;
    }
}

.radio-option {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #1f2937;
    margin-right: 1rem;
}

.carrier-existing,
.carrier-new {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.carrier-existing select,
.carrier-new input[type="text"],
.carrier-new input[type="email"] {
    width: 100%;
}

.checkbox-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #1f2937;
    margin: 1rem 0;
}

.hint {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 0.5rem;
}

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

.dynamic-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.dynamic-row input[type="text"] {
    flex: 1 1 200px;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    border: 1px solid #cbd5f5;
    font-size: 0.95rem;
}

.dynamic-row select {
    flex: 1 1 180px;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    border: 1px solid #cbd5f5;
    background-color: #fff;
    font-size: 0.95rem;
}

.remove-row {
    background: #ef4444;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.remove-row:hover {
    background: #dc2626;
}

.add-row {
    margin-top: 0.75rem;
    padding: 0.55rem 1.2rem;
    border-radius: 9999px;
    border: none;
    background: #1d4ed8;
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
}

.add-row:hover {
    background: #1e3a8a;
}

.form-actions {
    display: flex;
    gap: 1rem;
}

.decision-actions {
    display: grid;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.decision-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
    display: grid;
    gap: 1rem;
}

.decision-card--accept {
    border-top: 6px solid #22c55e;
}

.decision-card--comment {
    border-top: 6px solid #facc15;
}

.decision-card--reject {
    border-top: 6px solid #ef4444;
}

.decision-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.decision-field > label {
    display: grid;
    gap: 0.5rem;
}

.decision-field textarea,
.decision-field select,
.decision-field input[type="date"],
.decision-field input[type="number"] {
    width: 100%;
}

.decision-actions__submit {
    display: flex;
    justify-content: flex-start;
}

.decision-field--info .hint {
    margin: 0;
}

.decision-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 9999px;
    font-weight: 600;
    padding: 0.75rem 1.75rem;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.decision-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.12);
}

.decision-btn--accept {
    background: #16a34a;
    color: #ffffff;
}

.decision-btn--comment {
    background: #facc15;
    color: #78350f;
}

.decision-btn--reject {
    background: #ef4444;
    color: #ffffff;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 0.5rem;
    background-color: #e5e7eb;
    color: #374151;
}

.status-pill--changes {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #f59e0b;
}

.status-pill--decision {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #16a34a;
}

.detail-section--comments {
    margin-top: 2rem;
}

.comment-thread {
    list-style: none;
    margin: 1rem 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comment-thread__item {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    background-color: #f9fafb;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.comment-thread__item--owner {
    background-color: #f1f5f9;
}

.comment-thread__item--recipient {
    background-color: #eef2ff;
    border-color: #c7d2fe;
}

.comment-thread__item.is-self {
    border-color: #2563eb;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.15);
}

.comment-thread__meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 0.85rem;
    color: #6b7280;
    gap: 1rem;
}

.comment-thread__author {
    font-weight: 600;
    color: #1f2937;
}

.comment-thread__body {
    margin: 0.5rem 0 0;
    white-space: pre-wrap;
    color: #1f2937;
}

.comment-form label {
    display: block;
    font-weight: 600;
    color: #374151;
}

.comment-form textarea {
    width: 100%;
    margin-top: 0.5rem;
}

.comment-form__actions {
    margin-top: 0.75rem;
    display: flex;
    justify-content: flex-end;
}

.detail-section--changes {
    margin-top: 2rem;
}



.change-panel__columns-head {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 0.75rem;
    align-items: end;
    margin-top: 1rem;
    padding: 0.35rem 0.75rem 0.5rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b7280;
    position: sticky;
    top: 0;
    z-index: 1;
    background: #ffffff;
    box-shadow: 0 6px 12px rgba(15, 23, 42, 0.08);
}

.change-panel__head {
    font-weight: 600;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.change-panel__head--time {
    font-weight: 500;
}

.change-lines {
    list-style: none;
    margin: 0.75rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}


.change-line {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;
    gap: 0.5rem 0.75rem;
}

.change-line__cell {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 0.55rem 0.75rem;
    min-height: 100%;
}

.change-line__cell--time {
    align-items: center;
    justify-content: center;
    padding: 0.55rem 0.5rem;
    text-align: center;
}

.change-line--segment-status .change-line__cell {
    background: #f9fafb;
}



.change-line--align-secondary .change-line__column--secondary {
    align-items: flex-end;
    text-align: right;
}

.change-line--align-secondary .change-line__column--secondary .change-line__status {
    align-items: flex-end;
}

.change-line--align-secondary .change-line__column--secondary .change-line__actions {
    justify-content: flex-end;
}

.change-line--align-secondary .change-line__time {
    justify-content: center;
    text-align: center;
}

.change-line.is-unread .change-line__cell {
    border-color: #f59e0b;
    box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.25);
    background: #fffbeb;
}

.change-line__cell > .change-line__column {
    flex: 1;
}

.change-line__column {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.change-line__column--primary,
.change-line__column--secondary {
    color: #1f2937;
}

.change-line__time {
    font-size: 0.85rem;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    width: 100%;
}

.change-line__time-secondary {
    margin-left: 0.35rem;
    color: #9ca3af;
}


.change-line__empty {
    color: #cbd5f5;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.change-line__tag {
    text-transform: uppercase;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    background: #e5e7eb;
    color: #374151;
}

.change-line--truck .change-line__tag {
    background: #fef3c7;
    color: #92400e;
}

.change-line--revision .change-line__tag {
    background: #ede9fe;
    color: #5b21b6;
}

.change-line--decision .change-line__tag {
    background: #dcfce7;
    color: #047857;
}

.change-line--termination_request .change-line__tag,
.change-line--termination_scheduled .change-line__tag,
.change-line--termination_resolved .change-line__tag {
    background: #fee2e2;
    color: #b91c1c;
}

.change-line--cancellation .change-line__tag {
    background: #fef2f2;
    color: #9f1239;
}

.change-line--comment .change-line__tag {
    background: #e0f2fe;
    color: #0369a1;
}

.change-line--change .change-line__tag {
    background: #ecfccb;
    color: #3f6212;
}

.change-line__actor,
.change-line__action {
    font-weight: 600;
}

.change-line__extra {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: #4b5563;
}

.change-line__truck-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: baseline;
}

.change-line__truck-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: #111827;
}

.change-line__truck-intro,
.change-line__truck-swap,
.change-line__truck-note {
    color: #6b7280;
    font-weight: 500;
}

.change-line__truck-note {
    font-size: 0.8rem;
}

.change-line__warnings {
    color: #b91c1c;
    font-weight: 600;
    font-size: 0.8rem;
}

.change-line__status {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    align-items: flex-start;
    text-align: left;
}

.change-line__status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.change-line__status-pill.status-pending,
.change-line__status-pill.status-pending_owner,
.change-line__status-pill.status-pending_counterparty {
    background: #fef3c7;
    color: #92400e;
}

.change-line__status-pill.status-approved,
.change-line__status-pill.status-completed {
    background: #dcfce7;
    color: #047857;
}

.change-line__status-pill.status-scheduled {
    background: #e0f2fe;
    color: #0369a1;
}

.change-line__status-pill.status-rejected {
    background: #fee2e2;
    color: #b91c1c;
}

.change-line__status-pill.status-cancelled {
    background: #e5e7eb;
    color: #374151;
}

.change-line__status-pill.status-new {
    background: #312e81;
    color: #ede9fe;
}

.change-line__status-detail {
    font-size: 0.8rem;
    color: #4b5563;
}

.change-line__actions {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.change-line__actions form {
    margin: 0;
}

@media (max-width: 840px) {
    .change-panel__columns-head {
        display: none;
    }

    .change-line {
        grid-template-columns: 1fr;
    }

    .change-line__time {
        order: -1;
        width: 100%;
    }

    .change-line__column--primary,
    .change-line__column--secondary {
        width: 100%;
    }
}
.revision-form label {
    display: flex;
    flex-direction: column;
    font-weight: 600;
    color: #374151;
    gap: 0.4rem;
}

.revision-form input[type="date"],
.revision-form input[type="number"],
.revision-form input[type="text"],
.revision-form select {
    max-width: 18rem;
}

.revision-form .payment-term__mode,
.revision-form .payment-term__field input,
.revision-form .payment-term__field select {
    max-width: 16rem;
}

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

.revision-grid label .hint {
    display: block;
    margin-top: 0.35rem;
}

.revision-grid--pricing {
    align-items: end;
}

.revision-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.revision-form:not(.is-active) {
    opacity: 0.75;
}

.revision-notes textarea {
    margin-top: 0.5rem;
    width: 100%;
}

.detail-section--terms {
    position: relative;
}

.contract-terms-view {
    transition: opacity 0.2s ease;
}

.contract-terms-view.is-hidden {
    display: none;
}

.contract-terms-edit {
    display: none;
    margin-top: 1.5rem;
}

.contract-terms-edit.is-active {
    display: block;
}

.detail-section--terms.is-editing .contract-terms-hint {
    display: none;
}

.detail-section--terms.is-editing > h3::after {
    content: ' – redaguojama versija';
    font-size: 0.9rem;
    font-weight: 400;
    color: #6b7280;
}

.revision-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
}

.contract-terms-edit .pricing-dependent.is-hidden {
    display: none;
}

.company-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.proposal-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 999px;
    font-size: 0.9rem;
    color: #ffffff;
    background: #9ca3af;
}

.proposal-indicator--unread {
    background: #2563eb;
    position: relative;
}

.proposal-indicator--unread::before {
    content: "\2709";
}

.proposal-indicator--changes {
    background: #f59e0b;
    color: #ffffff;
    position: relative;
}

.proposal-indicator--changes::before {
    content: "\21bb";
    font-size: 1rem;
}

.proposal-indicator--decision {
    background: #16a34a;
    position: relative;
}

.proposal-indicator--decision::before {
    content: "\2713";
    font-size: 1rem;
}

.primary-btn {
    background: #1d4ed8;
    color: #ffffff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 600;
    cursor: pointer;
}

.primary-btn:hover {
    background: #1e3a8a;
}

.secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    border: 1px solid #94a3b8;
    color: #1f2937;
    font-weight: 600;
    text-decoration: none;
}

.secondary-btn:hover {
    background: #e2e8f0;
}

.secondary-btn--danger {
    border-color: #f87171;
    color: #b91c1c;
}

.secondary-btn--danger:hover {
    background: #fee2e2;
}

.response-summary {
    background: #f7f9fc;
    border: 1px solid #d8e1f2;
    border-radius: 6px;
    padding: 1rem;
}

.response-summary p {
    margin: 0.25rem 0;
}

.respond-form {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.respond-form .form-actions {
    margin-top: 0;
}

.respond-form textarea {
    width: 100%;
}

.respond-form--secondary {
    border-top: 1px solid #e5e7eb;
    margin-top: 2rem;
    padding-top: 1.5rem;
}

.updates-row-readonly {
    background-color: rgba(148, 163, 184, 0.15);
}

.updates-row-readonly .read-only-control {
    cursor: not-allowed;
    opacity: 0.6;
}

.read-only-note {
    color: #6b7280;
    font-size: 0.9rem;
    margin: 0.75rem 0;
}

.action-panel {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
    margin-bottom: 1.5rem;
}

.action-panel h3 {
    margin: 0 0 0.75rem;
    font-size: 1.05rem;
    color: #1f2937;
}

.action-panel__body {
    display: grid;
    gap: 1rem;
}

.action-panel__form {
    display: grid;
    gap: 0.5rem;
    align-items: start;
}

.action-panel__controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.action-panel__controls > * {
    flex: 1 1 220px;
    min-width: 0;
}

.action-panel__controls button {
    width: 100%;
}

.action-panel__date {
    display: grid;
    gap: 0.25rem;
}

.action-panel__date input[type="date"] {
    width: 100%;
}

.action-panel__hint {
    margin: 0;
    font-size: 0.85rem;
    color: #4b5563;
}
.comment-panel {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.05);
}

.comment-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.comment-panel__header h3 {
    margin: 0;
    font-size: 1.05rem;
    color: #1f2937;
}

.comment-panel__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    padding: 0.1rem 0.65rem;
    border-radius: 999px;
    background: #2563eb;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.8rem;
}

.comment-panel__body {
    max-height: 420px;
    overflow-y: auto;
    padding-right: 0.25rem;
    margin-bottom: 0.75rem;
}

.comment-panel__body::-webkit-scrollbar {
    width: 6px;
}

.comment-panel__body::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.35);
    border-radius: 999px;
}

.change-panel {
    margin-top: 1.5rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.change-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.change-panel__header h3 {
    margin: 0;
    font-size: 1.05rem;
    color: #1f2937;
}

.change-panel__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    padding: 0.1rem 0.65rem;
    border-radius: 999px;
    background: #16a34a;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.8rem;
}

.change-panel__actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.change-panel__actions form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.change-panel__actions button {
    width: 100%;
}

.change-panel__hint {
    margin: 0 0 1rem;
    font-size: 0.85rem;
    color: #4b5563;
}

.change-panel__actions small {
    color: #6b7280;
}

.change-panel__body {
    max-height: 420px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.change-panel__body::-webkit-scrollbar {
    width: 6px;
}

.change-panel__body::-webkit-scrollbar-thumb {
    background: rgba(22, 163, 74, 0.35);
    border-radius: 999px;
}

@media (min-width: 768px) {
    .change-panel__actions {
        flex-direction: row;
    }

    .change-panel__actions form {
        flex: 1;
    }
}

.comment-thread {
    gap: 0.75rem;
}

.comment-thread__item {
    border-radius: 10px;
    padding: 0.6rem 0.85rem;
}

.comment-thread__body {
    margin-top: 0.35rem;
    line-height: 1.45;
    font-size: 0.92rem;
}

.comment-form--compact textarea {
    min-height: 90px;
}

.comment-form--compact label span {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    color: #475569;
}

.comment-form--compact .comment-form__actions {
    justify-content: flex-end;
}

.comment-form__actions .decision-btn--comment {
    padding: 0.45rem 0.9rem;
}

.link-btn {
    border: none;
    background: none;
    color: #2563eb;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.link-btn:hover {
    text-decoration: underline;
}

.link-btn--danger {
    color: #dc2626;
}

.truck-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    background: #ffffff;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

.truck-card__label {
    font-weight: 600;
    color: #1f2937;
}

.truck-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.truck-action-form {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.truck-action-form select {
    border-radius: 8px;
    border: 1px solid #cbd5f5;
    padding: 0.35rem 0.5rem;
    font-size: 0.85rem;
}

.truck-action-form__summary {
    font-size: 0.85rem;
    color: #455a64;
    margin: 0;
}

.truck-action-form__summary.is-empty {
    color: #90a4ae;
}

.truck-card__error {
    font-size: 0.85rem;
    color: #dc2626;
    margin: 0.35rem 0 0;
}

.truck-requests {
    margin-top: 1.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    background: #f8fafc;
}

.truck-requests h4 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    color: #1f2937;
}

.truck-requests ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.truck-request {
    border-radius: 10px;
    border: 1px solid #dbeafe;
    background: #ffffff;
    padding: 0.75rem 1rem;
    box-shadow: 0 4px 8px rgba(15, 23, 42, 0.05);
}

.truck-request__summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #1f2937;
}

.truck-request__details {
    margin: 0.35rem 0 0.25rem;
    font-size: 0.85rem;
    color: #4b5563;
}

.truck-request__meta {
    margin: 0;
    font-size: 0.8rem;
    color: #6b7280;
}

.truck-request__actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.truck-request--pending_owner {
    border-color: #fde68a;
    background: #fffbeb;
}

.truck-request--scheduled {
    border-color: #bfdbfe;
    background: #eff6ff;
}

.truck-request--approved {
    border-color: #bbf7d0;
    background: #ecfdf5;
}

.truck-request--rejected {
    border-color: #fecaca;
    background: #fef2f2;
}

.trailer-config-warning {
    display: none;
    color: #c02626;
    font-size: 1.45rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 0.5rem;
}

.trailer-config-warning ul {
    margin: 0.6rem 0 0;
    padding-left: 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: none;
}

.trailer-config-warning ul li {
    color: #b91c1c;
    line-height: 1.4;
}

.filter-bar {
    margin-bottom: 1rem;
}

.filter-bar select {
    margin-left: 0.5rem;
}

.table--payments {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.table--payments th,
.table--payments td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #e0e0e0;
    text-align: left;
}

.table--payments tr.is-cancelled {
    opacity: 0.6;
}

.table--payments tr.is-overdue td {
    color: #b22222;
    font-weight: 600;
}
.stop-section {
    border: 1px solid #d7d7d7;
    border-radius: 6px;
    padding: 0.75rem;
    background-color: #f9f9f9;
    margin-bottom: 1rem;
}
.stop-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    gap: 0.5rem;
}
.stop-section__title {
    margin: 0;
    font-size: 1rem;
}
.stop-add-btn {
    border: none;
    border-radius: 999px;
    width: 2rem;
    height: 2rem;
    font-size: 1.25rem;
    line-height: 1;
    background-color: #2d7a2d;
    color: #fff;
    cursor: pointer;
}
.stop-add-btn:hover {
    background-color: #236023;
}
.stop-card {
    border: 1px dashed #bdbdbd;
    border-radius: 6px;
    padding: 0.75rem;
    background-color: #fff;
    margin-bottom: 0.75rem;
}
.stop-card--primary {
    border-style: solid;
    border-color: #4a90e2;
}
.stop-card--start {
    border-style: solid;
    border-color: #bdbdbd;
    background-color: #fafafa;
    padding: 0.6rem 0.75rem;
    margin-bottom: 0.6rem;
}
.stop-card--start-summary {
    margin-bottom: 1.1rem;
}
.stop-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    gap: 0.5rem;
}
.stop-card__actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.stop-card__title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.stop-card__badge {
    font-weight: 600;
    color: #333;
}
.stop-card__badge--start {
    font-size: 0.9rem;
    color: #424242;
}
.stop-card__order {
    display: flex;
    align-items: center;
}
.stop-card__order--start {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    background-color: #e0e0e0;
    color: #424242;
    font-weight: 600;
    font-size: 0.95rem;
    justify-content: center;
}
.stop-card__order--start span {
    display: block;
    width: 100%;
    text-align: center;
}
.stop-card__start-grid {
    display: grid;
    gap: 0.35rem 1rem;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    margin-top: 0.25rem;
}
.stop-card__start-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #757575;
}
.stop-card__start-value {
    display: block;
    font-weight: 600;
    color: #212121;
}
.stop-card__start-note {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #5f6368;
}
.stop-order-input {
    width: 3rem;
    padding: 0.2rem 0.35rem;
    border: 1px solid #bdbdbd;
    border-radius: 4px;
    text-align: center;
    font-weight: 600;
    background-color: #f8f9fa;
}
.stop-order-input:focus {
    outline: 2px solid #4a90e2;
    outline-offset: 1px;
    background-color: #fff;
}
.stop-order-input[readonly] {
    background-color: #f0f0f0;
    color: #555;
}
.stop-remove-btn {
    border: none;
    background: transparent;
    color: #d9534f;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}
.stop-remove-btn:hover {
    color: #c9302c;
}
.stop-section__list label {
    display: block;
    margin-bottom: 0.5rem;
}
.stop-section__list .row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.stop-section__list .row label {
    flex: 1;
}
.stop-card input[type="date"].date-range-start,
.stop-card input[type="date"].date-range-end {
    border-color: #f39c12;
    box-shadow: 0 0 0 2px rgba(243, 156, 18, 0.25);
}
.stop-card input[type="date"].date-range-in {
    background-color: #fff6e0;
}
.stop-card input[type="date"].date-range-linked {
    border-color: #f5b041;
}
.stop-date-calendar {
    margin-top: 0.4rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 0.4rem;
    background-color: #fff;
}
.stop-date-calendar__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
    gap: 0.5rem;
}
.stop-date-calendar__month {
    text-transform: capitalize;
    font-weight: 600;
    flex: 1;
    text-align: center;
}
.stop-date-calendar__nav {
    border: none;
    background: #f2f2f2;
    color: #333;
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 4px;
    cursor: pointer;
}
.stop-date-calendar__weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 0.7rem;
    color: #616161;
    margin-bottom: 0.2rem;
}
.stop-date-calendar__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.15rem;
}
.stop-date-calendar__day {
    border: none;
    background: transparent;
    padding: 0.35rem 0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
}
.stop-date-calendar__day.is-outside {
    color: #bdbdbd;
    cursor: default;
}
.stop-date-calendar__day.is-selected {
    background-color: #4a90e2;
    color: #fff;
    font-weight: 600;
}
.stop-date-calendar__day.is-range {
    background-color: #fff2d6;
}
.stop-date-calendar__day.is-range-start,
.stop-date-calendar__day.is-range-end {
    background-color: #f39c12;
    color: #fff;
    font-weight: 600;
}
.details-control {
    text-align: left;
    width: auto;
    min-width: 2.5rem;
}

.extra-stop-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    border: 1px solid #cbd5f5;
    background-color: #fff;
    color: #1d2330;
    font-size: 1.15rem;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.extra-stop-toggle-wrapper {
    display: inline-flex;
    align-items: flex-start;
    gap: 0.35rem;
    max-width: 16rem;
}

.extra-stop-toggle-icon {
    display: inline-block;
    min-width: 0.9rem;
    text-align: center;
}

.extra-stop-toggle {
    flex-shrink: 0;
}

.extra-stop-toggle:hover {
    background-color: #e8efff;
    border-color: #94b4ff;
}

.extra-stop-toggle:focus {
    outline: 2px solid #2d6cdf;
    outline-offset: 2px;
}

.extra-stop-toggle.is-collapsed {
    background-color: #f2f6ff;
}

.stop-sequence-badge {
    position: absolute;
    bottom: 6px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.8rem;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    background-color: rgba(238, 242, 255, 0.95);
    color: #1d2330;
    font-size: 0.85rem;
    line-height: 1;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(31, 41, 55, 0.24);
    pointer-events: none;
    z-index: 2;
}
#updates-table tbody tr.extra-stop-row td {
    vertical-align: top;
    background-color: #fff;
}

#updates-table tbody tr.extra-stop-row td.extra-stop-prefix {
    background-color: transparent;
}

#updates-table tbody tr.extra-stop-row td.pk-vieta,
#updates-table tbody tr.extra-stop-row td.ik-vieta {
    position: relative;
    min-height: 54px;
}
.extra-stop-summary-indicator {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.85rem;
    line-height: 1.35;
    color: #3b4252;
}
.extra-stop-summary-indicator[hidden] {
    display: none !important;
}
.extra-stop-summary-indicator .extra-stop-summary-label {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-right: 0.35rem;
    color: #1f2937;
}
.extra-stop-summary-indicator .extra-stop-summary-sequence {
    font-weight: 600;
    margin-right: 0.35rem;
    color: #1f2937;
}
.extra-stop-summary-indicator .extra-stop-summary-content {
    color: #1f2937;
}
.extra-stop-summary-indicator .extra-stop-summary-status {
    margin-left: 0.35rem;
    font-weight: 600;
    color: #2c5282;
}
.extra-stop-location-sub {
    margin: 0;
    font-size: 0.9rem;
    color: #2f3b52;
    position: relative;
    z-index: 1;
    width: 100%;
}
.extra-stop-location-sub--muted {
    color: #6b7280;
}
.extra-stop-input {
    background-color: #fff;
    border: 1px solid #cbd5f5;
    border-radius: 4px;
    padding: 0.2rem 0.4rem;
    font-size: 0.9rem;
    font-variant-numeric: tabular-nums;
    text-align: center;
}
.extra-stop-input:disabled {
    opacity: 1;
    color: #1f2937;
}
.extra-stop-time-inputs {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.25rem;
}
.extra-stop-time-sep {
    color: #4b5563;
}
.extra-stop-work-stack .extra-stop-input {
    width: 6ch;
    text-align: center;
}
.status-cell--readonly {
    pointer-events: none;
}
.status-cell--readonly .status-button {
    pointer-events: none;
    cursor: default;
    opacity: 0.65;
}
.status-cell--readonly .status-button.status-button--active {
    opacity: 1;
}
.status-cell--readonly .status-conversation-trigger {
    display: none;
}
.extra-stop-comment-cell .komentaras-container {
    width: 100%;
}
.extra-stop-comment-cell .komentaras {
    width: 100%;
    box-sizing: border-box;
    text-align: left;
}
.extra-stop-comment-cell .komentaras:disabled {
    background-color: #fff;
    color: #1f2937;
    opacity: 1;
}
.extra-stop-comment-entry {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}
.extra-stop-comment-entry:last-child {
    margin-bottom: 0;
}
.extra-stop-comment-entry-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #4b5563;
}
.extra-stop-comment-entry--load .extra-stop-comment-entry-label {
    color: #1d4ed8;
}
.extra-stop-comment-entry--unload .extra-stop-comment-entry-label {
    color: #047857;
}
.extra-stop-empty {
    color: #9ca3af;
    text-align: center;
    font-style: italic;
}
.shipment-here {
    margin-top: 2.5rem;
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #fafafa;
}
.shipment-here__header h3 {
    margin: 0 0 0.4rem;
}
.shipment-here__header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}
.shipment-here__regen {
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 0.4rem 0.8rem;
    font-weight: 600;
    cursor: pointer;
}
.shipment-here__regen:hover {
    background: #1d4ed8;
}
.shipment-here__header-note {
    margin: 0;
    color: #4b5563;
    font-size: 0.9rem;
}
.shipment-here__header p {
    margin: 0;
    color: #4b5563;
}
.shipment-here__grid {
    margin-top: 1.5rem;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.shipment-here__empty-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.1rem 1.25rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 320px;
}
.shipment-here__empty-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}
.shipment-here__empty-kicker {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    font-size: 0.75rem;
    color: #6b7280;
}
.shipment-here__empty-title {
    margin: 0.15rem 0 0;
    font-size: 1.1rem;
}
.shipment-here__empty-chip {
    border-radius: 999px;
    padding: 0.2rem 0.65rem;
    background: #eef2ff;
    color: #312e81;
    font-weight: 700;
    border: 1px solid #c7d2fe;
}
.shipment-here__empty-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
}
.shipment-here__empty-stat {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 0.85rem 0.9rem;
}
.shipment-here__empty-label {
    margin: 0;
    color: #6b7280;
    font-size: 0.9rem;
}
.shipment-here__empty-value {
    margin: 0.15rem 0 0;
    font-weight: 700;
    font-size: 1.1rem;
}
.shipment-here__empty-table {
    border-top: 1px solid #e5e7eb;
    padding-top: 0.35rem;
}
.shipment-here__empty-table table {
    width: 100%;
    border-collapse: collapse;
}
.shipment-here__empty-table th,
.shipment-here__empty-table td {
    text-align: left;
    padding: 0.5rem 0.35rem;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.95rem;
}
.shipment-here__empty-table th:first-child,
.shipment-here__empty-table td:first-child {
    padding-left: 0;
}
.shipment-here__empty-table th:last-child,
.shipment-here__empty-table td:last-child {
    padding-right: 0;
}
.shipment-here__empty-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #4b5563;
    font-weight: 700;
    margin-bottom: 0.25rem;
}
.shipment-here__empty-table .empty-row td {
    color: #9ca3af;
    font-style: italic;
}
.route-mini-calculator {
    margin-top: auto;
    border-top: 1px solid #e5e7eb;
    padding-top: 0.25rem;
}

.route-mini-calculator__items {
    display: grid;
    gap: 0.4rem;
}

.route-mini-calculator__item {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 0.5rem;
    align-items: baseline;
}

.route-mini-calculator__label {
    color: #4b5563;
}

.route-mini-calculator__value {
    text-align: right;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.route-mini-calculator__item--accent .route-mini-calculator__value {
    color: #2563eb;
}
.shipment-here__map-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 1100px;
    width: 100%;
    margin: 0;
}
.shipment-here__map-card--inactive {
    gap: 0.5rem;
}
.shipment-here__map {
    width: 100%;
    aspect-ratio: 1 / 1;
    min-height: 320px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    background: #eef2ff;
    overflow: hidden;
    visibility: hidden;
}
.shipment-here__map--inactive {
    display: none;
}
.shipment-here__map--hidden {
    visibility: hidden;
    opacity: 0;
}
.shipment-here__map--ready {
    visibility: visible;
    opacity: 1;
    transition: opacity 120ms ease-in;
}
.shipment-here__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin: 0;
    padding: 0.15rem 0;
    color: #374151;
    font-size: 0.95rem;
}
.shipment-here__legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.shipment-here__legend-swatch {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    display: inline-block;
    box-shadow: 0 0 0 2px #fff, 0 0 0 3px #d1d5db;
}
.shipment-here__legend-swatch--load {
    background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
}
.shipment-here__legend-swatch--start {
    background: linear-gradient(135deg, #facc15 0%, #f59e0b 100%);
}
.shipment-here__legend-swatch--unload {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}
.shipment-here__legend-swatch--via {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
}
.shipment-here__feedback {
    min-height: 1.25rem;
    margin: 0;
    font-weight: 600;
    color: #b91c1c;
}
.shipment-here__feedback--success {
    color: #15803d;
}
.shipment-here__hint {
    margin: 0;
    color: #6b7280;
    font-size: 0.9rem;
}
.shipment-here__placeholder {
    margin: 0;
    color: #9ca3af;
    font-style: italic;
}
.shipment-here__summary h4 {
    margin: 0;
}
.shipment-here__summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1rem;
}
.shipment-here__summary-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.shipment-here__summary-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}
.shipment-here__summary-title h4 {
    margin: 0;
}
.shipment-here__summary-label {
    margin: 0;
    color: #5f6368;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.shipment-here__summary-meta {
    display: grid;
    gap: 0.35rem;
    min-width: 180px;
}
.shipment-here__summary-meta-row {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    font-variant-numeric: tabular-nums;
}
.shipment-here__summary-meta-label {
    color: #5f6368;
    font-size: 0.9rem;
}
.shipment-here__summary-meta-value {
    font-weight: 700;
    color: #202124;
}
.shipment-here__stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
    margin: 0 0 1.5rem;
}
.shipment-here__stats dt {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
}
.shipment-here__stats dd {
    margin: 0.15rem 0 0;
    font-weight: 600;
    color: #111827;
}
.shipment-here__tables {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}
.shipment-here__tables--stacked {
    margin-top: 1.25rem;
}
.shipment-here__table-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1rem;
}
.shipment-here__table-card table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.shipment-here__table-card th,
.shipment-here__table-card td {
    text-align: left;
    padding: 0.35rem 0.25rem;
    border-bottom: 1px solid #f3f4f6;
}
.shipment-here__table-card tbody tr:last-child td {
    border-bottom: none;
}
.shipment-here__table-card td:last-child,
.shipment-here__table-card th:last-child {
    text-align: right;
}
.shipment-here__table-card td:nth-child(2),
.shipment-here__table-card th:nth-child(2) {
    text-align: center;
}
.shipment-here__table-card tbody tr.empty-row td {
    text-align: center;
    color: #9ca3af;
    font-style: italic;
}
.shipment-here__no-truck {
    background: #fff3cd;
    color: #8a6d3b;
    border-radius: 8px;
    padding: 0.75rem 0.9rem;
    font-weight: 600;
}
.shipment-here__table-card input[type='number'] {
    width: 100%;
    padding: 0.2rem 0.35rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.85rem;
    text-align: right;
    background: #fff;
    box-sizing: border-box;
}

.shipment-here__debug {
    margin-top: 1.5rem;
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.35);
}

.shipment-here__debug-header {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
}

.shipment-here__debug-header h4 {
    color: #f8fafc;
    margin: 0;
}

.shipment-here__debug-header p {
    margin: 0;
    color: #cbd5e1;
    font-size: 0.95rem;
}

.shipment-here__debug-output {
    margin: 0;
    width: 100%;
    min-height: 260px;
    max-height: 480px;
    overflow: auto;
    border-radius: 10px;
    padding: 0.75rem;
    background: #0b1224;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.25);
    font-family: 'SFMono-Regular', Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.35;
}


.favorite-chip {
    cursor: pointer;
    user-select: none;
    background: #eef0f6;
    color: #374151;
}

.favorite-chip.is-dragging {
    opacity: 0.5;
}

.favorite-chip--custom {
    color: #374151;
    border: 1px solid rgba(55, 65, 81, 0.16);
}

.favorite-color-menu {
    position: absolute;
    display: none;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 8px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.16);
    z-index: 2500;
}

.favorite-color-menu.is-open {
    display: grid;
}

.favorite-color-menu__swatch {
    width: 24px;
    height: 24px;
    border: 1px solid rgba(17, 24, 39, 0.22);
    border-radius: 6px;
    cursor: pointer;
}


.contract-history-table.contracts-table--compact th,
.contract-history-table.contracts-table--compact td {
    padding: 2px 4px;
    font-size: 12px;
}

.contract-history-table.contracts-table--compact th {
    font-size: 12px;
    text-transform: none;
    letter-spacing: 0;
}

.app-nav__ai-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.ai-tool-btn {
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #0f172a;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.ai-tool-btn--secondary {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
}

.ai-tool-btn--mic.is-recording {
    background: #fee2e2;
    border-color: #ef4444;
    color: #991b1b;
}

.ai-token-widget {
    border: 1px dashed #94a3b8;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 12px;
    color: #334155;
    background: #f8fafc;
}

.ai-modal[hidden] {
    display: none;
}

.ai-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 20px;
}

.ai-modal__panel {
    width: min(2184px, 99vw);
    max-height: 96vh;
    overflow: auto;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.28);
}

.ai-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid #e2e8f0;
}

.ai-modal__body {
    padding: 12px 14px;
}

.ai-assistant__muted {
    color: #64748b;
    font-size: 12px;
}

.ai-modal__footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 0 14px 14px;
}

body.ai-split-active {
    padding-right: 380px;
}

.ai-client-split-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 360px;
    height: 100vh;
    background: #ffffff;
    border-left: 1px solid #dbe3ef;
    box-shadow: -8px 0 24px rgba(15, 23, 42, 0.16);
    z-index: 1250;
    overflow: auto;
    padding: 12px;
}

.ai-review-with-pdf {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    align-items: stretch;
}

.ai-review-with-pdf .ai-review-card,
.ai-review-with-pdf .ai-review-pdf-panel {
    padding: 12px;
}

.ai-review-with-pdf .ai-review-grid {
    grid-template-columns: 216px 1fr !important;
    font-size: 14px !important;
}

.ai-review-with-pdf__main {
    flex: 1 1 50%;
    min-width: 0;
}

.ai-review-with-pdf__side {
    flex: 1 1 50%;
    min-width: 0;
    display: flex;
}

.ai-review-pdf-panel {
    width: 100%;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    background: #f8fafc;
    padding: 10px;
    display: flex;
    flex-direction: column;
}

.ai-review-pdf-panel__title {
    font-weight: 700;
    margin-bottom: 6px;
}

.ai-review-pdf-panel__hint {
    margin: 0 0 8px;
    color: #475569;
    font-size: 12px;
}

.ai-review-pdf-panel__frame {
    width: 100%;
    flex: 1 1 auto;
    min-height: 920px;
    border: 1px solid #dbe3ef;
    border-radius: 6px;
    background: #fff;
}

.ai-review-pdf-panel__filename {
    margin-top: 8px;
    font-size: 12px;
    color: #475569;
    word-break: break-word;
}

.ai-review-pdf-textlayer {
    margin-top: 8px;
    max-height: 280px;
    overflow: auto;
    border: 1px solid #dbe3ef;
    border-radius: 6px;
    background: #ffffff;
    padding: 8px;
    white-space: normal;
}

.ai-review-pdf-textlayer__status {
    font-size: 12px;
    color: #475569;
}

.ai-review-pdf-textlayer__page + .ai-review-pdf-textlayer__page {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
}

.ai-review-pdf-textlayer__page-title {
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
}

.ai-review-pdf-textlayer__page-body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    font-size: 12px;
    line-height: 1.35;
    color: #0f172a;
    white-space: pre-wrap;
    user-select: text;
}

.ai-review-floating-chip {
    position: fixed;
    z-index: 1400;
    max-width: 260px;
    padding: 8px 10px;
    border: 1px dashed #0ea5e9;
    border-radius: 6px;
    background: #f0f9ff;
    color: #0c4a6e;
    font-size: 12px;
    cursor: grab;
    user-select: none;
    word-break: break-word;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.22);
}

.ai-review-floating-chip:active {
    cursor: grabbing;
}

.ai-review-pdf-panel--empty {
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ai-client-split-panel__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.ai-client-split-panel__hint {
    font-size: 12px;
    color: #475569;
    margin: 0 0 12px;
}

.ai-client-split-panel label {
    display: block;
    font-size: 12px;
    color: #334155;
    margin-bottom: 8px;
}

.ai-client-split-panel input {
    display: block;
    width: 100%;
    margin-top: 4px;
    padding: 6px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
}

.ai-client-split-panel__actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

.ai-client-split-panel__actions button {
    border: 1px solid #16a34a;
    background: #16a34a;
    color: #fff;
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
}

.ai-settings__label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

.ai-settings__select {
    width: 100%;
    max-width: 220px;
}

.ai-review-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.ai-review-card {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px;
    background: #f8fafc;
}

.ai-review-card__title {
    font-weight: 700;
    margin-bottom: 8px;
}

.ai-review-card__title--with-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.ai-review-card__action {
    white-space: nowrap;
}

.ai-review-grid {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 6px 8px;
    font-size: 12px;
}

.ai-review-grid__label {
    color: #334155;
}

.ai-review-grid__value {
    color: #0f172a;
    border-bottom: 1px solid #dbe3ef;
    padding-bottom: 2px;
}

.ai-review-grid__value.is-missing {
    border-bottom-color: #ef4444;
    color: #b91c1c;
    font-weight: 700;
}

.ai-review-grid__input {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 5px 7px;
    font-size: 12px;
}

.client-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    gap: 1rem;
}

.client-choice-card {
    border: 1px solid #d8e0ea;
    border-radius: 12px;
    background: #f8fafc;
    padding: 1rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.client-choice-card.is-selected {
    border-color: #2563eb;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.12);
    background: #ffffff;
}

.client-choice-card__header {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    cursor: pointer;
}

.client-choice-card__header input {
    margin-top: 0.2rem;
}

.client-choice-card__header strong,
.client-choice-card__header small {
    display: block;
}

.client-choice-card__header strong {
    color: #0f172a;
    font-size: 0.98rem;
}

.client-choice-card__header small {
    color: #64748b;
    font-size: 0.82rem;
    margin-top: 0.15rem;
}

.client-choice-card__body {
    display: grid;
    gap: 0.7rem;
    margin-top: 0.9rem;
}

.compact-field {
    display: grid;
    gap: 0.25rem;
}

.compact-field > span {
    color: #475569;
    font-size: 0.82rem;
    font-weight: 600;
}

.compact-field--display {
    border-top: 1px solid #e2e8f0;
    padding-top: 0.55rem;
}

@media (max-width: 820px) {
    .client-choice-grid {
        grid-template-columns: 1fr;
    }
}

.client-mode-toggle {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.client-mode-toggle__option {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 600;
    color: #0f172a;
    cursor: pointer;
}

.contract-role-summary {
    display: grid;
    grid-template-columns: minmax(240px, 1.6fr) repeat(2, minmax(180px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.contract-role-summary__item {
    border: 1px solid #dbeafe;
    border-radius: 10px;
    background: #f8fbff;
    padding: 0.75rem 0.85rem;
}

.contract-role-summary__item--type {
    background: #eef6ff;
}

.contract-role-summary__label {
    color: #64748b;
    display: block;
    font-size: 0.78rem;
}

.contract-role-summary__item strong {
    display: block;
    color: #0f172a;
    margin-top: 0.15rem;
}

.contract-role-summary__item small {
    display: block;
    color: #475569;
    margin-top: 0.25rem;
}


@media (max-width: 900px) {
    .contract-role-summary {
        grid-template-columns: 1fr;
    }
}

/* Compact professional carrier contract layout */
.contract-form {
    gap: 0.55rem;
    margin-top: 0.45rem;
}

.contract-form .form-card {
    border-color: #cfd8dc;
    border-radius: 4px;
    padding: 0.45rem 0.55rem;
    box-shadow: none;
}

.contract-form .form-card,
.contract-form .form-actions {
    width: 100%;
    max-width: 1280px;
    box-sizing: border-box;
}

.contract-form .form-card *,
.contract-form .form-card *::before,
.contract-form .form-card *::after {
    box-sizing: border-box;
}

.contract-form .form-card__header {
    gap: 0.1rem;
    margin-bottom: 0.35rem;
}

.contract-form .form-card__header h2 {
    font-size: 0.95rem;
}

.contract-form .form-card__hint,
.contract-form .form-row__hint,
.contract-form .client-choice-card__header small {
    font-size: 0.72rem;
    line-height: 1.2;
}

.contract-form .form-card__body,
.contract-form .form-rows,
.contract-form .client-choice-card__body {
    gap: 0.35rem;
}

.contract-form .client-mode-toggle {
    gap: 0.35rem;
    margin-bottom: 0.3rem;
}

.contract-form .client-mode-toggle__option {
    border: 1px solid #d0d0d0;
    border-radius: 3px;
    background: #f8fafc;
    font-size: 0.78rem;
    padding: 0.18rem 0.4rem;
}

.contract-form .client-mode-toggle__option:has(input:checked) {
    border-color: #2563eb;
    background: #eff6ff;
    color: #1d4ed8;
}

.contract-form .client-choice-grid {
    gap: 0.35rem;
}

.contract-form .client-choice-card {
    border-radius: 4px;
    padding: 0.4rem;
}

.contract-form .client-choice-card.is-selected {
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.10);
}

.contract-form .client-choice-card__header strong,
.contract-form .compact-field > span {
    font-size: 0.78rem;
}

.contract-form .compact-field--display {
    padding-top: 0.4rem;
}

.contract-form .inline-field-group,
.contract-form .inline-choice-group {
    gap: 0.45rem 0.75rem;
}

.contract-form .inline-field {
    gap: 0.22rem;
    min-width: 130px;
}

.contract-form .inline-field span {
    font-size: 0.78rem;
}

.contract-form .form-card__body input[type="text"],
.contract-form .form-card__body input[type="email"],
.contract-form .form-card__body input[type="date"],
.contract-form .form-card__body input[type="number"],
.contract-form .form-card__body textarea,
.contract-form .form-card__body select,
.contract-form .form-row__input input,
.contract-form .form-row__input select,
.contract-form .form-row__input textarea {
    border: 1px solid #c9ced8;
    border-radius: 2px;
    font-size: 12px;
    min-height: 22px;
    padding: 1px 4px;
}

.contract-form .form-card__body select:not([multiple]),
.contract-form .form-row__input select:not([multiple]),
.contract-form .country-rate__select {
    appearance: auto;
    background-color: #ffffff;
    padding-right: 18px;
}

.contract-form .multi-select--compact {
    height: 64px;
    min-height: 64px;
    max-height: 64px;
    overflow-y: auto;
}

.contract-form .pricing-accordion {
    border-radius: 0;
    padding: 0.22rem 0.35rem;
}

.contract-form .pricing-accordion summary {
    font-size: 12px;
}

.contract-form .pricing-accordion__content {
    gap: 0;
    margin-top: 0.25rem;
}

.contract-form .form-card:nth-of-type(3) {
    max-width: 1280px;
}

.contract-form .form-card:nth-of-type(3) .form-rows {
    display: grid;
    grid-template-columns: repeat(3, minmax(104px, 140px) minmax(150px, 1fr));
    align-items: stretch;
    gap: 0;
    overflow: hidden;
    border: 1px solid #d0d0d0;
    border-radius: 0;
    background: #ffffff;
}

.contract-form .form-card:nth-of-type(3) .form-row {
    display: contents;
}

.contract-form .form-card:nth-of-type(3) .form-row__label,
.contract-form .form-card:nth-of-type(3) .form-row__input {
    min-width: 0;
    border-right: 1px solid #d0d0d0;
    border-bottom: 1px solid #d0d0d0;
    padding: 2px 4px;
}

.contract-form .form-card:nth-of-type(3) .form-row__label {
    display: flex;
    align-items: center;
    background: #f2f2f2;
    color: #1f2937;
    font-family: "Calibri", Arial, sans-serif;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.15;
}

.contract-form .form-card:nth-of-type(3) .form-row__input {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1px;
    background: #ffffff;
}

.contract-form .form-card:nth-of-type(3) .form-row__input input,
.contract-form .form-card:nth-of-type(3) .form-row__input select,
.contract-form .form-card:nth-of-type(3) .form-row__input textarea {
    width: 100%;
    max-width: 100%;
}

.contract-form .form-card:nth-of-type(3) .form-row__hint,
.contract-form .form-card:nth-of-type(3) .country-rate__hint,
.contract-form .form-card:nth-of-type(3) .region-preference__hint {
    display: none;
}

.contract-form .form-card:nth-of-type(3) .form-row__input input,
.contract-form .form-card:nth-of-type(3) .form-row__input select {
    height: 22px;
}

.contract-form .form-card:nth-of-type(3) .multi-select--compact {
    height: 64px;
    min-height: 64px;
    max-height: 64px;
    overflow-y: auto;
}

.contract-form .form-card:nth-of-type(3) textarea[name="notes"] {
    min-height: 52px;
}

.contract-form .form-card:nth-of-type(3) .inline-field {
    min-width: 88px;
}

.contract-form .form-card:nth-of-type(3) .inline-field input,
.contract-form .form-card:nth-of-type(3) .inline-field select,
.contract-form .form-card:nth-of-type(3) .inline-field textarea {
    min-width: 0;
    width: 100%;
}

.contract-form .form-card:nth-of-type(3) .inline-choice-group {
    justify-content: flex-start;
}

.contract-form .form-card:nth-of-type(3) .pricing-dependent.is-hidden,
.contract-form .form-card:nth-of-type(3) .payment-term__field.is-hidden {
    display: none;
}

.contract-form .form-card:nth-of-type(3) .pricing-accordion {
    grid-column: 1 / -1;
    margin: 0;
    border-width: 0 0 1px 0;
    border-radius: 0;
    background: #f8fafc;
}

.contract-form .form-card:nth-of-type(3) .pricing-accordion summary {
    padding: 0.08rem 0;
}

.contract-form .form-card:nth-of-type(3) .pricing-accordion__content {
    display: grid;
    grid-template-columns: repeat(3, minmax(104px, 140px) minmax(150px, 1fr));
    gap: 0;
    overflow: hidden;
    margin-top: 0.25rem;
    border: 1px solid #d0d0d0;
    border-radius: 0;
    background: #ffffff;
}

.contract-form .form-card:nth-of-type(3) .pricing-accordion__content .form-row,
.contract-form .form-card:nth-of-type(3) .fuel-index-dependent .form-row {
    display: contents;
    margin: 0;
    padding: 0;
}

.contract-form .form-card:nth-of-type(3) .pricing-accordion__content .form-row__label,
.contract-form .form-card:nth-of-type(3) .pricing-accordion__content .form-row__input,
.contract-form .form-card:nth-of-type(3) .fuel-index-dependent .form-row__label,
.contract-form .form-card:nth-of-type(3) .fuel-index-dependent .form-row__input {
    border-right: 1px solid #d0d0d0;
    border-bottom: 1px solid #d0d0d0;
}

.contract-form .form-card:nth-of-type(3) .country-rate,
.contract-form .form-card:nth-of-type(3) .fuel-index-dependent,
.contract-form .form-card:nth-of-type(3) .payment-term {
    grid-column: 1 / -1;
}

.contract-form .form-card:nth-of-type(3) .fuel-index-dependent {
    display: grid;
    grid-template-columns: repeat(3, minmax(104px, 140px) minmax(150px, 1fr));
    gap: 0;
}

.contract-form .form-card:nth-of-type(3) .form-row:has(.region-preference),
.contract-form .form-card:nth-of-type(3) .form-row.is-textarea {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: minmax(104px, 140px) minmax(0, 1fr);
}

.contract-form .form-card:nth-of-type(3) .form-row:has(.region-preference) .form-row__label,
.contract-form .form-card:nth-of-type(3) .form-row.is-textarea .form-row__label,
.contract-form .form-card:nth-of-type(3) .form-row:has(.region-preference) .form-row__input,
.contract-form .form-card:nth-of-type(3) .form-row.is-textarea .form-row__input {
    border-right: 1px solid #d0d0d0;
    border-bottom: 1px solid #d0d0d0;
}

.contract-form .form-card:nth-of-type(3) .region-preference,
.contract-form .form-card:nth-of-type(3) textarea[name="notes"] {
    max-width: 100%;
}

.contract-form .form-card:nth-of-type(3) .country-rate {
    gap: 0.3rem;
}

.contract-form .form-card:nth-of-type(3) .country-rate__grid {
    gap: 0;
    grid-template-columns: repeat(4, minmax(105px, 1fr)) minmax(70px, auto);
    overflow: hidden;
    border: 1px solid #d0d0d0;
    border-bottom: 0;
}

.contract-form .form-card:nth-of-type(3) .country-rate__field,
.contract-form .form-card:nth-of-type(3) .country-rate__actions {
    border-right: 1px solid #d0d0d0;
    border-bottom: 1px solid #d0d0d0;
    padding: 2px 4px;
}

.contract-form .form-card:nth-of-type(3) .country-rate__field {
    gap: 1px;
    font-size: 12px;
}

.contract-form .form-card:nth-of-type(3) .country-rate__input,
.contract-form .form-card:nth-of-type(3) .country-rate__select {
    border-radius: 2px;
    font-size: 12px;
    height: 22px;
    padding: 1px 4px;
}

.contract-form .form-card:nth-of-type(3) .country-rate__add,
.contract-form .form-card:nth-of-type(3) .region-preference__add-btn {
    border-radius: 2px;
    font-size: 12px;
    min-height: 22px;
    padding: 1px 8px;
}

/* Compact carrier contract detail and terms view */
.detail-main > .contract-card {
    border-color: #d9e2ec;
    border-radius: 10px;
    padding: 0.95rem 1rem;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.detail-main > .contract-card .contract-card__header h3 {
    margin: 0;
}

.detail-main > .contract-card .contract-role-summary {
    gap: 0.55rem;
    margin-top: 0.7rem;
}

.detail-main > .contract-card .contract-role-summary__item {
    border-radius: 8px;
    padding: 0.5rem 0.65rem;
}

.detail-main > .contract-card .contract-role-summary__label,
.detail-main > .contract-card .contract-meta dt {
    font-size: 0.74rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.detail-main > .contract-card .contract-role-summary__item strong,
.detail-main > .contract-card .contract-meta dd {
    font-size: 0.9rem;
}

.detail-main > .contract-card .contract-meta {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.45rem 0.85rem;
    margin-top: 0.75rem;
}

.detail-main > .contract-card .contract-meta dd {
    margin-top: 0.1rem;
}

.detail-section--terms {
    border: 1px solid #d9e2ec;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
    margin: 1rem 0;
    padding: 0.95rem 1rem;
}

.detail-section--terms > h3 {
    margin: 0 0 0.65rem;
}

.contract-terms-table {
    border-collapse: collapse;
    border-spacing: 0;
    font-family: "Calibri", Arial, sans-serif;
    font-size: 12px;
}

.contract-terms-table th {
    background: #f2f2f2;
    border: 1px solid #d0d0d0;
    color: #1f2937;
    font-size: 12px;
    letter-spacing: 0;
    padding: 2px 4px;
    text-align: left;
    text-transform: none;
}

.contract-terms-table td {
    border: 1px solid #d0d0d0;
    line-height: 1.2;
    padding: 2px 4px;
    vertical-align: middle;
}

.contract-terms-table td:first-child {
    color: #0f172a;
    font-weight: 700;
    width: 28%;
}

.contract-terms-table td:nth-child(2) {
    color: #111827;
    font-weight: 600;
    width: 28%;
}

.contract-terms-table td:nth-child(3) {
    color: #475569;
    width: 18%;
}

.contract-terms-table td:nth-child(4) {
    color: #64748b;
}

.contract-terms-hint {
    margin: 0.6rem 0 0;
}

.contract-terms-edit.is-active {
    margin-top: 0.8rem;
}

.contract-terms-edit .revision-grid {
    gap: 0.65rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-bottom: 0.7rem;
}

.contract-terms-edit label {
    gap: 0.28rem;
    font-size: 0.86rem;
}

.contract-terms-edit input[type="date"],
.contract-terms-edit input[type="number"],
.contract-terms-edit input[type="text"],
.contract-terms-edit select,
.contract-terms-edit textarea,
.contract-terms-edit .payment-term__mode,
.contract-terms-edit .payment-term__field input,
.contract-terms-edit .payment-term__field select {
    border-radius: 7px;
    font-size: 0.86rem;
    max-width: 100%;
    padding: 0.38rem 0.52rem;
}

.contract-terms-edit .pricing-accordion {
    border-radius: 8px;
    margin-bottom: 0.6rem;
    padding: 0.5rem 0.7rem;
}

.contract-terms-edit .pricing-accordion__content {
    gap: 0.5rem;
    margin-top: 0.5rem;
}

@media (max-width: 1180px) {
    .contract-form .form-card:nth-of-type(3) .form-rows,
    .contract-form .form-card:nth-of-type(3) .pricing-accordion__content,
    .contract-form .form-card:nth-of-type(3) .fuel-index-dependent {
        grid-template-columns: repeat(2, minmax(104px, 140px) minmax(150px, 1fr));
    }

    .contract-form .form-card:nth-of-type(3) .country-rate__grid {
        grid-template-columns: repeat(2, minmax(120px, 1fr));
    }
}

@media (max-width: 760px) {
    .contract-form .form-card:nth-of-type(3) .form-rows,
    .contract-form .form-card:nth-of-type(3) .pricing-accordion__content,
    .contract-form .form-card:nth-of-type(3) .fuel-index-dependent,
    .contract-form .form-card:nth-of-type(3) .form-row:has(.region-preference),
    .contract-form .form-card:nth-of-type(3) .form-row.is-textarea {
        grid-template-columns: 1fr;
    }

    .contract-terms-table th:nth-child(3),
    .contract-terms-table td:nth-child(3) {
        display: none;
    }
}

/* Tighten compact contract table controls that contain choices or helper widgets. */
.contract-form .form-card:nth-of-type(3) .inline-choice-group,
.contract-form .form-card:nth-of-type(3) label.inline-choice-group {
    align-items: center;
    gap: 4px 8px;
    font-size: 12px;
    line-height: 1.15;
}

.contract-form .form-card:nth-of-type(3) .inline-choice-group label {
    font-size: 12px;
    line-height: 1.15;
    white-space: nowrap;
}

.contract-form .form-card:nth-of-type(3) .inline-choice-group input[type="radio"],
.contract-form .form-card:nth-of-type(3) .inline-choice-group input[type="checkbox"],
.contract-form .form-card:nth-of-type(3) label.inline-choice-group input[type="checkbox"] {
    flex: 0 0 auto;
    height: 12px;
    min-height: 12px;
    width: 12px;
    margin: 0 3px 0 0;
}

.contract-form .form-card:nth-of-type(3) .region-preference {
    gap: 3px;
    padding: 2px;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.contract-form .form-card:nth-of-type(3) .region-preference__label {
    display: none;
}

.contract-form .form-card:nth-of-type(3) .region-preference__add {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) auto;
    gap: 4px;
}

.contract-form .form-card:nth-of-type(3) .region-preference__input {
    height: 22px;
}

.contract-form .form-card:nth-of-type(3) .region-preference__list {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin: 0;
    max-height: 42px;
    overflow-y: auto;
}

.contract-form .form-card:nth-of-type(3) .region-preference__empty {
    margin: 0;
    font-size: 11px;
    line-height: 1.15;
}

/* Match create-contract submit/cancel controls and region chips to Excel density. */
.contract-form > .form-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 0;
    padding: 2px 0;
}

.contract-form > .form-actions .primary-btn,
.contract-form > .form-actions .secondary-btn {
    border-radius: 2px;
    font-family: "Calibri", Arial, sans-serif;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    min-height: 24px;
    padding: 2px 10px;
}

.contract-form > .form-actions .primary-btn {
    border: 1px solid #1d4ed8;
}

.contract-form > .form-actions .secondary-btn {
    background: #ffffff;
    border: 1px solid #94a3b8;
}

.contract-form .form-card:nth-of-type(3) .region-preference__item {
    gap: 3px;
    padding: 1px 3px;
    border-radius: 2px;
    border: 1px solid #c9ced8;
    box-shadow: none;
    background: #ffffff;
}

.contract-form .form-card:nth-of-type(3) .region-preference__badge {
    min-width: 0;
    padding: 0 4px;
    border-radius: 2px;
    background: #eef4ff;
    font-size: 11px;
    line-height: 16px;
    letter-spacing: 0;
}

.contract-form .form-card:nth-of-type(3) .region-preference__actions {
    gap: 2px;
}

.contract-form .form-card:nth-of-type(3) .region-preference__action {
    width: 16px;
    height: 16px;
    border-radius: 2px;
    font-size: 10px;
    line-height: 1;
}

/* Apply the same Excel-style density to the contract detail page. */
.detail-layout {
    gap: 0.75rem;
}

.detail-main > .contract-card,
.detail-section--terms,
.detail-main > .detail-section:not(.detail-section--terms) {
    max-width: 1280px;
}

.detail-main > .contract-card {
    border-color: #cfd8dc;
    border-radius: 4px;
    padding: 0.45rem 0.55rem;
    box-shadow: none;
}

.detail-main > .contract-card .contract-card__header {
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.35rem;
}

.detail-main > .contract-card .contract-card__header h3 {
    font-family: "Calibri", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.2;
}

.detail-main > .contract-card .status-badge,
.detail-main > .contract-card .status-pill {
    border-radius: 2px;
    font-family: "Calibri", Arial, sans-serif;
    font-size: 11px;
    line-height: 1.2;
    padding: 2px 6px;
}

.detail-main > .contract-card .contract-role-summary,
.detail-main > .contract-card .contract-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(104px, 140px) minmax(150px, 1fr));
    gap: 0;
    overflow: hidden;
    border: 1px solid #d0d0d0;
    border-radius: 0;
    background: #ffffff;
}

.detail-main > .contract-card .contract-role-summary {
    margin-top: 0.35rem;
}

.detail-main > .contract-card .contract-meta {
    margin-top: 0;
    border-top: 0;
}

.detail-main > .contract-card .contract-role-summary__item,
.detail-main > .contract-card .contract-meta > div {
    display: contents;
}

.detail-main > .contract-card .contract-role-summary__label,
.detail-main > .contract-card .contract-role-summary__item strong,
.detail-main > .contract-card .contract-meta dt,
.detail-main > .contract-card .contract-meta dd {
    min-width: 0;
    margin: 0;
    border-right: 1px solid #d0d0d0;
    border-bottom: 1px solid #d0d0d0;
    padding: 2px 4px;
    font-family: "Calibri", Arial, sans-serif;
    font-size: 12px;
    line-height: 1.2;
}

.detail-main > .contract-card .contract-role-summary__label,
.detail-main > .contract-card .contract-meta dt {
    display: flex;
    align-items: center;
    background: #f2f2f2;
    color: #1f2937;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}

.detail-main > .contract-card .contract-role-summary__item--type .contract-role-summary__label {
    background: #eef6ff;
}

.detail-main > .contract-card .contract-role-summary__item strong,
.detail-main > .contract-card .contract-meta dd {
    display: block;
    background: #ffffff;
    color: #0f172a;
    font-weight: 600;
}

.detail-section--terms {
    border-color: #cfd8dc;
    border-radius: 4px;
    box-shadow: none;
    margin: 0.55rem 0;
    padding: 0.45rem 0.55rem;
}

.detail-section--terms > h3,
.detail-main > .detail-section:not(.detail-section--terms) > h3 {
    font-family: "Calibri", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.2;
    margin: 0 0 0.35rem;
}

.contract-terms-table {
    width: 100%;
}

.detail-section--terms .contract-terms-hint,
.detail-section--terms .hint {
    font-size: 11px;
    margin-top: 0.35rem;
}

.contract-terms-edit.is-active {
    margin-top: 0.45rem;
}

.contract-terms-edit .revision-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(104px, 140px) minmax(150px, 1fr));
    gap: 0;
    margin-bottom: 0;
    overflow: hidden;
    border: 1px solid #d0d0d0;
    border-bottom: 0;
    background: #ffffff;
}

.contract-terms-edit .revision-grid label,
.contract-terms-edit .revision-grid > div {
    display: grid;
    grid-template-columns: minmax(104px, 140px) minmax(150px, 1fr);
    grid-column: span 2;
    align-items: center;
    gap: 0;
    margin: 0;
    border-bottom: 1px solid #d0d0d0;
    color: #1f2937;
    font-family: "Calibri", Arial, sans-serif;
    font-size: 12px;
    font-weight: 700;
}

.contract-terms-edit .revision-grid label > input,
.contract-terms-edit .revision-grid label > select,
.contract-terms-edit .revision-grid > div > label,
.contract-terms-edit .revision-grid > div > span,
.contract-terms-edit .revision-grid label .hint {
    font-weight: 400;
}

.contract-terms-edit .revision-grid label > input,
.contract-terms-edit .revision-grid label > select {
    border: 1px solid #c9ced8;
    border-radius: 2px;
    font-size: 12px;
    min-height: 22px;
    padding: 1px 4px;
}

.contract-terms-edit .pricing-accordion {
    border-radius: 0;
    margin: 0;
    padding: 0.22rem 0.35rem;
}

.contract-terms-edit .pricing-accordion summary {
    font-family: "Calibri", Arial, sans-serif;
    font-size: 12px;
}

@media (max-width: 1180px) {
    .detail-main > .contract-card .contract-role-summary,
    .detail-main > .contract-card .contract-meta,
    .contract-terms-edit .revision-grid {
        grid-template-columns: repeat(2, minmax(104px, 140px) minmax(150px, 1fr));
    }
}

/* Keep all contract-detail side panels and truck management blocks in the same compact table style. */
.detail-sidebar .action-panel,
.detail-sidebar .comment-panel,
.detail-main .truck-add-card,
.detail-main .decision-card {
    border: 1px solid #cfd8dc;
    border-radius: 4px;
    box-shadow: none;
    padding: 0.45rem 0.55rem;
    background: #ffffff;
}

.detail-sidebar .action-panel,
.detail-sidebar .comment-panel {
    margin-bottom: 0.55rem;
}

.detail-sidebar .action-panel h3,
.detail-sidebar .comment-panel__header h3,
.detail-main .truck-add-card__title {
    font-family: "Calibri", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.2;
    margin: 0;
}

.detail-sidebar .action-panel__body,
.detail-sidebar .action-panel__form,
.detail-sidebar .comment-panel__body,
.detail-main .truck-add-card__form {
    gap: 0.35rem;
}

.detail-sidebar .action-panel__form,
.detail-main .truck-add-card__form.decision-card {
    border-top-width: 0;
}

.detail-sidebar .action-panel__controls,
.detail-main .decision-actions__submit,
.detail-main .truck-add-card--manual .decision-actions__submit {
    gap: 4px;
}

.detail-sidebar .action-panel__controls > * {
    flex: 1 1 140px;
}

.detail-sidebar .action-panel__hint,
.detail-sidebar .comment-panel__count,
.detail-main .truck-add-card .hint,
.detail-main .truck-add-card__error {
    font-size: 11px;
    line-height: 1.2;
    margin: 0;
}

.detail-sidebar .comment-panel__count {
    min-width: 0;
    border-radius: 2px;
    padding: 1px 6px;
}

.detail-sidebar .primary-btn,
.detail-sidebar .secondary-btn,
.detail-main .truck-add-card .primary-btn,
.detail-main .truck-add-card .secondary-btn,
.detail-main .truck-add-card .decision-btn,
.detail-main .decision-card .decision-btn {
    border-radius: 2px;
    font-family: "Calibri", Arial, sans-serif;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    min-height: 24px;
    padding: 2px 10px;
    transform: none;
    box-shadow: none;
}

.detail-sidebar .primary-btn:hover,
.detail-sidebar .secondary-btn:hover,
.detail-main .truck-add-card .decision-btn:hover,
.detail-main .decision-card .decision-btn:hover {
    transform: none;
    box-shadow: none;
}

.detail-sidebar .secondary-btn,
.detail-main .truck-add-card .secondary-btn {
    background: #ffffff;
    border: 1px solid #94a3b8;
}

.detail-sidebar .action-panel__date,
.detail-main .truck-action-form__input {
    display: grid;
    grid-template-columns: minmax(90px, 128px) minmax(0, 1fr);
    align-items: center;
    gap: 0;
    margin: 0;
    border: 1px solid #d0d0d0;
    border-bottom: 0;
    font-family: "Calibri", Arial, sans-serif;
    font-size: 12px;
}

.detail-sidebar .action-panel__date span,
.detail-main .truck-action-form__input span {
    align-self: stretch;
    display: flex;
    align-items: center;
    background: #f2f2f2;
    border-right: 1px solid #d0d0d0;
    border-bottom: 1px solid #d0d0d0;
    color: #1f2937;
    font-weight: 700;
    padding: 2px 4px;
}

.detail-sidebar .action-panel__date input,
.detail-main .truck-action-form__input input {
    width: 100%;
    min-height: 22px;
    border: 0;
    border-bottom: 1px solid #d0d0d0;
    border-radius: 0;
    font-size: 12px;
    padding: 1px 4px;
}

.detail-main .truck-add-card--manual > .truck-add-card__header,
.detail-main .truck-add-card__header {
    gap: 0.2rem;
    margin-bottom: 0.35rem;
}

.detail-main .truck-add-card--manual code,
.detail-main #dispo-link-code {
    display: inline-block;
    max-width: 100%;
    overflow-wrap: anywhere;
    border: 1px solid #d0d0d0;
    background: #f8fafc;
    border-radius: 2px;
    color: #0f172a;
    font-family: "Calibri", Arial, sans-serif;
    font-size: 12px;
    padding: 2px 4px;
}

.detail-main .truck-add-card--manual form input[type="text"] {
    border: 1px solid #c9ced8;
    border-radius: 2px;
    font-size: 12px;
    min-height: 22px;
    padding: 1px 4px;
}

.detail-main .truck-add-card--manual .decision-actions__submit form {
    display: flex;
    gap: 4px;
    align-items: center;
}

@media (max-width: 760px) {
    .detail-sidebar .action-panel__date,
    .detail-main .truck-action-form__input {
        grid-template-columns: 1fr;
    }
}

/* Final compact pass for revision mode and change summary inside contract detail. */
.contract-terms-edit .revision-grid {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 0;
    border: 1px solid #d0d0d0;
    border-right: 0;
    border-bottom: 0;
    margin-bottom: 0.35rem;
}

.contract-terms-edit .revision-grid label,
.contract-terms-edit .revision-grid > div {
    display: flex;
    flex-direction: column;
    grid-column: auto;
    align-items: stretch;
    gap: 2px;
    border-right: 1px solid #d0d0d0;
    border-bottom: 1px solid #d0d0d0;
    padding: 2px 4px;
    background: #ffffff;
    font-family: "Calibri", Arial, sans-serif;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.15;
}

.contract-terms-edit .revision-grid label > input,
.contract-terms-edit .revision-grid label > select,
.contract-terms-edit .revision-grid label > textarea {
    width: 100%;
    height: 22px;
    min-height: 22px;
    border: 1px solid #c9ced8;
    border-radius: 2px;
    font-size: 12px;
    padding: 1px 4px;
}

.contract-terms-edit .revision-grid label .hint {
    display: none;
}

.contract-terms-edit .revision-grid > div > label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.15;
}

.contract-terms-edit .revision-grid > div input[type="radio"],
.contract-terms-edit .revision-grid > div input[type="checkbox"],
.contract-terms-edit .revision-grid label > input[type="checkbox"] {
    height: 12px;
    min-height: 12px;
    width: 12px;
    margin: 0 3px 0 0;
}

.contract-terms-edit .revision-notes {
    display: grid;
    grid-template-columns: minmax(104px, 140px) minmax(0, 1fr);
    gap: 0;
    border: 1px solid #d0d0d0;
    margin-top: 0.35rem;
    font-family: "Calibri", Arial, sans-serif;
    font-size: 12px;
    font-weight: 700;
}

.contract-terms-edit .revision-notes textarea {
    min-height: 48px;
    border: 0;
    border-left: 1px solid #d0d0d0;
    border-radius: 0;
    font-size: 12px;
    padding: 2px 4px;
}

.contract-terms-edit .revision-actions {
    justify-content: flex-start;
    margin-top: 0.35rem;
}

.contract-terms-edit .revision-actions .primary-btn {
    border: 1px solid #1d4ed8;
    border-radius: 2px;
    font-family: "Calibri", Arial, sans-serif;
    font-size: 12px;
    font-weight: 700;
    min-height: 24px;
    padding: 2px 10px;
}

.change-panel {
    border-color: #cfd8dc;
    border-radius: 4px;
    box-shadow: none;
    margin-top: 0.55rem;
    padding: 0.45rem 0.55rem;
}

.change-panel__header {
    margin-bottom: 0.35rem;
}

.change-panel__header h3 {
    font-family: "Calibri", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.2;
}

.change-panel__badge,
.change-line__tag,
.change-line__status-pill {
    border-radius: 2px;
    font-family: "Calibri", Arial, sans-serif;
    font-size: 11px;
    line-height: 1.2;
    padding: 1px 5px;
    letter-spacing: 0;
    text-transform: none;
}

.change-panel__hint,
.change-panel__actions small,
.change-line__extra,
.change-line__status-detail,
.change-line__truck-note,
.change-line__warnings {
    font-size: 11px;
    line-height: 1.2;
}

.change-panel__columns-head,
.change-line {
    display: grid;
    grid-template-columns: minmax(96px, 128px) minmax(0, 1fr) minmax(0, 1fr);
    gap: 0;
    border-left: 1px solid #d0d0d0;
    border-top: 1px solid #d0d0d0;
}

.change-panel__head,
.change-line__cell {
    border-right: 1px solid #d0d0d0;
    border-bottom: 1px solid #d0d0d0;
    padding: 2px 4px;
}

.change-panel__head {
    background: #f2f2f2;
    font-family: "Calibri", Arial, sans-serif;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.15;
}

.change-line {
    border-top: 0;
    font-family: "Calibri", Arial, sans-serif;
    font-size: 12px;
    line-height: 1.2;
}

.change-line__cell {
    background: #ffffff;
}

.change-line.is-unread .change-line__cell {
    background: #f8fafc;
}

.change-line__column,
.change-line__extra,
.change-line__status,
.change-line__actions {
    gap: 3px;
}

.change-line__actor,
.change-line__action,
.change-line__truck-label {
    font-size: 12px;
}

.change-panel__actions {
    gap: 0.35rem;
    margin-bottom: 0.35rem;
}

.change-panel__actions button,
.change-line__actions button,
.change-line__actions .secondary-btn,
.change-line__actions .primary-btn {
    border-radius: 2px;
    font-family: "Calibri", Arial, sans-serif;
    font-size: 12px;
    font-weight: 700;
    min-height: 24px;
    padding: 2px 10px;
}

@media (max-width: 840px) {
    .change-panel__columns-head,
    .change-line {
        grid-template-columns: 1fr;
    }
}

/* Compact managed trucks table and taller change summary in contract detail. */
.detail-main .truck-availability--managed {
    margin-top: 0.35rem;
    padding: 0;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    background: #ffffff;
}

.detail-main .truck-availability--managed .truck-availability__table-wrapper {
    max-height: none;
    overflow-x: hidden;
    overflow-y: visible;
    border: 0;
    border-radius: 0;
}

.detail-main .truck-summary-table--managed {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    border-collapse: collapse;
    font-family: "Calibri", Arial, sans-serif;
    font-size: 11px;
}

.detail-main .truck-summary-table--managed th,
.detail-main .truck-summary-table--managed td {
    border-right: 1px solid #d0d0d0;
    border-bottom: 1px solid #d0d0d0;
    color: #1f2937;
    font-size: 11px;
    line-height: 1.15;
    padding: 2px 4px;
    vertical-align: top;
    white-space: normal;
    overflow-wrap: anywhere;
}

.detail-main .truck-summary-table--managed th:last-child,
.detail-main .truck-summary-table--managed td:last-child {
    border-right: 0;
}

.detail-main .truck-summary-table--managed thead th {
    background: #f2f2f2;
    color: #1f2937;
    font-weight: 700;
}

.detail-main .truck-summary-table--managed .truck-summary-table__filters th {
    background: #f8fafc;
    padding: 1px 2px;
}

.detail-main .truck-summary-table--managed .truck-summary-table__filter-input,
.detail-main .truck-summary-table--managed select,
.detail-main .truck-summary-table--managed input[type="text"],
.detail-main .truck-summary-table--managed input[type="date"] {
    width: 100%;
    min-height: 20px;
    border: 1px solid #c9ced8;
    border-radius: 2px;
    font-family: "Calibri", Arial, sans-serif;
    font-size: 11px;
    padding: 1px 3px;
}

.detail-main .truck-summary-table--managed .truck-summary-table__actions {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.detail-main .truck-summary-table--managed .truck-action-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
    margin: 0;
}

.detail-main .truck-summary-table--managed .truck-action-form__select,
.detail-main .truck-summary-table--managed .truck-action-form__date,
.detail-main .truck-summary-table--managed .truck-action-form__input {
    flex: 1 1 92px;
    min-width: 0;
    margin: 0;
}

.detail-main .truck-summary-table--managed .primary-btn,
.detail-main .truck-summary-table--managed .secondary-btn,
.detail-main .truck-summary-table--managed .link-btn {
    min-height: 20px;
    border: 1px solid #94a3b8;
    border-radius: 2px;
    background: #ffffff;
    color: #1f2937;
    font-family: "Calibri", Arial, sans-serif;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.1;
    padding: 1px 6px;
    text-decoration: none;
    transform: none;
    box-shadow: none;
}

.detail-main .truck-summary-table--managed .primary-btn,
.detail-main .truck-summary-table--managed .secondary-btn:not(.secondary-btn--danger) {
    border-color: #1d4ed8;
    color: #1d4ed8;
}

.detail-main .truck-summary-table--managed .secondary-btn--danger {
    border-color: #dc2626;
    color: #dc2626;
}

.detail-main .truck-summary-table--managed .truck-card__status,
.detail-main .truck-summary-table--managed .truck-card__note,
.detail-main .truck-summary-table--managed .truck-action-form__summary,
.detail-main .truck-summary-table--managed .truck-card__error {
    display: block;
    margin: 0;
    font-size: 11px;
    line-height: 1.15;
}

.detail-main .truck-summary-table--managed th:nth-child(1) { width: 11%; }
.detail-main .truck-summary-table--managed th:nth-child(2) { width: 10%; }
.detail-main .truck-summary-table--managed th:nth-child(3) { width: 12%; }
.detail-main .truck-summary-table--managed th:nth-child(4) { width: 12%; }
.detail-main .truck-summary-table--managed th:nth-child(5) { width: 10%; }
.detail-main .truck-summary-table--managed th:nth-child(6) { width: 14%; }
.detail-main .truck-summary-table--managed th:nth-child(7) { width: 11%; }
.detail-main .truck-summary-table--managed th:nth-child(8) { width: 20%; }

.change-panel__body {
    max-height: 2100px;
}

/* Final revision editor cleanup: keep every expandable block in the same compact table style. */
.contract-terms-edit {
    gap: 0.35rem;
}

.contract-terms-edit .pricing-accordion {
    border: 1px solid #d0d0d0;
    border-radius: 2px;
    background: #ffffff;
    margin-bottom: 0.35rem;
    padding: 0;
}

.contract-terms-edit .pricing-accordion summary {
    display: flex;
    align-items: center;
    min-height: 24px;
    background: #f2f2f2;
    border-bottom: 1px solid #d0d0d0;
    color: #1f2937;
    font-family: "Calibri", Arial, sans-serif;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.15;
    padding: 2px 22px 2px 6px;
}

.contract-terms-edit .pricing-accordion:not([open]) summary {
    border-bottom: 0;
}

.contract-terms-edit .pricing-accordion summary::after {
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    color: #475569;
    font-size: 11px;
}

.contract-terms-edit .pricing-accordion[open] summary::after {
    transform: translateY(-50%) rotate(180deg);
}

.contract-terms-edit .pricing-accordion__content,
.contract-terms-edit .fuel-index-dependent {
    display: grid;
    grid-template-columns: repeat(3, minmax(150px, 1fr));
    gap: 0;
    margin: 0;
    border: 0;
    background: #ffffff;
}

.contract-terms-edit .pricing-accordion__content > label,
.contract-terms-edit .fuel-index-dependent > label,
.contract-terms-edit .payment-term .form-row,
.contract-terms-edit .country-rate__field,
.contract-terms-edit .country-rate__actions {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    min-height: 44px;
    margin: 0;
    border-right: 1px solid #d0d0d0;
    border-bottom: 1px solid #d0d0d0;
    background: #ffffff;
    color: #1f2937;
    font-family: "Calibri", Arial, sans-serif;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.15;
    padding: 2px 4px;
}

.contract-terms-edit .pricing-accordion__content > label:nth-child(3n),
.contract-terms-edit .fuel-index-dependent > label:nth-child(3n),
.contract-terms-edit .payment-term .form-row:nth-child(3n),
.contract-terms-edit .country-rate__field:nth-child(3n) {
    border-right: 0;
}

.contract-terms-edit .fuel-index-dependent {
    grid-column: 1 / -1;
}

.contract-terms-edit .pricing-accordion__content > label:first-child:has(.js-fuel-index-toggle) {
    grid-column: 1 / -1;
    min-height: 28px;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    border-right: 0;
}

.contract-terms-edit .pricing-accordion__content input,
.contract-terms-edit .pricing-accordion__content select,
.contract-terms-edit .payment-term input,
.contract-terms-edit .payment-term select,
.contract-terms-edit .country-rate__input,
.contract-terms-edit .country-rate__select {
    width: 100%;
    height: 22px;
    min-height: 22px;
    border: 1px solid #c9ced8;
    border-radius: 2px;
    font-family: "Calibri", Arial, sans-serif;
    font-size: 12px;
    padding: 1px 4px;
}

.contract-terms-edit .pricing-accordion__content input[type="checkbox"] {
    width: 12px;
    height: 12px;
    min-height: 12px;
    margin: 0 4px 0 0;
}

.contract-terms-edit .payment-term__mode-row .form-row__input,
.contract-terms-edit .payment-term__field .form-row__input {
    max-width: none;
    width: 100%;
}

.contract-terms-edit .payment-term .form-row__label,
.contract-terms-edit .country-rate__field span {
    display: block;
    background: transparent;
    border: 0;
    padding: 0;
}

.contract-terms-edit .country-rate {
    grid-column: 1 / -1;
    display: block;
    gap: 0;
}

.contract-terms-edit .country-rate__grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    gap: 0;
    border-top: 0;
}

.contract-terms-edit .country-rate__actions {
    align-items: stretch;
}

.contract-terms-edit .country-rate__add,
.contract-terms-edit .country-rate__remove {
    min-height: 22px;
    border: 1px solid #1d4ed8;
    border-radius: 2px;
    background: #ffffff;
    color: #1d4ed8;
    font-family: "Calibri", Arial, sans-serif;
    font-size: 12px;
    font-weight: 700;
    padding: 1px 8px;
    text-decoration: none;
}

.contract-terms-edit .country-rate__hint,
.contract-terms-edit .country-rate__empty {
    display: none;
}

.contract-terms-edit .country-rate__list {
    gap: 0;
    margin: 0;
}

.contract-terms-edit .country-rate__item {
    border: 0;
    border-top: 1px solid #d0d0d0;
    border-radius: 0;
    gap: 4px;
    padding: 2px 4px;
}

.contract-terms-edit .country-rate__tag {
    border-radius: 2px;
    font-size: 11px;
    min-width: 0;
    padding: 1px 5px;
}

@media (max-width: 980px) {
    .contract-terms-edit .pricing-accordion__content,
    .contract-terms-edit .fuel-index-dependent,
    .contract-terms-edit .country-rate__grid {
        grid-template-columns: 1fr;
    }

    .contract-terms-edit .pricing-accordion__content > label,
    .contract-terms-edit .fuel-index-dependent > label,
    .contract-terms-edit .payment-term .form-row,
    .contract-terms-edit .country-rate__field,
    .contract-terms-edit .country-rate__actions {
        border-right: 0;
    }
}

.dashboard-page {
    padding: 18px 22px 34px;
    background: #f5f7fb;
    min-height: calc(100vh - 120px);
}

.dashboard-hero,
.dashboard-filters,
.dashboard-segments,
.dashboard-card {
    background: #ffffff;
    border: 1px solid #dbe3ef;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.dashboard-hero {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 20px;
    margin-bottom: 14px;
}

.dashboard-hero h1 {
    margin: 2px 0 8px;
    color: #0f172a;
    font-size: 28px;
}

.dashboard-hero p {
    margin: 0;
    color: #64748b;
}

.dashboard-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #2563eb !important;
    font-weight: 800;
    font-size: 12px;
}

.dashboard-actions,
.dashboard-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.dashboard-actions button,
.dashboard-actions select,
.dashboard-filters button,
.dashboard-filters input,
.dashboard-filters select {
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #ffffff;
    min-height: 36px;
    padding: 7px 10px;
    color: #0f172a;
    font-weight: 600;
}

.dashboard-actions button,
.dashboard-filters button {
    cursor: pointer;
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.dashboard-filters {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.dashboard-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 14px;
}

.dashboard-segments {
    padding: 14px;
    align-self: start;
    position: sticky;
    top: 10px;
}

.dashboard-panel-title {
    font-weight: 800;
    margin-bottom: 10px;
    color: #0f172a;
}

.dashboard-segment-pill {
    display: flex;
    align-items: center;
    gap: 9px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 8px;
    cursor: pointer;
    font-weight: 700;
    color: #334155;
}

.dashboard-segment-pill:has(input:checked) {
    border-color: #60a5fa;
    background: #eff6ff;
    color: #1d4ed8;
}

.dashboard-hint,
.dashboard-no-data,
.dashboard-empty {
    color: #64748b;
    font-size: 13px;
}

.dashboard-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 12px;
}

.dashboard-active-filters span {
    background: #e0f2fe;
    border: 1px solid #bae6fd;
    color: #075985;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 700;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    gap: 14px;
}

.dashboard-card {
    padding: 16px;
    min-height: 360px;
}

.dashboard-card header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 12px;
    margin-bottom: 12px;
}

.dashboard-card header p {
    margin: 0 0 3px;
    color: #64748b;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.dashboard-card h2 {
    margin: 0;
    font-size: 20px;
    color: #0f172a;
}

.dashboard-card header > strong {
    font-size: 28px;
    color: #2563eb;
}

.dashboard-card h3 {
    margin: 14px 0 8px;
    color: #334155;
    font-size: 14px;
}

.dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 8px;
}

.dashboard-metrics div {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 9px;
    background: #f8fafc;
}

.dashboard-metrics span {
    display: block;
    color: #64748b;
    font-size: 12px;
    margin-bottom: 3px;
}

.dashboard-metrics b {
    color: #0f172a;
    font-size: 18px;
}

.dashboard-bars {
    display: grid;
    gap: 8px;
}

.dashboard-bar-label {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    color: #334155;
    margin-bottom: 3px;
}

.dashboard-bar-label span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-bar-track {
    height: 9px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}

.dashboard-bar-track span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #22c55e);
    border-radius: inherit;
}

.dashboard-trend {
    display: flex;
    align-items: end;
    gap: 4px;
    min-height: 76px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 8px;
    background: #f8fafc;
}

.dashboard-trend span {
    flex: 1;
    min-width: 5px;
    background: linear-gradient(180deg, #60a5fa, #2563eb);
    border-radius: 4px 4px 0 0;
}

.dashboard-error {
    color: #b91c1c;
}

@media (max-width: 900px) {
    .dashboard-hero,
    .dashboard-layout {
        display: block;
    }

    .dashboard-actions {
        margin-top: 12px;
    }

    .dashboard-segments {
        position: static;
        margin-bottom: 14px;
    }
}

/* Dashboard calendar: intentionally mirrors darbuotojai report date bubble styling. */
.dashboard-calendar.report-quick-selects { display:grid; gap:6px; }
.dashboard-calendar .report-quick-selects__row { display:flex; align-items:center; gap:8px; }
.dashboard-calendar .report-quick-selects__row--primary { flex-wrap: nowrap; }
.dashboard-calendar .orders-date-group { display:inline-flex; align-items:center; gap:6px; }
.dashboard-calendar .toolbar-select { min-height:34px; border:1px solid #c9ced8; border-radius:20px; padding:4px 10px; background:#fff; color:inherit; font-weight:400; }
.dashboard-calendar .quick-range { width:100%; overflow-x:auto; padding-bottom:4px; }
.dashboard-calendar .quick-range__track { position:relative; display:grid; grid-template-rows:auto auto; gap:4px; width:max-content; min-width:100%; }
.dashboard-calendar .quick-group { display:flex; flex-wrap:wrap; gap:6px; }
.dashboard-calendar .quick-group--months { position:relative; height:30px; min-width:max-content; }
.dashboard-calendar .quick-group--weeks { flex-wrap:nowrap; overflow-x:visible; width:max-content; gap:4px; --week-pill-width:2.1rem; --week-pill-gap:4px; }
.dashboard-calendar .quick-group--weeks .quick-btn { min-width:var(--week-pill-width); width:var(--week-pill-width); justify-content:center; padding:3px 4px; font-size:0.78rem; }
.dashboard-calendar .quick-btn { border:1px solid #cfd4e4; background:#ffffff; color:inherit; border-radius:20px; padding:6px 12px; font-size:0.9rem; font-weight:400; cursor:pointer; white-space:nowrap; display:inline-flex; align-items:center; }
.dashboard-calendar .quick-btn--month { position:absolute; inset:0 auto auto 0; justify-content:center; padding:4px 8px; font-size:0.78rem; text-align:center; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.dashboard-calendar .quick-btn.is-past { background:#ffe6c2; }
.dashboard-calendar .quick-btn.is-current { background:#d6f5d6; }
.dashboard-calendar .quick-btn.is-active { border-color:#1f7aec; background:#eaf2ff; box-shadow:0 0 0 1px rgba(31,122,236,0.2); }
.dashboard-calendar .quick-btn.is-range { border-color:#1f7aec; background:#eaf2ff; box-shadow:0 0 0 1px rgba(31,122,236,0.2); }
.dashboard-calendar .quick-btn.is-current.is-active,.dashboard-calendar .quick-btn.is-current.is-range { background:#d6f5d6; }
.dashboard-calendar .date-nav { position:relative; display:inline-flex; }
.dashboard-calendar .date-nav__label { border:1px solid #c9ced8; background:#fff; color:#243042; border-radius:20px; padding:6px 12px; font-size:13px; font-weight:400; display:inline-flex; align-items:center; gap:4px; cursor:pointer; }
.dashboard-calendar .date-nav__popover { position:absolute; top:calc(100% + 6px); left:0; z-index:20; width:250px; background:#fff; border:1px solid #d5dbe8; border-radius:8px; box-shadow:0 12px 24px rgba(15,23,42,.16); padding:10px; }
.dashboard-calendar .date-nav__fields { display:grid; gap:8px; }
.dashboard-calendar .date-nav__fields label { display:grid; gap:4px; font-size:12px; color:#4b5563; font-weight:400; }
.dashboard-calendar .date-nav__input { border:1px solid #c9ced8; border-radius:6px; padding:6px 8px; font-weight:400; }
.dashboard-calendar .date-nav__actions { display:flex; justify-content:flex-end; gap:6px; margin-top:8px; }
.dashboard-calendar .date-nav__actions button { border:1px solid #c9ced8; background:#fff; color:inherit; border-radius:6px; padding:5px 10px; font-size:inherit; font-weight:400; cursor:pointer; }

/* Reset dashboard toolbar button defaults so calendar bubbles match the darbuotojai page exactly. */
.dashboard-calendar .quick-btn,
.dashboard-calendar .date-nav__label,
.dashboard-calendar .date-nav__actions button {
    min-height: 0;
    line-height: normal;
}

.dashboard-calendar .date-nav__input {
    min-height: 0;
}

.dashboard-segment-start {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.dashboard-segment-start__btn {
    border: 1px solid #c9ced8;
    border-radius: 20px;
    background: #ffffff;
    color: #243042;
    cursor: pointer;
    font-size: 13px;
    padding: 6px 14px;
}

.dashboard-segment-start__btn.is-active {
    border-color: #1f7aec;
    background: #eaf2ff;
    box-shadow: 0 0 0 1px rgba(31, 122, 236, 0.2);
}

.dashboard-orders-panel {
    background: #ffffff;
    border: 1px solid #dbe3ef;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    padding: 14px;
}

.dashboard-orders-panel__header {
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 10px;
}

.dashboard-orders-panel__header h2 {
    color: #0f172a;
    font-size: 20px;
    margin: 0 0 4px;
}

.dashboard-orders-panel__header p {
    color: #64748b;
    font-size: 13px;
    margin: 0;
}

.dashboard-orders-panel__link,
.dashboard-mini-btn {
    border: 1px solid #c9ced8;
    border-radius: 6px;
    background: #fff;
    color: #243042;
    cursor: pointer;
    font-size: 13px;
    padding: 4px 10px;
    text-decoration: none;
    white-space: nowrap;
}

.dashboard-orders-table-wrap {
    overflow-x: auto;
    width: 100%;
}

.dashboard-orders-table.dataTable th,
.dashboard-orders-table.dataTable td {
    box-sizing: border-box;
    font-size: 12px;
    padding: 3px 6px;
    white-space: nowrap;
}

.dashboard-orders-table.dataTable th {
    background: #f8fafc;
    color: #334155;
}

.dashboard-orders-footer {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    margin-top: 8px;
}

.dashboard-muted {
    color: #64748b;
}

.dashboard-orders-config {
    background: #ffffff;
    border: 1px solid #dbe3ef;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    margin-bottom: 14px;
    padding: 14px;
}

.dashboard-orders-config__header {
    align-items: flex-start;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 12px;
}

.dashboard-orders-config__header h2 {
    color: #0f172a;
    font-size: 20px;
    margin: 0 0 4px;
}

.dashboard-orders-config__header p {
    color: #64748b;
    font-size: 13px;
    margin: 0;
}

.dashboard-orders-config__actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.dashboard-orders-config__actions button {
    border: 1px solid #c9ced8;
    border-radius: 6px;
    background: #fff;
    color: #243042;
    cursor: pointer;
    font-size: 13px;
    padding: 4px 10px;
}

.dashboard-column-options {
    display: grid;
    gap: 6px;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    max-height: 230px;
    overflow: auto;
    padding-right: 4px;
}

.dashboard-column-option {
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    gap: 7px;
    padding: 7px 9px;
    color: #334155;
    font-size: 13px;
}

.dashboard-column-option:has(input:checked) {
    border-color: #1f7aec;
    background: #eaf2ff;
}

.dashboard-line-card {
    background: #ffffff;
    border: 1px solid #dbe3ef;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    grid-column: 1 / -1;
    padding: 16px;
}

.dashboard-line-card header {
    align-items: flex-start;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 12px;
}

.dashboard-line-card header p {
    color: #64748b;
    font-size: 12px;
    letter-spacing: 0.06em;
    margin: 0 0 3px;
    text-transform: uppercase;
}

.dashboard-line-card h2 {
    color: #0f172a;
    font-size: 20px;
    margin: 0;
}

.dashboard-line-card header > strong {
    color: #2563eb;
    font-size: 24px;
}

.dashboard-line-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-bottom: 12px;
}

.dashboard-line-legend span {
    align-items: center;
    color: #334155;
    display: inline-flex;
    font-size: 13px;
    gap: 6px;
}

.dashboard-line-legend i {
    border-radius: 999px;
    display: inline-block;
    height: 10px;
    width: 10px;
}

.dashboard-line-legend small {
    color: #64748b;
}

.dashboard-line-chart-wrap {
    overflow-x: auto;
    width: 100%;
}

.dashboard-line-chart-wrap svg {
    display: block;
    min-width: 900px;
    width: 100%;
}

.dashboard-line-grid {
    stroke: #e2e8f0;
    stroke-width: 1;
}

.dashboard-line-axis-stroke {
    stroke: #94a3b8;
    stroke-width: 1;
}

.dashboard-line-axis {
    fill: #64748b;
    font-size: 12px;
}

.dashboard-line-axis--date {
    font-size: 10px;
}

.dashboard-orders-config__controls {
    align-items: flex-end;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.dashboard-chart-control {
    color: #334155;
    display: flex;
    flex-direction: column;
    font-size: 12px;
    font-weight: 600;
    gap: 4px;
}

.dashboard-chart-control select {
    background: #ffffff;
    border: 1px solid #c9ced8;
    border-radius: 6px;
    color: #243042;
    min-width: 170px;
    padding: 5px 8px;
}

.dashboard-chart-control select:disabled {
    background: #eef2f7;
    color: #94a3b8;
}

.dashboard-correlation-wrap {
    overflow-x: auto;
}

.dashboard-correlation-table {
    border-collapse: collapse;
    min-width: 520px;
    width: 100%;
}

.dashboard-correlation-table th,
.dashboard-correlation-table td {
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
    padding: 9px 10px;
    text-align: left;
}

.dashboard-correlation-table th {
    color: #64748b;
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.dashboard-correlation-table i {
    border-radius: 999px;
    display: inline-block;
    height: 9px;
    margin-right: 7px;
    width: 9px;
}

.dashboard-chart-note {
    color: #64748b;
    flex: 1 1 260px;
    font-size: 12px;
    line-height: 1.35;
    margin: 0;
    max-width: 360px;
}

.dashboard-line-plot-bg {
    fill: #fbfdff;
    stroke: #e8eef7;
    stroke-width: 1;
}

.dashboard-line-path {
    filter: url(#dashboardLineShadow);
    transition: stroke-width 0.15s ease, opacity 0.15s ease;
}

.dashboard-line-point {
    stroke: #ffffff;
    stroke-width: 2;
}

.dashboard-scaled-axis line:first-child {
    opacity: 0.72;
    stroke-width: 2;
}

.dashboard-scaled-axis-tick {
    opacity: 0.8;
    stroke-width: 1.5;
}

.dashboard-scaled-axis-label {
    font-size: 10px;
    font-weight: 700;
}

.dashboard-scaled-axis-title {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.dashboard-scaled-value-label rect {
    opacity: 0.94;
    stroke-width: 1;
}

.dashboard-scaled-value-label text {
    font-size: 10px;
    font-weight: 800;
    dominant-baseline: middle;
    pointer-events: none;
}

.dashboard-line-day-grid {
    stroke: #edf2f8;
    stroke-width: 0.7;
}

.dashboard-line-hit {
    fill: transparent;
    pointer-events: all;
}

.dashboard-scaled-value-label {
    font-size: 8px;
    font-weight: 700;
    dominant-baseline: middle;
    letter-spacing: 0.01em;
}

.dashboard-hover-content {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.12s ease;
}

.dashboard-hover-slice:hover .dashboard-hover-content {
    opacity: 1;
}

.dashboard-hover-zone {
    fill: transparent;
    pointer-events: all;
}

.dashboard-hover-line {
    stroke: #64748b;
    stroke-dasharray: 3 3;
    stroke-width: 0.9;
}

.dashboard-hover-point {
    stroke: #ffffff;
    stroke-width: 2;
}

.dashboard-hover-box {
    fill: rgba(255, 255, 255, 0.94);
    stroke: #dbe3ef;
    stroke-width: 0.7;
    filter: url(#dashboardLineShadow);
}

.dashboard-hover-date {
    fill: #0f172a;
    font-size: 8px;
    font-weight: 650;
}

.dashboard-hover-row {
    fill: #334155;
    font-size: 7.5px;
    font-weight: 600;
}

.dashboard-chart-capture {
    fill: transparent;
    pointer-events: all;
}

.dashboard-orders-split {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    gap: 14px;
    align-items: start;
}

.dashboard-orders-panel {
    border: 1px solid #dbe4ef;
    border-radius: 12px;
    background: #ffffff;
    padding: 12px;
}

.dashboard-orders-panel h3 {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 800;
    color: #111827;
}

.dashboard-orders-panel p {
    margin: 0 0 10px;
    font-size: 12px;
    color: #64748b;
}

.dashboard-condition-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.dashboard-condition-control {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    color: #475569;
}

.dashboard-condition-control select {
    width: 100%;
    min-height: 32px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #fff;
    color: #0f172a;
    padding: 5px 8px;
    font-size: 12px;
}

@media (max-width: 980px) {
    .dashboard-orders-split {
        grid-template-columns: 1fr;
    }
}

.dashboard-line-value-label {
    font-size: 7.5px;
    font-weight: 500;
    pointer-events: none;
}

.dashboard-filters {
    position: sticky;
    top: 149px;
    z-index: 999;
    margin: 0 -22px 8px;
    padding: 6px 22px 8px;
    background: #f5f7fb;
    box-shadow: 0 1px 0 rgba(148, 163, 184, 0.18);
}

.dashboard-orders-config {
    border: 1px solid #d7e1ee;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
    padding: 12px;
}

.dashboard-orders-config__header {
    margin-bottom: 12px;
}

.dashboard-orders-config__controls {
    align-items: end;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
}

.dashboard-chart-control {
    color: #475569;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.dashboard-chart-control select,
.dashboard-condition-control select {
    border: 1px solid #cbd8e8;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
    min-height: 34px;
    color: #0f172a;
}

.dashboard-orders-config__actions {
    align-items: end;
    margin-left: auto;
}

.dashboard-orders-config__actions button {
    border: 1px solid #cbd8e8;
    border-radius: 999px;
    background: #ffffff;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
    min-height: 34px;
    padding: 6px 12px;
}

.dashboard-orders-config__actions button:hover,
.dashboard-column-option:hover,
.dashboard-condition-control select:focus,
.dashboard-chart-control select:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.16);
    outline: none;
}

.dashboard-orders-panel {
    border: 1px solid #d7e1ee;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.055);
    padding: 14px;
}

.dashboard-column-options {
    gap: 8px;
    max-height: 252px;
    padding: 2px 4px 2px 2px;
}

.dashboard-column-option {
    border: 1px solid #dbe5f2;
    border-radius: 12px;
    background: #fbfdff;
    color: #1f2937;
    font-size: 12px;
    font-weight: 700;
    padding: 8px 10px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.dashboard-column-option input {
    accent-color: #2563eb;
}

.dashboard-column-option:has(input:checked) {
    border-color: #60a5fa;
    background: #eff6ff;
    color: #1d4ed8;
    box-shadow: inset 3px 0 0 #2563eb;
}

.dashboard-condition-options {
    gap: 12px;
}

.dashboard-condition-control {
    color: #475569;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.dashboard-orders-config {
    border-color: #cfd8e3;
    border-radius: 6px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.045);
    padding: 8px 10px;
}

.dashboard-orders-config__header {
    margin-bottom: 8px;
}

.dashboard-orders-config__controls {
    gap: 8px;
}

.dashboard-chart-control,
.dashboard-condition-control {
    color: #334155;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.055em;
}

.dashboard-chart-control select,
.dashboard-condition-control select {
    border-color: #cbd5e1;
    border-radius: 4px;
    min-height: 28px;
    padding: 4px 7px;
    font-size: 11px;
    box-shadow: none;
}

.dashboard-orders-config__actions button {
    border-radius: 4px;
    min-height: 28px;
    padding: 4px 9px;
    font-size: 11px;
    box-shadow: none;
}

.dashboard-orders-config__actions button:hover,
.dashboard-column-option:hover,
.dashboard-condition-control select:focus,
.dashboard-chart-control select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.11);
}

.dashboard-orders-split {
    gap: 10px;
}

.dashboard-orders-panel {
    border-color: #cfd8e3;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    padding: 10px;
}

.dashboard-orders-panel h3 {
    margin-bottom: 8px;
    font-size: 12px;
    letter-spacing: 0.02em;
}

.dashboard-column-options {
    gap: 5px;
    max-height: 224px;
    padding: 0 3px 0 0;
}

.dashboard-column-option {
    border-color: #d7dee8;
    border-radius: 4px;
    background: #ffffff;
    font-size: 11px;
    font-weight: 600;
    gap: 6px;
    padding: 5px 7px;
}

.dashboard-column-option:has(input:checked) {
    border-color: #2563eb;
    background: #f4f8ff;
    color: #1e40af;
    box-shadow: inset 2px 0 0 #2563eb;
}

.dashboard-condition-options {
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.dashboard-page {
    padding: 6px 10px 16px;
}

.dashboard-filters {
    margin: 0 -10px 4px;
    padding: 3px 10px 4px;
    gap: 5px;
}

.dashboard-calendar.report-quick-selects {
    gap: 2px;
}

.dashboard-calendar .report-quick-selects__row {
    gap: 5px;
}

.dashboard-calendar .quick-btn {
    border-radius: 4px;
    padding: 2px 7px;
    font-size: 0.72rem;
    min-height: 22px;
}

.dashboard-calendar .quick-group--weeks .quick-btn {
    padding: 2px 3px;
    font-size: 0.66rem;
}

.dashboard-calendar .quick-btn--month {
    padding: 2px 5px;
    font-size: 0.66rem;
}

.dashboard-calendar .date-nav__label,
.dashboard-filters input,
.dashboard-filters select {
    min-height: 26px;
    padding: 4px 8px;
    font-size: 11px;
}

.dashboard-segment-start {
    margin-bottom: 5px;
}

.dashboard-segment-start__btn {
    border-radius: 4px;
    font-size: 11px;
    padding: 3px 9px;
}

.dashboard-orders-config {
    margin-bottom: 6px;
    padding: 5px 7px;
}

.dashboard-orders-config__header {
    margin-bottom: 5px;
}

.dashboard-orders-config__controls {
    gap: 6px;
}

.dashboard-chart-control select,
.dashboard-condition-control select,
.dashboard-orders-config__actions button {
    min-height: 24px;
    padding: 3px 6px;
    font-size: 10px;
}

.dashboard-chart-control,
.dashboard-condition-control {
    font-size: 8px;
    gap: 2px;
}

.dashboard-orders-split {
    gap: 6px;
}

.dashboard-orders-panel {
    padding: 6px;
}

.dashboard-orders-panel h3 {
    margin-bottom: 5px;
    font-size: 11px;
}

.dashboard-column-options {
    grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
    max-height: 124px;
    gap: 3px;
}

.dashboard-column-option {
    font-size: 10px;
    gap: 4px;
    padding: 3px 5px;
}

.dashboard-condition-options {
    grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
    gap: 5px;
}

.dashboard-active-filters {
    gap: 4px;
    margin-bottom: 5px;
}

.dashboard-active-filters span {
    border-radius: 4px;
    padding: 2px 5px;
    font-size: 10px;
}

.dashboard-grid {
    gap: 6px;
}

.dashboard-line-card {
    border-radius: 6px;
    padding: 6px;
}

.dashboard-line-card header {
    margin-bottom: 4px;
    padding-bottom: 4px;
}

.dashboard-line-card header > strong {
    font-size: 14px;
}

.dashboard-line-legend {
    gap: 3px 8px;
    margin-bottom: 4px;
}

.dashboard-line-legend span {
    font-size: 10px;
    gap: 4px;
}

.dashboard-line-legend i {
    height: 7px;
    width: 7px;
}

.dashboard-line-chart-wrap svg {
    min-width: 760px;
}

.dashboard-line-axis--date {
    font-size: 7px;
    letter-spacing: 0.01em;
}

.dashboard-line-axis--date {
    font-size: 6px;
    font-weight: 800;
}

.dashboard-line-axis--date {
    font-size: 7.5px;
    font-weight: 500;
    letter-spacing: 0;
}

.dashboard-column-option span {
    display: inline-flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.dashboard-column-option b {
    font-size: inherit;
    font-weight: inherit;
    line-height: 1.05;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-column-option small {
    color: #64748b;
    font-size: 8px;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-column-option:has(input:checked) small {
    color: #2563eb;
}

.dashboard-calendar .date-nav__label,
.dashboard-filters input,
.dashboard-filters select {
    font-size: 12px;
}

.dashboard-segment-start__btn {
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
}

.dashboard-chart-control,
.dashboard-condition-control {
    font-size: 9px;
}

.dashboard-chart-control select,
.dashboard-condition-control select,
.dashboard-orders-config__actions button {
    font-size: 11px;
}

.dashboard-column-option {
    font-size: 11.5px;
    min-height: 30px;
}

.dashboard-column-option small {
    font-size: 8.5px;
}

.dashboard-active-filters span,
.dashboard-line-legend span {
    font-size: 11px;
}

.dashboard-line-axis--date,
.dashboard-line-value-label {
    font-size: 8px;
}

.dashboard-selected-lines {
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0 0 6px;
    padding: 0 0 6px;
}

.dashboard-selected-lines__label,
.dashboard-selected-lines__empty {
    color: #475569;
    font-size: 11px;
    font-weight: 800;
    margin-right: 2px;
}

.dashboard-selected-line {
    align-items: center;
    background: #eff6ff;
    border: 1px solid #93c5fd;
    border-radius: 4px;
    color: #1d4ed8;
    cursor: pointer;
    display: inline-flex;
    gap: 4px;
    min-height: 24px;
    padding: 2px 6px;
}

.dashboard-selected-line b {
    font-size: 11px;
    font-weight: 800;
}

.dashboard-selected-line small {
    color: #2563eb;
    font-size: 8px;
    font-weight: 700;
}

.dashboard-selected-line i {
    color: #1e3a8a;
    font-style: normal;
    font-weight: 900;
    line-height: 1;
}

.dashboard-metric-source {
    margin-bottom: 6px;
}

.dashboard-metric-source h4 {
    color: #334155;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.04em;
    margin: 0 0 4px;
    text-transform: uppercase;
}

.dashboard-metric-options {
    display: grid;
    gap: 3px;
    grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
}

.dashboard-metric-source__toggle {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #d7dee8;
    border-radius: 4px;
    color: #0f172a;
    cursor: pointer;
    display: flex;
    font-size: 11px;
    font-weight: 800;
    gap: 6px;
    justify-content: flex-start;
    min-height: 28px;
    padding: 4px 7px;
    width: 100%;
}

.dashboard-metric-source__toggle i {
    align-items: center;
    background: #e2e8f0;
    border-radius: 3px;
    display: inline-flex;
    font-style: normal;
    height: 16px;
    justify-content: center;
    width: 16px;
}

.dashboard-metric-source__toggle small {
    color: #64748b;
    font-size: 10px;
    margin-left: auto;
}

.dashboard-metric-source.is-expanded .dashboard-metric-source__toggle {
    border-color: #93c5fd;
    background: #eff6ff;
    color: #1d4ed8;
}

.dashboard-metric-source.is-expanded .dashboard-metric-source__toggle i {
    background: #bfdbfe;
}

.dashboard-metric-source h4 {
    display: none;
}

.dashboard-metric-options {
    margin-top: 4px;
}

.dashboard-panel-toggle {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #d7dee8;
    border-radius: 4px;
    color: #0f172a;
    cursor: pointer;
    display: flex;
    font-size: 12px;
    font-weight: 850;
    gap: 7px;
    margin-bottom: 6px;
    min-height: 30px;
    padding: 5px 8px;
    width: 100%;
}

.dashboard-panel-toggle i {
    align-items: center;
    background: #e2e8f0;
    border-radius: 3px;
    display: inline-flex;
    font-style: normal;
    height: 17px;
    justify-content: center;
    width: 17px;
}

.dashboard-panel-toggle.is-expanded {
    border-color: #93c5fd;
    background: #eff6ff;
    color: #1d4ed8;
}

.dashboard-metric-source h4 {
    display: block;
}

.dashboard-metric-source__toggle {
    display: none;
}

.dashboard-column-options[hidden],
.dashboard-condition-options[hidden] {
    display: none !important;
}

/* Compact expanded dashboard chooser lists. */
.dashboard-column-options {
    display: block;
    max-height: none;
    overflow: visible;
    padding: 0;
}

.dashboard-metric-source {
    border-top: 1px solid #e5eaf2;
    margin: 3px 0 0;
    padding: 5px 0 0;
}

.dashboard-metric-source:first-child {
    border-top: 0;
    margin-top: 0;
    padding-top: 0;
}

.dashboard-metric-source h4 {
    align-items: baseline;
    color: #334155;
    display: flex;
    font-size: 10px;
    font-weight: 850;
    gap: 5px;
    letter-spacing: 0.045em;
    line-height: 1.1;
    margin: 0 0 4px;
    text-transform: uppercase;
}

.dashboard-metric-source h4 small {
    color: #94a3b8;
    font-size: 9px;
    font-weight: 750;
    letter-spacing: 0;
}

.dashboard-metric-options {
    display: grid;
    gap: 2px 8px;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    margin: 0;
}

.dashboard-column-option {
    background: transparent;
    border: 0;
    border-radius: 3px;
    box-shadow: none;
    color: #1f2937;
    font-size: 10px;
    font-weight: 650;
    gap: 5px;
    line-height: 1.15;
    min-height: 20px;
    padding: 2px 4px;
}

.dashboard-column-option input {
    height: 12px;
    margin: 0;
    width: 12px;
}

.dashboard-column-option span,
.dashboard-column-option b {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-column-option small {
    display: none;
}

.dashboard-column-option:hover {
    background: #f8fafc;
}

.dashboard-column-option:has(input:checked) {
    background: #eef5ff;
    border: 0;
    box-shadow: inset 2px 0 0 #2563eb;
    color: #1d4ed8;
}

.dashboard-condition-options {
    gap: 4px 8px;
    grid-template-columns: repeat(auto-fit, minmax(136px, 1fr));
}

.dashboard-condition-control {
    font-size: 9px;
    gap: 2px;
}

.dashboard-condition-control select {
    border-radius: 3px;
    font-size: 10px;
    min-height: 23px;
    padding: 2px 20px 2px 6px;
}

/* Extra compact spacing for dense Dashboardai selector sections. */
.dashboard-metric-source {
    margin-top: 2px;
    padding-top: 3px;
}

.dashboard-metric-source h4 {
    font-size: 9.5px;
    margin-bottom: 2px;
}

.dashboard-metric-source h4 small {
    font-size: 8.5px;
}

.dashboard-metric-options {
    gap: 1px 6px;
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
}

.dashboard-column-option {
    font-size: 9.5px;
    gap: 4px;
    line-height: 1.05;
    min-height: 17px;
    padding: 1px 3px;
}

.dashboard-column-option input {
    height: 11px;
    width: 11px;
}

.dashboard-column-option:has(input:checked) {
    box-shadow: inset 2px 0 0 #2563eb;
}

.dashboard-condition-options {
    gap: 3px 6px;
    grid-template-columns: repeat(auto-fit, minmax(126px, 1fr));
}

.dashboard-panel-headline {
    align-items: stretch;
    display: flex;
    gap: 6px;
}

.dashboard-panel-headline .dashboard-panel-toggle {
    flex: 0 0 190px;
    margin-bottom: 0;
}

.dashboard-panel-headline input[type="search"] {
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    color: #0f172a;
    flex: 1 1 220px;
    font-size: 11px;
    min-height: 30px;
    padding: 4px 9px;
}

.dashboard-orders-panel--metrics .dashboard-selected-lines {
    margin-top: 4px;
}

.dashboard-orders-config__controls[hidden] {
    display: none !important;
}

.dashboard-orders-panel--metrics .dashboard-orders-config__controls {
    border-top: 1px solid #e5eaf2;
    gap: 4px 6px;
    margin-top: 4px;
    padding-top: 4px;
}

/* Cleaner Dashboardai controls without heavy outer frames. */
.dashboard-orders-config {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 2px 10px 4px;
}

.dashboard-orders-split {
    gap: 8px;
}

.dashboard-orders-panel {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
}

.dashboard-panel-headline {
    gap: 5px;
}

.dashboard-panel-toggle {
    background: transparent;
    border-color: transparent;
    border-radius: 3px;
    min-height: 26px;
    padding: 3px 4px;
}

.dashboard-panel-toggle:hover,
.dashboard-panel-toggle.is-expanded {
    background: #f4f8ff;
    border-color: #d7e3f4;
}

.dashboard-panel-toggle i {
    height: 15px;
    width: 15px;
}

.dashboard-panel-headline input[type="search"] {
    background: #ffffff;
    min-height: 26px;
    padding: 3px 8px;
}

.dashboard-selected-lines {
    background: transparent;
    border: 0;
    padding: 2px 0 0;
}

.dashboard-selected-line {
    border-radius: 3px;
    min-height: 18px;
    padding: 2px 5px;
}

/* Unified Rodikliai panel and stable sticky calendar. */
.dashboard-filters {
    top: 0;
    z-index: 1100;
}

.dashboard-condition-options {
    border-top: 1px solid #e5eaf2;
    margin-top: 4px;
    padding-top: 4px;
}

.dashboard-selected-lines:empty {
    display: none;
}

.dashboard-selected-lines__label,
.dashboard-selected-lines__empty {
    display: none;
}

.dashboard-selected-line {
    background: #dcfce7;
    border: 0;
    color: #166534;
}

.dashboard-selected-line small,
.dashboard-selected-line i {
    color: #166534;
}

.dashboard-selected-line:hover {
    background: #bbf7d0;
}

.dashboard-orders-split {
    grid-template-columns: minmax(0, 1fr);
}

/* Keep selected metrics indicated in-place only. */
.dashboard-column-option:has(input:checked) {
    background: #dcfce7;
    border: 0;
    box-shadow: none;
    color: #166534;
}

.dashboard-column-option:has(input:checked):hover {
    background: #bbf7d0;
}

.dashboard-orders-split {
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
}

.dashboard-condition-options {
    border-top: 0;
    margin-top: 0;
    padding-top: 0;
}

.dashboard-column-option:has(input:checked) {
    border: 1px solid #86efac;
}

/* Keep expanded Dashboardai controls above sticky date bubbles. */
.dashboard-filters {
    z-index: 40;
}

.dashboard-orders-config {
    position: relative;
    z-index: 60;
}

.google-route-modal[hidden] { display: none; }
.google-route-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.55);
  padding: 1rem;
}
.google-route-modal__panel {
  width: min(1100px, 96vw);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.35);
  padding: 1rem;
}
.google-route-modal__header,
.google-route-modal__actions {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  align-items: center;
}
.google-route-modal__map {
  height: min(68vh, 640px);
  min-height: 420px;
  margin: .75rem 0;
  border-radius: 10px;
  border: 1px solid #dbeafe;
}
.google-route-modal__notice { color: #1e3a8a; }
.shipment-here__google-edit {
  border: 1px solid #2563eb;
  border-radius: 8px;
  padding: .45rem .75rem;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
  cursor: pointer;
}

/* Sticky DataTables controls: keep search/info/pagination reachable while wide tables scroll. */
.dataTables_wrapper .dataTables_filter {
    position: sticky;
    right: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.96);
    padding: 2px 0 4px 8px;
}

.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    position: sticky;
    bottom: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.96);
    padding-top: 4px;
    padding-bottom: 4px;
}

.dataTables_wrapper .dataTables_info {
    left: 0;
}

.dataTables_wrapper .dataTables_paginate {
    right: 0;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
    width: max-content;
    max-width: 100%;
    overflow: visible;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    box-sizing: border-box;
}
