.logistics-board-shell {
    width: min(100%, 1472px);
    max-width: 1472px;
    margin: 0 auto;
    padding: 0.35rem 0 1.35rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.logistics-detail-shell {
    width: min(100%, 1320px);
    max-width: 1320px;
    margin: 0 auto;
    padding: 0.35rem clamp(1rem, 3vw, 2.4rem) 1.35rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

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

.logistics-board-filters {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
}

.logistics-board-search {
    max-width: 560px;
}

.logistics-board-list {
    width: 100%;
    display: block;
    gap: 0;
}

.logistics-table-shell {
    margin-top: 0;
    overflow-x: hidden;
}

.logistics-table {
    table-layout: fixed;
}

.logistics-col-status {
    width: 11%;
}

.logistics-col-order {
    width: 25%;
}

.logistics-col-party {
    width: 28%;
}

.logistics-col-movement {
    width: 24%;
}

.logistics-col-actions {
    width: 12%;
}

.logistics-table .shipment-cell,
.logistics-table .supplier-cell,
.logistics-table .inspector-cell,
.logistics-table .date-cell,
.logistics-table .deadline-cell {
    min-width: 0;
}

.logistics-table .qc-compact-line span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logistics-table .logistics-status-badge {
    min-height: 0;
    padding: 0.34rem 0.72rem;
    font-size: 0.76rem;
    text-transform: none;
}

.logistics-table-actions-cell {
    white-space: nowrap;
}

.logistics-table-actions {
    justify-content: flex-end;
    gap: 0.28rem;
    flex-wrap: nowrap;
}

.logistics-table-action {
    width: 34px;
    min-width: 34px;
    height: 32px;
    min-height: 32px;
    padding: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.logistics-board-cta:disabled {
    cursor: not-allowed;
    opacity: 0.58;
    box-shadow: none;
}

.logistics-rollout-note,
.logistics-readonly-note,
.logistics-empty-copy {
    margin: 0;
    color: #64748b;
    font-size: 0.92rem;
    line-height: 1.5;
}

.logistics-row-shell {
    width: 100%;
}

.logistics-row {
    grid-template-columns: 58px minmax(0, 1fr) auto;
    min-height: 98px;
    padding: 1rem 1rem;
    border: 1px solid rgba(203, 213, 225, 0.72);
    border-radius: 8px;
    box-shadow: none;
}

.logistics-row-icon--draft,
.logistics-row-icon--booked {
    background: linear-gradient(145deg, rgba(232, 244, 241, 0.96) 0%, rgba(244, 248, 246, 0.98) 100%);
    color: #526760;
}

.logistics-row-icon--moving {
    background: linear-gradient(145deg, rgba(219, 234, 254, 0.96) 0%, rgba(239, 246, 255, 0.98) 100%);
    color: #2563eb;
}

.logistics-row-icon--delivered {
    background: linear-gradient(145deg, rgba(187, 247, 208, 0.95) 0%, rgba(240, 253, 244, 0.98) 100%);
    color: #15803d;
}

.logistics-row-icon--exception {
    background: linear-gradient(145deg, rgba(254, 226, 226, 0.96) 0%, rgba(255, 247, 237, 0.98) 100%);
    color: #dc2626;
}

.logistics-row-icon--cancelled {
    background: linear-gradient(145deg, rgba(226, 232, 240, 0.96) 0%, rgba(248, 250, 252, 0.98) 100%);
    color: #475569;
}

.logistics-row-subgrid {
    display: grid;
    grid-template-columns: minmax(130px, 0.8fr) minmax(150px, 1fr) minmax(190px, 1fr);
    gap: 0.55rem 0.9rem;
    margin-top: 0.55rem;
    color: #64748b;
    font-size: 0.86rem;
}

.logistics-row-subgrid span {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logistics-row-subgrid i {
    color: #245e4a;
    font-size: 0.8rem;
}

.logistics-row-action {
    gap: 0.7rem;
    justify-content: flex-end;
    min-width: 0;
}

.logistics-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0.32rem 0.78rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
    white-space: nowrap;
}

.logistics-status-badge--draft {
    background: #eef2f7;
    color: #475569;
}

.logistics-status-badge--booked {
    background: #e0f2fe;
    color: #0369a1;
}

.logistics-status-badge--moving {
    background: #dbeafe;
    color: #1d4ed8;
}

.logistics-status-badge--delivered {
    background: #dcfce7;
    color: #166534;
}

.logistics-status-badge--exception {
    background: #fee2e2;
    color: #b91c1c;
}

.logistics-status-badge--cancelled {
    background: #e2e8f0;
    color: #334155;
}

.logistics-share-btn {
    color: #245e4a;
}

.logistics-detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.85fr);
    align-items: stretch;
    gap: 1.65rem;
    padding: clamp(1.25rem, 2.4vw, 1.85rem);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(203, 213, 225, 0.78);
    border-top: 4px solid #7dd3fc;
    box-shadow: none;
}

.logistics-detail-hero-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.logistics-back-btn {
    align-self: flex-start;
    margin-bottom: 1rem;
    padding: 0.48rem 0.9rem;
}

.logistics-detail-hero-main h2 {
    margin: 0.35rem 0 0.45rem;
    color: #151c19;
    font-size: clamp(1.65rem, 2.2vw, 2.15rem);
    line-height: 1.15;
}

.logistics-detail-hero-main p {
    margin: 0.18rem 0;
    color: #53647d;
    font-size: 0.96rem;
    line-height: 1.45;
}

.logistics-detail-owner {
    margin-top: 0.9rem !important;
    color: #8a95aa !important;
    font-size: 0.88rem !important;
}

.logistics-detail-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(203, 213, 225, 0.9);
}

.logistics-data-pill,
.logistics-access-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 34px;
    padding: 0.42rem 0.78rem;
    border: 1px solid rgba(203, 213, 225, 0.92);
    border-radius: 999px;
    background: #f8fafc;
    color: #334155;
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
}

.logistics-access-pill i {
    color: #1d4ed8;
}

.logistics-data-pill i {
    color: #2563eb;
}

.logistics-access-pill {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.logistics-detail-hero-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 1rem;
    padding-left: 1.4rem;
    border-left: 1px solid rgba(203, 213, 225, 0.9);
}

.logistics-detail-hero-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.logistics-collab-btn {
    padding: 0.48rem 0.9rem;
}

.logistics-shipment-card {
    width: 100%;
    padding: 1rem;
    border: 1px solid rgba(125, 211, 252, 0.62);
    border-top: 4px solid #7dd3fc;
    border-radius: 8px;
    background: #f0f9ff;
}

.logistics-shipment-card div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}

.logistics-shipment-card span {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    color: #0369a1;
    font-size: 0.82rem;
    font-weight: 800;
}

.logistics-shipment-card strong {
    color: #075985;
    font-size: 0.86rem;
    text-transform: uppercase;
}

.logistics-shipment-card p {
    margin: 0.7rem 0 0;
    color: #334155;
    font-size: 0.92rem;
    line-height: 1.5;
}

.logistics-audit-card,
.logistics-evidence-panel {
    padding: 1.45rem 1.5rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(203, 213, 225, 0.78);
    box-shadow: none;
}

.logistics-audit-card h3,
.logistics-evidence-header h3 {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    color: #0f172a;
    font-size: 1.05rem;
}

