/* Drop-shipping logistics control — same detail chrome as DocumentDetailViewBase / BCP step detail.
   Scoped under .ds-logistics-shell so it does not depend on Blazor CSS isolation from other components. */

.ds-logistics-shell.document-detail-full-page {
    display: block;
    min-height: 100vh;
    width: 100%;
    max-width: none;
    margin: 0;
    background: #f5f5f5;
    padding-top: 0;
    overflow: visible;
    box-sizing: border-box;
    --header-height: 92px;
}

.ds-logistics-shell .document-detail-layout {
    display: flex;
    position: relative;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
}

.ds-logistics-shell .document-detail-left-column {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    min-height: 0;
    width: 100%;
    max-width: none;
}

.ds-logistics-shell .document-detail-header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #fff;
    padding: 20px 0 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    position: sticky;
    top: var(--admin-page-inspector-h, 0px);
    z-index: 100;
    width: 100%;
}

.ds-logistics-shell .document-detail-header-content {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
    padding: 0 28px;
    box-sizing: border-box;
}

.ds-logistics-shell .document-detail-header-content.document-detail-header-content--stacked {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}

.ds-logistics-shell .document-detail-header-primary-row {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    min-width: 0;
}

.ds-logistics-shell .document-detail-header-breadcrumb-row {
    width: 100%;
    min-width: 0;
    padding-inline-start: 56px;
    box-sizing: border-box;
}

.ds-logistics-shell .document-detail-breadcrumbs {
    font-size: 11px;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.82);
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ds-logistics-shell .document-detail-bc-link {
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
}

.ds-logistics-shell .document-detail-bc-link:hover {
    text-decoration: underline;
}

.ds-logistics-shell .document-detail-bc-sep {
    opacity: 0.65;
    margin: 0 5px;
    user-select: none;
}

.ds-logistics-shell .document-detail-bc-current {
    font-weight: 600;
    color: #fff;
}

.ds-logistics-shell .document-detail-back-btn {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, transform 0.15s ease;
}

.ds-logistics-shell .document-detail-back-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.22);
    transform: scale(1.05);
}

.ds-logistics-shell .document-detail-back-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.ds-logistics-shell .document-detail-header-info {
    flex: 1;
    min-width: 0;
}

.ds-logistics-shell .document-detail-header-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}

.ds-logistics-shell .document-detail-header-title i {
    font-size: 22px;
    opacity: 0.95;
}

.ds-logistics-shell .document-detail-header-title h2 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.25;
}

.ds-logistics-shell .document-detail-header-subtitle {
    margin: 0;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.45;
    word-break: break-word;
}

.ds-logistics-shell .document-detail-header-buttons {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    flex-shrink: 0;
}

.ds-logistics-shell .document-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.8rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
    font-size: 0.85rem;
    white-space: nowrap;
}

.ds-logistics-shell .document-action-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.22);
}

.ds-logistics-shell .document-action-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.ds-logistics-shell .document-detail-content,
.ds-logistics-shell .ds-logistics-content {
    flex: 1;
    min-height: 200px;
    padding: 20px 28px 32px;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    background: #f5f5f5;
}

/* PO cards & dates */
.ds-logistics-shell .ds-po-card {
    border: 1px solid #e0e6ed;
    border-radius: 12px;
    padding: 1.1rem 1.25rem 1.35rem;
    margin-bottom: 1.25rem;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.ds-logistics-shell .ds-po-card-header {
    margin-bottom: 0.75rem;
}

.ds-logistics-shell .ds-po-card-title {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.ds-logistics-shell .ds-logistics-link {
    background: none;
    border: none;
    color: #1565c0;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
    font-size: 1.15rem;
    font-weight: 700;
    text-align: start;
}

.ds-logistics-shell .ds-logistics-link:hover {
    text-decoration: underline;
}

.ds-logistics-shell .ds-po-meta {
    color: #78909c;
    font-size: 0.875rem;
}

.ds-logistics-shell .ds-po-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #eceff1;
}

.ds-logistics-shell .ds-mini-action {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.28rem 0.6rem;
    font-size: 0.78rem;
    line-height: 1.25;
    border-radius: 6px;
    border: 1px solid #cfd8dc;
    background: #f7f9fb;
    color: #37474f;
    cursor: pointer;
}

.ds-logistics-shell .ds-mini-action:hover:not(:disabled) {
    background: #eef3f7;
    border-color: #90a4ae;
}

.ds-logistics-shell .ds-mini-action:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.ds-logistics-shell .ds-mini-action-compact {
    padding: 0.12rem 0.45rem;
    font-size: 0.7rem;
}

.ds-logistics-shell .ds-po-dates h3,
.ds-logistics-shell .ds-po-attachments h3,
.ds-logistics-shell .ds-po-overheads h3,
.ds-logistics-shell .ds-logistics-section h2 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    font-weight: 650;
    color: #263238;
}

