/* V1 official visual baseline: left workbench shell + clean operational surfaces. */
:root {
  --v1-bg: #f1f0eb;
  --v1-bg-strong: #e9e8e2;
  --v1-surface: #ffffff;
  --v1-surface-alt: #f7f7f4;
  --v1-line: #deddd7;
  --v1-line-strong: #c9c8c1;
  --v1-text: #25252c;
  --v1-muted: #73727c;
  --v1-faint: #9998a1;
  --v1-primary: #655ad5;
  --v1-primary-2: #5048b8;
  --v1-primary-hover: #5048b8;
  --v1-primary-soft: #ede9fb;
  --v1-danger: #c74b42;
  --v1-warning: #a66818;
  --v1-info: #5574c8;
  --v1-success: #2f7a62;
  --v1-nav: #efeee9;
  --v1-nav-surface: #e7e3fa;
  --v1-nav-line: #d8d5cd;
  --v1-nav-text: #292a30;
  --v1-nav-muted: #6d6b65;
  --v1-radius: 8px;
  --v1-shadow: 0 14px 38px rgba(25, 38, 32, 0.08);
  --v1-shadow-soft: 0 6px 18px rgba(25, 38, 32, 0.06);
}

html {
  background: var(--v1-bg);
}

body {
  overflow-x: hidden;

  color: var(--v1-text);
  font-family:
    "Avenir Next", "PingFang SC", "Hiragino Sans GB", ui-sans-serif, system-ui,
    sans-serif;
  letter-spacing: 0;
}

button,
select,
input,
textarea {
  border-radius: var(--workbench-control-radius);
  font: inherit;
  letter-spacing: 0;
}

button{
  min-height: var(--workbench-control-height);
  border: 1px solid var(--v1-line);
  border-radius: var(--workbench-control-radius);
  background: var(--v1-surface);
  box-shadow: none;
  color: var(--v1-text);
  font-size: 13px;
  font-weight: 650;
  transition:
    border-color 0.16s ease,
    background 0.16s ease,
    color 0.16s ease,
    transform 0.16s ease;
}

button:hover:not(:disabled){
  border-color: #aaa9a3;
  background: var(--v1-surface-alt);
  box-shadow: none;
  color: var(--v1-primary-2);
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

button:focus-visible {
  outline: 2px solid var(--workbench-focus-ring);
  outline-offset: 2px;
}

button.primary,
.primary{
  border-color: var(--v1-primary);
  background: var(--v1-primary);
  color: #fff;
}

button.primary:hover,
.primary:hover{
  border-color: var(--v1-primary-2);
  background: var(--v1-primary-hover);
  color: #fff;
}

select,
input,
textarea {
  border: 1px solid var(--v1-line);
  background: var(--v1-surface);
  box-shadow: none;
  color: var(--v1-text);
  font-size: 13px;
}

select:focus,
input:focus,
textarea:focus {
  outline: 2px solid rgba(98, 104, 241, 0.18);
  outline-offset: 1px;
  border-color: var(--v1-primary);
}

.app-shell {
  display: grid;

  gap: 0;
  width: 100%;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  background: transparent;
}

.app-sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  height: 100vh;
  min-height: 0;
  flex-direction: column;
  gap: 18px;
  border-right: 1px solid var(--v1-nav-line);
  background: var(--v1-nav);
  color: var(--v1-nav-text);
}

