/* 共通の色・余白・操作部品。既存の画面と登録処理を維持する。 */
:root {
  --page-background: #f2f5f8;
  --surface: #fff;
  --ink: #1a1a1a;
  --muted: #454545;
  --line: #dce4eb;
  --accent: #087d80;
  --nav-background: #102938;
}

body {
  color: var(--ink);
  background: var(--page-background);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", Meiryo, "Yu Gothic", sans-serif;
  font-weight: 500;
  line-height: 1.65;
  padding-bottom: 24px;
}

a {
  color: #00656b;
}

a:hover,
a:focus {
  color: #045558;
}

:focus-visible {
  outline: 3px solid #3eaaa9;
  outline-offset: 3px;
}

body .navbar {
  min-width: 0;
  margin-bottom: 24px;
  border: 0;
  border-radius: 0;
  background: var(--nav-background);
  box-shadow: none;
}

.navbar > .container-fluid {
  padding: 8px 24px;
  background: transparent;
}

.navbar .navbar-brand {
  margin-left: 0;
  height: auto;
  padding: 12px 24px 12px 0;
  font-size: 23px;
  line-height: 26px;
  font-weight: 750;
  letter-spacing: .1em;
}

.navbar > .container-fluid > .navbar-header {
  margin-right: 0;
  margin-left: 0;
}

.navbar .nav-pills {
  gap: 4px;
  padding: 5px 0;
}

.navbar .nav-pills::before,
.navbar .nav-pills::after {
  display: none;
}

.navbar .nav-pills > li > a {
  padding: 10px 12px;
  color: #f1f5f8;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
}

.navbar .nav-pills > li > a:hover,
.navbar .nav-pills > li > a:focus {
  background: #23495d;
  color: #fff;
}

.navbar .nav-pills > li.active > a {
  background: #1779b5;
  color: #fff;
}

.navbar .nav-pills > li.active > a:hover,
.navbar .nav-pills > li.active > a:focus {
  background: #146a9e;
  color: #fff;
}

.navbar .nav-pills > li > a:focus-visible {
  outline: 2px solid #b7dcf4;
  outline-offset: 3px;
}

.navbar .navbar-right {
  margin: 8px 0 8px 12px;
}

.navbar .navbar-link {
  font-size: 12px;
  opacity: .85;
}

.panel {
  border-color: var(--line);
  border-radius: 12px;
  box-shadow: 0 3px 14px #18324405;
}

.panel > .panel-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
  color: var(--ink);
  background: var(--surface);
  background-image: none;
  border-color: var(--line);
  border-radius: 12px 12px 0 0;
  text-shadow: none;
}

.panel-heading .panel-title {
  flex: 1 1 auto;
  margin: 0;
  font-size: 18px;
  line-height: 1.5;
  font-weight: 700;
  letter-spacing: .015em;
}

.panel-heading .panel-description {
  flex: 0 0 100%;
  margin: 0;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}

.panel-warning > .panel-heading {
  border-top: 3px solid #c79336;
}

.panel .panel-footer {
  border-color: var(--line);
  background: #fafbfc;
  border-radius: 0 0 12px 12px;
}

.panel .panel-footer:empty {
  display: none;
}

.btn {
  border-radius: 6px;
  background-image: none;
  box-shadow: none;
  text-shadow: none;
  font-weight: 500;
  transition: background-color .15s, border-color .15s;
}

.btn-success,
.btn-primary,
.btn-info {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.btn-success:hover,
.btn-primary:hover,
.btn-info:hover,
.btn-success:focus,
.btn-primary:focus,
.btn-info:focus {
  color: #fff;
  background: #066366;
  border-color: #066366;
}

.btn-default {
  color: #435766;
  background: #fff;
  border-color: #cbd6df;
}

.btn-warning {
  color: #755311;
  background: #fff6dc;
  border-color: #e5d3a3;
}

.btn-danger {
  color: #a63e49;
  background: #fff3f4;
  border-color: #ebcbd0;
}

.btn-danger[disabled],
.btn-danger.disabled {
  color: #85676a;
  background: #f3edef;
  border-color: #dfd3d6;
  opacity: 1;
}

.form-control {
  min-height: 38px;
  color: var(--ink);
  border-color: #cbd6df;
  border-radius: 6px;
  box-shadow: none;
}

.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px #087d8015;
}

.form-control::placeholder {
  color: #5c6670;
  opacity: 1;
}

/* カレンダー初期化前から入力欄の幅と配置を揃える。 */
.calendar {
  width: 120px;
  text-align: center;
}

.calendar_month {
  width: 100px;
  text-align: center;
}

.panel-heading .input-group {
  width: 380px;
}

.panel-heading .input-group .form-control {
  width: 100% !important;
}

.panel-heading .input-group .btn {
  min-height: 38px;
}

.panel-heading .master-search {
  margin-bottom: 0;
}

