:root {
  font-family: "Yu Gothic UI", "Meiryo", sans-serif;
  color: #172033;
  background: #e9eef5;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
}
main {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 16px;
}
.panel,
header,
.layout,
footer {
  background: #fff;
  border: 1px solid #c8d2df;
  box-shadow: 0 10px 28px #21334c18;
}
.login {
  max-width: 520px;
  margin: 8vh auto;
  padding: 42px;
  border-top: 6px solid #1f4e78;
}
.test-login-info {
  margin-top: 20px;
  padding: 14px 16px;
  border: 1px solid #b7d6ca;
  border-radius: 6px;
  background: #eef9f4;
}
.test-login-info p { margin: 8px 0 0; }
.test-login-info code { font-size: 1rem; user-select: all; }
h1 {
  margin: 0.2rem 0 1rem;
}
.eyebrow {
  margin: 0;
  color: #1f4e78;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}
label {
  display: block;
  margin: 20px 0 8px;
  font-weight: 700;
}
input {
  display: block;
  width: 100%;
  margin-top: 7px;
  padding: 13px;
  border: 1px solid #9aabbd;
  border-radius: 4px;
  font-size: 1rem;
}
button {
  border: 0;
  border-radius: 4px;
  background: #1f4e78;
  color: #fff;
  padding: 12px 20px;
  font-weight: 800;
  cursor: pointer;
}
form button {
  width: 100%;
  margin-top: 24px;
}
.error {
  color: #a00;
  min-height: 1.4em;
}
.warning {
  margin: 14px 0;
  padding: 12px 16px;
  background: #fff2cc;
  border-left: 5px solid #d69e00;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 26px;
  border-top: 6px solid #1f4e78;
}
.user {
  display: flex;
  gap: 14px;
  align-items: center;
}
.subtle {
  background: #596b7d;
}
.layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  min-height: 560px;
  margin-top: 16px;
}
nav {
  padding: 16px;
  border-right: 1px solid #c8d2df;
  background: #f7f9fc;
}
.menu-button {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  margin-bottom: 10px;
  text-align: left;
  background: #fff;
  color: #172033;
  border: 1px solid #b9c5d2;
}
.menu-button:hover,
.menu-button:focus {
  border-color: #1f4e78;
  box-shadow: 0 0 0 3px #1f4e7822;
}
.key {
  font-family: Consolas, monospace;
  color: #1f4e78;
  font-weight: 900;
}
.status {
  font-size: 0.75rem;
  background: #fff2cc;
  padding: 4px 7px;
  border-radius: 12px;
}
.workspace {
  padding: 34px;
  min-width: 0;
}
.workspace h2 {
  border-bottom: 2px solid #1f4e78;
  padding-bottom: 12px;
}
.result {
  margin-top: 24px;
  padding: 20px;
  background: #f7f9fc;
  border: 1px solid #d2dae4;
  min-height: 160px;
  white-space: pre-wrap;
  min-width: 0;
}
.search-form {
  display: grid;
  grid-template-columns: 2fr 2fr 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}
.search-form label {
  margin: 0;
}
.search-form input {
  margin-top: 5px;
}
.search-form select {
  display: block;
  width: 100%;
  height: 44px;
  margin-top: 5px;
  padding: 0 12px;
  border: 1px solid #9aabbd;
  border-radius: 4px;
  background: #fff;
  font-size: 1rem;
}
.search-form input:focus {
  background: #fff;
  border-color: #1f4e78;
  box-shadow: 0 0 0 3px rgba(31, 78, 120, 0.2);
  outline: 2px solid #1f4e78;
  outline-offset: 1px;
}
.date-entry {
  position: relative;
  display: block;
}
.search-form .date-text {
  padding-right: 48px;
  font-variant-numeric: tabular-nums;
}
.search-form .date-picker {
  position: absolute;
  top: 5px;
  right: 0;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}