.brand {
  display: grid;
  min-width: 0;
  align-items: center;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.brand-mark {
  display: grid;

  place-items: center;
  border: 1px solid var(--v1-nav-line);
  background: var(--v1-surface);
  box-shadow: none;
  color: var(--v1-primary-2);

  font-weight: 850;
}

.brand h1 {
  margin: 0;
  color: var(--v1-nav-text);

  font-weight: 850;
  line-height: 1.2;
  text-shadow: none;
}

.brand p {
  margin: 5px 0 0;
  color: var(--v1-nav-muted);

  font-weight: 650;
  line-height: 1.35;
}

.version-badge {
  border: 1px solid var(--v1-line);
  border-radius: 999px;
  background: var(--v1-primary-soft);
  color: var(--v1-primary-2);
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 850;
}

.app-sidebar .tabs {
  display: grid;
  gap: 4px;
  overflow: visible;
  margin: 0;
  border: 0;
  background: transparent;
  padding: 8px 0;
}

.sidebar-nav-group {
  display: grid;
  gap: 4px;
}

.sidebar-nav-group + .sidebar-nav-group {
  margin-top: 10px;
  border-top: 1px solid var(--v1-nav-line);
  padding-top: 10px;
}

.sidebar-nav-label,
.sidebar-nav-group summary {
  margin: 0 8px 4px;
  color: var(--v1-nav-muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.04em;
}

.sidebar-nav-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 26px;
  cursor: pointer;
  list-style: none;
}

.sidebar-nav-group summary::-webkit-details-marker {
  display: none;
}

.sidebar-nav-group summary::after {
  content: "＋";
  color: var(--v1-nav-muted);
  font-size: 13px;
  font-weight: 900;
}

.sidebar-nav-group[open] summary::after {
  content: "－";
}

.app-sidebar .tab-button {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-start;
  width: 100%;

  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  color: var(--v1-nav-muted);

  text-align: left;
  white-space: nowrap;
}

.app-sidebar .sidebar-nav-secondary .tab-button {
  min-height: 34px;
  color: var(--v1-nav-muted);
  font-size: 12.5px;
  font-weight: 720;
}

.app-sidebar .tab-button::before {
  display: none;
}

.app-sidebar .nav-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: var(--v1-nav-muted);
  transition: color 140ms ease;
}

.app-sidebar .tab-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-sidebar .tab-button:hover {
  border-color: var(--v1-nav-line);
  background: var(--v1-surface-alt);
  box-shadow: none;
  color: var(--v1-primary-2);
  transform: none;
}

.app-sidebar .tab-button.is-active {
  border-color: #7468dc;
  background: var(--v1-nav-surface);
  box-shadow: inset 3px 0 0 var(--v1-primary);
  color: var(--v1-nav-text);
}

.app-sidebar .tab-button:focus {
  outline: none;
}

.app-sidebar .tab-button:focus-visible {
  outline: 2px solid rgba(101, 90, 213, 0.72);
  outline-offset: 2px;
}

.app-sidebar .tab-button:hover .nav-icon,
.app-sidebar .tab-button.is-active .nav-icon {
  color: var(--v1-nav-text);
}

.sidebar-metrics {
  display: grid;
  grid-template-columns: 1fr;

  margin: auto 0 0;
}

.top-metrics div,
.sidebar-metrics div {
  border: 1px solid var(--v1-nav-line);
  border-radius: 8px;
  background: var(--v1-surface-alt);
  box-shadow: none;
  padding: 10px 11px;
}

.top-metrics dt,
.sidebar-metrics dt {
  color: var(--v1-nav-muted);
  font-size: 11px;
  font-weight: 750;
}

.top-metrics dd,
.sidebar-metrics dd {
  margin-top: 4px;
  color: var(--v1-nav-text);
  font-size: 15px;
  font-weight: 850;
}

.metric-danger {
  color: var(--v1-danger) !important;
}

.metric-warning {
  color: var(--v1-warning) !important;
}

.workspace,
.main {
  min-width: 0;
  max-width: none;
  margin: 0;

}

.tab-panel {
  min-width: 0;
}

.notice,
.notice.info,
#tab-today .notice,
#tab-inbound .notice {
  border: 1px solid var(--v1-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
  color: var(--v1-muted);
  padding: 10px 12px;
}

.notice::before,
#tab-today .notice::before {
  display: none;
}

.panel,
.workbench-table-panel,
.filter-panel,
#tab-today .today-overview-panel {
  border: 1px solid var(--v1-line);
  border-radius: 8px;
  background: rgba(255, 254, 250, 0.96);
  box-shadow: var(--v1-shadow-soft);
  color: var(--v1-text);
}