.responsive-list.search-filtered .sorter {
  visibility: hidden;
}

.sorter,
.sort-handle {
  cursor: grab;
}

.sort-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 36px;
  padding: 6px;
  border: 1px solid #cbd6df;
  border-radius: 6px;
  color: #617986;
  background: #f6f8fa;
  transition: background-color .15s, border-color .15s;
}

.sort-handle:hover,
.sort-handle:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
  background: #e5f3f2;
}

.sort-handle-icon {
  width: 12px;
  height: 18px;
  background-image: radial-gradient(circle, currentColor 1.5px, transparent 2px);
  background-size: 6px 6px;
}

body.is-row-sorting,
body.is-row-sorting * {
  cursor: grabbing !important;
  user-select: none;
}

.sorting-table .sorting-row > td {
  background: #ddf2f1 !important;
  box-shadow: inset 0 2px var(--accent), inset 0 -2px var(--accent);
}

.sorting-row .sort-handle {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
}

.sort-row-moved > td {
  animation: sort-row-settle 1s ease-out;
}

@keyframes sort-row-settle {
  from {
    background-color: #ccebe7;
  }
  to {
    background-color: transparent;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sort-handle {
    transition: none;
  }

  .sort-row-moved > td {
    animation: none;
    background: #ddf2f1;
  }
}

#panel_tab_list {
  margin: 0;
  padding: 0 20px;
  background: #fff;
}

.nav-tabs {
  border-color: var(--line);
}

.nav-tabs > li > a {
  padding: 14px 18px;
  margin-right: 4px;
  color: var(--muted);
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
}

.nav-tabs > li.active > a,
.nav-tabs > li.active > a:focus,
.nav-tabs > li.active > a:hover {
  color: var(--accent);
  background: #fff;
  border: 0;
  border-bottom: 3px solid var(--accent);
  font-weight: 700;
}

.nav-tabs .badge {
  margin-left: 3px;
  padding: 3px 6px;
  color: #526877;
  background: #edf1f5;
  font-size: 11px;
}

.nav-tabs .active .badge {
  color: #076b6e;
  background: #e1f1ef;
}

.set_pager {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.set_pager .pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  margin: 0;
}

.set_pager .pagination > li > a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 40px;
  margin: 0;
  padding: 6px 4px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #cbd6df;
  border-radius: 6px;
  font-size: 14px;
}

.set_pager .pagination > li > a:hover,
.set_pager .pagination > li > a:focus {
  color: #045558;
  background: #edf5f5;
  border-color: var(--accent);
}

.set_pager .pagination > li.active > a {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.responsive-list > thead > tr > th.header {
  padding: 12px 8px;
  color: var(--ink);
  background: #edf2f6;
  border-color: var(--line);
  font-size: 12px;
  font-weight: 700;
}

.responsive-list > tbody > tr > td {
  padding: 12px 8px;
  border-color: #e4ebf0;
  line-height: 1.65;
  font-size: 12px;
  vertical-align: middle;
  word-break: normal;
}

.responsive-list .name {
  font-weight: 400;
  line-height: 1.55;
}

.responsive-list .kana {
  color: var(--muted);
  font-size: 11px;
}

.responsive-list .btn-group-vertical {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}

.responsive-list .btn-group-vertical > .btn {
  margin: 0;
  border-radius: 5px !important;
}

.modal .modal-content {
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 16px 64px #152f4430;
}

.modal .modal-header {
  padding: 20px 24px;
  border-color: var(--line);
}

.modal .modal-title {
  padding-right: 24px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
}

.modal .modal-body {
  padding: 20px 24px;
}

.modal .table:not(.responsive-list) {
  border: 0;
}

.modal .table:not(.responsive-list) > tbody > tr > th,
.modal .table:not(.responsive-list) > tbody > tr > td {
  padding: 12px;
  border: 0;
  border-bottom: 1px solid #edf1f4;
}

.modal th.header {
  color: #4e6272;
  background: #f6f8fa;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
}

.modal .modal-footer .btn {
  min-width: 88px;
  min-height: 42px;
}

.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
  min-height: 38px;
  border-color: #cbd6df;
  border-radius: 6px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 36px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 36px;
}

#table_list_tenant th.header {
  padding: 10px 12px;
  color: var(--muted);
  background: #f6f8fa;
  text-align: left;
}

#table_list_tenant td {
  padding: 10px 12px;
  border-color: var(--line);
}

#pagetop a {
  background: var(--nav-background);
  border-radius: 8px;
  font-size: 12px;
}

#inprogress {
  position: fixed;
  top: auto;
  right: 20px;
  bottom: 76px;
  left: auto;
  z-index: 1030;
  margin: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 3px 12px #18324415;
  pointer-events: none;
}

#inprogress img {
  width: 28px;
  height: 28px;
}

body > .panel,
.property-layout {
  max-width: calc(100% - 24px);
  margin-right: auto;
  margin-left: auto;
}

