* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #fffaf4;
  color: #513d31;
  font:
    14px 'Noto Sans JP',
    Meiryo,
    sans-serif;
}
header {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px 28px;
  background: white;
  border-bottom: 1px solid #dccbb4;
}
.brand {
  font-size: 24px;
  font-weight: 700;
  color: #f97948;
}
h1 {
  font-size: 20px;
}
h2 {
  font-size: 17px;
}
main {
  padding: 20px 28px;
}
.badge {
  margin-left: auto;
  background: #f9f2e2;
  padding: 8px 12px;
  border-radius: 8px;
}
.notice {
  background: #fff0df;
  border-left: 4px solid #f97948;
  padding: 12px;
  line-height: 1.8;
}
.controls,
.toolbar {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
  margin: 20px 0;
}
.controls label {
  display: grid;
  gap: 6px;
}
.controls .check {
  display: flex;
  align-items: center;
  align-self: center;
}
button,
input,
select {
  font: inherit;
  border: 1px solid #dccbb4;
  border-radius: 7px;
  padding: 10px;
  background: white;
  color: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.primary {
  background: #f97948;
  color: white;
  border-color: #f97948;
}
#tabs {
  max-width: 450px;
}
#status {
  padding: 12px;
  background: white;
  border-radius: 8px;
}
#importStatus {
  position: sticky;
  top: 8px;
  z-index: 40;
  margin-bottom: 10px;
  box-shadow: 0 4px 16px rgb(61 45 36 / 16%);
}
#status.error {
  color: #b13c26;
  border: 1px solid #b13c26;
}
.hint,
#lastSync {
  color: #846e60;
  font-size: 12px;
  line-height: 1.8;
}
.toolbar {
  align-items: center;
}
.toolbar h2 {
  margin-right: auto;
}
.board {
  display: grid;
  grid-template-columns: repeat(6, minmax(205px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 12px;
}
.column {
  background: #f9f2e2;
  border: 1px solid #dccbb4;
  border-top: 3px solid #e5a67c;
  border-radius: 10px;
  padding: 12px;
  min-height: 280px;
}
.column h3 {
  font-size: 13px;
  margin: 0 0 14px;
}
.card {
  display: block;
  text-align: left;
  width: 100%;
  background: white;
  margin-bottom: 10px;
  padding: 12px;
}
.card strong,
.card span {
  display: block;
  margin-bottom: 6px;
}
.card span {
  font-size: 12px;
}
.empty {
  color: #9b8579;
  padding: 20px 0;
  font-size: 12px;
}
dialog {
  width: min(650px, 95vw);
  border: 1px solid #dccbb4;
  border-radius: 12px;
  color: inherit;
}
dialog::backdrop {
  background: #0005;
}
.close {
  float: right;
}
dl {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
}
dt {
  color: #846e60;
}
dd {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
#detail label {
  display: inline-grid;
  gap: 6px;
}
a {
  color: #ad4a23;
}
.app-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns 0.2s ease;
}
.app-shell.sidebar-collapsed {
  grid-template-columns: 72px minmax(0, 1fr);
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: #f97948;
  color: white;
  padding: 26px 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sidebar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.sidebar-brand {
  min-width: 0;
}
.sidebar .brand {
  color: white;
  padding: 0 12px;
  white-space: nowrap;
}
.brand-sub {
  font-size: 10px;
  letter-spacing: 0.1em;
  padding: 5px 12px 24px;
  white-space: nowrap;
}
.sidebar-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #ffffff66;
  background: transparent;
  color: white;
}
.sidebar-toggle:hover {
  background: #ffffff22;
}
.sidebar-toggle svg,
.nav-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
  flex: none;
}
.nav-label {
  font-size: 11px;
  padding: 0 12px;
  opacity: 0.85;
  white-space: nowrap;
}
.sidebar nav {
  display: grid;
  gap: 7px;
}
.sidebar nav button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  background: transparent;
  color: white;
  text-align: left;
  padding: 13px 14px;
  font-weight: 600;
  white-space: nowrap;
}
.sidebar nav button.active {
  background: white;
  color: #e66335;
}
.sidebar nav small {
  font-size: 10px;
  margin-left: 8px;
}
.nav-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  margin-left: auto;
  padding: 0 5px;
  border-radius: 999px;
  background: #d92d20;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}