.logistics-audit-container {
    margin-top: 1.2rem;
    padding: 0.9rem 0 0.1rem;
    overflow-x: auto;
}

.logistics-audit-horizontal {
    flex-wrap: nowrap;
    min-width: 760px;
}

.logistics-audit-horizontal .audit-trail-item {
    min-width: 120px;
}

.logistics-audit-horizontal .audit-trail-item strong {
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.78rem;
}

.logistics-detail-work-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.85fr);
    align-items: stretch;
    gap: 1.25rem;
}

.logistics-detail-work-grid .logistics-detail-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
}

.logistics-evidence-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.logistics-evidence-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(203, 213, 225, 0.8);
}

.logistics-evidence-header p {
    margin: 0.35rem 0 0;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.45;
}

.logistics-evidence-actions {
    display: flex;
    justify-content: flex-end;
    flex: 0 0 auto;
}

.logistics-evidence-grid {
    gap: 0.85rem;
}

.logistics-evidence-file-card {
    cursor: pointer;
}

.logistics-detail-form,
.logistics-form {
    display: grid;
    gap: 1rem;
}

.logistics-detail-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 1.45rem 1.5rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(203, 213, 225, 0.78);
    box-shadow: none;
}

.logistics-detail-form-header {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(203, 213, 225, 0.8);
}

.logistics-detail-form-header h3 {
    margin: 0;
    color: #0f172a;
    font-size: 1.05rem;
}

.logistics-detail-form-header p {
    margin: 0.35rem 0 0;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.45;
}

.logistics-form .form-group,
.logistics-detail-form .form-group {
    display: grid;
    gap: 0.45rem;
}

.logistics-form .form-group span,
.logistics-detail-form .form-group span {
    color: #334155;
    font-size: 0.82rem;
    font-weight: 800;
}

.logistics-form input,
.logistics-form select,
.logistics-detail-form input,
.logistics-detail-form select,
.logistics-collaborator-row select,
.logistics-invite-create select {
    width: 100%;
    min-height: 44px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-radius: 6px;
    background: #ffffff;
    color: #1f2937;
    padding: 0.65rem 0.8rem;
    font-size: 0.94rem;
}

.logistics-detail-form input,
.logistics-detail-form select {
    min-height: 46px;
}

.logistics-detail-form input:disabled,
.logistics-detail-form select:disabled {
    background: #f8fafc;
    color: #64748b;
}

.logistics-detail-meta,
.logistics-form-actions {
    grid-column: 1 / -1;
}

.logistics-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 0.9rem;
    color: #64748b;
    font-size: 0.88rem;
}

.logistics-form-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.logistics-detail-form-actions {
    margin-top: 0.2rem;
}

.logistics-modal-content,
.logistics-collaborator-modal-content {
    max-width: 720px;
}

.logistics-collaborator-modal-content {
    display: grid;
    gap: 1.1rem;
}

.logistics-collaborator-section {
    display: grid;
    gap: 0.75rem;
}

.logistics-collaborator-section h3 {
    margin: 0;
    color: #0f172a;
    font-size: 1rem;
}

.logistics-collaborator-row,
.logistics-invite-row,
.logistics-invite-create {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem;
    border: 1px solid rgba(203, 213, 225, 0.75);
    border-radius: 8px;
    background: #f8fafc;
}

.logistics-collaborator-row strong,
.logistics-collaborator-row span {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logistics-collaborator-row span {
    margin-top: 0.16rem;
    color: #64748b;
    font-size: 0.84rem;
}

.logistics-invite-row {
    grid-template-columns: 120px minmax(0, 1fr) auto;
}

.logistics-invite-row code {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #334155;
    font-size: 0.82rem;
}

.logistics-danger-btn {
    color: #dc2626;
    border-color: #fecaca;
}

body.workspace-shell-active .dashboard-sidebar.dashboard-topbar #btn-dash-logistics.active {
    background: #dbeafe !important;
    color: #111111 !important;
}

body.workspace-shell-active .logistics-board-shell {
    width: min(100%, 1472px);
    max-width: 1472px;
}

body.workspace-shell-active .logistics-detail-shell {
    width: min(100%, 1320px);
    max-width: 1320px;
}

body.workspace-shell-active .logistics-board-toolbar,
body.workspace-shell-active .logistics-board-list,
body.workspace-shell-active .logistics-detail-hero,
body.workspace-shell-active .logistics-audit-card,
body.workspace-shell-active .logistics-detail-work-grid,
body.workspace-shell-active .logistics-detail-form {
    width: 100%;
}

body.workspace-shell-active .logistics-row {
    grid-template-columns: 48px minmax(0, 1fr) auto !important;
}

body.workspace-shell-active .logistics-row-icon {
    width: 48px;
    height: 48px;
}

@media (max-width: 1160px) {
    .logistics-detail-work-grid {
        grid-template-columns: 1fr;
    }

    .logistics-detail-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .logistics-row-subgrid {
        grid-template-columns: repeat(2, minmax(150px, 1fr));
    }
}

@media (max-width: 860px) {
    .logistics-table-shell {
        overflow-x: auto;
    }

    body.workspace-shell-active .logistics-table-shell {
        overflow-x: auto !important;
    }

    .logistics-table {
        min-width: 760px;
    }

    .logistics-board-filters,
    .logistics-detail-hero,
    .logistics-detail-form-header,
    .logistics-evidence-header {
        align-items: stretch;
        flex-direction: column;
    }

    .logistics-detail-hero {
        display: flex;
    }

    .logistics-detail-hero-side {
        align-items: stretch;
        padding-left: 0;
        padding-top: 1rem;
        border-left: none;
        border-top: 1px solid rgba(203, 213, 225, 0.9);
    }

    .logistics-detail-hero-toolbar {
        justify-content: flex-start;
    }

    .logistics-row {
        grid-template-columns: 48px minmax(0, 1fr);
    }

    body.workspace-shell-active .logistics-row {
        grid-template-columns: 48px minmax(0, 1fr) !important;
    }

    .logistics-row-subgrid {
        grid-template-columns: 1fr;
    }

    .logistics-row-action {
        grid-column: 1 / -1;
        justify-content: flex-start;
        flex-wrap: wrap;
        min-width: 0;
    }

    .logistics-detail-form {
        grid-template-columns: 1fr;
    }

    .logistics-detail-work-grid .logistics-detail-form {
        grid-template-columns: 1fr;
    }

    .logistics-evidence-actions {
        justify-content: flex-start;
    }

    .logistics-collaborator-row,
    .logistics-invite-row,
    .logistics-invite-create {
        grid-template-columns: 1fr;
    }

    .logistics-form-actions {
        justify-content: stretch;
    }

    .logistics-form-actions > * {
        width: 100%;
        justify-content: center;
    }
}
.logistics-modal-content--concept {
    width: min(94vw, 980px);
    max-width: 980px;
    max-height: min(92vh, 920px);
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.logistics-modal-content--concept > .modal-header {
    flex: 0 0 auto;
    margin: 0;
    padding: 1.35rem 1.65rem 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.logistics-concept-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 0;
    padding: 1rem 1.65rem 1.35rem;
    overflow-y: auto;
}

.logistics-concept-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    background: #f8fafc;
}

.logistics-concept-transport,
.logistics-template-controls {
    display: grid;
    gap: 0.8rem;
    align-content: start;
}

