:root { color-scheme: light; }
#workspace-nav { display: flex; flex-wrap: wrap; gap: 8px; padding-block: 12px; border-bottom: 1px solid #dce5eb; }
#workspace-nav button { width: auto; margin: 0; }
#workspace-nav button[aria-pressed=true] { background: #183c55; color: white; }
#operations { padding-bottom: 16px; }
#operations fieldset { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 0 16px; margin: 16px 0; padding: 8px 16px 12px; border: 1px solid #ccd5db; border-radius: 8px; }
#operations legend { padding-inline: 6px; font-weight: 650; }
#operations input, #operations select, #operations textarea, #gcategory { width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid #aab6bf; border-radius: 8px; color: inherit; background: white; font: inherit; }
#operations input:disabled, #operations select:disabled, #operations textarea:disabled { background: #edf3f6; color: #263a47; }
#operations textarea { display: block; min-height: 80px; margin-block: 6px; }
#operations article { padding: 12px 0; border-bottom: 1px solid #dce5eb; overflow-wrap: anywhere; }
#operations article p { margin: 6px 0; }
#operations form, .followup { background: #edf3f6; border-radius: 8px; padding: 12px; }
.followup { font: 650 1.05rem/1.6 system-ui; overflow-wrap: anywhere; white-space: pre-wrap; }
.admin-menu {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 205px), 1fr));
  gap: 12px;
}
.admin-menu section {
  padding: 14px;
  border: 1px solid #dce5eb;
  border-radius: 8px;
}
.admin-menu h3 { margin: 0 0 8px; font-size: 1.05rem; }
.admin-menu button { text-align: left; }
.admin-records { margin-block: 12px; padding: 0; list-style: none; }
.admin-records li { padding: 10px 0; border-bottom: 1px solid #dce5eb; overflow-wrap: anywhere; }
.admin-records p { margin: 2px 0 0; font-size: .94rem; }

#order-print {
  width: min(760px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  padding: 16px;
  border: 1px solid #ccd5db;
  border-radius: 12px;
  overflow: auto;
  color: #172b38;
}
#order-print::backdrop { background: #172b3880; }
#order-print header {
  position: sticky;
  top: -16px;
  padding: 8px 0;
  background: white;
}
#order-print header h2 { margin: 0; font-size: 1.1rem; }
#order-print header button { width: auto; margin-inline-end: 8px; }
.order-print-copy {
  min-width: 0;
  padding: 12px 0;
  overflow-wrap: anywhere;
}
.order-print-copy + .order-print-copy { border-top: 1px dashed #73818a; }
.order-print-copy h2 { margin: 0 0 8px; }
.order-print-copy p { margin: 4px 0; white-space: pre-wrap; }
.order-print-total { border-block: 1px solid; padding-block: 4px; font-weight: 700; }
.order-print-signature { padding-top: 10px; }
@page { size: A4 portrait; margin: 8mm; }
@media print {
  body:has(#order-print[open]) { background: white; color: black; }
  body:has(#order-print[open]) > main, #order-print header { display: none; }
  #order-print::backdrop { background: transparent; }
  #order-print[open] {
    position: static;
    width: 100%;
    max-height: none;
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    overflow: visible;
    font-size: 10pt;
  }
  .order-print-copy {
    min-height: 138mm;
    break-inside: avoid;
    padding: 4mm 2mm;
  }
}
