:root {
  --bg: #f6f7f5;
  --surface: #ffffff;
  --surface-2: #eef3ef;
  --ink: #202321;
  --text: #202321;
  --muted: #5c655f;
  --line: #c9d0ca;
  --line-strong: #8ea298;
  --accent: #267761;
  --accent-2: #bd4f46;
  --accent-3: #f2c84b;
  --green: #267761;
  --green-soft: #eef7f2;
  --eyebrow-topbar: #5f8974;
  --violet-soft: #f5f0ff;
  --table-head: #e8edf5;
  --underwear-section-bar-sticky-top: 0px;
  --shadow: 0 10px 30px rgba(31, 35, 32, 0.08);
  --shadow-soft: 0 5px 16px rgba(31, 35, 32, 0.06);
}

body[data-theme="dark"] {
  --bg: #1b1d1e;
  --surface: #232627;
  --surface-2: #2a2e2f;
  --ink: #ebece7;
  --text: #ebece7;
  --muted: #a8b0ab;
  --line: #373e3c;
  --line-strong: #58605d;
  --accent: #5a9b88;
  --accent-2: #d18f7c;
  --accent-3: #d4b46a;
  --green: #5a9b88;
  --green-soft: #223630;
  --eyebrow-topbar: #7da38f;
  --violet-soft: #302a38;
  --table-head: #303638;
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.36);
  --shadow-soft: 0 10px 26px rgba(0, 0, 0, 0.26);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-underwear-notes-fullscreen-active {
  overflow: hidden;
}

body.is-auth-locked {
  overflow: hidden;
}

body.is-auth-locked main {
  pointer-events: none;
  filter: blur(2px);
  user-select: none;
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 50000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(16, 18, 18, 0.72);
  backdrop-filter: blur(10px);
}

.auth-gate[hidden] {
  display: none !important;
}

.auth-card {
  width: min(420px, 100%);
  display: grid;
  gap: 18px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-card h2 {
  margin: 0 0 4px;
  font-size: 30px;
  line-height: 1.1;
}

.auth-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.auth-card label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

.auth-card input {
  width: 100%;
}

.auth-password-field {
  position: relative;
  display: block;
}

.auth-password-field input {
  padding-right: 48px;
}

.auth-password-toggle {
  position: absolute;
  top: 50%;
  right: 7px;
  width: 36px;
  height: 36px;
  min-height: 36px;
  display: inline-grid;
  place-items: center;
  border-color: transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  padding: 0;
  transform: translateY(-50%);
}

.auth-password-toggle:hover,
.auth-password-toggle[aria-pressed="true"] {
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--accent);
}

.auth-password-toggle svg {
  width: 20px;
  height: 20px;
  pointer-events: none;
}

.auth-status {
  min-height: 22px;
  color: var(--accent-2) !important;
}

.auth-user-button {
  white-space: nowrap;
}

button,
input,
textarea,
select {
  font: inherit;
  letter-spacing: 0;
}

body,
.topbar,
.panel,
.settings-menu,
.settings-content,
.workspace-column,
.workspace-heading,
.client-card,
.product-card,
.party-card,
.placeholder-card,
.shortcut-item,
.operational-tools-card,
.underwear-settings-row,
.appearance-theme-card,
.billing-paid-toggle {
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

button {
  min-height: 42px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  padding: 9px 14px;
  cursor: pointer;
  font-weight: 700;
  line-height: 1.1;
}

button:hover {
  filter: brightness(0.96);
}

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

button.secondary {
  background: var(--surface);
  color: var(--accent);
}

button.secondary:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.button-link {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  padding: 9px 14px;
  font-weight: 700;
  line-height: 1.1;
  text-decoration: none;
}

.button-link.secondary {
  border-color: var(--accent);
  background: var(--surface);
  color: var(--accent);
}

.button-link.secondary:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.button-link.compact-button {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 13px;
}

input[type="file"],
input[type="number"],
input[type="text"],
textarea,
select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 8px 10px;
}

input[type="number"]:focus,
input[type="text"]:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(38, 119, 97, 0.14);
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(38, 119, 97, 0.16);
  outline-offset: 2px;
}

input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 0.78;
}

input[type="number"] {
  width: 86px;
}

main,
.topbar__inner {
  width: calc(100% - 28px);
  margin: 0 auto;
}

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(31, 35, 32, 0.03);
}

.topbar__inner {
  min-height: 104px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.topbar__main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1 1 auto;
}

.topbar__main > div {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

#workspaceEyebrow {
  color: var(--eyebrow-topbar);
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  line-height: 1.15;
}

h1 {
  font-size: 36px;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

h2 {
  font-size: 27px;
}

h3 {
  font-size: 21px;
}

.topbar__image {
  width: 156px;
  height: 82px;
  object-fit: contain;
  flex: 0 0 auto;
}

.topbar__subtitle {
  max-width: 640px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
}

.topbar__subtitle:empty {
  display: none;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topbar-calendar {
  position: relative;
  flex: 0 0 auto;
}

.calendar-button {
  position: relative;
  width: 48px;
  height: 48px;
  min-height: 48px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border-color: var(--line);
  background: var(--surface);
  color: var(--accent);
  box-shadow: var(--shadow-soft);
}

.calendar-button:hover,
.calendar-button.is-active {
  border-color: rgba(38, 119, 97, 0.38);
  background: var(--surface-2);
}

.calendar-button svg {
  width: 22px;
  height: 22px;
}

.calendar-button::after {
  content: "";
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 8px;
  height: 8px;
  border: 2px solid var(--surface);
  border-radius: 999px;
  background: var(--green);
  opacity: 0;
}

.calendar-button.has-shipments::after,
.calendar-button.has-alerts::after {
  opacity: 1;
}

.calendar-button.has-alerts::after {
  background: var(--accent-2);
}

.calendar-popover {
  position: fixed;
  top: var(--calendar-popover-top, 86px);
  right: var(--calendar-popover-right, 14px);
  z-index: 20000;
  width: min(360px, calc(100vw - 28px));
  max-height: var(--calendar-popover-max-height, calc(100dvh - 110px));
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.calendar-popover[hidden] {
  display: none !important;
}

.calendar-popover__head {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 8px;
}

.calendar-popover__head strong {
  text-align: center;
  font-size: 15px;
  line-height: 1.2;
}

.calendar-nav-button {
  width: 36px;
  min-height: 34px;
  padding: 0;
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.calendar-weekdays span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

.calendar-day {
  position: relative;
  min-width: 0;
  min-height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  box-shadow: none;
}

.calendar-day:not(.has-shipment) {
  cursor: default;
}

.calendar-day.is-muted {
  color: var(--muted);
  opacity: 0.58;
}

.calendar-day.is-today {
  border-color: rgba(38, 119, 97, 0.38);
}

.calendar-day.has-shipment {
  border-color: rgba(38, 119, 97, 0.18);
  background: var(--surface-2);
}

.calendar-day.has-shipment:hover {
  border-color: rgba(38, 119, 97, 0.4);
  filter: none;
}

.calendar-day.is-selected {
  border-color: rgba(38, 119, 97, 0.68);
  background: linear-gradient(135deg, rgba(38, 119, 97, 0.18), rgba(38, 119, 97, 0.08));
  box-shadow: inset 0 0 0 1px rgba(38, 119, 97, 0.18);
}

.calendar-day.is-selected.is-deficit {
  border-color: rgba(189, 79, 70, 0.62);
  background: linear-gradient(135deg, rgba(189, 79, 70, 0.16), rgba(189, 79, 70, 0.07));
  box-shadow: inset 0 0 0 1px rgba(189, 79, 70, 0.15);
}

.calendar-day i {
  position: absolute;
  right: 7px;
  top: 8px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--green);
}

.calendar-day.is-deficit i {
  background: var(--accent-2);
}

.calendar-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.calendar-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
}

.calendar-dot--deficit {
  background: var(--accent-2);
}

.calendar-shipments-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 26px;
}

.calendar-shipments-head strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.2;
}

.calendar-shipments-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.calendar-clear-button {
  min-height: 26px;
  padding: 4px 8px;
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.calendar-shipments {
  display: grid;
  gap: 6px;
  max-height: min(180px, 32dvh);
  overflow-y: auto;
  padding-right: 2px;
}

.calendar-shipments p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.calendar-shipment {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 8px;
  align-items: start;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.calendar-shipment--deficit {
  border-color: rgba(189, 79, 70, 0.36);
  background: rgba(189, 79, 70, 0.08);
}

.calendar-shipment__main {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.calendar-shipment__summary {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.calendar-shipment strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.2;
}

.calendar-shipment span,
.calendar-shipment em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.calendar-shipment__details {
  display: grid;
  gap: 4px;
}

.calendar-shipment__detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 3px 8px;
  align-items: center;
  padding-top: 5px;
  border-top: 1px solid rgba(38, 119, 97, 0.12);
}

.calendar-shipment__detail strong {
  font-size: 11px;
}

.calendar-shipment__detail span {
  grid-column: 1;
  font-size: 10px;
}

.calendar-shipment__detail em {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
}

.calendar-shipment__total {
  padding-top: 1px;
  white-space: nowrap;
}

.workspace-switch-button {
  flex: 0 1 188px;
  min-width: 188px;
  min-height: 48px;
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
  white-space: normal;
  box-shadow: var(--shadow-soft);
}

.topbar-action-button {
  flex: 0 1 auto;
  min-height: 48px;
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
  box-shadow: var(--shadow-soft);
}

.workspace-back {
  min-width: 46px;
  min-height: 46px;
  border-color: var(--line);
  color: var(--ink);
  font-weight: 900;
  padding: 9px 12px;
  white-space: nowrap;
}

.settings-button {
  width: 48px;
  height: 48px;
  min-height: 48px;
  display: inline-grid;
  place-items: center;
  border-color: var(--line);
  background: var(--surface);
  padding: 8px;
}

.settings-button img {
  width: 28px;
  height: 28px;
}

.settings-button--brand {
  width: auto;
  height: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 24px;
  overflow: hidden;
}

.settings-button--brand img {
  width: clamp(90px, 11vw, 145px);
  height: auto;
  display: block;
  border-radius: 24px;
}

body[data-theme="dark"] .settings-button img {
  filter: invert(0.94) brightness(1.1);
}

.settings-button.is-active {
  border-color: var(--accent);
  box-shadow: inset 0 -4px 0 var(--accent-3);
}

.settings-button--brand.is-active {
  border-color: transparent;
  box-shadow: 0 0 0 2px rgba(98, 194, 154, 0.42);
}

.control-band,
.summary-band,
.tabs,
.panel,
.party-hub,
.workspace-panel,
.workspace-placeholder {
  margin-top: 18px;
}

.workspace-layout {
  display: grid;
  grid-template-columns: minmax(250px, 0.75fr) minmax(0, 1.35fr);
  gap: 16px;
  align-items: start;
}

.workspace-column {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.workspace-heading {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.workspace-heading span {
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  text-transform: none;
}

.workspace-heading strong {
  min-width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  padding: 0 9px;
  font-size: 15px;
}

.client-list,
.product-list {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.client-card,
.product-card {
  width: 100%;
  min-height: 0;
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 15px;
  text-align: left;
  font-weight: 700;
  box-shadow: none;
}

.client-card:hover,
.product-card:hover {
  border-color: var(--accent);
  filter: none;
}

.client-card.is-active {
  border-color: var(--accent);
  background: var(--green-soft);
  box-shadow: inset 4px 0 0 var(--accent);
}

.client-card span,
.product-card strong {
  font-size: 21px;
  line-height: 1.2;
}

.client-card small,
.product-card small,
.product-card em {
  color: var(--muted);
  font-style: normal;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 600;
}

.product-card {
  position: relative;
  padding-right: 118px;
}

.product-card.is-ready {
  border-color: #9ec9b5;
}

.workspace-status {
  position: absolute;
  top: 12px;
  right: 12px;
  min-width: 72px;
  border: 1px solid rgba(38, 119, 97, 0.28);
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--green);
  padding: 4px 8px;
  text-align: center;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.product-tags,
.placeholder-steps {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.product-tags span,
.placeholder-steps span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  padding: 4px 7px;
  font-size: 12px;
  font-weight: 700;
}

.placeholder-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 22px;
}

.underwear-workspace {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  max-width: none;
  padding-right: 22px;
  --underwear-summary-column-width: 96px;
  --underwear-summary-gap-width: 16px;
}

.underwear-workspace > * {
  position: relative;
  z-index: 1;
}

.underwear-back-link {
  margin-top: 28px;
}

.finance-workspace {
  max-width: none;
  padding-right: 22px;
}

.finance-workspace > p {
  max-width: 760px;
  margin-bottom: 0;
}

.finance-summary-grid,
.finance-month-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.finance-summary-card {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.finance-summary-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.finance-summary-card strong {
  font-size: 30px;
  line-height: 1.02;
}

.finance-summary-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.finance-summary-card--accent {
  border-color: rgba(38, 119, 97, 0.2);
  background: linear-gradient(180deg, rgba(38, 119, 97, 0.05), #fff);
}

.finance-summary-card--warn {
  border-color: rgba(155, 45, 45, 0.16);
  background: linear-gradient(180deg, rgba(155, 45, 45, 0.04), #fff);
}

.finance-layout-grid,
.finance-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 16px;
  align-items: start;
}

.finance-fields,
.finance-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.finance-fields label,
.finance-settings-grid label {
  display: grid;
  gap: 6px;
}

.finance-fields span,
.finance-settings-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.finance-fields input,
.finance-fields select,
.finance-fields textarea,
.finance-settings-grid input {
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  background: #fff;
}

.finance-fields textarea {
  min-height: 84px;
  resize: vertical;
}

.finance-fields__wide {
  grid-column: 1 / -1;
}

.finance-account-grid,
.finance-signal-list,
.finance-plan-block {
  display: grid;
  gap: 12px;
}

.finance-account-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.finance-account-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.finance-account-card--alert {
  border-color: rgba(155, 45, 45, 0.18);
}

.finance-account-card__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.finance-account-card__top strong {
  display: block;
  font-size: 18px;
  line-height: 1.05;
}

.finance-account-card__top span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.finance-account-card__top b {
  font-size: 24px;
  line-height: 1;
  text-align: right;
}

.finance-progress {
  display: grid;
  gap: 8px;
}

.finance-progress--plain {
  padding-top: 2px;
}

.finance-progress--plain small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.finance-progress__bar {
  position: relative;
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: var(--surface-2);
}

.finance-progress__bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2b8c67, #67b889);
}

.finance-progress__meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.finance-progress__meta small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.finance-plan-group {
  display: grid;
  gap: 8px;
}

.finance-plan-group > strong {
  font-size: 16px;
}

.finance-plan-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fcfdfc;
}

.finance-plan-row strong {
  display: block;
  font-size: 15px;
}

.finance-plan-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.finance-plan-row__side {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.finance-plan-row__side button {
  min-width: 0;
}

.finance-plan-row__side b {
  font-size: 22px;
  line-height: 1;
}

.finance-signal-list {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.finance-signal-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.finance-signal-card--alert {
  border-color: rgba(155, 45, 45, 0.18);
  background: linear-gradient(180deg, rgba(155, 45, 45, 0.03), #fff);
}

.finance-signal-card__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.finance-signal-card__top strong {
  display: block;
  font-size: 16px;
  line-height: 1.08;
}

.finance-signal-card__top span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.finance-signal-card__top b {
  font-size: 22px;
  line-height: 1;
  text-align: right;
}

.finance-signal-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.finance-signal-card__meta span {
  border: 1px solid #dce4de;
  border-radius: 8px;
  background: #f8faf8;
  padding: 5px 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.finance-journal-list {
  display: grid;
  gap: 10px;
}

.finance-journal-item {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.finance-journal-item--transfer {
  background: #fbfcfb;
}

.finance-journal-item--closure {
  background: linear-gradient(180deg, #fff, #f8faf8);
}

.finance-journal-item__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.finance-journal-item__top strong {
  display: block;
  font-size: 16px;
  line-height: 1.08;
}

.finance-journal-item__top span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.finance-journal-item__top b {
  font-size: 24px;
  line-height: 1;
  text-align: right;
}

.finance-journal-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.finance-journal-item__meta span {
  border: 1px solid #dce4de;
  border-radius: 8px;
  background: #f8faf8;
  padding: 5px 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.underwear-summary-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 14px;
  margin: 8px 0 0;
  justify-content: stretch;
  align-items: stretch;
}

.underwear-summary-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  z-index: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  padding: 16px;
  width: 100%;
  max-width: 100%;
  height: 100%;
}

.underwear-summary-grid > .underwear-summary-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(
      circle 720px at var(--summary-card-halo-x, 50%) var(--summary-card-halo-y, 50%),
      rgba(90, 155, 136, 0.085) 0%,
      rgba(90, 155, 136, 0.05) 34%,
      rgba(90, 155, 136, 0.022) 66%,
      transparent 90%
    );
  mix-blend-mode: screen;
  transition: opacity 0.28s ease;
}

.underwear-summary-grid > .underwear-summary-card.is-summary-card-halo-active::before {
  opacity: 0.78;
}

.underwear-workspace .underwear-summary-grid > .underwear-summary-card > * {
  position: relative;
  z-index: 1;
}

.underwear-summary-card--wide {
  align-self: start;
  height: 100%;
}

.underwear-sections-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin-top: 16px;
}

.underwear-sections-sidebar {
  position: sticky;
  top: 12px;
  display: grid;
  gap: 16px;
  align-self: start;
  align-content: start;
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 8px;
  padding-bottom: max(320px, calc(100vh - 188px));
  padding-bottom: max(320px, calc(100dvh - 188px));
  margin-right: -8px;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(38, 119, 97, 0.34) transparent;
}

.underwear-sections-sidebar::-webkit-scrollbar {
  width: 8px;
}

.underwear-sections-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.underwear-sections-sidebar::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(38, 119, 97, 0.34);
  background-clip: padding-box;
}

.underwear-sections-nav {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  padding: 14px;
}

.underwear-sections-nav--extras {
  margin-top: 76px;
  background: var(--surface);
  border-color: rgba(62, 92, 74, 0.16);
}

.underwear-sections-nav--archives {
  margin-top: 76px;
  background: var(--surface);
  border-color: rgba(62, 92, 74, 0.16);
}

.underwear-sections-nav__head {
  position: sticky;
  top: 0;
  z-index: 3;
  display: grid;
  gap: 4px;
  margin: -14px -14px 14px;
  padding: 14px 14px 10px;
  border-radius: 8px 8px 0 0;
  background: var(--surface);
  box-shadow: 0 12px 18px -20px rgba(21, 35, 30, 0.42);
}

.underwear-sections-nav__head.is-compact {
  gap: 0;
  padding-top: 14px;
}

.underwear-sections-nav__head strong {
  font-size: 18px;
  line-height: 1.08;
}

.underwear-sections-nav__head.is-compact strong {
  font-size: 17px;
  line-height: 1.12;
}

.underwear-sections-nav__head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.underwear-sections-nav__list {
  display: grid;
  gap: 8px;
}

.underwear-sections-nav__item {
  position: relative;
  display: grid;
  gap: 4px;
  justify-items: start;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px 14px;
  color: var(--ink);
  box-shadow: none;
  cursor: grab;
  user-select: none;
  will-change: transform;
  transition: border-color 0.16s ease, background 0.16s ease, opacity 0.16s ease, transform 0.16s ease;
}

.underwear-sections-nav__item:active {
  cursor: grabbing;
}

.underwear-sections-nav__item.is-section-dragging {
  z-index: 2;
  opacity: 0.42;
  transform: scale(0.985);
}

.underwear-sections-nav__item.is-section-sliding {
  z-index: 1;
}

.underwear-sections-nav__item.is-section-drop-before,
.underwear-sections-nav__item.is-section-drop-after {
  border-color: rgba(38, 119, 97, 0.48);
  background: var(--green-soft);
}

.underwear-sections-nav__item.is-section-drop-before::before,
.underwear-sections-nav__item.is-section-drop-after::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  height: 3px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(38, 119, 97, 0.12);
}

.underwear-sections-nav__item.is-section-drop-before::before {
  top: -7px;
}

.underwear-sections-nav__item.is-section-drop-after::after {
  bottom: -7px;
}

.underwear-sections-nav__item strong {
  font-size: 16px;
  line-height: 1.08;
}

.underwear-sections-nav__item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.underwear-sections-nav__item.is-open:not(.is-active) {
  border-color: rgba(38, 119, 97, 0.2);
  background: var(--surface-2);
}

.underwear-sections-nav__item.is-active {
  border-color: rgba(38, 119, 97, 0.34);
  background: var(--green-soft);
  box-shadow: inset 0 0 0 1px rgba(38, 119, 97, 0.12);
}

.underwear-sections-stage {
  min-width: 0;
  display: grid;
  gap: 16px;
}

.underwear-sections-stage.is-split {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.underwear-section-pane {
  min-width: 0;
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: visible;
}

.underwear-section-pane.is-active {
  border-color: rgba(38, 119, 97, 0.24);
}

.underwear-section-pane__bar {
  position: sticky;
  top: var(--underwear-section-bar-sticky-top);
  z-index: 18;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  border-radius: 8px 8px 0 0;
  background: var(--surface-2);
  box-shadow: 0 12px 26px rgba(31, 35, 32, 0.12);
  backdrop-filter: blur(14px);
}

.underwear-section-pane__bar > div {
  display: grid;
  gap: 4px;
}

.underwear-section-pane__bar strong {
  font-size: 18px;
  line-height: 1.08;
}

.underwear-section-pane__bar span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.underwear-section-pane__close {
  width: 32px;
  min-height: 32px;
  border-color: var(--line);
  background: var(--surface);
  color: var(--muted);
  padding: 0;
  font-size: 20px;
  line-height: 1;
}

.underwear-section-pane__body {
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  gap: 16px;
  padding: 14px;
}

.underwear-section-resizer {
  flex: 0 0 12px;
  cursor: col-resize;
  position: relative;
}

.underwear-section-resizer::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 5px;
  width: 2px;
  border-radius: 2px;
  background: var(--line-strong);
}

.underwear-section-resizer:hover::before,
.is-resizing-underwear-sections .underwear-section-resizer::before {
  background: var(--accent);
}

.is-resizing-underwear-sections,
.is-resizing-underwear-sections * {
  cursor: col-resize !important;
  user-select: none;
}

.is-dragging-underwear-section,
.is-dragging-underwear-section *,
.is-dragging-underwear-note,
.is-dragging-underwear-note * {
  cursor: grabbing !important;
  user-select: none;
}

.underwear-section-stack {
  display: grid;
  gap: 16px;
}

.underwear-booking-extras {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.05fr);
  gap: 16px;
  align-items: start;
}

.underwear-summary-card__top {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  align-items: start;
  justify-content: flex-start;
}

.underwear-summary-grid > .underwear-summary-card > .underwear-summary-card__top {
  min-height: 96px;
  padding: 13px 14px;
  border: 1px solid rgba(38, 119, 97, 0.14);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(38, 119, 97, 0.07), var(--surface));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
  align-items: start;
}

.underwear-summary-card__top h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.08;
  white-space: nowrap;
}

.underwear-summary-card__top p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.underwear-summary-total {
  display: grid;
  gap: 4px;
  text-align: right;
}

.underwear-summary-total strong {
  font-size: 31px;
  line-height: 1;
}

.underwear-summary-total span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
}

.underwear-summary-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  justify-items: start;
  width: 100%;
}