.logistics-template-controls {
    grid-template-columns: minmax(150px, 0.8fr) minmax(180px, 1.2fr);
    align-items: end;
}

.logistics-template-save-btn {
    min-height: 44px;
    justify-content: center;
    gap: 0.48rem;
    color: #0f3d75;
    border-color: #93b4d8;
    background: #ffffff;
}

.logistics-template-save-btn:hover:not(:disabled) {
    background: #eef5ff;
}

.logistics-template-select {
    min-width: 0;
}

.logistics-contact-section {
    overflow: hidden;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
}

.logistics-contact-section h3 {
    margin: 0;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid #cbd5e1;
    background: #edf2f7;
    color: #172033;
    text-align: center;
    font-size: 0.96rem;
    font-weight: 750;
    letter-spacing: 0.01em;
}

.logistics-contact-table-shell {
    width: 100%;
    overflow-x: auto;
}

.logistics-contact-table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
    table-layout: fixed;
}

.logistics-contact-table th,
.logistics-contact-table td {
    border-right: 1px solid #d7dee8;
    border-bottom: 1px solid #d7dee8;
    padding: 0;
    background: #ffffff;
}

.logistics-contact-table tr:last-child th,
.logistics-contact-table tr:last-child td {
    border-bottom: none;
}

.logistics-contact-table th:last-child,
.logistics-contact-table td:last-child {
    border-right: none;
}

.logistics-contact-table th {
    width: 230px;
    padding: 0.62rem 0.75rem;
    background: #f5f7fa;
    color: #263449;
    text-align: left;
    vertical-align: middle;
    font-size: 0.78rem;
    font-weight: 750;
    line-height: 1.35;
}

.logistics-contact-table th label {
    display: block;
}

.logistics-contact-kind {
    width: 72px;
    padding: 0.62rem 0.5rem !important;
    background: #f8fafc !important;
    color: #334155;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 800;
}

.logistics-contact-table input {
    width: 100%;
    min-height: 42px;
    padding: 0.62rem 0.72rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #172033;
    font-size: 0.92rem;
    outline: none;
}

.logistics-contact-table input:focus {
    box-shadow: inset 0 0 0 2px #3b82f6;
    background: #f8fbff;
}

.logistics-concept-form > .logistics-form-actions {
    position: sticky;
    bottom: -1.35rem;
    z-index: 2;
    margin: 0 -1.65rem -1.35rem;
    padding: 0.95rem 1.65rem 1.2rem;
    border-top: 1px solid #e2e8f0;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(8px);
}

@media (max-width: 760px) {
    .logistics-modal-content--concept {
        width: min(96vw, 680px);
        max-height: 94vh;
    }

    .logistics-concept-form {
        padding: 0.9rem 1rem 1.1rem;
    }

    .logistics-concept-toolbar {
        grid-template-columns: 1fr;
    }

    .logistics-template-controls {
        grid-template-columns: 1fr;
    }

    .logistics-concept-form > .logistics-form-actions {
        bottom: -1.1rem;
        margin: 0 -1rem -1.1rem;
        padding: 0.85rem 1rem 1rem;
    }
}

@media (max-width: 560px) {
    .logistics-contact-table {
        min-width: 0;
    }

    .logistics-contact-table tbody,
    .logistics-contact-table tr,
    .logistics-contact-table th,
    .logistics-contact-table td {
        display: block;
        width: 100%;
    }

    .logistics-contact-table tr {
        display: grid;
        grid-template-columns: 1fr;
        border-bottom: 1px solid #cbd5e1;
    }

    .logistics-contact-table th,
    .logistics-contact-kind {
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
        text-align: left;
    }

    .logistics-contact-kind:empty {
        display: none;
    }
}
.logistics-contact-summary {
    width: 100%;
    box-shadow: none;
}

.logistics-contact-value {
    display: block;
    min-height: 42px;
    padding: 0.62rem 0.72rem;
    color: #263449;
    font-size: 0.92rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
}
/* Logistics create form reference redesign */
.logistics-modal-content--concept {
    width: min(96vw, 1050px);
    max-width: 1050px;
    max-height: min(95vh, 1040px);
    border: 1px solid #e4e9f1;
    border-radius: 14px;
    background: #f7f9fc;
    box-shadow: 0 24px 70px rgba(15, 31, 58, 0.2);
}

.logistics-modal-content--concept > .modal-header {
    padding: 1.15rem 1.8rem;
    background: #ffffff;
    border-bottom-color: #e7ebf1;
}

.logistics-modal-content--concept > .modal-header h2 {
    color: #14223a;
    font-size: 1.24rem;
    font-weight: 750;
}

.logistics-concept-form {
    gap: 1.15rem;
    padding: 1.2rem 1.55rem 1.55rem;
    background:
        radial-gradient(circle at 5% 0%, rgba(37, 99, 235, 0.035), transparent 25%),
        #f7f9fc;
}

.logistics-concept-toolbar {
    grid-template-columns: minmax(0, 1fr) minmax(350px, 0.9fr);
    gap: 1.2rem;
    padding: 1.15rem 1.25rem;
    border: 1px solid #e0e6ef;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 7px 22px rgba(31, 48, 79, 0.055);
}

.logistics-concept-transport {
    grid-template-columns: minmax(190px, 0.72fr) minmax(220px, 1.28fr);
    gap: 0.9rem;
}

.logistics-template-controls {
    grid-template-columns: minmax(155px, 0.78fr) minmax(190px, 1.22fr);
    gap: 0.9rem;
}

.logistics-concept-toolbar .form-group {
    gap: 0.46rem;
    margin: 0;
}

.logistics-concept-toolbar .form-group > span {
    color: #283650;
    font-size: 0.82rem;
    font-weight: 650;
}

.logistics-concept-toolbar input,
.logistics-concept-toolbar select {
    min-height: 48px;
    padding: 0 0.88rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #17233b;
    font-size: 0.92rem;
}

.logistics-template-save-btn {
    min-height: 48px;
    border-radius: 8px;
    color: #125df6;
    border-color: #9ab8fb;
    font-weight: 700;
}

.logistics-consignee-card {
    overflow: hidden;
    border: 1px solid #e0e6ef;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 8px 28px rgba(31, 48, 79, 0.07);
}

.logistics-consignee-heading {
    width: 100%;
    min-height: 78px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 2rem;
    border: 0;
    border-bottom: 1px solid #e4e9f1;
    background: #ffffff;
    color: #13213a;
    text-align: left;
    cursor: pointer;
}

.logistics-consignee-heading:hover {
    background: #fbfcff;
}

.logistics-consignee-heading-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    color: #1263ff;
    font-size: 1.42rem;
}

.logistics-consignee-heading-title {
    font-size: clamp(1.12rem, 2vw, 1.48rem);
    font-weight: 760;
    letter-spacing: -0.015em;
}

.logistics-consignee-chevron {
    color: #64748b;
    font-size: 0.9rem;
    transition: transform 180ms ease;
}

.logistics-consignee-heading[aria-expanded="false"] .logistics-consignee-chevron {
    transform: rotate(180deg);
}

.logistics-consignee-body {
    padding: 1.65rem 2rem 1.75rem;
}

.logistics-consignee-body[hidden] {
    display: none;
}

.logistics-contact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem 1.35rem;
}

.logistics-contact-field {
    display: grid;
    gap: 0.52rem;
    min-width: 0;
}

