:root {
  --ink: #15293a;
  --muted: #6c7b88;
  --line: #dfe6ea;
  --bg: #f3f6f7;
  --nav: #102c3b;
  --nav2: #163f4f;
  --teal: #168d8c;
  --teal2: #0f7778;
  --gold: #d5a744;
  --danger: #bd4a4a;
  --white: #fff;
  --shadow: 0 12px 32px rgba(16, 44, 59, 0.12);
}
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
  margin: 0;
  font-family: Inter, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  overflow: hidden;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
.hidden {
  display: none !important;
}
.muted {
  color: var(--muted);
}
.error {
  color: var(--danger);
  min-height: 20px;
}
.eyebrow {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--teal);
}
.login-shell {
  height: 100%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 20% 15%, #285e6a 0, transparent 34%),
    linear-gradient(135deg, #0c2634, #123f4d 62%, #17615f);
}
.login-shell:after {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 42px 42px;
}
.login-card {
  z-index: 1;
  width: min(410px, calc(100vw - 32px));
  padding: 38px 42px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.3);
}
.login-card h1 {
  font-size: 34px;
  margin: 8px 0;
}
.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: var(--teal);
  color: white;
  font-size: 29px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
  display: block;
  object-fit: contain;
  background: transparent;
  color: transparent;
}
label {
  display: grid;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  margin: 18px 0;
}
input,
select,
textarea {
  width: 100%;
  height: 38px;
  border: 1px solid #ccd6db;
  border-radius: 7px;
  padding: 0 11px;
  background: #fff;
  color: var(--ink);
  outline: none;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(22, 141, 140, 0.12);
}
textarea {
  height: 76px;
  padding-top: 9px;
  resize: vertical;
}
.primary,
.secondary,
.ghost,
.danger {
  border: 0;
  border-radius: 7px;
  height: 36px;
  padding: 0 15px;
  font-weight: 700;
}
.primary {
  background: var(--teal);
  color: #fff;
}
.primary:hover {
  background: var(--teal2);
}
.secondary {
  background: #e3f0f0;
  color: var(--teal2);
}
.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}
.danger {
  background: #fae8e8;
  color: var(--danger);
}
.wide {
  width: 100%;
  margin-top: 4px;
}
.app {
  height: 100%;
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
}
aside {
  height: 100%;
  background: var(--nav);
  color: #c9d5da;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.side-brand {
  height: 72px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.brand-mark.small {
  width: 34px;
  height: 34px;
  font-size: 19px;
  border-radius: 9px;
}
.side-brand strong {
  display: block;
  color: #fff;
  letter-spacing: 0.08em;
}
.side-brand small {
  font-size: 9px;
  letter-spacing: 0.08em;
  color: #83a0ac;
}
.side-brand + nav {
  padding: 18px 12px;
  overflow: auto;
}
.nav-section {
  padding: 15px 12px 7px;
  font-size: 10px;
  color: #6f929e;
  letter-spacing: 0.15em;
  font-weight: 800;
}
.nav-btn {
  width: 100%;
  height: 42px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #bdcdd3;
  text-align: left;
  padding: 0 13px;
  margin: 2px 0;
  display: flex;
  align-items: center;
  gap: 11px;
}
.nav-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}
.nav-btn.active {
  background: var(--nav2);
  color: #fff;
  box-shadow: inset 3px 0 var(--gold);
}
.nav-btn.locked {
  opacity: 0.48;
}
.nav-icon {
  width: 18px;
  text-align: center;
}
.phase-note {
  margin: auto 16px 18px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  font-size: 11px;
}
.phase-note span {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4fd09b;
  margin-right: 7px;
}
main {
  min-width: 0;
  height: 100%;
  display: grid;
  grid-template-rows: 64px auto minmax(0, 1fr);
  overflow: hidden;
}
header {
  height: 64px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  font-size: 14px;
  font-weight: 750;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-badge {
  background: #edf3f4;
  padding: 7px 11px;
  border-radius: 18px;
  font-size: 12px;
}
.icon-btn {
  border: 0;
  background: transparent;
  font-size: 22px;
  color: var(--muted);
  padding: 5px 9px;
}
#mobileNav {
  display: none;
}
#toolbar {
  padding: 14px 22px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  min-height: 65px;
}
.toolbar-row {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
}
.toolbar-row input,
.toolbar-row select {
  width: auto;
  min-width: 155px;
}
.toolbar-row .spacer {
  flex: 1;
}
#content {
  padding: 20px 22px 26px;
  min-height: 0;
  overflow: hidden;
}
.page-scroll {
  height: 100%;
  overflow: auto;
  padding-right: 3px;
}
.page-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin: 0 0 16px;
}
.page-title h1 {
  font-size: 25px;
  margin: 0 0 4px;
}
.page-title p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 16px;
}
.metric {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 17px 18px;
  position: relative;
  overflow: hidden;
}
.metric:before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--teal);
}
.metric.gold:before {
  background: var(--gold);
}
.metric span {
  font-size: 12px;
  color: var(--muted);
}
.metric strong {
  display: block;
  font-size: 28px;
  margin-top: 7px;
  letter-spacing: -0.04em;
}
.grid-2 {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 15px;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 15px;
}
.panel-head {
  padding: 14px 17px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.panel-head h3 {
  margin: 0;
  font-size: 15px;
}
.panel-body {
  padding: 15px 17px;
}
.region-row,
.stock-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 11px 2px;
  border-bottom: 1px solid #edf1f2;
}
.region-row:last-child,
.stock-row:last-child {
  border-bottom: 0;
}
.region-btn,
.number-link {
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 700;
  padding: 0;
  text-align: left;
}
.number-link {
  color: var(--teal);
  font-size: 17px;
}
.yard-children {
  background: #f6f9f9;
  border-radius: 7px;
  padding: 5px 12px;
  margin-bottom: 5px;
}
.yard-children .stock-row {
  padding-left: 12px;
}
.chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.chip {
  font-size: 11px;
  padding: 4px 7px;
  border-radius: 12px;
  background: #eaf3f3;
  color: var(--teal2);
}
.table-shell {
  height: calc(100% - 55px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: auto;
  position: relative;
}
.data-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
}
.data-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #edf3f4;
  color: #4d626d;
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid #cad6db;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #edf1f2;
  white-space: nowrap;
  background: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
}
.data-table tr:hover td {
  background: #f8fbfb;
}
.data-table .status {
  padding: 4px 7px;
  border-radius: 12px;
  background: #e4f5ed;
  color: #287b59;
}
.data-table .void {
  background: #f7e8e8;
  color: #a84848;
}
.table-actions {
  display: flex;
  gap: 5px;
}
.mini {
  height: 27px;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0 8px;
  font-size: 11px;
  color: var(--ink);
}
.empty {
  padding: 45px;
  text-align: center;
  color: var(--muted);
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 24, 33, 0.55);
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal {
  width: min(720px, 96vw);
  max-height: 88vh;
  overflow: auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
}
.modal-head h2 {
  margin: 0;
  font-size: 20px;
}
.modal #modalBody {
  padding: 18px 22px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 14px;
}
.form-grid .full {
  grid-column: 1/-1;
}
.form-grid label {
  margin: 7px 0;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 17px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.import-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.import-summary div {
  background: #f3f7f7;
  padding: 10px;
  border-radius: 7px;
  text-align: center;
}
.paste-box {
  font-family: Consolas, monospace;
  height: 120px;
}
.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  background: #173b48;
  color: #fff;
  padding: 12px 17px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  font-size: 13px;
}
.placeholder {
  height: 100%;
  display: grid;
  place-items: center;
  text-align: center;
  background: #fff;
  border: 1px dashed #cbd7db;
  border-radius: 10px;
}
.placeholder div {
  max-width: 450px;
}
.placeholder h2 {
  margin: 8px;
}
.lock-symbol {
  font-size: 38px;
  color: var(--gold);
}
@media (max-width: 1050px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .app {
    grid-template-columns: 205px minmax(0, 1fr);
  }
}
@media (max-width: 760px) {
  .app {
    grid-template-columns: 1fr;
  }
  aside {
    position: fixed;
    z-index: 30;
    width: 236px;
    transform: translateX(-100%);
    transition: 0.2s;
  }
  .app.nav-open aside {
    transform: none;
  }
  #mobileNav {
    display: inline-block;
  }
  .cards {
    grid-template-columns: 1fr 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .full {
    grid-column: auto;
  }
  header,
  #toolbar,
  #content {
    padding-left: 14px;
    padding-right: 14px;
  }
  .user-badge {
    display: none;
  }
}
.permission-layout {
  height: 100%;
  display: grid;
  grid-template-columns: 235px minmax(0, 1fr);
  gap: 14px;
}
.account-list,
.permission-editor {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: auto;
}
.account-row {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #edf1f2;
  background: #fff;
  text-align: left;
  padding: 13px 16px;
  display: grid;
  gap: 3px;
  color: var(--ink);
}
.account-row small {
  color: var(--muted);
}
.account-row.active {
  background: #eaf4f4;
  box-shadow: inset 3px 0 var(--teal);
}
.permission-editor {
  padding: 20px;
}
.permission-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 13px;
  margin-bottom: 13px;
}
.permission-title h2,
.permission-title p {
  margin: 0 0 3px;
}
.switch-line {
  display: flex;
  grid-template-columns: auto auto;
  align-items: center;
  margin: 0;
}
.switch-line input,
.check-item input {
  width: auto;
  height: auto;
}
.permission-editor fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 13px 0;
  padding: 12px 14px;
}
.permission-editor legend {
  font-weight: 800;
  font-size: 13px;
  padding: 0 6px;
}
.check-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 8px;
}
.check-item {
  display: flex;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 6px 8px;
  border-radius: 6px;
  background: #f7f9fa;
  font-weight: 500;
}
.scope-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr;
  gap: 14px;
}
.scope-grid > div {
  display: grid;
  gap: 6px;
}
.field-hint {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 9px;
}
.history-list {
  display: grid;
  gap: 8px;
}
.history-item {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  background: #f5f8f9;
  border-radius: 7px;
}
.history-item small {
  color: var(--muted);
}
@media (max-width: 1050px) {
  .check-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .scope-grid {
    grid-template-columns: 1fr 1fr;
  }
  .scope-grid > label {
    grid-column: 1/-1;
  }
}
@media (max-width: 760px) {
  .permission-layout {
    grid-template-columns: 1fr;
  }
  .account-list {
    max-height: 190px;
  }
  .check-grid,
  .scope-grid {
    grid-template-columns: 1fr;
  }
}
.segmented {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #f7f9fa;
}
.segmented button {
  height: 34px;
  border: 0;
  border-right: 1px solid var(--line);
  padding: 0 14px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}