.underwear-summary-total--columns {
  display: grid;
  grid-template-columns: var(--underwear-summary-column-width) var(--underwear-summary-gap-width) var(--underwear-summary-column-width);
  gap: 0;
  align-items: start;
  position: relative;
}

.underwear-summary-total--columns > div {
  display: grid;
  gap: 4px;
  justify-items: end;
}

.underwear-summary-total--columns > div small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-align: right;
  max-width: 170px;
}

.underwear-summary-total--columns > div:first-child {
  grid-column: 1;
}

.underwear-summary-total--columns > div + div {
  grid-column: 3;
  padding-left: 0;
  border-left: 0;
}

.underwear-summary-total--columns::before {
  content: "";
  position: absolute;
  left: calc(var(--underwear-summary-column-width) + (var(--underwear-summary-gap-width) / 2));
  top: 8px;
  bottom: 6px;
  border-left: 1px dashed rgba(62, 92, 74, 0.28);
}

.underwear-summary-row {
  display: grid;
  grid-template-columns: max-content minmax(24px, 1fr) max-content;
  gap: 0;
  align-items: center;
  width: 100%;
  max-width: 100%;
}

.underwear-summary-size {
  display: grid;
  gap: 2px;
}

.underwear-summary-leader {
  min-width: 28px;
  border-bottom: 1px dashed rgba(62, 92, 74, 0.28);
  transform: translateY(1px);
  margin: 0 10px 0 16px;
}

.underwear-summary-size strong {
  font-size: 18px;
  line-height: 1;
}

.underwear-summary-size span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.underwear-summary-value {
  display: grid;
  grid-template-columns: max-content max-content;
  align-items: baseline;
  justify-content: end;
  gap: 8px;
  white-space: nowrap;
  justify-self: end;
  min-width: var(--underwear-summary-column-width);
}

.underwear-summary-value strong,
.underwear-packed-metric strong {
  font-size: 18px;
  font-weight: 900;
}

.underwear-summary-value span,
.underwear-packed-metric span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.underwear-summary-value--boxes,
.underwear-packed-metric--boxes {
  grid-template-columns: max-content max-content;
}

.underwear-summary-card--wide,
.underwear-summary-card--packed,
.underwear-summary-card--shipments,
.underwear-summary-card--stock-mini {
  width: 100%;
}

.underwear-summary-card--stock-mini {
  --underwear-summary-column-width: 108px;
  --underwear-summary-gap-width: 22px;
}

.lobatskaya-workspace {
  padding-right: 22px;
}

.lobatskaya-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 12px;
  margin: 14px 0;
  align-items: stretch;
}

.lobatskaya-summary-card {
  width: 100%;
}

.lobatskaya-summary-card__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.lobatskaya-summary-card .underwear-summary-total--columns {
  justify-self: end;
}

.lobatskaya-summary-total--triple {
  display: grid;
  grid-template-columns: repeat(3, max-content);
  gap: 18px;
  align-items: start;
  justify-self: end;
}

.lobatskaya-summary-total--triple > div {
  display: grid;
  gap: 4px;
  justify-items: end;
}

.lobatskaya-summary-total--triple > div + div {
  padding-left: 18px;
  border-left: 1px dashed rgba(62, 92, 74, 0.28);
}

.lobatskaya-summary-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.lobatskaya-summary-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content max-content;
  gap: 12px;
  align-items: center;
}

.lobatskaya-summary-row--triple {
  grid-template-columns: minmax(0, 1fr) max-content max-content max-content;
}

.lobatskaya-summary-color {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.lobatskaya-summary-color strong {
  font-size: 16px;
  line-height: 1.1;
}

.lobatskaya-color-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(32, 48, 36, 0.1);
  flex: none;
}

.lobatskaya-color-dot--pink {
  background: #dc93a2;
}

.lobatskaya-color-dot--gray {
  background: #a2a8af;
}

.lobatskaya-color-dot--beige {
  background: #d8c6ad;
}

.lobatskaya-color-dot--turquoise {
  background: #75c0ba;
}

.lobatskaya-summary-metric {
  justify-self: end;
  font-size: 18px;
  font-weight: 900;
  white-space: nowrap;
}

.lobatskaya-summary-extra {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(62, 92, 74, 0.18);
}

.lobatskaya-summary-extra__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 12px;
  align-items: center;
}

.lobatskaya-summary-extra__row strong {
  font-size: 15px;
  line-height: 1.2;
}

.lobatskaya-summary-extra__row span {
  justify-self: end;
  font-size: 16px;
  font-weight: 900;
  white-space: nowrap;
}

.lobatskaya-manage-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
}

.lobatskaya-manage-grid--shipments {
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
}

.lobatskaya-receipt-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: end;
}

.lobatskaya-receipt-date {
  display: grid;
  gap: 6px;
}

.lobatskaya-receipt-date span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.lobatskaya-receipt-date input {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
}

.lobatskaya-editor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.lobatskaya-editor-grid--four {
  grid-template-columns: repeat(4, minmax(220px, 1fr));
}

.lobatskaya-editor-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf8;
  padding: 14px;
  display: grid;
  gap: 12px;
}

.lobatskaya-editor-card--supplies {
  background: #fbfcfb;
}

.lobatskaya-editor-card h5 {
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
}

.lobatskaya-editor-list {
  display: grid;
  gap: 8px;
}

.lobatskaya-editor-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px auto;
  gap: 10px;
  align-items: center;
}

.lobatskaya-editor-row input {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  text-align: right;
}

.lobatskaya-editor-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
  justify-self: end;
}

.lobatskaya-shipment-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lobatskaya-shipment-chip {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(93, 119, 104, 0.18);
  background: #f4f8f5;
}

.lobatskaya-shipment-chip--supply {
  background: #f8fbf8;
}

.lobatskaya-shipment-chip strong {
  font-size: 12px;
}

.lobatskaya-shipment-chip span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.lobatskaya-shipment-box-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.lobatskaya-shipment-box {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(197, 206, 201, 0.95);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f7faf8);
  box-shadow: 0 8px 20px rgba(31, 36, 33, 0.04);
}

.lobatskaya-shipment-box__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.lobatskaya-shipment-box__head strong {
  font-size: 18px;
  line-height: 1.2;
}

.lobatskaya-shipment-box__head span {
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.lobatskaya-shipment-box__source {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.lobatskaya-shipment-box__items {
  display: grid;
  gap: 8px;
}

.lobatskaya-shipment-box__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid rgba(216, 222, 218, 0.9);
}

.lobatskaya-shipment-box__item:first-child {
  padding-top: 0;
  border-top: 0;
}

.lobatskaya-shipment-box__item strong {
  display: block;
  font-size: 14px;
  line-height: 1.3;
}

.lobatskaya-shipment-box__item span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.lobatskaya-shipment-box__item b {
  font-size: 15px;
  white-space: nowrap;
}

.lobatskaya-defect-overview {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(93, 119, 104, 0.18);
  border-radius: 10px;
  background: #f8faf8;
}

.lobatskaya-defect-overview__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.lobatskaya-defect-overview__top strong {
  font-size: 16px;
}

.lobatskaya-defect-overview__top span {
  font-size: 20px;
  font-weight: 900;
}

.lobatskaya-defect-overview__list {
  display: grid;
  gap: 8px;
}

.lobatskaya-defect-overview__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 4px 12px;
  align-items: baseline;
}

.lobatskaya-defect-overview__row strong,
.lobatskaya-defect-overview__row span {
  font-size: 14px;
}

.lobatskaya-defect-overview__row em {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.lobatskaya-defect-sources {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.lobatskaya-defect-source {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid rgba(93, 119, 104, 0.18);
  border-radius: 10px;
  background: #fbfcfb;
}

.lobatskaya-defect-source strong {
  font-size: 15px;
}

.lobatskaya-defect-source span {
  font-size: 20px;
  font-weight: 900;
}

.lobatskaya-defect-source em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.lobatskaya-shipment-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.lobatskaya-shipment-upload {
  display: grid;
  gap: 6px;
  width: min(100%, 460px);
  justify-items: stretch;
}

.lobatskaya-shipment-upload span {
  font-size: 13px;
  font-weight: 800;
}

.lobatskaya-shipment-upload input {
  width: 100%;
}

.lobatskaya-shipment-upload em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  text-align: right;
}

.lobatskaya-shipment-upload-state {
  display: grid;
  gap: 6px;
  width: min(100%, 460px);
  padding: 12px 14px;
  border: 1px solid rgba(80, 120, 100, 0.18);
  border-radius: 8px;
  background: rgba(240, 245, 241, 0.85);
}

.lobatskaya-shipment-upload-state strong {
  font-size: 13px;
  line-height: 1.3;
}

.lobatskaya-shipment-upload-state span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  font-weight: 700;
}

.lobatskaya-workspace .is-file-mode .lobatskaya-shipment-upload-state {
  border-color: rgba(48, 127, 93, 0.35);
  background: rgba(233, 246, 238, 0.95);
  box-shadow: 0 10px 24px rgba(48, 127, 93, 0.08);
}

.lobatskaya-workspace .is-file-mode .lobatskaya-shipment-upload-state strong {
  color: #246b4a;
}

.lobatskaya-shipment-flow {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.lobatskaya-shipment-flow__arrow {
  position: relative;
  width: 44px;
  height: 2px;
  flex: 0 0 44px;
  border-radius: 999px;
  background: rgba(93, 119, 104, 0.55);
}

.lobatskaya-shipment-flow__arrow::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -1px;
  width: 9px;
  height: 9px;
  border-top: 2px solid rgba(93, 119, 104, 0.75);
  border-right: 2px solid rgba(93, 119, 104, 0.75);
  transform: translateY(-50%) rotate(45deg);
}