.logistics-contact-field--wide {
    grid-column: 1 / -1;
}

.logistics-contact-label {
    color: #16233b;
    font-size: 0.91rem;
    font-weight: 560;
    line-height: 1.35;
}

.logistics-required {
    color: #ef2929;
    font-weight: 760;
}

.logistics-field-control {
    position: relative;
    display: block;
    min-width: 0;
}

.logistics-field-control > input,
.logistics-field-control > textarea {
    width: 100%;
    min-height: 54px;
    padding: 0.78rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #17233b;
    font: inherit;
    font-size: 0.94rem;
    line-height: 1.45;
    outline: none;
    transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.logistics-field-control > textarea {
    min-height: 100px;
    resize: vertical;
}

.logistics-field-control > input::placeholder,
.logistics-field-control > textarea::placeholder {
    color: #8491a8;
    opacity: 1;
}

.logistics-field-control > input:focus,
.logistics-field-control > textarea:focus {
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.logistics-field-control--icon > i {
    position: absolute;
    left: 1rem;
    top: 50%;
    z-index: 1;
    color: #72809a;
    transform: translateY(-50%);
    pointer-events: none;
}

.logistics-field-control--icon > input {
    padding-left: 2.7rem;
}

.logistics-section-divider {
    height: 1px;
    margin: 1.7rem 0 1.45rem;
    background: #e3e8ef;
}

.logistics-goods-section h3,
.logistics-goods-summary h3 {
    margin: 0 0 1rem;
    color: #14223a;
    font-size: 0.98rem;
    font-weight: 720;
}

.logistics-goods-table-shell {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #d9e0ea;
    border-radius: 8px;
    background: #ffffff;
}

.logistics-goods-table {
    width: 100%;
    min-width: 860px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

.logistics-goods-table th,
.logistics-goods-table td {
    border-right: 1px solid #e2e7ee;
    border-bottom: 1px solid #e2e7ee;
}

.logistics-goods-table th:last-child,
.logistics-goods-table td:last-child {
    border-right: 0;
}

.logistics-goods-table tbody tr:last-child td {
    border-bottom: 0;
}

.logistics-goods-table th {
    padding: 0.78rem 0.55rem;
    background: #f8fafc;
    color: #16233b;
    text-align: center;
    font-size: 0.77rem;
    font-weight: 650;
    line-height: 1.25;
}

.logistics-goods-table th:first-child {
    width: 22%;
}

.logistics-goods-table th:nth-child(2) {
    width: 14%;
}

.logistics-goods-table th:nth-child(3) {
    width: 17%;
}

.logistics-goods-table th:nth-child(4),
.logistics-goods-table th:nth-child(5),
.logistics-goods-table th:nth-child(6) {
    width: 12%;
}

.logistics-goods-table th:last-child {
    width: 11%;
}

.logistics-goods-table th span,
.logistics-goods-table th small {
    display: block;
}

.logistics-goods-table th small {
    margin-top: 0.18rem;
    color: #4b5870;
    font-size: 0.74rem;
    font-weight: 560;
}

.logistics-goods-table td {
    padding: 0;
    background: #ffffff;
    color: #26344b;
    font-size: 0.84rem;
    vertical-align: middle;
}

.logistics-goods-table td > input {
    width: 100%;
    min-height: 50px;
    padding: 0.62rem 0.64rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #17233b;
    font: inherit;
    outline: none;
}

.logistics-goods-table td > input:focus {
    background: #f7faff;
    box-shadow: inset 0 0 0 2px #3b82f6;
}

.logistics-goods-total {
    padding: 0.75rem 0.65rem !important;
    color: #14223a !important;
    text-align: right;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.logistics-goods-actions-cell {
    text-align: center;
}

.logistics-goods-remove-btn {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #8b98ad;
    cursor: pointer;
}

.logistics-goods-remove-btn:hover {
    background: #fff1f2;
    color: #dc2626;
}

.logistics-goods-empty-row td {
    height: 145px;
    padding: 1.2rem !important;
    color: #71809a;
    text-align: center;
}

.logistics-goods-empty-row td > span {
    display: block;
}

.logistics-goods-empty-icon {
    width: 58px;
    height: 58px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.65rem;
    border-radius: 50%;
    background: #f1f4f8;
    color: #7c8aa1;
    font-size: 1.55rem;
}

.logistics-add-goods-btn {
    min-height: 44px;
    margin-top: 1rem;
    padding: 0.62rem 1rem;
    gap: 0.52rem;
    border-color: #1263ff;
    border-radius: 7px;
    color: #1263ff;
    background: #ffffff;
    font-weight: 680;
}

.logistics-add-goods-btn:hover:not(:disabled) {
    color: #ffffff;
    background: #1263ff;
}

.logistics-goods-summary {
    margin-top: 1rem;
    padding: 1.25rem;
    border: 1px solid #e0e6ef;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(31, 48, 79, 0.055);
}

.logistics-goods-summary .logistics-goods-table td {
    padding: 0.78rem 0.7rem;
}

.logistics-concept-form > .logistics-form-actions {
    bottom: -1.55rem;
    margin: 0 -1.55rem -1.55rem;
    padding: 0.95rem 1.55rem 1.15rem;
    border-top-color: #e1e7ef;
}

@media (max-width: 850px) {
    .logistics-modal-content--concept {
        width: min(97vw, 760px);
        max-height: 96vh;
    }

    .logistics-concept-toolbar {
        grid-template-columns: 1fr;
    }

    .logistics-consignee-heading {
        min-height: 68px;
        padding: 1rem 1.25rem;
    }

    .logistics-consignee-body {
        padding: 1.25rem;
    }
}

@media (max-width: 620px) {
    .logistics-concept-form {
        padding: 0.85rem;
    }

    .logistics-concept-transport,
    .logistics-template-controls,
    .logistics-contact-grid {
        grid-template-columns: 1fr;
    }

    .logistics-contact-field--wide {
        grid-column: auto;
    }

    .logistics-consignee-heading {
        gap: 0.7rem;
        padding: 0.95rem 1rem;
    }

    .logistics-consignee-heading-icon {
        width: 30px;
        height: 30px;
        font-size: 1.15rem;
    }

    .logistics-consignee-body {
        padding: 1rem;
    }

    .logistics-field-control > input,
    .logistics-field-control > textarea {
        min-height: 50px;
    }

    .logistics-concept-form > .logistics-form-actions {
        bottom: -0.85rem;
        margin: 0 -0.85rem -0.85rem;
        padding: 0.8rem 0.85rem 0.9rem;
    }
}
/* Compact create modal: keep the complete reference form visible on common laptop screens. */
.logistics-modal-content--concept {
    width: min(97vw, 1160px);
    max-width: 1160px;
    max-height: calc(100dvh - 12px);
    border-radius: 10px;
}

.logistics-modal-content--concept > .modal-header {
    padding: 0.75rem 1.2rem;
}

.logistics-modal-content--concept > .modal-header h2 {
    font-size: 1.08rem;
}

.logistics-concept-form {
    gap: 0.7rem;
    padding: 0.7rem 0.85rem 0.8rem;
}

.logistics-concept-toolbar {
    gap: 0.75rem;
    padding: 0.7rem 0.8rem;
    border-radius: 9px;
}

.logistics-concept-transport,
.logistics-template-controls {
    gap: 0.6rem;
}

.logistics-concept-toolbar .form-group {
    gap: 0.25rem;
}

.logistics-concept-toolbar .form-group > span {
    font-size: 0.73rem;
}

.logistics-concept-toolbar input,
.logistics-concept-toolbar select,
.logistics-template-save-btn {
    min-height: 38px;
    font-size: 0.8rem;
}

.logistics-template-save-btn {
    white-space: nowrap;
}

.logistics-consignee-heading {
    min-height: 56px;
    gap: 0.7rem;
    padding: 0.7rem 1.25rem;
}

.logistics-consignee-heading-icon {
    width: 30px;
    height: 30px;
    font-size: 1.15rem;
}

.logistics-consignee-heading-title {
    font-size: 1.08rem;
}

.logistics-consignee-body {
    padding: 0.9rem 1.2rem 1rem;
}

.logistics-contact-grid {
    gap: 0.72rem 0.85rem;
}

.logistics-contact-field {
    gap: 0.28rem;
}

.logistics-contact-label {
    font-size: 0.78rem;
    line-height: 1.2;
}

.logistics-field-control > input,
.logistics-field-control > textarea {
    min-height: 40px;
    padding: 0.48rem 0.72rem;
    border-radius: 6px;
    font-size: 0.81rem;
    line-height: 1.3;
}

.logistics-field-control > textarea {
    min-height: 68px;
}

.logistics-field-control--icon > i {
    left: 0.72rem;
    font-size: 0.78rem;
}

.logistics-field-control--icon > input {
    padding-left: 2.15rem;
}

.logistics-section-divider {
    margin: 0.8rem 0 0.7rem;
}

.logistics-goods-section h3,
.logistics-goods-summary h3 {
    margin-bottom: 0.55rem;
    font-size: 0.82rem;
}

.logistics-goods-table {
    min-width: 760px;
}

.logistics-goods-table th {
    padding: 0.42rem 0.3rem;
    font-size: 0.67rem;
}

.logistics-goods-table th small {
    margin-top: 0.08rem;
    font-size: 0.63rem;
}

.logistics-goods-table td,
.logistics-goods-table td > input {
    font-size: 0.72rem;
}

.logistics-goods-table td > input {
    min-height: 36px;
    padding: 0.38rem 0.42rem;
}

.logistics-goods-empty-row td {
    height: 78px;
    padding: 0.55rem !important;
    font-size: 0.72rem;
}

.logistics-goods-empty-icon {
    width: 34px;
    height: 34px;
    margin-bottom: 0.28rem;
    font-size: 0.9rem;
}

.logistics-add-goods-btn {
    min-height: 34px;
    margin-top: 0.55rem;
    padding: 0.38rem 0.7rem;
    font-size: 0.75rem;
}

.logistics-concept-form > .logistics-form-actions {
    bottom: -0.8rem;
    margin: 0 -0.85rem -0.8rem;
    padding: 0.55rem 0.85rem 0.65rem;
}

.logistics-concept-form > .logistics-form-actions .btn-outline,
.logistics-concept-form > .logistics-form-actions .btn-primary {
    min-height: 36px;
    padding: 0.48rem 0.9rem;
    font-size: 0.76rem;
}

@media (min-width: 851px) and (max-height: 950px) {
    .logistics-modal-content--concept > .modal-header {
        padding: 0.55rem 1.05rem;
    }

    .logistics-modal-content--concept > .modal-header h2 {
        font-size: 1rem;
    }

    .logistics-concept-form {
        gap: 0.45rem;
        padding: 0.48rem 0.65rem 0.55rem;
    }

    .logistics-concept-toolbar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.55rem;
        padding: 0.45rem 0.6rem;
    }

    .logistics-concept-transport {
        grid-template-columns: minmax(130px, 0.78fr) minmax(0, 1.22fr);
        gap: 0.5rem;
    }

    .logistics-template-controls {
        grid-template-columns: minmax(125px, 0.72fr) minmax(0, 1.28fr);
        gap: 0.5rem;
    }

    .logistics-concept-toolbar .form-group > span {
        font-size: 0.67rem;
    }

    .logistics-concept-toolbar input,
    .logistics-concept-toolbar select,
    .logistics-template-save-btn {
        min-height: 33px;
        padding: 0 0.55rem;
        font-size: 0.73rem;
    }

    .logistics-consignee-heading {
        min-height: 44px;
        padding: 0.45rem 0.9rem;
    }

    .logistics-consignee-heading-icon {
        width: 25px;
        height: 25px;
        font-size: 0.98rem;
    }

    .logistics-consignee-heading-title {
        font-size: 0.96rem;
    }

    .logistics-consignee-body {
        padding: 0.55rem 0.9rem 0.65rem;
    }

    .logistics-contact-grid {
        gap: 0.42rem 0.7rem;
    }

    .logistics-contact-field--company_name,
    .logistics-contact-field--contact_person {
        grid-column: span 1;
    }

    .logistics-contact-field {
        gap: 0.14rem;
    }

    .logistics-contact-label {
        font-size: 0.7rem;
    }

    .logistics-field-control > input,
    .logistics-field-control > textarea {
        min-height: 32px;
        padding: 0.3rem 0.58rem;
        font-size: 0.72rem;
    }

    .logistics-field-control > textarea {
        min-height: 48px;
    }

    .logistics-field-control--icon > input {
        padding-left: 1.9rem;
    }

    .logistics-field-control--icon > i {
        left: 0.6rem;
        font-size: 0.68rem;
    }

    .logistics-section-divider {
        margin: 0.45rem 0 0.4rem;
    }

    .logistics-goods-section h3 {
        margin-bottom: 0.35rem;
        font-size: 0.76rem;
    }

    .logistics-goods-table th {
        padding: 0.3rem 0.25rem;
        font-size: 0.62rem;
    }

    .logistics-goods-table th small {
        font-size: 0.58rem;
    }

    .logistics-goods-empty-row td {
        height: 58px;
        padding: 0.32rem !important;
        font-size: 0.66rem;
    }

    .logistics-goods-empty-icon {
        width: 27px;
        height: 27px;
        margin-bottom: 0.16rem;
        font-size: 0.75rem;
    }

    .logistics-add-goods-btn {
        min-height: 29px;
        margin-top: 0.35rem;
        padding: 0.25rem 0.58rem;
        font-size: 0.68rem;
    }

    .logistics-concept-form > .logistics-form-actions {
        bottom: -0.55rem;
        margin: 0 -0.65rem -0.55rem;
        padding: 0.38rem 0.65rem 0.42rem;
    }

    .logistics-concept-form > .logistics-form-actions .btn-outline,
    .logistics-concept-form > .logistics-form-actions .btn-primary {
        min-height: 31px;
        padding: 0.34rem 0.75rem;
        font-size: 0.7rem;
    }
}
/* Combined goods fields: compact eight-column editor and seven-column summary. */
.logistics-goods-table th:first-child {
    width: 22%;
}

.logistics-goods-table th:nth-child(2),
.logistics-goods-table th:nth-child(3) {
    width: 15%;
}

.logistics-goods-table th:nth-child(4) {
    width: 13%;
}

.logistics-goods-table th:nth-child(5) {
    width: 8%;
}

.logistics-goods-table th:nth-child(6),
.logistics-goods-table th:nth-child(7) {
    width: 11%;
}

.logistics-goods-table th:nth-child(8) {
    width: 5%;
}

/* Billing address within the compact consignee editor. */
.logistics-billing-section {
    display: grid;
    gap: 0.55rem;
}

.logistics-billing-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.logistics-billing-header h3 {
    margin: 0;
    color: #14223a;
    font-size: 0.82rem;
    font-weight: 720;
}

.logistics-billing-same-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    color: #46556d;
    font-size: 0.72rem;
    font-weight: 650;
    cursor: pointer;
}

.logistics-billing-same-toggle input {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: #1263ff;
}

.logistics-billing-same-toggle:has(input:disabled) {
    cursor: default;
    opacity: 0.72;
}

.logistics-billing-grid .logistics-field-control > :disabled {
    color: #536177;
    background: #f4f6f9;
    cursor: not-allowed;
}
/* Adaptive create dialog: fit the viewport first, then scroll only the form body. */
#logistics-job-modal {
    box-sizing: border-box;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    padding: clamp(6px, 1.5vmin, 18px);
    overflow: hidden;
}

#logistics-job-modal .logistics-modal-content--concept {
    width: min(1160px, 100%);
    height: min(1040px, 100%);
    max-width: 100%;
    max-height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#logistics-job-modal .logistics-modal-content--concept > .modal-header {
    flex: 0 0 auto;
}