.segmented button:last-child {
  border-right: 0;
}
.segmented button.active {
  background: var(--teal);
  color: #fff;
}
.preview-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.preview-list span {
  padding: 5px 8px;
  background: #f2f6f6;
  border-radius: 6px;
  font-size: 11px;
}
.release-grid {
  height: calc(100% - 55px);
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  align-content: start;
  gap: 13px;
  padding: 1px;
}
.release-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 17px;
  box-shadow: 0 4px 14px rgba(16, 44, 59, 0.05);
}
.release-card > div:first-child {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.release-card h3 {
  margin: 15px 0 8px;
}
.release-card p {
  margin: 6px 0;
  font-size: 13px;
}
.release-card .table-actions {
  margin-top: 15px;
  flex-wrap: wrap;
}
.release-editor-scroll {
  height: 100%;
  overflow: auto;
  padding: 0 10px 24px;
}
.release-paper {
  width: min(794px, 100%);
  min-height: 1030px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #d9e0e3;
  box-shadow: 0 14px 35px rgba(16, 44, 59, 0.12);
  padding: 42px 52px;
}
.release-paper-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 4px solid var(--teal);
  padding-bottom: 18px;
}
.release-paper-head div {
  display: grid;
  gap: 4px;
}
.release-paper-head strong {
  font-size: 24px;
  letter-spacing: 0.11em;
}
.release-paper-head span {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.12em;
}
.release-paper-head em {
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
}
.release-paper h2 {
  text-align: center;
  margin: 30px 0 20px;
}
.paper-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}
.paper-grid label {
  margin: 7px 0;
}
.paper-grid .full {
  grid-column: 1/-1;
}
.release-paper textarea {
  height: 64px;
}
.paper-yard-preview {
  margin-top: 18px;
  background: #f4f8f8;
  border-left: 4px solid var(--teal);
  padding: 13px 16px;
  font-size: 12px;
}
.paper-yard-preview p {
  margin: 5px 0;
}
.release-paper .form-actions {
  margin-top: 24px;
}
@media (max-width: 760px) {
  .release-paper {
    padding: 25px 20px;
    min-height: auto;
  }
  .paper-grid {
    grid-template-columns: 1fr;
  }
  .paper-grid .full {
    grid-column: auto;
  }
  .release-grid {
    grid-template-columns: 1fr;
  }
}
.release-card.focused {
  outline: 3px solid rgba(22, 141, 140, 0.25);
  border-color: var(--teal);
}
.execution-groups {
  display: grid;
  gap: 10px;
}
.execution-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.execution-group summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: #f5f8f9;
  cursor: pointer;
}
.execution-table {
  overflow: auto;
}
.execution-head,
.execution-row {
  min-width: 820px;
  display: grid;
  grid-template-columns: 1.35fr 0.9fr 1.1fr 0.5fr 0.5fr 0.5fr 1.2fr;
  gap: 8px;
  align-items: center;
  padding: 10px 14px;
}
.execution-head {
  font-size: 11px;
  color: var(--muted);
  font-weight: 800;
  border-bottom: 1px solid var(--line);
}
.execution-row {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #edf1f2;
  background: #fff;
  text-align: left;
  color: var(--ink);
}
.execution-row:hover {
  background: #f7fbfb;
}
.execution-row strong {
  color: var(--teal2);
}
.empty.compact {
  padding: 20px;
}
.container-list-input {
  min-height: 112px;
  font-family: Consolas, "Courier New", monospace;
  line-height: 1.55;
}
.cost-page {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.cost-table {
  height: auto;
  flex: 1;
  min-height: 0;
}
.direction {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  padding: 4px 7px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 11px;
}
.direction.ar {
  background: #e1f4ec;
  color: #257655;
}
.direction.ap {
  background: #fff0dc;
  color: #9a641c;
}
.pending-price {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 10px;
  background: #fff1d8;
  color: #9a641c;
  font-size: 11px;
  font-weight: 800;
}
.profit-strip {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.profit-strip span {
  padding: 9px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
}
.profit-strip strong {
  margin-left: 7px;
}
.preview-box {
  margin-top: 10px;
  padding: 12px 14px;
  background: #edf6f6;
  border-left: 4px solid var(--teal);
  font-size: 13px;
}
.bill-line-list {
  display: grid;
  gap: 7px;
  max-height: 280px;
  overflow: auto;
  margin-top: 14px;
}
.bill-line {
  display: grid;
  grid-template-columns: auto 1fr 130px;
  gap: 10px;
  align-items: center;
  margin: 0;
  padding: 8px 10px;
  background: #f5f8f9;
  border-radius: 7px;
}
.bill-line input {
  margin: 0;
}
.cost-tabs-bar {
  height: 36px;
  min-width: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
}
.cost-tabs-bar .segmented {
  flex: 0 0 auto;
  height: 36px;
}
.cost-content-frame {
  min-width: 0;
  scrollbar-gutter: stable;
}
.col-resizer {
  position: absolute;
  right: -4px;
  top: 0;
  width: 9px;
  height: 100%;
  cursor: col-resize;
  touch-action: none;
  z-index: 4;
}
.col-resizer:hover,
.col-resizer:active {
  background: rgba(22, 141, 140, 0.32);
}
.reset-columns {
  margin-left: auto;
  white-space: nowrap;
}
.cost-tabs-bar .cost-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  min-width: 310px;
}
.cost-content-frame .page-scroll,
.cost-content-frame .finance-page {
  scrollbar-gutter: stable both-edges;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.detail-grid > div {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
}
.detail-grid span {
  font-size: 11px;
  color: var(--muted);
}
.detail-grid strong {
  overflow-wrap: anywhere;
}
.release-business-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px 12px;
  margin-top: 12px;
  padding: 10px;
  background: #f7fafb;
  border-radius: 8px;
  font-size: 12px;
}
.release-business-meta span {
  display: grid;
  gap: 2px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.release-business-meta b {
  font-size: 10px;
  color: var(--muted);
}
.release-business-meta .full {
  grid-column: 1/-1;
}
.paired-cost {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 14px 0;
}
.paired-cost fieldset {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.paired-cost legend {
  font-weight: 700;
  padding: 0 6px;
}
.finance-page {
  height: 100%;
  overflow: auto;
}
.finance-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}
.finance-tabs button.active {
  background: var(--ink);
  color: #fff;
}
.finance-grid {
  display: grid;
  grid-template-columns: minmax(360px, 42%) minmax(520px, 58%);
  grid-template-rows: minmax(260px, auto) minmax(300px, 1fr);
  gap: 10px;
  min-height: calc(100vh - 190px);
}
.finance-grid section {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  min-width: 0;
  overflow: auto;
}
.finance-grid h3 {
  position: sticky;
  top: -12px;
  background: #fff;
  margin: -2px 0 12px;
  padding: 8px 0;
  z-index: 2;
}
.amount-link {
  border: 0;
  background: transparent;
  color: #087ca7;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}
.workorder-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}
.workorder-list button {
  text-align: left;
  border: 1px solid var(--line);
  background: #f7fafb;
  padding: 9px;
  border-radius: 7px;
  cursor: pointer;
}
.workorder-list button:hover {
  border-color: #15919a;
}
.finance-grid .data-table {
  min-width: 520px;
}
@media (max-width: 1000px) {
  .finance-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .paired-cost {
    grid-template-columns: 1fr;
  }
}
.container-status-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.container-status-cards .metric {
  border: 1px solid var(--line);
  background: var(--panel);
  text-align: left;
  cursor: pointer;
}
.container-status-cards .metric.selected {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(22, 141, 140, 0.16);
}
.container-status-tabs {
  margin-bottom: 12px;
}
.filter-row,
.pagination {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0 0 12px;
}
.pagination {
  justify-content: flex-end;
  margin-top: 12px;
}
.focused-record {
  outline: 2px solid var(--teal);
}
@media (max-width: 900px) {
  .container-status-cards {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }
}
.sortable-head {
  cursor: pointer;
}
.sortable-head:hover {
  color: var(--teal);
}
.execution-group[open] .execution-table {
  max-height: 210px;
  overflow: auto;
  overscroll-behavior: auto;
  scrollbar-gutter: stable;
}
.execution-table .execution-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f5f8f9;
}
.dashboard-stock-scroll {
  max-height: min(330px, 45vh);
  overflow: auto;
  overscroll-behavior: auto;
  scrollbar-gutter: stable;
}
.master-tabs {
  max-width: 100%;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-gutter: stable;
}
.master-tabs button {
  flex: 0 0 auto;
}
.grade-library-entry {
  height: auto;
  min-height: 36px;
  max-width: 430px;
  white-space: normal;
}
.bulk-grid {
  align-items: start;
}
.bulk-field {
  display: grid;
  grid-template-columns: auto minmax(120px, 0.65fr) minmax(150px, 1fr);
  gap: 8px;
  align-items: center;
  margin: 6px 0;
}
.bulk-check {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  white-space: nowrap;
}
.bulk-check input {
  width: auto;
  height: auto;
}
.bulk-field .bulk-mode,
.bulk-field .bulk-value {
  margin: 0;
}
.bulk-field textarea {
  height: 54px;
}
.bulk-preview {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
}
.bulk-preview .import-summary,
.grade-import-preview .import-summary {
  grid-template-columns: repeat(4, 1fr);
}

.preview-loading {
  display: flex;
  min-height: 88px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px;
  color: var(--muted);
}

.loading-indicator {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border: 2px solid var(--line);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: preview-spin 0.8s linear infinite;
}

@keyframes preview-spin {
  to {
    transform: rotate(360deg);
  }
}

.preview-performance {
  margin: 8px 0;
  color: var(--muted);
  font-size: 12px;
}

.preview-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}
.bulk-preview-table {
  max-height: 320px;
  overflow: auto;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
}
.bulk-preview-table .data-table {
  font-size: 11px;
}
.bulk-preview-table td {
  vertical-align: top;
  white-space: normal;
  min-width: 150px;
}
.date-control {
  position: relative;
  display: flex;
  width: 100%;
  min-width: 0;
}
.date-control > [data-date-input] {
  width: 100%;
  min-width: 0;
  padding-right: 42px;
}
.date-picker-trigger {
  position: absolute;
  right: 5px;
  top: 50%;
  width: 32px;
  height: 30px;
  padding: 0;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
}
.date-picker-trigger:hover:not(:disabled) {
  color: var(--teal);
  background: var(--bg);
}
.date-picker-native {
  position: absolute;
  right: 5px;
  bottom: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.data-table td.preview-conflict {
  color: var(--danger);
  background: #fae8e8;
}
@media (max-width: 760px) {
  .bulk-field {
    grid-template-columns: auto 1fr;
  }
  .bulk-field .bulk-value {
    grid-column: 1/-1;
  }
  .grade-library-entry {
    max-width: 100%;
  }
}
.bulk-update-modal {
  width: min(1080px, calc(100vw - 48px));
  max-height: 92vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.bulk-update-modal #modalBody {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding-bottom: 0;
}
.bulk-update-modal #bulkForm {
  min-width: 0;
}
.bulk-update-modal .bulk-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 22px;
}
.bulk-update-modal .bulk-field {
  grid-template-columns: minmax(104px, auto) minmax(150px, 180px) minmax(
      180px,
      1fr
    );
  gap: 10px;
  min-width: 0;
  margin: 4px 0;
}
.bulk-update-modal .bulk-field[data-field="notes"] {
  grid-column: 1/-1;
}
.bulk-update-modal .bulk-field > * {
  min-width: 0;
}
.bulk-update-modal .bulk-field select,
.bulk-update-modal .bulk-field input,
.bulk-update-modal .bulk-field textarea {
  width: 100%;
  max-width: 100%;
}
.bulk-update-modal .bulk-field textarea {
  height: 78px;
  min-height: 78px;
}
.bulk-update-modal .form-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: #fff;
  margin: 18px -22px 0;
  padding: 14px 22px 18px;
}
.bulk-update-modal .bulk-preview-table {
  overflow-x: hidden;
}
.bulk-update-modal .bulk-preview-table .data-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}
.bulk-update-modal .bulk-preview-table td {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}
@media (max-width: 940px) {
  .bulk-update-modal {
    width: min(760px, calc(100vw - 28px));
  }
  .bulk-update-modal .bulk-grid {
    grid-template-columns: 1fr;
  }
  .bulk-update-modal .bulk-field[data-field="notes"] {
    grid-column: auto;
  }
}
@media (max-width: 620px) {
  .bulk-update-modal {
    width: calc(100vw - 18px);
    max-height: 95vh;
  }
  .bulk-update-modal .bulk-field {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .bulk-update-modal .bulk-field .bulk-value {
    grid-column: 1/-1;
  }
  .bulk-update-modal #modalBody {
    padding-left: 14px;
    padding-right: 14px;
  }
  .bulk-update-modal .form-actions {
    margin-left: -14px;
    margin-right: -14px;
    padding-left: 14px;
    padding-right: 14px;
    flex-wrap: wrap;
  }
}