.workbench-table-panel {
  overflow: hidden;
}

.section-head {
  display: flex;
  min-width: 0;
  justify-content: space-between;
  gap: 14px;
  border-bottom-color: var(--v1-line);
}

.section-head.inline {
  align-items: center;
}

.section-head.inline > div:first-child {
  flex: 0 0 auto;
}

.section-head span {
  display: inline-block;
  color: var(--v1-muted);
  font-size: 11px;
  font-weight: 780;
  letter-spacing: 0;
  text-transform: none;
}

.section-head h2 {
  overflow-wrap: anywhere;
  margin: 4px 0 0;
  color: var(--v1-text);
  font-size: 18px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.25;
}

.section-head.inline h2 {
  white-space: nowrap;
  word-break: keep-all;
}

.section-head small {
  display: inline-flex;
  margin-left: 8px;
  border: 2px solid var(--retro-ink);
  background: var(--retro-yellow);
  padding: 1px 7px;
  color: var(--retro-ink);
  font-size: 13px;
  font-weight: 1000;
}

.section-head h2 small {
  color: var(--v1-muted);
  font-size: 12px;
  font-weight: 700;
}

#tab-today .catalog-hero,
.catalog-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(360px, 1fr) 300px;
  gap: 18px;
  align-items: end;
  overflow: hidden;
  margin-bottom: 14px;
  border: 1px solid var(--v1-line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 12% 18%, rgba(23, 79, 67, 0.1), transparent 28%),
    linear-gradient(135deg, #fffefa 0%, #f2f5ee 100%);
  box-shadow: var(--v1-shadow);
  padding: 20px;
  color: var(--v1-text);
}









#tab-today .workbench-split-layout--actions {
  display: grid;

  align-items: start;
}

#tab-today .workbench-main {

  min-width: 0;

}

.text-button,
#tab-today .text-button {
  min-height: 30px;
  border: 0;
  background: transparent;
  color: var(--v1-primary);
  justify-content: flex-start;
  padding: 0;
}

#tab-today .risk-card-list {
  display: block;
  overflow: hidden;
  min-width: 0;
  padding: 0;
}

#tab-today .today-task-table {

  width: 100%;
  max-width: 100%;
  min-width: 0;
}

#tab-today .today-task-row {
  display: grid;

  gap: 0;

  align-items: stretch;
}

#tab-today .today-task-head {
  border: 1px solid var(--v1-line);

  background: var(--v1-bg-strong);
  color: var(--v1-muted);
  font-size: 11px;
  font-weight: 820;
}

#tab-today .today-task-head span {
  display: flex;
  align-items: center;

  border-right: 1px solid var(--v1-line);
  border-bottom: 0;

}

#tab-today .today-task-head span:last-child {
  border-right: 0;
}

#tab-today .today-cell{
  min-width: 0;
  border-left: 0;
  border-right: 1px solid #edf0ea;

}



#tab-today .today-cell small{
  display: block;

  font-weight: 650;

}

#tab-today .today-sku-cell strong,
#tab-today .today-stock-cell strong,
#tab-today .today-action-cell strong {
  display: block;
  color: var(--v1-text);

  font-weight: 800;

}

.tag,
.status-tag,
#tab-today .today-action-badge {
  border: 1px solid var(--v1-line);
  border-radius: 999px;
  box-shadow: none;
}

#tab-today .inline-copy {
  min-height: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--v1-primary);
  padding: 0;
  font-size: inherit;
  font-weight: 800;
}

#tab-today .today-action-badge {
  display: inline-flex;

  align-items: center;
  justify-content: center;
  border-color: rgba(23, 79, 67, 0.2);
  background: var(--v1-primary-soft);
  color: var(--v1-primary-2);

  font-weight: 850;
}

#tab-today .today-action-badge.is-danger {
  border-color: rgba(184, 66, 50, 0.24);
  background: #f9e7e3;
  color: var(--v1-danger);
}

#tab-today .today-action-badge.is-warning {
  border-color: rgba(183, 121, 31, 0.24);
  background: #fbf0d9;
  color: var(--v1-warning);
}