#logistics-job-modal .logistics-concept-form {
    flex: 1 1 auto;
    min-height: 0;
    gap: 0;
    padding: 0;
    overflow: hidden;
}

#logistics-job-modal .logistics-concept-scroll {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: clamp(0.45rem, 1vh, 0.7rem);
    padding: clamp(0.48rem, 1vh, 0.7rem) clamp(0.65rem, 1vw, 0.85rem) clamp(0.55rem, 1vh, 0.8rem);
    overflow-x: hidden;
    overflow-y: scroll;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    scrollbar-width: auto;
    scrollbar-color: #8795aa #edf1f6;
}

#logistics-job-modal .logistics-concept-scroll > * {
    flex: 0 0 auto;
}

#logistics-job-modal .logistics-concept-scroll::-webkit-scrollbar {
    width: 12px;
}

#logistics-job-modal .logistics-concept-scroll::-webkit-scrollbar-track {
    border-left: 1px solid #dfe5ed;
    background: #edf1f6;
}

#logistics-job-modal .logistics-concept-scroll::-webkit-scrollbar-thumb {
    min-height: 44px;
    border: 3px solid #edf1f6;
    border-radius: 999px;
    background: #8795aa;
}

#logistics-job-modal .logistics-concept-scroll::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

#logistics-job-modal .logistics-goods-table-shell {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
}