.lobatskaya-shipment-flow__note {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.lobatskaya-receipt-archive {
  display: grid;
  gap: 10px;
}

.lobatskaya-receipt-record {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.lobatskaya-receipt-record + .lobatskaya-receipt-record {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.lobatskaya-receipt-record__meta {
  display: grid;
  gap: 4px;
}

.lobatskaya-receipt-record__meta strong {
  font-size: 15px;
}

.lobatskaya-receipt-record__meta span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.lobatskaya-receipt-update {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.lobatskaya-receipt-comment {
  display: grid;
  gap: 6px;
}

.lobatskaya-receipt-comment span,
.lobatskaya-receipt-update__head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.lobatskaya-receipt-comment textarea {
  min-height: 84px;
  resize: vertical;
}

.lobatskaya-receipt-update__head {
  display: grid;
  gap: 4px;
}

.lobatskaya-receipt-update__head strong {
  font-size: 15px;
}

.lobatskaya-editor-card--defect {
  background: #fffaf6;
}

.lobatskaya-receipt-update__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.lobatskaya-receipt-update__footer .hint {
  margin: 0;
}

.underwear-summary-card--packed .underwear-summary-card__top,
.underwear-summary-card--shipments .underwear-summary-card__top,
.underwear-summary-card--stock-mini .underwear-summary-card__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  width: 100%;
}

.underwear-summary-card--packed .underwear-summary-total--columns,
.underwear-summary-card--shipments .underwear-summary-total--columns,
.underwear-summary-card--stock-mini .underwear-summary-total--columns {
  justify-self: end;
}

.underwear-packed-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  width: 100%;
}

.underwear-packed-row {
  display: grid;
  grid-template-columns: max-content minmax(32px, 84px) max-content;
  gap: 0;
  align-items: center;
  width: fit-content;
  max-width: 100%;
}

.underwear-packed-leader {
  min-width: 32px;
  border-bottom: 1px dashed rgba(62, 92, 74, 0.28);
  transform: translateY(1px);
  margin: 0 10px 0 16px;
}

.underwear-packed-values {
  display: grid;
  grid-template-columns: var(--underwear-summary-column-width) minmax(var(--underwear-summary-gap-width), 1fr) var(--underwear-summary-column-width);
  align-items: center;
  justify-self: end;
}

.underwear-packed-values--single {
  grid-template-columns: var(--underwear-summary-column-width);
  min-width: var(--underwear-summary-column-width);
}

.underwear-summary-card--packed .underwear-packed-row,
.underwear-summary-card--shipments .underwear-packed-row,
.underwear-summary-card--stock-mini .underwear-packed-row {
  grid-template-columns: max-content minmax(24px, 1fr) max-content;
  width: 100%;
}

.underwear-summary-card--packed .underwear-packed-values,
.underwear-summary-card--shipments .underwear-packed-values,
.underwear-summary-card--stock-mini .underwear-packed-values {
  min-width: calc((var(--underwear-summary-column-width) * 2) + var(--underwear-summary-gap-width));
}

.underwear-packed-cell {
  min-width: var(--underwear-summary-column-width);
  padding-left: 0;
  display: flex;
  justify-content: flex-end;
  text-align: right;
}

.underwear-packed-cell--single {
  grid-column: 1;
}

.underwear-packed-metric {
  display: grid;
  grid-template-columns: max-content max-content;
  align-items: baseline;
  justify-content: end;
  gap: 8px;
  white-space: nowrap;
  min-width: var(--underwear-summary-column-width);
}

.underwear-packed-metric--split {
  grid-template-columns: max-content;
  gap: 2px;
}

.underwear-packed-metric--split strong,
.underwear-packed-metric--split span {
  justify-self: end;
  text-align: right;
}

.underwear-packed-midline {
  display: block;
  min-width: 24px;
  width: 100%;
  border-bottom: 1px dashed rgba(62, 92, 74, 0.28);
  transform: translateY(1px);
  position: relative;
}

.underwear-packed-midline::before {
  content: "";
  position: absolute;
  left: 18px;
  top: -9px;
  bottom: -9px;
  border-left: 1px dashed rgba(62, 92, 74, 0.28);
}

.underwear-packed-cell--available {
  padding-left: 0;
}

.underwear-packed-list {
  display: grid;
  gap: 8px;
}

.underwear-manage-grid {
  display: grid;
  grid-template-columns: minmax(520px, 1.2fr) minmax(360px, 0.9fr);
  gap: 16px;
  align-items: start;
}

.underwear-manage-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
  display: grid;
  gap: 14px;
}

.underwear-manage-card__head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.underwear-manage-card__head h4 {
  margin: 0;
  font-size: 20px;
  line-height: 1.1;
}

.underwear-manage-card__head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.underwear-manage-card__head p:first-child {
  margin-top: 0;
}

.underwear-baul-receipt-card {
  margin-bottom: 4px;
}

.underwear-baul-receipt-actions {
  justify-content: flex-end;
}

.underwear-baul-receipt-batch,
.underwear-baul-receipt-qty {
  display: grid;
  gap: 4px;
}

.underwear-baul-receipt-batch span,
.underwear-baul-receipt-qty span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.underwear-baul-receipt-batch input,
.underwear-baul-receipt-qty input {
  min-width: 0;
}

.underwear-baul-receipt-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.underwear-baul-receipt-row {
  display: grid;
  grid-template-columns: minmax(74px, max-content) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.underwear-baul-receipt-row__field {
  display: grid;
  gap: 6px;
}

.underwear-baul-receipt-row__meta {
  display: grid;
  grid-template-columns: minmax(0, 160px) minmax(0, 1fr);
  gap: 10px;
  align-items: end;
}

.underwear-baul-receipt-row textarea {
  min-height: 62px;
  resize: vertical;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  line-height: 1.35;
}

.underwear-baul-receipt-row textarea:focus {
  outline: none;
  border-color: rgba(38, 119, 97, 0.45);
  box-shadow: 0 0 0 3px rgba(38, 119, 97, 0.08);
}

.underwear-baul-receipt-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.underwear-baul-receipt-row__existing {
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.underwear-baul-receipt-row__hint {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}

.underwear-baul-receipt-archive__items {
  display: grid;
  gap: 6px;
}

.underwear-baul-receipt-archive__row {
  display: grid;
  grid-template-columns: minmax(76px, max-content) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding-top: 6px;
  border-top: 1px dashed rgba(124, 144, 133, 0.22);
}

.underwear-baul-receipt-archive__row:first-child {
  padding-top: 0;
  border-top: 0;
}

.underwear-baul-receipt-archive__row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.underwear-baul-receipt-archive__row strong {
  font-size: 13px;
  line-height: 1.35;
}

.underwear-manage-table {
  display: grid;
  gap: 10px;
}

.underwear-manage-card--stock .underwear-manage-table {
  gap: 0;
}

.underwear-manage-stock-rows {
  display: grid;
  gap: 0;
}

.underwear-manage-table__head,
.underwear-manage-row {
  display: grid;
  grid-template-columns: minmax(110px, max-content) minmax(120px, 150px) minmax(140px, max-content);
  gap: 14px;
  align-items: center;
}

.underwear-manage-table:not(.underwear-manage-table--correction) .underwear-manage-table__head,
.underwear-manage-table:not(.underwear-manage-table--correction) .underwear-manage-row {
  grid-template-columns: minmax(110px, max-content) minmax(120px, 150px) minmax(140px, max-content) minmax(210px, 1fr);
}

.underwear-manage-table--correction .underwear-manage-table__head,
.underwear-manage-table--correction .underwear-manage-row {
  grid-template-columns: minmax(110px, max-content) minmax(120px, 150px) minmax(100px, 128px) minmax(140px, max-content);
}

.underwear-manage-table__head {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.underwear-manage-table__head-label {
  display: block;
}

.underwear-manage-table__head-label strong,
.underwear-manage-table__head-label small {
  display: block;
  font: inherit;
}

.underwear-manage-table__head-label small {
  margin-top: 2px;
}

.underwear-manage-table__head-label--stock-total {
  justify-self: end;
  text-align: right;
}

.underwear-manage-row--stock {
  min-height: 38px;
  padding: 0 0 8px;
  border-bottom: 1px solid rgba(201, 208, 202, 0.65);
}

.underwear-manage-row--stock .underwear-manage-size {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.underwear-manage-row--stock .underwear-manage-size strong {
  font-size: 16px;
}

.underwear-manage-row--stock .underwear-manage-size span {
  white-space: nowrap;
  font-size: 12px;
}

.underwear-manage-row--stock:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.underwear-manage-size {
  display: grid;
  gap: 2px;
}

.underwear-manage-size strong {
  font-size: 18px;
  line-height: 1;
}

.underwear-manage-size span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.underwear-manage-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.underwear-manage-field input,
.underwear-shipment-manual-row input,
.underwear-shipment-form-grid input,
.underwear-shipment-form-grid select {
  width: 100%;
  max-width: 110px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
}

.underwear-manage-field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.underwear-manage-field--boxes input {
  max-width: 88px;
}

.underwear-shipment-form-grid input,
.underwear-shipment-form-grid select {
  max-width: none;
}

.underwear-manage-value {
  display: grid;
  gap: 2px;
  justify-items: start;
  white-space: nowrap;
}

.underwear-manage-value strong {
  font-size: 18px;
  font-weight: 900;
}

.underwear-manage-value small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.underwear-manage-value--negative {
  color: var(--accent-2);
}

.underwear-manage-value--stock-total {
  justify-self: end;
  text-align: right;
}

.underwear-manage-value--stock-total,
.underwear-manage-value[data-underwear-fact-available] {
  justify-items: end;
}

.underwear-packed-correction {
  border-color: rgba(62, 92, 74, 0.24);
  background: var(--surface);
}

.underwear-packed-correction__body {
  padding: 0 14px 14px;
  display: grid;
  gap: 12px;
}

.underwear-packed-correction__actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.underwear-stock-ledger,
.underwear-packed-audit {
  margin: 0 14px 14px;
  border: 1px solid rgba(88, 177, 154, 0.18);
  border-radius: 8px;
  background: rgba(8, 18, 16, 0.16);
  padding: 12px;
}

.underwear-stock-ledger strong,
.underwear-packed-audit__head strong {
  display: block;
  color: var(--text);
  font-size: 0.95rem;
}

.underwear-stock-ledger span,
.underwear-packed-audit__head span,
.underwear-packed-audit__row span {
  color: var(--muted);
  font-weight: 700;
}

.underwear-stock-ledger.is-alert {
  border-color: rgba(206, 107, 83, 0.48);
  background: rgba(206, 107, 83, 0.08);
}

.underwear-stock-ledger.is-ok strong {
  color: var(--accent-2);
}

.underwear-packed-audit {
  display: grid;
  gap: 10px;
}

.underwear-packed-audit__head,
.underwear-packed-audit__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.underwear-packed-audit__list {
  display: grid;
  gap: 8px;
}

.underwear-packed-audit__row {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding-top: 8px;
}

.underwear-packed-audit__row strong {
  text-align: right;
}

.underwear-manage-row--edit .underwear-manage-field input {
  background: transparent;
}

.underwear-shipment-create {
  border: 1px solid rgba(38, 119, 97, 0.2);
  border-radius: 8px;
  background: rgba(38, 119, 97, 0.05);
}

.underwear-shipment-create summary {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  justify-items: start;
  column-gap: 8px;
  cursor: pointer;
  list-style: none;
  padding: 10px 12px;
  color: var(--green);
  font-size: 16px;
  font-weight: 900;
  text-align: left;
}

.underwear-shipment-create summary::-webkit-details-marker {
  display: none;
}

.underwear-shipment-create summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 0;
}

.underwear-shipment-create__label {
  justify-self: start;
  margin-right: auto;
}

.underwear-shipment-create__save {
  justify-self: end;
}

.underwear-shipment-create[open] summary::before {
  content: "▾";
}

.underwear-shipment-create__body {
  padding: 0 12px 12px;
  display: grid;
  gap: 12px;
}

.underwear-shipment-create__mode {
  display: grid;
  gap: 2px;
}

.underwear-shipment-create__mode strong {
  font-size: 13px;
  color: var(--ink);
}

.underwear-shipment-create__mode span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.underwear-shipment-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.underwear-shipment-form-grid label {
  display: grid;
  gap: 6px;
}

.underwear-shipment-pickup-wrap.is-required span {
  color: var(--green);
}

.underwear-shipment-pickup-wrap[hidden] {
  display: none;
}

.underwear-shipment-direction-wrap[hidden] {
  display: none;
}

.underwear-shipment-pickup-wrap.is-required input {
  border-color: rgba(46, 127, 102, 0.45);
  box-shadow: 0 0 0 2px rgba(46, 127, 102, 0.08);
}

.underwear-shipment-form-grid span,
.underwear-shipment-manual h5 {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.underwear-shipment-manual-list {
  display: grid;
  gap: 8px;
}

.underwear-shipment-manual-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.underwear-shipment-manual-row span {
  font-size: 14px;
  font-weight: 800;
}

.underwear-shipment-manual-row small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.underwear-shipment-manual-fields {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

.underwear-shipment-manual-fields .underwear-manage-field input {
  max-width: 92px;
}

.underwear-shipment-suggestions {
  grid-column: 1 / -1;
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 0 0 0;
}

.underwear-shipment-warning {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(189, 79, 70, 0.22);
  border-radius: 8px;
  background: rgba(189, 79, 70, 0.06);
}

.underwear-shipment-warning[hidden] {
  display: none;
}

.underwear-shipment-warning strong {
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 900;
}

.underwear-shipment-warning span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.underwear-shipment-warning button {
  justify-self: start;
}

.underwear-shipment-manual-row:focus-within .underwear-shipment-suggestions {
  display: flex;
}

.underwear-shipment-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.underwear-shipment-records {
  display: grid;
  gap: 10px;
}

.underwear-shipment-record {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 10px 12px;
  display: grid;
  gap: 6px;
}

.underwear-shipment-record--archived {
  background: var(--surface);
}

.underwear-shipment-record__top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.underwear-shipment-record__actions {
  display: grid;
  gap: 6px;
  justify-items: end;
}

.underwear-shipment-identifiers {
  border: 1px solid rgba(46, 127, 102, 0.2);
  border-radius: 8px;
  background: rgba(46, 127, 102, 0.04);
}

.underwear-shipment-identifiers__body {
  padding: 0 14px 14px;
  display: grid;
  gap: 10px;
}

.underwear-identifier-list {
  display: grid;
  gap: 8px;
}

.underwear-identifier-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 10px 12px;
}

.underwear-identifier-item strong {
  display: block;
  font-size: 14px;
  color: var(--ink);
}

.underwear-identifier-item small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.underwear-identifier-build,
.underwear-identifier-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
}

.underwear-identifier-result {
  display: grid;
  gap: 8px;
}

.underwear-identifier-result textarea {
  min-height: 180px;
  resize: vertical;
}

.underwear-kiz-shk {
  gap: 14px;
}

.underwear-kiz-shk-upload__row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) max-content;
  gap: 12px;
  align-items: end;
}

.underwear-kiz-shk-mode-switch {
  min-width: 64px;
  justify-content: center;
}

.underwear-kiz-shk-upload__row label {
  display: grid;
  gap: 6px;
}

.underwear-kiz-shk-upload__row label > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.underwear-kiz-shk-upload__file input {
  width: 100%;
}

.underwear-kiz-shk-upload__file input::file-selector-button {
  min-height: 32px;
  margin: 0 10px 0 0;
  border: 1px solid var(--ink);
  border-radius: 6px;
  background: var(--ink);
  color: var(--surface);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.underwear-kiz-shk-upload__file input::-webkit-file-upload-button {
  min-height: 32px;
  margin: 0 10px 0 0;
  border: 1px solid var(--ink);
  border-radius: 6px;
  background: var(--ink);
  color: var(--surface);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.underwear-kiz-shk-queue .underwear-manage-card__head > strong {
  align-self: start;
  min-width: 48px;
  min-height: 48px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(38, 119, 97, 0.24);
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--accent);
  font-size: 22px;
  font-weight: 900;
}

.underwear-kiz-drive .underwear-manage-card__head > strong,
.underwear-kiz-docs .underwear-manage-card__head > strong {
  align-self: start;
  min-width: 64px;
  min-height: 42px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(38, 119, 97, 0.24);
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--accent);
  font-size: 14px;
  font-weight: 900;
}

.underwear-kiz-folder-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(112px, 1fr));
  gap: 10px;
}

.underwear-kiz-folder {
  min-height: 112px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 12px;
  display: grid;
  align-content: start;
  gap: 8px;
  cursor: copy;
  transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

.underwear-kiz-folder.is-drop-target,
.underwear-kiz-folder-section.is-drop-target {
  border-color: var(--accent);
  background: var(--green-soft);
  box-shadow: 0 0 0 3px rgba(38, 119, 97, 0.12);
}

.underwear-kiz-folder.is-active {
  border-color: var(--accent);
  background: var(--green-soft);
  box-shadow: inset 0 0 0 2px rgba(38, 119, 97, 0.14);
}

.underwear-kiz-folder__icon {
  width: 42px;
  height: 30px;
  border: 1px solid rgba(38, 119, 97, 0.35);
  border-radius: 5px;
  background: linear-gradient(180deg, rgba(38, 119, 97, 0.18), rgba(38, 119, 97, 0.05));
  position: relative;
}

.underwear-kiz-folder__icon::before {
  content: "";
  position: absolute;
  left: 4px;
  top: -7px;
  width: 18px;
  height: 8px;
  border: 1px solid rgba(38, 119, 97, 0.35);
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
  background: var(--surface-2);
}

.underwear-kiz-folder strong {
  display: block;
  font-size: 18px;
  line-height: 1.1;
}

.underwear-kiz-folder span,
.underwear-kiz-folder em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.underwear-kiz-inbox {
  display: grid;
  gap: 10px;
}

.underwear-kiz-inbox-card .underwear-manage-card__head > strong {
  align-self: start;
  min-width: 58px;
  min-height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(38, 119, 97, 0.24);
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--accent);
  font-weight: 900;
}

.underwear-kiz-inbox-actions {
  align-self: start;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.underwear-kiz-head-actions {
  align-self: start;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.underwear-kiz-head-actions > strong {
  min-width: 64px;
  min-height: 42px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(38, 119, 97, 0.24);
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--accent);
  font-size: 14px;
  font-weight: 900;
}

.underwear-kiz-trash-button {
  min-width: 36px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding-inline: 9px;
  color: #c45f58;
}

.underwear-kiz-trash-button svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  pointer-events: none;
}

.underwear-kiz-trash-button:not(.underwear-kiz-trash-button--selected) {
  width: 36px;
  padding-inline: 0;
}

.underwear-kiz-trash-button--selected {
  border-color: rgba(189, 79, 70, 0.42);
  background: rgba(189, 79, 70, 0.08);
}

.underwear-kiz-pending-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 10px;
}

.underwear-kiz-tile {
  position: relative;
  min-width: 0;
  min-height: 132px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 10px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 7px;
  text-align: center;
  user-select: none;
}

.underwear-kiz-tile:hover,
.underwear-kiz-tile:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(38, 119, 97, 0.12);
  outline: none;
}

.underwear-kiz-tile.is-selected {
  border-color: var(--accent);
  background: var(--green-soft);
  box-shadow: inset 0 0 0 2px rgba(38, 119, 97, 0.12);
}

.underwear-kiz-tile__preview {
  width: 100%;
  min-height: 100%;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 7px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  box-shadow: none;
  cursor: zoom-in;
}

.underwear-kiz-tile__preview:hover,
.underwear-kiz-tile__preview:focus-visible {
  background: transparent;
  color: inherit;
  filter: none;
  outline: none;
  box-shadow: none;
}

.underwear-kiz-tile > .underwear-kiz-trash-button {
  position: absolute;
  top: 7px;
  right: 7px;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.underwear-kiz-tile:hover > .underwear-kiz-trash-button,
.underwear-kiz-tile:focus-within > .underwear-kiz-trash-button,
.underwear-kiz-tile.is-selected > .underwear-kiz-trash-button {
  opacity: 1;
  transform: translateY(0);
}

.underwear-kiz-tile__icon {
  width: 58px;
  min-height: 58px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(189, 79, 70, 0.26);
  border-radius: 8px;
  background: rgba(189, 79, 70, 0.08);
  color: var(--accent-2);
  font-size: 14px;
  font-weight: 950;
}

.underwear-kiz-tile.is-recognized .underwear-kiz-tile__icon {
  border-color: rgba(38, 119, 97, 0.36);
  background: var(--green-soft);
  color: var(--accent);
}

.underwear-kiz-tile.is-unrecognized .underwear-kiz-tile__icon {
  border-color: rgba(189, 79, 70, 0.34);
  background: rgba(189, 79, 70, 0.1);
}

.underwear-kiz-tile strong {
  max-width: 100%;
  overflow: hidden;
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.underwear-kiz-tile small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
}

.underwear-kiz-inbox__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.underwear-kiz-folder-sections {
  display: grid;
  gap: 10px;
}

.underwear-kiz-folder-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  overflow: clip;
}

.underwear-kiz-folder-section summary {
  min-height: 48px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

.underwear-kiz-folder-section summary::-webkit-details-marker {
  display: none;
}

.underwear-kiz-folder-section summary span {
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
}

.underwear-kiz-folder-section summary em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.underwear-kiz-folder-section summary strong {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.underwear-kiz-doc-list {
  display: grid;
  gap: 8px;
  padding: 0 12px 12px;
}

.underwear-kiz-doc-list--grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  padding: 0;
}

.underwear-kiz-file {
  min-width: 0;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) minmax(0, max-content);
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 10px;
  user-select: none;
}

.underwear-kiz-file[draggable="true"] {
  cursor: grab;
}

.underwear-kiz-file.is-selected {
  border-color: var(--accent);
  background: var(--green-soft);
  box-shadow: inset 0 0 0 2px rgba(38, 119, 97, 0.12);
}

.underwear-kiz-file.is-dragging {
  opacity: 0.62;
}

.underwear-kiz-file.is-archived {
  background: var(--surface);
}

.underwear-kiz-file__icon {
  width: 42px;
  min-height: 42px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(189, 79, 70, 0.26);
  border-radius: 8px;
  background: rgba(189, 79, 70, 0.08);
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 900;
}

.underwear-kiz-file__body {
  min-width: 0;
}

.underwear-kiz-file__body strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  line-height: 1.2;
}

.underwear-kiz-file__body span {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.underwear-kiz-file__actions {
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  justify-content: flex-end;
}

.underwear-kiz-file__actions .compact-button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.underwear-kiz-selection-rect {
  position: fixed;
  z-index: 9999;
  border: 1px solid var(--accent);
  background: rgba(38, 119, 97, 0.14);
  pointer-events: none;
}

.underwear-kiz-preview {
  position: fixed;
  inset: 0;
  z-index: 12000;
  background: rgba(0, 0, 0, 0.72);
  padding: 24px;
  display: grid;
  place-items: center;
}

.underwear-kiz-preview__panel {
  width: min(980px, 100%);
  height: min(860px, calc(100vh - 48px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.underwear-kiz-preview__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
}

.underwear-kiz-preview__head strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  font-weight: 950;
}

.underwear-kiz-preview__head span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.underwear-kiz-preview iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--surface-2);
}

.underwear-kiz-shk-list {
  display: grid;
  gap: 10px;
}

.underwear-kiz-shk-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.underwear-kiz-shk-item.is-archived {
  background: var(--surface);
}

.underwear-kiz-shk-item__main {
  min-width: 0;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.underwear-kiz-shk-item__badge {
  min-height: 42px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(38, 119, 97, 0.26);
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

.underwear-kiz-shk-item strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  line-height: 1.2;
}

.underwear-kiz-shk-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.underwear-kiz-shk-item__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.underwear-shipment-record__top strong {
  display: block;
  font-size: 15px;
}

.underwear-shipment-record__top span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.underwear-shipment-record__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.underwear-shipment-layout-item {
  display: grid;
  grid-template-columns: auto auto;
  gap: 8px;
  align-items: center;
}

.underwear-shipment-layout-size {
  font-size: 13px;
  font-weight: 900;
  color: var(--ink);
}

.underwear-shipment-layout-meta {
  display: grid;
  gap: 2px;
  min-width: 72px;
}

.underwear-shipment-layout-meta strong,
.underwear-shipment-layout-meta span {
  display: block;
  line-height: 1.1;
}

.underwear-shipment-layout-meta strong {
  font-size: 12px;
  color: var(--ink);
}

.underwear-shipment-layout-meta span {
  font-size: 12px;
  color: var(--muted);
}

.underwear-invoice-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.9fr);
  gap: 16px;
  align-items: start;
}

.underwear-invoice-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
  display: grid;
  gap: 12px;
}

.underwear-invoice-hub-note {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 16px;
  display: grid;
  gap: 12px;
}

.underwear-invoice-hub-note p {
  margin: 0;
  color: var(--muted);
}

.underwear-invoice-hub-note button {
  justify-self: start;
}

.underwear-invoice-card .section-title {
  margin: 0;
}

.underwear-invoice-card .section-title h3 {
  margin: 0;
  font-size: 20px;
}

.underwear-invoice-card .section-title p {
  margin: 4px 0 0;
}