#tab-today .today-action-badge.is-info {
  border-color: rgba(47, 111, 146, 0.24);
  background: #e2f0f6;
  color: var(--v1-info);
}

#tab-today .today-action-badge.is-muted {
  border-color: var(--v1-line);
  background: #eef0eb;
  color: var(--v1-muted);
}











.mini-facts div.is-danger{
  border-color: rgba(184, 66, 50, 0.28);
  background: #fbebe8;
  color: var(--v1-danger);
}

.mini-facts div.is-warning{
  border-color: rgba(183, 121, 31, 0.28);
  background: #fbf1dc;
  color: var(--v1-warning);
}

.mini-facts div.is-info{
  border-color: rgba(47, 111, 146, 0.28);
  background: #e7f2f7;
  color: var(--v1-info);
}





.empty-state,
.selected-summary,
.mini-facts div,
.note-history article,
.inbound-record-card {
  border: 1px solid var(--v1-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

.selected-summary {
  border-left: 3px solid var(--v1-primary);
}

.mini-facts {
  gap: 8px;
}

.mini-facts div {
  padding: 9px;
}

thead th {
  border-bottom: 1px solid var(--v1-line);
  background: var(--v1-bg-strong);
  color: var(--v1-muted);
  font-size: 11px;
  font-weight: 650;
}

td {
  border-bottom: 1px solid #e8e7e2;
  color: var(--v1-text);
}

tbody tr:hover {
  background: #fafaff;
}

@media (max-width: 1180px) {
  .app-shell {
    display: block;
  }

  .app-sidebar {
    position: static;
    height: auto;
    gap: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--v1-line);

  }

  .app-sidebar .tabs {
    display: flex;
    overflow-x: auto;
    gap: 6px;
    max-width: 100%;
    padding-bottom: 4px;
  }

  .app-sidebar .tab-button {
    flex: 0 0 auto;
    width: auto;
  }

  .sidebar-metrics {
    grid-template-columns: repeat(4, minmax(128px, 1fr));
    margin: 0;
  }



  #tab-today .catalog-hero,
  .catalog-hero {
    grid-template-columns: 1fr;
  }

  #tab-today .workbench-split-layout--actions,
  #tab-inbound .workbench-split-layout--actions {
    grid-template-columns: 1fr;
  }





}

@media (max-width: 760px) {
  .app-sidebar {

    overflow-x: hidden;
  }

  .sidebar-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-sidebar .tab-button {

    min-width: 0;

  }

  .top-metrics div,
  .sidebar-metrics div {
    padding: 9px;
  }

  #tab-today .catalog-hero,
  .catalog-hero {
    gap: 14px;
    padding: 15px;
  }



  .section-head {
    display: grid;
  }

  .section-head.inline,
  #tab-today .workbench-main > .panel:nth-child(2) .section-head.inline {
    display: grid;
    gap: 10px;
  }

  .toolbar,
  .toolbar select {
    width: 100%;
  }

  #tab-today .today-task-row,
  #tab-today .today-task-item {

    min-width: 0;
  }

  #tab-today .today-cell{

    border-right: 0;
    border-bottom: 1px solid #edf0ea;
  }

  .mini-facts{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 430px) {
  .sidebar-metrics,
  .mini-facts{
    grid-template-columns: 1fr;
  }

  .app-sidebar .tab-button {
    flex-basis: calc(50% - 6px);
  }
}

/* V1 refit pass: remove the retro-shell leftovers and make the Today tab an operator desk. */
body {
  background: var(--v1-bg);
}

.app-shell {
  grid-template-columns: 232px minmax(0, 1fr);
}

.app-sidebar {
  padding: 20px 16px;
}

.brand {
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  font-size: 15px;
}

.brand h1 {
  font-size: 14px;
}

.brand p {
  font-size: 11px;
}

.app-sidebar .tab-button {
  min-height: 36px;
  padding: 0 9px;
  font-size: 13px;
  font-weight: 760;
}

.sidebar-metrics {
  gap: 7px;
}