#logistics-job-modal .logistics-concept-form > .logistics-form-actions {
    position: relative;
    bottom: auto;
    z-index: 5;
    flex: 0 0 auto;
    margin: 0;
    padding: 0.55rem clamp(0.65rem, 1vw, 0.85rem) 0.65rem;
    box-shadow: 0 -8px 20px rgba(15, 31, 58, 0.06);
}

@media (max-width: 900px) {
    #logistics-job-modal {
        padding: 6px;
    }

    #logistics-job-modal .logistics-modal-content--concept {
        width: 100%;
        height: 100%;
        border-radius: 8px;
    }

    #logistics-job-modal .logistics-concept-toolbar {
        grid-template-columns: 1fr;
    }

    #logistics-job-modal .logistics-concept-transport,
    #logistics-job-modal .logistics-template-controls {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    #logistics-job-modal {
        padding: 0;
    }

    #logistics-job-modal .logistics-modal-content--concept {
        border-width: 0;
        border-radius: 0;
    }

    #logistics-job-modal .logistics-modal-content--concept > .modal-header {
        padding-inline: 0.85rem;
    }

    #logistics-job-modal .logistics-concept-scroll {
        padding-inline: 0.65rem;
    }

    #logistics-job-modal .logistics-concept-transport,
    #logistics-job-modal .logistics-template-controls,
    #logistics-job-modal .logistics-contact-grid {
        grid-template-columns: 1fr;
    }

    #logistics-job-modal .logistics-contact-field--wide {
        grid-column: auto;
    }

    #logistics-job-modal .logistics-concept-form > .logistics-form-actions {
        padding-inline: 0.65rem;
    }
}

@media (max-height: 760px) {
    #logistics-job-modal {
        padding-block: 4px;
    }

    #logistics-job-modal .logistics-modal-content--concept > .modal-header {
        padding-block: 0.42rem;
    }

    #logistics-job-modal .logistics-concept-scroll {
        gap: 0.38rem;
        padding-block: 0.38rem 0.45rem;
    }

    #logistics-job-modal .logistics-concept-toolbar {
        padding-block: 0.38rem;
    }

    #logistics-job-modal .logistics-consignee-heading {
        min-height: 40px;
        padding-block: 0.35rem;
    }

    #logistics-job-modal .logistics-consignee-body {
        padding-block: 0.45rem 0.55rem;
    }

    #logistics-job-modal .logistics-contact-grid {
        gap-block: 0.32rem;
    }

    #logistics-job-modal .logistics-field-control > input,
    #logistics-job-modal .logistics-field-control > textarea {
        min-height: 30px;
    }

    #logistics-job-modal .logistics-field-control > textarea {
        min-height: 44px;
    }

    #logistics-job-modal .logistics-goods-empty-row td {
        height: 48px;
    }
}


/* Owner-only logistics job delete action. */
.logistics-table-action.logistics-delete-action {
    border-color: #fecaca;
    background: #fffafa;
    color: #dc2626;
}

.logistics-table-action.logistics-delete-action:hover:not(:disabled) {
    border-color: #ef4444;
    background: #fef2f2;
    color: #b91c1c;
}

.logistics-table-action.logistics-delete-action:disabled {
    cursor: wait;
    opacity: 0.55;
}

/* Existing logistics job data trees and split editors. */
.logistics-detail-work-grid > .logistics-detail-panel {
    min-width: 0;
    padding: 1.4rem 1.5rem;
    border: 1px solid rgba(203, 213, 225, 0.78);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
}

.logistics-data-tree-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.logistics-data-tree-header {
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(203, 213, 225, 0.8);
}

.logistics-data-tree-header h3 {
    margin: 0;
    color: #0f172a;
    font-size: 1.05rem;
}

.logistics-data-tree-header p {
    margin: 0.35rem 0 0;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.45;
}

.logistics-data-tree {
    display: grid;
    gap: 0.7rem;
}

.logistics-data-tree-item {
    width: 100%;
    min-height: 76px;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto 14px;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 0.9rem;
    border: 1px solid #dbe4f0;
    border-radius: 9px;
    background: #ffffff;
    color: #0f172a;
    text-align: left;
    cursor: pointer;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.logistics-data-tree-item:hover,
.logistics-data-tree-item:focus-visible {
    border-color: #2563eb;
    box-shadow: 0 8px 22px rgba(37, 99, 235, 0.09);
    outline: none;
    transform: translateY(-1px);
}

.logistics-data-tree-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #eff6ff;
    color: #1769ff;
    font-size: 1.05rem;
}

.logistics-data-tree-icon--goods {
    background: #f0fdf4;
    color: #16803c;
}