.underwear-invoice-totals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.underwear-invoice-total-card {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  width: 100%;
  text-align: left;
  color: inherit;
  font: inherit;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.underwear-invoice-total-card:hover {
  border-color: var(--line-strong);
}

.underwear-invoice-total-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.underwear-invoice-total-card.is-active {
  border-color: var(--accent);
  background: var(--green-soft);
  box-shadow: inset 0 0 0 1px rgba(38, 119, 97, 0.12);
}

.underwear-invoice-total-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.underwear-invoice-total-card b {
  font-size: 28px;
  line-height: 1.06;
}

.underwear-invoice-breakdown {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
}

.underwear-invoice-breakdown--hint {
  background: var(--surface-2);
}

.underwear-invoice-breakdown__head,
.underwear-invoice-breakdown__footer,
.underwear-invoice-breakdown__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.underwear-invoice-breakdown__head {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.underwear-invoice-breakdown__head strong,
.underwear-invoice-breakdown__meta strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
}

.underwear-invoice-breakdown__head span,
.underwear-invoice-breakdown__meta small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.underwear-invoice-breakdown__meta-alert {
  color: var(--accent-2);
  font-weight: 800;
}

.underwear-invoice-breakdown__list {
  display: grid;
  gap: 8px;
}

.underwear-invoice-breakdown__row {
  padding: 8px 0;
  border-bottom: 1px solid rgba(201, 208, 202, 0.55);
}

.underwear-invoice-breakdown__row:last-child {
  border-bottom: 0;
}

.underwear-invoice-breakdown__meta {
  min-width: 0;
}

.underwear-invoice-breakdown__footer {
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.underwear-invoice-breakdown__footer span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.underwear-invoice-subsection h4 {
  margin: 0;
  font-size: 16px;
}

.underwear-invoice-subsection p {
  margin: 4px 0 0;
}

.underwear-invoice-table th,
.underwear-invoice-table td {
  vertical-align: top;
  padding: 7px 9px;
  line-height: 1.2;
}

.underwear-invoice-title {
  display: grid;
  gap: 1px;
}

.underwear-invoice-title strong {
  color: var(--ink);
  font-size: 13px;
}

.underwear-invoice-title small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.underwear-invoice-logistics {
  display: grid;
  grid-template-columns: minmax(88px, 110px) auto;
  gap: 6px;
  align-items: center;
}

.underwear-invoice-logistics input {
  min-height: 32px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
}

.receiving-report-meta {
  display: grid;
  gap: 2px;
}

.receiving-report-meta strong {
  font-size: 13px;
}

.receiving-report-meta span,
.receiving-charges-hint {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.receiving-logistics-cell {
  min-width: 118px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.receiving-logistics-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.receiving-logistics-check__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.receiving-logistics-check__box {
  width: 24px;
  height: 24px;
  border: 2px solid var(--accent);
  border-radius: 6px;
  background: var(--surface);
  position: relative;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.receiving-logistics-check__input:checked + .receiving-logistics-check__box {
  background: var(--accent);
  border-color: var(--accent);
}

.receiving-logistics-check__input:checked + .receiving-logistics-check__box::after {
  content: '';
  position: absolute;
  left: 7px;
  top: 2px;
  width: 5px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.receiving-logistics-check__input:focus-visible + .receiving-logistics-check__box {
  box-shadow: 0 0 0 3px rgba(42, 127, 98, 0.18);
}

.receiving-logistics-check__input:disabled + .receiving-logistics-check__box {
  opacity: 0.55;
  cursor: progress;
}

.underwear-invoice-payments {
  display: grid;
  gap: 12px;
}

.underwear-invoice-payment-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.underwear-invoice-payment-form label {
  display: grid;
  gap: 6px;
}

.underwear-invoice-payment-form span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.underwear-invoice-payment-form input {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
}

.underwear-invoice-payment-form__comment {
  grid-column: 1 / -1;
  min-width: 0;
}

.underwear-invoice-payment-form button {
  grid-column: 2;
  justify-self: end;
  min-width: 220px;
}

.underwear-invoice-payment-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(38, 119, 97, 0.14);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
}

.underwear-invoice-payment-actions__note {
  display: grid;
  gap: 4px;
}

.underwear-invoice-payment-actions__note strong {
  color: var(--ink);
  font-size: 14px;
}

.underwear-invoice-payment-actions__note span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.underwear-invoice-logistics--readonly {
  grid-template-columns: 1fr;
}

.underwear-invoice-logistics--readonly span {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 6px 0;
  font-weight: 700;
}

.underwear-invoice-subsection--slices {
  gap: 10px;
}

.underwear-invoice-archive-head h4 {
  margin: 0;
  font-size: 16px;
}

.underwear-invoice-archive-head p {
  margin: 4px 0 0;
}

.underwear-invoice-slices {
  display: grid;
  gap: 10px;
}

.underwear-invoice-slice {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.underwear-invoice-slice[open] {
  box-shadow: var(--shadow-soft);
}

.underwear-invoice-slice__summary {
  list-style: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px;
  cursor: pointer;
}

.underwear-invoice-slice__summary::-webkit-details-marker {
  display: none;
}

.underwear-invoice-slice__summary-main,
.underwear-invoice-slice__summary-side {
  display: grid;
  gap: 4px;
}

.underwear-invoice-slice__summary-main strong,
.underwear-invoice-slice__summary-side strong {
  color: var(--ink);
  font-size: 14px;
}

.underwear-invoice-slice__summary-main small,
.underwear-invoice-slice__summary-side small,
.underwear-invoice-slice__meta span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.underwear-invoice-slice__summary-side {
  justify-items: end;
  text-align: right;
}

.underwear-invoice-slice__body {
  display: grid;
  gap: 12px;
  padding: 0 12px 12px;
  border-top: 1px solid var(--line);
}

.underwear-invoice-slice__totals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding-top: 12px;
}

.underwear-invoice-slice__total {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.underwear-invoice-slice__total span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.underwear-invoice-slice__total b {
  font-size: 22px;
  line-height: 1.05;
}

.underwear-invoice-slice__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.underwear-tempo {
  display: grid;
  gap: 12px;
}

.underwear-tempo__summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 2px;
}

.underwear-tempo__metric {
  display: grid;
  gap: 4px;
  padding: 12px 12px 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.underwear-tempo__metric--green-head {
  border-color: rgba(38, 119, 97, 0.14);
  background: linear-gradient(180deg, rgba(38, 119, 97, 0.08), var(--surface));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.underwear-tempo__metric span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.underwear-tempo__metric strong {
  color: var(--ink);
  font-size: 24px;
  line-height: 1.08;
}

.underwear-tempo__metric--alert {
  border-color: rgba(150, 46, 46, 0.22);
  background: rgba(150, 46, 46, 0.04);
}

.underwear-tempo-shortage {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(150, 46, 46, 0.22);
  border-radius: 8px;
  background: rgba(150, 46, 46, 0.05);
}

.underwear-tempo-shortage__head,
.underwear-tempo-week__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.underwear-tempo-week__head {
  grid-template-columns: 1fr;
  align-items: start;
}

.underwear-tempo-shortage__head strong,
.underwear-tempo-week__title strong {
  display: block;
  color: var(--ink);
  line-height: 1.05;
}

.underwear-tempo-shortage__head strong {
  font-size: 18px;
  font-weight: 900;
}

.underwear-tempo-shortage__head span,
.underwear-tempo-week__title span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.underwear-tempo-shortage__head > span {
  text-align: right;
}

.underwear-tempo-shortage__list,
.underwear-tempo-week-list,
.underwear-tempo-week,
.underwear-tempo-week__list {
  display: grid;
  gap: 14px;
}

.underwear-tempo-shortage__row {
  display: grid;
  gap: 4px;
  padding-top: 10px;
  border-top: 1px solid rgba(150, 46, 46, 0.15);
}

.underwear-tempo-shortage__row:first-child {
  padding-top: 0;
  border-top: 0;
}

.underwear-tempo-shortage__row strong,
.underwear-tempo-shortage__row em {
  color: #962e2e;
  font-size: 14px;
  font-style: normal;
}

.underwear-tempo-shortage__row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.underwear-tempo-week + .underwear-tempo-week {
  padding-top: 0;
  border-top: 0;
}

.underwear-tempo-week {
  padding: 18px;
  border: 1px solid rgba(32, 35, 33, 0.08);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--surface), var(--surface-2) 78%);
}

.underwear-tempo-week__content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 340px);
  gap: 18px;
  align-items: start;
}

.underwear-tempo-week__aside {
  position: sticky;
  top: 14px;
  align-self: start;
}

.underwear-tempo-week__aside .underwear-tempo-summary {
  width: 100%;
}

.underwear-tempo-week__title strong {
  font-size: 30px;
  font-weight: 900;
}

.underwear-tempo-week__title span {
  font-size: 15px;
  font-weight: 800;
}

.underwear-tempo-card {
  display: grid;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 20px rgba(31, 36, 33, 0.04);
}

.underwear-tempo-card--alert {
  border-color: rgba(150, 46, 46, 0.22);
  background: linear-gradient(180deg, rgba(150, 46, 46, 0.05), var(--surface) 36%);
}

.underwear-tempo-card__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, max-content);
  gap: 16px;
  align-items: start;
}

.underwear-tempo-card__head strong,
.underwear-tempo-card__result b {
  display: block;
  font-size: 16px;
}

.underwear-tempo-card__head span,
.underwear-tempo-card__result small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.underwear-tempo-card__result {
  text-align: right;
}

.underwear-tempo-card__shipments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.underwear-tempo-card__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 310px);
  gap: 16px;
  align-items: start;
}

.underwear-tempo-card__shipment {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(201, 208, 202, 0.75);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.underwear-tempo-table-wrap {
  max-width: none;
  width: 100%;
}

.underwear-tempo-table {
  width: 100%;
  min-width: 620px;
}

.underwear-tempo-table th,
.underwear-tempo-table td {
  padding: 8px 10px;
  white-space: nowrap;
}

.underwear-tempo-table th:first-child,
.underwear-tempo-table td:first-child {
  white-space: normal;
  min-width: 110px;
}

.underwear-tempo-table tfoot th,
.underwear-tempo-table tfoot td {
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}

.underwear-tempo-table__row--alert td {
  background: rgba(150, 46, 46, 0.04);
}

.underwear-tempo-summary {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(38, 119, 97, 0.12);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  box-shadow: var(--shadow-soft);
}

.underwear-tempo-summary--ok {
  background: rgba(38, 119, 97, 0.05);
  border-color: rgba(38, 119, 97, 0.14);
}

.underwear-tempo-summary--weekly {
  border-color: rgba(32, 35, 33, 0.1);
  background: linear-gradient(180deg, var(--surface), var(--bg));
}

.underwear-tempo-summary__hero {
  display: grid;
  gap: 8px;
  justify-items: end;
  padding: 16px 18px;
  border: 1px solid rgba(38, 119, 97, 0.12);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
}

.underwear-tempo-summary__hero--alert {
  border-color: rgba(150, 46, 46, 0.16);
  background: linear-gradient(180deg, rgba(150, 46, 46, 0.06), var(--surface));
}

.underwear-tempo-summary__hero span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-align: right;
  text-transform: uppercase;
}

.underwear-tempo-summary__hero strong {
  color: var(--ink);
  font-size: 34px;
  font-weight: 900;
  line-height: 1.05;
  text-align: right;
}

.underwear-tempo-summary__head {
  display: grid;
  gap: 8px;
}

.underwear-tempo-summary__eyebrow,
.underwear-tempo-summary--ok .underwear-tempo-summary__eyebrow {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.underwear-tempo-summary__eyebrow--subtle {
  margin-top: -4px;
  font-size: 11px;
  opacity: 0.86;
}

.underwear-tempo-summary__head strong,
.underwear-tempo-summary__row strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
}

.underwear-tempo-summary__total {
  display: block;
  font-size: 26px;
  font-weight: 900;
  line-height: 1.08;
}

.underwear-tempo-summary__total--ok {
  font-size: 22px;
}

.underwear-tempo-summary__list {
  display: grid;
  gap: 10px;
  padding-top: 2px;
}

.underwear-tempo-summary__costs {
  display: grid;
  gap: 10px;
}

.underwear-tempo-summary__cost {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgba(201, 208, 202, 0.7);
  border-radius: 8px;
  background: var(--surface);
}

.underwear-tempo-summary__cost span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.underwear-tempo-summary__cost strong {
  color: var(--ink);
  font-size: 28px;
  line-height: 1.05;
}

.underwear-tempo-summary__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: baseline;
  padding-top: 10px;
  border-top: 1px solid rgba(201, 208, 202, 0.65);
}

.underwear-tempo-summary__row:first-child {
  padding-top: 0;
  border-top: 0;
}

.underwear-tempo-summary__row span,
.underwear-tempo-summary__row em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.underwear-daily-pack-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px 20px;
  align-items: end;
  margin-bottom: 12px;
}

.underwear-daily-pack-head__title {
  display: grid;
  gap: 6px;
  align-self: center;
}

.underwear-daily-pack-head__eyebrow {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.3;
  font-weight: 900;
}

.underwear-daily-pack-head__title p {
  margin: 0;
  max-width: 520px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 700;
}

.underwear-daily-pack-head__actions {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.underwear-daily-pack-head label {
  display: grid;
  gap: 6px;
  min-width: 220px;
}

.underwear-daily-pack-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.underwear-daily-pack-head input {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
}

.underwear-daily-packing-cell {
  text-align: right;
}

.underwear-daily-packing-fields {
  display: inline-grid;
  grid-template-columns: repeat(2, max-content);
  gap: 10px;
  align-items: center;
  justify-content: end;
}

.underwear-daily-packing-input {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.underwear-daily-packing-input input {
  width: 88px;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
}

.underwear-daily-packing-input span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.underwear-notes-card__layout,
.underwear-tail-card__list {
  display: grid;
  gap: 12px;
}

.underwear-notes-card__layout {
  grid-template-columns: 42px 224px minmax(0, 1fr);
  align-items: start;
}

.underwear-notes-card {
  position: relative;
}

.underwear-notes-card.is-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 30000;
  width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  padding: 18px;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 18% 8%, rgba(38, 119, 97, 0.16), transparent 34%),
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 72%, var(--bg) 28%), var(--bg));
  box-shadow: none;
  overflow: hidden;
}

.underwear-notes-card.is-fullscreen .underwear-notes-card__layout {
  height: calc(100dvh - 36px);
  grid-template-columns: 48px minmax(220px, 280px) minmax(0, 1fr);
  align-items: stretch;
}

.underwear-notes-card.is-fullscreen .underwear-notes-rail,
.underwear-notes-card.is-fullscreen .underwear-notes-sidebar {
  position: relative;
  top: auto;
  height: 100%;
  min-height: 0;
}

.underwear-notes-card.is-fullscreen .underwear-notes-editor {
  height: 100%;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.underwear-notes-card.is-fullscreen .underwear-notes-stage,
.underwear-notes-card.is-fullscreen .underwear-notes-surface {
  height: 100%;
  min-height: 0;
}

.underwear-notes-card.is-fullscreen .underwear-notes-live-editor,
.underwear-notes-card.is-fullscreen .underwear-notes-surface .underwear-notes-markdown,
.underwear-notes-card.is-fullscreen .underwear-notes-surface--raw textarea {
  height: 100%;
  min-height: 0;
  overflow-y: auto;
}

.underwear-notes-card.is-fullscreen .underwear-notes-surface--raw textarea {
  resize: none;
}

.underwear-notes-rail {
  --underwear-notes-sidebar-top: calc(var(--underwear-section-bar-sticky-top) + 68px);
  position: sticky;
  top: var(--underwear-notes-sidebar-top);
  z-index: 24;
  align-self: start;
  display: grid;
  gap: 8px;
  justify-items: center;
  min-height: 260px;
  height: calc(100vh - var(--underwear-notes-sidebar-top) - 24px);
  padding-top: 2px;
  border-right: 1px solid rgba(124, 144, 133, 0.18);
}

.underwear-notes-rail-button {
  position: relative;
  z-index: 1;
  width: 34px;
  min-height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
}

.underwear-notes-rail-button:hover,
.underwear-notes-rail-button:focus-visible,
.underwear-notes-rail-button.is-active {
  border-color: rgba(38, 119, 97, 0.26);
  background: var(--surface-2);
  color: var(--accent);
  outline: 0;
  filter: none;
}

.underwear-notes-rail-button svg {
  width: 22px;
  height: 22px;
  pointer-events: none;
}

.underwear-notes-empty {
  display: grid;
  gap: 12px;
  padding: 10px 2px 2px;
}

.underwear-notes-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  font-weight: 700;
  max-width: 720px;
}

.underwear-notes-sidebar {
  --underwear-notes-sidebar-top: calc(var(--underwear-section-bar-sticky-top) + 68px);
  position: sticky;
  top: var(--underwear-notes-sidebar-top);
  display: grid;
  grid-template-rows: minmax(0, 1fr) max-content;
  gap: 8px;
  align-self: start;
  align-content: stretch;
  min-width: 0;
  height: calc(100vh - var(--underwear-notes-sidebar-top) - 24px);
  min-height: 260px;
  overflow: hidden;
}

.underwear-notes-sidebar--trash {
  grid-template-rows: max-content minmax(0, 1fr);
}

.underwear-notes-sidebar__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.underwear-notes-sidebar__head > div {
  display: grid;
  gap: 4px;
}

.underwear-notes-sidebar__head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.underwear-notes-sidebar__list {
  display: grid;
  gap: 8px;
  align-content: start;
  grid-auto-rows: max-content;
  justify-items: start;
}

.underwear-notes-sidebar__scroll,
.underwear-notes-trash-panel {
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.underwear-notes-sidebar__empty {
  width: 100%;
  max-width: 224px;
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--muted);
}

.underwear-notes-sidebar__empty strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.2;
}

.underwear-notes-sidebar__empty span {
  font-size: 12px;
  line-height: 1.35;
  font-weight: 700;
}

.underwear-notes-folder-button {
  width: 100%;
  max-width: 224px;
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}

.underwear-notes-folder-button:hover,
.underwear-notes-folder-button--all {
  border-color: rgba(38, 119, 97, 0.28);
  background: var(--surface-2);
}

.underwear-notes-folder-button--trash {
  align-self: end;
  justify-self: stretch;
}

.underwear-notes-folder-button__main {
  min-width: 0;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.underwear-notes-folder-button svg {
  width: 28px;
  height: 28px;
  color: currentColor;
}

.underwear-notes-folder-button strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
  line-height: 1.08;
}

.underwear-notes-folder-button > span:last-child {
  color: var(--muted);
  font-size: 18px;
  font-weight: 900;
}

.underwear-notes-date-picker {
  position: absolute;
  z-index: 90;
  width: 292px;
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.underwear-notes-date-picker[hidden] {
  display: none !important;
}

.underwear-notes-date-picker__head {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  gap: 8px;
  align-items: center;
}

.underwear-notes-date-picker__head strong {
  text-align: center;
  font-size: 14px;
  line-height: 1.2;
}

.underwear-notes-date-weekdays,
.underwear-notes-date-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.underwear-notes-date-weekdays span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-align: center;
}

.underwear-notes-date-day {
  position: relative;
  min-width: 0;
  min-height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  box-shadow: none;
}

.underwear-notes-date-day:hover,
.underwear-notes-date-day:focus-visible,
.underwear-notes-date-day.is-selected {
  border-color: rgba(38, 119, 97, 0.42);
  background: var(--green-soft);
  outline: 0;
  filter: none;
}

.underwear-notes-date-day.is-muted {
  color: var(--muted);
  opacity: 0.58;
}

.underwear-notes-date-day.is-today {
  border-color: rgba(38, 119, 97, 0.38);
}

.underwear-notes-date-day i {
  position: absolute;
  right: 6px;
  top: 6px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--green);
}

.underwear-notes-date-day.is-deficit i {
  background: var(--accent-2);
}

.underwear-notes-date-token {
  display: inline-block;
  min-width: 0.72em;
  padding: 0 2px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
}

.underwear-note-item {
  position: relative;
  width: 100%;
  max-width: 224px;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  padding: 10px 12px;
  text-align: left;
  display: grid;
  gap: 7px;
  cursor: grab;
  user-select: none;
  will-change: transform;
  transition: border-color 0.16s ease, background 0.16s ease, opacity 0.16s ease, transform 0.16s ease;
}

.underwear-note-item:active {
  cursor: grabbing;
}

.underwear-note-item.is-note-dragging {
  z-index: 2;
  opacity: 0.42;
  transform: scale(0.985);
}

.underwear-note-item.is-note-sliding {
  z-index: 1;
}

.underwear-note-item.is-note-drop-before,
.underwear-note-item.is-note-drop-after {
  border-color: rgba(38, 119, 97, 0.48);
  background: var(--green-soft);
}

.underwear-note-item.is-note-drop-before::before,
.underwear-note-item.is-note-drop-after::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  height: 3px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(38, 119, 97, 0.12);
}

.underwear-note-item.is-note-drop-before::before {
  top: -7px;
}

.underwear-note-item.is-note-drop-after::after {
  bottom: -7px;
}

.underwear-note-item__top {
  min-width: 0;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 8px;
}

.underwear-note-item strong {
  min-width: 0;
  font-size: 14px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.underwear-note-item__preview {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.36;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.underwear-note-item__pin {
  flex: 0 0 auto;
  color: var(--accent);
  font-style: normal;
  line-height: 0;
  margin-top: 1px;
}

.underwear-note-item__pin svg {
  width: 14px;
  height: 14px;
}

.underwear-note-item:hover {
  background: var(--surface-2);
}

.underwear-note-item.is-active {
  border-color: rgba(38, 119, 97, 0.36);
  background: var(--green-soft);
  box-shadow: inset 0 0 0 1px rgba(38, 119, 97, 0.12);
}

.underwear-note-item.is-pinned:not(.is-active) {
  border-color: rgba(38, 119, 97, 0.24);
}

.underwear-notes-editor {
  min-width: 0;
  display: grid;
  gap: 14px;
}

.underwear-notes-editor__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.underwear-notes-editor__head > div:first-child {
  display: grid;
  gap: 4px;
  min-width: min(100%, 360px);
}

.underwear-notes-editor__title {
  font-size: 21px;
  line-height: 1.08;
}

input.underwear-notes-editor__title-input[type="text"] {
  width: min(100%, 560px);
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  padding: 0 0 3px;
  font-weight: 900;
  box-shadow: none;
}

input.underwear-notes-editor__title-input[type="text"]:focus,
input.underwear-notes-editor__title-input[type="text"]:focus-visible {
  border-color: transparent;
  outline: 0;
  box-shadow: inset 0 -2px 0 rgba(38, 119, 97, 0.28);
}

.underwear-notes-editor__head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.underwear-notes-editor__head-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.underwear-notes-action-dock {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(31, 35, 32, 0.10);
}

.underwear-notes-action-button {
  width: 36px;
  height: 36px;
  min-height: 36px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
}

.underwear-notes-action-button:hover,
.underwear-notes-action-button.is-active {
  background: var(--surface-2);
  color: var(--accent);
}

.underwear-notes-action-button--danger:hover {
  color: var(--accent-2);
}

.underwear-notes-action-button svg {
  width: 19px;
  height: 19px;
}

.underwear-notes-trash-panel {
  display: grid;
  gap: 8px;
  align-content: start;
}

.underwear-notes-trash-note {
  width: 100%;
  max-width: 224px;
  display: grid;
  gap: 9px;
  padding: 10px 12px;
  border: 1px dashed rgba(124, 144, 133, 0.42);
  border-radius: 12px;
  background: var(--surface-2);
}

.underwear-notes-trash-note > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.underwear-notes-trash-note strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  line-height: 1.2;
}

.underwear-notes-trash-note span,
.underwear-notes-trash-note p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}

.underwear-notes-trash-note button {
  justify-self: start;
}

.underwear-notes-trash-note__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.underwear-notes-trash-note__actions button {
  justify-self: auto;
}