.ds-logistics-shell .ds-date-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.7rem;
    margin-bottom: 1.15rem;
}

.ds-logistics-shell .ds-date-step {
    border: 1px solid #e3e8ef;
    border-radius: 8px;
    padding: 0.55rem 0.65rem 0.65rem;
    background: #fafbfc;
    min-height: 72px;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.ds-logistics-shell .ds-date-step-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.35rem;
}

.ds-logistics-shell .ds-date-label {
    color: #607d8b;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1.3;
}

.ds-logistics-shell .ds-date-value {
    font-weight: 650;
    font-size: 0.95rem;
    color: #263238;
}

.ds-logistics-shell .ds-po-attachments {
    margin-bottom: 1.1rem;
    padding: 0.85rem 0.95rem;
    border: 1px solid #eceff1;
    border-radius: 8px;
    background: #fafbfc;
}

.ds-logistics-shell .ds-logistics-hint {
    margin: 0 0 0.65rem;
    color: #78909c;
    font-size: 0.85rem;
}

.ds-logistics-shell .ds-logistics-empty {
    color: #90a4ae;
    font-style: italic;
    margin: 0.4rem 0;
}

.ds-logistics-shell .ds-logistics-section {
    margin-bottom: 1.5rem;
    padding: 1rem 1.15rem;
    background: #fff;
    border: 1px solid #e0e6ed;
    border-radius: 12px;
}

.ds-logistics-shell .ds-logistics-table-wrap {
    overflow-x: auto;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    background: #fff;
}

.ds-logistics-shell .ds-logistics-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.ds-logistics-shell .ds-logistics-table th,
.ds-logistics-shell .ds-logistics-table td {
    padding: 0.55rem 0.75rem;
    text-align: start;
    border-bottom: 1px solid #eceff1;
}

.ds-logistics-shell .ds-logistics-table th {
    background: #fafbfc;
    color: #546e7a;
    font-weight: 600;
}

.ds-logistics-shell .document-attachments {
    margin-top: 0.35rem;
}

.ds-logistics-shell .ds-po-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}

.ds-logistics-shell .ds-section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
}

.ds-logistics-shell .ds-section-title-row h2 {
    margin: 0;
}

.ds-logistics-shell .ds-ship-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
}

.ds-logistics-shell .ds-ship-chip-neutral,
.ds-logistics-shell .ds-ship-pending {
    background: #eceff1;
    color: #455a64;
}

.ds-logistics-shell .ds-ship-ordered {
    background: #e3f2fd;
    color: #1565c0;
}

.ds-logistics-shell .ds-ship-shipped {
    background: #fff3e0;
    color: #ef6c00;
}

.ds-logistics-shell .ds-ship-delivered {
    background: #e8f5e9;
    color: #2e7d32;
}

.ds-logistics-shell .ds-ship-cancelled {
    background: #ffebee;
    color: #c62828;
}

.ds-logistics-shell .ds-ship-awaiting {
    background: #f3e5f5;
    color: #6a1b9a;
}

.ds-logistics-shell .ds-date-step-set {
    border-color: #a5d6a7;
    background: #f1f8f2;
}

@media (max-width: 900px) {
    .ds-logistics-shell .document-detail-header-primary-row {
        flex-wrap: wrap;
    }

    .ds-logistics-shell .document-detail-header-buttons {
        width: 100%;
        padding-inline-start: 56px;
    }

    .ds-logistics-shell .document-detail-header-content,
    .ds-logistics-shell .ds-logistics-content {
        padding-left: 16px;
        padding-right: 16px;
    }

    .ds-logistics-shell .document-detail-header-breadcrumb-row {
        padding-inline-start: 0;
    }
}
