:root {
  --graphite: #202124;
  --black: #0d0d0d;
  --white: #fff;
  --raw: #f7f7f4;
  --warm: #f1efe9;
  --orange: #ff5a24;
  --secondary: #74746f;
  --caption: #a5a5a0;
  --border: #e5e5e0;
  --divider: #ecece8;
  --success: #248a3d;
  --sidebar-width: 248px;
  --radius-card: 12px;
  --font-cn: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-en: "Helvetica Neue", Arial, system-ui, sans-serif;
}

/* Product editing follows the work order: details, measurements, then imagery. */
.product-editor-columns { display: grid; grid-template-columns: minmax(0, 1.95fr) minmax(300px, .85fr); align-items: start; gap: 16px 20px; min-width: 0; }
.product-lower-grid { display: contents; }
.product-editor-primary, .product-media-stack { display: grid; min-width: 0; }
.product-editor-overview { grid-column: 1 / -1; }
.product-measurements-panel { grid-column: 1; grid-row: 2; }
.product-color-panel { grid-column: 1; grid-row: 3; }
.product-media-stack { grid-column: 2; grid-row: 2 / span 2; align-self: start; }
.product-editor .form-panel { min-width: 0; min-height: 0; }
.product-editor .panel-head { gap: 12px; }
.product-editor .panel-head h3 { margin: 0; font-size: 17px; }
.product-editor .field { min-width: 0; }
.product-editor .field > span { font-size: 11px; }
.product-editor .row-link, .product-row-actions button { border: 0; background: transparent; padding: 6px 0; color: #62625c; }
.product-editor .row-link:hover, .product-row-actions button:hover { color: #b63a12; }
.product-editor .read-only-note { border-left: 0; }
.product-editor [data-upload-status] { color: #62625c; }
.product-editor-overview { display: grid; grid-template-columns: minmax(0, 1fr) minmax(310px, .55fr); gap: 24px; align-items: start; }
.product-editor-primary { gap: 20px; }
.product-info-section, .product-parameter-section, .product-size-pane { min-width: 0; }
.product-parameter-section { padding-top: 20px; border-top: 1px solid var(--divider); }
.product-info-section .panel-head, .product-parameter-section .panel-head { margin-bottom: 16px; }
.product-first-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 12px; margin-bottom: 12px; }
.product-first-row .field { margin: 0; gap: 6px; }
.product-first-row .field input { height: 34px; padding: 0 9px; font-size: 12px; }
.product-first-row .field:first-child input { font-size: 13px; }
.product-first-row .field input[aria-invalid="true"] { border-color: #c93627; box-shadow: 0 0 0 2px rgba(201, 54, 39, .12); }
.product-sku-feedback { color: #b52e22; font-size: 11px; line-height: 1.45; }
.product-fields-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.product-scene-field { grid-column: span 2; }
.scene-picker { position: relative; width: 100%; }
.scene-picker > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 34px; padding: 0 9px; border: 1px solid var(--border); background: #fff; font-size: 12px; cursor: pointer; }
.scene-picker > summary::-webkit-details-marker { display: none; }
.scene-picker > summary::after { content: ''; width: 6px; height: 6px; flex: 0 0 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.scene-picker[open] > summary::after { transform: rotate(225deg) translateY(-1px); }
.scene-picker > summary:focus-visible { outline: 2px solid #b63a12; outline-offset: 2px; }
.scene-picker [data-scene-summary] { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.scene-picker-menu { position: absolute; top: calc(100% + 4px); left: 0; width: max(100%, 240px); max-width: min(400px, calc(100vw - 56px)); max-height: 275px; overflow: auto; padding: 6px; z-index: 5; border: 1px solid var(--border); background: #fff; box-shadow: 0 8px 22px rgba(25, 25, 25, .12); }
.scene-option { display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 4px 7px; cursor: pointer; font-size: 12px; }
.scene-option:hover, .scene-option:focus-within { background: var(--raw); }
.scene-option input { width: 15px !important; height: 15px !important; margin: 0; accent-color: var(--orange); }
.scene-option small { margin-left: auto; color: #62625c; font-size: 11px; }
.scene-picker-menu > a { display: block; padding: 9px 7px 4px; color: #a33b19; font-size: 11px; }
.scene-picker-menu > p { margin: 8px 6px; color: var(--secondary); font-size: 12px; }
.product-fields-grid .field { margin: 0; gap: 6px; }
.product-fields-grid .field input, .product-fields-grid .field select { height: 34px; padding: 0 9px; font-size: 12px; }
.product-field-wide { grid-column: span 2; }
.product-fields-grid .field small { color: #62625c; font-size: 11px; line-height: 1.4; }
.product-field-help, .product-image-controls p { color: #62625c; line-height: 1.5; margin: 0; }
.product-size-pane { padding-left: 20px; border-left: 1px solid var(--divider); }
.product-size-pane .panel-head { margin-bottom: 5px; }
.product-size-pane .product-field-help { font-size: 11px; margin-bottom: 9px; }
.product-bulk-price { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; margin-bottom: 5px; }
.product-bulk-price .field { flex: 1 1 110px; margin: 0; gap: 4px; }
.product-bulk-price input { width: 100%; min-width: 0; height: 32px; padding: 0 8px; border: 1px solid var(--border); border-radius: 5px; font-size: 12px; font-variant-numeric: tabular-nums; }
.product-bulk-price .button { min-height: 32px; padding: 0 9px; font-size: 11px; }
.product-size-pane .product-bulk-price-help { margin-bottom: 10px; }
.product-size-group[hidden] { display: none; }
.product-size-table { width: 100%; min-width: 0; table-layout: fixed; border-collapse: collapse; font-size: 12px; }
.product-size-table th, .product-size-table td { padding: 3px 8px; height: 32px; }
.product-size-table th:first-child { width: 78px; }
.product-size-table th:nth-child(2) { width: 58px; }
.product-size-table th[scope="row"] { font-weight: 600; color: var(--graphite); background: transparent; }
.product-size-table th { text-transform: none; color: #62625c; letter-spacing: 0; }
.product-size-table input[type="number"] { width: 100%; max-width: 112px; height: 27px; min-height: 0; border: 1px solid var(--border); border-radius: 5px; padding: 3px 7px; font-size: 12px; font-variant-numeric: tabular-nums; }
.product-size-table input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--orange); vertical-align: middle; cursor: pointer; }
.product-size-table tr:has(input[type="checkbox"]:checked) { background: #fff9f6; }
.product-measurements-panel .panel-head { margin-bottom: 6px; }
.product-measurements-panel .product-field-help { max-width: 78ch; font-size: 12px; margin-bottom: 12px; }
.measurement-mobile-hint { display: none; }
.measurement-table-wrap { width: 100%; overflow-x: auto; }
.measurement-table { width: 100%; max-width: 840px; min-width: 640px; border-collapse: collapse; table-layout: fixed; font-size: 12px; }
.measurement-table th, .measurement-table td { height: 40px; padding: 4px 6px; border-bottom: 1px solid var(--divider); }
.measurement-table thead th { height: 36px; background: var(--raw); color: #62625c; font-size: 11px; text-align: left; font-weight: 600; }
.measurement-table thead th:first-child { width: 52px; }
.measurement-table thead th:last-child { width: 164px; }
.measurement-table thead span { display: block; font-size: 10px; font-weight: 400; }
.measurement-table tbody th { font-weight: 650; font-variant-numeric: tabular-nums; }
.measurement-table tbody tr[hidden] { display: none; }
.measurement-table input { width: 100%; min-width: 0; height: 30px; padding: 0 7px; border: 1px solid var(--border); border-radius: 5px; font: inherit; font-variant-numeric: tabular-nums; }
.measurement-table input:focus-visible { outline: 2px solid #b63a12; outline-offset: 1px; }
.measurement-empty { color: #62625c; padding: 16px 4px 2px; margin: 0; font-size: 12px; }
.measurement-empty[hidden] { display: none; }
.size-group-control select { min-width: 100px; height: 30px; min-height: 0; padding: 3px 24px 3px 8px; border: 1px solid var(--border); background: white; border-radius: 5px; font-size: 12px; }
.product-color-panel .panel-head { display: flex; align-items: baseline; justify-content: flex-start; gap: 16px; margin-bottom: 4px; }
.product-color-panel .product-field-help { margin: 0; font-size: 11px; }
.product-editor .color-editor-row { grid-template-columns: 135px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--divider); }
.product-editor .color-editor-fields { display: grid; grid-template-columns: minmax(95px, 1fr) 62px 82px; align-items: center; gap: 7px; min-width: 0; }
.product-editor .color-editor-fields > .field:first-of-type { grid-column: auto; }
.product-editor .color-editor-fields .field { margin: 0; gap: 5px; }
.product-editor .color-editor-fields input, .product-editor .color-editor-fields select { min-width: 0; width: 100%; height: 32px; padding: 0 8px; font-size: 12px; }
.product-editor .color-remove { grid-column: 3; align-self: center; justify-self: end; }
.product-editor .color-editor-preview { display: grid; grid-template-columns: 60px 74px; grid-template-rows: 30px 26px; align-items: center; gap: 2px 8px; }
.product-editor .color-editor-preview .admin-image-preview { grid-row: 1 / 3; width: 60px; height: 60px; min-height: 0; }
.product-editor .color-editor-preview .button { width: 74px; min-height: 28px; margin: 0; padding: 2px 4px; font-size: 11px; }
.product-editor .color-editor-preview [data-upload-status] { grid-column: 2; font-size: 10px; }
.product-editor .color-view-details { grid-column: 1 / -1; width: 100%; padding: 7px 9px; border: 1px solid var(--divider); background: #fafaf8; }
.product-editor .color-view-details summary { cursor: pointer; color: var(--graphite); font-size: 12px; font-weight: 600; }
.product-editor .color-view-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 9px; }
.product-editor .color-view-card { min-width: 0; padding: 8px; border: 1px solid var(--divider); background: #fff; }
.product-editor .color-view-card > b { display: block; margin-bottom: 6px; font-size: 11px; }
.product-editor .color-view-card .admin-image-preview { width: 100%; height: 84px; min-height: 84px; }
.product-editor .color-view-card .admin-image-preview img { object-fit: contain; }
.product-editor .color-view-actions { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.product-editor .color-view-actions .button { min-height: 28px; padding: 3px 8px; font-size: 11px; }
.product-editor .color-view-card [data-upload-status] { display: block; margin-top: 5px; color: #62625c; font-size: 10px; }
.product-editor .color-view-details .product-field-help { margin: 8px 0 0; font-size: 11px; }
.product-color-empty { color: #62625c; padding: 16px 0; margin: 0; }
[data-color-list]:has([data-color-row]) + .product-color-empty { display: none; }
.product-color-panel > [data-action="add-color"] { margin-top: 12px; min-height: 32px; }
.product-media-stack { gap: 16px; }
.product-image-layout { display: flex; gap: 24px; align-items: center; }
.product-editor .product-image-layout > .admin-image-preview { width: 180px; height: 180px; flex: 0 0 180px; }
.product-image-controls small { display: block; margin-top: 12px; color: #62625c; }
.four-view-panel .panel-head { margin-bottom: 12px; }
.four-view-panel .panel-head .product-field-help { margin-top: 4px; font-size: 11px; }
.four-view-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.four-view-image-card { min-width: 0; padding: 9px; border: 1px solid var(--divider); background: #fff; }
.four-view-image-card > b { display: block; margin-bottom: 7px; font-size: 12px; font-weight: 600; }
.four-view-image-content { display: grid; grid-template-columns: 68px minmax(0, 1fr); align-items: center; gap: 8px; min-width: 0; }
.four-view-image-content .admin-image-preview { width: 68px; height: 68px; min-height: 68px; }
.four-view-image-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.four-view-image-controls .button { min-height: 30px; padding: 4px 8px; font-size: 11px; }
.four-view-image-controls .row-link { font-size: 11px; }
.four-view-image-controls [data-upload-status] { flex-basis: 100%; color: #62625c; font-size: 10px; line-height: 1.4; }
.product-row-actions { display: flex; align-items: center; gap: 16px; white-space: nowrap; }
.product-list-table th, .product-list-table td { padding-inline: 10px; }
.product-list-table td { height: 58px; }
.product-list-table .product-select-cell { white-space: normal; }
.product-list-table td[data-table-column="3"] { font-weight: 600; }
.product-editor input:focus-visible, .product-editor select:focus-visible, .product-editor button:focus-visible, .product-row-actions :focus-visible { outline: 2px solid #b63a12; outline-offset: 3px; }
.product-editor button:disabled, .product-row-actions button:disabled, body:has(.product-editor) .heading-actions button:disabled { cursor: wait; opacity: .6; }
body:has(.product-editor) .heading-actions { flex-wrap: wrap; justify-content: flex-end; }
body:has(.product-editor) .heading-actions button:focus-visible { outline: 2px solid #b63a12; outline-offset: 3px; }
.product-editor .form-actions { position: static; background: #fff; padding: 18px 24px; border-top: 1px solid var(--border); margin-top: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 1500px) {
  .product-editor-overview { grid-template-columns: minmax(0, 1fr) minmax(310px, .6fr); gap: 20px; }
  .product-fields-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1260px) {
  .product-editor-columns { grid-template-columns: minmax(0, 1fr); }
  .product-editor-overview, .product-measurements-panel { grid-column: 1; grid-row: auto; }
  .product-lower-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(350px, .85fr); align-items: start; gap: 16px; min-width: 0; }
  .product-color-panel, .product-media-stack { grid-column: auto; grid-row: auto; }
}
@media (max-width: 1200px) {
  .product-editor-overview { grid-template-columns: minmax(0, 1fr) minmax(290px, .65fr); gap: 16px; }
  .product-editor .form-panel { padding: 20px; }
  .product-fields-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-first-row { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
  .product-size-pane { padding-left: 16px; }
  .product-lower-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .product-editor-overview { grid-template-columns: 1fr; }
  .product-size-pane { padding: 20px 0 0; border-left: 0; border-top: 1px solid var(--divider); }
}
@media (max-width: 760px) {
  html:has(.product-editor), body:has(.product-editor) { min-width: 0; }
  body:has(.product-editor) .sidebar { display: none; }
  body:has(.product-editor) .main { margin-left: 0; width: 100%; }
  body:has(.product-editor) .content { padding: 24px 16px 40px; }
  body:has(.product-editor) .topbar { padding: 12px 16px; }
  body:has(.product-editor) .page-heading { flex-wrap: wrap; gap: 16px; }
  body:has(.product-editor) .heading-actions { width: 100%; justify-content: flex-start; }
  .product-first-row { grid-template-columns: 1fr; }
  .product-color-panel .panel-head { flex-direction: column; gap: 4px; }
  .product-editor .color-editor-row { grid-template-columns: 150px minmax(0, 1fr); gap: 12px; align-items: start; }
  .product-editor .color-editor-fields { grid-template-columns: minmax(0, 1fr) 72px; gap: 8px; }
  .product-editor .color-editor-fields > .field:first-of-type { grid-column: 1 / -1; }
  .product-editor .color-remove { grid-column: 2; }
  .product-editor .color-view-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-editor .form-actions { position: static; padding: 12px 0 0; }
  .product-image-layout { flex-direction: column; align-items: flex-start; }
  .measurement-mobile-hint { display: block; margin: 0 0 7px; color: #62625c; font-size: 11px; }
  .measurement-table th, .measurement-table td { height: 46px; }
  .measurement-table input { height: 38px; }
  .product-size-table th, .product-size-table td { height: 40px; }
  .product-size-table input[type="number"] { height: 34px; }
  .product-bulk-price input, .product-bulk-price .button, body:has(.product-editor) .heading-actions .button { min-height: 44px; }
  .four-view-grid { gap: 8px; }
  .four-view-image-card { padding: 7px; }
  .four-view-image-content { grid-template-columns: 56px minmax(0, 1fr); gap: 6px; }
  .four-view-image-content .admin-image-preview { width: 56px; height: 56px; min-height: 56px; }
  .four-view-image-controls { gap: 3px 5px; }
  .four-view-image-controls .button { min-height: 30px; padding: 4px 6px; }
}
@media (max-width: 760px) {
  html:has(.product-list-toolbar), body:has(.product-list-toolbar) { min-width: 0; }
  body:has(.product-list-toolbar) .sidebar { display: none; }
  body:has(.product-list-toolbar) .main { width: 100%; margin-left: 0; }
  body:has(.product-list-toolbar) .content { padding: 24px 16px 40px; }
  body:has(.product-list-toolbar) .topbar { padding: 12px 16px; }
  body:has(.product-list-toolbar) .page-heading { flex-wrap: wrap; gap: 16px; }
  .product-list-toolbar .product-search { flex: 1 1 100%; width: 100%; max-width: none; }
  .product-list-toolbar .product-category-picker, .product-list-toolbar select { flex: 1 1 145px; }
  .product-list-toolbar .toolbar-count { flex-basis: 100%; margin-left: 0; }
}
.custom-attachment-list{display:flex;flex-wrap:wrap;gap:10px;margin:15px 0 4px}
.custom-content-image{display:block;width:180px;height:120px;object-fit:contain;background:#f6f6f7;border:1px solid var(--divider);border-radius:8px}
.custom-scene-row{display:grid;grid-template-columns:135px minmax(0,1fr);gap:18px;padding:20px 0;border-bottom:1px solid var(--divider)}
.custom-scene-row>img{width:135px;height:115px;object-fit:cover;border-radius:8px}
.custom-scene-row>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;align-items:end}
.custom-scene-row .field{min-width:0}.custom-scene-row .field input{width:100%}
.custom-preview{position:relative;background:#fff;border:2px solid var(--orange);border-radius:12px;padding:28px;margin-bottom:22px}
.custom-preview>button{position:absolute;right:20px;top:20px}.custom-preview>div:first-of-type{background:#f7f7f8;padding:32px;max-width:100%;border-radius:12px}
.custom-preview h2{font-size:36px;margin:10px 0}.custom-preview>div:first-of-type img{display:block;max-width:100%;height:280px;object-fit:contain;margin:15px auto}
.custom-preview-scenes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.custom-preview-scenes article{padding:12px;border:1px solid var(--divider);border-radius:8px}.custom-preview-scenes img{width:100%;height:140px;object-fit:cover;border-radius:5px}
@media(max-width:1000px){.custom-scene-row>div{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.custom-scene-row{grid-template-columns:1fr}.custom-scene-row>div,.custom-preview-scenes{grid-template-columns:1fr}.custom-preview h2{font-size:27px}}
@media (max-width: 390px) {
  .product-fields-grid { grid-template-columns: 1fr; }
  .product-field-wide, .product-scene-field { grid-column: auto; }
}

/* Product settings: category and scene maintenance share one sub-navigation. */
.product-settings-tabs { display: flex; align-items: center; gap: 24px; margin: -2px 0 18px; border-bottom: 1px solid var(--border); }
.product-settings-tabs a { position: relative; display: inline-flex; align-items: center; min-height: 38px; color: #62625c; font-size: 13px; }
.product-settings-tabs a.active { color: var(--graphite); font-weight: 600; }
.product-settings-tabs a.active::after { content: ''; position: absolute; height: 2px; bottom: -1px; left: 0; right: 0; background: var(--orange); }
.scene-settings-panel { min-height: 0; }
.scene-settings-panel .panel-head { margin-bottom: 14px; }
.scene-create-form, .scene-settings-row { display: grid; grid-template-columns: minmax(180px, 280px) 86px 110px auto auto; align-items: end; justify-content: start; gap: 12px; padding: 12px 0; }
.scene-create-form { grid-template-columns: minmax(180px, 280px) 86px auto; border-bottom: 1px solid var(--border); }
.scene-settings-row { border-bottom: 1px solid var(--divider); }
.scene-settings-row:last-child { border-bottom: 0; }
.scene-create-form .field, .scene-settings-row .field { min-width: 0; margin: 0; }
.scene-create-form .field input, .scene-settings-row .field input, .scene-settings-row .field select { height: 34px; padding: 0 9px; }
.scene-create-form > .button, .scene-settings-row > .button, .scene-settings-row > .row-link { align-self: end; min-height: 34px; }
.scene-settings-panel > .product-field-help { margin-top: 14px; font-size: 12px; }
@media (max-width: 760px) {
  .scene-create-form, .scene-settings-row { grid-template-columns: minmax(0, 1fr) 78px; gap: 8px; }
  .scene-create-form > .button, .scene-settings-row > .button { justify-self: start; }
}

* { box-sizing: border-box; }
html, body { margin: 0; min-width: 1100px; background: var(--warm); color: var(--graphite); font-family: var(--font-cn); font-size: 14px; }
body { letter-spacing: 0; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }

.admin-shell { min-height: 100vh; display: flex; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-width); background: var(--black); color: var(--white); padding: 28px 22px 22px; display: flex; flex-direction: column; z-index: 5; }
.brand { padding: 3px 10px 28px; border-bottom: 1px solid rgba(255,255,255,.13); }
.brand-logo { display: flex; align-items: center; justify-content: center; width: 164px; min-height: 74px; padding: 4px; background: #fff; border-radius: 4px; }
.brand-logo img { display: block; width: 100%; max-height: 66px; object-fit: contain; }
.brand-cn { color: rgba(255,255,255,.55); font-size: 11px; letter-spacing: 1.5px; margin-top: 7px; }
.env-block { margin: 22px 10px 28px; display: flex; gap: 10px; align-items: center; }
.env-block b { display: block; font-family: var(--font-en); font-size: 11px; letter-spacing: 1px; }
.env-block small { color: rgba(255,255,255,.45); font-size: 11px; }
.env-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px rgba(255,90,36,.12); }
.nav { display: flex; flex-direction: column; gap: 2px; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.26) transparent; }
.nav-label { margin: 0 10px 9px; color: rgba(255,255,255,.35); font: 11px var(--font-en); letter-spacing: 1.4px; }
.nav-label:not(:first-child) { margin-top: 23px; }
.nav-link { min-height: 42px; display: flex; align-items: center; gap: 12px; padding: 0 11px; color: rgba(255,255,255,.56); font-size: 14px; border-left: 2px solid transparent; transition: .15s ease; }
.nav-link:hover { color: var(--white); background: rgba(255,255,255,.05); }
.nav-link.active { color: var(--white); background: rgba(255,255,255,.08); border-left-color: var(--orange); }
.nav-mark { width: 14px; height: 14px; display: inline-block; border: 1px solid currentColor; opacity: .8; }
.nav-link.active .nav-mark { background: var(--orange); border-color: var(--orange); }
.nav-group { margin: 0; }
.nav-group-title { min-height: 42px; display: flex; align-items: center; justify-content: space-between; padding: 0 11px 0 27px; color: rgba(255,255,255,.56); font-size: 14px; border-left: 2px solid transparent; cursor: pointer; list-style: none; }
.nav-group-title::-webkit-details-marker { display: none; }
.nav-group-title:hover, .nav-group-title.active { color: var(--white); background: rgba(255,255,255,.05); }
.nav-group-title:focus-visible, .nav-link:focus-visible { outline: 2px solid var(--orange); outline-offset: -2px; }
.nav-group-chevron { width: 7px; height: 7px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(45deg); transition: transform .15s ease; }
.nav-group[open] .nav-group-chevron { transform: rotate(225deg); }
.nav-submenu { margin: 4px 0 8px 16px; padding-left: 9px; border-left: 1px solid rgba(255,255,255,.16); }
.nav-submenu .nav-link { min-height: 36px; gap: 9px; padding-left: 12px; border-left: 0; font-size: 13px; }
.nav-submenu .nav-link.active { background: rgba(255,255,255,.08); }
.nav-submenu .nav-mark { width: 6px; height: 6px; border-radius: 50%; }
.sidebar-foot { margin-top: auto; display: flex; align-items: center; gap: 9px; color: rgba(255,255,255,.36); font: 10px var(--font-en); letter-spacing: 1px; }
.signal-line { width: 23px; height: 3px; background: var(--orange); display: inline-block; }

.main { width: calc(100% - var(--sidebar-width)); margin-left: var(--sidebar-width); min-height: 100vh; }
.topbar { height: 105px; background: var(--white); border-bottom: 1px solid var(--divider); display: flex; align-items: center; justify-content: space-between; padding: 0 42px; }
.crumb, .eyebrow { color: var(--caption); font: 11px var(--font-en); letter-spacing: 1.5px; text-transform: uppercase; }
.topbar h1 { margin: 9px 0 0; font-size: 25px; line-height: 1; font-weight: 600; }
.top-actions { position: relative; display: flex; align-items: center; gap: 14px; }
.mode-chip { height: 36px; border: 1px solid var(--border); background: var(--white); color: var(--secondary); padding: 0 13px; font-size: 12px; }
.mode-chip { display: flex; align-items: center; gap: 8px; font-family: var(--font-en); letter-spacing: .5px; }
.mode-chip i { display: block; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); }
.account-menu-wrap { position: relative; }
.account-avatar { width: 36px; height: 36px; padding: 0; border: 1px solid var(--border); border-radius: 50%; background: var(--graphite); color: var(--white); font-weight: 600; }
.account-avatar:hover { background: var(--orange); }
.account-menu { position: absolute; right: 0; top: 44px; width: 190px; padding: 6px; background: var(--white); border: 1px solid var(--border); z-index: 10; box-shadow: 0 4px 18px rgba(0,0,0,.08); }
.account-menu-user { display: grid; gap: 3px; padding: 9px 10px; border-bottom: 1px solid var(--divider); }
.account-menu-user small { color: var(--caption); font-size: 11px; }
.account-menu > button { display: block; width: 100%; border: 0; background: transparent; padding: 10px; text-align: left; color: var(--secondary); }
.account-menu > button:hover { background: var(--raw); color: var(--graphite); }
.hidden { display: none !important; }
.content { padding: 38px 42px 72px; max-width: 1800px; margin: auto; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 30px; }
.page-heading h2 { margin: 10px 0 7px; font-size: 32px; line-height: 1.2; font-weight: 600; }
.page-heading p { margin: 0; color: var(--secondary); font-size: 14px; }
.heading-actions { display: flex; gap: 10px; }
.button { min-height: 40px; padding: 0 17px; border-radius: 8px; border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; white-space: nowrap; transition: .14s ease; }
.button:hover { opacity: .78; transform: scale(.99); }
.button.primary { color: var(--white); background: var(--orange); border-color: var(--orange); }
.button.secondary { color: var(--graphite); background: var(--white); border-color: #d7d7d1; }
.button.text { background: transparent; border-color: transparent; padding-left: 0; color: var(--graphite); }
.button.full { width: 100%; margin-top: 15px; }
.category-create-panel { margin-bottom: 22px; }
.category-create-form { display: grid; grid-template-columns: minmax(220px, 2fr) minmax(180px, 1.5fr) 100px auto; gap: 14px; align-items: end; }
.category-create-form .field { margin: 0; }
.category-create-form .button { margin-bottom: 1px; }
.category-help { margin: 16px 0 0; color: var(--secondary); font-size: 12px; line-height: 1.6; }
.category-list { display: grid; gap: 14px; }
.category-group { background: var(--white); border: 1px solid var(--border); padding: 18px 22px; }
.category-group-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 13px; border-bottom: 1px solid var(--divider); }
.category-group-head b { font-size: 17px; }
.category-group-head span { color: var(--secondary); font-size: 12px; }
.category-editor-row { display: flex; align-items: flex-start; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--divider); }
.category-editor-row:last-child { border-bottom: 0; padding-bottom: 0; }
.category-editor-row.is-child { padding-left: 28px; }
.category-row-form { flex: 1; min-width: 0; display: grid; grid-template-columns: 88px minmax(150px, 1fr) 112px auto auto; gap: 10px; align-items: center; }
.category-depth-label { color: var(--secondary); font-size: 12px; }
.category-row-form > input[name="name"], .category-order input { min-width: 0; width: 100%; height: 38px; border: 1px solid var(--border); background: var(--white); padding: 0 10px; }
.category-order { display: flex; align-items: center; gap: 7px; color: var(--secondary); font-size: 12px; }
.category-order input { width: 62px; }
.category-visible { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; color: var(--secondary); font-size: 12px; }
.category-alt-input { width: 130px; height: 34px; border: 1px solid var(--border); padding: 0 8px; font-size: 12px; }
.category-image-editor { width: 230px; display: grid; grid-template-columns: 64px auto auto; align-items: center; gap: 6px; flex: 0 0 230px; }
.category-image-preview { width: 64px; height: 52px; border: 1px solid var(--border); background: #f7f7f3; display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--caption); font-size: 10px; text-align: center; }
.category-image-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.category-upload-label { cursor: pointer; }
.category-upload-label.is-loading { opacity: .55; pointer-events: none; }
.category-image-editor small { grid-column: 1 / -1; color: var(--caption); font-size: 10px; }
.category-delete-button { align-self: center; }
.category-row-form input:focus-visible, .category-create-form input:focus-visible, .category-create-form select:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.shipping-layout { display: grid; grid-template-columns: minmax(260px, 320px) minmax(0, 1fr); gap: 18px; align-items: start; }
.shipping-list, .shipping-editor { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-card); }
.shipping-list { overflow: hidden; }
.shipping-list-head { display: flex; align-items: center; justify-content: space-between; padding: 19px 20px; }
.shipping-list-head h3, .shipping-editor-head h3 { margin: 0; font-size: 19px; font-weight: 600; }
.shipping-list-head span { color: var(--secondary); font-size: 12px; }
.shipping-list-empty { padding: 18px 20px 24px; border-top: 1px solid var(--divider); color: var(--secondary); line-height: 1.6; }
.shipping-method-item { border-top: 1px solid var(--divider); }
.shipping-method-item.is-selected { background: #fff9f5; }
.shipping-method-select { display: block; width: 100%; padding: 16px 20px 8px; border: 0; background: transparent; color: var(--graphite); text-align: left; }
.shipping-method-select:hover { background: rgba(255,90,36,.04); }
.shipping-method-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.shipping-method-title b { min-width: 0; overflow-wrap: anywhere; font-size: 15px; }
.shipping-method-meta { display: block; margin-top: 10px; color: var(--secondary); font-size: 12px; line-height: 1.5; }
.shipping-method-actions { display: flex; gap: 18px; padding: 0 20px 10px; }
.shipping-method-actions .button { min-height: 28px; }
.shipping-method-actions .button:disabled { opacity: .45; cursor: not-allowed; }
.shipping-delete { color: #a34b3b !important; }
.shipping-state { flex: 0 0 auto; padding: 4px 8px; border-radius: 5px; color: var(--secondary); background: var(--raw); font-size: 11px; }
.shipping-state.is-enabled { color: var(--success); background: #eaf5ed; }
.shipping-state.is-warning { color: #9d4f14; background: #fff0dc; }
.shipping-editor { min-width: 0; padding: 24px; }
.shipping-readonly-empty { color: var(--secondary); }
.shipping-editor-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 23px; }
.shipping-editor-head p { margin: 7px 0 0; color: var(--secondary); font-size: 12px; line-height: 1.6; }
.shipping-warning { margin: -6px 0 20px; padding: 12px 14px; border-radius: 7px; color: #86421a; background: #fff0dc; font-size: 12px; line-height: 1.6; }
.shipping-main-fields { display: grid; grid-template-columns: minmax(160px, 1.5fr) minmax(135px, 1fr) 90px; gap: 12px; align-items: end; }
.shipping-main-fields .field { min-width: 0; }
.shipping-formula { margin: 18px 0 22px; padding: 16px 18px; background: var(--raw); border-radius: 8px; }
.shipping-formula b { font-size: 13px; }
.shipping-formula p { margin: 8px 0 5px; font-size: 14px; font-weight: 600; line-height: 1.5; }
.shipping-formula small, .shipping-rate-note { color: var(--secondary); font-size: 12px; line-height: 1.65; }
.shipping-rates-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 0 12px; border-bottom: 1px solid var(--divider); }
.shipping-rates-head h4 { margin: 0; font-size: 16px; }
.shipping-rates-head span { color: var(--secondary); font-size: 12px; }
.shipping-rate-list { display: grid; }
.shipping-rate-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; padding: 12px 0; border-bottom: 1px solid var(--divider); }
.shipping-rate-row > span:first-child { min-width: 0; }
.shipping-rate-row b, .shipping-rate-row small { display: block; }
.shipping-rate-row b { font-weight: 600; }
.shipping-rate-row small { margin-top: 4px; color: var(--secondary); font-size: 11px; }
.shipping-rate-input { display: flex; align-items: center; gap: 8px; color: var(--secondary); font-size: 12px; white-space: nowrap; }
.shipping-rate-input input { width: 112px; height: 38px; padding: 0 10px; border: 1px solid var(--border); border-radius: 4px; color: var(--graphite); background: var(--white); text-align: right; font-variant-numeric: tabular-nums; }
.shipping-no-categories { padding: 22px 0; color: var(--secondary); line-height: 1.6; }
.shipping-no-categories a { color: var(--orange); text-decoration: underline; text-underline-offset: 3px; }
.shipping-rate-note { margin: 15px 0 0; }
.shipping-editor-actions { display: flex; align-items: center; gap: 14px; margin-top: 23px; }
.shipping-editor-actions [role="status"] { color: #a34b3b; font-size: 12px; }
.shipping-editor-actions .button:disabled { opacity: .55; cursor: wait; }
.shipping-editor input:focus-visible, .shipping-method-select:focus-visible, .shipping-method-actions .button:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
@media (max-width: 1100px) { .shipping-layout { grid-template-columns: 1fr; } .shipping-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); } .shipping-list-head, .shipping-list-empty { grid-column: 1 / -1; } .shipping-method-item { border-right: 1px solid var(--divider); } }
.workbench-identity { display: flex; justify-content: space-between; align-items: flex-start; background: var(--white); border: 1px solid var(--border); padding: 22px 24px; margin-bottom: 24px; }
.workbench-identity h3 { margin: 8px 0 5px; font-size: 20px; font-weight: 600; }
.workbench-identity p { margin: 0; color: var(--secondary); font-size: 13px; }
.workbench-section-heading { display: flex; align-items: flex-end; justify-content: space-between; margin: 28px 0 14px; }
.workbench-section-heading h2 { margin: 8px 0 0; font-size: 22px; font-weight: 600; }
.quiet { color: var(--caption); font-size: 12px; }
.workbench-dept-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.workbench-dept { background: var(--white); border: 1px solid var(--border); padding: 20px; }
.workbench-dept-head, .workbench-dept-foot { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.workbench-dept-head h3 { margin: 7px 0 0; font-size: 18px; font-weight: 500; }
.workbench-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--divider); margin: 22px 0 18px; border: 1px solid var(--divider); }
.workbench-metrics > div { background: var(--raw); padding: 13px 10px; }
.workbench-metrics span, .workbench-metrics b { display: block; }
.workbench-metrics span { color: var(--caption); font-size: 11px; }
.workbench-metrics b { margin-top: 9px; font: 600 22px var(--font-en); }
.workbench-dept-foot { align-items: center; color: var(--caption); font-size: 11px; }
.workbench-dept-foot .button { font-size: 12px; }
.workbench-lower-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; margin-top: 22px; }
.workbench-task-row, .workbench-notification { display: flex; justify-content: space-between; gap: 14px; padding: 15px 0; border-bottom: 1px solid var(--divider); }
.workbench-task-row:last-child, .workbench-notification:last-child { border-bottom: 0; }
.workbench-task-row { cursor: pointer; }
.workbench-task-row:hover { background: var(--raw); }
.task-detail-grid { display: grid; grid-template-columns: 1fr; gap: 18px; max-width: 980px; }
.task-detail-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.task-detail-actions { display: flex; align-items: center; gap: 10px; }
.task-detail-description { white-space: pre-wrap; line-height: 1.7; color: var(--secondary); }
.task-detail-meta { display: flex; flex-wrap: wrap; gap: 12px; padding: 14px 0; border-top: 1px solid var(--divider); border-bottom: 1px solid var(--divider); color: var(--secondary); font-size: 12px; }
.task-messages { display: grid; gap: 12px; max-height: none; overflow: visible; }
.task-message { max-width: 78%; padding: 12px 14px; background: var(--raw); border: 1px solid var(--divider); border-radius: 12px; }
.task-message small { display: block; margin-top: 4px; color: var(--caption); }
.task-message p { margin: 9px 0 0; white-space: pre-wrap; line-height: 1.6; }
.task-message-file { max-width: 340px; }
.task-message-image { display: block; margin-top: 10px; }
.task-message-image img { display: block; width: 240px; max-width: 100%; max-height: 240px; object-fit: contain; border: 1px solid var(--border); background: var(--raw); }
.task-message-attachment { display: block; margin-top: 10px; color: var(--ink); text-decoration: none; padding: 10px 12px; border: 1px solid var(--border); background: var(--raw); }
.report-subsection { margin-top: 18px; padding: 16px; border: 1px solid var(--divider); background: var(--raw); }
.report-subsection .panel-head { margin-bottom: 12px; }
.report-table-tabs { display: flex; gap: 8px; margin: 18px 0 12px; }
.report-filter-bar { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 10px; align-items: end; margin: 16px 0 12px; padding: 14px; border: 1px solid var(--divider); background: var(--raw); }
.report-filter-bar .field { margin: 0; }
.report-filter-bar .button { margin-bottom: 1px; }
.report-history-section { margin-top: 20px; }
.report-history-section .panel-head { align-items: flex-start; }
.report-history-section .panel-head small { display: block; margin-top: 5px; }
.report-history-table { min-width: 900px; }
.report-history-table td small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.report-log-legacy { padding: 12px; border: 1px solid var(--divider); background: var(--raw); color: var(--muted); font-size: 12px; line-height: 1.6; }
.report-table-section[hidden] { display: none; }
.report-table-section { margin-top: 12px; border: 1px solid var(--divider); padding: 14px; background: var(--raw); }
.report-table-scroll { overflow-x: auto; }
.report-entry-table { width: 100%; min-width: 1060px; border-collapse: collapse; table-layout: fixed; }
.report-entry-table th, .report-entry-table td { border: 1px solid var(--divider); padding: 7px; vertical-align: middle; }
.report-entry-table th { background: var(--white); color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.report-entry-table input { width: 100%; min-width: 90px; box-sizing: border-box; border: 1px solid var(--border); padding: 7px 8px; background: var(--white); }
.report-entry-table select { width: 100%; min-width: 90px; box-sizing: border-box; border: 1px solid var(--border); padding: 7px 8px; background: var(--white); }
.report-table-actions { display: flex; gap: 8px; }
.report-row-actions { min-width: 260px; white-space: nowrap; }
.report-row-actions .button { margin-right: 4px; }
.report-row-log { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; white-space: normal; }
.report-entry-table td:last-child, .report-entry-table th:last-child { width: 260px; white-space: nowrap; }
.report-log-modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(15, 18, 22, .42); }
.report-log-dialog { width: min(620px, 100%); max-height: 78vh; overflow: auto; padding: 22px; background: var(--white); border: 1px solid var(--divider); box-shadow: 0 18px 50px rgba(0,0,0,.18); }
.report-log-list { display: grid; gap: 8px; margin-top: 16px; }
.report-log-item { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; padding: 12px; border-bottom: 1px solid var(--divider); }
.report-log-item span { color: var(--muted); font-size: 12px; }
.report-log-item strong { font-size: 13px; }
.report-log-details { grid-column: 1 / -1; padding: 8px 10px; background: var(--raw); color: var(--ink); font-size: 12px; line-height: 1.7; }
@media (max-width: 760px) { .report-filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); } .report-log-item { grid-template-columns: 1fr auto; gap: 8px; } .report-log-item strong { grid-column: 1 / -1; } }
.finance-review-panel { margin: 18px 0; }
.finance-review-grid { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 10px; }
.finance-review-item { display: grid; gap: 6px; min-height: 92px; padding: 14px; text-align: left; border: 1px solid var(--divider); background: var(--raw); color: var(--ink); cursor: pointer; }
.finance-review-item:hover { border-color: var(--accent); background: var(--white); }
.finance-review-item span { color: var(--muted); font-size: 13px; }
.finance-review-item b { font-size: 22px; }
.finance-review-item small { color: var(--muted); }
.finance-review-detail { margin-top: 18px; }
.workbench-task-row.task-pinned { border-color: var(--accent); background: #fffaf5; }
.workbench-task-row .button.compact { padding: 4px 6px; font-size: 11px; }
.task-message-form { position: sticky; bottom: 0; display: grid; gap: 10px; margin-top: 16px; padding-top: 14px; background: var(--white); }
.task-message-form textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--border); padding: 10px; resize: vertical; }
.task-files { margin-top: 22px; }
.task-files .panel-head { align-items: center; }
.task-files input[type=file] { display: none; }
.task-files [data-task-files] { display: flex; flex-wrap: wrap; gap: 10px; }
.task-file { display: grid; gap: 5px; width: 112px; color: var(--secondary); font-size: 11px; text-decoration: none; }
.task-file img { width: 112px; height: 88px; object-fit: cover; border: 1px solid var(--border); background: var(--raw); }
.task-file-icon { display: grid; place-items: center; width: 112px; height: 88px; border: 1px solid var(--border); background: var(--raw); color: var(--secondary); }
@media (max-width: 900px) { .task-detail-grid { grid-template-columns: 1fr; } }
.workbench-task-row b, .workbench-notification b { display: block; font-size: 13px; font-weight: 500; }
.workbench-task-row small, .workbench-notification small { display: block; margin-top: 7px; color: var(--caption); font-size: 11px; }
.workbench-task-state { display: flex; align-items: center; gap: 8px; }
.workbench-task-state select { height: 30px; border: 1px solid var(--border); background: var(--white); color: var(--secondary); font-size: 11px; }
.workbench-notice { margin-bottom: 18px; }
.workbench-notice div { display: flex; flex-direction: column; gap: 4px; }
.workbench-notice small { color: var(--secondary); }
.workbench-task-form { display: grid; gap: 14px; padding: 14px; margin-bottom: 14px; background: var(--raw); border: 1px solid var(--border); }
.task-form-top { display: flex; align-items: end; gap: 14px; }
.task-title-input { width: 226px; height: 42px; border: 1px solid var(--border); background: var(--white); padding: 0 12px; color: var(--graphite); }
.task-due-field { width: 226px; }
.task-form-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.task-form-footer .button { margin-left: auto; }
.task-form-actions { display: flex; gap: 8px; margin-left: auto; }
.workbench-task-form input, .workbench-task-form textarea { min-width: 0; width: 100%; border: 1px solid var(--border); background: var(--white); padding: 10px 12px; color: var(--graphite); box-sizing: border-box; }
.workbench-task-form input { height: 42px; }
.workbench-task-form textarea { resize: vertical; min-height: 96px; }
.workbench-task-form .field { position: relative; margin: 0; }
.workbench-task-form .field small { display: block; margin-top: 7px; }
.mention-menu { position: absolute; z-index: 10; left: 0; right: 0; top: calc(100% - 3px); max-height: 220px; overflow: auto; padding: 6px; background: var(--white); border: 1px solid var(--border); box-shadow: 0 8px 22px rgba(0,0,0,.08); }
.mention-option { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 9px 10px; border: 0; background: transparent; text-align: left; color: var(--graphite); cursor: pointer; }
.mention-option:hover { background: var(--raw); }
.mention-option b { font-weight: 500; }
.mention-option small { color: var(--caption); }
.workbench-ai-brief-panel { margin-top: 22px; }
.ai-toolbar { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.ai-toolbar .button:disabled { opacity: .55; cursor: wait; }
.ai-preview { margin-top: 14px; padding: 16px; border: 1px solid var(--border); background: var(--raw); }
.ai-preview-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ai-preview-summary { margin: 12px 0; color: var(--secondary); line-height: 1.6; }
.ai-preview-grid { display: grid; gap: 8px; margin-top: 12px; }
.ai-preview-row { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--divider); }
.ai-preview-row span, .ai-preview-followup b { color: var(--caption); font-size: 12px; }
.ai-preview-row b { font-weight: 500; white-space: pre-wrap; word-break: break-word; }
.ai-preview-followup { display: grid; gap: 6px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--divider); }
.ai-preview-followup span { color: var(--secondary); font-size: 12px; }
.ai-loading, .ai-error { padding: 12px 0; color: var(--secondary); }
.ai-error { color: var(--signal); display: flex; align-items: center; gap: 10px; }
textarea { width: 100%; resize: vertical; min-height: 120px; border: 1px solid var(--border); padding: 12px; color: var(--graphite); background: var(--white); font: inherit; outline: none; }
textarea:focus { border-color: var(--graphite); }
@media (max-width: 1250px) { .workbench-dept-grid { grid-template-columns: 1fr; } .workbench-lower-grid { grid-template-columns: 1fr; } .task-form-top { flex-wrap: wrap; } .task-title-input, .task-due-field { width: 100%; } .task-form-footer { align-items: flex-start; flex-direction: column; } .task-form-footer .button { margin-left: 0; } }

/* Workbench UI direction: calm operations cockpit, preserving existing behavior. */
.workbench-identity {
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  padding: 26px 30px;
  background: linear-gradient(135deg, #fff 0%, #fffaf5 100%);
  box-shadow: 0 12px 30px rgba(32, 33, 36, .06);
}
.workbench-identity::after {
  content: '';
  position: absolute;
  right: -42px;
  top: -72px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: rgba(255, 90, 36, .08);
}
.workbench-identity > div, .workbench-identity > .status { position: relative; z-index: 1; }
.workbench-identity h3 { font-size: 22px; letter-spacing: -.3px; }
.workbench-identity p { margin-top: 8px; }
.workbench-identity > .status { margin-top: 2px; border-radius: 999px; padding: 0 12px; }
.workbench-section-heading { margin-top: 34px; margin-bottom: 16px; }
.workbench-section-heading h2 { font-size: 24px; letter-spacing: -.4px; }
.workbench-dept-grid { gap: 16px; }
.workbench-dept {
  border: 0;
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 8px 24px rgba(32, 33, 36, .045);
  transition: transform .16s ease, box-shadow .16s ease;
}
.workbench-dept:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(32, 33, 36, .08); }
.workbench-dept-head h3 { font-size: 19px; font-weight: 600; }
.workbench-dept-head .status { border-radius: 999px; }
.workbench-metrics { overflow: hidden; border: 0; border-radius: 12px; background: var(--divider); }
.workbench-metrics > div { padding: 15px 12px; background: #fbfbf9; }
.workbench-metrics b { font-size: 24px; }
.workbench-dept-foot { padding-top: 2px; }
.workbench-dept-foot .button { color: var(--orange); font-weight: 600; }
.workbench-ai-brief-panel, .workbench-lower-grid > .panel {
  border: 0;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(32, 33, 36, .045);
}
.workbench-ai-brief-panel { margin-top: 24px; }
.workbench-lower-grid { gap: 16px; margin-top: 24px; }
.workbench-lower-grid > .panel { padding: 24px; }
.workbench-lower-grid .panel-head { align-items: center; margin-bottom: 14px; }
.workbench-lower-grid .panel-head h3 { font-size: 20px; }
.workbench-lower-grid .eyebrow { color: var(--orange); }
.workbench-task-row, .workbench-notification { margin: 0 -8px; padding: 15px 8px; border-bottom-color: #f0f0eb; border-radius: 10px; }
.workbench-task-row:hover, .workbench-notification:hover { background: #fffaf5; }
.workbench-task-row b, .workbench-notification b { font-size: 14px; }
.workbench-task-state { flex-shrink: 0; }
.workbench-task-state .status { border-radius: 999px; }
.workbench-task-form { border: 1px solid #f0d9cc; border-radius: 14px; background: #fffaf5; }
.workbench-task-form input, .workbench-task-form textarea { border-radius: 8px; }
.workbench-task-form .button.primary { box-shadow: 0 6px 14px rgba(255, 90, 36, .18); }
.empty-state { border-radius: 12px; }
.main:has(.workbench-identity) .page-heading h2 { display: none; }
.main:has(.workbench-identity) .page-heading { margin-bottom: 18px; }
.workbench-identity { display: none; }
@media (max-width: 1250px) {
  .workbench-identity { padding: 22px; }
}
.loading-block, .error-state { min-height: 260px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 10px; color: var(--secondary); }
.error-state b { color: var(--graphite); font-size: 18px; }
.error-state span { color: var(--secondary); }
.toolbar { min-height: 62px; display: flex; align-items: center; gap: 10px; background: var(--white); border: 1px solid var(--divider); padding: 10px 14px; margin-bottom: 14px; }
.toolbar select, .toolbar input { height: 38px; border: 1px solid var(--border); color: var(--graphite); background: var(--white); padding: 0 11px; outline: none; }
.toolbar select:focus, .toolbar input:focus, .field input:focus, .field select:focus { border-color: var(--graphite); }
.search { height: 38px; width: 285px; display: flex; align-items: center; border: 1px solid var(--border); padding-left: 10px; color: var(--caption); }
.search input { width: 100%; border: 0; padding-left: 5px; }
.toolbar-count { margin-left: auto; color: var(--caption); font: 11px var(--font-en); letter-spacing: 1px; }
.product-list-toolbar { position: relative; z-index: 2; flex-wrap: wrap; gap: 10px 12px; }
.product-list-toolbar .product-search { flex: 0 0 360px; width: 360px; max-width: 100%; min-width: 0; padding-left: 0; }
.product-list-toolbar .product-search input { flex: 1; width: 100%; min-width: 0; height: 36px; padding: 0 12px; border: 0; font-size: 13px; }
.product-list-toolbar .product-search:focus-within { border-color: var(--graphite); }
.product-list-toolbar > select { flex: 0 1 160px; min-width: 120px; }
.product-category-picker { position: relative; flex: 0 0 225px; min-width: 0; }
.product-category-picker > summary { list-style: none; height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 9px; padding: 0 11px; border: 1px solid var(--border); background: var(--white); color: var(--graphite); cursor: pointer; font-size: 13px; }
.product-category-picker > summary::-webkit-details-marker { display: none; }
.product-category-picker > summary [data-category-summary] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-category-summary-chevron, .product-category-chevron { display: inline-block; flex: 0 0 6px; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.product-category-picker[open] .product-category-summary-chevron { transform: rotate(225deg) translateY(-1px); }
.product-category-menu { position: absolute; top: calc(100% + 4px); left: 0; width: max(100%, 330px); max-width: min(420px, calc(100vw - 32px)); max-height: min(440px, calc(100vh - 180px)); overflow-y: auto; border: 1px solid var(--border); background: var(--white); box-shadow: 0 12px 30px rgba(32, 33, 36, .14); z-index: 20; }
.product-category-menu-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--divider); background: var(--white); font-size: 12px; }
.product-category-menu-head button { min-height: 30px; border: 0; background: transparent; color: #a33b19; cursor: pointer; font: inherit; }
.product-category-menu > p { margin: 0; padding: 9px 14px; background: var(--raw); color: #62625c; font-size: 11px; line-height: 1.4; }
.product-category-group + .product-category-group { border-top: 1px solid var(--divider); }
.product-category-parent-row { min-height: 42px; display: flex; align-items: center; gap: 7px; padding: 3px 8px 3px 13px; }
.product-category-option { min-height: 34px; min-width: 0; flex: 1; display: flex; align-items: center; gap: 9px; cursor: pointer; font-size: 13px; }
.product-category-option span { min-width: 0; overflow-wrap: anywhere; }
.toolbar .product-category-option input[type="checkbox"] { flex: 0 0 16px; width: 16px; height: 16px; min-height: 16px; margin: 0; padding: 0; accent-color: var(--orange); cursor: pointer; }
.product-category-expand { min-width: 48px; height: 34px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; background: transparent; color: #62625c; cursor: pointer; }
.product-category-expand:hover, .product-category-menu-head button:hover { color: var(--orange); }
.product-category-expand[aria-expanded="true"] .product-category-chevron { transform: rotate(225deg) translateY(-1px); }
.product-category-expand small, .product-category-leaf { color: var(--secondary); font-size: 11px; }
.product-category-leaf { padding: 0 10px; }
.product-category-children { padding: 2px 14px 6px 33px; background: #fafaf8; }
.product-category-children[hidden] { display: none; }
.product-category-child { padding: 3px 0; }
.product-category-parent-row:hover, .product-category-child:hover { background: #fff7f2; }
.product-category-empty { display: block; padding: 16px 14px; color: var(--secondary); font-size: 12px; }
.product-category-picker summary:focus-visible, .product-category-picker button:focus-visible, .product-category-picker input:focus-visible, .product-list-toolbar .product-search:focus-within { outline: 2px solid #b63a12; outline-offset: 2px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 22px; }
.stat-tile { min-height: 132px; background: var(--white); border: 1px solid var(--border); padding: 20px 22px; display: flex; flex-direction: column; }
.stat-tile span { color: var(--secondary); font-size: 13px; }
.stat-tile strong { margin-top: auto; color: var(--graphite); font: 600 28px var(--font-en); }
.stat-tile small { color: var(--caption); margin-top: 6px; font-size: 11px; }
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.panel { background: var(--white); border: 1px solid var(--border); padding: 22px; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; }
.panel-head h3, .form-panel h3 { margin: 7px 0 0; font-size: 19px; font-weight: 600; }
.panel-head > a { font-size: 12px; color: var(--secondary); }

.table-wrap { width: 100%; overflow-x: auto; background: var(--white); border: 1px solid var(--border); }
table { width: 100%; min-width: 980px; border-collapse: collapse; text-align: left; }
th { height: 42px; padding: 0 14px; color: var(--caption); background: var(--raw); border-bottom: 1px solid var(--border); font: 11px var(--font-en); letter-spacing: .55px; text-transform: uppercase; white-space: nowrap; }
td { height: 64px; padding: 9px 14px; border-bottom: 1px solid var(--divider); color: var(--graphite); font-size: 13px; vertical-align: middle; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td small, td > small, .product-cell small, .person-cell + small { display: block; color: var(--caption); font-size: 11px; margin-top: 5px; }
.mono { font-family: var(--font-en); letter-spacing: .3px; }
.product-cell, .person-cell { display: flex; align-items: center; gap: 10px; }
.product-cell img { width: 42px; height: 48px; object-fit: cover; background: var(--raw); }
.person-cell span, .advisor-avatar { display: inline-flex; align-items: center; justify-content: center; background: var(--graphite); color: var(--white); width: 34px; height: 34px; border-radius: 50%; font-size: 14px; }
.amount { font-family: var(--font-en); font-weight: 600; }
.row-link { color: var(--secondary); font-size: 12px; }
.row-link:hover { color: var(--orange); }
.status { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border-radius: 6px; background: var(--raw); color: var(--secondary); font: 11px var(--font-en); letter-spacing: .25px; }
.status-active, .status-confirmed { background: #eaf5ed; color: var(--success); }
.status-waiting-confirmation, .status-sample-waiting-approval { background: #fff1ea; color: var(--orange); }
.status-draft { background: var(--warm); color: var(--secondary); }
.status-inactive, .status-expired { color: var(--caption); }

.notice-bar { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 16px; margin-bottom: 15px; background: var(--white); border: 1px solid var(--border); }
.notice-bar small { color: var(--caption); }
.notice-bar a { margin-left: auto; color: var(--secondary); font-size: 12px; }
.editor-form { display: flex; flex-direction: column; gap: 18px; }
.form-grid { display: grid; gap: 18px; }
.form-grid.two { grid-template-columns: 1fr 1fr; }
.form-panel { min-height: 100%; }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 15px; }
.field:last-child { margin-bottom: 0; }
.field > span, .process-choice > span { color: var(--secondary); font-size: 12px; }
.field input, .field select { height: 42px; width: 100%; padding: 0 12px; color: var(--graphite); border: 1px solid var(--border); background: var(--white); outline: none; }
.read-only-note { padding: 12px 14px; border-left: 3px solid var(--orange); color: var(--secondary); background: var(--raw); font-size: 12px; line-height: 1.6; }
.chip-list { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.data-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 30px; padding: 0 10px; border: 1px solid var(--border); color: var(--secondary); font-size: 12px; }
.data-chip i { width: 14px; height: 14px; border: 1px solid var(--border); border-radius: 50%; }
.size-table > div, .tier-list > div, .rule-row { min-height: 38px; display: grid; grid-template-columns: 70px 1fr 70px; align-items: center; border-bottom: 1px solid var(--divider); font-size: 12px; }
.size-table > div:last-child, .tier-list > div:last-child { border: 0; }
.size-table span, .tier-list span, .rule-row span { color: var(--caption); }
.size-table input, .rule-row input { width: 62px; height: 30px; border: 1px solid var(--border); padding: 0 6px; color: var(--secondary); background: var(--raw); }
.color-editor-row { position: relative; display: grid; grid-template-columns: 88px 1fr auto; gap: 16px; align-items: start; padding: 16px 0; border-bottom: 1px solid var(--divider); }
.color-editor-row:last-child { border-bottom: 0; }
.color-editor-preview { display: flex; flex-direction: column; gap: 6px; color: var(--caption); font-size: 11px; }
.color-editor-preview img { width: 88px; height: 112px; object-fit: cover; border: 1px solid var(--border); background: var(--raw); }
.color-editor-fields { display: grid; grid-template-columns: repeat(2, minmax(120px, 1fr)); gap: 10px 12px; }
.color-editor-fields .field { margin: 0; }
.color-editor-fields .field span { font-size: 11px; }
.color-remove { padding-top: 24px; }
.process-list { display: flex; flex-wrap: wrap; gap: 7px; margin: 18px 0; }
.process-list span, .permission-list span { padding: 5px 7px; background: var(--raw); color: var(--secondary); font: 10px var(--font-en); }
.tier-list { margin-bottom: 18px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; }

.admin-image-preview { position: relative; width: 88px; height: 112px; display: flex; align-items: center; justify-content: center; overflow: hidden; border: 1px solid var(--border); background: var(--raw); color: var(--caption); }
.admin-image-preview img { width: 100%; height: 100%; object-fit: cover; }
.admin-image-preview.is-empty { border-style: dashed; }
.admin-image-preview span { font-size: 11px; }
.image-upload-actions { display: flex; align-items: center; gap: 10px; margin-top: 9px; }
.image-upload-actions small, [data-upload-status] { color: var(--caption); font-size: 11px; }
.button.compact { min-height: 32px; height: 32px; padding: 0 10px; font-size: 11px; }
.color-editor-preview .admin-image-preview { width: 88px; height: 112px; }
.color-editor-preview .button { margin-top: 7px; }
.color-editor-preview small { display: block; margin-top: 6px; }
.detail-image-row { display: grid; grid-template-columns: 88px 1fr auto; gap: 14px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--divider); }
.detail-image-row:last-child { border-bottom: 0; }
.detail-image-row .admin-image-preview { width: 88px; height: 70px; }
.detail-image-meta { display: flex; flex-direction: column; gap: 6px; color: var(--graphite); font-size: 13px; }
.detail-image-meta small { color: var(--caption); font-size: 11px; }
.detail-image-actions { display: flex; gap: 10px; align-items: center; }
[data-detail-images] .panel-head { margin-bottom: 8px; }

.simulator { display: flex; flex-direction: column; gap: 14px; }
.process-choice { display: flex; align-items: center; flex-wrap: wrap; gap: 15px; margin-top: 4px; }
.process-choice label, .toggle-row label { color: var(--secondary); font-size: 13px; }
.toggle-row { display: flex; gap: 22px; padding-top: 16px; border-top: 1px solid var(--divider); }
.sim-result { margin-top: 20px; background: var(--white); border: 1px solid var(--border); }
.result-top { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--graphite); color: var(--white); }
.result-top > div { min-height: 115px; padding: 20px; border-right: 1px solid rgba(255,255,255,.13); }
.result-top span { display: block; color: rgba(255,255,255,.58); font-size: 12px; }
.result-top strong { display: block; margin-top: 23px; font: 600 25px var(--font-en); }
.breakdown-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); }
.breakdown-grid > div { padding: 22px; background: var(--white); }
.breakdown-grid h3 { margin: 7px 0; font-size: 17px; }
.breakdown-grid p { color: var(--secondary); margin: 0; line-height: 1.7; }
.breakdown-grid b { display: block; margin-top: 12px; color: var(--orange); font-family: var(--font-en); }
.success-line, .warning-line { padding: 14px 20px; border-top: 1px solid var(--divider); color: var(--success); font: 12px var(--font-en); letter-spacing: .5px; }
.warning-line { color: var(--orange); }

.detail-grid, .project-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; align-items: start; }
.detail-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.detail-side { display: flex; flex-direction: column; gap: 18px; }
.sticky-panel { position: sticky; top: 24px; }
.detail-status { display: flex; justify-content: space-between; align-items: center; padding-bottom: 20px; border-bottom: 1px solid var(--divider); }
.detail-status h3 { margin: 8px 0 0; font-size: 17px; font-weight: 500; }
.detail-status > b { font: 12px var(--font-en); color: var(--secondary); }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 21px 25px; padding-top: 20px; }
.info-grid span, .meta-list dt { display: block; color: var(--caption); font-size: 11px; margin-bottom: 7px; }
.info-grid b { font-size: 13px; font-weight: 500; }
.fee-list > div { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--divider); font-size: 13px; }
.fee-list b { font-family: var(--font-en); font-weight: 500; }
.fee-list .discount { color: var(--orange); }
.fee-list .subtotal { margin-top: 8px; font-weight: 500; }
.fee-list .total-line { border: 0; margin-top: 5px; padding-top: 20px; font-weight: 600; font-size: 15px; }
.fee-list .total-line b { font-size: 30px; }
.plain-list { list-style: none; padding: 0; margin: 0; color: var(--secondary); line-height: 2; }
.plain-list li::before { content: '—'; margin-right: 9px; color: var(--caption); }
.lead-time { display: flex; align-items: baseline; gap: 12px; margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--divider); }
.lead-time b { font: 600 20px var(--font-en); }
.lead-time small { color: var(--caption); }
.version-item { display: grid; grid-template-columns: 40px 1fr; gap: 4px 10px; padding: 14px 0; border-bottom: 1px solid var(--divider); color: var(--secondary); }
.version-item.current { border-left: 2px solid var(--orange); padding-left: 10px; }
.version-item b { grid-row: span 2; font: 600 17px var(--font-en); color: var(--graphite); }
.version-item strong { font: 600 13px var(--font-en); color: var(--graphite); }
.version-item small { grid-column: 2; color: var(--caption); font-size: 11px; }
.project-hero { display: flex; justify-content: space-between; align-items: flex-start; }
.project-hero h3 { margin: 10px 0 7px; }
.project-hero p { margin: 0; color: var(--secondary); }
.project-id { font: 12px var(--font-en); color: var(--secondary); text-align: right; }
.project-id small { display: block; margin-top: 8px; color: var(--caption); }
.admin-timeline { padding: 4px 15px; }
.timeline-node { position: relative; display: flex; gap: 18px; min-height: 72px; padding-left: 17px; border-left: 1px solid var(--border); }
.timeline-node:last-child { min-height: 45px; }
.timeline-dot { position: absolute; left: -6px; top: 3px; width: 11px; height: 11px; border: 2px solid var(--caption); background: var(--white); border-radius: 50%; }
.timeline-node.completed .timeline-dot { border-color: var(--success); background: var(--success); }
.timeline-node.current .timeline-dot { border-color: var(--orange); background: var(--orange); }
.timeline-node b { display: block; font-size: 14px; font-weight: 500; }
.timeline-node small { display: block; margin-top: 6px; color: var(--caption); font-size: 12px; }
.module-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.module-link { min-height: 150px; display: flex; flex-direction: column; padding: 18px; background: var(--white); border: 1px solid var(--border); }
.module-link:hover { border-color: var(--graphite); }
.module-link span { color: var(--caption); font: 10px var(--font-en); letter-spacing: 1px; }
.module-link b { margin-top: 16px; font-size: 16px; font-weight: 500; }
.module-link strong { margin-top: auto; font: 600 22px var(--font-en); }
.module-link small { color: var(--secondary); margin-top: 5px; }
.advisor { text-align: center; }
.advisor .eyebrow { display: block; text-align: left; }
.advisor-avatar { width: 54px; height: 54px; margin: 22px auto 10px; font-size: 19px; }
.advisor h3 { margin: 0; font-size: 19px; font-weight: 500; }
.advisor p { margin: 7px 0 10px; color: var(--secondary); }
.meta-list { margin: 20px 0 0; }
.meta-list > div { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--divider); }
.meta-list dd { margin: 0; font-family: var(--font-en); font-size: 12px; }
.payment-summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: 0 0 20px; background: var(--border); border: 1px solid var(--border); }
.payment-summary-grid > div { min-height: 96px; padding: 16px; background: var(--raw); }
.payment-summary-grid span, .payment-terms-row span { display: block; color: var(--caption); font-size: 11px; }
.payment-summary-grid strong { display: block; margin-top: 16px; font: 600 20px var(--font-en); }
.payment-terms-row { display: flex; justify-content: space-between; gap: 20px; padding: 16px 0 20px; border-top: 1px solid var(--divider); border-bottom: 1px solid var(--divider); margin-bottom: 18px; align-items: end; }
.payment-terms-row b { display: block; margin-top: 7px; font-weight: 500; }
.payment-terms-row small { display: block; margin-top: 6px; color: var(--caption); }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline-form select, .inline-form input { height: 36px; border: 1px solid var(--border); background: var(--white); padding: 0 9px; color: var(--graphite); min-width: 120px; }
.inline-form input { width: 130px; }
.inline-form .button { min-height: 36px; }
.production-event-form { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--divider); }
.compact-timeline { padding: 12px 15px 0; }
.person-cell b { font-weight: 500; }
.role-tag { color: var(--secondary); font-size: 12px; }
.permission-list { display: flex; flex-wrap: wrap; gap: 5px; max-width: 430px; }
.role-matrix { margin-top: 20px; }
.matrix-row { display: grid; grid-template-columns: 160px 1fr; gap: 20px; padding: 13px 0; border-bottom: 1px solid var(--divider); font-size: 12px; }
.matrix-row b { font-weight: 500; }
.matrix-row span { color: var(--secondary); font-family: var(--font-en); font-size: 11px; line-height: 1.7; }
.empty-state { min-height: 210px; padding: 34px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--white); color: var(--secondary); }
.empty-icon { color: var(--caption); font-size: 34px; font-weight: 300; line-height: 1; }
.empty-state b { margin-top: 13px; font-size: 15px; font-weight: 500; }
.empty-state small { margin: 8px 0 15px; color: var(--caption); }
.toast { position: fixed; right: 28px; bottom: 28px; z-index: 20; padding: 12px 16px; background: rgba(32,33,36,.94); color: var(--white); border-radius: 8px; opacity: 0; transform: translateY(8px); pointer-events: none; transition: .18s ease; font-size: 13px; }
.toast.show { opacity: 1; transform: translateY(0); }
.login-page { min-height: 100vh; display: grid; place-items: center; background: var(--black); }
.login-box { width: 420px; padding: 40px; background: var(--white); border: 1px solid rgba(255,255,255,.16); }
.login-box .brand-logo { color: var(--graphite); }
.login-box .brand-cn { color: var(--secondary); margin-bottom: 54px; }
.login-box h1 { margin: 12px 0 8px; font-size: 28px; font-weight: 600; }
.login-box p { margin: 0 0 28px; color: var(--secondary); line-height: 1.7; font-size: 13px; }
.login-box .full { margin-top: 10px; }
.login-error { min-height: 18px; color: var(--orange); font-size: 12px; }
.login-note { display: block; margin-top: 26px; color: var(--caption); font: 10px var(--font-en); letter-spacing: .35px; }

@media (max-width: 1280px) {
  :root { --sidebar-width: 220px; }
  .content, .topbar { padding-left: 28px; padding-right: 28px; }
  .stat-grid { grid-template-columns: repeat(4, minmax(150px, 1fr)); }
  .detail-grid, .project-layout { grid-template-columns: minmax(0, 1fr) 280px; }
}

/* Workbench redesign: an operations cockpit with clear scan paths and restrained depth. */
.content:has(.workbench-dept-grid) { padding-top: 30px; }
.content:has(.workbench-dept-grid) .page-heading { margin-bottom: 10px; }
.content:has(.workbench-dept-grid) .page-heading h2 { display: none; }
.content:has(.workbench-dept-grid) .page-heading p { color: var(--secondary); }
.content:has(.workbench-dept-grid) .workbench-identity { display: none; }
.content:has(.workbench-dept-grid) .workbench-section-heading { margin: 22px 0 14px; align-items: center; }
.content:has(.workbench-dept-grid) .workbench-section-heading h2 { margin-top: 6px; font-size: 25px; letter-spacing: -.45px; }
.content:has(.workbench-dept-grid) .workbench-section-heading .quiet { max-width: 260px; text-align: right; line-height: 1.55; }
.content:has(.workbench-dept-grid) .workbench-dept-grid { gap: 16px; }
.content:has(.workbench-dept-grid) .workbench-dept { position: relative; overflow: hidden; min-height: 214px; padding: 22px; border: 1px solid #e2e1db; border-radius: 16px; box-shadow: 0 8px 24px rgba(32,33,36,.045); transition: transform .18s ease, box-shadow .18s ease; }
.content:has(.workbench-dept-grid) .workbench-dept::before { content: ''; position: absolute; inset: 0 0 auto; height: 3px; background: var(--orange); opacity: .86; }
.content:has(.workbench-dept-grid) .workbench-dept:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(32,33,36,.09); }
.content:has(.workbench-dept-grid) .workbench-dept-head h3 { margin-top: 8px; font-size: 20px; letter-spacing: -.25px; }
.content:has(.workbench-dept-grid) .workbench-dept-head .eyebrow { color: var(--orange); }
.content:has(.workbench-dept-grid) .workbench-metrics { margin: 24px 0 19px; border: 0; border-radius: 10px; overflow: hidden; background: #ebeae4; }
.content:has(.workbench-dept-grid) .workbench-metrics > div { padding: 13px 12px; background: #fafaf7; }
.content:has(.workbench-dept-grid) .workbench-metrics span { color: var(--caption); }
.content:has(.workbench-dept-grid) .workbench-metrics b { margin-top: 8px; font-size: 25px; }
.content:has(.workbench-dept-grid) .workbench-dept-foot { padding-top: 1px; }
.content:has(.workbench-dept-grid) .workbench-dept-foot .button { color: var(--orange); font-weight: 600; }
.content:has(.workbench-dept-grid) .workbench-ai-brief-panel { margin-top: 20px; padding: 22px 24px; border: 1px solid #e2e1db; border-radius: 16px; box-shadow: 0 8px 24px rgba(32,33,36,.04); }
.content:has(.workbench-dept-grid) .workbench-lower-grid { gap: 16px; margin-top: 20px; }
.content:has(.workbench-dept-grid) .workbench-lower-grid > .panel { padding: 22px 24px; border: 1px solid #e2e1db; border-radius: 16px; box-shadow: 0 8px 24px rgba(32,33,36,.04); }
.content:has(.workbench-dept-grid) .workbench-lower-grid .panel-head { margin-bottom: 12px; }
.content:has(.workbench-dept-grid) .workbench-lower-grid .panel-head h3 { font-size: 20px; letter-spacing: -.25px; }
.content:has(.workbench-dept-grid) .workbench-task-row, .content:has(.workbench-dept-grid) .workbench-notification { margin: 0 -8px; padding: 14px 8px; border-bottom-color: #efeee9; border-radius: 9px; }
.content:has(.workbench-dept-grid) .workbench-task-row:hover, .content:has(.workbench-dept-grid) .workbench-notification:hover { background: #fffaf5; }
.content:has(.workbench-dept-grid) .workbench-task-row b, .content:has(.workbench-dept-grid) .workbench-notification b { font-weight: 600; }
.content:has(.workbench-dept-grid) .workbench-task-state .status { border-radius: 999px; }
@media (max-width: 1250px) {
  .content:has(.workbench-dept-grid) .workbench-section-heading { align-items: flex-start; gap: 14px; }
  .content:has(.workbench-dept-grid) .workbench-section-heading .quiet { text-align: left; }
}
.workbench-metric-button { min-width: 0; padding: 13px 12px; border: 0; background: #fafaf7; color: var(--graphite); text-align: left; cursor: pointer; }
.workbench-metric-button:hover { background: #fffaf5; }
.workbench-metric-button span, .workbench-metric-button b, .workbench-metric-button small { display: block; }
.workbench-metric-button span { color: var(--caption); font-size: 11px; }
.workbench-metric-button b { margin-top: 8px; font: 600 25px var(--font-en); }
.workbench-metric-button small { margin-top: 5px; color: var(--orange); font-size: 10px; }
.workbench-task-panel { margin-top: 16px; padding: 22px 24px; border: 1px solid #e2e1db; border-radius: 16px; box-shadow: 0 8px 24px rgba(32,33,36,.04); }
.workbench-task-panel > .panel-head { margin-bottom: 4px; }
.workbench-task-panel > p { margin: 0 0 14px; }
.workbench-assignee-list { display: grid; gap: 12px; }
.workbench-assignee-group { border-top: 1px solid var(--divider); }
.workbench-assignee-head { display: flex; justify-content: space-between; align-items: center; padding: 13px 0 8px; }
.workbench-assignee-head span { color: var(--caption); font-size: 12px; }
.workbench-assignee-task { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--graphite); text-align: left; cursor: pointer; }
.workbench-assignee-task:hover { background: #fffaf5; }
.workbench-assignee-task > span { min-width: 0; }
.workbench-assignee-task b, .workbench-assignee-task small { display: block; }
.workbench-assignee-task b { font-weight: 600; }
.workbench-assignee-task small { margin-top: 5px; color: var(--caption); font-size: 11px; }
.workbench-task-panel-empty { padding: 22px 0; color: var(--secondary); }
.workbench-all-task-panel { scroll-margin-top: 24px; }
.workbench-all-task-panel .panel-head h3 { display: flex; align-items: baseline; gap: 10px; }
.workbench-all-task-panel .panel-head h3 .quiet { font-size: 12px; font-weight: 400; }
.workbench-all-task-department { padding-top: 6px; }
.workbench-all-task-department > h4 { margin: 10px 0 0; color: var(--orange); font-size: 14px; }
.workbench-all-task-department .workbench-assignee-group { margin-top: 6px; }
.workbench-section-heading > [data-workbench-all-tasks] { flex: 0 0 auto; }
.workbench-section-heading > [data-workbench-all-tasks][aria-expanded="true"] { border-color: #f0c3ae; background: #fff7f2; color: var(--orange); }
.warehouse-report-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 18px 0 22px; padding: 18px; border: 1px solid var(--divider); border-radius: 12px; background: var(--raw); }
.warehouse-report-grid .field { margin: 0; }
.warehouse-report-grid input { width: 100%; min-height: 42px; box-sizing: border-box; }
@media (max-width: 720px) { .warehouse-report-grid { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .content:has(.workbench-dept-grid) .workbench-section-heading > [data-workbench-all-tasks] { width: 100%; } }

/* Task composer: make the creation path read top-to-bottom before the user acts. */
.content:has(#workbench-tasks) .workbench-task-form { gap: 18px; padding: 20px; margin: 0 0 18px; border: 1px solid #f0d9cc; border-radius: 14px; background: #fffaf6; }
.content:has(#workbench-tasks) .task-form-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, .8fr); gap: 14px; align-items: end; }
.content:has(#workbench-tasks) .task-title-input, .content:has(#workbench-tasks) .task-due-field { width: 100%; }
.content:has(#workbench-tasks) .workbench-task-form input, .content:has(#workbench-tasks) .workbench-task-form textarea { border-color: #e7d8cf; border-radius: 9px; background: #fff; }
.content:has(#workbench-tasks) .workbench-task-form input:focus, .content:has(#workbench-tasks) .workbench-task-form textarea:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255,90,36,.1); outline: none; }
.content:has(#workbench-tasks) .workbench-task-form .field > span { display: block; margin-bottom: 7px; color: var(--secondary); font-size: 12px; font-weight: 500; }
.content:has(#workbench-tasks) .workbench-task-form .mention-field { display: grid; grid-template-columns: 1fr; }
.content:has(#workbench-tasks) .workbench-task-form .mention-field textarea { min-height: 112px; padding: 13px 14px; line-height: 1.6; }
.content:has(#workbench-tasks) .workbench-task-form .mention-field small { margin-top: 8px; color: var(--caption); }
.content:has(#workbench-tasks) .task-form-footer { align-items: center; padding-top: 2px; }
.content:has(#workbench-tasks) .task-form-footer > small { max-width: 55%; line-height: 1.5; }
.content:has(#workbench-tasks) .task-form-actions { align-items: center; }
.content:has(#workbench-tasks) .task-form-actions .button { min-height: 40px; padding: 0 18px; }
.content:has(#workbench-tasks) .empty-state { min-height: 160px; padding: 28px 20px; border-top: 1px solid var(--divider); background: transparent; }
.content:has(#workbench-tasks) .empty-icon { font-size: 28px; }
.content:has(#workbench-tasks) .empty-state b { margin-top: 10px; font-size: 14px; }
@media (max-width: 720px) {
  .category-editor-row { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .category-row-form { grid-template-columns: 1fr 1fr; }
  .category-row-form .category-depth-label { grid-column: 1 / -1; }
  .category-row-form > input[name="name"], .category-row-form .category-alt-input { width: 100%; }
  .category-image-editor { width: 100%; flex-basis: auto; }
  .content:has(#workbench-tasks) .task-form-top { grid-template-columns: 1fr; }
  .content:has(#workbench-tasks) .task-form-footer { align-items: flex-start; flex-direction: column; }
  .content:has(#workbench-tasks) .task-form-footer > small { max-width: none; }
  .content:has(#workbench-tasks) .task-form-actions { width: 100%; justify-content: flex-end; }
}

/* GEO content editor: make upload, live preview and saved-page handoff explicit. */
.website-content-preview-panel { margin-top: 18px; padding: 22px; }
.website-content-preview-panel > .panel-head { align-items: center; margin-bottom: 16px; }
.website-preview-actions { display: flex; align-items: center; gap: 12px; }
.website-preview-card { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(0, 1.2fr); min-height: 260px; border: 1px solid var(--divider); background: #fff; }
.website-preview-image { display: block; width: 100%; height: 100%; min-height: 260px; max-height: 480px; object-fit: cover; background: var(--raw); }
.website-preview-image.is-empty { display: grid; place-items: center; color: var(--caption); }
.website-preview-copy { padding: 24px; }
.website-preview-copy h3 { margin: 10px 0; font-size: 22px; }
.website-preview-summary { color: var(--secondary); line-height: 1.7; }
.website-preview-body { max-height: 320px; overflow: auto; margin-top: 18px; border-top: 1px solid var(--divider); padding-top: 12px; line-height: 1.75; }
.website-preview-body h4 { margin: 14px 0 6px; }
.website-preview-body p { margin: 6px 0; }
.website-image-drop { display: grid; justify-items: center; gap: 8px; padding: 18px; border: 1px dashed #c9c8c1; border-radius: 9px; background: #fcfcfa; text-align: center; transition: border-color .15s, background .15s; }
.website-image-drop:focus-visible { outline: 3px solid rgba(255,90,36,.22); outline-offset: 2px; }
.website-image-drop.is-dragging, .website-image-drop.is-uploading { border-color: var(--orange); background: #fff6f1; }
.website-image-drop-mark { color: var(--orange); font-size: 24px; line-height: 1; }
.website-image-drop small { color: var(--secondary); }
@media (max-width: 900px) { .website-preview-card { grid-template-columns: 1fr; } .website-preview-image { max-height: 320px; } .website-preview-actions { align-items: flex-end; flex-direction: column; } }

.permission-editor { margin-top: 18px; scroll-margin-top: 20px; }
.permission-editor .panel-head { align-items: flex-start; gap: 16px; }
.permission-editor .panel-head p { margin: 8px 0 0; line-height: 1.6; }
.permission-overview { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin: 18px 0; padding: 16px 18px; border-radius: 10px; background: #f8f6f3; }
.permission-overview > div { display: flex; flex-direction: column; gap: 3px; }
.permission-overview strong { font-size: 16px; }
.permission-overview span { color: var(--secondary); font-size: 12px; }
.permission-search { display: grid; gap: 7px; margin-bottom: 18px; font-size: 13px; font-weight: 600; }
.permission-search input { width: 100%; max-width: 400px; padding: 10px 12px; border: 1px solid var(--divider); border-radius: 8px; font: inherit; font-weight: 400; }
.permission-help { margin: -8px 0 18px; color: var(--secondary); font-size: 12px; line-height: 1.6; }
.permission-no-results { margin: 0 0 18px; padding: 15px 18px; border: 1px dashed var(--divider); border-radius: 10px; color: var(--secondary); }
.permission-no-results[hidden] { display: none; }
.permission-item { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.permission-item input { accent-color: var(--orange); width: 16px; height: 16px; flex: none; }
.permission-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.permission-group { min-width: 0; border: 1px solid var(--divider); border-radius: 10px; }
.permission-group[open] { grid-column: 1 / -1; }
.permission-group[hidden], .permission-item[hidden] { display: none; }
.permission-group summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 18px; cursor: pointer; font-size: 14px; }
.permission-group summary span { color: var(--secondary); font-size: 12px; white-space: nowrap; }
.permission-group summary:focus-visible, .permission-search input:focus-visible { outline: 3px solid rgba(255,90,36,.25); outline-offset: 2px; }
.permission-group-body { padding: 0 18px 18px; }
.permission-items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; }
.permission-select-all { padding: 0; margin-bottom: 14px; border: 0; background: transparent; color: var(--orange); font: inherit; font-size: 12px; cursor: pointer; }
.permission-item { min-height: 52px; align-items: flex-start; padding: 7px 0; font-size: 13px; line-height: 1.45; }
.permission-item input { margin-top: 3px; }
.permission-item-copy { display: grid; gap: 3px; }
.permission-item-copy b { font-weight: 600; }
.permission-item-copy small { color: var(--secondary); font-size: 12px; line-height: 1.5; }
.permission-item:has(input:disabled) { color: var(--secondary); cursor: not-allowed; }
.permission-feedback { min-height: 20px; margin: 16px 0 0; color: var(--secondary); font-size: 13px; }
.permission-editor .form-actions { margin-top: 22px; }
@media (max-width: 1050px) { .permission-grid { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .permission-items { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  html:has([data-workbench-user-permissions]), body:has([data-workbench-user-permissions]) { min-width: 0; }
  body:has([data-workbench-user-permissions]) .sidebar { display: none; }
  body:has([data-workbench-user-permissions]) .main { width: 100%; margin-left: 0; }
  body:has([data-workbench-user-permissions]) .content { padding: 22px 16px 42px; }
  body:has([data-workbench-user-permissions]) .topbar { padding: 14px 16px; }
  body:has([data-workbench-user-permissions]) .page-heading { flex-wrap: wrap; gap: 12px; }
  body:has([data-workbench-user-permissions]) .table-wrap { overflow-x: auto; }
  body:has([data-workbench-user-permissions]) table { min-width: 820px; }
  .permission-editor { padding: 18px; }
  .permission-editor .panel-head { flex-wrap: wrap; }
}
.supplier-editor { max-width: 1120px; }
.supplier-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 22px; }
.supplier-form-grid .field { min-width: 0; margin: 0; }
.supplier-form-grid .field small { color: var(--secondary); font-size: 11px; }
.supplier-form-grid input[readonly] { background: var(--raw); color: var(--secondary); cursor: default; }
.supplier-form-grid .supplier-notes { grid-column: 1 / -1; }
.supplier-table-wrap { overflow-x: auto; }
.supplier-table-wrap table { min-width: 1080px; }
.supplier-table-wrap th, .supplier-table-wrap td { white-space: nowrap; }
.supplier-table-wrap td:last-child { white-space: normal; }
.supplier-form-grid textarea { width: 100%; min-height: 88px; padding: 10px 12px; color: var(--graphite); border: 1px solid var(--border); background: var(--white); font: inherit; resize: vertical; }
.supplier-form-grid textarea:focus { border-color: var(--graphite); outline: none; }
.supplier-editor .form-actions { position: static; }
.danger-link { color: #b43b2e !important; }
.danger-link:hover { color: #7f2018 !important; }
@media (max-width: 720px) {
  .supplier-form-grid { grid-template-columns: minmax(0, 1fr); }
  .supplier-form-grid .supplier-notes { grid-column: auto; }
}
.home-setting-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 20px; }
.home-setting-card { display: grid; grid-template-columns: minmax(180px, 42%) 1fr; gap: 20px; border: 1px solid #e1e4e8; border-radius: 16px; padding: 16px; background: #fff; }
.home-setting-image { min-height: 185px; border-radius: 10px; background: #eef0f0; display: grid; place-items: center; overflow: hidden; color: #7b8185; font-size: 13px; }
.home-setting-image img { width: 100%; height: 100%; min-height: 185px; object-fit: cover; }
.home-setting-fields { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0; }
.home-setting-fields > b { font-size: 18px; }
.home-setting-fields .field { width: 100%; }
.home-setting-fields small { color: #7b8185; line-height: 1.5; }
@media (max-width: 1100px) { .home-setting-grid { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .home-setting-card { grid-template-columns: 1fr; } }