.compact-button--danger {
  border-color: rgba(160, 62, 62, 0.34);
  color: #b85a5a;
}

.compact-button--danger:hover {
  border-color: rgba(160, 62, 62, 0.5);
  background: rgba(160, 62, 62, 0.09);
}

.underwear-notes-trash {
  display: grid;
  gap: 10px;
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.underwear-notes-trash__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.underwear-notes-trash__head > div {
  display: grid;
  gap: 3px;
}

.underwear-notes-trash__head strong {
  font-size: 15px;
  line-height: 1.15;
}

.underwear-notes-trash__head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.underwear-notes-trash__list {
  display: grid;
  gap: 8px;
}

.underwear-notes-trash__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px dashed rgba(124, 144, 133, 0.42);
  border-radius: 8px;
  background: var(--surface-2);
}

.underwear-notes-trash__item > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.underwear-notes-trash__item strong {
  font-size: 14px;
  line-height: 1.2;
}

.underwear-notes-trash__item span,
.underwear-notes-trash__item p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.underwear-notes-field,
.underwear-notes-compose {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.underwear-notes-field > span,
.underwear-notes-compose > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.underwear-notes-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.underwear-notes-toolbar .compact-button {
  min-width: 0;
}

.underwear-notes-stage {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.underwear-notes-surface {
  position: relative;
  min-width: 0;
  min-height: 340px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(38, 119, 97, 0.04), transparent 36%), var(--surface);
  overflow: hidden;
}

.underwear-notes-surface--live,
.underwear-notes-surface--preview {
  cursor: text;
}

.underwear-notes-surface--live:focus-visible,
.underwear-notes-surface--preview:focus-visible {
  outline: 2px solid rgba(104, 182, 159, 0.42);
  outline-offset: 2px;
}

.underwear-notes-surface .underwear-notes-markdown {
  min-height: 340px;
  align-content: start;
  padding-right: 58px;
}

.underwear-notes-surface--raw {
  padding: 0;
}

.underwear-notes-surface__mode {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
}

.underwear-notes-compose--surface {
  min-height: 100%;
}

.underwear-notes-compose textarea {
  min-height: 340px;
  resize: vertical;
  line-height: 1.55;
}

.underwear-notes-compose--surface textarea {
  min-height: 300px;
}

.underwear-notes-surface--raw textarea {
  width: 100%;
  min-height: 340px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  padding: 14px 58px 14px 14px;
  resize: vertical;
  line-height: 1.55;
}

.underwear-notes-surface--raw textarea:focus {
  border-color: transparent;
  outline: 0;
}

.underwear-notes-live-editor {
  min-height: 340px;
  padding: 14px 58px 72px 14px;
  display: grid;
  align-content: start;
  gap: 8px;
  line-height: 1.55;
}

.underwear-notes-live-editor:focus {
  outline: 0;
}

.underwear-notes-live-line {
  min-height: 24px;
  display: block;
  padding-left: calc(var(--note-outline-depth, 0) * 12px);
  caret-color: transparent;
}

.underwear-notes-live-line.is-outline-hidden {
  display: none !important;
}

.underwear-notes-table-block.is-outline-hidden,
.underwear-notes-callout.is-outline-hidden {
  display: none !important;
}

.underwear-notes-live-line--check,
.underwear-notes-live-line--bullet,
.underwear-notes-live-line--ordered {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.underwear-notes-live-line--heading {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
  line-height: 1.18;
}

.underwear-notes-heading-toggle {
  width: 22px;
  height: 22px;
  min-height: 22px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  line-height: 22px;
  text-align: center;
  cursor: pointer;
}

.underwear-notes-heading-toggle:hover,
.underwear-notes-heading-toggle:focus-visible {
  outline: 0;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
}

.underwear-notes-live-line--heading-1 {
  font-size: 28px;
  font-weight: 950;
}

.underwear-notes-live-line--heading-2 {
  font-size: 24px;
  font-weight: 920;
}

.underwear-notes-live-line--heading-3 {
  font-size: 21px;
  font-weight: 880;
}

.underwear-notes-live-line--heading-4 {
  font-size: 18px;
  font-weight: 840;
}

.underwear-notes-live-line--heading-5 {
  font-size: 16px;
  font-weight: 780;
}

.underwear-notes-live-line--heading-6 {
  color: var(--muted);
  font-size: 14px;
  font-weight: 740;
}

.underwear-notes-live-line__marker {
  color: var(--muted);
  font-weight: 900;
  text-align: center;
  user-select: none;
}

.underwear-notes-live-line input[type="checkbox"] {
  width: 15px;
  height: 15px;
  min-height: 0;
  margin: 4px 0 0 1px;
  accent-color: var(--accent);
  user-select: none;
}

.underwear-notes-live-line__text {
  min-width: 0;
  min-height: 24px;
  display: block;
  caret-color: var(--ink);
}

.underwear-notes-pair-bracket {
  display: inline-block;
  min-width: 0.42em;
  margin: 0 1px;
  padding: 0 1px;
  border: 1px solid rgba(220, 226, 222, 0.62);
  border-radius: 2px;
  color: color-mix(in srgb, var(--ink) 58%, var(--muted) 42%);
  line-height: 1.05;
  vertical-align: baseline;
  background: rgba(238, 241, 237, 0.08);
  box-shadow: 0 0 0 1px rgba(18, 21, 19, 0.18) inset;
}

.underwear-notes-floating-toolbar {
  position: sticky;
  bottom: 14px;
  z-index: 8;
  width: max-content;
  max-width: min(100%, 620px);
  margin: -58px auto 0;
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border: 1px solid rgba(38, 119, 97, 0.18);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 88%, #1f2522 12%);
  box-shadow: 0 14px 34px rgba(31, 35, 32, 0.18);
}

.underwear-notes-tool-button {
  width: 36px;
  height: 36px;
  min-height: 36px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--ink);
  padding: 0;
  font-size: 17px;
  font-weight: 900;
}

.underwear-notes-tool-button svg {
  width: 19px;
  height: 19px;
}

.underwear-notes-tool-menu-wrap {
  position: relative;
  display: inline-grid;
}

.underwear-notes-tool-menu {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  z-index: 12;
  width: min(300px, calc(100vw - 42px));
  display: none;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(38, 119, 97, 0.22);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
  transform: translateX(-50%);
}

.underwear-notes-tool-menu-wrap.is-menu-open .underwear-notes-tool-menu {
  display: grid;
}

.underwear-notes-tool-menu > strong {
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.underwear-notes-table-picker {
  display: grid;
  grid-template-columns: repeat(6, 22px);
  gap: 4px;
}

.underwear-notes-table-picker-label {
  justify-self: start;
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(38, 119, 97, 0.18);
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--accent);
  padding: 2px 9px;
  font-size: 12px;
  font-weight: 900;
}

.underwear-notes-table-picker button {
  width: 22px;
  height: 22px;
  min-height: 22px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-2);
  box-shadow: none;
}

.underwear-notes-table-picker button:hover,
.underwear-notes-table-picker button:focus-visible,
.underwear-notes-table-picker button.is-selected {
  border-color: var(--accent);
  background: var(--green-soft);
  filter: none;
}

.underwear-notes-table-picker button.is-selected {
  box-shadow: inset 0 0 0 1px rgba(38, 119, 97, 0.22);
}

.underwear-notes-tool-menu__custom {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) max-content;
  gap: 8px;
  align-items: end;
}

.underwear-notes-tool-menu__custom label {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.underwear-notes-tool-menu__custom span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.underwear-notes-tool-menu__custom input,
.underwear-notes-tool-menu__custom select {
  width: 100%;
  min-height: 32px;
  padding: 5px 7px;
  border-radius: 7px;
  font-size: 12px;
}

.underwear-notes-tool-menu__custom button {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 12px;
}

.underwear-notes-callout-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.underwear-notes-callout-picker button {
  min-height: 30px;
  padding: 5px 7px;
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--ink);
  font-size: 12px;
  text-align: center;
}

.underwear-notes-callout-picker button:hover {
  border-color: var(--accent);
  background: var(--green-soft);
  color: var(--accent);
  filter: none;
}

.underwear-notes-preview {
  min-width: 0;
  min-height: 340px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(38, 119, 97, 0.04), transparent 36%), var(--surface);
  overflow: hidden;
}

.underwear-notes-preview__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  flex-wrap: wrap;
}