.sidebar-metrics div {
  padding: 9px;
}

.workspace,
.main {
  padding: 22px 22px 34px;
}

.section-head {
  border-bottom: 1px solid var(--v1-line);
  padding: 14px 16px 11px;
}

.section-head small,
.sort-hint {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border: 1px solid rgba(23, 79, 67, 0.18);
  border-radius: 999px;
  background: var(--v1-primary-soft);
  box-shadow: none;
  color: var(--v1-primary-2);
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.metric-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--metric-card-min)), 1fr));
  gap: clamp(10px, 0.9vw, 16px);
  padding: 4px 16px 16px;
}

.metric-card {
  display: flex;
  min-height: 88px;
  align-items: center;
  gap: 13px;
  border: 1px solid var(--v1-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
  padding: 13px 14px;
}

button.metric-card {
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.metric-card.is-clickable {
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.metric-card.is-clickable:hover {
  border-color: #93b4ea;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.12);
  transform: translateY(-1px);
}

.metric-card.is-clickable:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.22);
  outline-offset: 2px;
}

.metric-icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #dbe4da;
  border-radius: 8px;
  background: var(--v1-primary-soft);
  box-shadow: none;
  color: var(--v1-primary-2);
  font-size: 13px;
  font-weight: 900;
}

.metric-card span {
  display: block;
  color: #5f6b7c;
  font-size: 13px;
  line-height: 1.3;
}

.metric-card strong {
  display: block;
  margin-top: 5px;
  color: var(--v1-text);
  font-size: 32px;
  font-weight: 1000;
  line-height: 1;
}

.metric-card.red strong,
.metric-card.orange strong,
.metric-card.purple strong,
.metric-card.teal strong {
  color: var(--retro-ink);
}

.metric-card p {
  margin: 4px 0 0;
  color: var(--v1-muted);
  font-size: 12px;
}

.metric-card.red .metric-icon {
  border-color: #efcbc5;
  background: #fde8e5;
  color: #b84232;
}

.metric-card.orange .metric-icon {
  border-color: #ead7a6;
  background: #fff5d9;
  color: #8a5a00;
}

.metric-card.purple .metric-icon {
  border-color: #d7d3ec;
  background: #efedfb;
  color: #5a4a99;
}

.metric-card.teal .metric-icon {
  border-color: #c9ded3;
  background: #e8f4ee;
  color: var(--v1-primary-2);
}

.metric-card.priority-critical,
.metric-card.priority-urgent,
.metric-card.priority-primary,
.metric-card.priority-secondary {
  box-shadow: none;
}

.metric-card.priority-critical {
  border-color: #efcbc5;
  background: #fff9f7;
}

.metric-card.priority-urgent,
.metric-card.priority-primary {
  border-color: #ead7a6;
  background: #fffaf0;
}

.metric-card.priority-secondary {
  border-color: var(--v1-line);
  background: #fffefa;
}

.metric-card.priority-critical strong {
  color: var(--retro-red);
  font-size: 36px;
}

.metric-card.priority-secondary strong {
  font-size: 28px;
}

@media (max-width: 1280px) {
  .metric-cards {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }
}

@media (max-width: 760px) {
  .metric-cards {
    grid-template-columns: 1fr;
  }
}