/* 1920px の画面を基準に、左右 24px の余白を確保する。 */
body > .page-content,
.property-layout {
  width: calc(100% - 48px);
  max-width: 1872px;
}

.panel,
.panel-body,
.list-group-item {
  overflow-wrap: anywhere;
}

.panel img,
.modal img {
  max-width: 100%;
  height: auto;
}

/* PCでは撮影操作を隠し、スマホなどのタッチ操作端末で表示する。 */
.mobile-camera-controls {
  display: none;
}

@media screen and (hover: none) and (pointer: coarse) {
  .mobile-camera-controls {
    display: block;
  }
}

.form-control,
.select2-container,
.select2-search--inline,
.select2-selection__choice,
input[type="file"],
.panel .btn,
.modal .btn {
  max-width: 100%;
}

.navbar-toggle {
  border-color: #fff;
}

/* Select2 4.0 の隠し select に残るインライン幅で横スクロールさせない。 */
select.select2-hidden-accessible {
  width: 1px !important;
  max-width: 1px !important;
}

.navbar-toggle .icon-bar {
  background: #fff;
}

.navbar-brand,
.navbar .navbar-link {
  color: #fff;
}

.navbar .nav-pills {
  display: flex;
  flex-wrap: wrap;
}

.table-viewport {
  width: 100%;
  overflow-x: auto;
  border-radius: 0 0 12px 12px;
}

.responsive-list {
  width: 100%;
  table-layout: auto;
  border: 0;
}

@media screen and (min-width: 1200px) {
  .scrolling-table-header {
    position: relative;
    z-index: 3;
    transform: translateY(var(--table-header-offset, 0px));
    background: var(--surface);
    box-shadow: 0 1px 0 var(--line);
  }
}

.responsive-list > tbody > tr > td {
  overflow-wrap: anywhere;
}

/* 文章欄は折り返した行の両端を揃え、最終行と手動改行の直前は左に寄せる。 */
.responsive-list > tbody > tr > .record-prose,
#set_inspect_schedule,
#set_note,
#set_comment,
.maintenance_detail,
.urgent_response_detail,
.property-records .problem,
.information_detail {
  text-align: justify;
  text-align-last: left;
  text-justify: inter-character;
  word-break: break-all;
}

/* 本文の最終行の左揃えをボタン内の文字へ引き継がせない。 */
.record-prose .btn {
  text-align-last: auto;
}

.list-display-controls {
  display: none;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: #f8fafb;
}

.list-display-controls[hidden] {
  display: none;
}

.record-field-label,
.record-expand-cell,
.schedule-cell-label,
.schedule-datetime {
  display: none;
}

.property-layout {
  display: grid;
  grid-template-columns: clamp(400px, 28%, 520px) minmax(0, 1fr);
  gap: 20px;
}

.property-layout > div,
.property-layout > div > .panel {
  min-width: 0;
  width: 100% !important;
}

.property-layout table {
  width: 100% !important;
}

/* 長いモーダルは上端からスクロールし、フッターを操作できるようにする。 */
.modal {
  overflow-y: auto;
  overscroll-behavior: contain;
}

.modal .modal-dialog {
  display: block;
  min-height: 0;
  max-width: calc(100% - 24px);
  margin: 12px auto;
  pointer-events: auto;
}

.modal .modal-content {
  pointer-events: auto;
}

.modal .modal-footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: #fff;
  border-radius: 0 0 6px 6px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.modal-footer .btn + .btn {
  margin-left: 0;
}

.modal .modal-body > table,
.modal .modal-body > form > table {
  width: 100% !important;
}

#form_regist_property .property-text-field {
  width: 500px;
  max-width: 100%;
}

#form_regist_construct_schedule .modal-dialog {
  width: 750px;
}

#form_regist_construct_schedule th.header {
  width: 120px;
}

#form_regist_construct_schedule th.header label {
  margin: 0;
  font-weight: inherit;
}

#construct_property:not(.select2-hidden-accessible),
#construct_property + .select2-container,
#construct_staff:not(.select2-hidden-accessible),
#construct_staff + .select2-container {
  width: 100% !important;
}

/* 報告フォームは項目名を上に置き、長文入力に横幅を使う。 */
#form_regist_maintenance .modal-dialog {
  width: 850px;
}

.maintenance-report-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 24px;
}

.maintenance-report-field {
  min-width: 0;
}

.maintenance-report-field > label,
.maintenance-report-field legend {
  display: block;
  margin: 0 0 8px;
  border: 0;
  color: #4e6272;
  font-size: 14px;
  font-weight: 600;
}

.maintenance-report-wide {
  grid-column: 1 / -1;
}

#form_regist_maintenance .form-control,
#form_regist_maintenance .select2-selection {
  min-height: 44px;
}

#form_regist_maintenance .select2-container {
  width: 100% !important;
  margin: 0;
}