.date-entry::after {
  content: "📅";
  position: absolute;
  right: 11px;
  top: 16px;
  pointer-events: none;
  font-size: 17px;
}
.search-form button {
  height: 44px;
  margin-top: 0;
}
.billing-search-form {
  grid-template-columns: minmax(190px, 1.5fr) auto minmax(190px, 1fr) minmax(190px, 1fr) minmax(140px, 0.8fr) auto;
  overflow-x: auto;
  padding: 4px;
  scroll-padding-inline: 4px;
}
.draft-list-search {
  grid-template-columns: minmax(320px, 2fr) minmax(160px, 0.7fr) auto auto;
  margin-bottom: 12px;
}
.billing-search-form .date-text {
  min-width: 190px;
}
.customer-selector {
  margin: 18px 0;
  padding: 18px;
  border: 2px solid #1f4e78;
  background: #eef5fb;
}
.customer-selector-header,
.customer-list-form {
  display: flex;
  align-items: end;
  gap: 12px;
}
.customer-selector-header {
  justify-content: space-between;
  align-items: center;
}
.customer-selector-header h3,
.customer-list-form label {
  margin: 0;
}
.customer-list-form label {
  flex: 1;
}
.customer-list-form button {
  width: auto;
  height: 44px;
  margin: 0;
}
.customer-list-table {
  max-height: 330px;
}
.reconcile-note {
  margin: 7px 0 18px;
  color: #596b7d;
  font-size: 0.86rem;
}
.reference-detail {
  margin: 18px 0;
  padding: 18px;
  border: 2px solid #1f4e78;
  background: #fff;
}
.reference-detail-header,
.reference-detail-summary {
  display: flex;
  align-items: center;
  gap: 14px;
}
.reference-detail-header {
  justify-content: space-between;
}
.reference-detail-header h3 {
  margin: 0;
}
.reference-detail-summary {
  flex-wrap: wrap;
  margin: 14px 0;
}
.reference-detail-summary > span {
  display: flex;
  gap: 7px;
  align-items: center;
}
.reference-detail-values {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  margin: 0;
  border-top: 1px solid #c8d2df;
  border-left: 1px solid #c8d2df;
}
.reference-detail-values > div {
  border-right: 1px solid #c8d2df;
  border-bottom: 1px solid #c8d2df;
}
.reference-detail-values dt,
.reference-detail-values dd {
  margin: 0;
  padding: 8px 10px;
}
.reference-detail-values dt {
  background: #eef5fb;
  font-weight: 700;
}
.reference-detail-values dd {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.reference-detail-values .difference {
  color: #a33a16;
  font-weight: 800;
}
.reconciliation-check-note {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 10px;
  margin-top: 12px;
  padding: 12px 14px;
  border-left: 5px solid #d69e00;
  background: #fff8df;
}
.reconciliation-check-note small {
  grid-column: 2;
  color: #596b7d;
}
.related-candidate-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}
.related-candidate-actions span,
.related-candidate-heading span {
  color: #596b7d;
  font-size: 0.86rem;
}
.related-candidate-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0 8px;
}
.related-candidate-totals {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  margin-bottom: 10px;
  border: 1px solid #c8d2df;
  background: #f7f9fc;
}
.related-candidate-totals span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-right: 1px solid #c8d2df;
  font-variant-numeric: tabular-nums;
}
.related-candidate-totals span:last-child {
  border-right: 0;
}
.related-candidate-totals .matched {
  color: #236b3b;
}
.related-candidate-totals .difference {
  color: #a33a16;
  background: #fff8df;
}
.related-candidate-table {
  max-height: 280px;
}
.reference-detail-updated {
  margin: 10px 0 0;
  text-align: right;
  color: #596b7d;
  font-size: 0.86rem;
}
.table-wrap {
  overflow: auto;
  width: 100%;
  max-width: 100%;
  max-height: 420px;
  background: #fff;
}
.draft-list-table th:last-child,
.draft-list-table td:last-child {
  position: sticky;
  right: 0;
  z-index: 2;
  min-width: 150px;
  background: #fff;
  box-shadow: -4px 0 7px rgba(26, 55, 82, 0.14);
}
.draft-list-table th:last-child {
  z-index: 4;
  background: #1f4e78;
}
.draft-list-table tbody tr:nth-child(even) td:last-child {
  background: #eef6fb;
}
.draft-list-table td:last-child .small {
  margin: 2px;
}
table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}
th {
  position: sticky;
  top: 0;
  background: #1f4e78;
  color: #fff;
  text-align: left;
}
th,
td {
  padding: 9px 10px;
  border-bottom: 1px solid #d9e0e8;
}
tbody tr:nth-child(even) {
  background: #eef6fb;
}
td:last-child {
  text-align: right;
}
footer {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  padding: 12px 20px;
  color: #526274;
  font-size: 0.85rem;
}
@media (max-width: 1100px) {
  .search-form {
    grid-template-columns: 1fr 1fr;
  }
  .billing-search-form {
    grid-template-columns: minmax(220px, 1fr) auto minmax(190px, 1fr);
  }
  .reference-detail-values {
    grid-template-columns: repeat(3, minmax(130px, 1fr));
  }
}
@media (max-width: 800px) {
  main {
    padding: 10px;
  }
  .layout {
    grid-template-columns: 1fr;
  }
  nav {
    border-right: 0;
    border-bottom: 1px solid #c8d2df;
  }
  header {
    align-items: flex-start;
  }
  .user {
    flex-direction: column;
    align-items: flex-end;
  }
  .search-form {
    grid-template-columns: 1fr;
  }
  .reference-detail-values {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }
  .related-candidate-totals {
    grid-template-columns: 1fr;
  }
  .related-candidate-totals span {
    border-right: 0;
    border-bottom: 1px solid #c8d2df;
  }
}
.result-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.result-bar p {
  font-weight: 700;
}
.small {
  padding: 8px 14px;
  margin-left: 6px;
}
.small:disabled {
  opacity: 0.45;
  cursor: default;
}
tbody tr {
  cursor: pointer;
}
tbody tr.selected {
  background: #cce5ff !important;
  outline: 2px solid #1f4e78;
  outline-offset: -2px;
}
.number {
  text-align: right;
}
.construction-table th:nth-child(1) {
  min-width: 150px;
}
.construction-table th:nth-child(2) {
  min-width: 110px;
}
.construction-table th:nth-child(3) {
  min-width: 170px;
}
.construction-table th:nth-child(4) {
  min-width: 190px;
}
.construction-table th:nth-child(5),
.construction-table th:nth-child(6) {
  min-width: 100px;
}
.construction-table th:nth-child(7) {
  min-width: 120px;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.detail-grid dl {
  margin: 0;
  padding: 14px;
  background: #fff;
  border: 1px solid #d2dae4;
}
.detail-grid dt {
  font-size: 0.78rem;
  color: #596b7d;
  font-weight: 700;
}
.detail-grid dd {
  margin: 2px 0 12px;
  font-weight: 700;
}
.detail-table {
  max-height: 390px;
}
@media (max-width: 1100px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
}
.selection-note {
  margin: 10px 0;
  padding: 10px 14px;
  background: #fff2cc;
  border-left: 5px solid #d69e00;
}
.plan-form {
  grid-template-columns: 1.4fr 1.4fr 1.6fr 1.4fr auto;
}
.order-form {
  grid-template-columns: 1.3fr 1.2fr 1.4fr 1fr 1fr auto;
}
.order-table {
  min-width: 1250px;
}
.order-sheet-paper {
  max-width: 210mm;
  min-height: 270mm;
  margin: 0 auto;
  padding: 14mm 13mm;
  color: #111;
  background: #fff;
  border: 1px solid #b9c5d2;
  white-space: normal;
}
.order-sheet-pages {
  display: grid;
  gap: 18px;
}
.order-sheet-page-break { display: none; }
.order-sheet-paper + .order-sheet-paper {
  break-before: page;
}
.order-sheet-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 3px double #222;
}
.order-sheet-title h3 {
  margin: 0 auto 8px;
  font-size: 1.8rem;
  letter-spacing: 0.35em;
}
.order-sheet-title p { margin: 0 0 8px; }
.order-sheet-parties {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 22px;
  margin-top: 18px;
}
.order-sheet-parties h4 {
  margin: 0 0 8px;
  padding-bottom: 5px;
  border-bottom: 1px solid #222;
  font-size: 1.2rem;
}
.order-sheet-parties p { margin: 5px 0; }
.issuer { text-align: right; }
.order-sheet-greeting { margin: 18px 0 10px; }
.order-sheet-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding: 9px 10px;
  border: 1px solid #333;
}
.order-sheet-total {
  display: flex;
  align-items: baseline;
  gap: 20px;
  width: 56%;
  margin: 14px 0;
  padding: 7px 12px;
  border-bottom: 3px double #222;
}
.order-sheet-total strong { font-size: 1.4rem; }
.order-sheet-lines {
  margin-top: 14px;
  table-layout: auto;
  white-space: normal;
  font-size: 0.82rem;
}
.order-sheet-lines th {
  position: static;
  background: #e8edf3;
  color: #111;
  border: 1px solid #555;
}
.order-sheet-lines td { border: 1px solid #777; vertical-align: top; }
.combined-invoice-page-totals {
  display: flex;
  justify-content: flex-end;
  gap: 22px;
  margin-top: 8px;
  padding: 7px 10px;
  border-top: 1px solid #777;
}
.combined-invoice-page-totals .grand-total {
  padding-left: 16px;
  border-left: 3px double #222;
}
.order-sheet-note {
  min-height: 60px;
  margin-top: 12px;
  padding: 8px;
  border: 1px solid #777;
}
.order-sheet-note p { margin: 5px 0; }
footer.order-sheet-footer {
  display: block;
  margin: 18px 0 0;
  padding: 6px 0 0;
  border: 0;
  border-top: 1px solid #999;
  box-shadow: none;
  text-align: center;
  font-size: 0.72rem;
}
@media print {
  @page { size: A4 portrait; margin: 7mm; }
  :root { background: #fff; }
  body.print-order-sheet { background: #fff; }
  body.print-order-sheet main { padding: 0; }
  body.print-order-sheet header,
  body.print-order-sheet nav,
  body.print-order-sheet main > section > footer,
  body.print-order-sheet .workspace > h2,
  body.print-order-sheet .workspace > #screenHelp,
  body.print-order-sheet .preview-actions { display: none !important; }
  body.print-order-sheet .layout { display: block; min-height: 0; margin: 0; border: 0; box-shadow: none; }
  body.print-order-sheet .workspace { padding: 0; }
  body.print-order-sheet .result { margin: 0; padding: 0; border: 0; background: #fff; }
  body.print-order-sheet .order-sheet-paper {
    box-sizing: border-box;
    width: 182mm;
    max-width: none;
    height: auto;
    min-height: 0;
    padding: 0;
    border: 0;
    font-size: 9.5pt;
    overflow: visible;
    break-inside: auto;
    page-break-inside: auto;
  }
  body.print-order-sheet .order-sheet-pages { display: block; }
  body.print-order-sheet .order-sheet-page-break {
    display: block;
    height: 1px;
    margin: 0;
    padding: 0;
    break-after: page;
    page-break-after: always;
  }
  body.print-order-sheet .order-sheet-title h3 { margin-bottom: 4px; font-size: 18pt; }
  body.print-order-sheet .order-sheet-title p { margin-bottom: 4px; }
  body.print-order-sheet .order-sheet-parties { gap: 14px; margin-top: 8px; }
  body.print-order-sheet .order-sheet-parties h4 { margin-bottom: 3px; padding-bottom: 3px; font-size: 11pt; }
  body.print-order-sheet .order-sheet-parties p { margin: 2px 0; }
  body.print-order-sheet .order-sheet-greeting { margin: 8px 0 5px; }
  body.print-order-sheet .order-sheet-meta { gap: 4px 16px; padding: 5px 7px; }
  body.print-order-sheet .order-sheet-total { margin: 7px 0; padding: 4px 8px; }
  body.print-order-sheet .order-sheet-total strong { font-size: 14pt; }
  body.print-order-sheet .order-sheet-lines { margin-top: 6px; font-size: 7.8pt; line-height: 1.05; }
  body.print-order-sheet .order-sheet-lines th,
  body.print-order-sheet .order-sheet-lines td { padding: 2px 3px; }
  body.print-order-sheet .order-sheet-lines thead { display: table-header-group; }
  body.print-order-sheet .order-sheet-lines tr { break-inside: avoid; }
  body.print-order-sheet .order-sheet-note { min-height: 34px; margin-top: 6px; padding: 5px; }
  body.print-order-sheet .order-sheet-note p { margin: 2px 0; }
  body.print-order-sheet footer.order-sheet-footer { margin-top: 4px; padding-top: 3px; font-size: 7.5pt; }
  body.print-order-document { margin: 0; }
  body.print-order-document > .order-sheet-pages { margin: 0; padding: 0; }
  body.print-order-document .order-sheet-paper {
    display: block;
    margin: 0 auto;
    break-inside: avoid-page;
    page-break-inside: avoid;
  }
  body.print-order-document .order-sheet-new-page {
    break-before: page;
    page-break-before: always;
  }
}
.order-sheet-print-frame {
  position: fixed;
  width: 1px;
  height: 1px;
  right: 0;
  bottom: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}
.screen-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
}
.inline-action-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #25384b;
  font-weight: 800;
}
.inline-action-label select {
  min-width: 150px;
}
.screen-actions span {
  color: #596b7d;
  font-weight: 700;
}
.combined-invoice-guide {
  margin: 0 0 14px;
  padding: 14px;
  border: 1px solid #9fb3c8;
  border-left: 6px solid #235b86;
  background: #f7fbff;
}
.combined-invoice-guide h3 { margin: 0 0 10px; color: #183a59; }
.combined-invoice-guide ol {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.combined-invoice-guide li {
  min-height: 76px;
  padding: 10px;
  border: 1px solid #c7d4e0;
  border-radius: 4px;
  background: #fff;
}
.combined-invoice-guide li b,
.combined-invoice-guide li span { display: block; }
.combined-invoice-guide li b { margin-bottom: 5px; color: #173f63; }
.combined-invoice-guide li span { color: #52667a; font-size: 0.9rem; line-height: 1.45; }
.combined-invoice-guide li.is-complete {
  border-color: #5ba374;
  background: #e8f7ed;
}
.combined-invoice-guide li.is-current {
  border-color: #235b86;
  box-shadow: inset 0 0 0 2px #235b86;
  background: #edf6ff;
}
.combined-invoice-guide li.is-complete b::after { content: "　✓完了"; color: #18713a; }
.combined-invoice-guide p {
  margin: 10px 0 0;
  color: #173f63;
  font-weight: 800;
}
.combined-invoice-guide > button {
  width: auto;
  margin-top: 10px;
}
.combined-invoice-settings {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) repeat(3, minmax(155px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}
.combined-invoice-settings label {
  color: #25384b;
  font-weight: 800;
}
.combined-invoice-settings-validation {
  margin: 0 0 10px;
  padding: 9px 12px;
  border-left: 5px solid #218447;
  background: #e8f7ed;
  color: #176437;
  font-weight: 800;
}
.combined-invoice-settings-validation.has-error {
  border-left-color: #bd1e36;
  background: #ffe8ec;
  color: #9f1730;
}
.combined-invoice-settings [aria-invalid="true"] {
  border-color: #bd1e36;
  box-shadow: 0 0 0 2px rgba(189, 30, 54, 0.18);
  background: #fff8f9;
}
.combined-invoice-settings input {
  width: 100%;
  margin-top: 4px;
}
.combined-invoice-settings select {
  width: 100%;
  margin-top: 4px;
}
.combined-invoice-settings .combined-invoice-remarks {
  grid-column: span 3;
}
.combined-invoice-period-note {
  grid-column: 1 / -1;
  margin: 0;
  color: #596b7d;
  font-weight: 700;
}
.combined-invoice-period-presets {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
}
.combined-invoice-period-presets button { width: auto; }
.combined-invoice-selection-panel {
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid #9aabbd;
  background: #fff;
}
.combined-invoice-selection-panel h3 { margin: 0 0 10px; }
.combined-invoice-selection-panel table { min-width: 760px; }
.combined-invoice-preflight {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-left: 5px solid #23864b;
  background: #e3f5e8;
}
.combined-invoice-preflight.has-warning {
  border-left-color: #d69e00;
  background: #fff2cc;
}
.combined-invoice-inspection-meta {
  display: block;
  margin-top: 7px;
  color: #40566a;
  font-weight: 700;
}
.combined-invoice-preflight span { font-weight: 800; }
.combined-invoice-preflight .table-wrap { margin-top: 10px; background: #fff; }
.combined-invoice-preflight table { min-width: 760px; }
.combined-invoice-preflight th { position: static; }
.combined-invoice-detail-preview {
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid #9aabbd;
  background: #fff;
}
.combined-invoice-detail-preview h3 { margin: 0 0 4px; }
.combined-invoice-detail-preview p { margin: 0 0 10px; color: #25384b; font-weight: 800; }
.combined-invoice-detail-preview table { min-width: 1280px; }
.combined-invoice-detail-preview th { position: static; }
.combined-invoice-excluded-preview {
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid #d7b34b;
  background: #fffaf0;
}
.combined-invoice-excluded-preview h3 { margin: 0 0 4px; }
.combined-invoice-excluded-preview p { margin: 0 0 10px; color: #694d00; font-weight: 800; }
.combined-invoice-excluded-preview table { min-width: 1080px; }
.combined-invoice-excluded-preview th { position: static; }
.exclusion-reason { color: #9b2c2c; font-weight: 800; }
@media (max-width: 1050px) {
  .combined-invoice-guide ol { grid-template-columns: repeat(2, minmax(170px, 1fr)); }
  .combined-invoice-settings { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
}
.draft-warning {
  margin-bottom: 12px;
  padding: 10px 14px;
  background: #fff2cc;
  border-left: 5px solid #d69e00;
  font-weight: 800;
}
.draft-header {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin-bottom: 14px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #d2dae4;
}
.draft-table {
  max-height: 430px;
  overflow-x: auto;
  overflow-y: auto;
  scrollbar-gutter: stable;
}
.draft-table table {
  width: max-content;
  min-width: 100%;
}
.draft-table input {
  min-width: 105px;
  padding: 7px;
  margin: 0;
  border: 1px solid #b9c5d2;
}
.draft-table td:nth-child(4) input {
  min-width: 190px;
}
.draft-table td:nth-child(12) input {
  min-width: 180px;
}
.draft-table .numeric-input {
  min-width: 85px;
  text-align: right;
}
.confirm-button {
  background: #287a46;
}
.validation-errors {
  margin: 10px 0;
  padding: 12px 16px;
  color: #8b0000;
  background: #ffe8e8;
  border-left: 5px solid #b00020;
}
.validation-errors ul {
  margin: 8px 0 0;
}
.summary-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.summary-cards div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px;
  background: #fff;
  border: 1px solid #d2dae4;
}
.summary-cards strong {
  font-size: 1.3rem;
  color: #1f4e78;
}
.confirm-table table {
  width: max-content;
  min-width: 100%;
}
.confirm-actions {
  justify-content: flex-end;
  margin-top: 14px;
}
.save-success {
  margin: 12px 0;
  padding: 12px 16px;
  color: #155d31;
  background: #e4f6e9;
  border-left: 5px solid #287a46;
}
.danger { background: #9b2c2c; }
.row-actions {
  display: flex;
  gap: 8px;
  min-width: 410px;
}
.state-badge {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 999px;
  font-weight: 800;
  white-space: nowrap;
}
.state-badge.trial { background: #fff2cc; color: #7a5700; }
.state-badge.registered { background: #dff3e6; color: #155d31; }
.opening-balance-form {
  display: grid;
  grid-template-columns: minmax(200px, 260px) minmax(300px, 1fr) auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 14px;
}
.opening-balance-form label { font-weight: 800; }
.opening-balance-form input { width: 100%; margin-top: 6px; }
.button-link { display: inline-block; padding: 10px 14px; border-radius: 4px; text-decoration: none; text-align: center; }
.opening-preview { max-height: 440px; }
.master-import-form { display: grid; grid-template-columns: 180px 280px minmax(300px, 1fr); gap: 14px; align-items: end; margin-bottom: 10px; }
.master-import-form label { font-weight: 800; }
.master-import-form select,.master-import-form input { width: 100%; margin-top: 6px; }
.master-import-preview { max-height: 440px; }
@media (max-width: 1100px) { .opening-balance-form { grid-template-columns: 1fr; } }
@media (max-width: 1100px) { .master-import-form { grid-template-columns: 1fr; } }
.drawing-master-form { display:grid; grid-template-columns:repeat(4,minmax(160px,1fr)); gap:12px; align-items:end; margin-bottom:16px; }
.drawing-form-actions { display:flex; gap:8px; align-items:center; }
.inactive-row { color:#667085; background:#f3f4f6; }
.drawing-master-form label,.drawing-file-form label { font-weight:800; }
.drawing-master-form input,.drawing-file-form input { width:100%; margin-top:6px; }
.drawing-file-form { display:grid; grid-template-columns:minmax(280px,2fr) minmax(240px,2fr) minmax(170px,1fr) auto; gap:12px; align-items:end; margin-bottom:12px; }
@media (max-width:1100px) { .drawing-master-form,.drawing-file-form { grid-template-columns:1fr 1fr; } }
.plan-form + .result-bar + .selection-note + .table-wrap table {
  font-size: 0.9rem;
}
@media (max-width: 1100px) {
  .plan-form {
    grid-template-columns: 1fr 1fr;
  }
  .order-form {
    grid-template-columns: 1fr 1fr;
  }
}
