:root{--bg:#f6f7f9;--card:#fff;--line:#d9dee7;--text:#1f2937;--muted:#6b7280;--primary:#2563eb;--danger:#dc2626;--warn:#b45309;--ok:#047857}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','Yu Gothic',Meiryo,sans-serif;line-height:1.6}.top{display:flex;justify-content:flex-end;align-items:center;padding:0;min-height:0;background:#fff;color:var(--text)}.top a{color:var(--primary)}.top .user{margin:8px 18px}.version,.sub{font-size:12px;color:var(--muted)}.user{text-align:right;font-size:14px}.nav{display:flex;gap:8px;flex-wrap:wrap;padding:10px 18px;background:#e5e7eb;border-bottom:1px solid var(--line)}.nav a{padding:7px 10px;border-radius:8px;background:#fff;text-decoration:none;color:#111827;border:1px solid var(--line)}.container{max-width:1280px;margin:0 auto;padding:22px}.foot{padding:20px;text-align:center;color:var(--muted);font-size:12px}h1{font-size:26px;margin:4px 0 18px}h2{font-size:20px;margin:8px 0 12px}.card{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:18px;margin:12px 0;box-shadow:0 1px 2px rgba(0,0,0,.04)}.narrow{max-width:440px;margin:40px auto}.grid2{display:grid;grid-template-columns:1fr 1fr;gap:16px}.toolbar{display:flex;gap:12px;align-items:end;flex-wrap:wrap;background:#fff;border:1px solid var(--line);border-radius:12px;padding:12px;margin:12px 0}.formgrid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}label{display:block;font-weight:600;margin:8px 0}input,select,textarea{width:100%;padding:8px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;font:inherit}textarea{min-height:80px}button,.button{display:inline-block;border:1px solid #cbd5e1;border-radius:8px;background:#fff;padding:8px 12px;cursor:pointer;font:inherit;text-decoration:none;color:#111827}.primary{background:var(--primary);border-color:var(--primary);color:#fff}.danger{background:var(--danger);border-color:var(--danger);color:#fff}.small{font-size:12px;padding:4px 8px}.inline{display:inline}.list{width:100%;border-collapse:collapse;background:#fff;margin:12px 0}.list th,.list td{border:1px solid var(--line);padding:8px;vertical-align:top}.list th{background:#f1f5f9;text-align:left}.list.small{font-size:13px}.wide{min-width:320px}.pre{white-space:pre-wrap}.muted,.hint{color:var(--muted);font-size:12px}.flash{padding:12px 14px;border-radius:10px;margin:10px 0;border:1px solid var(--line);background:#fff}.flash.success{border-color:#a7f3d0;background:#ecfdf5;color:#065f46}.flash.error{border-color:#fecaca;background:#fef2f2;color:#991b1b}.flash.warning{border-color:#fde68a;background:#fffbeb;color:#92400e}.chips{display:flex;gap:8px;flex-wrap:wrap}.chip{display:inline-block;padding:6px 10px;border:1px solid var(--line);border-radius:999px;background:#fff;text-decoration:none}.test-banner{background:#dc2626;color:#fff;padding:16px;border-radius:12px;text-align:center;font-size:28px;font-weight:800;letter-spacing:.2em}.print-sheet{background:#fff;padding:20px}.print-table{width:100%;border-collapse:collapse;font-size:12px}.print-table th,.print-table td{border:1px solid #444;padding:5px;vertical-align:top}.print-table th{background:#eee}@media(max-width:900px){.grid2,.formgrid{grid-template-columns:1fr}.container{padding:12px}.top{align-items:flex-start;gap:12px}}@media print{.top,.nav,.foot,.no-print,.toolbar,.flash,button{display:none!important}body{background:#fff}.container{max-width:none;padding:0}h1{display:none}.print-sheet{padding:0}.print-table{font-size:10.5px}textarea,input,select{border:0;padding:0}.card{box-shadow:none;border:0}}

/* patient-input-frame-align-202607141008 START */

/*
 * 患者別入力画面の下側を、
 * 上側の患者選択枠と同じ位置・幅にする。
 */

form.patient-input-toolbar
~ div.card.sign-right-card,

form.patient-input-toolbar
~ .patient-input-day-nav-bottom,

form.patient-input-toolbar
~ .patient-day-nav-bottom,

form.patient-input-toolbar
~ [class*="patient-input-day-nav-bottom"],

form.patient-input-toolbar
~ [class*="patient-day-nav-bottom"] {

  width: 100% !important;

  max-width: 100% !important;

  margin-left: 0 !important;

  margin-right: 0 !important;

  box-sizing: border-box !important;
}


/*
 * 下側ナビに以前設定された
 * calc(100% - 56px) も解除する。
 */

.patient-input-day-nav-bottom,

.patient-day-nav-bottom {

  width: 100% !important;

  max-width: 100% !important;

  margin-left: 0 !important;

  margin-right: 0 !important;

  box-sizing: border-box !important;
}

/* patient-input-frame-align-202607141008 END */

/* readmission-date-final-fit-202607141019 START */

/*
 * 退院患者一覧だけを対象にする。
 * 再入院列と日付欄を同時に広げる。
 */

table.list:has(
  td:last-child input[type="date"]
) {
  width: 100% !important;
  table-layout: fixed !important;
}


table.list:has(
  td:last-child input[type="date"]
) col:last-child,

table.list:has(
  td:last-child input[type="date"]
) th:last-child,

table.list:has(
  td:last-child input[type="date"]
) td:last-child {
  width: 220px !important;
  min-width: 220px !important;
  max-width: 220px !important;
  box-sizing: border-box !important;
}


table.list:has(
  td:last-child input[type="date"]
) td:last-child {
  padding-left: 12px !important;
  padding-right: 12px !important;
  overflow: visible !important;
}


table.list:has(
  td:last-child input[type="date"]
) td:last-child form {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  overflow: visible !important;
  box-sizing: border-box !important;
}


table.list:has(
  td:last-child input[type="date"]
) td:last-child input[type="date"] {
  display: block !important;
  width: 172px !important;
  min-width: 172px !important;
  max-width: 172px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
}


table.list:has(
  td:last-child input[type="date"]
) td:last-child button,

table.list:has(
  td:last-child input[type="date"]
) td:last-child .btn,

table.list:has(
  td:last-child input[type="date"]
) td:last-child input[type="submit"] {
  display: block !important;
  width: 140px !important;
  max-width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
}

/* readmission-date-final-fit-202607141019 END */

/* readmission-button-align-only-202607141026 START */

/*
 * 表全体と列幅は変更しない。
 * 再入院日と2つのボタンだけを
 * 同じ幅へそろえる。
 */

table.list:has(
  td:last-child input[type="date"]
) td:last-child input[type="date"] {
  width: 172px !important;
  min-width: 172px !important;
  max-width: 172px !important;
  box-sizing: border-box !important;
}


table.list:has(
  td:last-child input[type="date"]
) td:last-child button,

table.list:has(
  td:last-child input[type="date"]
) td:last-child .btn,

table.list:has(
  td:last-child input[type="date"]
) td:last-child input[type="submit"] {
  width: 172px !important;
  min-width: 172px !important;
  max-width: 172px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  white-space: nowrap !important;
  text-align: center !important;
  box-sizing: border-box !important;
}

/* readmission-button-align-only-202607141026 END */

/* readmission-three-controls-align-202607141028 START */

/*
 * 再入院欄の3項目だけを
 * 20px左へ移動する。
 *
 * 表全体・列幅・患者情報は変更しない。
 */

table.list:has(
  td:last-child input[type="date"]
) td:last-child input[type="date"],

table.list:has(
  td:last-child input[type="date"]
) td:last-child button,

table.list:has(
  td:last-child input[type="date"]
) td:last-child input[type="submit"],

table.list:has(
  td:last-child input[type="date"]
) td:last-child .btn {
  position: relative !important;
  left: -20px !important;
  box-sizing: border-box !important;
}

/* readmission-three-controls-align-202607141028 END */

/* patient-management-action-final-202607141032 START */

/*
 * patient-listが
 * table・親枠・tbodyの
 * どこに付いていても有効にする。
 */

.patient-list td:last-child,
table.patient-list td:last-child,
table.list.patient-list td:last-child,
.patient-list table.list td:last-child {
  text-align: center !important;
  box-sizing: border-box !important;
}


/*
 * ボタンを囲うformを
 * 同じ幅で中央にそろえる。
 */

.patient-list td:last-child form,
table.patient-list td:last-child form,
table.list.patient-list td:last-child form,
.patient-list table.list td:last-child form {
  display: block !important;
  width: 96px !important;
  min-width: 96px !important;
  max-width: 96px !important;
  margin: 0 auto 8px !important;
  padding: 0 !important;
  text-align: center !important;
  box-sizing: border-box !important;
}


/*
 * 編集・退院・削除を
 * すべて同じ幅にする。
 */

.patient-list td:last-child a,
.patient-list td:last-child button,
.patient-list td:last-child input[type="submit"],
.patient-list td:last-child input[type="button"],

table.patient-list td:last-child a,
table.patient-list td:last-child button,
table.patient-list td:last-child input[type="submit"],
table.patient-list td:last-child input[type="button"],

table.list.patient-list td:last-child a,
table.list.patient-list td:last-child button,
table.list.patient-list td:last-child input[type="submit"],
table.list.patient-list td:last-child input[type="button"],

.patient-list table.list td:last-child a,
.patient-list table.list td:last-child button,
.patient-list table.list td:last-child input[type="submit"],
.patient-list table.list td:last-child input[type="button"] {
  display: block !important;
  width: 96px !important;
  min-width: 96px !important;
  max-width: 96px !important;
  min-height: 36px !important;
  margin: 0 auto 8px !important;
  padding: 7px 6px !important;
  line-height: 1.25 !important;
  white-space: nowrap !important;
  text-align: center !important;
  box-sizing: border-box !important;
}


/*
 * 最後のボタン下の余白を削除する。
 */

.patient-list td:last-child form:last-child,
.patient-list td:last-child > a:last-child,
.patient-list td:last-child > button:last-child,

table.patient-list td:last-child form:last-child,
table.list.patient-list td:last-child form:last-child,
.patient-list table.list td:last-child form:last-child {
  margin-bottom: 0 !important;
}

/* patient-management-action-final-202607141032 END */

/* patient-input-toolbar-inline-202607150144 START */

/*
 * 患者別入力の上部、
 * 日付 + 更新 + 本日 + 翌日
 * を横並びにそろえる。
 */

form.patient-input-toolbar {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  width: 100% !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

form.patient-input-toolbar br {
  display: none !important;
}

form.patient-input-toolbar > * {
  margin: 0 !important;
}

form.patient-input-toolbar label {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
}

form.patient-input-toolbar input[type="date"] {
  width: 160px !important;
  min-width: 160px !important;
  height: 46px !important;
  box-sizing: border-box !important;
}

form.patient-input-toolbar a,
form.patient-input-toolbar .button,
form.patient-input-toolbar button,
form.patient-input-toolbar input[type="submit"],
form.patient-input-toolbar input[type="button"] {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 46px !important;
  min-width: 84px !important;
  padding: 0 18px !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
}

/* patient-input-toolbar-inline-202607150144 END */

/* patient-discharge-modal-fix-202607150301 START */

/*
 * 患者管理の退院入力欄を、
 * 表内展開ではなく画面中央へ固定する。
 */
html body table.patient-list
td.patient-actions
.patient-discharge-panel,

html body #patient-sort-body
td.patient-actions
.patient-discharge-panel {
    position: fixed !important;

    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;

    transform:
        translate(-50%, -50%) !important;

    width: 260px !important;
    min-width: 0 !important;
    max-width:
        calc(100vw - 24px) !important;

    max-height:
        calc(100vh - 24px) !important;

    overflow-y: auto !important;

    margin: 0 !important;
    padding: 16px !important;

    box-sizing: border-box !important;

    z-index: 100000 !important;

    background: #eff6ff !important;

    border:
        1px solid #bfdbfe !important;

    border-radius: 12px !important;

    box-shadow:
        0 18px 50px
        rgba(15, 23, 42, .28) !important;
}


/* hidden属性のときは必ず非表示 */
html body table.patient-list
td.patient-actions
.patient-discharge-panel[hidden],

html body #patient-sort-body
td.patient-actions
.patient-discharge-panel[hidden] {
    display: none !important;
}

/* patient-discharge-modal-fix-202607150301 END */

 * ui-responsive-regression-fix-20260715
 *
 * タブレット・スマートフォンでは、
 * 幅の広い管理一覧をページ全体ではなく、
 * 表の内側だけで横スクロールさせる。
 */

@media screen and (max-width: 1100px) {

  .container,
  .card,
  .toolbar,
  .formgrid {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  table.list {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;

    overflow-x: auto !important;
    overflow-y: visible !important;

    -webkit-overflow-scrolling: touch;
  }

  table.list th,
  table.list td {
    box-sizing: border-box !important;
  }

  table.list button,
  table.list .button,
  table.list input,
  table.list select,
  table.list textarea {
    max-width: 100% !important;
  }

  .patient-master-edit-card {
    width: calc(100% - 24px) !important;
    max-width: calc(100% - 24px) !important;
    min-width: 0 !important;

    margin-left: 12px !important;
    margin-right: 12px !important;
  }

  .patient-master-edit-card form,
  .patient-master-edit-card .formgrid,
  .patient-master-edit-card label,
  .patient-master-edit-card input,
  .patient-master-edit-card select,
  .patient-master-edit-card textarea {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

}


@media screen and (max-width: 600px) {

  .patient-master-edit-card {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .patient-master-edit-card .formgrid {
    grid-template-columns:
      minmax(0, 1fr) !important;
  }

  .patient-master-edit-card button,
  .patient-master-edit-card .button {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

}

/* ui-responsive-regression-fix-20260715 END */

 * ui-admin-scroll-container-v2-20260715
 *
 * 幅の広い管理表を、
 * ページ全体ではなくカード内で
 * 横スクロールさせる。
 */

@media screen and (max-width: 1100px) {

  html,
  body {
    width: 100% !important;
    max-width: 100% !important;
  }

  .container {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .container > .card,
  .container > form.card,
  .container .card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;

    overflow-x: auto !important;
    overflow-y: visible !important;

    -webkit-overflow-scrolling: touch;
  }

  .container > .toolbar,
  .container .toolbar {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;

    overflow-x: auto !important;
  }

  .card > table.list,
  .card form > table.list,
  .toolbar > table.list {
    max-width: none !important;
  }

  .card table.list button,
  .card table.list .button,
  .card table.list input,
  .card table.list select,
  .card table.list textarea {
    box-sizing: border-box !important;
  }

}


@media screen and (max-width: 600px) {

  .container {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  .container > .card,
  .container > form.card,
  .container .card {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

}

/* ui-admin-scroll-container-v2-20260715 END */

/* ui-targeted-responsive-v1-20260716 CSS START */

@media (max-width: 1024px) {

  html.ui-fix-patients,
  html.ui-fix-templates,
  html.ui-fix-users,

  html.ui-fix-patients body,
  html.ui-fix-templates body,
  html.ui-fix-users body {

    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;

    overflow-x: hidden !important;

  }


  html.ui-fix-patients body *,
  html.ui-fix-templates body *,
  html.ui-fix-users body * {

    box-sizing: border-box !important;

  }


  html.ui-fix-patients body
  :is(
    main,
    .container,
    .content,
    .main-content,
    .card,
    .panel,
    .table-wrap,
    .table-wrapper,
    .table-responsive
  ),

  html.ui-fix-templates body
  :is(
    main,
    .container,
    .content,
    .main-content,
    .card,
    .panel,
    .table-wrap,
    .table-wrapper,
    .table-responsive
  ),

  html.ui-fix-users body
  :is(
    main,
    .container,
    .content,
    .main-content,
    .card,
    .panel,
    .table-wrap,
    .table-wrapper,
    .table-responsive
  ) {

    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;

    margin-left: 0 !important;
    margin-right: 0 !important;

    overflow-x: visible !important;

  }


  html.ui-fix-patients body table,
  html.ui-fix-templates body table,
  html.ui-fix-users body table {

    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;

    table-layout: fixed !important;

  }


  html.ui-fix-patients body col,
  html.ui-fix-templates body col,
  html.ui-fix-users body col {

    width: auto !important;
    min-width: 0 !important;

  }


  html.ui-fix-patients body th,
  html.ui-fix-patients body td,

  html.ui-fix-templates body th,
  html.ui-fix-templates body td,

  html.ui-fix-users body th,
  html.ui-fix-users body td {

    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;

    white-space: normal !important;

    overflow-wrap: anywhere !important;
    word-break: break-word !important;

  }


  html.ui-fix-patients body
  tr > :last-child {

    width: 112px !important;

  }


  html.ui-fix-templates body
  tr > :last-child {

    width: 108px !important;

  }


  html.ui-fix-users body
  tr > :last-child {

    width: 116px !important;

  }


  html.ui-fix-patients body
  tr > td:last-child,

  html.ui-fix-templates body
  tr > td:last-child,

  html.ui-fix-users body
  tr > td:last-child {

    vertical-align: top !important;

  }


  html.ui-fix-patients body
  tr > td:last-child form,

  html.ui-fix-templates body
  tr > td:last-child form,

  html.ui-fix-users body
  tr > td:last-child form {

    display: grid !important;

    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;

    gap: 5px !important;

  }


  html.ui-fix-patients body
  tr > td:last-child button,

  html.ui-fix-templates body
  tr > td:last-child button,

  html.ui-fix-users body
  tr > td:last-child button {

    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;

    margin-left: 0 !important;
    margin-right: 0 !important;

    white-space: normal !important;

  }

}


@media (max-width: 600px) {

  html.ui-fix-patients body table,
  html.ui-fix-templates body table,
  html.ui-fix-users body table,

  html.ui-fix-patients body tbody,
  html.ui-fix-templates body tbody,
  html.ui-fix-users body tbody {

    display: block !important;

    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;

  }


  html.ui-fix-patients body thead,
  html.ui-fix-templates body thead,
  html.ui-fix-users body thead {

    display: none !important;

  }


  html.ui-fix-patients body tr,
  html.ui-fix-templates body tr,
  html.ui-fix-users body tr {

    display: block !important;

    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;

    margin: 0 0 12px !important;
    padding: 8px !important;

    overflow: hidden !important;

  }


  html.ui-fix-patients body td,
  html.ui-fix-templates body td,
  html.ui-fix-users body td {

    display: block !important;

    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;

    padding: 6px !important;

  }


  html.ui-fix-patients body
  tr > td:last-child,

  html.ui-fix-templates body
  tr > td:last-child,

  html.ui-fix-users body
  tr > td:last-child {

    display: grid !important;

    width: 100% !important;

    grid-template-columns:
      repeat(
        auto-fit,
        minmax(88px, 1fr)
      ) !important;

    gap: 6px !important;

  }


  html.ui-fix-patients body
  tr > td:last-child form,

  html.ui-fix-templates body
  tr > td:last-child form,

  html.ui-fix-users body
  tr > td:last-child form {

    display: contents !important;

  }

}

/* ui-targeted-responsive-v1-20260716 CSS END */