.underwear-notes-preview__head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.underwear-notes-markdown {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.underwear-notes-markdown--editable:focus {
  outline: 0;
}

.underwear-notes-markdown p,
.underwear-notes-markdown h1,
.underwear-notes-markdown h2,
.underwear-notes-markdown h3,
.underwear-notes-markdown h4,
.underwear-notes-markdown h5,
.underwear-notes-markdown h6 {
  margin: 0;
}

.underwear-notes-markdown h1,
.underwear-notes-markdown h2,
.underwear-notes-markdown h3,
.underwear-notes-markdown h4,
.underwear-notes-markdown h5,
.underwear-notes-markdown h6 {
  line-height: 1.18;
}

.underwear-notes-markdown h1 {
  font-size: 28px;
  font-weight: 950;
}

.underwear-notes-markdown h2 {
  font-size: 24px;
  font-weight: 920;
}

.underwear-notes-markdown h3 {
  font-size: 21px;
  font-weight: 880;
}

.underwear-notes-markdown h4 {
  font-size: 18px;
  font-weight: 840;
}

.underwear-notes-markdown h5 {
  font-size: 16px;
  font-weight: 780;
}

.underwear-notes-markdown h6 {
  color: var(--muted);
  font-size: 15px;
  font-weight: 740;
}

.underwear-notes-outline-section {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.underwear-notes-outline-heading {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
}

.underwear-notes-outline-section.is-outline-collapsed > :not(.underwear-notes-outline-heading) {
  display: none !important;
}

.underwear-notes-outline-section .underwear-notes-outline-section {
  margin-top: 2px;
  padding-left: 14px;
  border-left: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
}

.underwear-notes-markdown p {
  line-height: 1.6;
}

.underwear-notes-markdown code {
  font-family: "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.94em;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(38, 119, 97, 0.08);
}

.underwear-notes-markdown__list {
  margin: 0;
  padding-left: 22px;
  display: grid;
  gap: 8px;
}

.underwear-notes-markdown__list--check {
  padding-left: 0;
  list-style: none;
}

.underwear-notes-markdown__list--check li label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  cursor: pointer;
}

.underwear-notes-markdown__list--check input {
  margin: 2px 0 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.underwear-notes-table-block {
  min-width: 0;
  padding-left: calc(var(--note-outline-depth, 0) * 12px);
}

.underwear-notes-table-scroll {
  position: relative;
  max-width: 100%;
  overflow-x: auto;
  padding: 26px 0 8px;
}

.underwear-notes-table {
  min-width: min(100%, 360px);
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}

.underwear-notes-table th,
.underwear-notes-table td {
  min-width: 92px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 8px 10px;
  color: var(--ink);
  line-height: 1.38;
  overflow-wrap: anywhere;
  vertical-align: top;
  outline: none;
}

.underwear-notes-table th {
  background: var(--surface-2);
  font-weight: 900;
}

.underwear-notes-table tr:last-child td {
  border-bottom: 0;
}

.underwear-notes-table tr.underwear-notes-table-insert-row td {
  height: 18px;
  padding: 0;
  border-bottom: 0;
  background: transparent;
  text-align: center;
}

.underwear-notes-table th:last-child,
.underwear-notes-table td:last-child {
  border-right: 0;
}

.underwear-notes-table [data-underwear-table-align="center"] {
  text-align: center;
}

.underwear-notes-table [data-underwear-table-align="right"] {
  text-align: right;
}

.underwear-notes-table [data-underwear-table-cell]:focus {
  box-shadow: inset 0 0 0 2px rgba(38, 119, 97, 0.26);
  background: color-mix(in srgb, var(--green-soft) 70%, transparent);
}

.underwear-notes-table-column-actions,
.underwear-notes-table-row-actions {
  width: 38px;
  min-width: 38px;
  padding: 4px !important;
  text-align: center;
  background: var(--surface-2);
}

.underwear-notes-table-row-actions button,
.underwear-notes-table-remove {
  width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  border-color: rgba(189, 79, 70, 0.26);
  border-radius: 6px;
  background: transparent;
  color: var(--accent-2);
  box-shadow: none;
  line-height: 1;
}

.underwear-notes-table-column-controls {
  position: absolute;
  top: 0;
  left: 0;
  right: 38px;
  display: grid;
  gap: 4px;
  min-width: 360px;
  pointer-events: none;
}

.underwear-notes-table-column-control {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  pointer-events: auto;
}

.underwear-notes-table-plus {
  width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  border-color: rgba(38, 119, 97, 0.24);
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--accent);
  box-shadow: none;
  font-size: 15px;
  line-height: 1;
}

.underwear-notes-table-plus:hover,
.underwear-notes-table-row-actions button:hover,
.underwear-notes-table-remove:hover {
  filter: none;
  transform: translateY(-1px);
}

.underwear-notes-table-row-controls {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding-top: 7px;
}

.underwear-notes-callout {
  position: relative;
  display: grid;
  gap: 30px;
  min-height: 158px;
  padding: 28px 36px 34px 36px;
  border: 0;
  border-radius: 8px;
  background: #1f2a3a;
  color: #d9dde4;
  box-shadow: inset 0 0 0 1px rgba(76, 127, 194, 0.08);
}

.underwear-notes-callout--warning,
.underwear-notes-callout--danger,
.underwear-notes-callout--failure,
.underwear-notes-callout--bug {
  background: #2b2531;
  box-shadow: inset 0 0 0 1px rgba(231, 113, 113, 0.10);
}

.underwear-notes-callout--success,
.underwear-notes-callout--tip {
  background: #1d302e;
  box-shadow: inset 0 0 0 1px rgba(83, 190, 160, 0.10);
}

.underwear-notes-callout--quote {
  background: #242933;
}

.underwear-notes-callout__head {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.underwear-notes-callout__icon {
  width: 30px;
  height: 30px;
  color: #2388ff;
}

.underwear-notes-callout__controls {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 6px;
  opacity: 0;
  transition: opacity 140ms ease;
}

.underwear-notes-callout:hover .underwear-notes-callout__controls,
.underwear-notes-callout:focus-within .underwear-notes-callout__controls {
  opacity: 1;
}

.underwear-notes-callout__controls select {
  min-height: 30px;
  padding: 4px 7px;
  border-color: rgba(35, 136, 255, 0.25);
  border-radius: 7px;
  background: rgba(13, 23, 35, 0.82);
  color: #d9e8ff;
  font-size: 12px;
  font-weight: 800;
}

.underwear-notes-callout__title {
  min-width: 0;
  min-height: 34px;
  color: #2388ff;
  font-size: 28px;
  line-height: 1.16;
  font-weight: 950;
  outline: none;
}

.underwear-notes-callout__body {
  min-height: 44px;
  color: #d9dde4;
  font-size: 25px;
  font-weight: 850;
  outline: none;
  line-height: 1.35;
}

.underwear-notes-callout__title:focus,
.underwear-notes-callout__body:focus {
  box-shadow: inset 0 -2px 0 rgba(35, 136, 255, 0.38);
}

.underwear-notes-markdown__empty {
  color: var(--muted);
  font-weight: 700;
}

.underwear-notes-card__footer-main {
  display: grid;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
}

.underwear-notes-card__footer,
.underwear-notes-card__footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.underwear-notes-card__footer .underwear-notes-toolbar {
  flex: 1 1 auto;
}

.underwear-notes-mode-button {
  width: 42px;
  padding-inline: 0;
  justify-content: center;
}

.underwear-notes-mode-button svg {
  width: 18px;
  height: 18px;
  display: block;
}

.underwear-notes-mode-toggle {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.underwear-notes-mode-toggle .compact-button.is-active {
  border-color: rgba(104, 182, 159, 0.5);
  background: rgba(74, 134, 115, 0.22);
  color: #dff7ec;
  box-shadow: inset 0 0 0 1px rgba(104, 182, 159, 0.12);
}

.underwear-notes-preview-hint span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.underwear-notes-card__footer-actions {
  margin-left: auto;
}

.underwear-tail-card__summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0 14px 14px;
}

.underwear-tail-card__summary > div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.underwear-tail-card__summary strong {
  font-size: 24px;
}

.underwear-tail-card__summary span,
.underwear-tail-row__size span,
.underwear-tail-row__metrics small,
.underwear-tail-row__actions .hint {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.underwear-tail-row {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.underwear-tail-row__size,
.underwear-tail-row__metrics > div {
  display: grid;
  gap: 4px;
}

.underwear-tail-row__metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.underwear-tail-row__actions {
  justify-self: end;
}

.underwear-history-block {
  display: grid;
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.underwear-history-block summary {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  list-style: none;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.underwear-history-block summary::-webkit-details-marker {
  display: none;
}

.underwear-history-block summary::before {
  content: "▸";
  color: var(--green);
  margin-right: 8px;
}

.underwear-history-block summary span {
  margin-right: auto;
}

.underwear-history-block summary strong {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.underwear-history-block[open] summary::before {
  content: "▾";
}

.underwear-package-count {
  display: grid;
  gap: 12px;
}

.underwear-package-count__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.underwear-package-count__top h3 {
  margin: 0;
  font-size: 24px;
}

.underwear-package-count__top p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.underwear-package-count__total {
  display: grid;
  gap: 4px;
  justify-items: end;
  text-align: right;
  padding: 14px 16px;
  border: 1px solid rgba(38, 119, 97, 0.14);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  box-shadow: var(--shadow-soft);
}

.underwear-package-count__total strong {
  color: var(--ink);
  font-size: 30px;
  line-height: 1;
}

.underwear-package-count__total span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.underwear-package-count__total small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.underwear-package-count__pay-form {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.underwear-package-count__pay-form label {
  display: grid;
  gap: 6px;
  justify-items: stretch;
}

.underwear-package-count__pay-form label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.underwear-package-count__pay-form input,
.underwear-package-count__pay-form input[type="date"],
.underwear-package-count__pay-form input[type="number"] {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 8px 10px;
}

.underwear-package-count__pay-form button {
  grid-column: 1 / -1;
  width: 100%;
}

.underwear-package-count__dashboard,
.underwear-package-count__metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(190px, 1fr));
  gap: 10px 12px;
  align-items: start;
}

.underwear-package-count__dashboard > .underwear-package-count__period {
  grid-column: 1;
  grid-row: 1;
}

.underwear-package-count__metric--active {
  grid-column: 2;
  grid-row: 1;
}

.underwear-package-count__settlement-card {
  grid-column: 3;
  grid-row: 1 / span 2;
}

.underwear-package-count__metric--used {
  grid-column: 1;
  grid-row: 2;
}

.underwear-package-count__metric--paid {
  grid-column: 2;
  grid-row: 2;
}

.underwear-package-count__metric {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.underwear-package-count__metric span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.underwear-package-count__metric strong {
  color: var(--ink);
  font-size: 26px;
  line-height: 1.05;
}

.underwear-package-count__dashboard > .underwear-package-count__period > .underwear-package-count__metric,
.underwear-package-count__metric--active,
.underwear-package-count__settlement-card {
  border-color: rgba(38, 119, 97, 0.14);
  background: linear-gradient(180deg, rgba(38, 119, 97, 0.07), var(--surface));
}

.underwear-package-count__metric--money {
  border-color: rgba(38, 119, 97, 0.18);
  background: linear-gradient(180deg, rgba(38, 119, 97, 0.05), var(--surface));
}

.underwear-package-count__metric--plain {
  border-color: var(--line);
  background: var(--surface);
}

.underwear-package-count__metric small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.underwear-package-count__settlement-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(38, 119, 97, 0.14);
  border-radius: 8px;
}

.underwear-package-count__settlement-head {
  display: grid;
  gap: 5px;
}

.underwear-package-count__settlement-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.underwear-package-count__settlement-head strong {
  color: var(--ink);
  font-size: 26px;
  line-height: 1.05;
}

.underwear-package-count__settlement-head small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.underwear-package-count__metrics--totals {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.underwear-package-count__metric--toggle {
  cursor: pointer;
}

.underwear-package-count__metric--toggle summary {
  list-style: none;
  display: grid;
  gap: 6px;
}

.underwear-package-count__metric--toggle summary::-webkit-details-marker {
  display: none;
}

.underwear-package-count__period {
  display: grid;
  gap: 0;
}

.underwear-package-count__period-body,
.underwear-package-count__history {
  display: grid;
  gap: 10px;
}

.underwear-package-count__period-body {
  padding: 14px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background: var(--surface);
}

.underwear-package-count__period-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.underwear-package-count__period-head span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.underwear-package-count__line-list {
  display: grid;
  gap: 10px;
}

.underwear-package-count__line {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.underwear-package-count__line--base {
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
}

.underwear-package-count__line-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.underwear-package-count__line-head span,
.underwear-package-count__line small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.underwear-package-count__history .section-title {
  margin: 0;
}

.underwear-package-count__history .section-title h4 {
  margin: 0;
  line-height: 1.2;
}

.underwear-package-count__history {
  margin-top: 6px;
  padding-top: 0;
  gap: 6px;
}

.underwear-package-count__archive {
  display: grid;
  gap: 12px;
}

.underwear-package-count__archive-item {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.underwear-package-count__archive-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 14px;
  cursor: pointer;
  list-style: none;
}

.underwear-package-count__archive-head::-webkit-details-marker {
  display: none;
}

.underwear-package-count__archive-head strong,
.underwear-package-count__archive-head b {
  color: var(--ink);
}

.underwear-package-count__archive-head span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.underwear-package-count__archive-side {
  display: grid;
  gap: 4px;
  justify-items: end;
  text-align: right;
}

.underwear-package-count__archive-side small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.underwear-package-count__archive-body {
  display: grid;
  gap: 12px;
  padding: 0 14px 14px;
}

.underwear-package-count__archive-metrics,
.underwear-package-count__archive-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.underwear-package-count__archive-metrics span,
.underwear-package-count__archive-sources span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.underwear-package-count__archive-metrics strong,
.underwear-package-count__archive-sources strong {
  color: var(--ink);
}

.underwear-package-count__archive-actions {
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 1180px) {
  .finance-layout-grid,
  .finance-form-grid,
  .finance-fields,
  .finance-settings-grid {
    grid-template-columns: 1fr;
  }

  .finance-summary-grid,
  .finance-month-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .underwear-invoice-grid,
  .underwear-shipment-form-grid,
  .underwear-summary-grid,
  .lobatskaya-summary-grid,
  .lobatskaya-manage-grid,
  .lobatskaya-manage-grid--shipments,
  .lobatskaya-editor-grid--four {
    grid-template-columns: 1fr;
  }

  .underwear-invoice-totals,
  .underwear-migration-grid,
  .underwear-invoice-slice__totals,
  .underwear-package-count__metrics,
  .underwear-baul-receipt-grid,
  .underwear-tempo__summary,
  .underwear-tempo-week__content,
  .underwear-tempo-card__body,
  .underwear-tempo-shortage__head,
  .underwear-tempo-week__head {
    grid-template-columns: 1fr;
  }

  .underwear-invoice-payment-form {
    grid-template-columns: 1fr;
  }

  .underwear-invoice-payment-form button {
    grid-column: 1;
    justify-self: start;
    min-width: 0;
  }

  .underwear-invoice-payment-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .finance-summary-grid,
  .finance-month-grid,
  .finance-account-grid,
  .finance-signal-list {
    grid-template-columns: 1fr;
  }

  .finance-account-card__top,
  .finance-signal-card__top,
  .finance-journal-item__top,
  .finance-plan-row {
    grid-template-columns: 1fr;
  }

  .finance-plan-row__side,
  .finance-account-card__top b,
  .finance-signal-card__top b,
  .finance-journal-item__top b {
    justify-items: start;
    text-align: left;
  }

  .underwear-invoice-breakdown__head,
  .underwear-invoice-breakdown__footer,
  .underwear-invoice-breakdown__row,
  .underwear-invoice-slice__summary,
  .underwear-tempo-card__head,
  .underwear-baul-receipt-row,
  .underwear-baul-receipt-archive__row {
    grid-template-columns: 1fr;
  }

  .lobatskaya-summary-card__top,
  .lobatskaya-summary-row,
  .lobatskaya-summary-row--triple,
  .lobatskaya-editor-row,
  .lobatskaya-defect-overview__row {
    grid-template-columns: 1fr;
  }

  .lobatskaya-summary-card .underwear-summary-total--columns {
    justify-self: start;
  }

  .lobatskaya-summary-total--triple {
    justify-self: start;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .lobatskaya-summary-total--triple > div + div {
    padding-left: 0;
    border-left: 0;
  }

  .lobatskaya-summary-metric,
  .lobatskaya-editor-row em {
    justify-self: start;
  }

  .lobatskaya-receipt-update__footer {
    align-items: stretch;
  }

  .underwear-invoice-slice__summary-side {
    justify-items: start;
    text-align: left;
  }

  .underwear-package-count__top,
  .underwear-package-count__pay-form,
  .underwear-package-count__dashboard,
  .underwear-tempo-shortage__head > span,
  .underwear-tempo-card__result {
    text-align: left;
  }

  .underwear-package-count__top {
    grid-template-columns: 1fr;
  }

  .underwear-package-count__dashboard {
    grid-template-columns: 1fr;
  }

  .underwear-package-count__dashboard > .underwear-package-count__period,
  .underwear-package-count__metric--active,
  .underwear-package-count__settlement-card,
  .underwear-package-count__metric--used,
  .underwear-package-count__metric--paid {
    grid-column: auto;
    grid-row: auto;
  }

  .underwear-package-count__total {
    justify-items: start;
    text-align: left;
  }

  .underwear-package-count__archive-head,
  .underwear-package-count__period-head,
  .underwear-package-count__line-head {
    grid-template-columns: 1fr;
  }

  .underwear-package-count__pay-form {
    grid-template-columns: 1fr;
  }

  .underwear-package-count__archive-side {
    justify-items: start;
    text-align: left;
  }

  .underwear-notes-trash__item {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .underwear-notes-trash__item button {
    justify-self: start;
  }

  .underwear-kiz-shk-upload__row,
  .underwear-kiz-shk-item,
  .underwear-kiz-file {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .underwear-kiz-folder-grid,
  .underwear-kiz-doc-list--grid,
  .underwear-kiz-pending-grid {
    grid-template-columns: 1fr;
  }

  .underwear-kiz-preview {
    padding: 10px;
  }

  .underwear-kiz-preview__panel {
    height: calc(100vh - 20px);
  }

  .underwear-kiz-inbox-actions {
    justify-content: flex-start;
  }

  .underwear-kiz-inbox-actions button {
    flex: 1 1 150px;
  }

  .underwear-kiz-inbox-actions .underwear-kiz-trash-button:not(.underwear-kiz-trash-button--selected) {
    flex: 0 0 36px;
  }

  .underwear-kiz-shk-item__actions,
  .underwear-kiz-file__actions {
    justify-content: flex-start;
  }

  .underwear-tempo-week__aside {
    position: static;
  }

  .underwear-tempo-week__aside .underwear-tempo-summary {
    width: 100%;
  }

  .lobatskaya-defect-sources {
    grid-template-columns: 1fr;
  }

  .lobatskaya-shipment-actions {
    justify-items: stretch;
  }

  .lobatskaya-shipment-upload {
    width: 100%;
  }

  .lobatskaya-shipment-upload-state {
    width: 100%;
  }

  .lobatskaya-shipment-flow {
    justify-content: flex-start;
  }

  .lobatskaya-shipment-flow__note {
    max-width: none;
    text-align: left;
  }

  .lobatskaya-shipment-upload em {
    text-align: left;
  }
}

@media (max-width: 620px) {
  .finance-workspace {
    padding-right: 14px;
    padding-left: 14px;
  }

  .finance-summary-card strong,
  .finance-journal-item__top b,
  .finance-signal-card__top b {
    font-size: 22px;
  }

  .underwear-shipment-create summary {
    grid-template-columns: auto 1fr;
    row-gap: 8px;
  }

  .underwear-shipment-create__save {
    grid-column: 1 / -1;
    justify-self: end;
  }

  .lobatskaya-shipment-flow {
    gap: 10px;
  }

  .lobatskaya-shipment-flow__arrow {
    display: none;
  }
}

.underwear-history-block__body {
  display: grid;
  gap: 10px;
  padding-top: 10px;
}

.underwear-history-list {
  display: grid;
  gap: 8px;
}

.underwear-history-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 10px 12px;
  display: grid;
  gap: 4px;
}

.underwear-history-item--recent {
  border-color: rgba(47, 128, 91, 0.45);
  background: var(--green-soft);
  box-shadow: 0 0 0 2px rgba(47, 128, 91, 0.12);
}

.underwear-history-item__top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.underwear-history-item__side {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.underwear-history-item strong {
  font-size: 13px;
}

.underwear-history-item span {
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.underwear-history-item small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.underwear-history-breakdown {
  display: grid;
  gap: 6px;
  margin-top: 4px;
}

.underwear-history-breakdown__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content max-content;
  gap: 10px;
  align-items: baseline;
}

.underwear-history-breakdown__row em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.underwear-history-breakdown__row--missing strong,
.underwear-history-breakdown__row--missing em {
  color: var(--accent-2);
}

.underwear-shipment-dates {
  margin-top: 6px;
  position: relative;
}

.underwear-shipment-dates summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  list-style: none;
}

.underwear-shipment-dates summary::-webkit-details-marker {
  display: none;
}

.underwear-shipment-dates summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 4px;
  color: var(--green);
}

.underwear-shipment-dates[open] summary::before {
  content: "▾";
}

.underwear-shipment-dates-popover {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 3;
  min-width: 170px;
  max-width: 220px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 8px;
}

.underwear-shipment-dates-title {
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.underwear-shipment-date-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.underwear-shipment-date-empty {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.underwear-shipment-date-total {
  position: relative;
  cursor: help;
  font-weight: 900;
  white-space: nowrap;
}

.underwear-shipment-tooltip {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 4;
  min-width: 120px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  display: none;
  gap: 4px;
}

.underwear-shipment-date-total:hover .underwear-shipment-tooltip,
.underwear-shipment-date-total:focus .underwear-shipment-tooltip,
.underwear-shipment-tooltip:hover {
  display: grid;
}

.underwear-shipment-tooltip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
}

.underwear-packed-cell {
  color: var(--text);
  font-size: 17px;
  font-weight: 900;
  white-space: nowrap;
}

.baul-details {
  min-width: 220px;
}

.baul-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
}

.baul-details summary::-webkit-details-marker {
  display: none;
}

.baul-details summary::before {
  content: "▸";
  color: var(--green);
  font-weight: 900;
}

.baul-details[open] summary::before {
  content: "▾";
}

.size-stack {
  display: inline-grid;
  gap: 2px;
}

.size-stack strong {
  font-size: 18px;
  line-height: 1;
}

.size-stack small,
.baul-details em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.baul-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.baul-archive-warning {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid rgba(177, 133, 58, 0.3);
  border-radius: 8px;
  background: rgba(212, 180, 106, 0.12);
}

.baul-archive-warning strong {
  color: #7b5b19;
  font-size: 13px;
}

.baul-archive-warning span {
  color: #8f7541;
  font-size: 12px;
  font-weight: 700;
}

.baul-archive-warning small {
  color: #8f7541;
  font-size: 11px;
  font-weight: 800;
}

.baul-item,
.baul-add-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.baul-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 7px;
}

.baul-item--pending {
  border-color: rgba(177, 133, 58, 0.35);
  background: rgba(212, 180, 106, 0.1);
}

.baul-item span {
  font-weight: 900;
}

.baul-item__actions {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 8px;
  flex-wrap: wrap;
}

.baul-archive-comment {
  min-height: 34px;
  min-width: 140px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
}

.baul-archive-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.baul-archive-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--green);
}

.underwear-table-row--pending-baul {
  background: #fff9eb;
}

.underwear-table-row--pending-baul td {
  background: transparent;
}

.baul-add-row input {
  min-height: 36px;
}

.baul-empty {
  margin: 0;
  text-align: left;
}

.underwear-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
  margin: 12px 0;
}

.underwear-flow section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf8;
  padding: 14px;
}

.underwear-flow h3 {
  margin-bottom: 6px;
}

.party-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 22px;
}

.party-hero h2 {
  margin: 4px 0 9px;
  font-size: 30px;
}

.party-hero p,
.party-card p,
.party-card small {
  color: var(--muted);
  font-weight: 600;
  line-height: 1.35;
}

.party-create,
.party-card__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.party-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
  align-items: start;
}

.party-list {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.party-card {
  position: relative;
  display: grid;
  gap: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
  padding-right: 116px;
}

.party-card.is-active {
  border-color: #9ec9b5;
  box-shadow: inset 4px 0 0 var(--accent);
}

.party-card.is-archived {
  background: #f7f7f4;
}

.party-card h3 {
  margin: 0;
  font-size: 22px;
}

.party-card p,
.party-card small {
  display: block;
  margin: 6px 0 0;
  font-size: 14px;
}

.placeholder-card h2 {
  max-width: calc(100% - 110px);
}

.placeholder-card p {
  max-width: 720px;
  margin: 10px 0 14px;
  color: var(--muted);
  font-weight: 700;
}

.control-band {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 20px;
}

.control-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1.2fr) minmax(190px, 0.7fr) minmax(260px, 1fr);
  gap: 18px;
  align-items: start;
}

.control-stack {
  display: grid;
  gap: 10px;
}

.logistics-tool {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.receiving-control-band {
  padding: 16px 18px;
}

.receiving-control-band .logistics-tool {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.logistics-tool__header > div {
  display: grid;
  gap: 4px;
}

.logistics-tool__header strong {
  font-size: 18px;
  font-weight: 900;
}

.logistics-tool__header span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.logistics-tool__grid {
  display: grid;
  grid-template-columns: minmax(280px, 1.2fr) minmax(170px, 0.7fr) minmax(220px, 0.9fr);
  gap: 16px;
  align-items: start;
}

.logistics-output {
  width: 100%;
  min-height: 220px;
  resize: vertical;
  background: #fbfcfb;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.45;
}

.logistics-warnings {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid #ecd98d;
  border-radius: 8px;
  background: #fff7d9;
  color: #5f4f14;
  font-size: 14px;
  font-weight: 700;
}

.field-label {
  color: #48514b;
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
}

.file-row,
.button-row,
.number-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.hint,
.status {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.control-status {
  display: block;
  padding: 10px 12px;
  border: 1px solid #d6ddd8;
  border-radius: 8px;
  background: #f8faf8;
}

.summary-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 12px;
  position: relative;
  z-index: 60;
  overflow: visible;
}

.summary-item {
  position: relative;
  overflow: visible;
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 15px;
  box-shadow: var(--shadow-soft);
}

.summary-item--hint {
  cursor: help;
}

.summary-item span {
  display: block;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.summary-item strong {
  display: block;
  margin-top: 5px;
  font-size: 30px;
  line-height: 1.08;
}

.summary-item:first-child strong {
  font-size: 22px;
  line-height: 1.16;
}

.summary-item__hint {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 140;
  width: min(320px, calc(100vw - 44px));
  padding: 12px 14px;
  border: 1px solid rgba(61, 122, 108, 0.24);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 40px rgba(35, 51, 46, 0.15);
  color: #2e3734;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  white-space: pre-line;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.summary-item__hint::before {
  content: '';
  position: absolute;
  left: 24px;
  bottom: 100%;
  border: 8px solid transparent;
  border-bottom-color: rgba(255, 255, 255, 0.98);
  filter: drop-shadow(0 -1px 0 rgba(61, 122, 108, 0.18));
}

.summary-item--hint:hover .summary-item__hint,
.summary-item--hint:focus-within .summary-item__hint {
  opacity: 1;
  transform: translateY(0);
}

.summary-item:last-child .summary-item__hint,
.summary-item:nth-last-child(2) .summary-item__hint {
  left: auto;
  right: 0;
}

.summary-item:last-child .summary-item__hint::before,
.summary-item:nth-last-child(2) .summary-item__hint::before {
  left: auto;
  right: 24px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg);
  padding-top: 8px;
  box-shadow: 0 8px 18px rgba(31, 35, 32, 0.08);
}

.tab {
  border-color: transparent;
  border-radius: 8px 8px 0 0;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  font-weight: 900;
  max-width: 280px;
  padding: 11px 15px;
  text-align: left;
  white-space: normal;
}

.tab.is-active {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: inset 0 -4px 0 var(--accent-3);
  color: #fff;
}

.tab.is-open:not(.is-active) {
  border-color: #9ec9b5;
  background: #eef7f2;
  color: var(--accent);
}

.panel {
  padding-bottom: 36px;
}

.split-workspace {
  display: flex;
  align-items: stretch;
  gap: 0;
  min-height: 520px;
  padding-bottom: 36px;
}

.split-pane {
  min-width: 0;
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.split-pane__bar {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: #f8faf8;
}

.split-pane__bar strong {
  font-size: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.split-pane__close {
  width: 32px;
  min-height: 32px;
  border-color: var(--line);
  background: #fff;
  color: var(--muted);
  padding: 0;
  font-size: 20px;
  line-height: 1;
}

.split-pane__body {
  min-width: 0;
  overflow: auto;
  padding: 12px;
}

.split-pane__body .direction-block {
  box-shadow: none;
}

.split-resizer {
  flex: 0 0 12px;
  cursor: col-resize;
  position: relative;
}

.split-resizer::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 5px;
  width: 2px;
  border-radius: 2px;
  background: #aeb8b1;
}

.split-resizer:hover::before,
.is-resizing-split .split-resizer::before {
  background: var(--accent);
}

.is-resizing-split,
.is-resizing-split * {
  cursor: col-resize !important;
  user-select: none;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-title h2 {
  font-size: 29px;
}

.billing-paid-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 9px 12px;
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

.billing-paid-toggle input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
}

.direction-block {
  margin: 0 0 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.direction-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 15px 17px;
  background: #1f211f;
  color: #fff;
}

.direction-heading h3 {
  font-size: 23px;
  color: inherit;
  font-weight: 900;
}

.direction-heading span {
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.09);
  color: #eef4ef;
  padding: 5px 8px;
  font-size: 15px;
  font-weight: 800;
}

.report-upload,
.direction-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 15px;
  border-bottom: 1px solid var(--line);
  background: #f8faf8;
}

.direction-tools {
  position: relative;
}

.report-upload > div,
.direction-tools > div {
  display: grid;
  gap: 2px;
  min-width: 220px;
  flex: 1 1 300px;
}

.report-upload strong,
.direction-tools strong {
  font-size: 14px;
  text-transform: uppercase;
}

.report-upload span,
.direction-tools span {
  color: var(--muted);
  font-size: 14px;
}

.download-button span {
  color: inherit;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.download-button.is-import-state {
  border-color: #d9c189;
  background: #fff5de;
  color: #8c6210;
}

.download-button.is-import-state:hover {
  border-color: #cfa962;
  background: #ffefcb;
}

.packing-template-trigger,
.packing-adjustment-trigger {
  position: relative;
  display: flex !important;
  min-width: auto !important;
  flex: 0 0 auto !important;
}

.packing-adjustment-trigger {
  margin-left: auto;
}

.packing-template-popover,
.packing-adjustment-popover {
  position: absolute;
  top: calc(100% + 2px);
  z-index: 15;
  width: min(420px, 70vw);
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(18, 35, 28, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.packing-template-popover::before,
.packing-adjustment-popover::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -10px;
  height: 10px;
}

.packing-template-popover {
  left: 0;
}

.packing-adjustment-popover {
  right: 0;
}

.packing-template-trigger:hover .packing-template-popover,
.packing-template-trigger:focus-within .packing-template-popover,
.packing-adjustment-trigger:hover .packing-adjustment-popover,
.packing-adjustment-trigger:focus-within .packing-adjustment-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.packing-template-popover strong,
.packing-adjustment-popover strong {
  font-size: 14px;
  text-transform: uppercase;
}

.packing-template-popover span,
.packing-adjustment-popover span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.packing-adjustment-popover textarea {
  min-height: 120px;
  resize: vertical;
  background: #fff;
}

.packing-template-actions,
.packing-adjustment-actions {
  display: flex;
  justify-content: flex-end;
}

.packing-service-directions {
  display: grid;
  gap: 16px;
}

.packing-service-direction {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 14px;
  box-shadow: var(--shadow-soft);
}

.packing-service-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 12px;
  align-items: stretch;
}

.packing-service-side-column {
  flex: 0 0 560px;
  max-width: 560px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 14px;
  align-content: start;
  align-self: stretch;
}

.packing-service-editor {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfb;
  padding: 12px;
}

.packing-service-editor__head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.packing-service-editor__head > div {
  display: grid;
  gap: 4px;
}

.packing-service-editor__head strong {
  font-size: 16px;
}

.packing-service-editor__head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.packing-service-editor__head b {
  border-radius: 8px;
  background: #eef7f2;
  color: var(--accent);
  padding: 6px 10px;
  white-space: nowrap;
}

.packing-service-total-field {
  display: grid;
  gap: 8px;
}

.packing-service-editor--total {
  align-content: start;
  align-self: start;
  height: auto;
}

.packing-service-editor--matrix {
  flex: 1 1 760px;
  min-width: 420px;
  align-self: stretch;
  height: 100%;
  align-content: start;
}

.packing-service-editor--list {
  align-content: start;
  align-self: start;
  height: auto;
}

.packing-service-total-panel {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(240px, 1fr);
  gap: 16px;
  align-items: start;
}

.packing-service-total-preview {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid #dcebe2;
  border-radius: 12px;
  background: #f4faf6;
}

.packing-service-total-preview--hover {
  position: relative;
}

.packing-service-total-preview--hover::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 10px;
}

.packing-service-total-preview span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.packing-service-total-preview strong {
  font-size: 42px;
  line-height: 1;
}

.packing-service-total-preview small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.packing-service-total-controls {
  display: grid;
  gap: 14px;
  align-content: start;
  max-width: 260px;
}

.packing-service-total-controls--wide {
  max-width: none;
}

.packing-service-side-column .packing-service-total-panel {
  grid-template-columns: 1fr;
}

.packing-service-side-column .packing-service-editor {
  height: 100%;
  align-content: start;
}

.packing-service-side-column .packing-service-editor__head {
  align-items: center;
}

.packing-service-side-column .packing-service-editor__head > div {
  gap: 0;
}

.packing-service-side-column .packing-service-editor__head span {
  display: none;
}

.packing-service-side-column .packing-service-total-controls {
  max-width: none;
}

.packing-service-side-column .packing-service-total-input-wrap {
  flex-wrap: wrap;
}

.packing-service-total-field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.packing-service-total-input-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.packing-service-total-input-wrap input {
  width: 140px;
  min-height: 42px;
  padding: 8px 10px;
}

.packing-service-total-input-wrap i {
  color: var(--muted);
  font-style: normal;
  font-size: 14px;
  font-weight: 700;
}

.packing-service-table input {
  width: 78px;
  min-height: 36px;
  padding: 6px 8px;
  text-align: center;
}

.packing-service-qty-cell {
  text-align: center;
}

.packing-service-editor__bulk {
  display: grid;
  gap: 8px;
}

.packing-service-editor__bulk span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.packing-service-editor__bulk textarea {
  min-height: 88px;
  resize: vertical;
  background: #fff;
}

.packing-service-breakdown-popover {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 14;
  width: min(340px, 82vw);
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(18, 35, 28, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.packing-service-total-preview--hover:hover .packing-service-breakdown-popover,
.packing-service-total-preview--hover:focus-within .packing-service-breakdown-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.packing-service-breakdown-popover strong {
  font-size: 13px;
  text-transform: uppercase;
}

.packing-service-breakdown-list {
  display: grid;
  gap: 7px;
}

.packing-service-breakdown-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  font-size: 14px;
}

.packing-service-breakdown-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.packing-service-breakdown-empty {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.packing-service-editor__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 1100px) {
  .packing-service-side-column,
  .packing-service-editor--total,
  .packing-service-editor--list,
  .packing-service-editor--matrix {
    flex-basis: 100%;
    max-width: none;
    min-width: 0;
  }

  .packing-service-total-panel {
    grid-template-columns: 1fr;
  }

  .packing-service-side-column {
    grid-template-columns: 1fr;
  }
}

.billing-merged-service-cell {
  vertical-align: middle;
}

.billing-merged-service-cell__inner {
  display: grid;
  gap: 8px;
  justify-items: center;
  text-align: center;
}

.billing-merged-service-cell__inner strong {
  font-size: 26px;
  line-height: 1;
}

.billing-merged-service-cell__inner span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.warehouse-receipt-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf8;
}

.warehouse-receipt-create {
  margin-top: 14px;
  border: 1px dashed rgba(62, 92, 74, 0.22);
  border-radius: 8px;
  background: #fbfcfb;
}

.warehouse-receipt-create summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
  padding: 12px 14px;
}

.warehouse-receipt-create summary::-webkit-details-marker {
  display: none;
}

.warehouse-receipt-create summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 8px;
  color: var(--green);
  font-weight: 900;
}