#form_regist_maintenance .select2-selection--single .select2-selection__rendered {
  line-height: 42px;
}

#form_regist_maintenance .select2-selection__arrow {
  height: 42px;
}

#form_regist_maintenance #maintenance_detail {
  min-height: 180px;
  resize: vertical;
}

.maintenance-report-options {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.maintenance-report-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.maintenance-report-choices label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
}

.maintenance-report-choices input {
  margin: 0;
}

@media screen and (max-width: 767px) {
  .maintenance-report-fields {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
}

.modal-suspended {
  visibility: hidden;
  pointer-events: none;
}

.modal .select2-container--open {
  z-index: 1060;
}

.date-time-fields {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.schedule-date-time {
  margin-top: 8px;
}

.date-time-field,
.time-inputs {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.date-time-label {
  margin: 0;
  font-weight: inherit;
}

.modal .form-control.time-part {
  flex: 0 0 56px;
  width: 56px;
}

.modal .time-select:not(.select2-hidden-accessible),
.modal .time-select + .select2-container {
  flex: 0 0 96px;
  width: 96px !important;
}

.contact-fields,
.contact-number {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.contact-fields {
  margin-top: 6px;
}

.contact-label {
  white-space: nowrap;
}

@media screen and (max-width: 1199px) {
  .list-display-controls {
    display: block;
  }

  .responsive-list:not(.details-visible) > tbody > tr > .supplementary-field {
    display: none;
  }

  .property-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .responsive-list > thead {
    display: none;
  }

  .responsive-list > tbody {
    display: block;
    width: 100%;
    padding: 4px 0;
    background: var(--page-background);
  }

  .responsive-list > tbody > tr {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    margin: 12px 16px;
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 2px 6px #18324406;
  }

  .responsive-list > tbody > tr > td,
  .responsive-list > tbody > tr > th {
    display: block;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    padding: 12px 16px;
    grid-column: span 6;
    border: 0;
    border-bottom: 1px solid #edf1f4;
    text-align: left;
    white-space: normal;
    font-size: 14px;
  }

  .record-field-label,
  .schedule-cell-label {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
  }

  .responsive-list:not(.details-visible) > tbody > tr.record-expanded > .supplementary-field {
    display: block;
  }

  .responsive-list.details-visible .record-expand-cell {
    display: none;
  }

  .responsive-list .record-expand-cell {
    order: 3;
    grid-column: 1 / -1;
    background: #f8fafb;
    padding: 6px 12px;
    text-align: center;
    border: 0;
  }

  .record-expand-cell .btn,
  .list-display-controls .btn {
    color: #47707a;
    background: transparent;
    border-color: transparent;
    font-size: 12px;
  }

  .record-expand-cell .btn::after,
  .list-display-controls .btn::after {
    display: inline-block;
    width: 6px;
    height: 6px;
    margin: 0 0 3px 10px;
    border-right: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
    transform: rotate(45deg);
    content: "";
  }

  .record-expand-cell .btn[aria-expanded="true"]::after,
  .list-display-controls .btn[aria-expanded="true"]::after {
    margin-bottom: 0;
    transform: rotate(225deg);
  }

  .responsive-list > tbody > tr > .record-title {
    order: -2;
    grid-column: 1 / -1;
    padding: 16px;
    font-size: 17px;
    font-weight: 400;
    border-top: 3px solid #75aaa9;
  }

  .record-title > .record-field-label {
    display: none;
  }

  .responsive-list .record-title .name {
    margin: 3px 0 6px;
    font-size: 17px;
  }

  .record-title > .text-right {
    color: var(--muted);
    text-align: left;
    font-size: 12px;
    font-weight: 500;
  }

  .responsive-list > tbody > tr > .record-wide,
  .responsive-list > tbody > tr > .record-actions {
    grid-column: 1 / -1;
  }

  .responsive-list > tbody > tr > .record-inline {
    display: flex;
    grid-column: 1 / -1;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 16px;
  }

  .record-inline > .record-field-label {
    min-width: 64px;
    margin: 0;
  }

  .responsive-list > tbody > tr > .record-action {
    order: 2;
    grid-column: span 3;
    padding: 10px 6px;
    text-align: center;
    border-bottom: 0;
  }

  .responsive-list > tbody > tr > .record-actions {
    grid-column: 1 / -1;
    padding: 12px 16px;
    text-align: left;
  }

  .record-actions > .record-field-label {
    display: none;
  }

  .responsive-list > tbody > tr > .supplementary-field {
    order: 1;
  }

  .responsive-list .btn-group-vertical {
    display: inline-flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }

  .responsive-list .btn-group-vertical > .btn {
    width: auto;
    border-radius: 4px;
    margin: 0;
  }

  .schedule-calendar > thead,
  .schedule-calendar .schedule-date-row,
  .schedule-calendar > tbody > tr > th,
  .schedule-calendar .schedule-empty {
    display: none;
  }

  .schedule-calendar,
  .schedule-calendar > tbody,
  .schedule-calendar > tbody > tr {
    display: block;
    width: 100%;
  }

  .schedule-calendar > tbody > tr > td:not(.schedule-empty) {
    display: block;
    width: auto;
    margin: 8px 12px;
    padding: 10px;
    border: 1px solid var(--line) !important;
    border-left: 3px solid #75aaa9 !important;
    border-radius: 8px;
    overflow-wrap: anywhere;
  }
}

@media screen and (max-width: 767px) {
  body > .page-content,
  .property-layout {
    width: calc(100% - 24px);
  }

  body > .panel,
  .property-layout {
    max-width: calc(100% - 24px);
  }

  body .navbar {
    margin-bottom: 16px;
  }

  .navbar > .container-fluid {
    padding: 4px 20px;
  }

  .navbar-brand {
    max-width: calc(100% - 65px);
    height: auto;
    font-size: 22px;
    overflow-wrap: anywhere;
  }

  .navbar .nav-pills > li {
    width: calc(50% - 2px);
    margin: 0;
  }

  .navbar .navbar-right {
    margin: 12px 15px;
  }

  .navbar-toggle {
    margin-right: 0;
    padding: 11px;
    border-color: #ffffff50;
    border-radius: 7px;
  }

  .navbar-collapse {
    border-color: #ffffff20;
    box-shadow: none;
  }

  .panel-heading,
  .panel-footer {
    line-height: 1.6;
  }

  .panel > .panel-heading {
    padding: 16px;
    gap: 10px;
  }

  .panel-heading .panel-title {
    font-size: 16px;
  }

  #panel_tab_list {
    padding: 0 8px;
  }

  .nav-tabs > li {
    flex: 1;
  }

  .nav-tabs > li > a {
    padding: 12px 4px;
    margin: 0;
    text-align: center;
    font-size: 12px;
    white-space: nowrap;
  }

  .list-display-controls {
    padding: 4px 10px;
  }

  .pager {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 8px 12px;
  }

  .pager::before,
  .pager::after {
    display: none;
  }

  .pager > .previous {
    grid-column: 1;
    grid-row: 2;
  }

  .pager > .next {
    grid-column: 2;
    grid-row: 2;
  }

  .pager > li:not(.previous):not(.next) {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .pager > li > a {
    width: 100%;
    min-height: 38px;
    padding: 8px;
    border-color: var(--line);
    border-radius: 6px;
    font-size: 12px;
  }

  .responsive-list > tbody > tr {
    margin: 10px;
  }

  .panel-heading .input-group {
    display: flex;
    width: 100%;
    margin: 2px 0 0;
    max-width: 100%;
  }

  .panel-heading .input-group > .form-control {
    width: auto !important;
    min-width: 0;
    flex: 1;
  }

  .panel-heading .input-group-btn {
    display: flex;
    width: auto;
  }

  .nav-tabs,
  .pagination {
    display: flex;
    flex-wrap: wrap;
  }

  .nav-tabs > li,
  .pagination > li {
    float: none;
  }

  .btn,
  .nav > li > a,
  .pagination > li > a {
    min-height: 40px;
    white-space: normal;
  }

  .btn-xs,
  .btn-sm {
    padding: 8px 10px;
  }

  .modal .modal-dialog {
    max-width: calc(100% - 16px);
    margin: 8px auto;
  }

  .modal-body {
    padding: 12px;
  }

  .modal .modal-header {
    padding: 18px 16px;
  }

  .modal .modal-body {
    padding: 8px 16px 16px;
  }

  .modal-footer {
    padding: 10px;
  }

  .modal-header .close {
    min-width: 40px;
    min-height: 40px;
    margin-top: -10px;
  }

  .modal .table:not(.responsive-list),
  .modal .table:not(.responsive-list) > tbody,
  .modal .table:not(.responsive-list) > tbody > tr,
  .modal .table:not(.responsive-list) > tbody > tr > th,
  .modal .table:not(.responsive-list) > tbody > tr > td,
  #table_login,
  #table_login > tbody,
  #table_login > tbody > tr,
  #table_login > tbody > tr > th,
  #table_login > tbody > tr > td {
    display: block;
    width: 100% !important;
    min-width: 0;
    text-align: left;
    white-space: normal;
  }

  .modal th.header {
    background: #fff;
  }

  .modal .table:not(.responsive-list) > tbody > tr > th {
    padding: 16px 0 5px;
    border: 0;
  }

  .modal .table:not(.responsive-list) > tbody > tr > td {
    padding: 0 0 16px;
    border-bottom: 1px solid #edf1f4;
  }

  .modal .form-control {
    min-height: 42px;
  }

  #table_login > tbody > tr > th {
    padding: 16px 20px 6px;
    border: 0;
    color: var(--muted);
    background: #fff;
    font-size: 13px;
  }

  #table_login > tbody > tr > td {
    padding: 0 20px 12px;
    border: 0;
  }

  #table_login .form-control {
    width: 100% !important;
    min-height: 44px;
  }

  .modal .form-control,
  #table_login .form-control {
    font-size: 16px;
  }

  .modal .form-control:not(.tel):not(.zip):not(.calendar):not(.calendar_month):not(.time-part) {
    width: 100% !important;
  }

  .modal .tel,
  .modal .zip,
  .modal .calendar,
  .modal .calendar_month {
    display: inline-block;
    margin: 3px 0;
  }

  .modal .tel,
  .modal .zip {
    width: 76px !important;
    flex-shrink: 0;
  }

  .contact-label {
    width: 100%;
  }

  .modal .select2-container {
    width: 100% !important;
    margin: 4px 0;
  }

  .modal .select2-search__field {
    max-width: 100%;
  }

  .modal .select2-selection--single {
    min-height: 36px;
  }

  .modal .select2-selection__rendered {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .modal .btn-group,
  .panel-heading .btn-group {
    display: inline-flex;
    flex-wrap: wrap;
  }

  #table_list_tenant {
    table-layout: fixed;
  }

  #table_list_tenant th {
    width: 85px !important;
  }

  #table_list_tenant td {
    width: auto !important;
    overflow-wrap: anywhere;
  }

  .alert {
    max-width: calc(100% - 24px);
    margin-left: 0;
    transform: translateX(-50%);
  }
}

