:root {
  --ink: #292927; --muted: #787873; --primary: #323531; --canvas: #fff;
  --line: #e9e9e5; --soft: #f7f7f5; --sidebar: #f6f6f3;
  --bs-body-color: var(--ink); --bs-body-bg: #fff; --bs-border-color: var(--line);
  --bs-primary: #323531; --bs-link-color: #373b36; --bs-link-hover-color: #111;
}
* { 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: -.7px; }
.eyebrow { display: none; }
h2.h5, h2.h6 { font-weight: 600; }
.text-secondary, .text-muted { color: var(--muted) !important; }
.text-primary { color: #454d41 !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: #353833; --bs-btn-border-color: #353833; --bs-btn-color: #fff; --bs-btn-hover-bg: #20231e; --bs-btn-hover-border-color: #20231e; --bs-btn-active-bg: #20231e; --bs-btn-active-border-color: #20231e; }
.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: #9ba491; box-shadow: 0 0 0 2px #eaf0e5; }
.form-control::placeholder { color: #999b94; }
.form-check-input:checked { background-color: #495443; border-color: #495443; }
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 { color: #3c4436; font-weight: 500; text-decoration: none; }
.table a:hover { text-decoration: underline; }
.table tfoot th { background: #f5f6f1; font-weight: 600; }
.table-responsive { 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, .status-to_ship, .status-shipped, .container-status-shipped { background: #edf0f2; color: #576b78; }
.status-ready, .confirmed-badge, .container-status-loaded { background: #edf2e8; color: #5b7244; }
.status-loading, .priority-urgent, .container-status-loading { background: #f7f1e5; color: #937737; }
.priority-critical { background: #f7eae6; color: #a06050; }
.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; }
}
