:root {
  --ink: #243332; --muted: #627475; --primary: #ec6723; --canvas: #fff;
  --line: #eddfd4; --soft: #fff5ed; --sidebar: #fff8f3;
  --bs-body-color: var(--ink); --bs-body-bg: #fff; --bs-border-color: var(--line);
  --bs-primary: #ec6723; --bs-link-color: #ec6723; --bs-link-hover-color: #a9430f;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 14px/1.55 -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-underline-offset: 3px; }
a:hover { color: #111; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 2px solid #767d72; outline-offset: 3px; }
.page-title { font-size: 28px; line-height: 1.25; font-weight: 650; letter-spacing: 0; }
.eyebrow { display: none; }
h2.h5, h2.h6 { font-weight: 600; }
.text-secondary, .text-muted { color: var(--muted) !important; }
.text-primary { color: var(--primary) !important; }
.fw-bold, .fw-semibold { font-weight: 600 !important; }
.shadow-sm, .shadow-lg { box-shadow: none !important; }
.btn { min-height: 34px; padding: 6px 12px; border-radius: 5px; font-size: 13px; font-weight: 500; box-shadow: none !important; }
.btn-sm { min-height: 28px; padding: 3px 9px; font-size: 12px; }
.btn-primary, .btn-dark { --bs-btn-bg: #ec6723; --bs-btn-border-color: #ec6723; --bs-btn-color: #fff; --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #c65015; --bs-btn-hover-border-color: #c65015; --bs-btn-active-color: #fff; --bs-btn-active-bg: #a9430f; --bs-btn-active-border-color: #a9430f; }
.btn-outline-primary, .btn-outline-secondary { --bs-btn-color: #4d514a; --bs-btn-border-color: #dedfd9; --bs-btn-hover-bg: #f3f4ef; --bs-btn-hover-color: #20231e; --bs-btn-hover-border-color: #cbd0c6; --bs-btn-active-bg: #ebeee7; --bs-btn-active-color: #20231e; --bs-btn-active-border-color: #cbd0c6; }
.btn-quiet { background: transparent; border-color: transparent; color: var(--muted); }
.btn-quiet:hover { background: #edeee9; color: var(--ink); }
.form-control, .form-select { min-height: 36px; border: 1px solid #dedfd9; border-radius: 5px; padding: 7px 10px; font-size: 13px; background-color: #fff; color: var(--ink); }
.form-select { padding-right: 30px; }
.form-control:focus, .form-select:focus { border-color: #ec6723; box-shadow: 0 0 0 3px #fce4d5; }
.form-control::placeholder { color: #999b94; }
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
textarea.form-control { min-height: 86px; }
.form-label { font-size: 13px; color: #55594f; margin-bottom: 7px; font-weight: 500; }
.form-text { font-size: 12px; color: var(--muted); }
.card { border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.card.border-0 { border: 1px solid var(--line) !important; }
.card-header { padding: 16px 18px !important; border-color: var(--line); background: #fff; }
.card-header h2 { font-size: 14px; }
.table { --bs-table-color: var(--ink); --bs-table-hover-bg: #fafaf8; font-size: 13px; }
.table > :not(caption) > * > * { padding: 11px 14px; border-color: var(--line); box-shadow: none; }
.table thead th { background: #fafaf8; color: #797b73; font-size: 12px; font-weight: 500; text-transform: none; letter-spacing: 0; white-space: nowrap; }
.table tbody tr:hover > * { background-color: #fafaf8; }
.table a:not(.btn) { color: var(--primary); font-weight: 500; text-decoration: none; }
.table a:not(.btn):hover { text-decoration: underline; }
.table tfoot th { background: #f5f6f1; font-weight: 600; }
.table-responsive { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
.number-cell { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.empty-state { text-align: center !important; color: #8a8d83 !important; padding: 48px 16px !important; }
.filter-bar { background: #fff; padding: 0 0 16px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.filter-bar .form-control, .filter-bar .form-select { background-color: #fafaf8; }
.status-badge, .priority, .container-status, .confirmed-badge, .simulation-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px; border-radius: 4px; font-size: 11px; font-weight: 500; line-height: 1.4; white-space: nowrap; margin: 0; }
.status-badge span { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-pending, .status-closed, .priority-normal, .container-status, .simulation-badge { background: #eeefeb; color: #75796d; }
.status-production { background: #e7f1ff; color: #245fac; }
.status-to_ship { background: #f1e9fa; color: #77529a; }
.status-shipped, .container-status-shipped { background: #e0f3fb; color: #166783; }
.status-ready, .confirmed-badge, .container-status-loaded { background: #dff6eb; color: #15704c; }
.status-loading, .priority-urgent, .container-status-loading { background: #fff0cb; color: #8b590b; }
.priority-critical { background: #ffe4e3; color: #ae3b40; }
.metric-card { border: 1px solid var(--line); border-radius: 5px; background: #fff; padding: 20px; height: 100%; }
.metric-card span { display: block; color: var(--muted); font-size: 12px; }
.metric-card strong { display: block; margin-top: 10px; font-size: 28px; line-height: 1.1; font-weight: 500; letter-spacing: -.8px; font-variant-numeric: tabular-nums; }
.metric-icon { display: none; }
.summary-strip, .split-summary { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); border: 1px solid var(--line); background: #fafaf8; border-radius: 5px; }
.summary-strip > div, .split-summary > div { padding: 14px 18px; border-right: 1px solid var(--line); }
.summary-strip > div:last-child, .split-summary > div:last-child { border-right: 0; }
.summary-strip span, .split-summary span { display: block; color: var(--muted); font-size: 11px; }
.summary-strip strong, .split-summary strong { display: block; margin-top: 6px; font-size: 17px; font-weight: 550; font-variant-numeric: tabular-nums; }
.summary-strip small { font-size: 11px; color: var(--muted); }
.form-wrap { max-width: 1080px; margin: 0 auto; }
.form-wrap.narrow { max-width: 540px; }
.form-wrap.wide { max-width: 1200px; }
.form-wrap > form.card { padding: 26px !important; }
.form-wrap > .mb-4 > p { font-size: 13px; }
.order-editor { max-width: 1440px; margin: auto; }
.editor-section { display: grid; grid-template-columns: 180px minmax(0,1fr); gap: 28px; padding: 24px 0; margin: 0; border-bottom: 1px solid var(--line); background: #fff; }
.editor-section-title > span { display: none; }
.editor-section-title h2 { margin: 0 0 7px; font-size: 14px; font-weight: 600; }
.editor-section-title p { font-size: 12px; color: var(--muted); margin: 0; }
.editor-actions { position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: flex-end; gap: 8px; padding: 16px 0; background: #fff; border-top: 1px solid var(--line); }
.order-status-select { font-weight: 500; min-width: 110px; }
.order-status-ready { color: #516c3b; }.order-status-loading { color: #916f30; }
.role-notice, .calculation-note { padding: 12px 16px; background: #f7f7f2; border: 1px solid #e8e9df; border-radius: 5px; color: #666b59; font-size: 13px; }
.calculation-note { display: flex; flex-direction: column; gap: 4px; }
.calculation-note span { color: var(--muted); font-size: 12px; }
.calculated-result { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; border: 1px solid #e4e9df; border-radius: 5px; background: #f3f6ef; color: #5a6c4d; font-size: 13px; }
.calculated-result span { color: #78866c; font-size: 11px; }
.customer-hero { background: #f7f7f3; border: 1px solid var(--line); border-radius: 5px; color: var(--ink); padding: 24px; }
.customer-hero .text-white, .customer-hero .text-white-50 { color: var(--muted) !important; }
.order-card { background: #fff; border: 1px solid var(--line); border-radius: 5px; padding: 20px; }
.product-name { font-size: 15px; font-weight: 600; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.detail-grid span, .order-note span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.detail-grid strong { font-size: 13px; }
.order-note { padding: 12px; background: var(--soft); border-radius: 4px; }
.empty-card { padding: 60px 20px; text-align: center; border: 1px solid var(--line); }
.empty-check { color: #647655; margin-bottom: 14px; }
.alert { border-radius: 5px; font-size: 13px; }
.alert-success { color: #4e6340; background: #f1f5eb; border-color: #dfe8d6; }
.dropdown-menu { border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 6px 20px #25282012; font-size: 13px; }
.breadcrumb-line { display: flex; align-items: center; gap: 9px; font-size: 12px; color: #93968c; margin-bottom: 22px; }
.breadcrumb-line a { text-decoration: none; color: #787d70; }.breadcrumb-line a:hover { text-decoration: underline; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.page-heading p { color: var(--muted); margin: 9px 0 0; font-size: 13px; }
.heading-actions { display: flex; gap: 8px; flex-shrink: 0; }
.section-heading { font-size: 14px; font-weight: 600; margin: 0 0 18px; }
@media(max-width: 900px) {
  .editor-section { grid-template-columns: 1fr; gap: 16px; }
  .editor-section .row > [class^='col-'] { flex: 0 0 50%; width: 50%; }
  .summary-strip, .split-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .summary-strip > div, .split-summary > div { border-bottom: 1px solid var(--line); }
  .page-heading { flex-wrap: wrap; }.page-title { font-size: 25px; }
}
/* Shipment tracking calendar */
.calendar-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:16px; flex-wrap:wrap; }
.calendar-toolbar form { display:flex; align-items:center; gap:8px; }
.calendar-toolbar input { width:auto; }
.calendar-scroll { overflow-x:auto; }
.calendar-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); min-width:700px; border-top:1px solid var(--line); border-left:1px solid var(--line); }
.calendar-weekday,.calendar-day { border-right:1px solid var(--line); border-bottom:1px solid var(--line); padding:8px; }
.calendar-weekday { background:var(--soft); font-weight:600; }
.calendar-day { min-height:112px; }
.calendar-muted { background:#f7f9f9; color:var(--muted); }
.calendar-today { box-shadow:inset 0 3px var(--primary); }
.calendar-event { display:block; padding:7px; margin-top:6px; background:#e5f5f1; border-radius:4px; text-decoration:none; font-size:12px; overflow-wrap:anywhere; }
.calendar-event strong { display:block; margin-bottom:4px; }
.calendar-event-pending { background:#fde8e7; color:#a32222; border-left:3px solid #cc3333; }
.calendar-event-pending:hover { background:#fbd6d4; color:#801919; }
.calendar-event-pending .product-subline { color:#a32222; }
.calendar-event-released { background:#e5f5f1; color:#075e50; border-left:3px solid #16816e; }
.calendar-legend { display:flex; flex-wrap:wrap; gap:16px; margin-bottom:12px; font-size:12px; }
.calendar-legend-pending { color:#a32222; }
.calendar-legend-released { color:#075e50; }
@media(max-width:600px) { .calendar-toolbar { gap:8px; } .calendar-toolbar form { order:3; width:100%; } }

.shipment-cargo-table th, .shipment-cargo-table td { white-space: nowrap; }
.shipment-cargo-table td:nth-child(3) { white-space: normal; min-width: 220px; }