/* 1199px 以下の一覧は、スマートフォンと同じ名前だけの開閉表示にする。 */
@media screen and (max-width: 1199px) {
  .set_pager .pagination > .pagination-extra {
    display: none;
  }

  .responsive-list > tbody {
    padding: 0;
    background: #fff;
  }

  .responsive-list > tbody > tr {
    margin: 0;
    border: 0;
    border-bottom: 1px solid #b6c5ce;
    border-radius: 0;
    box-shadow: none;
  }

  .responsive-list > tbody > tr:last-child {
    border-bottom: 0;
  }

  .responsive-list > tbody > tr > td {
    border: 0;
  }

  .responsive-list > tbody > tr > .record-empty {
    display: none !important;
  }

  .responsive-list > tbody > tr > .record-sort,
  .responsive-list > tbody > tr > .sorter,
  .record-action > .record-field-label {
    display: none;
  }

  .responsive-list > tbody > tr > .record-action {
    grid-column: span 4;
  }

  .responsive-list > tbody > tr > .record-actions {
    display: flex;
    grid-column: 1 / -1;
    gap: 6px;
  }

  .record-action > .btn {
    width: 100%;
  }

  .record-action > .btn,
  .record-actions > .btn-group-vertical > .btn,
  .list-daily .s_buttons > .btn-group-vertical > .btn,
  .panel-heading > .btn,
  .panel-heading > .btn-group > .btn {
    min-height: 44px;
    padding: 10px 8px;
    font-size: 14px;
    line-height: 1.5;
    white-space: normal;
  }

  .list-daily .s_buttons > .btn-group-vertical > .btn {
    min-width: 64px;
  }

  .record-actions > .btn,
  .record-actions > .btn-group-vertical {
    flex: 1;
    min-width: 0;
  }

  .record-actions > .btn-group-vertical {
    display: flex;
    flex-wrap: nowrap;
  }

  .record-actions > .btn-group-vertical > .btn {
    flex: 1;
    min-width: 0;
  }

  .record-history-actions.btn-group {
    display: flex;
    width: 100%;
    gap: 8px;
    margin-top: 12px;
  }

  #set_list_maintenance .record-history-actions > .btn,
  #set_list_urgent_request .record-history-actions > .btn,
  #set_list_incomplete .record-history-actions > .btn {
    flex: 1 1 0;
    float: none;
    min-width: 0;
    min-height: 44px;
    margin: 0;
    padding: 10px 8px;
    border-radius: 6px;
    font-size: 14px;
    white-space: nowrap;
  }

  .urgent-status-actions {
    flex-direction: row;
    gap: 8px;
  }

  .urgent-status-actions > .btn {
    flex: 1 1 0;
    min-width: 0;
    min-height: 44px;
    padding: 10px 8px;
    font-size: 14px;
  }

  /* 一覧生成時にインライン指定される内容内の罫線も非表示にする。 */
  .responsive-list > tbody > tr > td div[style*="border"] {
    border-top: 0 !important;
    border-bottom: 0 !important;
  }

  .responsive-list > tbody > tr > .record-title {
    min-height: 54px;
    padding: 16px 20px;
    font-size: 16px;
    font-weight: 400;
    border-top: 0;
  }

  .responsive-list .record-title .name {
    margin: 0;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.4;
  }

  .responsive-list .record-title .name a {
    color: var(--ink);
  }

  .responsive-list .record-title .name a:hover,
  .responsive-list .record-title .name a:focus {
    color: var(--accent);
  }

  .mobile-name-list:not(.details-visible) > tbody > tr:not(.record-expanded) > .record-title {
    display: flex;
    align-items: center;
    border-bottom: 0;
  }

  .responsive-list:not(.details-visible) > tbody > tr > .record-title {
    grid-column: 1 / -1;
    grid-row: 1;
    padding-right: 60px;
  }

  .responsive-list:not(.details-visible) > tbody > tr > .record-expand-cell {
    z-index: 1;
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: end;
    align-self: center;
    padding: 0 10px 0 0;
    border: 0;
    background: transparent;
  }

  .responsive-list .record-expand-cell .btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    min-height: 44px;
    padding: 0;
  }

  .responsive-list .record-expand-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .responsive-list .record-expand-cell .btn::after {
    position: relative;
    width: 10px;
    height: 10px;
    margin: 0 0 4px;
    border-width: 1px;
    color: var(--ink);
  }

  .responsive-list .record-expand-cell .btn[aria-expanded="true"]::after {
    margin: 4px 0 0;
  }

  .schedule-calendar > tbody > tr > td:not(.schedule-empty) {
    margin: 0;
    border: 0 !important;
    border-bottom: 1px solid #b6c5ce !important;
    border-radius: 0;
  }

  .mobile-name-list:not(.details-visible) > tbody > tr:not(.record-expanded) > :not(.record-title):not(.record-expand-cell),
  .mobile-name-list:not(.details-visible) > tbody > tr:not(.record-expanded) > .record-title > :not(.name):not(.schedule-datetime) {
    display: none;
  }

  .list-monthly.mobile-name-list:not(.details-visible) > tbody > tr > .record-title,
  .list-daily.mobile-name-list:not(.details-visible) > tbody > tr > .record-title,
  .list-incomplete.mobile-name-list:not(.details-visible) > tbody > tr > .record-title,
  .list-urgent.mobile-name-list:not(.details-visible) > tbody > tr > .record-title,
  .list-maintenance.mobile-name-list:not(.details-visible) > tbody > tr > .record-title {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .list-monthly .schedule-datetime,
  .list-daily .schedule-datetime,
  .list-incomplete .schedule-datetime,
  .list-urgent .schedule-datetime,
  .list-maintenance .schedule-datetime {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    line-height: 20px;
    white-space: nowrap;
  }

  .schedule-datetime-button {
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: 12px;
    line-height: 20px;
    white-space: nowrap;
    cursor: pointer;
  }

  .list-monthly > tbody > tr > .day,
  .list-monthly > tbody > tr > .week,
  .list-monthly > tbody > tr > .time,
  .list-urgent > tbody > tr > .request_date,
  .list-daily > tbody > tr > .s_time {
    display: none;
  }
}