.logistics-data-tree-copy {
    min-width: 0;
    display: grid;
    gap: 0.28rem;
}

.logistics-data-tree-copy strong {
    overflow: hidden;
    color: #14213d;
    font-size: 0.92rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logistics-data-tree-copy small {
    overflow: hidden;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logistics-data-tree-open {
    color: #2563eb;
    font-size: 0.76rem;
    font-weight: 800;
    white-space: nowrap;
}

.logistics-data-tree-chevron {
    color: #7c8aa0;
    font-size: 0.76rem;
}

.logistics-data-modal-content {
    width: min(96vw, 1100px);
    max-width: 1100px;
    max-height: calc(100dvh - 24px);
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    border-radius: 10px;
}

.logistics-data-modal-content--goods {
    width: min(97vw, 1220px);
    max-width: 1220px;
}

.logistics-data-modal-content > .modal-header {
    flex: 0 0 auto;
    padding: 0.85rem 1.2rem;
    border-bottom: 1px solid #e2e8f0;
}

.logistics-data-modal-content > .modal-header h2 {
    font-size: 1.08rem;
}

.logistics-data-modal-form {
    min-height: 0;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
}

.logistics-data-modal-scroll {
    min-height: 0;
    flex: 1 1 auto;
    overflow: auto;
    overscroll-behavior: contain;
    padding: 0.85rem 1rem;
    background: #f8fafc;
}

.logistics-data-editor-body {
    margin: 0;
    padding: 0.95rem 1.05rem 1.05rem;
    border: 1px solid #dbe4f0;
    border-radius: 9px;
    background: #ffffff;
}

.logistics-data-editor-body .logistics-field-control > input:disabled,
.logistics-data-editor-body .logistics-field-control > textarea:disabled,
.logistics-data-editor-body .logistics-goods-table input:disabled {
    border-color: #e2e8f0;
    background: #f8fafc;
    color: #475569;
    opacity: 1;
}

.logistics-data-modal-actions {
    flex: 0 0 auto;
    margin: 0;
    padding: 0.7rem 1rem;
    border-top: 1px solid #e2e8f0;
    background: #ffffff;
}

.logistics-data-modal-actions .btn-primary,
.logistics-data-modal-actions .btn-outline {
    min-height: 38px;
    padding: 0.5rem 0.95rem;
    font-size: 0.78rem;
}

.logistics-data-modal-actions .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.logistics-data-modal-scroll > .logistics-readonly-note,
.logistics-data-modal-scroll > .logistics-rollout-note {
    margin: 0.75rem 0 0;
}

@media (max-width: 860px) {
    .logistics-detail-work-grid > .logistics-detail-panel {
        padding: 1rem;
    }

    .logistics-data-tree-item {
        grid-template-columns: 40px minmax(0, 1fr) 12px;
        min-height: 68px;
        gap: 0.65rem;
        padding: 0.72rem;
    }

    .logistics-data-tree-icon {
        width: 40px;
        height: 40px;
    }

    .logistics-data-tree-open {
        display: none;
    }

    .logistics-data-modal-content,
    .logistics-data-modal-content--goods {
        width: calc(100vw - 12px);
        max-height: calc(100dvh - 12px);
    }

    .logistics-data-modal-scroll {
        padding: 0.65rem;
    }

    .logistics-data-editor-body {
        padding: 0.75rem;
    }
}

/* Logistics 3PL assignment workflow. */
.logistics-detail-status-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.logistics-header-workflow-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 36px;
    padding: 0.48rem 0.9rem;
    font-size: 0.78rem;
    white-space: nowrap;
}

.logistics-detail-status-row .logistics-status-badge {
    align-self: auto;
}

.logistics-status-badge--ready {
    background: #ffedd5;
    color: #9a3412;
}

.logistics-status-badge--assigned {
    background: #ede9fe;
    color: #6d28d9;
}

.logistics-audit-horizontal {
    min-width: 1040px;
}

.logistics-audit-horizontal .audit-trail-item {
    min-width: 118px;
}

.audit-trail-actor {
    display: block;
    margin-top: 0.2rem;
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 650;
}

.logistics-assignment-note {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    color: #5b21b6;
}

.logistics-table-action.logistics-assign-action {
    color: #6d28d9;
}

.logistics-table-action.logistics-assign-action:hover {
    border-color: #8b5cf6;
    background: #f5f3ff;
}

.logistics-3pl-assignment-modal-content {
    width: min(92vw, 520px);
    max-width: 520px;
    border-radius: 10px;
}

.logistics-3pl-assignment-form {
    display: grid;
    gap: 1rem;
    padding: 1.15rem 1.25rem 1.25rem;
}

.logistics-3pl-assignment-form .form-group {
    display: grid;
    gap: 0.45rem;
}

.logistics-3pl-assignment-form .form-group > span {
    color: #1e293b;
    font-size: 0.82rem;
    font-weight: 750;
}

.logistics-3pl-assignment-form input,
.logistics-3pl-assignment-form select {
    width: 100%;
    min-height: 44px;
    padding: 0.65rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #0f172a;
    font: inherit;
}

.logistics-3pl-assignment-form input:focus,
.logistics-3pl-assignment-form select:focus {
    border-color: #2563eb;
    outline: 2px solid rgba(37, 99, 235, 0.14);
    outline-offset: 1px;
}

.logistics-3pl-assignment-form .logistics-empty-copy {
    margin: 0;
    color: #64748b;
    font-size: 0.82rem;
    line-height: 1.5;
}

.logistics-3pl-assignment-form .logistics-form-actions {
    margin-top: 0.15rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

@media (max-width: 640px) {
    .logistics-3pl-assignment-modal-content {
        width: calc(100vw - 16px);
    }

    .logistics-3pl-assignment-form {
        padding: 1rem;
    }
}

/* Logistics sharing groups */
.logistics-group-manager-modal {
    width: min(94vw, 1180px);
    max-width: 1180px;
    height: min(88vh, 840px);
    max-height: 840px;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0;
    border-radius: 14px;
}

.logistics-group-manager-modal > .modal-header {
    flex: 0 0 auto;
    margin: 0;
    padding: 1.2rem 1.4rem;
    border-bottom: 1px solid #e2e8f0;
    align-items: flex-start;
}

.logistics-group-manager-modal > .modal-header h2 {
    margin: 0;
    color: #0f172a;
    font-size: 1.35rem;
}

.logistics-group-manager-modal > .modal-header p {
    margin: 0.3rem 0 0;
    color: #64748b;
    font-size: 0.88rem;
}

.logistics-group-manager-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: 0;
    flex: 1 1 auto;
    background: #f8fafc;
}

.logistics-group-sidebar {
    display: flex;
    min-height: 0;
    flex-direction: column;
    padding: 1rem;
    border-right: 1px solid #e2e8f0;
    background: #f1f5f9;
}

.logistics-group-sidebar-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.7rem;
    color: #334155;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.logistics-group-sidebar-heading strong {
    display: inline-grid;
    min-width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 0.74rem;
}

.logistics-group-list {
    display: grid;
    align-content: start;
    gap: 0.45rem;
    min-height: 0;
    overflow-y: auto;
    padding-right: 0.2rem;
}

.logistics-group-list-item {
    width: 100%;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.65rem;
    padding: 0.72rem;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    color: #334155;
    text-align: left;
    cursor: pointer;
}