.file-card {
  border: 1px solid var(--v1-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

.workbench-table-wrap {
  overflow-x: auto;
  overflow-y: visible;
  border: 1px solid var(--v1-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

.workbench-table-wrap table {
  color: var(--v1-text);
}

.workbench-table-wrap th,
.workbench-table-wrap td {
  border-right: 0;
}

.workbench-table-wrap th {
  border-bottom: 1px solid var(--v1-line);
  background: var(--v1-bg-strong);
  box-shadow: none;
  color: var(--v1-muted);
  font-size: 11px;
  font-weight: 650;
}

.workbench-table-wrap td {
  border-bottom: 1px solid #e8e7e2;
  color: var(--v1-text);
}

.workbench-table-wrap tbody tr:hover,
.workbench-table-wrap tbody tr:focus-within,
.workbench-table-wrap tbody tr.is-selected {
  background: var(--workbench-row-hover);
  box-shadow: inset 2px 0 0 rgba(98, 104, 241, 0.36);
}

.workbench-table-wrap th[data-sort-key].is-sorted,
.workbench-table-wrap th[data-inbound-sort-key].is-sorted {
  background: var(--v1-primary-soft);
  color: var(--v1-primary-2);
}

.toolbar select,
.toolbar button,
.workbench-filter-grid select,
.workbench-filter-grid input,
.workbench-button-row button {
  border: 1px solid var(--v1-line-strong);
  border-radius: var(--workbench-control-radius);
  background: #fff;
  box-shadow: none;
  color: var(--v1-text);
}

.toolbar button:hover,
.workbench-button-row button:hover {
  border-color: rgba(23, 79, 67, 0.34);
  background: var(--v1-primary-soft);
  color: var(--v1-primary-2);
  box-shadow: none;
  transform: none;
}



.text-button {
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--v1-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

#tab-today .catalog-hero {
  display: grid;

  margin: 0;
  border: 0;
  background: transparent;
  box-shadow: none;

}







#tab-today .today-helper-note {
  display: none;
}

#tab-today .workbench-split-layout--actions {
  grid-template-columns: minmax(0, 1fr) minmax(292px, 318px);
  gap: 14px;
}

#tab-today #todayOverview .metric-icon {
  font-size: 11px;
}

#tab-today .toolbar {
  display: flex;
  gap: 8px;
}

#tab-today .toolbar select {
  width: 156px;


  background: #fff;
}

#tab-today .today-task-row {
  grid-template-columns: 34px 58px minmax(150px, 1.15fr) minmax(132px, 0.82fr) minmax(96px, 0.56fr) minmax(158px, 1fr) minmax(98px, 0.55fr) 76px;
  min-width: 0;
}

#tab-today .today-task-head {
  border-radius: 7px;
}

#tab-today .today-task-head span {

  padding: 0 8px;
  font-size: 10px;
}

#tab-today .today-cell{
  padding: 8px;
}

#tab-today .today-stock-cell strong {
  font-variant-numeric: tabular-nums;
}

#tab-today .today-action-line {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
  align-items: start;
}













#tab-today .quick-action-brief {
  display: grid;

  margin-top: 10px;

  border: 1px solid #d8b85d;
  border-left-width: 4px;

  box-shadow: inset 0 0 0 1px rgba(19, 31, 28, 0.06);
}

#tab-today .quick-action-brief > span {
  color: #8f6414;
  font-size: 11px;
  font-weight: 800;
}

#tab-today .quick-action-brief > strong {
  color: #13201d;

}

#tab-today .quick-action-brief ul {
  margin: 0;

  color: #33413d;
  font-size: 12px;
  line-height: 1.45;
}

#tab-today .quick-action-brief p {
  margin: 0;
  color: #65716d;
  font-size: 12px;
  line-height: 1.45;
}

#tab-today .quick-action-brief .quick-missing-line {
  color: #9c2f25;
  font-weight: 700;
}

@media (max-width: 1320px) {
  .app-shell {
    grid-template-columns: 176px minmax(0, 1fr);
  }

  .workspace,
  .main {
    padding: 18px;
  }

  #tab-today .workbench-split-layout--actions {
    grid-template-columns: minmax(0, 1fr);
  }

  #tab-today .today-task-row {
    grid-template-columns: 32px 54px minmax(150px, 1.15fr) minmax(126px, 0.78fr) minmax(90px, 0.52fr) minmax(150px, 0.9fr) minmax(94px, 0.5fr) 70px;
  }


}