@media print {
  .list-display-controls,
  .record-expand-cell,
  .record-field-label {
    display: none !important;
  }

  .responsive-list > thead > tr > .supplementary-field,
  .responsive-list > tbody > tr > .supplementary-field {
    display: table-cell !important;
  }

}

/* 一覧の列幅は colgroup で管理し、余剰幅は右端の空白列に集める。 */
@media screen and (min-width: 1200px) {
  .responsive-list .btn,
  .property-layout .record-history-actions > .btn {
    min-height: 36px;
    padding: 7px 8px;
    font-size: 13px;
    line-height: 20px;
  }

  .panel-heading > .btn,
  .panel-heading > .btn-group > .btn {
    min-height: 38px;
    padding: 8px 12px;
    font-size: 14px;
    line-height: 20px;
  }

  .responsive-list .btn-group-vertical {
    gap: 6px;
  }

  .responsive-list .btn-group-vertical > .btn,
  .record-history-actions.btn-group > .btn {
    border-radius: 6px !important;
  }

  .record-history-actions.btn-group {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    max-width: 100%;
    margin-top: 8px;
  }

  .record-history-actions.btn-group > .btn {
    float: none;
    min-width: 60px;
    margin: 0;
  }

  .list-columns {
    min-width: var(--list-min-width);
    table-layout: fixed;
  }

  .column-date {
    width: 76px;
  }

  .column-weekday {
    width: 36px;
  }

  .column-time {
    width: 68px;
  }

  .column-staff {
    width: 100px;
  }

  .column-property {
    width: 320px;
  }

  .column-company {
    width: 160px;
  }

  .column-manufacturer {
    width: 120px;
  }

  .column-model {
    width: 120px;
  }

  .column-key {
    width: 90px;
  }

  .column-pallet {
    width: 76px;
  }

  .column-month {
    width: 80px;
  }

  .column-inspect {
    width: 210px;
  }

  .column-note {
    width: 200px;
  }

  .column-comment {
    width: 230px;
  }

  .column-action {
    width: 84px;
  }

  .column-status {
    width: 90px;
  }

  .column-category {
    width: 110px;
  }

  .column-phone {
    width: 148px;
  }

  .column-email {
    width: 360px;
  }

  .column-name {
    width: 320px;
  }

  .column-address {
    width: 300px;
  }

  .column-contact {
    width: 180px;
  }

  .column-problem {
    width: 450px;
  }

  .column-response {
    width: 750px;
  }

  .column-request-date {
    width: 116px;
  }

  .column-fax {
    width: 148px;
  }

  .column-toggle {
    width: 72px;
  }

  .column-edit {
    width: 64px;
  }

  .column-delete {
    width: 64px;
  }

  .column-sort {
    width: 72px;
  }

  .list-monthly {
    --list-min-width: 1764px;
  }

  .list-monthly .column-staff {
    width: 84px;
  }

  .list-monthly .column-property {
    width: 280px;
  }

  .list-monthly .column-company {
    width: 150px;
  }

  .list-monthly .column-manufacturer {
    width: 110px;
  }

  .list-monthly .column-model {
    width: 110px;
  }

  .list-monthly .column-key {
    width: 86px;
  }

  .list-monthly .column-pallet {
    width: 68px;
  }

  .list-monthly .column-inspect {
    width: 200px;
  }

  .list-monthly .column-note {
    width: 190px;
  }

  .list-monthly .column-comment {
    width: 220px;
  }

  .list-monthly .column-status {
    width: 84px;
  }

  .list-properties {
    --list-min-width: 1772px;
  }

  .list-properties .column-company {
    width: 180px;
  }

  .list-properties .column-manufacturer {
    width: 140px;
  }

  .list-properties .column-model {
    width: 140px;
  }

  .list-properties .column-key {
    width: 110px;
  }

  .list-properties .column-note {
    width: 300px;
  }

  .list-properties .column-comment {
    width: 340px;
  }

  .list-daily {
    --list-min-width: 1780px;
  }

  .list-incomplete {
    --list-min-width: 1778px;
  }

  .list-incomplete .column-comment {
    width: 240px;
  }

  .list-incomplete .column-response {
    width: 450px;
  }

  .list-maintenance {
    --list-min-width: 1772px;
  }

  .list-maintenance .column-category {
    width: 150px;
  }

  .list-maintenance .column-problem {
    width: 350px;
  }

  .list-maintenance .column-response {
    width: 850px;
  }

  .list-maintenance .column-status {
    width: 100px;
  }

  .list-urgent {
    --list-min-width: 1822px;
  }

  .list-urgent .column-response {
    width: 718px;
  }

  .list-urgent .column-status {
    width: 132px;
  }

  .list-companies {
    --list-min-width: 1670px;
  }

  .list-companies .column-comment {
    width: 300px;
  }

  .list-manufacturers {
    --list-min-width: 1194px;
  }

  .list-manufacturers .column-comment {
    width: 600px;
  }

  .list-staff {
    --list-min-width: 1282px;
  }

  .list-staff .column-last-login {
    width: 180px;
  }

  .list-columns > tbody > tr > .day,
  .list-columns > tbody > tr > .week,
  .list-columns > tbody > tr > .time,
  .list-columns > tbody > tr > .s_time {
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
  }

  .list-columns .column-spacer {
    width: auto;
  }

  .list-columns > thead > tr > .column-spacer,
  .list-columns > tbody > tr > .column-spacer {
    padding: 0;
    border-right: 0;
    border-left: 0;
    background: transparent;
  }
}

