:root {
  color-scheme: light;
  font-family: "Yu Gothic UI", "Meiryo", sans-serif;
  background: #f5f6f8;
  color: #20242a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

a {
  color: #1261a6;
  text-decoration: none;
}

.topbar {
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid #d8dde6;
  display: flex;
  gap: 24px;
  min-height: 60px;
  padding: 0 24px;
}

.brand {
  color: #20242a;
  font-size: 18px;
  font-weight: 700;
}

.topbar nav {
  display: flex;
  gap: 16px;
}

.topbar form {
  align-items: center;
  display: flex;
  gap: 12px;
  margin-left: auto;
}

.page {
  margin: 0 auto;
  max-width: 1180px;
  padding: 28px 24px 56px;
}

.page-head {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 20px;
}

h1 {
  font-size: 28px;
  line-height: 1.3;
  margin: 0 0 6px;
}

h2 {
  font-size: 19px;
  margin: 0 0 12px;
}

p {
  color: #5a6472;
  margin: 0;
}

button,
.button {
  align-items: center;
  background: #ffffff;
  border: 1px solid #b8c0cc;
  border-radius: 6px;
  color: #20242a;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 600;
  min-height: 38px;
  padding: 8px 14px;
}

.primary {
  background: #1261a6;
  border-color: #1261a6;
  color: #ffffff;
}

.login-panel {
  background: #ffffff;
  border: 1px solid #d8dde6;
  border-radius: 8px;
  margin: 80px auto 0;
  max-width: 420px;
  padding: 28px;
}

.stack {
  display: grid;
  gap: 16px;
}

label {
  color: #364150;
  display: grid;
  font-weight: 700;
  gap: 6px;
}

input,
select,
textarea {
  border: 1px solid #b8c0cc;
  border-radius: 6px;
  font: inherit;
  min-height: 38px;
  padding: 8px 10px;
  width: 100%;
}

textarea {
  resize: vertical;
}

.error {
  background: #fff1f0;
  border: 1px solid #f0aaa4;
  border-radius: 6px;
  color: #9f1d15;
  margin: 12px 0;
  padding: 10px;
}

.success {
  background: #edf8ef;
  border: 1px solid #a7d7ae;
  border-radius: 6px;
  color: #1c6b2c;
  margin: 12px 0;
  padding: 10px;
}

.search {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr auto;
  margin-bottom: 18px;
}

.search-multi {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 18px;
}

.search-multi label {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  gap: 4px;
}

.type-badge {
  display: inline-block;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: bold;
  white-space: nowrap;
}

.type-badge.complaint {
  background: #fdecea;
  color: #9f1d15;
}

.type-badge.commendation {
  background: #edf8ef;
  color: #1c6b2c;
}

.type-badge.dispatch-mistake {
  background: #fff4e0;
  color: #a15c00;
}

.type-badge.kasuhara {
  background: #fde7e7;
  color: #a11111;
}

.type-badge.kasuhara-severe {
  background: #a11111;
  color: #ffffff;
}

.type-badge.kasuhara-watch {
  background: #fff4e0;
  color: #a15c00;
}

.kasuhara-alert {
  background: #fdecea;
  border: 1px solid #f0aaa4;
  border-radius: 8px;
  color: #9f1d15;
  font-weight: 700;
  margin-bottom: 18px;
  padding: 12px 16px;
}

.type-badge.no-show {
  background: #eef1f8;
  color: #33438a;
}

.no-show-alert {
  background: #eef1f8;
  border: 1px solid #b9c4e6;
  border-radius: 8px;
  color: #33438a;
  margin-bottom: 18px;
  padding: 12px 16px;
}

.no-show-alert.strong {
  background: #fff4e0;
  border-color: #e6b566;
  color: #8a4b00;
  font-weight: 700;
}

.field-hint {
  display: block;
  margin-top: 4px;
  color: #666;
  font-size: 12px;
}

.repaste-note {
  margin: 8px 0 0;
  padding: 8px 12px;
  background: #fff4e0;
  border: 1px solid #e6b566;
  border-radius: 6px;
  color: #8a4b00;
  font-size: 13px;
}
.field-hint:empty {
  display: none;
}

tr.row-alert td {
  background: #fff4e0;
}
tr.row-alert td:first-child {
  color: #a11111;
}

@media print {
  .topbar,
  .no-print,
  .modal-overlay {
    display: none !important;
  }
  .page {
    max-width: none;
    margin: 0;
    padding: 0;
  }
  table {
    font-size: 12px;
  }
}

.assess-lead {
  margin-bottom: 16px;
}

.assess-form {
  display: grid;
  gap: 18px;
}

.assess-section {
  background: #ffffff;
  border: 1px solid #d8dde6;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 18px 20px;
}

.assess-section h2 {
  margin: 0;
}

.assess-help {
  color: #5a6472;
  font-size: 13px;
  line-height: 1.6;
}

.assess-flag {
  background: #fff4e0;
  border-radius: 6px;
  color: #a15c00;
  font-weight: 700;
  padding: 8px 10px;
}

.assess-result {
  border-color: #b8c0cc;
}

.assess-result .result-line {
  color: #20242a;
  margin-top: 4px;
}

.assess-result ul {
  margin: 4px 0 0;
  padding-left: 20px;
}

.assess-result li {
  color: #364150;
  margin-bottom: 4px;
}

.notice-content {
  white-space: pre-wrap;
}

.muted-text {
  color: #666;
  font-size: 12px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-box {
  background: #ffffff;
  border-radius: 8px;
  padding: 24px;
  max-width: 480px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.modal-box h2 {
  margin-top: 0;
}

.modal-box .notice-meta {
  color: #666;
  font-size: 12px;
  margin-top: 12px;
}

.table-wrap {
  background: #ffffff;
  border: 1px solid #d8dde6;
  border-radius: 8px;
  overflow: hidden;
}

.table-wrap h2 {
  padding: 16px 16px 0;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid #e7eaf0;
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #f0f3f7;
  color: #364150;
  font-size: 13px;
}

.detail-row td {
  background: #fafbfc;
  color: #4d5663;
}

.form-grid {
  background: #ffffff;
  border: 1px solid #d8dde6;
  border-radius: 8px;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 20px;
}

.wide,
.actions {
  grid-column: 1 / -1;
}

.actions,
.head-actions {
  display: flex;
  gap: 10px;
}

.check {
  align-items: center;
  display: flex;
  gap: 8px;
}

.check input {
  width: auto;
}

.link-box,
.cautions {
  background: #ffffff;
  border: 1px solid #d8dde6;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
  padding: 16px;
}

.link-box code {
  background: #f0f3f7;
  border-radius: 6px;
  overflow-wrap: anywhere;
  padding: 8px;
}

.cautions {
  border-color: #d59a22;
}

.caution {
  background: #fff8e8;
  border: 1px solid #e3bc63;
  border-radius: 6px;
  display: grid;
  gap: 4px;
  padding: 12px;
}

.caution span {
  color: #6a5422;
  font-size: 13px;
}

@media (max-width: 760px) {
  .topbar,
  .page-head {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar form {
    margin-left: 0;
  }

  .form-grid,
  .search {
    grid-template-columns: 1fr;
  }

  .table-wrap {
    overflow-x: auto;
  }
}

.shared-warning {
  background: #fff3cd;
  border: 4px solid #d9480f;
  border-radius: 8px;
  color: #7a1f00;
  margin: 12px 0 20px;
  padding: 16px 20px;
}
.shared-warning strong {
  display: block;
  font-size: 26px;
  margin-bottom: 6px;
}
.shared-warning p {
  font-size: 20px;
  font-weight: bold;
  line-height: 1.6;
  margin: 0;
}

.error.error-big {
  background: #d9480f;
  border: 4px solid #7a1f00;
  border-radius: 8px;
  color: #fff;
  font-size: 24px;
  font-weight: bold;
  line-height: 1.6;
  padding: 18px 20px;
}