.warehouse-receipt-create[open] summary::before {
  content: "▾";
}

.warehouse-receipt-create summary span {
  display: inline-flex;
  align-items: center;
  color: var(--green);
  font-size: 16px;
  font-weight: 900;
}

.warehouse-receipt-create summary strong {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.warehouse-receipt-create .warehouse-receipt-tools {
  margin: 0;
  border: 0;
  border-top: 1px dashed rgba(62, 92, 74, 0.18);
  border-radius: 0 0 8px 8px;
  background: transparent;
}

.warehouse-receipt-tools > div {
  display: grid;
  gap: 2px;
  min-width: 260px;
  flex: 1 1 260px;
}

.warehouse-receipt-tools strong {
  font-size: 14px;
  text-transform: uppercase;
}

.warehouse-receipt-tools span {
  color: var(--muted);
  font-size: 14px;
}

.manual-receipt-entry {
  display: grid;
  grid-template-columns: 150px auto;
  gap: 8px;
  align-items: center;
}

.manual-receipt-entry input {
  min-height: 40px;
}

.difference-block {
  margin: 0 0 16px;
  border: 2px solid #bba8ec;
  border-radius: 8px;
  background: var(--violet-soft);
  box-shadow: 0 10px 24px rgba(79, 59, 140, 0.12);
  overflow: hidden;
}

.difference-block summary {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 900;
  background: #f5f0ff;
  list-style: none;
}

.difference-block summary span {
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
}

.difference-block summary::-webkit-details-marker {
  display: none;
}

.difference-block summary::before {
  content: "▸";
  flex: 0 0 auto;
  color: #5f45b5;
  font-size: 20px;
  line-height: 1;
}

.difference-block[open] summary::before {
  content: "▾";
}

.difference-block summary:focus-visible {
  outline: 2px solid #735bd3;
  outline-offset: -2px;
}

.difference-block summary strong {
  border-radius: 8px;
  background: #fff;
  color: #4f436f;
  padding: 5px 8px;
  margin-left: auto;
  white-space: nowrap;
}

.difference-body {
  border-top: 1px solid #d8cdf8;
  padding: 12px;
  background: #fff;
}

.billing-inline-block .difference-body {
  border-top: 0;
}

.billing-wrapup-block {
  margin-top: 12px;
}

.billing-wrapup-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.billing-wrapup-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.billing-funding-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 220px)) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 12px;
}

.billing-funding-form__field {
  display: grid;
  gap: 6px;
}

.billing-funding-form__field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.billing-funding-form__meta {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  align-self: center;
}

.billing-wrapup-card {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfdfc;
  position: relative;
}

.billing-wrapup-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.billing-wrapup-card strong {
  font-size: 28px;
  line-height: 1;
  font-weight: 1000;
  letter-spacing: -0.03em;
}

.billing-wrapup-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.billing-wrapup-card--accent {
  background: #f2faf5;
  border-color: #c9e0d0;
}

.billing-wrapup-card__tooltip {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: calc(100% + 10px);
  z-index: 30;
  padding: 10px 12px;
  border-radius: 12px;
  background: #1f2523;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.billing-wrapup-card__tooltip::after {
  content: "";
  position: absolute;
  left: 28px;
  top: 100%;
  width: 12px;
  height: 12px;
  background: #1f2523;
  transform: rotate(45deg) translateY(-6px);
}

.billing-wrapup-card--tooltip:hover .billing-wrapup-card__tooltip,
.billing-wrapup-card--tooltip:focus-within .billing-wrapup-card__tooltip {
  opacity: 1;
  transform: translateY(0);
}

.billing-wrapup-grid {
  display: grid;
  grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 12px;
  align-items: start;
}

.billing-wrapup-section {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.billing-wrapup-section--full {
  margin-top: 0;
}

.billing-wrapup-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.billing-wrapup-section__head strong {
  font-size: 18px;
}

.billing-wrapup-section__head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.billing-wrapup-empty {
  color: var(--muted);
  font-weight: 800;
}

.billing-wrapup-list {
  display: grid;
  gap: 8px;
}

.billing-wrapup-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdfc;
}

.billing-wrapup-list-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.billing-wrapup-list-text strong,
.billing-wrapup-list-row b {
  font-size: 15px;
  font-weight: 900;
}

.billing-wrapup-list-text span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.billing-wrapup-table td:first-child,
.billing-wrapup-table th:first-child {
  text-align: left;
}

@media (max-width: 1180px) {
  .underwear-sections-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .underwear-notes-card__layout {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .underwear-notes-sidebar {
    grid-column: 2;
    position: static;
    height: min(420px, 62vh);
  }

  .underwear-notes-rail {
    grid-column: 1;
    position: static;
    height: min(420px, 62vh);
  }

  .underwear-notes-editor {
    grid-column: 1 / -1;
  }

  .underwear-note-item,
  .underwear-notes-folder-button,
  .underwear-notes-sidebar__empty,
  .underwear-notes-trash-note {
    max-width: 100%;
  }

  .underwear-tail-row,
  .underwear-tail-row__metrics,
  .underwear-tail-card__summary {
    grid-template-columns: 1fr;
  }

  .underwear-booking-extras {
    grid-template-columns: 1fr;
  }

  .billing-wrapup-grid {
    grid-template-columns: 1fr;
  }

  .billing-funding-form {
    grid-template-columns: 1fr;
  }
}

.difference-subtitle {
  margin: 14px 0 8px;
}

.diff-empty {
  margin-bottom: 10px;
  color: var(--muted);
  font-weight: 800;
}

.diff-ok-line {
  margin-bottom: 10px;
  border: 1px solid #b8d6c2;
  border-radius: 8px;
  background: #f0faf3;
  color: #1f5d34;
  padding: 10px 12px;
  font-weight: 800;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  background: #fff;
}

th,
td {
  border: 1px solid var(--line);
  padding: 9px 10px;
  text-align: right;
  vertical-align: middle;
  min-width: 62px;
  font-size: 15px;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

th {
  background: var(--table-head);
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

td:first-child,
th:first-child,
td:nth-child(2),
th:nth-child(2) {
  text-align: left;
}

.quantity-cell {
  text-align: left;
}

.quantity-split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
}

.quantity-value {
  min-width: 10px;
  font-weight: 800;
}

.quantity-delta {
  margin-left: auto;
  white-space: nowrap;
}

.box-cell {
  width: 84px;
  text-align: center !important;
  background: #e8edf5;
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
}

.box-cell span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.box-cell small {
  display: block;
  margin-top: 4px;
  color: #667085;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.box-source-input {
  width: 100%;
  min-height: 28px !important;
  margin-top: 5px;
  border: 1px dashed #98a2b3;
  border-radius: 6px !important;
  background: #fff;
  color: var(--ink);
  padding: 3px 5px !important;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  cursor: text;
}

.box-source-input:focus {
  border-style: solid;
  border-color: var(--accent);
  outline: 2px solid rgba(38, 119, 97, 0.16);
}

.box-header-upload {
  min-height: 0;
  width: 100%;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  padding: 4px 2px;
  font-weight: 900;
}

.box-header-upload:hover {
  background: #dfe6f0;
  filter: none;
}

.box-header-upload.is-loaded::after {
  content: " WB";
  color: var(--accent);
  font-size: 11px;
}

.color-cell {
  width: 122px;
  font-size: 15px;
  font-weight: 900;
}

.total-cell,
.total-row td {
  font-weight: 900;
}

.empty-box-cell {
  color: var(--muted);
  font-weight: 800;
  text-align: left !important;
}

.total-row td {
  background: var(--surface-2);
}

.billing-directions-table .billing-grand-total-cell {
  font-size: 20px;
  font-weight: 1000;
  color: var(--text);
  letter-spacing: -0.02em;
}

.delta-plus {
  color: #1f6d3e;
  font-weight: 900;
}

.underwear-invoice-credit {
  color: #17b552 !important;
  font-weight: 1000 !important;
}

.delta-minus {
  color: #8b2c28;
  font-weight: 900;
}

.delta-zero {
  color: var(--muted);
  font-weight: 900;
}

body[data-theme="dark"] .underwear-invoice-credit {
  color: #4fe082 !important;
}

.fact-note {
  padding: 12px 15px;
  border-bottom: 1px solid var(--line);
  background: #fff8df;
  color: #3c3725;
  font-weight: 700;
}

.warning-block .direction-heading {
  background: #7a2f2b;
}

.issue-list {
  margin: 0;
  padding: 14px 18px 14px 34px;
}

.issue-list li + li {
  margin-top: 6px;
}

.issue-row td {
  background: #fff2ef;
  color: #6d231f;
  font-weight: 800;
}

.box-start td,
.box-start .box-cell {
  border-top: 3px solid #1f211f;
}

.chip-black {
  background: #050505;
  color: #fff;
}

.chip-white {
  background: #fff;
  color: #111;
}

.chip-beige {
  background: #f1d4b2;
  color: #111;
}

.chip-blue {
  background: #2f63a9;
  color: #fff;
}

.chip-gray {
  background: #b9b9b9;
  color: #111;
}

.chip-brown {
  background: #7b4a2c;
  color: #fff;
}

.chip-pink {
  background: #efbfd3;
  color: #3a2230;
}

.history-list {
  display: grid;
  gap: 10px;
}

.underwear-reference-column {
  min-width: 128px;
  text-align: center !important;
}

th.underwear-reference-column {
  font-size: 12px;
  line-height: 1.2;
}

td.underwear-reference-column {
  font-size: 14px;
  font-weight: 800;
}

.underwear-table {
  width: max-content;
  min-width: 100%;
}

.underwear-header-cell {
  position: relative;
  padding-right: 18px;
}

.underwear-header-cell.is-center {
  text-align: center !important;
}

.underwear-header-cell.is-right {
  text-align: right !important;
}

.underwear-header-cell.is-strong .underwear-header-title {
  font-size: 21px;
  line-height: 1.05;
}

.underwear-header-cell.is-compact .underwear-header-title {
  font-size: 12px;
  line-height: 1.15;
}

.underwear-header-title {
  display: block;
  font-weight: 900;
}

.billing-directions-table {
  table-layout: fixed;
}

.billing-header-cell {
  position: relative;
}

.billing-header-title {
  display: block;
  font-weight: 900;
}

.underwear-column-resizer {
  position: absolute;
  top: 7px;
  right: -1px;
  bottom: 7px;
  width: 12px;
  cursor: col-resize;
}

.underwear-column-resizer::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 5px;
  width: 2px;
  border-radius: 2px;
  background: #aeb8b1;
}

.underwear-column-resizer:hover::before,
.is-resizing-underwear-columns .underwear-column-resizer::before {
  background: var(--accent);
}

.billing-column-resizer {
  position: absolute;
  top: 7px;
  right: -1px;
  bottom: 7px;
  width: 12px;
  cursor: col-resize;
}

.billing-column-resizer::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 5px;
  width: 2px;
  border-radius: 2px;
  background: #aeb8b1;
}

.billing-column-resizer:hover::before,
.is-resizing-billing-columns .billing-column-resizer::before {
  background: var(--accent);
}

.is-resizing-underwear-columns,
.is-resizing-underwear-columns * {
  cursor: col-resize !important;
  user-select: none;
}

.is-resizing-billing-columns,
.is-resizing-billing-columns * {
  cursor: col-resize !important;
  user-select: none;
}

.underwear-availability-cell .baul-details {
  min-width: 0;
}

.underwear-availability-cell .baul-details summary {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.underwear-availability-cell .size-stack {
  justify-items: center;
  text-align: center;
}

.underwear-availability-cell .size-stack strong {
  font-size: 24px;
}

.underwear-availability-cell .size-stack small {
  font-size: 14px;
}

.underwear-potential-cell {
  font-size: 18px;
  text-align: right !important;
  white-space: nowrap;
}

.history-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
  box-shadow: var(--shadow-soft);
}

.history-item strong {
  font-size: 18px;
}

.history-item p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.settings-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 14px;
}

.settings-menu,
.settings-content {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.settings-menu {
  padding: 10px;
}

.settings-menu-item {
  width: 100%;
  border-color: transparent;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}

.settings-menu-item + .settings-menu-item {
  margin-top: 8px;
}

.settings-menu-item.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.settings-content {
  overflow: hidden;
}

.appearance-settings {
  display: grid;
  gap: 16px;
  padding: 16px;
}

.appearance-settings__intro {
  display: grid;
  gap: 6px;
}

.appearance-settings__intro strong {
  font-size: 18px;
}

.appearance-settings__intro span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  max-width: 720px;
}

.appearance-settings__options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.appearance-theme-card {
  display: grid;
  gap: 12px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  padding: 14px;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}