.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid #ffffff66;
  padding: 18px 12px 0;
  font-size: 12px;
  line-height: 1.8;
  white-space: nowrap;
}
.sidebar-collapsed .sidebar {
  padding-inline: 12px;
}
.sidebar-collapsed .sidebar-head {
  justify-content: center;
}
.sidebar-collapsed .sidebar-brand,
.sidebar-collapsed .nav-label,
.sidebar-collapsed .nav-text,
.sidebar-collapsed .sidebar-footer {
  display: none;
}
.sidebar-collapsed .sidebar-toggle svg {
  transform: rotate(180deg);
}
.sidebar-collapsed .sidebar nav button {
  justify-content: center;
  width: 48px;
  padding: 13px;
}
.sidebar-collapsed .nav-count {
  position: absolute;
  top: 4px;
  right: 2px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  font-size: 9px;
}
.workspace {
  min-width: 0;
}
.connection {
  background: white;
  border: 1px solid #dccbb4;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
}
.connection summary {
  cursor: pointer;
  font-weight: 600;
}
.table-wrap {
  overflow: auto;
  background: white;
  border: 1px solid #dccbb4;
  border-radius: 8px;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 800px;
}
th,
td {
  text-align: left;
  padding: 12px;
  border-right: 1px solid #eee2d3;
  border-bottom: 1px solid #eee2d3;
  font-size: 12px;
  white-space: pre-wrap;
}
th {
  background: #f9f2e2;
}
tbody tr:nth-child(even) {
  background: #fffaf4;
}
[hidden] {
  display: none !important;
}
@media (max-width: 800px) {
  .app-shell {
    grid-template-columns: 155px minmax(0, 1fr);
  }
  .app-shell.sidebar-collapsed {
    grid-template-columns: 64px minmax(0, 1fr);
  }
  .sidebar {
    padding: 18px 8px;
  }
  .sidebar .brand {
    font-size: 20px;
  }
  .brand-sub {
    font-size: 8px;
  }
  main {
    padding: 12px;
  }
  header {
    padding: 12px;
    gap: 10px;
  }
  h1 {
    font-size: 16px;
  }
  .badge {
    font-size: 10px;
  }
  #tabs {
    max-width: 100%;
  }
}
.stage-actions {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.stage-actions select,
.stage-actions button {
  height: 44px;
}
.stage-actions label {
  min-width: 180px;
}
.reservation-time {
  font-weight: 700;
  white-space: nowrap;
}
.card .reservation-time {
  display: inline;
  margin: 0;
  font-size: 14px;
}
.card .assignee {
  width: 100%;
  margin-top: 8px;
  padding: 8px;
  font-size: 12px;
  background: #fffaf4;
}
.card .prescription-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 2px 0;
  color: #ad4a23;
  font-size: 12px;
  font-weight: 600;
}
.card .prescription-link.has-link {
  padding: 0;
  flex-shrink: 0;
  position: absolute;
  top: 12px;
  right: 6px;
  width: 30px;
  height: 30px;
  margin: 0;
  border: 1px solid #e5a67c;
  border-radius: 7px;
  background: #fff7ef;
}
.card .prescription-link.has-link:hover {
  background: #ffe9d8;
}
.card .prescription-link.has-link svg {
  display: block;
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  flex: 0 0 20px;
  fill: currentColor;
}
.card .prescription-link.missing {
  color: #9b8579;
  font-weight: 400;
}
.card .prescription-imported-at {
  margin: 0 0 7px;
  color: #846e60;
  font-size: 11px;
}
.card .inventory-select {
  width: 100%;
  margin-top: 8px;
  padding: 8px;
  font-size: 12px;
  background: #fffaf4;
}
#fields .inventory-select {
  width: min(360px, 100%);
}
.card .card-missing-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}
.card .card-missing-tag {
  padding: 2px 8px;
  border-radius: 999px;
  background: #d73737;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}
.card .inventory-unchecked-tag,
.card .inventory-arranging-tag,
.card .reschedule-notice-tag,
.card .guidance-b-tag {
  display: inline-block;
  align-self: flex-start;
  margin: 4px 0 2px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #d73737;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}
.card .reschedule-notice-tag {
  background: #e68b52;
}
.card .guidance-reschedule-pending-tag {
  display: inline-block;
  align-self: flex-start;
  margin: 4px 0 2px;
  padding: 3px 12px;
  border: 0;
  border-radius: 4px;
  background: #20b89a;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}
.card button.guidance-reschedule-pending-tag {
  cursor: pointer;
}
.card .guidance-reschedule-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0 2px;
}
.card .guidance-reschedule-card-actions .guidance-reschedule-pending-tag {
  margin: 0;
}
.card .guidance-reschedule-withdraw-button {
  padding: 3px 8px;
  border: 1px solid #d8584c;
  border-radius: 4px;
  background: #fff;
  color: #b42323;
  font-size: 11px;
  font-weight: 700;
}
.card .guidance-b-tag {
  border: 1px solid #c7aa78;
  background: #ead9bb;
  color: #654c27;
}
.shipping-table-view .shipping-inventory-cell small {
  display: block;
  margin-top: 2px;
  color: #846e60;
  font-size: 11px;
  white-space: normal;
}
.shipping-table-view .shipping-inventory-cell .inventory-warn {
  color: #b42323;
  font-weight: 700;
}
.card .inventory-inquiry-tag {
  background: #b7d957;
  color: #29440f;
}
.card .inventory-arranged-tag {
  background: #42b238;
  color: #fff;
}
.inventory-select.inventory-inquiry {
  background: #eff8d3;
  border-color: #94b83d;
  color: #3d5f13;
  font-weight: 700;
}
.inventory-select.inventory-arranged {
  background: #e5f6e3;
  border-color: #42b238;
  color: #24731e;
  font-weight: 700;
}
.inventory-select.inventory-unchecked {
  background: #fff0f0;
  border-color: #d73737;
  color: #b42323;
  font-weight: 700;
}
.card .guidance-select {
  width: 100%;
  margin-top: 8px;
  padding: 8px;
  font-size: 12px;
  background: #fff;
}
.card .ge-select {
  width: 100%;
  margin-top: 8px;
  padding: 8px;
  font-size: 12px;
  background: #fff;
}
.medication-history-field {
  display: grid;
  gap: 5px;
  margin-top: 8px;
  color: #846e60;
  font-size: 12px;
}
.medication-history-field textarea {
  width: 100%;
  min-height: 100px;
  padding: 8px;
  background: #fff;
  resize: vertical;
  line-height: 1.6;
}
.medication-history-save-state {
  justify-self: end;
  color: #846e60;
  font-size: 10px;
}
.medication-history-save-state:not(:empty) {
  min-height: 14px;
}
.medication-history-detail-field {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.medication-history-detail-field input {
  width: min(560px, 100%);
  padding: 7px 9px;
}
.medication-history-detail-field .medication-history-save-state {
  flex: none;
  white-space: nowrap;
}
.card .ge-display {
  margin: 8px 0 2px;
  color: #513d31;
  font-size: 12px;
  font-weight: 600;
}
.card .prescription-assignee,
.card .inquiry-select {
  width: 100%;
  margin-top: 8px;
  padding: 8px;
  font-size: 12px;
  background: #fff;
}
.prescription-input-check {
  display: flex;
  align-items: center;
  margin-top: 10px;
  font-size: 12px;
}
.prescription-input-check input {
  width: auto;
  margin: 0;
}
.inquiry-select.inquiry-alert {
  background: #fff0f0;
  border-color: #d73737;
  color: #b42323;
  font-weight: 700;
}
.card .a4-print-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 10px;
  padding: 9px 8px;
  border: 1px solid #526fa8;
  border-radius: 7px;
  background: #526fa8;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.card .a4-print-button:hover {
  background: #405c94;
}
.card .a4-print-button.questionnaire-pdf-warning {
  border-color: #77bfe8;
  background: #d8effc;
  color: #236486;
}
.card .a4-print-button.questionnaire-pdf-warning:hover {
  background: #c5e7f9;
}
.card .a4-print-button:disabled {
  border-color: #b8aca4;
  background: #b8aca4;
  cursor: not-allowed;
}
.card .a4-print-button.questionnaire-pdf-warning:disabled {
  border-color: #77bfe8;
  background: #d8effc;
  color: #236486;
  opacity: 0.82;
}
.card .patient-detail-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  margin: 0 0 6px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #513d31;
  font-weight: 700;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.card .patient-detail-link > span {
  display: inline;
  margin: 0;
}
.card .patient-detail-link .patient-name-lines {
  display: grid;
  gap: 2px;
}
.card .patient-detail-link .patient-name-lines span {
  display: block;
  margin: 0;
}
.card .patient-detail-link .patient-name-kana {
  font-size: 16px;
  line-height: 1.35;
}
.card .patient-detail-link .patient-name-kanji {
  color: #6f5a4e;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}
.card .patient-detail-link .patient-name-kanji.missing {
  color: #9b8579;
  font-weight: 400;
}
.card .patient-detail-link:hover {
  color: #ad4a23;
}
.card .patient-detail-link:focus-visible {
  outline: 2px solid #f19e39;
  outline-offset: 3px;
}
.card .march-guidance-portal-button {
  width: 100%;
  margin-top: 10px;
  padding: 9px 8px;
  border: 1px solid #6ba8c9;
  border-radius: 7px;
  background: linear-gradient(60deg, #63b9f2 0%, #e8cc56 100%);
  color: #fff;
  font-weight: 700;
  text-shadow: 0 1px 2px #3d6a7f99;
  cursor: pointer;
}
.card .march-guidance-portal-button:hover {
  border-color: #5798bd;
  background: linear-gradient(60deg, #4eadeb 0%, #dfbe3f 100%);
}
.card .guidance-disposition-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 6px;
}
.card .guidance-disposition-actions button {
  width: 100%;
  min-height: 46px;
  padding: 7px 5px;
  background: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  white-space: pre-line;
}
.card .guidance-reschedule-button {
  border-color: #e68b52;
  color: #b65322;
}
.card .guidance-withdraw-button {
  border-color: #d8584c;
  color: #b42323;
}
.card .guidance-disposition-actions button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.guidance-reschedule-dialog {
  width: min(420px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid #d8c8b2;
  border-radius: 10px;
}
.guidance-reschedule-dialog form {
  display: grid;
  gap: 14px;
  padding: 20px;
}
.guidance-reschedule-dialog h3,
.guidance-reschedule-dialog p {
  margin: 0;
}
.guidance-reschedule-dialog p {
  color: #6f6257;
  font-size: 12px;
}
.guidance-reschedule-dialog label {
  display: grid;
  gap: 6px;
  font-size: 12px;
}
.guidance-reschedule-dialog input {
  width: 100%;
}
.card .shipping-field {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  color: #846e60;
  font-size: 11px;
}
.card .shipping-field-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.card .shipping-address-field {
  gap: 2px;
}
.card .shipping-address-field .shipping-field-label {
  align-items: baseline;
  line-height: 15px;
}
.card .shipping-select-field {
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}
.card .shipping-field select {
  min-width: 0;
  width: 100%;
  padding: 7px;
  background: #fff;
  color: #513d31;
  font-size: 12px;
}
.card .guidance-note-field textarea {
  min-height: 72px;
}
.card .shipping-display {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  margin-top: 8px;
  color: #846e60;
  font-size: 11px;
}
.card .shipping-display strong {
  color: #513d31;
  font-size: 12px;
  font-weight: 600;
}
.card .preference-review-alert {
  margin: 8px 0 0;
  padding: 8px;
  border: 1px solid #e3a09a;
  border-radius: 6px;
  background: #fff2f0;
  color: #a13b32;
  font-size: 11px;
  line-height: 1.5;
}
.card .fulfillment-conflict-confirm {
  margin-top: 6px;
  color: #8a3a2e;
  font-size: 10px;
  font-weight: 700;
}
.card .fulfillment-conflict-confirm button {
  width: 100%;
  border-color: #d55343;
  background: #fff;
  color: #a13b32;
  font-size: 11px;
}
.card .shipping-address-field textarea {
  width: 100%;
  min-height: 52px;
  padding: 8px;
  border: 1px solid #dccbb4;
  border-radius: 7px;
  background: #fff;
  color: #513d31;
  font:
    12px 'Noto Sans JP',
    Meiryo,
    sans-serif;
  line-height: 1.5;
  resize: vertical;
}
.card .shipping-field.shipping-field-changed {
  color: #a13b32;
  font-weight: 700;
}
.card .shipping-field-changed textarea {
  border-color: #d94b4b;
  background: #fff0f0;
  color: #a13b32;
}
.card .shipping-change-tag {
  display: inline-flex;
  margin-left: 5px;
  padding: 0 3px;
  border: 1px solid #d94b4b;
  border-radius: 4px;
  background: #fff0f0;
  color: #c92f2f;
  font-size: 9px;
  line-height: 15px;
  vertical-align: middle;
}
.card .shipping-change-tag[hidden] {
  display: none;
}
.card .shipping-complete-button {
  width: 100%;
  margin-top: 12px;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: #2f7d6d;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.card .shipping-complete-button:hover {
  background: #26685b;
}
.card .shipping-complete-button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.handoff-view {
  background: #fff;
  border: 1px solid #dccbb4;
  border-radius: 10px;
  padding: 20px;
}
.handoff-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.handoff-head h2 {
  margin: 0 0 4px;
}
.handoff-head p {
  margin: 0;
  color: #846e60;
  font-size: 12px;
}
.handoff-actions {
  display: flex;
  gap: 8px;
}
.handoff-tabs {
  display: flex;
  gap: 8px;
  margin: 20px 0;
  border-bottom: 1px solid #dccbb4;
}
.handoff-tabs button {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 12px 14px;
  font-weight: 700;
}
.handoff-tabs button.active {
  color: #e66335;
  border-bottom: 3px solid #f97948;
}
.handoff-tabs span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  margin-left: 5px;
  border-radius: 11px;
  background: #f9f2e2;
  font-size: 11px;
}
.handoff-empty {
  display: grid;
  gap: 8px;
  place-items: center;
  padding: 60px 20px;
  color: #846e60;
}
.handoff-empty strong {
  color: #513d31;
}
.handoff-empty span {
  font-size: 12px;
}
.settlement-view {
  display: grid;
  gap: 18px;
  background: #fff;
  border: 1px solid #dccbb4;
  border-radius: 10px;
  padding: 22px;
}
.settlement-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.settlement-head h2 {
  margin: 0 0 5px;
}
.settlement-head p {
  margin: 0;
  color: #846e60;
  font-size: 12px;
}
.settlement-head > span {
  padding: 5px 10px;
  border-radius: 13px;
  background: #eef6ee;
  color: #2f7040;
  font-size: 11px;
  font-weight: 700;
}
.settlement-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.settlement-flow article {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 150px;
  padding: 18px;
  border: 1px solid #e5d8c6;
  border-radius: 9px;
  background: #fffaf4;
}
.settlement-flow article > b {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 50%;
  background: #2f6f59;
  color: #fff;
}
.settlement-flow h3 {
  margin: 2px 0 9px;
  font-size: 14px;
}
.settlement-flow p {
  margin: 0;
  color: #765f51;
  font-size: 12px;
  line-height: 1.8;
}
.settlement-drive-link {
  display: inline-flex;
  margin-top: 14px;
  padding: 8px 12px;
  border: 1px solid #2f6f59;
  border-radius: 7px;
  background: #2f6f59;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
.settlement-drive-link:hover {
  background: #255a48;
}
.settlement-next {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-left: 4px solid #e5a67c;
  background: #fff3e7;
}
.settlement-next span {
  color: #765f51;
  font-size: 12px;
}
@media (max-width: 900px) {
  .settlement-flow {
    grid-template-columns: 1fr;
  }
}
.settlement-head .settlement-drive-link {
  margin-top: 0;
}
.settlement-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 10px;
}
.settlement-summary button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 15px;
  border: 1px solid #dccbb4;
  border-radius: 8px;
  background: #fffaf4;
  text-align: left;
}
.settlement-summary button:hover {
  border-color: #2f6f59;
}
.settlement-summary span {
  font-size: 12px;
  font-weight: 700;
}
.settlement-summary strong {
  font-size: 22px;
}
.settlement-toolbar {
  display: flex;
  gap: 10px;
}
.settlement-toolbar input {
  min-width: 280px;
}
.settlement-note {
  margin: 0;
  padding: 10px 12px;
  border-left: 4px solid #2f6f59;
  background: #eef7f2;
  color: #536b60;
  font-size: 11px;
}
.settlement-table-wrap {
  max-height: calc(100vh - 365px);
  overflow: auto;
}
.settlement-table {
  min-width: 1120px;
}
.settlement-table th {
  position: sticky;
  z-index: 1;
  top: 0;
  background: #f9f2e2;
}
.settlement-table td:first-child strong,
.settlement-table td:nth-child(6) strong {
  display: block;
}
.settlement-table td:first-child small,
.settlement-table td:nth-child(6) small {
  display: block;
  color: #846e60;
}
.settlement-table input[type='number'] {
  width: 105px;
}
.settlement-table td:nth-child(5) {
  min-width: 185px;
}
.settlement-table td:nth-child(5) select {
  display: block;
  width: 100%;
  margin-top: 6px;
}
.settlement-table td:last-child {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.settlement-march-link {
  display: inline-flex;
  align-items: center;
  padding: 7px 9px;
  border: 1px solid #2f6f59;
  border-radius: 6px;
  color: #2f6f59;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}
.settlement-status {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 11px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.settlement-unsettled {
  background: #fff1cf;
  color: #805f12;
}
.settlement-review {
  background: #e8effc;
  color: #3a5d9a;
}
.settlement-settled {
  background: #e6f5ea;
  color: #2f7040;
}
.settlement-canceled {
  background: #e9e5e1;
  color: #665e58;
}
.settlement-error {
  background: #fff0ed;
  color: #a33c2d;
}
.settlement-not_applicable {
  background: #efefef;
  color: #6b6b6b;
}
@media (max-width: 900px) {
  .settlement-summary {
    grid-template-columns: repeat(2, 1fr);
  }
  .settlement-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .settlement-toolbar input {
    min-width: 0;
  }
}
.settlement-toolbar {
  align-items: center;
  flex-wrap: wrap;
}
.settlement-toolbar #settlementSearch {
  min-width: 280px;
}
.settlement-toolbar #settlementDriveDate {
  min-width: 150px;
  width: 150px;
}
.settlement-toolbar small {
  color: #6f6257;
  font-size: 11px;
}
.settlement-table {
  min-width: 1260px;
}
.settlement-table td:first-child strong,
.settlement-table td:first-child span,
.settlement-table td:first-child small,
.settlement-table td:nth-child(7) strong,
.settlement-table td:nth-child(7) small {
  display: block;
}
.settlement-table td:first-child span {
  font-size: 12px;
}
.settlement-table td:first-child small,
.settlement-table td:nth-child(7) small {
  color: #846e60;
}
.settlement-table td:nth-child(6) {
  min-width: 185px;
}
.settlement-table td:nth-child(6) select {
  display: block;
  width: 100%;
  margin-top: 6px;
}
.settlement-pdf-link {
  display: inline-flex;
  padding: 6px 9px;
  border: 1px solid #2f6f59;
  border-radius: 6px;
  color: #2f6f59;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}
.settlement-pdf-missing {
  color: #8a7d72;
  font-size: 11px;
}
.settlement-pdf-ambiguous {
  color: #b24355;
  font-size: 11px;
  font-weight: 700;
}
.settlement-table tr.settlement-duplicate td {
  background: #fff0f3;
}
.settlement-duplicate-alert {
  display: inline-flex;
  margin-top: 5px;
  padding: 3px 7px;
  border-radius: 10px;
  background: #d94465;
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
}
.settlement-pdf-duplicate {
  color: #b3264a;
  font-size: 11px;
  font-weight: 700;
}
.settlement-duplicate-delete {
  border-color: #d94465 !important;
  color: #b3264a !important;
  background: #fff !important;
  font-weight: 700;
}
.settlement-dismiss-button {
  border-color: #d8584c !important;
  background: #fff !important;
  color: #b42323 !important;
}
.settlement-dismissed-detail-state {
  display: block;
  margin-bottom: 7px;
  color: #a13b32;
}
.settlement-restore-button {
  border-color: #2f7d6d;
  color: #2f6f59;
}
.card > .settlement-restore-button {
  width: 100%;
  min-height: 30px;
  background: #edf8f4;
  font-weight: 700;
}
.settlement-dismissed {
  background: #f5e7e4;
  color: #8d3e36;
}
.settlement-amount-input {
  display: block;
}
.settlement-ocr-hint {
  display: block;
  margin-top: 4px;
  font-size: 10px;
}
.settlement-ocr-hint.pending {
  color: #846e60;
}
.settlement-ocr-hint.done {
  color: #2f6f59;
  font-weight: 700;
}
.settlement-ocr-hint.error {
  color: #b3264a;
}
#settlementDriveReload {
  border-color: #ed7d3a;
  background: #ed7d3a;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 5px rgba(190, 83, 24, 0.25);
}
#settlementDriveReload:hover {
  border-color: #d76525;
  background: #d76525;
}
#settlementDriveReload:disabled {
  opacity: 0.6;
}
.settlement-drive-panel {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e5c09c;
  border-radius: 8px;
  background: #fff7ee;
}
.settlement-drive-panel > strong {
  color: #9b4d1e;
  font-size: 13px;
}
.settlement-drive-panel label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #6f6257;
  font-size: 11px;
}
.settlement-drive-panel input {
  min-width: 145px;
}
.settlement-drive-panel small {
  color: #6f6257;
  font-size: 11px;
}
@media (max-width: 900px) {
  .settlement-drive-panel {
    align-items: stretch;
    flex-direction: column;
  }
  .settlement-drive-panel label {
    justify-content: space-between;
  }
}
.settlement-toolbar {
  justify-content: flex-end;
}
#settlementDriveReload.loading::before,
.settlement-drive-panel small.loading::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 7px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -2px;
  animation: settlement-spin 0.7s linear infinite;
}
@keyframes settlement-spin {
  to {
    transform: rotate(360deg);
  }
}
.settlement-pdf-date_mismatch {
  color: #9a8f86;
  font-size: 11px;
}
.settlement-ocr-hint button {
  margin-left: 4px;
  padding: 2px 6px;
  font-size: 10px;
}
.settlement-ocr-hint.done button {
  border-color: #72a38f;
  background: #fff;
  color: #2f6f59;
}
.settlement-ocr-hint.error button {
  border-color: #d94465;
  background: #fff;
  color: #b3264a;
}
.settlement-table td:nth-child(6) {
  min-width: 0;
}
.settlement-table td:nth-child(7) {
  min-width: 185px;
}
.settlement-table td:nth-child(7) select {
  display: block;
  width: 100%;
  margin-top: 6px;
}
.settlement-table td:nth-child(8) strong,
.settlement-table td:nth-child(8) small {
  display: block;
}
.settlement-table td:nth-child(8) small {
  color: #846e60;
}
.settlement-table {
  table-layout: fixed;
}
.settlement-col-patient {
  width: 10%;
}
.settlement-col-reservation {
  width: 12%;
}
.settlement-col-shipped {
  width: 11%;
}
.settlement-col-pdf {
  width: 8%;
}
.settlement-col-amount {
  width: 10%;
}
.settlement-col-march {
  width: 10%;
}
.settlement-col-status {
  width: 16%;
}
.settlement-col-updated {
  width: 9%;
}
.settlement-col-actions {
  width: 14%;
}
.settlement-table th:nth-child(5),
.settlement-table td:nth-child(5) {
  min-width: 0;
}
.settlement-table td:nth-child(5) input {
  box-sizing: border-box;
  width: 100%;
  max-width: 100px;
}
.settlement-table td:last-child {
  display: table-cell;
  white-space: nowrap;
}
.settlement-table td:last-child > button + button {
  margin-left: 6px;
}
.settlement-table tr.settlement-row-settled td {
  background: #ece9e4;
  color: #746d67;
}
.settlement-table tr.settlement-row-settled input,
.settlement-table tr.settlement-row-settled select {
  background: #e2dfda;
  color: #746d67;
}
.settlement-table tr.settlement-row-settled .settlement-pdf-link,
.settlement-table tr.settlement-row-settled .settlement-march-link {
  border-color: #968d84;
  color: #625b55;
}
.settlement-table tr.settlement-row-settled .settlement-settled {
  background: #d5ddd6;
  color: #536457;
}
.settlement-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.settlement-pagination span {
  min-width: 110px;
  color: #6f6257;
  font-size: 11px;
  text-align: center;
}
.settlement-pagination button {
  padding: 6px 10px;
}
.settlement-drive-panel .settlement-drive-link {
  margin: 0 0 0 auto;
}
.board {
  grid-template-columns:
    minmax(192px, 0.74fr) minmax(220px, 0.95fr) repeat(2, minmax(294px, 1.32fr))
    repeat(3, minmax(220px, 0.95fr));
}
.work-system-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 10px;
}
.work-system-launch,
.history-search-launch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 7px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 700;
}
.work-system-launch {
  border: 1px solid #6ba8c9;
  background: linear-gradient(60deg, #63b9f2 0%, #e8cc56 100%);
  color: #fff;
  text-shadow: 0 1px 2px #3d6a7f99;
}
.work-system-launch:hover {
  background: linear-gradient(60deg, #4eadeb 0%, #dfbe3f 100%);
}
.history-search-launch {
  border: 1px solid #cf2e78;
  background: linear-gradient(180deg, #e181a6 0%, #cf2e78 100%);
  color: #fff;
  text-shadow: 0 1px 2px #8f1c5599;
}
.history-search-launch:hover {
  border-color: #b92068;
  background: linear-gradient(180deg, #d97099 0%, #b92068 100%);
}
.history-search-launch img {
  width: 22px;
  height: 21px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  flex: none;
}
.history-search-launch:disabled {
  opacity: 0.55;
  cursor: wait;
}
.medication-history-view {
  min-width: 0;
}
.medication-history-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}
.medication-history-toolbar label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #6f6257;
  font-size: 12px;
}
.medication-history-toolbar select {
  min-width: 180px;
}
.medication-history-note {
  margin: 0 0 14px;
  color: #846e60;
  font-size: 12px;
}
.medication-history-table {
  width: 100%;
  border-collapse: collapse;
}
.medication-history-table th,
.medication-history-table td {
  padding: 10px;
  border-bottom: 1px solid #eadfce;
  text-align: left;
  vertical-align: middle;
}
.medication-history-table td:last-child {
  display: flex;
  gap: 8px;
}
.medication-history-note-cell {
  position: relative;
  min-width: 240px;
  max-width: 420px;
  padding-right: 42px !important;
}
.medication-history-note-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.6;
}
.medication-history-copy {
  position: absolute;
  top: 7px;
  right: 7px;
  display: grid;
  place-items: center;
  width: 28px;
  min-width: 28px;
  height: 28px;
  padding: 4px;
  border: 1px solid #d8c8b2;
  border-radius: 6px;
  background: #fff;
  color: #6f6257;
}
.medication-history-copy:hover:not(:disabled),
.medication-history-copy.is-copied {
  border-color: #2f7d6d;
  color: #2f7d6d;
  background: #effaf5;
}
.medication-history-copy svg {
  width: 17px;
  height: 17px;
}
.medication-history-open,
.medication-history-complete {
  min-height: 34px;
  padding: 6px 10px;
}
.medication-history-complete {
  border: 1px solid #2f7d6d;
  background: #2f7d6d;
  color: #fff;
}
.local-prescription-upload {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding: 14px;
  border: 2px solid #c96743;
  border-radius: 10px;
  background: #fff8f2;
}
.local-prescription-upload legend {
  padding: 0 6px;
  color: #a34225;
  font-weight: 700;
}
.local-prescription-upload p {
  margin: 0;
  color: #795847;
  font-size: 12px;
  line-height: 1.6;
}
.local-prescription-upload input[type='file'] {
  width: 100%;
  padding: 8px;
  border: 1px solid #d9b39e;
  border-radius: 7px;
  background: #fff;
}
.card {
  position: relative;
  container-type: inline-size;
}
.card .next-stage-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin: 10px 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
}
.card .next-stage-button:hover {
  background: #f6efe6;
}
.card .next-stage-button svg {
  display: block;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  fill: #c7aa84;
}
.card .next-stage-button:disabled {
  opacity: 0.45;
}
.card .card-stage-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 10px;
}
.card .card-stage-actions .next-stage-button {
  margin: 0;
}
.card .guidance-completion-errors {
  margin-right: auto;
  color: #c33a2c;
  font-size: 10px !important;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
}
.card .assignee-required-warning {
  display: block;
  margin: 6px 0 2px;
}
.card .archive-record-button {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 3px 9px;
  border: 1px solid #d96a6a;
  border-radius: 5px;
  background: #fff;
  color: #c83f3f;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}
.card .archive-record-button:hover {
  background: #fff0f0;
}
.card .archive-record-button:disabled {
  opacity: 0.45;
}
.card.urgent-reception-card,
.card.urgent-guidance-card {
  border-color: #e7ca70;
  background: #fff9dc;
  box-shadow: inset 4px 0 0 #e3bb42;
}
.card.duplicate-reservation-card {
  border: 2px solid #d83b3b;
  background: #fff0f0;
  box-shadow: 0 0 0 2px #d83b3b24;
}
.card .missing-prescription-urgent-alert {
  display: block;
  margin: 2px 0 8px;
  color: #c62828;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}
.card .duplicate-reservation-warning {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  margin: 0 0 8px;
  padding: 3px 7px;
  border-radius: 10px;
  background: #c92f2f;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}
.card .patient-detail-link .patient-name-kana {
  white-space: nowrap;
  letter-spacing: -0.03em;
}
@container (max-width:240px) {
  .card .patient-detail-link .patient-name-kana {
    font-size: 14px;
  }
}
@container (max-width:180px) {
  .card .patient-detail-link .patient-name-kana {
    font-size: 12px;
    letter-spacing: -0.06em;
  }
}
.handoff-list {
  display: grid;
  gap: 10px;
}
.handoff-item {
  border: 1px solid #e4d5c1;
  border-radius: 8px;
  padding: 16px;
  background: #fffaf4;
}
.handoff-item h3 {
  margin: 10px 0 8px;
  font-size: 16px;
}
.handoff-item p {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.7;
}
.handoff-meta,
.handoff-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #846e60;
  font-size: 12px;
}
.handoff-category {
  display: inline-flex;
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 12px;
  background: #f8e2cf;
  color: #9b4929;
  font-weight: 700;
}
.handoff-footer {
  margin-top: 14px;
}
.handoff-footer button {
  padding: 7px 10px;
}
.handoff-dialog form {
  display: grid;
  gap: 15px;
}
.handoff-dialog label {
  display: grid;
  gap: 6px;
}
.handoff-dialog textarea {
  font: inherit;
  border: 1px solid #dccbb4;
  border-radius: 7px;
  padding: 10px;
  resize: vertical;
}
.dialog-head,
.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.dialog-head h2 {
  margin: 0;
}
.dialog-actions {
  justify-content: flex-end;
}
.handoff-table-wrap {
  overflow: auto;
  border: 1px solid #dccbb4;
  border-radius: 8px;
}
.handoff-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
  table-layout: fixed;
}
.handoff-table th,
.handoff-table td {
  border-right: 1px solid #e4d5c1;
  border-bottom: 1px solid #e4d5c1;
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
  line-height: 1.5;
}
.handoff-table th {
  background: #f4eadc;
  font-size: 12px;
  white-space: nowrap;
}
.handoff-table td {
  font-size: 13px;
}
.handoff-table th:nth-child(1),
.handoff-table td:nth-child(1) {
  width: 105px;
}
.handoff-table th:nth-child(2),
.handoff-table td:nth-child(2) {
  width: 170px;
}
.handoff-table th:nth-child(3),
.handoff-table td:nth-child(3) {
  width: auto;
}
.handoff-table th:nth-child(4),
.handoff-table td:nth-child(4) {
  width: 80px;
}
.handoff-table th:nth-child(5),
.handoff-table td:nth-child(5) {
  width: 145px;
}
.handoff-table th:nth-child(6),
.handoff-table td:nth-child(6) {
  width: 150px;
}
.handoff-table th:nth-child(7),
.handoff-table td:nth-child(7) {
  width: 100px;
}
.handoff-table.has-admin-order {
  min-width: 1190px;
}
.handoff-table.has-admin-order th:nth-child(1),
.handoff-table.has-admin-order td:nth-child(1) {
  width: 54px;
  text-align: center;
}
.handoff-table.has-admin-order th:nth-child(2),
.handoff-table.has-admin-order td:nth-child(2) {
  width: 58px;
  padding-left: 4px;
  padding-right: 4px;
  text-align: center;
}
.handoff-table.has-admin-order th:nth-child(3),
.handoff-table.has-admin-order td:nth-child(3) {
  width: 105px;
}
.handoff-table.has-admin-order th:nth-child(4),
.handoff-table.has-admin-order td:nth-child(4) {
  width: 170px;
}
.handoff-table.has-admin-order th:nth-child(5),
.handoff-table.has-admin-order td:nth-child(5) {
  width: auto;
}
.handoff-table.has-admin-order th:nth-child(6),
.handoff-table.has-admin-order td:nth-child(6) {
  width: 80px;
}
.handoff-table.has-admin-order th:nth-child(7),
.handoff-table.has-admin-order td:nth-child(7) {
  width: 145px;
}
.handoff-table.has-admin-order th:nth-child(8),
.handoff-table.has-admin-order td:nth-child(8) {
  width: 150px;
}
.handoff-table.has-admin-order th:nth-child(9),
.handoff-table.has-admin-order td:nth-child(9) {
  width: 100px;
}
.handoff-table tr:last-child td {
  border-bottom: 0;
}
.handoff-table th:last-child,
.handoff-table td:last-child {
  border-right: 0;
}
.handoff-title-cell {
  font-weight: 700;
}
.handoff-content-cell {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.handoff-table th.handoff-content-cell,
.handoff-table td.handoff-content-cell,
.handoff-table.has-admin-order th.handoff-content-cell,
.handoff-table.has-admin-order td.handoff-content-cell {
  width: 180px;
}
.handoff-table th.handoff-edit-cell,
.handoff-table td.handoff-edit-cell,
.handoff-table.has-admin-order th.handoff-edit-cell,
.handoff-table.has-admin-order td.handoff-edit-cell {
  width: 64px;
  padding-left: 6px;
  padding-right: 6px;
  text-align: center;
}
.handoff-edit-cell .handoff-edit-button {
  padding-left: 9px;
  padding-right: 9px;
}
.handoff-image-cell {
  text-align: center;
}
.handoff-image-cell img {
  display: block;
  width: 56px;
  height: 42px;
  object-fit: cover;
  border: 1px solid #dccbb4;
  border-radius: 4px;
}
.handoff-record-cell,
.handoff-status-cell {
  display: table-cell;
}
.handoff-record-cell strong,
.handoff-record-cell time,
.handoff-status-cell strong,
.handoff-status-cell small {
  display: block;
}
.handoff-status-cell .handoff-edit-button {
  display: block;
  margin-top: 6px;
}
.handoff-record-cell time,
.handoff-status-cell small {
  margin-top: 4px;
  color: #846e60;
  font-size: 11px;
  white-space: normal;
}
.handoff-table button {
  padding: 6px 8px;
  white-space: nowrap;
  font-size: 12px;
}
.handoff-order-cell button {
  display: block;
  width: 32px;
  height: 30px;
  margin: 0 auto 5px;
  padding: 2px;
  font-size: 15px;
}
.handoff-order-cell button:last-child {
  margin-bottom: 0;
}
.handoff-order-cell button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.handoff-delete-button {
  display: block;
  width: 46px;
  margin: 0 auto;
  padding: 6px 4px;
  border-color: #c65d4a !important;
  background: #fff !important;
  color: #a33c2d !important;
}
.handoff-delete-button:hover {
  background: #fff0ed !important;
}
.handoff-table {
  min-width: 1160px;
}
.handoff-table th:nth-child(2),
.handoff-table td:nth-child(2) {
  width: 120px;
}
.handoff-table th:nth-child(3),
.handoff-table td:nth-child(3) {
  width: 170px;
}
.handoff-table th:nth-child(4),
.handoff-table td:nth-child(4) {
  width: auto;
}
.handoff-table th:nth-child(5),
.handoff-table td:nth-child(5) {
  width: 80px;
}
.handoff-table th:nth-child(6),
.handoff-table td:nth-child(6) {
  width: 145px;
}
.handoff-table th:nth-child(7),
.handoff-table td:nth-child(7) {
  width: 150px;
}
.handoff-table th:nth-child(8),
.handoff-table td:nth-child(8) {
  width: 100px;
}
.handoff-table.has-admin-order {
  min-width: 1310px;
}
.handoff-table.has-admin-order th:nth-child(1),
.handoff-table.has-admin-order td:nth-child(1) {
  width: 54px;
}
.handoff-table.has-admin-order th:nth-child(2),
.handoff-table.has-admin-order td:nth-child(2) {
  width: 58px;
}
.handoff-table.has-admin-order th:nth-child(3),
.handoff-table.has-admin-order td:nth-child(3) {
  width: 105px;
}
.handoff-table.has-admin-order th:nth-child(4),
.handoff-table.has-admin-order td:nth-child(4) {
  width: 120px;
}
.handoff-table.has-admin-order th:nth-child(5),
.handoff-table.has-admin-order td:nth-child(5) {
  width: 170px;
}
.handoff-table.has-admin-order th:nth-child(6),
.handoff-table.has-admin-order td:nth-child(6) {
  width: auto;
}
.handoff-table.has-admin-order th:nth-child(7),
.handoff-table.has-admin-order td:nth-child(7) {
  width: 80px;
}
.handoff-table.has-admin-order th:nth-child(8),
.handoff-table.has-admin-order td:nth-child(8) {
  width: 145px;
}
.handoff-table.has-admin-order th:nth-child(9),
.handoff-table.has-admin-order td:nth-child(9) {
  width: 150px;
}
.handoff-table.has-admin-order th:nth-child(10),
.handoff-table.has-admin-order td:nth-child(10) {
  width: 100px;
}
.handoff-current .handoff-table,
.handoff-current .handoff-table.has-admin-order {
  min-width: 0;
}
.handoff-current .handoff-table th:nth-child(1),
.handoff-current .handoff-table td:nth-child(1) {
  width: 9%;
}
.handoff-current .handoff-table th:nth-child(2),
.handoff-current .handoff-table td:nth-child(2) {
  width: 11%;
}
.handoff-current .handoff-table th:nth-child(3),
.handoff-current .handoff-table td:nth-child(3) {
  width: 15%;
}
.handoff-current .handoff-table th:nth-child(4),
.handoff-current .handoff-table td:nth-child(4) {
  width: 27%;
}
.handoff-current .handoff-table th:nth-child(5),
.handoff-current .handoff-table td:nth-child(5) {
  width: 7%;
}
.handoff-current .handoff-table th:nth-child(6),
.handoff-current .handoff-table td:nth-child(6) {
  width: 13%;
}
.handoff-current .handoff-table th:nth-child(7),
.handoff-current .handoff-table td:nth-child(7) {
  width: 7%;
}
.handoff-current .handoff-table th:nth-child(8),
.handoff-current .handoff-table td:nth-child(8) {
  width: 11%;
}
.handoff-current .handoff-table.has-admin-order th:nth-child(1),
.handoff-current .handoff-table.has-admin-order td:nth-child(1) {
  width: 4%;
}
.handoff-current .handoff-table.has-admin-order th:nth-child(2),
.handoff-current .handoff-table.has-admin-order td:nth-child(2) {
  width: 5%;
}
.handoff-current .handoff-table.has-admin-order th:nth-child(3),
.handoff-current .handoff-table.has-admin-order td:nth-child(3) {
  width: 8%;
}
.handoff-current .handoff-table.has-admin-order th:nth-child(4),
.handoff-current .handoff-table.has-admin-order td:nth-child(4) {
  width: 10%;
}
.handoff-current .handoff-table.has-admin-order th:nth-child(5),
.handoff-current .handoff-table.has-admin-order td:nth-child(5) {
  width: 13%;
}
.handoff-current .handoff-table.has-admin-order th:nth-child(6),
.handoff-current .handoff-table.has-admin-order td:nth-child(6) {
  width: 23%;
}
.handoff-current .handoff-table.has-admin-order th:nth-child(7),
.handoff-current .handoff-table.has-admin-order td:nth-child(7) {
  width: 6%;
}
.handoff-current .handoff-table.has-admin-order th:nth-child(8),
.handoff-current .handoff-table.has-admin-order td:nth-child(8) {
  width: 12%;
}
.handoff-current .handoff-table.has-admin-order th:nth-child(9),
.handoff-current .handoff-table.has-admin-order td:nth-child(9) {
  width: 7%;
}
.handoff-current .handoff-table.has-admin-order th:nth-child(10),
.handoff-current .handoff-table.has-admin-order td:nth-child(10) {
  width: 12%;
}
.handoff-target-cell .handoff-target {
  margin: 0 4px 4px 0;
}
.handoff-target {
  display: inline-flex;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 12px;
  background: #edf3fb;
  color: #3e5f8f;
  font-weight: 700;
}
.handoff-target-field {
  border: 1px solid #dccbb4;
  border-radius: 8px;
  padding: 10px 12px;
}
.handoff-target-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  max-height: 220px;
  margin: 5px 0 8px;
  overflow: auto;
}
.handoff-target-options label {
  display: flex !important;
  align-items: center;
  gap: 7px;
  font-weight: 400 !important;
}
.handoff-target-options input {
  width: auto;
  margin: 0;
}
.handoff-dialog small {
  color: #846e60;
  font-size: 11px;
  font-weight: 400;
}
.handoff-board-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 14px;
  align-items: start;
}
.handoff-current {
  min-width: 0;
}
.handoff-archive {
  position: sticky;
  top: 12px;
  border: 1px solid #dccbb4;
  border-radius: 8px;
  background: #fffaf4;
  overflow: hidden;
}
.handoff-archive-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  background: #f4eadc;
}
.handoff-archive-head h3 {
  margin: 0;
  font-size: 12px;
  font-weight: 400;
}
.handoff-archive-head span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  border-radius: 12px;
  background: #fff;
  color: #9b4929;
  font-size: 12px;
  font-weight: 700;
}
.handoff-archive-empty {
  margin: 0;
  padding: 14px 12px;
  color: #846e60;
  font-size: 12px;
}
.handoff-archive-list {
  max-height: 62vh;
  overflow: auto;
}
.handoff-archive-list details {
  padding: 10px 12px;
  border-top: 1px solid #e4d5c1;
}
.handoff-archive-list details:first-child {
  border-top: 0;
}
.handoff-archive-list summary {
  cursor: pointer;
  overflow-wrap: anywhere;
}
.handoff-archive-list summary strong {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
}
.handoff-archive-list details > p {
  margin: 9px 0;
  white-space: pre-wrap;
  font-size: 12px;
  line-height: 1.6;
}
.handoff-archive-targets {
  margin-top: 8px;
}
.handoff-archive-targets .handoff-target {
  margin: 0 4px 4px 0;
  font-size: 11px;
}
.handoff-archive-list small {
  display: block;
  margin: 6px 0;
  color: #846e60;
  line-height: 1.5;
}
.handoff-archive-list details button {
  width: 100%;
  margin-top: 6px;
  padding: 6px 8px;
  font-size: 11px;
}
.handoff-archive-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 8px 10px;
  border-top: 1px solid #dccbb4;
  background: #fff;
}
.handoff-archive-pager button {
  padding: 5px 8px;
  font-size: 11px;
}
.handoff-archive-pager span {
  font-size: 11px;
  color: #846e60;
}
@media (max-width: 1100px) {
  .handoff-board-layout {
    grid-template-columns: 1fr;
  }
  .handoff-archive {
    position: static;
  }
  .handoff-archive-list {
    max-height: 360px;
  }
}
.detail-close-form {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid #dccbb4;
}
.detail-field-changed {
  color: #c92f2f !important;
  font-weight: 700;
}
.detail-change-tag {
  display: inline-flex;
  margin-left: 5px;
  padding: 0 2px;
  border: 1px solid #d94b4b;
  border-radius: 4px;
  background: #fff0f0;
  color: #c92f2f;
  font-size: 9px;
  line-height: 15px;
  vertical-align: middle;
}
.card-name-row {
  display: flex;
  align-items: flex-start;
  gap: 3px;
}
.card .card-name-row .followup-card-flag {
  display: inline;
  margin: 0;
  font-size: 15px;
  line-height: 1.35;
}
.card-name-row .patient-detail-link {
  flex: 1;
}
.followup-flag-button {
  border-color: #d33 !important;
  color: #b82020 !important;
  background: #fff5f5 !important;
}
.followup-complete-button {
  border-color: #27815f !important;
  color: #1d6b4e !important;
  background: #effaf5 !important;
}
.medication-history-detail-field + small,
.followup-complete-button + small {
  display: block;
  margin-top: 5px;
  color: #765;
}
.action-history {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #dccbb4;
}
.action-history h3 {
  margin: 0 0 12px;
  font-size: 15px;
}
.action-history-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 12px;
  padding: 4px 0;
  line-height: 1.3;
  border-bottom: 1px solid #eee2d3;
}
.action-history-item span {
  white-space: nowrap;
}
.action-history-item strong {
  font-size: 12px;
}
.action-history-item span,
.action-history p {
  margin: 0;
  color: #846e60;
  font-size: 11px;
}
.shipping-archive-column {
  padding: 12px;
}
.archive-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.archive-heading h3 {
  margin: 0;
}
.archive-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid #dccbb4;
  border-radius: 14px;
  background: #fff;
  font-size: 12px;
}
.archive-search {
  width: 100%;
  margin: 10px 0;
  padding: 9px;
  border: 1px solid #dccbb4;
  border-radius: 7px;
  background: #fff;
  font-size: 12px;
}
.archive-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 10px;
}
.archive-pager button {
  padding: 4px 7px;
  border: 1px solid #513d31;
  border-radius: 8px;
  background: #fff;
  font-size: 10px;
}
.archive-list {
  display: grid;
}
.archive-date {
  padding: 7px 0 4px;
  font-size: 12px;
}
.archive-row {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 8px 2px;
  border: 0;
  border-bottom: 1px solid #dccbb4;
  border-radius: 0;
  background: transparent;
  text-align: left;
}
.archive-row strong {
  font-size: 11px;
}
.archive-row small {
  color: #846e60;
  font-size: 9px;
}
.archive-row:hover {
  background: #fff7ef;
}
.archive-csv {
  width: 100%;
  margin-top: 12px;
  padding: 7px;
  border: 1px solid #513d31;
  border-radius: 8px;
  background: #fff;
  font-size: 10px;
  font-weight: 700;
}
.toolbar h2 {
  display: flex;
  align-items: center;
  gap: 6px;
}
.shipping-csv-button {
  margin-left: 10px;
  padding: 7px 12px;
  border-color: #513d31;
  font-size: 12px;
  font-weight: 700;
}
.settings-view {
  background: #fff;
  border: 1px solid #dccbb4;
  border-radius: 10px;
  padding: 20px;
}
.settings-head h2 {
  margin: 0 0 4px;
}
.settings-head p {
  margin: 0;
  color: #846e60;
  font-size: 12px;
}
.staff-form {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin: 22px 0;
}
.staff-form label {
  display: grid;
  gap: 6px;
}
.staff-form .staff-active {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 42px;
}
.staff-form .staff-active input {
  width: auto;
}
.staff-table {
  min-width: 940px;
}
.staff-table th,
.member-audit th {
  font-size: 13px;
}
.staff-table td,
.member-audit td {
  font-size: 14px;
  line-height: 1.6;
}
.staff-table th:nth-child(1) {
  width: 17%;
}
.staff-table th:nth-child(2) {
  width: 23%;
}
.staff-table th:nth-child(n + 3) {
  width: 12%;
}
.staff-table td:last-child {
  white-space: nowrap;
}
.staff-table td:last-child button {
  margin-right: 6px;
  padding: 7px;
  font-size: 13px;
}
.ivry-view {
  display: grid;
  gap: 14px;
  min-width: 0;
}
.ivry-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.ivry-head h2 {
  margin: 0 0 4px;
}
.ivry-head p {
  margin: 0;
  color: #846e60;
  font-size: 12px;
}
.ivry-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.ivry-filters input {
  min-width: 300px;
  flex: 1;
}
.ivry-list {
  min-width: 0;
  overflow-x: auto;
}
.ivry-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
  width: 100%;
  min-width: 0;
}
.ivry-column {
  min-width: 0;
  min-height: 540px;
  border: 1px solid #dccbb4;
  border-top: 4px solid #d98a7d;
  border-radius: 10px;
  background: #f9f5ee;
  padding: 12px;
  transition: 0.15s;
}
.ivry-column.status-doing {
  border-top-color: #e8a33a;
  background: #fff9ec;
}
.ivry-column.status-done {
  border-top-color: #62a56d;
  background: #f2f8f3;
}
.ivry-column.drag-over {
  outline: 3px solid #f9794866;
  transform: translateY(-2px);
}
.ivry-column h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 12px;
  font-size: 16px;
}
.ivry-column h3 span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 24px;
  border-radius: 12px;
  background: #fff;
  font-size: 12px;
}
.ivry-column h3 .ivry-complete-heading-actions {
  display: flex;
  width: auto;
  height: auto;
  gap: 7px;
  border-radius: 0;
  background: transparent;
}
.ivry-complete-heading-actions > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 24px;
  border-radius: 12px;
  background: #fff;
}
.ivry-complete-heading-actions button {
  padding: 4px 9px;
  border-color: #d56565;
  background: #fff;
  color: #a62828;
  font-size: 11px;
}
.ivry-column-cards {
  display: grid;
  gap: 10px;
}
.ivry-column-empty {
  margin: 0;
  padding: 28px 8px;
  border: 1px dashed #d8c8b2;
  border-radius: 8px;
  color: #9a887a;
  text-align: center;
}
.ivry-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dccbb4;
  border-radius: 9px;
  background: #fff;
  padding: 13px;
  box-shadow: 0 2px 7px #513d3110;
  cursor: grab;
}
.ivry-card.dragging {
  opacity: 0.45;
}
.ivry-card:active {
  cursor: grabbing;
}
.ivry-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.ivry-card-head > div {
  display: grid;
  gap: 3px;
}
.ivry-card-head strong {
  font-size: 16px;
}
.ivry-card-head span {
  color: #846e60;
  font-size: 10px;
}
.ivry-card-head a {
  color: #d85f32;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.ivry-summary {
  max-height: 3.4em;
  overflow: hidden;
  margin: 10px 0;
  white-space: pre-wrap;
  font-size: 12px;
  line-height: 1.7;
}
.ivry-controls {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 6px;
}
.ivry-controls select,
.ivry-controls button {
  min-width: 0;
  padding: 7px 8px;
  font-size: 11px;
}
.ivry-note-row {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  margin-top: 2px;
}
.ivry-note-row textarea {
  width: 100%;
  min-height: 52px;
  resize: vertical;
  border: 1px solid #d8c8b2;
  border-radius: 7px;
  padding: 8px 10px;
  background: #fff;
  color: #513d31;
  font: inherit;
  line-height: 1.5;
}
.ivry-note-row textarea:focus {
  outline: 2px solid #f9794840;
  border-color: #f97948;
}
.ivry-note-row textarea::placeholder {
  color: #513d31;
  opacity: 0.5;
}
.ivry-note-row button {
  min-width: 54px;
}
.ivry-card details {
  margin-top: 10px;
  border-top: 1px solid #eee2d3;
  padding-top: 9px;
}
.ivry-card summary {
  cursor: pointer;
  color: #745b4c;
  font-size: 11px;
  font-weight: 700;
}
.ivry-card pre {
  max-height: 360px;
  overflow: auto;
  white-space: pre-wrap;
  font:
    11px/1.7 'Noto Sans JP',
    Meiryo,
    sans-serif;
}
.ivry-empty {
  margin: 0;
  padding: 28px;
  border: 1px dashed #dccbb4;
  border-radius: 9px;
  background: #fff;
  color: #846e60;
  text-align: center;
}
@media (max-width: 850px) {
  .ivry-controls {
    grid-template-columns: 1fr;
  }
  .ivry-note-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .ivry-filters input {
    min-width: 100%;
  }
  .ivry-board {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-width: 0;
  }
}
.ivry-card {
  cursor: auto;
  user-select: text;
}
.ivry-card-actions {
  display: grid;
  justify-items: end;
  gap: 5px;
}
.ivry-title-line {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.ivry-title-line b {
  padding: 2px 6px;
  border-radius: 4px;
  background: #fff0e8;
  color: #c9572d;
  font-size: 10px;
}
.ivry-drag-handle {
  padding: 4px 7px;
  border: 1px solid #d8c8b2;
  border-radius: 6px;
  background: #fffaf4;
  color: #745b4c;
  font-size: 10px;
  font-weight: 700;
  cursor: grab;
  user-select: none;
}
.ivry-drag-handle:active {
  cursor: grabbing;
}
.ivry-moves {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 9px;
}
.ivry-moves button {
  flex: 1;
  padding: 7px 10px;
  border-color: #cdb99f;
  background: #fffaf4;
  font-size: 11px;
  font-weight: 700;
}
.ivry-moves button:not(:disabled):hover {
  border-color: #f97948;
  color: #c9572d;
}
.ivry-moves button:disabled {
  visibility: hidden;
}
.ivry-board.ivry-board-two {
  grid-template-columns: repeat(2, minmax(360px, 1fr));
  min-width: 740px;
}
.ivry-completed {
  margin-top: 16px;
  border: 1px solid #dccbb4;
  border-radius: 10px;
  background: #fff;
  padding: 14px;
}
.ivry-completed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.ivry-completed-head h3 {
  margin: 0;
  font-size: 16px;
}
.ivry-completed-head span {
  color: #846e60;
  font-size: 12px;
}
.ivry-completed-table {
  min-width: 900px;
}
.ivry-completed-table th {
  font-size: 11px;
}
.ivry-completed-table td {
  font-size: 12px;
  vertical-align: top;
}
.ivry-completed-table th:nth-child(1) {
  width: 15%;
}
.ivry-completed-table th:nth-child(2) {
  width: 14%;
}
.ivry-completed-table th:nth-child(3),
.ivry-completed-table th:nth-child(4) {
  width: 12%;
}
.ivry-completed-table th:nth-child(6) {
  width: 15%;
}
.ivry-completed-table summary {
  max-width: 430px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
.ivry-completed-table pre {
  max-height: 260px;
  overflow: auto;
  white-space: pre-wrap;
  font:
    11px/1.7 'Noto Sans JP',
    Meiryo,
    sans-serif;
}
.ivry-completed-table td:last-child {
  display: flex;
  gap: 6px;
  align-items: center;
}
.ivry-completed-table td:last-child button,
.ivry-completed-table td:last-child a {
  padding: 6px 8px;
  font-size: 10px;
  white-space: nowrap;
}
.ivry-completed-table td:last-child a {
  color: #d85f32;
  font-weight: 700;
}
.ivry-completed-table {
  min-width: 0;
}
.ivry-completed-table th:nth-child(1) {
  width: 45%;
}
.ivry-completed-table th:nth-child(2) {
  width: 45%;
}
.ivry-completed-table th:nth-child(3) {
  width: 10%;
}
.ivry-completed-table td:first-child a {
  color: #d85f32;
  font-weight: 700;
}
.ivry-completed-table td:last-child {
  justify-content: flex-end;
}
.ivry-completed-table td:last-child button {
  min-width: 34px;
}
.ivry-complete-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1.2fr) minmax(0, 0.8fr) 78px 34px;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid #cfe1d2;
  border-radius: 7px;
  background: #fff;
  font-size: 11px;
}
.ivry-complete-row .ivry-complete-select {
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
}
.ivry-complete-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ivry-complete-row time {
  color: #846e60;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ivry-complete-row a {
  color: #338149;
  font-weight: 700;
}
.ivry-complete-row button {
  padding: 5px;
  border-color: #b9d3be;
  background: #f4faf5;
  font-weight: 700;
}
.ivry-complete-row {
  cursor: pointer;
}
.ivry-complete-row:hover,
.ivry-complete-row:focus {
  border-color: #62a56d;
  box-shadow: 0 0 0 2px #62a56d20;
  outline: 0;
}
.ivry-detail-dialog {
  width: min(720px, 92vw);
  max-height: 85vh;
  border: 1px solid #dccbb4;
  border-radius: 12px;
  padding: 20px;
  color: #513d31;
}
.ivry-detail-dialog::backdrop {
  background: #392a2266;
}
.ivry-detail-dialog dl {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 7px 12px;
  margin: 18px 0;
}
.ivry-detail-dialog dt {
  color: #846e60;
  font-size: 12px;
}
.ivry-detail-dialog dd {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
}
.ivry-detail-dialog h3 {
  margin: 18px 0 8px;
  font-size: 14px;
}
.ivry-detail-dialog pre {
  max-height: 380px;
  overflow: auto;
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid #eee2d3;
  border-radius: 8px;
  background: #fffaf4;
  white-space: pre-wrap;
  font:
    12px/1.8 'Noto Sans JP',
    Meiryo,
    sans-serif;
}
.ivry-detail-dialog > a {
  color: #d85f32;
  font-size: 12px;
  font-weight: 700;
}
.ivry-summary {
  display: grid;
  max-height: 18em;
  gap: 8px;
  padding: 8px 10px;
  border-left: 3px solid #f97948;
  background: #fff8f3;
}
.ivry-summary::before {
  content: '問い合わせ内容';
  display: block;
  color: #c9572d;
  font-size: 10px;
  font-weight: 700;
}
.ivry-summary section + section {
  padding-top: 8px;
  border-top: 1px solid #f0d8ca;
}
.ivry-summary strong {
  font-size: 11px;
}
.ivry-summary p {
  margin: 2px 0 0;
  white-space: pre-wrap;
}
.ivry-card pre {
  max-width: 100%;
  max-height: 240px;
  overflow: auto;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.ivry-detail-dialog {
  overflow: auto;
}
.ivry-detail-dialog pre {
  max-height: none;
  overflow: visible;
}
.ivry-detail-summary {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-left: 3px solid #f97948;
  background: #fff8f3;
}
.ivry-detail-summary section + section {
  padding-top: 10px;
  border-top: 1px solid #f0d8ca;
}
.ivry-detail-summary p {
  margin: 4px 0 0;
  white-space: pre-wrap;
  font-size: 13px;
}
.ivry-source-details {
  margin: 16px 0;
  border-top: 1px solid #dccbb4;
  padding-top: 12px;
}
.ivry-source-details summary {
  cursor: pointer;
  color: #745b4c;
  font-size: 12px;
  font-weight: 700;
}
.ivry-source-details h4 {
  margin: 14px 0 5px;
  font-size: 11px;
}
.ivry-history {
  display: grid;
  margin: 0 0 16px;
  border-top: 1px solid #dccbb4;
}
.ivry-history > div {
  display: grid;
  gap: 3px;
  padding: 9px 2px;
  border-bottom: 1px solid #eee2d3;
}
.ivry-history strong {
  font-size: 12px;
}
.ivry-history span {
  color: #846e60;
  font-size: 11px;
}
.ivry-history p {
  margin: 10px 0;
  color: #846e60;
  font-size: 12px;
}
.member-audit {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #dccbb4;
}
.member-audit h3 {
  margin: 0 0 12px;
  font-size: 15px;
}
.member-audit table {
  min-width: 900px;
}
.member-audit th:nth-child(1) {
  width: 17%;
}
.member-audit th:nth-child(2) {
  width: 14%;
}
.member-audit th:nth-child(3) {
  width: 13%;
}
.member-audit th:nth-child(5) {
  width: 14%;
}
.manual-editor-field {
  display: grid;
  gap: 7px;
}
.manual-editor-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 8px;
  border: 1px solid #dccbb4;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #fffaf4;
}
.manual-editor-toolbar button,
.manual-editor-toolbar select {
  min-height: 34px;
  padding: 6px 10px;
  background: #fff;
  border: 1px solid #dccbb4;
  border-radius: 6px;
  color: #4d392f;
}
.manual-editor-toolbar button:hover {
  border-color: #f97948;
  background: #fff4ec;
}
.manual-color-control {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 7px !important;
  margin-left: auto;
  font-size: 12px;
}
.manual-color-control input {
  width: 36px;
  height: 30px;
  padding: 2px;
  border: 1px solid #dccbb4;
  border-radius: 6px;
}
.manual-rich-editor {
  min-height: 300px;
  max-height: 620px;
  overflow: auto;
  padding: 16px;
  border: 1px solid #dccbb4;
  border-radius: 0 0 8px 8px;
  background: #fff;
  line-height: 1.8;
  outline: none;
}
.manual-rich-editor:focus {
  border-color: #f97948;
  box-shadow: 0 0 0 2px rgba(249, 121, 72, 0.12);
}
.manual-rich-editor h2[id]::after,
.manual-rich-editor h3[id]::after {
  content: ' 🔗';
  color: #f97948;
  font-size: 0.7em;
}
.manual-rich-editor h2,
.manual-article #manualBody h2 {
  margin: 1.2em 0 0.45em;
  font-size: 21px;
}
.manual-rich-editor h3,
.manual-article #manualBody h3 {
  margin: 1em 0 0.4em;
  font-size: 17px;
}
.manual-rich-editor p,
.manual-article #manualBody p {
  margin: 0.45em 0;
}
.manual-rich-editor ul,
.manual-rich-editor ol,
.manual-article #manualBody ul,
.manual-article #manualBody ol {
  padding-left: 1.8em;
}
.manual-rich-editor:empty:before {
  content: '本文を入力してください';
  color: #a69589;
  pointer-events: none;
}
.manual-rich-editor figure,
.manual-article #manualBody figure {
  margin: 18px 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.manual-rich-editor figure img,