@media (max-width: 1180px) {


  #tab-today .workbench-split-layout--actions {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 760px) {

  .workspace,
  .main {
    padding: 12px 10px 22px;
  }

  #tab-today {
    gap: 10px;
  }











  #tab-today .today-queue-panel > .section-head {
    grid-template-columns: 1fr;

  }

  #tab-today .toolbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  #tab-today .toolbar select {
    width: 100%;
    min-width: 0;
  }

  #tab-today .today-task-head {
    display: none;
  }

  #tab-today .today-task-row,
  #tab-today .today-task-item {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  #tab-today .today-cell{
    grid-column: 2;
  }

  #tab-today .today-action-line {
    grid-template-columns: auto minmax(0, 1fr);
  }

}

/* V1 refit pass 2: keep the desktop workbench useful at 1440 and prevent narrow-window breakage. */
#tab-today #todayCards,
#tab-today .risk-card-list,
#tab-today .today-task-body {
  min-width: 0;
}

.brand p {
  display: none;
}

.tab-panel:not(.is-active) {
  display: none;
}

#tab-today.is-active {
  display: grid;
}

@media (min-width: 1321px) and (max-width: 1499px) {
  #tab-today .today-cell{
    padding: 7px;
  }
}

@media (max-width: 760px) {
  .app-sidebar {
    gap: 8px;
    padding: 10px;
  }

  .brand {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 8px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 14px;
  }

  .brand h1 {
    font-size: 13px;
    line-height: 1.15;
  }

  .brand p {
    display: none;
  }

  .app-sidebar .tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 0;
  }

  .app-sidebar .tab-button {
    flex: 0 0 auto;
    min-height: 32px;
    justify-content: center;
    padding: 0 10px;
    font-size: 12px;
    white-space: nowrap;
  }

  .sidebar-metrics{
    display: none !important;
  }

  #tab-today .catalog-hero {
    padding-top: 10px;
  }

  #tab-today .today-queue-panel > .section-head.inline {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
    padding: 11px 10px;
  }

  #tab-today .workbench-main > .today-queue-panel.panel > .section-head.inline {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  #tab-today .today-queue-panel > .section-head.inline > div:first-child {
    grid-column: 1;
    order: 1;
    min-width: 0;
    width: auto;
  }

  #tab-today .today-queue-panel > .section-head.inline .toolbar {
    grid-column: 1;
    order: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    width: 100%;
  }

  #tab-today .today-queue-panel > .section-head h2 {
    flex-wrap: wrap;

  }

}

/* PC visual regression pass: keep V1 skin while preserving old-tab usability. */
@media (min-width: 1181px) {
  .app-shell {
    grid-template-columns: 176px minmax(0, 1fr);
  }

  .app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 176px;
    gap: 12px;
    padding: 18px 12px;
  }

  .workspace,
  .main {
    grid-column: 2;
  }

  .app-sidebar .brand {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-width: 0;
  }

  .app-sidebar .brand-mark {
    width: 34px;
    min-width: 34px;
    height: 34px;
    border-radius: 8px;
  }

  .app-sidebar .brand h1 {
    max-width: 108px;
    overflow-wrap: anywhere;
    color: var(--v1-nav-text);
    font-size: 13px;
    line-height: 1.18;
    text-shadow: none;
  }

  .app-sidebar .tab-button {
    min-height: 34px;
    padding: 0 8px;
    font-size: 12.5px;
  }

  .sidebar-metrics {
    gap: 6px;
  }

  .sidebar-metrics div{
    padding: 8px;
  }

  .workspace,
  .main {
    padding: 16px 18px 28px;
  }

  #tab-today .workbench-split-layout--actions {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  #tab-today .workbench-main,
  #tab-today .today-queue-panel {
    width: 100%;
  }

  #tab-today .today-task-row {
    grid-template-columns: 30px 48px minmax(142px, 1.12fr) minmax(118px, 0.76fr) minmax(88px, 0.5fr) minmax(150px, 0.9fr) minmax(84px, 0.48fr) 66px;
  }

  #tab-today .today-action-cell strong {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  #tab-bom .panel,
  #tab-rules .panel {
    box-shadow: 0 6px 16px rgba(24, 35, 31, 0.045);
  }

  #tab-bom .section-head,
  #tab-rules .section-head {
    padding: 12px 14px 8px;
  }

  #tab-bom .metric-cards {
    gap: 10px;
  }

  #tab-bom .workbench-table-wrap th,
  #tab-bom .workbench-table-wrap td,
  #tab-rules .workbench-table-wrap th,
  #tab-rules .workbench-table-wrap td {
    padding-top: 7px;
    padding-bottom: 7px;
  }
}