@media screen and (max-width: 1199px) {
  .list-columns > colgroup,
  .list-columns > thead > tr > .column-spacer,
  .list-columns > tbody > tr > .column-spacer {
    display: none;
  }
}

#form_regist_property .property-company-select {
  width: 380px;
}

#form_regist_property .property-company-staff {
  margin-top: 3px;
}

#form_regist_property .property-company-staff input {
  width: 250px;
  max-width: 100%;
}

#form_regist_property .property-company-staff label,
#form_regist_property th.header label {
  margin: 0;
  font-weight: inherit;
}

#form_regist_property .contract-company-invalid {
  border-color: #a94442;
}

#form_regist_property .property-manufacturer-fields {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

#form_regist_property #manufacturer,
#form_regist_property #manufacturer + .select2-container {
  width: 380px !important;
  max-width: 100%;
}

#form_regist_property #manufacturer_text {
  flex: 1 1 200px;
  width: 200px;
  min-width: 0;
  max-width: 100%;
}

#form_regist_property #manufacturer_text[aria-invalid="true"] {
  border-color: #a94442;
}

#security_company_fields > label {
  display: block;
  margin-top: 10px;
}

#security_company_fields .form-control {
  width: 100%;
  max-width: 100%;
}

.security-company-detail {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

#table_regist_property [aria-invalid="true"] {
  border-color: #a94442;
}