.manual-article #manualBody figure img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: auto;
  border: 1px solid #e4d7c8;
  border-radius: 4px;
}
.manual-rich-editor figcaption,
.manual-article #manualBody figcaption {
  display: none;
}
.manual-rich-editor figure {
  cursor: default;
}
.manual-rich-editor figure img {
  max-height: 520px;
}
.manual-view {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  background: #fff;
  border: 1px solid #dccbb4;
  border-radius: 10px;
  padding: 20px;
}
.manual-head {
  display: flex;
  grid-column: 1/-1;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
}
.manual-head h2 {
  margin: 0 0 4px;
}
.manual-head p {
  margin: 0;
  color: #846e60;
  font-size: 12px;
}
.manual-actions {
  display: flex;
  gap: 8px;
}
.manual-sidebar {
  display: grid;
  grid-column: 1;
  grid-row: 2;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: calc(100vh - 230px);
  border-right: 1px solid #dccbb4;
  padding: 16px 14px 16px 0;
}
.manual-search {
  display: grid;
  gap: 5px;
  margin-bottom: 10px;
  color: #846e60;
  font-size: 11px;
  font-weight: 700;
}
.manual-search input {
  width: 100%;
  min-height: 34px;
  padding: 6px 9px;
}
.manual-tabs {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-height: 0;
  overflow-y: auto;
}
.manual-category {
  border: 1px solid #e5d8c6;
  border-radius: 8px;
  background: #fffdf9;
}
.manual-category > summary {
  cursor: pointer;
  padding: 9px 10px;
  color: #5e493b;
  font-size: 12px;
  font-weight: 800;
  list-style-position: inside;
}
.manual-category[open] > summary {
  border-bottom: 1px solid #eadfce;
  background: #f8efe0;
}
.manual-category-pages {
  display: grid;
  gap: 5px;
  padding: 6px;
}
.manual-search-empty {
  margin: 10px 4px;
  color: #846e60;
  font-size: 12px;
}
.manual-tab-link {
  width: 100%;
  border: 0;
  border-radius: 7px;
  background: #f9f2e2;
  padding: 8px 9px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
}
.manual-tab-link.active {
  background: #f97948;
  color: #fff;
}
.manual-title-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}
.manual-title-row h3 {
  margin: 0 !important;
}
.manual-title-order {
  display: flex;
  gap: 4px;
}
.manual-title-order button {
  width: 34px;
  height: 32px;
  padding: 2px;
  border: 1px solid #dccbb4;
  border-radius: 6px;
  background: #fff;
  text-align: center;
}
.manual-title-order button:disabled {
  opacity: 0.3;
}
.manual-article {
  grid-column: 2;
  grid-row: 2;
  width: min(900px, 100%);
  padding: 24px;
}
.manual-article h3 {
  margin: 0 0 18px;
  font-size: 24px;
}
.manual-article #manualBody {
  white-space: pre-wrap;
  line-height: 1.9;
}
.manual-images {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}
.manual-images figure,
.manual-image-preview figure {
  margin: 0;
}
.manual-images img {
  display: block;
  max-width: 100%;
  max-height: 680px;
  border: 1px solid #dccbb4;
  border-radius: 8px;
}
.manual-video {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #e5d7c5;
}
.manual-video h4 {
  margin: 0 0 12px;
  color: #4d392f;
  font-size: 18px;
}
.manual-video-sound {
  margin: 0 8px 10px 0;
  border-color: #2f7d6d;
  background: #edf8f4;
  color: #245f51;
  font-weight: 700;
}
.manual-video-sound-hint {
  color: #6f594b;
  font-size: 12px;
}
.manual-video video {
  display: block;
  width: min(100%, 960px);
  border: 1px solid #d9c5ad;
  border-radius: 10px;
  background: #1d1917;
}
.manual-video-preview {
  display: grid;
  gap: 8px;
  justify-items: start;
}
.manual-video-preview video {
  width: min(100%, 560px);
  border: 1px solid #d9c5ad;
  border-radius: 8px;
  background: #1d1917;
}
.manual-video-preview span {
  color: #6f594b;
  font-size: 12px;
}
.manual-video-preview button {
  padding: 6px 10px;
  color: #a33a32;
}
.manual-meta {
  margin-top: 28px;
  color: #846e60;
  font-size: 11px;
}
.manual-empty {
  display: grid;
  grid-column: 2;
  grid-row: 2;
  gap: 8px;
  place-items: center;
  min-height: 320px;
  color: #846e60;
}
.manual-empty strong {
  color: #513d31;
  font-size: 18px;
}
.manual-empty span {
  font-size: 12px;
}
.manual-form {
  display: grid;
  grid-column: 2;
  grid-row: 2;
  gap: 16px;
  width: min(900px, 100%);
  padding: 24px;
}
.manual-form label {
  display: grid;
  gap: 7px;
  font-weight: 700;
}
.manual-form small {
  color: #846e60;
  font-weight: 400;
}
.manual-form fieldset {
  display: flex;
  gap: 18px;
  border: 1px solid #dccbb4;
  border-radius: 8px;
  padding: 12px;
}
.manual-form fieldset label {
  display: flex;
  align-items: center;
  gap: 6px;
}
.manual-form fieldset input {
  width: auto;
}
.manual-form textarea {
  min-height: 420px;
  line-height: 1.7;
  resize: vertical;
}
.manual-image-preview {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.manual-image-preview figure {
  display: grid;
  gap: 5px;
}
.manual-image-preview img {
  width: 150px;
  height: 100px;
  object-fit: cover;
  border: 1px solid #dccbb4;
  border-radius: 7px;
}
.manual-image-preview button {
  padding: 5px;
  font-size: 11px;
}
@media (max-width: 1000px) {
  .manual-view {
    grid-template-columns: minmax(0, 1fr);
  }
  .manual-head {
    grid-column: 1;
  }
  .manual-sidebar {
    grid-column: 1;
    grid-row: 2;
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid #dccbb4;
    padding: 0 0 8px;
  }
  .manual-tabs {
    max-height: 320px;
  }
  .manual-tab-link {
    width: 100%;
  }
  .manual-article,
  .manual-form,
  .manual-empty {
    grid-column: 1;
    grid-row: 3;
    padding-inline: 4px;
  }
}
.auth-overlay {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: #fffaf4;
}
.auth-card {
  width: min(430px, 100%);
  padding: 34px;
  border: 1px solid #dccbb4;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 50px #513d3120;
}
.auth-brand {
  color: #f97948;
  font-size: 26px;
  font-weight: 700;
}
.auth-card h1 {
  margin: 12px 0 6px;
}
.auth-card > p {
  color: #846e60;
  font-size: 12px;
}
.auth-form {
  display: grid;
  gap: 15px;
  margin-top: 22px;
}
.auth-form label,
.auth-dialog form {
  display: grid;
  gap: 7px;
}
.auth-form button {
  margin-top: 5px;
}
.auth-error {
  min-height: 20px;
  color: #b13c26 !important;
}
.account-menu {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.account-menu + .badge {
  margin-left: 0;
}
.account-menu button {
  padding: 7px 10px;
}
.auth-dialog form {
  gap: 15px;
  min-width: min(400px, 80vw);
}
.auth-dialog h2 {
  margin: 0 0 8px;
}
.manual-prescription-link-button {
  width: 100%;
  margin-top: 8px;
  border-color: #ef7b45;
  background: #fff7ef;
  color: #b94d24;
  font-size: 12px;
  font-weight: 700;
}
.historical-prescription-link-button {
  width: 100%;
  margin-top: 6px;
  border: 1px solid #c88419;
  background: #fff4d7;
  color: #8a4b00;
  font-size: 12px;
  font-weight: 700;
}
.proceed-without-prescription-button {
  width: 100%;
  margin-top: 6px;
  border: 1px solid #c62828;
  background: #fff;
  color: #c62828;
  font-size: 12px;
  font-weight: 700;
}
.card .prescription-missing-tag {
  display: inline-flex;
  flex: none;
  margin: 0 0 0 auto;
  padding: 2px 5px;
  border: 1px solid #d33;
  border-radius: 4px;
  background: #fff5f5;
  color: #c62828;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.4;
  white-space: nowrap;
}
.prescription-extension-confirmation {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 8px;
  border: 1px solid #e1a33c;
  border-radius: 6px;
  background: #fff8e8;
  color: #7a4200;
  font-weight: 700;
}
.prescription-extension-confirmation input {
  margin-top: 3px;
}
.settlement-row-unshipped {
  background: #fff9ea;
}
.settlement-unshipped-warning {
  color: #a05a00;
  font-weight: 700;
}
.settlement-update-conflict {
  background: #fff1f1;
}
.settlement-updated-cell em {
  display: block;
  color: #b42318;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}
.prescription-link-dialog {
  width: min(720px, 95vw);
  max-height: 85vh;
  overflow: auto;
}
.prescription-link-dialog h2 {
  margin: 0;
  font-size: 18px;
}
.prescription-link-note,
.prescription-link-empty {
  font-size: 12px;
  line-height: 1.7;
  color: #846e60;
}
.prescription-link-candidate {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #e4d5c1;
  border-radius: 9px;
  background: #fffaf4;
}
.prescription-link-candidate > span {
  font-size: 12px;
  color: #846e60;
}
.prescription-link-candidate > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.prescription-link-candidate .primary {
  padding: 8px 12px;
}
.sidebar-footer {
  display: none;
}
.feedback-view {
  display: grid;
  gap: 18px;
}
.feedback-head h2 {
  margin-bottom: 4px;
}
.feedback-head p {
  margin: 0;
  color: #846e60;
  font-size: 12px;
}
.feedback-form {
  display: grid;
  grid-template-columns: 220px 220px 220px 1fr;
  gap: 12px;
  padding: 18px;
  border: 1px solid #dccbb4;
  border-radius: 10px;
  background: #fff;
}
.feedback-form label {
  display: grid;
  gap: 6px;
  font-weight: 700;
}
.feedback-form .wide {
  grid-column: 1/-1;
}
.feedback-form textarea {
  resize: vertical;
}
.feedback-form button {
  width: max-content;
}
.feedback-table {
  min-width: 1220px;
}
.feedback-table th:nth-child(1) {
  width: 150px;
}
.feedback-table th:nth-child(2) {
  width: 120px;
}
.feedback-table th:nth-child(3) {
  width: 145px;
}
.feedback-table th:nth-child(4) {
  width: 95px;
}
.feedback-table th:nth-child(6) {
  width: 90px;
}
.feedback-table th:nth-child(7) {
  width: 120px;
}
.feedback-table img {
  width: 72px;
  height: 52px;
  border: 1px solid #dccbb4;
  border-radius: 5px;
  object-fit: cover;
}
.feedback-table select,
.feedback-table textarea {
  width: 100%;
  padding: 7px;
}
.feedback-table textarea {
  min-width: 180px;
  resize: vertical;
}
.feedback-table td:last-child button {
  margin-top: 6px;
  padding: 6px 10px;
}
@media (max-width: 800px) {
  .feedback-form {
    grid-template-columns: 1fr;
  }
  .feedback-form .wide {
    grid-column: 1;
  }
}
.questionnaire-manual-actions {
  display: grid;
  gap: 7px;
  margin-top: 8px;
  padding-top: 9px;
  border-top: 1px solid #edc7b6;
}
.questionnaire-manual-actions > span {
  color: #8b513b;
  font-size: 10px !important;
  line-height: 1.55;
}
.questionnaire-csv-action {
  margin: 0;
}
.card > .questionnaire-csv-button,
.card > .questionnaire-csv-action {
  margin-top: 6px;
}
.questionnaire-csv-button,
.questionnaire-none-button {
  width: 100%;
  border-color: #d86b35;
  background: #fff7ef;
  color: #aa421f;
  font-size: 11px;
  font-weight: 700;
}
.questionnaire-none-button {
  border-color: #6c9472;
  background: #f2faf3;
  color: #356a3c;
}
.questionnaire-none-pdf-check {
  display: flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  color: #356a3c;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.questionnaire-none-pdf-check input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: #4f6fa8;
  cursor: pointer;
}
.questionnaire-none-pdf-check:has(input:disabled) {
  color: #8e8580;
  cursor: not-allowed;
}
.questionnaire-none-pdf-check input:disabled {
  cursor: not-allowed;
}
.questionnaire-csv-imported,
.questionnaire-none-confirmed {
  border-radius: 5px;
  padding: 5px 7px;
  background: #eef8ef;
  color: #356a3c;
  font-size: 10px !important;
  font-weight: 700;
}
.questionnaire-none-confirmed {
  background: #f0f4e7;
  color: #536523;
}
.shortage-shipping-plan {
  display: grid;
  gap: 4px;
  margin-top: 6px;
  padding: 6px;
  border: 1px solid #d9b36c;
  border-radius: 7px;
  background: #fff8e8;
}
.shortage-shipping-plan .shortage-shipping-plan-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  color: #674b1f;
  font-size: 11px;
  font-weight: 700;
}
.shortage-shipping-plan select,
.shortage-shipping-plan input {
  min-width: 0;
  width: 100%;
  padding: 6px;
}
.shortage-shipping-plan .medication-history-save-state {
  min-height: 0;
}
.split-shipment-settlement-ready {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 7px;
  align-items: center;
  padding: 9px;
  border: 1px solid #6e9a72;
  border-radius: 7px;
  background: #f1f8ef;
  color: #285d31;
  font-size: 12px;
  font-weight: 800;
}
.split-shipment-settlement-ready small {
  grid-column: 1 / -1;
  color: #55715a;
  font-size: 10px;
  font-weight: 600;
}
.missing-address-warning {
  border-radius: 5px;
  padding: 5px 7px;
  background: #fff0ea;
  color: #a13f29;
  font-size: 10px !important;
  font-weight: 700;
}
.table-sort {
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}
.table-sort:hover {
  color: #ad4a23;
}
.patients-table-view th,
.patients-table-view .table-sort,
.shipping-table-view th,
.shipping-table-view .table-sort {
  font-size: 13px;
}
.patients-table-view td,
.shipping-table-view td {
  font-size: 14px;
  line-height: 1.6;
}
.patients-table-view td button,
.shipping-table-view td button {
  font-size: 13px;
}
.stage-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}
.stage-stock {
  background: #fff1cf;
  border-color: #e8c66d;
  color: #805f12;
}
.stage-received {
  background: #e6f3fb;
  border-color: #9bcbe6;
  color: #22627f;
}
.stage-guidance {
  background: #f1eafa;
  border-color: #c9afe4;
  color: #69448d;
}
.stage-guidance_done {
  background: #e6f5ea;
  border-color: #9ed0aa;
  color: #2f7040;
}
.stage-input {
  background: #fff0e4;
  border-color: #edb389;
  color: #98542b;
}
.stage-shipping {
  background: #e8effc;
  border-color: #a9bfe8;
  color: #3a5d9a;
}
.stage-shipped {
  background: #efefef;
  border-color: #c8c8c8;
  color: #626262;
}
.stage-uat_archived {
  background: #fff0f3;
  border-color: #dda0b2;
  color: #9d3152;
}
.stage-unset {
  background: #f6f0e9;
  border-color: #d7c8b8;
  color: #76675c;
}
.board > .column[data-stage='stock'] {
  border-top-color: #eea16e;
}
.board > .column[data-stage='received'] {
  border-top-color: #dc9062;
}
.board > .column[data-stage='guidance'] {
  border-top-color: #c87f57;
}
.board > .column[data-stage='guidance_done'] {
  border-top-color: #ad6f4d;
}
.board > .column[data-stage='input'] {
  border-top-color: #925f45;
}
.board > .column[data-stage='shipping'] {
  border-top-color: #74503e;
}
.board > .column[data-stage='shipped'] {
  border-top-color: #583c31;
}
.date-filter-control {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #846e60;
  font-size: 12px;
}
.date-filter-control input {
  padding: 8px;
}
.overdue-filter {
  border-color: #d98a7d;
  background: #fff0ed;
  color: #a33c2d;
  font-size: 12px;
  font-weight: 700;
}
.overdue-filter.active {
  background: #a33c2d;
  color: #fff;
}
.overdue-filter:disabled {
  border-color: #dccbb4;
  background: #f6f0e9;
  color: #9b8579;
}
.patients-table-view tr.overdue-shipping-row,
.shipping-table-view tr.overdue-shipping-row {
  background: #fff0ed;
}
.patients-table-view tr.overdue-shipping-row td,
.shipping-table-view tr.overdue-shipping-row td {
  border-bottom-color: #e7aaa0;
}
.board {
  align-items: start;
  height: calc(100vh - 180px);
  min-height: 420px;
  overflow-x: auto;
  overflow-y: hidden;
}
.board > .column {
  max-height: 100%;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #dccbb4 transparent;
}
.board > .column > h3,
.board > .column > .archive-heading {
  position: sticky;
  top: -12px;
  z-index: 2;
  margin-inline: -12px;
  padding: 12px;
  background: #f9f2e2;
  border-bottom: 1px solid #dccbb4;
}
.board > .column > h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}
.column-sort {
  min-width: 0;
  padding: 5px 6px;
  font-size: 11px;
}
.shift-view {
  display: grid;
  gap: 18px;
  background: #fff;
  border: 1px solid #dccbb4;
  border-radius: 10px;
  padding: 20px;
}
.shift-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}
.shift-head h2 {
  margin: 0 0 4px;
}
.shift-head p {
  margin: 0;
  color: #846e60;
  font-size: 12px;
}
.shift-month-actions {
  display: flex;
  align-items: end;
  gap: 8px;
}
.shift-month-actions label {
  display: grid;
  gap: 4px;
  color: #846e60;
  font-size: 11px;
}
.shift-month-actions input {
  padding: 7px;
}
.shift-month-actions button {
  min-width: 38px;
  padding: 8px;
}
.shift-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  overflow-x: auto;
  border-top: 1px solid #dccbb4;
  border-left: 1px solid #dccbb4;
}
.shift-calendar > * {
  min-height: 108px;
  border-right: 1px solid #dccbb4;
  border-bottom: 1px solid #dccbb4;
}
.shift-weekday-head {
  min-height: auto !important;
  padding: 7px;
  background: #f9f2e2;
  color: #846e60;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}
.shift-day {
  padding: 7px;
  background: #fff;
}
.shift-day.outside {
  background: #fbf8f4;
}
.shift-day-number {
  display: block;
  margin-bottom: 6px;
  color: #846e60;
  font-size: 11px;
  font-weight: 700;
}
.shift-bar {
  display: block;
  margin: 4px 0;
  padding: 5px 7px;
  border-radius: 5px;
  background: #e8effc;
  color: #355b91;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}
.shift-bar.off {
  background: #fff0ed;
  color: #a33c2d;
}
.shift-editors {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  gap: 16px;
}
.shift-form {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 18px;
  border: 1px solid #dccbb4;
  border-radius: 9px;
  background: #fffaf4;
}
.shift-form-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.shift-form h3 {
  margin: 0;
}
.shift-form > label,
.shift-date-range label,
.shift-time-range label {
  display: grid;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
}
.shift-form fieldset {
  display: grid;
  gap: 12px;
  margin: 0;
  border: 1px solid #dccbb4;
  border-radius: 8px;
  padding: 12px;
}
.shift-form legend {
  padding: 0 5px;
  font-size: 12px;
  font-weight: 700;
}
.shift-mode-tabs {
  display: flex;
  gap: 4px;
}
.shift-mode-tabs button {
  padding: 6px 9px;
  font-size: 11px;
}
.shift-mode-tabs button.active {
  border-color: #f97948;
  background: #f97948;
  color: #fff;
}
.shift-weekdays {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.shift-weekdays label {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  border: 1px solid #dccbb4;
  border-radius: 6px;
  background: #fff;
  font-size: 12px;
}
.shift-weekdays input {
  width: auto;
}
.shift-date-range,
.shift-time-range {
  display: flex;
  align-items: end;
  gap: 10px;
}
.shift-date-range label,
.shift-time-range label {
  flex: 1;
}
.shift-readonly {
  margin: 0;
  padding: 12px;
  border-radius: 7px;
  background: #f6f0e9;
  color: #846e60;
  font-size: 12px;
}
@media (max-width: 1000px) {
  .shift-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .shift-editors {
    grid-template-columns: 1fr;
  }
  .shift-calendar {
    grid-template-columns: repeat(7, minmax(105px, 1fr));
  }
}
.workspace > header > .badge {
  display: none;
}
.collector-state {
  flex: none;
  padding: 6px 10px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 700;
}
.collector-state.active {
  background: #e5f5e9;
  color: #27743b;
}
.collector-state.inactive {
  background: #fff0ed;
  color: #a33c2d;
}
.shift-head {
  flex-wrap: wrap;
}
.shift-display-tabs {
  display: flex;
  gap: 4px;
}
.shift-display-tabs button {
  padding: 8px 12px;
}
.shift-display-tabs button.active {
  border-color: #f97948;
  background: #f97948;
  color: #fff;
}
.shift-timeline {
  overflow-x: auto;
  border: 1px solid #dccbb4;
  border-radius: 8px;
}
.shift-timeline-row {
  display: grid;
  grid-template-columns: 150px minmax(900px, 1fr);
  min-width: 1050px;
  border-bottom: 1px solid #eadfce;
}
.shift-timeline-row:last-child {
  border-bottom: 0;
}
.shift-timeline-row > strong {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 6px 10px;
  border-right: 1px solid #dccbb4;
  background: #fff;
}
.shift-timeline-header > strong {
  min-height: 34px;
  background: #f9f2e2;
  color: #846e60;
  font-size: 11px;
}
.shift-timeline-track {
  position: relative;
  min-height: 38px;
  background: repeating-linear-gradient(
    to right,
    #fff 0,
    #fff calc(4.1667% - 1px),
    #eadfce calc(4.1667% - 1px),
    #eadfce 4.1667%
  );
}
.shift-timeline-header .shift-timeline-track {
  min-height: 34px;
  background: #f9f2e2;
}
.shift-hour {
  position: absolute;
  top: 8px;
  transform: translateX(-50%);
  color: #846e60;
  font-size: 10px;
  white-space: nowrap;
}
.shift-hour:first-of-type {
  transform: none;
}
.shift-hour:last-of-type {
  transform: translateX(-100%);
}
.shift-timeline-bar {
  position: absolute;
  z-index: 2;
  top: 8px;
  height: 22px;
  min-width: 32px;
  overflow: hidden;
  border: 1px solid #6ba17a;
  border-radius: 5px;
  background: #dff0e3;
  color: #2f7040;
  padding: 2px 5px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.shift-timeline-empty {
  position: absolute;
  left: 8px;
  top: 9px;
  color: #a9978b;
  font-size: 11px;
}
.shift-timeline-empty.off {
  color: #a33c2d;
  font-weight: 700;
}
.shift-now-line {
  position: absolute;
  z-index: 3;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #d84b33;
  pointer-events: none;
}
.shift-staff-name {
  font-size: 12px;
}
.shift-role-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding: 8px 10px;
  border-bottom: 1px solid #dccbb4;
  background: #fffaf4;
  color: #6d5a4f;
  font-size: 11px;
}
.shift-role-legend > span,
.shift-staff-name strong {
  display: flex;
  align-items: center;
  gap: 5px;
}
.shift-role-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex: none;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
}
.role-admin {
  background: #f3dd88;
  color: #765513;
}
.role-shinsei-clerk {
  background: #f6d8e3;
  color: #983f64;
}
.role-cloud-pharmacist {
  background: #dfe5fb;
  color: #5546a0;
}
.role-cloud-clerk {
  background: #d9eef8;
  color: #256482;
}
.role-shinsei-pharmacist {
  background: #dff0e3;
  color: #2f7040;
}
.role-other {
  background: #ece6df;
  color: #78695f;
}
.shift-bar {
  display: flex;
  align-items: center;
  gap: 4px;
}
.shift-bar .shift-role-icon {
  width: 15px;
  height: 15px;
  font-size: 9px;
}
.shift-timeline-row > .shift-staff-name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  padding: 5px 7px;
  border-right: 1px solid #dccbb4;
  background: #fff;
}
.shift-staff-order {
  display: flex;
  gap: 2px;
}
.shift-staff-order button {
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 4px;
  font-size: 10px;
}
.shift-staff-order button:disabled {
  opacity: 0.25;
}
#shiftDisplayDate,
#shiftMonth {
  width: 190px;
  padding: 8px 10px;
  color: #3f3028;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}
.shift-role-icon,
.role-admin,
.role-shinsei-clerk,
.role-cloud-pharmacist,
.role-cloud-clerk,
.role-shinsei-pharmacist,
.role-other {
  background: transparent;
  color: inherit;
}
.shift-timeline-bar {
  cursor: pointer;
  text-align: left;
}
.shift-timeline-bar:disabled,
.shift-bar:disabled {
  cursor: default;
  opacity: 1;
}
.shift-edit-dialog {
  width: min(430px, calc(100vw - 32px));
  border: 1px solid #dccbb4;
  border-radius: 12px;
  padding: 0;
  box-shadow: 0 18px 50px #513d3130;
}
.shift-edit-dialog::backdrop {
  background: #31231d55;
}
.shift-edit-dialog form {
  display: grid;
  gap: 16px;
  padding: 20px;
}
.shift-edit-dialog h2 {
  margin: 0;
  font-size: 18px;
}
.shift-edit-dialog form > label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
}
.shift-edit-dialog textarea {
  resize: vertical;
}
.shift-edit-dialog small {
  color: #846e60;
  font-weight: 400;
}
.shift-color-field {
  display: flex;
  gap: 10px;
  margin: 0;
  border: 0;
  padding: 0;
}
.shift-color-field legend {
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
}
.shift-color-field label {
  position: relative;
}
.shift-color-field input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.shift-color-field span {
  display: block;
  width: 28px;
  height: 28px;
  border: 2px solid transparent;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px #6d5a4f35;
  cursor: pointer;
}
.swatch-green {
  background: #dff0e3;
}
.swatch-amber {
  background: #f4ddb0;
}
.swatch-pink {
  background: #f2cfdb;
}
.swatch-purple {
  background: #ded6f4;
}
.swatch-blue {
  background: #d3e1f4;
}
.swatch-gray {
  background: #dedbd4;
}
.shift-color-field input:checked + span {
  border-color: #513d31;
  box-shadow:
    0 0 0 2px #fff,
    inset 0 0 0 1px #6d5a4f35;
}
.danger {
  border-color: #c86150;
  background: #fff;
  color: #a33c2d;
}
.danger:hover {
  background: #fff0ed;
}
.prescription-stock-title,
.prescription-waiting-title,
.prescription-expired-title,
.march-questionnaire-missing-title,
.march-questionnaire-ready-title {
  margin: 10px -4px;
  padding: 9px 8px;
  border-top: 1px solid #dccbb4;
  border-bottom: 1px solid #dccbb4;
  background: #fff7e8;
  color: #805f12;
  font-size: 12px;
}
.prescription-waiting-title,
.march-questionnaire-missing-title {
  margin-top: 18px;
}
.march-questionnaire-missing-title {
  background: #ff4700;
  color: #fff;
  font-weight: 700;
}
.march-questionnaire-ready-title {
  background: #eea16e;
  color: #fff;
  font-weight: 700;
}
.prescription-stock-title,
.prescription-waiting-title {
  background: #eea16e;
  color: #fff;
  font-weight: 700;
}
.prescription-waiting-title { background: #f97948; }
.prescription-expired-title {
  margin-top: 22px;
  background: #ff4700;
  color: #fff;
  font-weight: 700;
}
.inventory-section-nav,
.questionnaire-section-nav {
  position: sticky;
  top: 45px;
  z-index: 2;
  display: grid;
  gap: 4px;
  margin: -12px -4px 2px;
  padding: 2px 4px;
  background: #f9f2e2;
}
.inventory-section-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.questionnaire-section-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.inventory-section-chip,
.questionnaire-section-chip {
  display: flex;
  min-width: 0;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  padding: 2px 5px;
  overflow: hidden;
  border: 1px solid currentColor;
  border-radius: 0;
  background: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
}
.inventory-section-chip.is-inventory { color: #c66a31; }
.inventory-section-chip.is-waiting { color: #e85f2e; }
.inventory-section-chip.is-expired { color: #e53f00; }
.questionnaire-section-chip.is-ready { color: #c66a31; }
.questionnaire-section-chip.is-missing { color: #e53f00; }
.inventory-section-chip.is-active,
.questionnaire-section-chip.is-active { color: #fff; }
.inventory-section-chip.is-inventory.is-active { background: #eea16e; }
.inventory-section-chip.is-waiting.is-active { background: #f97948; }
.inventory-section-chip.is-expired.is-active { background: #ff4700; }
.questionnaire-section-chip.is-ready.is-active { background: #eea16e; }
.questionnaire-section-chip.is-missing.is-active { background: #ff4700; }
.inventory-section-nav + .prescription-stock-title {
  margin-top: 2px;
}
.questionnaire-section-nav + .march-questionnaire-ready-title {
  margin-top: 2px;
}
.expired-prescription-row {
  display: grid; width: 100%; grid-template-columns: 56px minmax(0, 1fr); gap: 8px;
  align-items: center; margin: 0; padding: 10px 6px; border: 0;
  border-bottom: 1px solid #382f2b; border-radius: 0; background: transparent;
  color: #675e5a; text-align: left;
}
.expired-prescription-row:hover { background: #fff1e8; }
.expired-prescription-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inventory-fulfillment-detail { display: grid; gap: 8px; }
.inventory-fulfillment-detail label { display: grid; grid-template-columns: 72px minmax(0, 1fr); align-items: center; gap: 8px; }
.inventory-fulfillment-detail select, .inventory-fulfillment-detail input { width: 100%; }
.card .inventory-fulfillment-card {
  margin-top: 6px;
  padding: 9px;
  border: 1px solid #e0b489;
  border-radius: 8px;
  background: #fff8ef;
}
.card .inventory-shortage-note {
  align-items: stretch;
  flex-direction: column;
  gap: 4px;
}
.card .inventory-shortage-note-label {
  color: #6f4d31;
  font-size: 11px;
  font-weight: 700;
}
.prescription-expiry-detail-warning {
  display: block; padding: 9px 10px; border: 1px solid #d9432f; border-radius: 6px;
  background: #fff0ed; color: #a72b1d;
}
.march-questionnaire-missing-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.march-enrichment-all-button {
  padding: 5px 7px;
  border-color: #fff;
  background: #fff;
  color: #ff4700;
  font-size: 10px;
  font-weight: 700;
}
.march-enrichment-all-button:not(:disabled):hover {
  border-color: #fff;
  background: #fff1eb;
  color: #d93c00;
}
.march-enrichment-all-button:disabled {
  opacity: 0.6;
  cursor: wait;
}
.march-enrichment-card-state {
  display: block;
  border-radius: 5px;
  padding: 5px 7px;
  font-size: 10px;
  font-weight: 700;
}
.march-enrichment-card-state.pending {
  background: #eef3df;
  color: #526d22;
}
.march-enrichment-card-state.error {
  background: #fff0ea;
  color: #a13f29;
}
.march-discovery-action {
  display: grid;
  gap: 6px;
  margin-top: 16px;
  padding-top: 10px;
  border-top: 1px solid #ead8c1;
}
.march-discovery-action .march-enrichment-request-button {
  width: 100%;
  padding: 8px 6px;
  border-color: #e49a65;
  background: #fff1e6;
  color: #a64b22;
  font-size: 11px;
  font-weight: 700;
}
.march-discovery-action .march-enrichment-request-button:hover {
  background: #ffe3cf;
}
.march-discovery-action .march-enrichment-request-button:disabled {
  opacity: 0.65;
  cursor: wait;
}
.march-discovery-action .march-enrichment-card-state.error {
  font-size: 9px;
  font-weight: 400;
  line-height: 1.55;
}
.column[data-stage='received'] .march-enrichment-card-state.error {
  font-size: 9px;
  font-weight: 400;
  line-height: 1.55;
}
.desktop-update-button {
  position: fixed;
  z-index: 80;
  left: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #0b4d3b;
  border-radius: 50%;
  background: #165f49;
  color: #fff;
  box-shadow: 0 3px 12px #183c3266;
}
.desktop-update-button:hover {
  background: #0f503d;
}
.desktop-update-button:disabled {
  opacity: 0.65;
  cursor: wait;
}
.desktop-update-button svg {
  width: 23px;
  height: 23px;
  fill: currentColor;
}
.feedback-type-guide {
  display: flex;
  grid-column: 1/-1;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 10px;
  border: 1px solid #dccbb4;
  border-radius: 7px;
  background: #fffaf4;
  font-size: 11px;
}
.feedback-type-guide span {
  white-space: nowrap;
}
.feedback-reporter {
  grid-column: 1/-1;
  margin: 0;
  color: #846e60;
  font-size: 11px;
}
.feedback-images {
  display: table-cell;
}
.feedback-images a {
  display: inline-block;
  margin: 0 5px 5px 0;
  vertical-align: top;
}
.feedback-table tr.feedback-completed > td {
  background: #eeeeec;
  color: #817b76;
}
.feedback-table tr.feedback-completed img {
  filter: grayscale(1);
  opacity: 0.7;
}
.feedback-list-controls,
.feedback-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.feedback-list-controls label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
}
.feedback-list-controls select {
  min-width: 150px;
}
.feedback-pagination span {
  color: #846e60;
  font-size: 12px;
}
.feedback-detail-actions {
  display: flex;
  gap: 6px;
  margin-top: 7px;
}
.feedback-detail-actions button {
  padding: 5px 9px;
  font-size: 11px;
}
.feedback-table {
  table-layout: fixed;
}
.feedback-table th,
.feedback-table td {
  vertical-align: top;
  overflow-wrap: anywhere;
}
.feedback-table th:nth-child(1) {
  width: 12%;
}
.feedback-table th:nth-child(2) {
  width: 10%;
}
.feedback-table th:nth-child(3) {
  width: 11%;
}
.feedback-table th:nth-child(4) {
  width: 8%;
}
.feedback-table th:nth-child(5) {
  width: 20%;
}
.feedback-table th:nth-child(6) {
  width: 8%;
}
.feedback-table th:nth-child(7) {
  width: 10%;
}
.feedback-table th:nth-child(8) {
  width: 21%;
}
.feedback-table td:nth-child(6) {
  text-align: center;
}
.feedback-table td:nth-child(8) textarea {
  box-sizing: border-box;
  min-width: 0;
  min-height: 64px;
}
.feedback-table td:nth-child(8) button {
  margin-top: 7px;
}
.questionnaire-csv-state {
  display: block;
  border-radius: 5px;
  padding: 5px 7px;
  background: #f6f0e9;
  color: #765f51;
  font-size: 9px !important;
  line-height: 1.5;
}
.questionnaire-csv-state.pending {
  background: #eef3df;
  color: #526d22;
}
.questionnaire-csv-state.error {
  background: #fff0ea;
  color: #a13f29;
}
.prescription-expiry-warning {
  display: block;
  margin-top: 6px;
  padding: 5px 7px;
  border-radius: 6px;
  background: #fde8e4;
  color: #a72b1d;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.45;
}
.gmail-cancellation-warning {
  display: inline-block;
  margin-left: 6px;
  padding: 4px 7px;
  border-radius: 6px;
  background: #b42318;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
}

/* Compact patient/prescription list only. */
#tableView.patients-table-view th,
#tableView.patients-table-view td {
  height: 32px;
  padding: 4px 10px;
  line-height: 1.25;
}
#tableView.patients-table-view td button {
  white-space: nowrap;
  min-height: 0;
  padding: 0 8px;
  line-height: 1.2;
}
#tableView.patients-table-view .stage-tag,
#tableView.patients-table-view .settlement-status-tag {
  padding: 2px 8px;
  line-height: 1.2;
}
#tableView.patients-table-view .settlement-pagination {
  padding: 6px 0;
}

/* Match shipping list density to the patient/prescription list. */
#tableView.shipping-table-view th,
#tableView.shipping-table-view td {
  height: 32px;
  padding: 4px 10px;
  line-height: 1.25;
}
#tableView.shipping-table-view td button {
  white-space: nowrap;
  min-height: 0;
  padding: 0 8px;
  line-height: 1.2;
}
#tableView.shipping-table-view .stage-tag,
#tableView.shipping-table-view .settlement-status-tag {
  padding: 2px 8px;
  line-height: 1.2;
}

/* Keep exported shipments readable while distinguishing them from the next batch. */
#tableView.shipping-table-view tr.yamato-exported-row td {
  background: #ededed;
  color: #686868;
  border-color: #d5d5d5;
}
#tableView.shipping-table-view tr.yamato-exported-row td button {
  background: #f5f5f5;
  border-color: #bfbfbf;
  color: #555;
}
#tableView.shipping-table-view td.yamato-export-status {
  white-space: nowrap;
}

#fields .phone-detail-field { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
#fields .phone-detail-field input { width: min(260px, 100%); min-width: 140px; padding: 6px 8px; }
#fields .phone-detail-field button { padding: 6px 10px; white-space: nowrap; }
#fields .phone-detail-field small { flex-basis: 100%; color: #846e60; font-size: 11px; }

#tableView.shipping-table-view tr td.missing-phone {
  color: #b42323;
  font-weight: 700;
}