.logistics-group-list-item:hover {
    background: rgba(255, 255, 255, 0.78);
    border-color: #cbd5e1;
}

.logistics-group-list-item.is-active {
    background: #ffffff;
    border-color: #93c5fd;
    box-shadow: 0 5px 16px rgba(15, 23, 42, 0.07);
    color: #0f172a;
}

.logistics-group-list-icon {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 9px;
    background: #e2e8f0;
    color: #475569;
}

.logistics-group-list-item.is-active .logistics-group-list-icon {
    background: #dbeafe;
    color: #2563eb;
}

.logistics-group-list-item strong,
.logistics-group-list-item small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logistics-group-list-item strong {
    font-size: 0.9rem;
}

.logistics-group-list-item small {
    margin-top: 0.15rem;
    color: #64748b;
    font-size: 0.75rem;
}

.logistics-group-context-mark {
    color: #16a34a;
    font-size: 0.9rem;
}

.logistics-group-create {
    display: grid;
    gap: 0.5rem;
    margin-top: 0.9rem;
    padding-top: 0.9rem;
    border-top: 1px solid #cbd5e1;
}

.logistics-group-create label {
    color: #334155;
    font-size: 0.8rem;
    font-weight: 800;
}

.logistics-group-create > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    gap: 0.45rem;
}

.logistics-group-create input,
.logistics-group-name-editor input,
.logistics-group-job-search input,
.logistics-group-invite-create select,
.logistics-group-collaborator-row select {
    min-width: 0;
    height: 42px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #0f172a;
    padding: 0 0.75rem;
    font: inherit;
}

.logistics-group-create button {
    min-width: 42px;
    padding: 0;
}

.logistics-group-create small {
    color: #64748b;
    font-size: 0.73rem;
    line-height: 1.35;
}

.logistics-group-detail-shell {
    min-width: 0;
    min-height: 0;
    overflow-y: auto;
    padding: 1.1rem;
}

.logistics-group-detail {
    display: grid;
    gap: 0.9rem;
}

.logistics-group-detail-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.2rem 0 0.1rem;
}

.logistics-group-eyebrow {
    display: block;
    margin-bottom: 0.38rem;
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.logistics-group-name-editor {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logistics-group-name-editor input {
    width: min(46vw, 420px);
    font-size: 1rem;
    font-weight: 800;
}

.logistics-group-name-editor button,
.logistics-group-delete-btn {
    min-height: 42px;
    white-space: nowrap;
}

.logistics-group-delete-btn {
    color: #b91c1c;
    border-color: #fecaca;
}

.logistics-group-panel {
    padding: 1rem;
    border: 1px solid #dbe3ee;
    border-radius: 11px;
    background: #ffffff;
}

.logistics-group-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.logistics-group-panel-heading h3 {
    margin: 0;
    color: #0f172a;
    font-size: 0.98rem;
}

.logistics-group-panel-heading h3 i {
    width: 22px;
    color: #2563eb;
}

.logistics-group-panel-heading p {
    margin: 0.25rem 0 0;
    color: #64748b;
    font-size: 0.8rem;
}

.logistics-group-job-search {
    display: flex;
    align-items: center;
    width: min(36%, 250px);
    min-width: 180px;
    position: relative;
}

.logistics-group-job-search i {
    position: absolute;
    left: 0.75rem;
    color: #94a3b8;
    pointer-events: none;
}

.logistics-group-job-search input {
    width: 100%;
    padding-left: 2.15rem;
}

.logistics-group-job-list {
    display: grid;
    gap: 0.42rem;
    max-height: 235px;
    overflow-y: auto;
}

.logistics-group-job-row {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.65rem;
    padding: 0.68rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    cursor: pointer;
}

.logistics-group-job-row:hover {
    border-color: #93c5fd;
    background: #f0f7ff;
}

.logistics-group-job-row > input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.logistics-group-job-check {
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border: 1.5px solid #94a3b8;
    border-radius: 6px;
    background: #ffffff;
    color: transparent;
    font-size: 0.72rem;
}

.logistics-group-job-row > input:checked + .logistics-group-job-check {
    border-color: #2563eb;
    background: #2563eb;
    color: #ffffff;
}

.logistics-group-job-main strong,
.logistics-group-job-main small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logistics-group-job-main strong {
    color: #0f172a;
    font-size: 0.86rem;
}

.logistics-group-job-main small {
    margin-top: 0.12rem;
    color: #64748b;
    font-size: 0.75rem;
}

.logistics-group-collaborator-list,
.logistics-group-invite-list {
    display: grid;
    gap: 0.5rem;
}

.logistics-group-collaborator-row {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 145px 42px;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.logistics-group-avatar {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 50%;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 0.82rem;
    font-weight: 800;
}

.logistics-group-collaborator-person strong,
.logistics-group-collaborator-person small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logistics-group-collaborator-person strong {
    color: #0f172a;
    font-size: 0.84rem;
}

.logistics-group-collaborator-person small {
    margin-top: 0.12rem;
    color: #64748b;
    font-size: 0.74rem;
}

.logistics-group-invite-create {
    display: grid;
    grid-template-columns: minmax(150px, 0.35fr) minmax(190px, auto);
    justify-content: start;
    gap: 0.6rem;
    margin-bottom: 0.65rem;
}

.logistics-group-invite-row {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr) 42px;
    align-items: center;
    gap: 0.65rem;
    padding: 0.62rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.logistics-group-invite-access {
    color: #334155;
    font-size: 0.8rem;
    font-weight: 800;
}

.logistics-group-invite-row code {
    overflow: hidden;
    color: #64748b;
    font-size: 0.76rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logistics-group-empty-state {
    min-height: 420px;
    display: grid;
    align-content: center;
    justify-items: center;
    padding: 2rem;
    color: #64748b;
    text-align: center;
}

.logistics-group-empty-state > span {
    display: grid;
    width: 64px;
    height: 64px;
    place-items: center;
    margin-bottom: 0.8rem;
    border-radius: 18px;
    background: #dbeafe;
    color: #2563eb;
    font-size: 1.5rem;
}

.logistics-group-empty-state h3 {
    margin: 0;
    color: #0f172a;
}

.logistics-group-empty-state p {
    max-width: 420px;
    margin: 0.5rem 0 0;
}

@media (max-width: 760px) {
    .logistics-group-manager-modal {
        width: 96vw;
        height: 92vh;
        max-height: 92vh;
    }

    .logistics-group-manager-layout {
        grid-template-columns: 1fr;
        overflow-y: auto;
    }

    .logistics-group-sidebar {
        min-height: auto;
        border-right: 0;
        border-bottom: 1px solid #e2e8f0;
    }

    .logistics-group-list {
        max-height: 180px;
    }

    .logistics-group-detail-shell {
        overflow: visible;
    }

    .logistics-group-detail-header,
    .logistics-group-panel-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .logistics-group-name-editor,
    .logistics-group-invite-create {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .logistics-group-name-editor input,
    .logistics-group-job-search {
        width: 100%;
    }

    .logistics-group-collaborator-row,
    .logistics-group-invite-row {
        grid-template-columns: 36px minmax(0, 1fr);
    }

    .logistics-group-collaborator-row select,
    .logistics-group-collaborator-row button,
    .logistics-group-invite-row code,
    .logistics-group-invite-row button {
        grid-column: 1 / -1;
        width: 100%;
    }
}