/* Optional company-embedded shell. Standalone remains the default navigation contract. */
.embedded-shell-tabs {
  display: none;
}

html[data-shell-mode="embedded"] {
  --embedded-shell-top-offset: 0px;
  --embedded-shell-nav-bg: rgba(248, 250, 249, 0.96);
  --embedded-shell-nav-surface: #ffffff;
  --embedded-shell-nav-line: #dfe6e2;
  --embedded-shell-nav-text: #5f6b67;
  --embedded-shell-nav-active: #117c6d;
  --embedded-shell-nav-active-bg: #e8f4f0;
  --embedded-shell-nav-active-line: #b8dcd2;
  --embedded-shell-nav-focus: rgba(17, 124, 109, 0.24);
}

html[data-shell-mode="embedded"] .app-shell {
  grid-template-columns: minmax(0, 1fr);
}

html[data-shell-mode="embedded"] .app-sidebar {
  display: none !important;
}

html[data-shell-mode="embedded"] .workspace,
html[data-shell-mode="embedded"] .main {
  grid-column: 1;
  min-width: 0;
}

html[data-shell-mode="embedded"] #tab-today.is-active,
html[data-shell-mode="embedded"] #tab-sku.is-active,
html[data-shell-mode="embedded"] #tab-inbound.is-active,
html[data-shell-mode="embedded"] #tab-bom.is-active {
  --daily-workbench-main-block-padding: 100px;
}

html[data-shell-mode="embedded"] .embedded-shell-tabs {
  position: sticky;
  top: var(--embedded-shell-top-offset);
  z-index: 32;
  display: flex;
  min-width: 0;
  align-items: center;
  margin: -4px 0 12px;
  border: 1px solid var(--embedded-shell-nav-line);
  border-radius: 9px;
  background: var(--embedded-shell-nav-bg);
  box-shadow: 0 7px 20px rgba(42, 62, 55, 0.06);
  padding: 5px;
  backdrop-filter: blur(12px);
}

html[data-shell-mode="embedded"] .embedded-shell-tabs__track {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 3px;
}

html[data-shell-mode="embedded"] .embedded-shell-tabs .tab-button {
  min-width: max-content;
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  box-shadow: none;
  color: var(--embedded-shell-nav-text);
  padding: 0 14px;
  font-size: 13px;
  font-weight: 720;
  line-height: 1;
  white-space: nowrap;
  transform: none;
}

html[data-shell-mode="embedded"] .embedded-shell-tabs .tab-button:hover {
  border-color: var(--embedded-shell-nav-line);
  background: var(--embedded-shell-nav-surface);
  color: var(--v1-text);
  transform: none;
}

html[data-shell-mode="embedded"] .embedded-shell-tabs .tab-button.is-active {
  border-color: var(--embedded-shell-nav-active-line);
  background: var(--embedded-shell-nav-active-bg);
  color: var(--embedded-shell-nav-active);
  box-shadow: inset 0 -2px 0 var(--embedded-shell-nav-active);
}

html[data-shell-mode="embedded"] .embedded-shell-tabs .tab-button:focus {
  outline: none;
}

html[data-shell-mode="embedded"] .embedded-shell-tabs .tab-button:focus-visible {
  outline: 2px solid var(--embedded-shell-nav-focus);
  outline-offset: 1px;
}

@media (min-width: 1181px) {
  html[data-shell-mode="embedded"] .workspace,
  html[data-shell-mode="embedded"] .main {
    padding-inline: 20px;
  }
}

@media (max-width: 1180px) {
  html[data-shell-mode="embedded"] .embedded-shell-tabs {
    overflow-x: auto;
  }

  html[data-shell-mode="embedded"] .embedded-shell-tabs__track {
    width: max-content;
  }
}