.appearance-theme-card.is-active {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.appearance-theme-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.appearance-theme-card strong {
  font-size: 18px;
}

.appearance-theme-card small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.appearance-theme-card__preview {
  height: 120px;
  border-radius: 10px;
  border: 1px solid var(--line);
  overflow: hidden;
  position: relative;
}

.appearance-theme-card__preview::before,
.appearance-theme-card__preview::after {
  content: "";
  position: absolute;
  border-radius: 8px;
}

.appearance-theme-card__preview::before {
  left: 12px;
  top: 12px;
  width: 30%;
  height: calc(100% - 24px);
}

.appearance-theme-card__preview::after {
  right: 12px;
  top: 12px;
  width: calc(70% - 24px);
  height: calc(100% - 24px);
}

.appearance-theme-card__preview--light {
  background: linear-gradient(180deg, #f6f7f5, #ecefea);
}

.appearance-theme-card__preview--light::before {
  background: linear-gradient(180deg, #ffffff, #f2f5f1);
  border: 1px solid rgba(32, 35, 33, 0.08);
}

.appearance-theme-card__preview--light::after {
  background: linear-gradient(180deg, #ffffff, #f7faf8);
  border: 1px solid rgba(32, 35, 33, 0.08);
}

.appearance-theme-card__preview--dark {
  background: linear-gradient(180deg, #1f2121, #252929);
}

.appearance-theme-card__preview--dark::before {
  background: linear-gradient(180deg, #2a2e2e, #232726);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.appearance-theme-card__preview--dark::after {
  background: linear-gradient(180deg, #2c3030, #262928);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

body[data-theme="dark"] .topbar,
body[data-theme="dark"] .workspace-panel,
body[data-theme="dark"] .workspace-column,
body[data-theme="dark"] .panel,
body[data-theme="dark"] .placeholder-card,
body[data-theme="dark"] .control-band,
body[data-theme="dark"] .settings-menu,
body[data-theme="dark"] .settings-content,
body[data-theme="dark"] .difference-block,
body[data-theme="dark"] .difference-body,
body[data-theme="dark"] .client-card,
body[data-theme="dark"] .product-card,
body[data-theme="dark"] .party-card,
body[data-theme="dark"] .history-item,
body[data-theme="dark"] .empty-state,
body[data-theme="dark"] .underwear-summary-card,
body[data-theme="dark"] .underwear-sections-nav,
body[data-theme="dark"] .underwear-section-pane,
body[data-theme="dark"] .underwear-manage-card,
body[data-theme="dark"] .underwear-shipment-record,
body[data-theme="dark"] .underwear-history-block__body,
body[data-theme="dark"] .underwear-invoice-card,
body[data-theme="dark"] .finance-summary-card,
body[data-theme="dark"] .finance-account-card,
body[data-theme="dark"] .finance-signal-card,
body[data-theme="dark"] .finance-journal-item,
body[data-theme="dark"] .finance-plan-row,
body[data-theme="dark"] .lobatskaya-summary-card,
body[data-theme="dark"] .lobatskaya-editor-card,
body[data-theme="dark"] .lobatskaya-shipment-card,
body[data-theme="dark"] .operational-tools-card,
body[data-theme="dark"] .shortcut-item,
body[data-theme="dark"] .underwear-settings-row,
body[data-theme="dark"] .billing-paid-toggle,
body[data-theme="dark"] .split-pane {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.015), rgba(0, 0, 0, 0.08)), var(--surface);
  border-color: var(--line);
  box-shadow: var(--shadow-soft);
}

body[data-theme="dark"] .topbar {
  background: linear-gradient(180deg, rgba(40, 44, 45, 0.98), rgba(31, 34, 35, 0.96));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03), 0 14px 34px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(16px);
}

body[data-theme="dark"] .underwear-summary-grid > .underwear-summary-card::before {
  background:
    radial-gradient(
      circle 760px at var(--summary-card-halo-x, 50%) var(--summary-card-halo-y, 50%),
      rgba(111, 190, 166, 0.105) 0%,
      rgba(111, 190, 166, 0.06) 34%,
      rgba(111, 190, 166, 0.026) 68%,
      transparent 90%
    );
}

body[data-theme="dark"] .topbar__image {
  filter: saturate(0.85) brightness(0.9);
}

body[data-theme="dark"] .tabs,
body[data-theme="dark"] .workspace-heading,
body[data-theme="dark"] .split-pane__bar,
body[data-theme="dark"] .underwear-section-pane__bar,
body[data-theme="dark"] .barcode-settings-note,
body[data-theme="dark"] .barcode-settings-context,
body[data-theme="dark"] .underwear-tempo-summary,
body[data-theme="dark"] .underwear-tempo-card,
body[data-theme="dark"] .underwear-shipment-create summary,
body[data-theme="dark"] .settings-toolbar {
  background: var(--surface-2);
  border-color: var(--line);
}

body[data-theme="dark"] .underwear-section-pane__bar {
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.34);
}

body[data-theme="dark"] .barcode-settings-warning {
  background: rgba(130, 63, 63, 0.2);
  border-color: rgba(215, 138, 120, 0.28);
}

body[data-theme="dark"] .tab,
body[data-theme="dark"] .settings-menu-item,
body[data-theme="dark"] .workspace-back,
body[data-theme="dark"] .settings-button,
body[data-theme="dark"] .topbar-action-button {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}

body[data-theme="dark"] .client-card:hover,
body[data-theme="dark"] .product-card:hover {
  border-color: rgba(90, 155, 136, 0.42);
  background: var(--surface-2);
}

body[data-theme="dark"] .client-card.is-active {
  border-color: rgba(90, 155, 136, 0.42);
  background: linear-gradient(180deg, rgba(90, 155, 136, 0.18), rgba(35, 38, 39, 0.96));
  box-shadow: inset 4px 0 0 var(--accent), 0 10px 24px rgba(0, 0, 0, 0.14);
}

body[data-theme="dark"] .tab:hover,
body[data-theme="dark"] .settings-menu-item:hover,
body[data-theme="dark"] .workspace-back:hover,
body[data-theme="dark"] .settings-button:hover,
body[data-theme="dark"] .topbar-action-button:hover {
  background: var(--surface-2);
}

body[data-theme="dark"] .settings-button--brand,
body[data-theme="dark"] .settings-button--brand:hover {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

body[data-theme="dark"] .settings-button--brand.is-active {
  box-shadow: 0 0 0 2px rgba(98, 194, 154, 0.48);
}

body[data-theme="dark"] .settings-button--brand img {
  filter: none;
}

body[data-theme="dark"] .tab.is-active {
  background: linear-gradient(180deg, rgba(90, 155, 136, 0.12), rgba(35, 38, 39, 0.92));
  color: #f3f6f4;
  box-shadow: inset 0 -3px 0 var(--accent);
}

body[data-theme="dark"] .settings-menu-item.is-active {
  border-color: rgba(90, 155, 136, 0.5);
  background: linear-gradient(180deg, rgba(90, 155, 136, 0.92), rgba(72, 126, 111, 0.92));
  color: #f7fbf8;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

body[data-theme="dark"] .workspace-switch-button {
  border-color: rgba(90, 155, 136, 0.45);
  background: linear-gradient(180deg, rgba(90, 155, 136, 0.16), rgba(35, 38, 39, 0.96));
  color: #e7f3ed;
}

body[data-theme="dark"] .appearance-theme-card.is-active {
  box-shadow: inset 0 0 0 1px var(--accent), 0 12px 28px rgba(0, 0, 0, 0.22);
}

body[data-theme="dark"] .workspace-status,
body[data-theme="dark"] .product-tags span,
body[data-theme="dark"] .placeholder-steps span,
body[data-theme="dark"] .finance-journal-item__meta span {
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--muted);
}

body[data-theme="dark"] .workspace-status {
  background: var(--green-soft);
  color: #a8dbc7;
}

body[data-theme="dark"] .finance-progress__bar {
  background: #1d2421;
}

body[data-theme="dark"] table,
body[data-theme="dark"] th,
body[data-theme="dark"] td {
  border-color: var(--line);
}

body[data-theme="dark"] table {
  background: var(--surface);
}

body[data-theme="dark"] td {
  background: transparent;
  color: var(--ink);
}

body[data-theme="dark"] th {
  background: var(--table-head);
  color: var(--ink);
}

body[data-theme="dark"] tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

body[data-theme="dark"] .topbar__subtitle,
body[data-theme="dark"] .settings-toolbar span,
body[data-theme="dark"] .operational-tools-card span,
body[data-theme="dark"] .shortcut-item span,
body[data-theme="dark"] .underwear-settings-row em,
body[data-theme="dark"] .history-item p {
  color: var(--muted);
}

body[data-theme="dark"] .underwear-sections-nav,
body[data-theme="dark"] .underwear-sections-nav--extras,
body[data-theme="dark"] .underwear-sections-nav--archives {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.012), rgba(0, 0, 0, 0.08)), var(--surface);
}

body[data-theme="dark"] .underwear-sections-nav__item {
  background: var(--surface);
  border-color: var(--line);
}

body[data-theme="dark"] .underwear-sections-nav__item:hover {
  background: var(--surface-2);
}

body[data-theme="dark"] .underwear-sections-nav__item.is-open:not(.is-active) {
  border-color: rgba(90, 155, 136, 0.24);
  background: rgba(90, 155, 136, 0.08);
}

body[data-theme="dark"] .underwear-sections-nav__item.is-active {
  border-color: rgba(90, 155, 136, 0.42);
  background: linear-gradient(180deg, rgba(90, 155, 136, 0.18), rgba(35, 38, 39, 0.96));
  box-shadow: inset 0 0 0 1px rgba(90, 155, 136, 0.16), 0 10px 24px rgba(0, 0, 0, 0.16);
}

body[data-theme="dark"] .underwear-baul-receipt-row,
body[data-theme="dark"] .underwear-shipment-record,
body[data-theme="dark"] .underwear-invoice-breakdown,
body[data-theme="dark"] .underwear-invoice-hub-note,
body[data-theme="dark"] .underwear-invoice-slice__total,
body[data-theme="dark"] .underwear-tail-row,
body[data-theme="dark"] .underwear-tail-card__summary > div,
body[data-theme="dark"] .underwear-tempo-card__shipment,
body[data-theme="dark"] .underwear-shipment-dates-popover,
body[data-theme="dark"] .underwear-shipment-tooltip {
  background: var(--surface-2);
  border-color: var(--line);
}

body[data-theme="dark"] .underwear-shipment-create {
  border-color: rgba(90, 155, 136, 0.28);
  background: linear-gradient(180deg, rgba(90, 155, 136, 0.09), rgba(35, 38, 39, 0.94));
}

body[data-theme="dark"] .underwear-shipment-create summary {
  color: #a9d7c7;
}

body[data-theme="dark"] .underwear-tempo-week,
body[data-theme="dark"] .underwear-tempo-summary,
body[data-theme="dark"] .underwear-invoice-payment-actions {
  border-color: var(--line);
  box-shadow: var(--shadow-soft);
}

body[data-theme="dark"] .underwear-tempo-shortage {
  background: rgba(130, 63, 63, 0.18);
  border-color: rgba(215, 138, 120, 0.24);
}

body[data-theme="dark"] .underwear-tempo-shortage__row strong,
body[data-theme="dark"] .underwear-tempo-shortage__row em,
body[data-theme="dark"] .underwear-shipment-warning strong {
  color: #f1b2a5;
}

body[data-theme="dark"] .underwear-shipment-warning {
  background: rgba(130, 63, 63, 0.18);
  border-color: rgba(215, 138, 120, 0.24);
}

body[data-theme="dark"] .underwear-table-row--pending-baul {
  background: rgba(212, 180, 106, 0.14);
}

body[data-theme="dark"] .underwear-table-row--pending-baul td {
  background: transparent;
}

body[data-theme="dark"] .underwear-tempo-table__row--alert td,
body[data-theme="dark"] .issue-row td {
  background: rgba(130, 63, 63, 0.18);
  color: #f0b8ab;
}

body[data-theme="dark"] .total-row td {
  background: var(--surface-2);
}

body[data-theme="dark"] .fact-note,
body[data-theme="dark"] .baul-archive-warning {
  background: rgba(212, 180, 106, 0.14);
  color: #dbc489;
  border-color: rgba(212, 180, 106, 0.26);
}

body[data-theme="dark"] .fact-note strong,
body[data-theme="dark"] .baul-archive-warning strong,
body[data-theme="dark"] .baul-archive-warning span,
body[data-theme="dark"] .baul-archive-warning small {
  color: #dbc489;
}

body[data-theme="dark"] .warning-block .direction-heading {
  background: #6d3530;
}

body[data-theme="dark"] .difference-block summary {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.015), rgba(0, 0, 0, 0.08)), var(--surface-2);
}

body[data-theme="dark"] .difference-block summary::before {
  color: #8fbdaa;
}

body[data-theme="dark"] .difference-block summary:focus-visible {
  outline-color: rgba(90, 155, 136, 0.8);
}

body[data-theme="dark"] .difference-block summary strong {
  background: rgba(90, 155, 136, 0.14);
  color: #dbece5;
  box-shadow: inset 0 0 0 1px rgba(90, 155, 136, 0.18);
}

body[data-theme="dark"] .difference-body {
  border-top-color: var(--line);
}

body[data-theme="dark"] .lobatskaya-editor-card,
body[data-theme="dark"] .lobatskaya-editor-card--supplies,
body[data-theme="dark"] .lobatskaya-defect-overview,
body[data-theme="dark"] .lobatskaya-defect-source {
  background: var(--surface-2);
  border-color: var(--line);
}

body[data-theme="dark"] .lobatskaya-editor-card--defect {
  background: linear-gradient(180deg, rgba(161, 109, 74, 0.12), rgba(42, 46, 47, 0.96));
  border-color: rgba(161, 109, 74, 0.2);
}

body[data-theme="dark"] .lobatskaya-shipment-chip,
body[data-theme="dark"] .lobatskaya-shipment-chip--supply {
  background: rgba(90, 155, 136, 0.08);
  border-color: rgba(90, 155, 136, 0.18);
}

body[data-theme="dark"] .lobatskaya-shipment-box {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0.08)), var(--surface-2);
  border-color: var(--line);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}

body[data-theme="dark"] .lobatskaya-shipment-box__item {
  border-top-color: var(--line);
}

body[data-theme="dark"] .lobatskaya-shipment-upload-state {
  background: rgba(90, 155, 136, 0.08);
  border-color: rgba(90, 155, 136, 0.18);
}

body[data-theme="dark"] .lobatskaya-workspace .is-file-mode .lobatskaya-shipment-upload-state {
  background: linear-gradient(180deg, rgba(90, 155, 136, 0.16), rgba(35, 38, 39, 0.96));
  border-color: rgba(90, 155, 136, 0.34);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

body[data-theme="dark"] .lobatskaya-workspace .is-file-mode .lobatskaya-shipment-upload-state strong {
  color: #cfe7dd;
}

body[data-theme="dark"] .lobatskaya-shipment-flow__arrow {
  background: rgba(143, 189, 170, 0.4);
}

body[data-theme="dark"] .lobatskaya-shipment-flow__arrow::after {
  border-top-color: rgba(143, 189, 170, 0.68);
  border-right-color: rgba(143, 189, 170, 0.68);
}

body[data-theme="dark"] a {
  color: #9cc8ff;
}

body[data-theme="dark"] code,
body[data-theme="dark"] kbd {
  background: var(--surface-2);
  color: var(--ink);
  border-color: var(--line);
}

.barcode-settings-note,
.barcode-settings-warning,
.barcode-settings-context {
  display: grid;
  gap: 4px;
  margin: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.barcode-settings-note strong,
.barcode-settings-warning strong,
.barcode-settings-context strong {
  font-size: 14px;
}

.barcode-settings-note span,
.barcode-settings-warning span,
.barcode-settings-context span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.barcode-settings-note {
  background: var(--surface-2);
}

.barcode-settings-warning {
  border-color: rgba(156, 45, 45, 0.18);
  background: #fff8f8;
}

.barcode-settings-warning strong {
  color: #9c2d2d;
}

.barcode-settings-context {
  background: var(--surface-2);
}

.settings-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.settings-toolbar > div {
  display: grid;
  gap: 2px;
  min-width: 220px;
  flex: 1 1 220px;
}

.settings-toolbar strong {
  font-size: 14px;
  text-transform: uppercase;
}

.settings-toolbar span {
  color: var(--muted);
  font-size: 14px;
}

.operational-tools-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 12px;
  padding: 12px;
}

.operational-tools-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
  box-shadow: var(--shadow-soft);
}

.operational-tools-card strong {
  font-size: 16px;
}

.operational-tools-card span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.operational-tools-number-row {
  margin-top: 2px;
}

.operational-tools-number-row input {
  width: 110px;
}

.operational-tools-actions {
  align-items: stretch;
}

.operational-tools-actions button {
  flex: 1 1 180px;
}

.shortcut-list {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.shortcut-item {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
  box-shadow: var(--shadow-soft);
}

.underwear-settings-grid {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.underwear-settings-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 120px auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px 14px;
  box-shadow: var(--shadow-soft);
}

.underwear-settings-size {
  display: grid;
  gap: 2px;
}

.underwear-settings-size strong {
  font-size: 18px;
  line-height: 1;
}

.underwear-settings-size small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.underwear-settings-row input {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
}

.underwear-settings-row em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.underwear-settings-hint {
  margin: 0;
  padding: 0 12px 12px;
}

.operational-settings-grid {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.operational-settings-row {
  grid-template-columns: minmax(220px, 1fr) 140px auto;
}

.underwear-migration-note {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
  box-shadow: var(--shadow-soft);
}

.underwear-migration-note strong {
  font-size: 16px;
  color: var(--ink);
}

.underwear-migration-note span,
.underwear-migration-item span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.underwear-migration-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
}

.underwear-migration-item {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
  box-shadow: var(--shadow-soft);
}

.underwear-migration-item strong {
  font-size: 22px;
  line-height: 1.08;
}

.shortcut-item > div {
  display: grid;
  gap: 2px;
  min-width: 240px;
  flex: 1 1 280px;
}

.shortcut-item strong {
  font-size: 16px;
}

.shortcut-item span {
  color: var(--muted);
  font-size: 14px;
}

.shortcut-item kbd {
  border: 1px solid #b8c2bd;
  border-bottom-width: 3px;
  border-radius: 8px;
  background: #f8faf8;
  color: var(--ink);
  padding: 5px 9px;
  font-weight: 900;
}

.shortcut-plus {
  font-weight: 900;
}

.outcome-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
}

.receipt-compare {
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  margin-bottom: 12px;
}

.outcome-metric {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  box-shadow: var(--shadow-soft);
}

.outcome-metric span,
.outcome-metric small {
  color: var(--muted);
  font-weight: 700;
}

.outcome-metric b {
  font-size: 30px;
  line-height: 1.08;
}

.outcome-entry-form {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 110px 110px minmax(180px, 1.3fr) auto;
  gap: 8px;
  align-items: center;
  margin: 12px 0;
}

.outcome-entry-form select,
.outcome-entry-form input {
  min-height: 42px;
}

.bulk-entry {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(260px, 1.3fr) auto;
  gap: 10px;
  align-items: start;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf8;
}

.bulk-entry > div {
  display: grid;
  gap: 4px;
}

.bulk-entry strong {
  font-size: 14px;
  text-transform: uppercase;
}

.bulk-entry span {
  color: var(--muted);
  font-weight: 800;
}

.bulk-entry textarea {
  width: 100%;
  min-height: 92px;
  resize: vertical;
}

.archive-inline {
  display: grid;
  grid-template-columns: 74px minmax(140px, 1fr) auto;
  gap: 6px;
  align-items: center;
}

.archive-inline input {
  min-height: 34px;
}

.billing-entry-form {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) 110px 130px minmax(180px, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin: 12px 0;
}

.billing-entry-form input {
  min-height: 42px;
}

.comment-suggest-menu {
  position: absolute;
  z-index: 80;
  display: grid;
  gap: 4px;
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  padding: 6px;
  box-shadow: var(--shadow);
}

.comment-suggest-menu[hidden] {
  display: none;
}

.comment-suggest-item {
  width: 100%;
  min-height: 34px;
  justify-content: flex-start;
  border-color: transparent;
  background: #fff;
  color: var(--ink);
  padding: 6px 9px;
  text-align: left;
  font-weight: 800;
}

.comment-suggest-item:hover,
.comment-suggest-item.is-active {
  border-color: #bdaef2;
  background: #f0ecff;
}

.compact-button {
  min-height: 32px;
  padding: 5px 8px;
}

.editable-comment {
  cursor: text;
  min-width: 180px;
  outline: none;
}

.editable-comment:empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
  font-weight: 700;
}

.editable-comment:focus {
  box-shadow: inset 0 0 0 2px rgba(43, 124, 93, 0.35);
  background: #f7fff9;
}

.editable-comment.is-saving {
  opacity: 0.65;
}

.muted-cell {
  color: var(--muted);
  font-weight: 800;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  padding: 22px;
}

@media (max-width: 860px) {
  :root {
    --underwear-section-bar-sticky-top: 0px;
  }

  .topbar__inner {
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 18px 0;
  }

  .topbar__image {
    width: 110px;
    height: 64px;
  }

  h1 {
    font-size: 26px;
  }

  .topbar__actions {
    width: 100%;
  }

  .settings-button--brand img {
    width: min(115px, 100%);
  }

  .workspace-switch-button {
    min-width: 0;
  }

  .topbar-action-button {
    min-width: 0;
  }

  .control-grid,
  .logistics-tool__grid,
  .summary-band,
  .outcome-metrics,
  .underwear-summary-grid,
  .underwear-sections-shell,
  .underwear-sections-stage.is-split,
  .underwear-manage-grid,
  .underwear-booking-extras,
  .underwear-shipment-form-grid,
  .outcome-entry-form,
  .bulk-entry,
  .archive-inline,
  .billing-entry-form,
  .manual-receipt-entry,
  .baul-item,
  .baul-add-row,
  .workspace-layout,
  .underwear-flow,
  .party-hero,
  .party-layout,
  .settings-layout,
  .operational-tools-grid {
    grid-template-columns: 1fr;
  }

  .product-card,
  .party-card {
    padding-right: 13px;
  }

  .workspace-status {
    position: static;
    justify-self: start;
  }

  .history-item {
    grid-template-columns: 1fr;
  }

  .underwear-sections-nav {
    position: static;
  }

  .underwear-sections-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
    overscroll-behavior: auto;
    padding-right: 0;
    padding-bottom: 0;
    margin-right: 0;
    scrollbar-gutter: auto;
  }

  .underwear-sections-stage.is-split {
    display: grid;
    gap: 16px;
  }

  .underwear-section-resizer {
    display: none;
  }

  .underwear-sections-nav--extras,
  .underwear-sections-nav--archives {
    margin-top: 24px;
  }

  .underwear-notes-sidebar__head,
  .underwear-notes-editor__head,
  .underwear-notes-preview__head,
  .underwear-notes-card__footer {
    align-items: stretch;
  }

  .underwear-manage-table__head,
  .underwear-manage-row {
    grid-template-columns: minmax(96px, max-content) minmax(110px, 1fr) minmax(120px, 1fr) minmax(160px, 1fr);
  }

  .underwear-manage-table--correction .underwear-manage-table__head,
  .underwear-manage-table--correction .underwear-manage-row {
    grid-template-columns: minmax(96px, max-content) minmax(110px, 1fr) minmax(92px, 110px) minmax(120px, 1fr);
  }

  .underwear-settings-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .underwear-daily-pack-head {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .underwear-daily-pack-head__actions {
    justify-content: stretch;
  }

  .underwear-daily-pack-head__actions label,
  .underwear-daily-pack-head__actions button {
    width: 100%;
  }

  .underwear-daily-packing-fields {
    grid-template-columns: 1fr;
    justify-content: stretch;
  }
}

@media (max-width: 560px) {
  main,
  .topbar__inner {
    width: calc(100% - 18px);
  }

  .topbar__image {
    display: none;
  }

  .topbar__inner,
  .topbar__actions {
    align-items: flex-start;
  }

  .topbar__actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .settings-button--brand {
    margin-left: auto;
  }

  .settings-button--brand img {
    width: min(100px, 100%);
  }

  .file-row,
  .button-row {
    align-items: stretch;
    flex-direction: column;
  }

  button,
  input[type="file"] {
    width: 100%;
  }
}
