:root {
  font-family: "Noto Sans JP", "Yu Gothic", sans-serif;
  color: #1f2937;
  background: #ffffff;
  --accent: #c81e1e;
  --accent-dark: #9f1717;
  --accent-soft: #fee2e2;
  --line: #e5e7eb;
  --muted: #6b7280;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #fafafa 0%, #f4f4f5 100%);
  color: #1f2937;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 300px 1fr;
}

.app-sidebar {
  background: linear-gradient(180deg, #b91c1c 0%, #7f1d1d 100%);
  color: #fff;
  padding: 18px 14px 20px;
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow-y: auto;
}

.app-brand {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 10px;
}

.app-home-link {
  display: block;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 14px;
  font-weight: 700;
}

.app-home-link:hover {
  text-decoration: none;
  background: rgba(255, 255, 255, 0.22);
}

.app-role-switch {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 14px;
}

.app-role-switch p {
  margin: 0 0 8px;
  font-size: 12px;
  opacity: 0.95;
}

.role-chip {
  width: auto;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  margin-right: 6px;
  margin-bottom: 6px;
}

.role-chip.active {
  background: #fff;
  color: #991b1b;
  border-color: #fff;
  font-weight: 700;
}

.app-group {
  margin-bottom: 12px;
}

.app-notify-group {
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  padding: 8px;
}

.app-notify-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px;
  margin-bottom: 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 12px;
}

.app-notify-item:last-child {
  margin-bottom: 0;
}

.app-notify-item span {
  min-width: 20px;
  text-align: center;
  background: #fff;
  color: #991b1b;
  border-radius: 999px;
  padding: 1px 6px;
  font-weight: 700;
}

.app-group h3 {
  margin: 0 0 7px;
  font-size: 12px;
  color: #fecaca;
  letter-spacing: 0.03em;
}

.app-link {
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: #fff;
  padding: 7px 9px;
  margin-bottom: 6px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
}

.app-link:hover {
  text-decoration: none;
  background: rgba(255, 255, 255, 0.16);
}

.app-link.active {
  border-color: #fff;
  background: #fff;
  color: #991b1b;
  font-weight: 700;
}

.app-main {
  min-width: 0;
  padding: 18px;
}

.app-main .container,
.app-main .corp-page,
.app-main .menu-layout {
  max-width: 1360px;
  margin: 0;
  padding: 0;
}

.app-main #flow-navbar {
  display: none;
}

.app-shell .register-shell {
  grid-template-columns: 1fr;
}

.app-shell .register-sidebar {
  display: none;
}

.app-shell .register-main {
  padding: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.page-header {
  margin-bottom: 16px;
}

.page-header h1 {
  font-size: 24px;
  margin: 0;
}

.page-header p {
  margin: 6px 0 0;
  color: var(--muted);
}

.user-logout-row {
  margin-top: 6px;
}

.user-logout-link {
  color: var(--accent);
  font-weight: 700;
  font-size: 12px;
}

.navbar {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.navbar .container {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 10px;
  padding-bottom: 10px;
}

.badge {
  margin-left: auto;
  font-size: 12px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border: 1px solid #fecaca;
  border-radius: 999px;
  padding: 3px 10px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.03);
}

.grid {
  display: grid;
  gap: 12px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 800px) {
  .grid.two,
  .grid.three {
    grid-template-columns: 1fr;
  }
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 13px;
}

input,
select,
textarea,
button {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 9px 10px;
  font: inherit;
  background: #ffffff;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #fecaca;
  border-color: var(--accent);
}

button {
  width: auto;
  min-width: 120px;
  background: #ffffff;
  cursor: pointer;
}

.button-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.button-primary,
button.button-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.button-primary:hover,
button.button-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.button-secondary,
button.button-secondary {
  background: #ffffff;
  border-color: #d1d5db;
  color: #374151;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
}

th,
td {
  border: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

th {
  background: #f9fafb;
  color: #374151;
  font-weight: 700;
}

.notice {
  display: none;
}

.menu-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.menu-list a {
  display: block;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  padding: 10px;
  color: #1f2937;
}

.menu-list a:hover {
  border-color: #fca5a5;
  text-decoration: none;
}

.menu-layout {
  max-width: 1320px;
  padding-top: 26px;
  padding-bottom: 26px;
}

.menu-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.menu-topbar h1 {
  margin: 0;
  font-size: 36px;
  letter-spacing: 0.01em;
}

.menu-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #4b5563;
  font-size: 14px;
}

.menu-user-badge {
  text-align: right;
  font-size: 13px;
  line-height: 1.4;
}

.menu-guide {
  border: 1px solid #fecaca;
  background: #fff1f2;
  color: #7f1d1d;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 17px;
  font-weight: 600;
}

.menu-section {
  margin-bottom: 14px;
}

.menu-cards {
  display: grid;
  gap: 12px;
}

.menu-cards.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.menu-cards.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.menu-cards.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.menu-card {
  display: block;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px;
  background: #fff;
  color: #1f2937;
  min-height: 144px;
}

.menu-card h3 {
  margin: 0 0 10px;
  color: #991b1b;
  font-size: 27px;
}

.menu-card p {
  margin: 0 0 4px;
  color: #4b5563;
  font-size: 15px;
}

.menu-card:hover {
  text-decoration: none;
  border-color: #fca5a5;
  box-shadow: 0 8px 16px rgba(200, 30, 30, 0.08);
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    position: static;
    height: auto;
    max-height: none;
  }

  .app-main {
    padding: 12px;
  }

  .menu-list {
    grid-template-columns: 1fr;
  }

  .menu-topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .menu-cards.four,
  .menu-cards.two,
  .menu-cards.three {
    grid-template-columns: 1fr;
  }
}

/* Corporate list page */
.corp-page {
  max-width: 1360px;
  margin: 0 auto;
  padding: 18px;
}

.corp-topbar {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.corp-title {
  font-size: 28px;
  font-weight: 700;
}

.corp-user {
  color: #374151;
  font-size: 13px;
}

.card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.03);
}

.card-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-head h2 {
  margin: 0;
  font-size: 18px;
}

.card-help {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
}

.card-help summary {
  cursor: pointer;
  list-style: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-help summary::-webkit-details-marker {
  display: none;
}

.card-help[open] summary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.card-help-panel {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
  min-width: 280px;
  max-width: 360px;
  max-height: 360px;
  overflow-y: auto;
  padding: 12px 14px;
  z-index: 40;
  font-size: 12px;
}

.card-help-panel p.card-help-lede {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 11px;
}

.card-help-panel dt {
  font-weight: 700;
  color: #1f2937;
  margin-top: 8px;
}

.card-help-panel dt:first-of-type {
  margin-top: 0;
}

.card-help-panel dd {
  margin: 2px 0 0;
  color: var(--muted);
}

.card-body {
  padding: 14px 16px;
}

.search-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px 14px;
}

.search-item.date-range {
  grid-column: span 2;
}

.date-range-wrap {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 6px;
  align-items: center;
}

.detail-toggle {
  display: inline-block;
  margin-top: 12px;
  color: var(--accent);
  font-size: 13px;
}

.search-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.result-meta {
  color: #4b5563;
  font-size: 13px;
}

.result-tools {
  display: flex;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.chip.active {
  background: #dcfce7;
  color: #166534;
}

.chip.pending {
  background: #fef3c7;
  color: #92400e;
}

.chip.review {
  background: #fee2e2;
  color: var(--accent-dark);
}

.chip.invalid {
  background: #e5e7eb;
  color: #374151;
}

.chip.wf-draft {
  background: #e5e7eb;
  color: #374151;
}

.chip.wf-await {
  background: #fed7aa;
  color: #9a3412;
}

.chip.wf-hold {
  background: #fef3c7;
  color: #92400e;
}

/* STEP-003: 承認待ち（外部システム） */
.chip.wf-external {
  background: #f3e8ff;
  color: #6d28d9;
}

.chip.wf-final {
  background: #dcfce7;
  color: #166534;
}

.remittance-record-menu {
  display: inline-block;
  margin-left: 6px;
  vertical-align: middle;
}

.remittance-record-menu summary {
  cursor: pointer;
  list-style: none;
}

.remittance-record-menu summary::-webkit-details-marker {
  display: none;
}

.remittance-record-list {
  position: absolute;
  z-index: 2;
  display: grid;
  gap: 4px;
  min-width: 170px;
  margin-top: 4px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}

.remittance-record-list a {
  padding: 4px 6px;
  white-space: nowrap;
}

.pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 14px;
}

.pager-controls {
  display: flex;
  gap: 6px;
  align-items: center;
}

.page-btn {
  min-width: 34px;
  padding: 6px 8px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  text-align: center;
  background: #ffffff;
  color: #374151;
}

.page-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

@media (max-width: 1100px) {
  .search-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .search-item.date-range {
    grid-column: span 2;
  }
}

@media (max-width: 700px) {
  .corp-page {
    padding: 10px;
  }

  .corp-topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

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

  .search-item.date-range {
    grid-column: span 1;
  }

  .search-actions {
    justify-content: flex-start;
  }

  .result-tools {
    width: 100%;
  }

  .pager {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Corporate register page */
.register-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
}

.register-sidebar {
  background: linear-gradient(180deg, #b91c1c 0%, #7f1d1d 100%);
  color: #fff;
  padding: 20px 16px;
}

.register-brand {
  font-size: 30px;
  font-weight: 800;
  margin-bottom: 18px;
  letter-spacing: 0.02em;
}

.register-sidebar .side-link {
  display: block;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 16px;
}

.side-group {
  border-top: 1px solid rgba(255, 255, 255, 0.28);
  padding-top: 12px;
  margin-top: 12px;
}

.side-group h3 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
}

.side-group a {
  display: block;
  color: #fff;
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 6px;
  font-size: 14px;
  opacity: 0.92;
}

.side-group a.active,
.side-group a:hover {
  background: rgba(255, 255, 255, 0.16);
  text-decoration: none;
}

.register-main {
  padding: 14px;
}

.register-top {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.register-top h1 {
  margin: 0;
  font-size: 29px;
}

.register-top p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.register-user {
  text-align: right;
  color: #374151;
  font-size: 13px;
}

.register-copy-banner {
  margin-bottom: 12px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
}

.register-copy-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  flex-wrap: wrap;
}

.register-copy-banner-inner div {
  flex: 1;
  min-width: 0;
}

.register-copy-banner-inner strong {
  display: block;
  font-size: 14px;
  color: #0369a1;
  margin-bottom: 4px;
}

.register-copy-banner-inner p {
  margin: 0;
  font-size: 12px;
  color: #475569;
}

.register-copy-banner-btn {
  white-space: nowrap;
  font-weight: 700;
  flex-shrink: 0;
}

.register-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
  padding: 10px;
  margin-bottom: 12px;
}

.step {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.step span {
  display: inline-flex;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  background: #e5e7eb;
  color: #374151;
  font-size: 12px;
  font-weight: 700;
}

.step strong {
  font-size: 13px;
}

.step.active {
  border-color: #fca5a5;
  background: #fff1f2;
}

.step.active span {
  background: var(--accent);
  color: #fff;
}

.step.done {
  background: #f9fafb;
}

.step.done span {
  background: #9ca3af;
  color: #fff;
}

.register-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 12px;
}

.register-main-card {
  grid-column: 1;
}

.inline-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.inline-info-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.inline-info-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.inline-info-grid strong {
  font-size: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 12px 14px;
  align-items: end;
}

.field {
  grid-column: span 1;
}

.field.wide {
  grid-column: 1 / -1;
}

.field label b {
  color: var(--accent);
  margin-left: 3px;
}

.field.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  gap: 8px;
  align-items: end;
}

.remark-block {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.remark-block h3 {
  margin: 0;
  padding: 10px 12px;
  background: #f9fafb;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.remark-block label {
  padding: 10px 12px 0;
}

.remark-block textarea {
  margin: 0 12px 8px;
  width: calc(100% - 24px);
}

.counter {
  margin: 0 12px 10px;
  text-align: right;
  color: var(--muted);
  font-size: 12px;
}

.pseudo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  padding: 9px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  color: #374151;
  background: #fff;
}

.pseudo-btn.button-primary {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
}

.pseudo-btn:hover {
  text-decoration: none;
}

.pseudo-btn.detail-action-update {
  background: #f97316;
  border-color: #f97316;
  color: #fff;
}

.pseudo-btn.detail-action-update:hover {
  background: #ea580c;
  border-color: #ea580c;
}

.pseudo-btn.detail-action-duplicate {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.pseudo-btn.detail-action-duplicate:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

.login-modern-body {
  background:
    radial-gradient(circle at 12% 10%, #fee2e2 0%, transparent 38%),
    radial-gradient(circle at 88% 90%, #dbeafe 0%, transparent 35%),
    linear-gradient(160deg, #f8fafc 0%, #eef2f7 100%);
}

.login-modern-header h1 {
  font-size: 34px;
  letter-spacing: 0.02em;
}

.login-modern-header p {
  font-size: 14px;
}

.login-modern-panel {
  max-width: 560px;
  margin: 18px auto 0;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 22px 36px rgba(15, 23, 42, 0.08);
}

.login-modern-form {
  grid-template-columns: 1fr;
  gap: 12px;
}

.side-summary {
  height: fit-content;
}

.summary-list {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 8px 10px;
  margin: 0;
}

.summary-list dt {
  color: #4b5563;
  font-size: 12px;
}

.summary-list dd {
  margin: 0;
  font-size: 13px;
  color: #111827;
}

.summary-section-title {
  margin: 0 0 8px;
  font-size: 14px;
}

.role-tabs {
  display: inline-flex;
  gap: 8px;
  margin-bottom: 12px;
}

.role-tab {
  min-width: 110px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 8px 14px;
  background: #fff;
  color: #374151;
  font-weight: 700;
}

.role-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.role-panel {
  display: none;
}

.role-panel.active {
  display: block;
}

.role-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.role-form-grid .field.wide {
  grid-column: 1 / -1;
}

.site-selector-lower {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  gap: 8px;
  align-items: end;
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px dashed #e5e7eb;
}

.flow-title {
  margin: 16px 0 8px;
  font-size: 14px;
}

.flow-list {
  margin: 0;
  padding-left: 18px;
  color: #4b5563;
}

.flow-list li {
  margin-bottom: 6px;
  font-size: 13px;
}

.flow-list li.current {
  color: var(--accent-dark);
  font-weight: 700;
}

.confirm-banner {
  border: 1px solid #fecaca;
  background: #fff1f2;
  color: #7f1d1d;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 14px;
}

.confirm-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
}

.confirm-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #f9fafb;
}

.confirm-head h2 {
  margin: 0;
  font-size: 16px;
}

.edit-link-btn {
  border: 1px solid #fca5a5;
  color: var(--accent-dark);
  background: #fff;
  border-radius: 7px;
  padding: 6px 12px;
  font-size: 13px;
}

.edit-link-btn:hover {
  text-decoration: none;
  background: #fff1f2;
}

.edit-link-btn.edit-link-error {
  border-color: #dc2626;
  background: #dc2626;
  color: #fff;
  font-weight: 700;
}

.edit-link-btn.edit-link-error:hover {
  background: #b91c1c;
}

.confirm-final-warning {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #dc2626;
  border-radius: 8px;
  background: #fff1f2;
  color: #991b1b;
  font-size: 13px;
  font-weight: 700;
}

.review-table {
  width: 100%;
}

.review-table th {
  width: 18%;
  background: #f8fafc;
}

.confirm-comment-block {
  margin-top: 8px;
}

.summary-count-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 10px;
  margin: 0;
}

.summary-count-list dt {
  margin: 0;
  color: #374151;
  font-size: 13px;
}

.summary-count-list dd {
  margin: 0;
  text-align: right;
  font-size: 13px;
  color: #111827;
}

.summary-count-list .sum {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-weight: 700;
}

.confirm-tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid #f59e0b;
  color: #92400e;
  background: #fffbeb;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 700;
}

.choice-inline {
  display: flex;
  align-items: center;
  gap: 14px;
}

.choice-inline label,
.check-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-weight: 500;
}

.check-line input,
.choice-inline input {
  width: auto;
}

.status-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.status-tab {
  width: auto;
  min-width: 120px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  color: #374151;
  font-size: 13px;
  font-weight: 600;
}

.status-tab.active {
  border-color: var(--accent);
  background: #fee2e2;
  color: #7f1d1d;
}

.approval-route-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.approval-route-list li {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.approval-route-list li strong {
  font-size: 13px;
}

.approval-route-flow {
  display: flex;
  align-items: stretch;
  gap: 7px;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  list-style: none;
}

.approval-route-step {
  display: grid;
  min-width: 122px;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f9fafb;
}

.approval-route-step span,
.approval-route-step small {
  color: var(--muted);
  font-size: 11px;
}

.approval-route-step strong {
  font-size: 13px;
}

.approval-route-step.is-complete {
  border-color: #86efac;
  background: #f0fdf4;
}

.approval-route-step.is-active {
  border-color: var(--accent);
  background: #fff1f2;
}

.approval-route-step.is-active small {
  color: #991b1b;
  font-weight: 700;
}

.approval-route-step.is-skip {
  border-color: #93c5fd;
  background: #eff6ff;
  border-style: dashed;
}

.approval-route-step.is-skip small {
  color: #1d4ed8;
  font-weight: 700;
}

.approval-route-arrow {
  align-self: center;
  color: #9ca3af;
  font-size: 20px;
  font-weight: 700;
}

.history-comment-form {
  margin-bottom: 12px;
}

.history-comment-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

@media (max-width: 700px) {
  .history-comment-row {
    grid-template-columns: 1fr;
  }
}

.approval-flow {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.approval-flow-step {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 120px;
  background: #fff;
}

.approval-flow-step strong {
  font-size: 13px;
}

.workflow-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 16px;
  align-items: start;
}

.dashboard-label {
  margin: 0 0 8px;
  color: #4b5563;
  font-size: 13px;
  font-weight: 700;
}

.workflow-steps {
  display: flex;
  align-items: stretch;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.workflow-step {
  min-width: 106px;
  padding: 9px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f9fafb;
  color: #374151;
  text-align: center;
}

.workflow-step strong,
.workflow-step span {
  display: block;
}

.workflow-step strong {
  font-size: 12px;
}

.workflow-step span {
  margin-top: 4px;
  color: #991b1b;
  font-size: 14px;
  font-weight: 700;
}

.workflow-step:hover,
.workflow-step.active {
  border-color: var(--accent);
  background: #fff1f2;
}

.workflow-arrow {
  align-self: center;
  color: #9ca3af;
  font-size: 18px;
  font-weight: 700;
}

.approver-work-summary {
  border-left: 1px solid var(--line);
  padding-left: 16px;
}

.approver-work-items {
  display: grid;
  gap: 6px;
}

.approver-work-item {
  display: flex;
  min-width: 0;
  justify-content: space-between;
  align-items: center;
  padding: 7px 8px;
  border-radius: 6px;
  font-size: 12px;
}

.approver-work-item strong {
  color: #991b1b;
}

@media (max-width: 900px) {
  .workflow-dashboard {
    grid-template-columns: 1fr;
  }

  .approver-work-summary {
    border-top: 1px solid var(--line);
    border-left: 0;
    padding-top: 12px;
    padding-left: 0;
  }
}

.request-comment {
  min-width: 180px;
  color: #374151;
  font-weight: 600;
}

.request-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.request-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 9px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  color: #374151;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.request-action-btn:hover {
  background: #f9fafb;
  text-decoration: none;
}

.request-action-btn.request-action-primary {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.request-action-btn.request-action-danger {
  border-color: #fca5a5;
  color: #b91c1c;
}

.approval-flow-arrow {
  font-size: 20px;
  color: var(--muted);
  font-weight: 700;
}

.diff-new {
  color: #b91c1c;
  font-weight: 700;
}

.copy-guidance {
  display: none;
}

.copy-guidance .label-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  margin-right: 6px;
}

.label-chip.copy-source {
  background: #fef3c7;
  color: #92400e;
}

.label-chip.required-empty {
  background: #fef3c7;
  color: #92400e;
}

.copy-source-value {
  margin: 8px 0 0;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
}

.copied-from-source {
  border-color: #d97706;
  background: #fef9c3;
}

.copy-required-empty {
  border-color: #cbd5e1;
  background: #ffffff;
}

.field-invalid {
  border-color: #dc2626 !important;
  background: #fff1f2 !important;
}

.auto-suggest-field {
  background: #f8fafc;
  color: #334155;
}

.copy-required-note {
  margin-top: 6px;
  color: #b91c1c;
  font-size: 12px;
  font-weight: 700;
}

.button-required-site,
button.button-required-site {
  background: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
}

.button-required-site:hover,
button.button-required-site:hover {
  background: #b91c1c;
  border-color: #b91c1c;
}

.change-diff-table {
  margin-top: 12px;
}

.change-diff-table .diff-row td,
.change-diff-table .diff-row th {
  background: #fff1f2;
}

.change-diff-table .ref-row td,
.change-diff-table .ref-row th {
  background: #f8fafc;
  color: #475569;
}

.change-diff-table .after-value {
  color: #b91c1c;
  font-weight: 700;
}

.role-selection-block {
  margin-bottom: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px;
  background: #f8fafc;
}

.role-selection-block .choice-inline {
  margin-top: 6px;
}

.editing-role-indicator {
  margin: 0 0 12px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff1f2;
  color: #7f1d1d;
  padding: 8px 10px;
  font-size: 13px;
}

.role-tabs.browser-tabset {
  gap: 0;
  margin-bottom: 14px;
  border-bottom: 1px solid #cbd5e1;
}

.role-tabs.browser-tabset .role-tab {
  border: 1px solid #cbd5e1;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  margin-right: 4px;
  margin-bottom: -1px;
  background: #e5e7eb;
  color: #374151;
  font-weight: 600;
}

.role-tabs.browser-tabset .role-tab.active {
  background: #ffffff;
  color: #111827;
  border-color: #cbd5e1;
  position: relative;
}

.dynamic-entry-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.dynamic-entry-item {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
}

.dynamic-entry-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid #e5e7eb;
  background: #f8fafc;
}

.dynamic-entry-head strong {
  font-size: 13px;
}

.dynamic-entry-body {
  padding: 10px;
}

.notify-add-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.notify-recipient-list {
  margin: 8px 0 0;
  padding-left: 18px;
}

.notify-recipient-list li {
  margin-bottom: 4px;
  font-size: 13px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-card {
  width: min(760px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.22);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #f9fafb;
}

.modal-head h3 {
  margin: 0;
  font-size: 17px;
}

.modal-close {
  width: auto;
  min-width: 0;
  padding: 4px 8px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  color: #374151;
  font-size: 13px;
}

.modal-body {
  padding: 14px;
}

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

.modal-grid .field.wide {
  grid-column: 1 / -1;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

@media (max-width: 1180px) {
  .register-shell {
    grid-template-columns: 1fr;
  }

  .register-sidebar {
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  }

  .register-content {
    grid-template-columns: 1fr;
  }

  .register-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inline-info-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .register-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .register-user {
    text-align: left;
  }

  .register-top h1 {
    font-size: 24px;
  }

  .register-steps {
    grid-template-columns: 1fr;
  }

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

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

  .site-selector-lower {
    grid-template-columns: 1fr;
  }

  .review-table th,
  .review-table td {
    display: block;
    width: 100%;
  }

  .field.split {
    grid-template-columns: 1fr;
  }

  .modal-grid {
    grid-template-columns: 1fr;
  }

  .modal-actions {
    justify-content: flex-start;
  }

  .approval-route-list {
    grid-template-columns: 1fr;
  }

  .notify-add-row {
    grid-template-columns: 1fr;
  }
}

/* 統合一覧比較（案1: アコーディオン / 案2: 左ツリー＋右詳細 / 案3: 統合テーブル） */
.plan-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 12px;
  font-weight: 700;
  background: var(--accent);
  color: #fff;
  margin-right: 8px;
}

.plan-lede {
  color: #4b5563;
  font-size: 13px;
  margin: 6px 0 0;
}

.plan-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.plan-nav a {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  color: #374151;
  background: #fff;
}

.plan-nav a.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 700;
}

/* 案1: アコーディオン */
.accordion-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 10px;
  overflow: hidden;
}

.accordion-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #f8fafc;
  cursor: pointer;
}

.accordion-head .accordion-caret {
  transition: transform 0.15s ease;
  color: var(--muted);
  font-size: 12px;
  width: 14px;
}

.accordion-group.open .accordion-caret {
  transform: rotate(90deg);
}

.accordion-head strong {
  font-size: 14px;
}

.accordion-head .accordion-id {
  color: var(--muted);
  font-size: 13px;
}

.accordion-head .button-row {
  margin-left: auto;
  gap: 6px;
}

.accordion-body {
  display: none;
  padding: 6px 12px 14px 34px;
  border-top: 1px solid var(--line);
}

.accordion-group.open .accordion-body {
  display: block;
}

.accordion-sub-head {
  font-size: 13px;
  font-weight: 700;
  color: #374151;
  margin: 12px 0 6px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.accordion-sub-head:first-child {
  margin-top: 4px;
}

.accordion-body table {
  margin-top: 0;
}

/* 案2: 左ツリー＋右詳細ペイン */
.tree-detail-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 14px;
  align-items: start;
}

.tree-panel-head {
  font-size: 13px;
  font-weight: 700;
  color: #374151;
  margin: 0 0 8px;
}

.tree-list {
  font-size: 13px;
}

.tree-node {
  border-radius: 6px;
  padding: 5px 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tree-node:hover {
  background: #f8fafc;
}

.tree-node.selected {
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 700;
}

.tree-node.level-1 {
  font-weight: 700;
}

.tree-node.level-2 {
  padding-left: 22px;
  color: #4b5563;
}

.tree-node.level-3 {
  padding-left: 36px;
  color: #6b7280;
}

.tree-node.level-4 {
  padding-left: 50px;
  color: #6b7280;
}

.related-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.related-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #f8fafc;
}

.related-card h4 {
  margin: 0 0 8px;
  font-size: 13px;
}

.related-card table {
  margin-top: 0;
  font-size: 12px;
}

.related-card .related-more {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
}

/* 案3: 統合テーブル */
.level-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.level-badge.lv-corp {
  background: #e0e7ff;
  color: #3730a3;
}

.level-badge.lv-site {
  background: #dcfce7;
  color: #166534;
}

.level-badge.lv-role {
  background: #fee2e2;
  color: var(--accent-dark);
}

.level-badge.lv-site-role {
  background: #fce7f3;
  color: #9d174d;
}

.level-badge.lv-sub-info {
  background: #e0f2fe;
  color: #075985;
}

/* 案3: 統合テーブル（法人拠点ロール単位の横持ちテーブル） */
.table-scroll {
  overflow-x: auto;
}

.unified-flat-table {
  min-width: 1400px;
}

.unified-flat-table th.col-corp {
  background: #fef9c3;
}

.unified-flat-table th.col-role {
  background: #dcfce7;
}

.unified-flat-table th.col-site {
  background: #dbeafe;
}

.unified-flat-table th.col-site-role {
  background: #f3e8ff;
}

.unified-flat-table th.col-sub-info {
  background: #e0f2fe;
}

.role-type-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.role-type-chip.rt-order {
  background: #dbeafe;
  color: #1d4ed8;
}

.role-type-chip.rt-payer {
  background: #dcfce7;
  color: #166534;
}

.role-type-chip.rt-billing {
  background: #ede9fe;
  color: #6d28d9;
}

.role-type-chip.rt-procurement {
  background: #ffedd5;
  color: #9a3412;
}

.role-type-chip.rt-payee {
  background: #fef9c3;
  color: #854d0e;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #fff;
  color: #374151;
  cursor: pointer;
  font-size: 14px;
}

.icon-btn:hover {
  background: #f8fafc;
}

.unified-legend {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.unified-legend-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  flex: 1;
  min-width: 320px;
}

.unified-legend-group p {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--muted);
}

.unified-legend-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.dropdown-caret {
  font-size: 10px;
  margin-left: 4px;
}

.dropdown-menu {
  position: relative;
  display: inline-block;
}

.dropdown-menu summary {
  cursor: pointer;
  list-style: none;
}

.dropdown-menu summary::-webkit-details-marker {
  display: none;
}

.dropdown-menu[open] summary {
  box-shadow: 0 0 0 2px rgba(200, 30, 30, 0.25);
}

.dropdown-list {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
  min-width: 220px;
  z-index: 30;
  padding: 6px;
}

.dropdown-list a {
  display: block;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: #374151;
}

.dropdown-list a:hover {
  background: #f8fafc;
  text-decoration: none;
}

.add-inline-link {
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 960px) {
  .tree-detail-layout {
    grid-template-columns: 1fr;
  }

  .related-info-grid {
    grid-template-columns: 1fr;
  }
}

/* ================================================================
   参照マスタ管理
   ================================================================ */

.refmaster-def-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px 20px;
  padding: 12px 0 4px;
}

.refmaster-def-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.refmaster-def-item span {
  font-size: 11px;
  color: var(--muted);
}

.refmaster-def-item strong {
  font-size: 14px;
  color: #1f2937;
}

.refmaster-source-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 700;
}

.refmaster-source-mdm {
  background: #dbeafe;
  color: #1d4ed8;
}

.refmaster-source-sap {
  background: #dcfce7;
  color: #166534;
}

.refmaster-flag-circle {
  display: inline-block;
  width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  background: #fef3c7;
  color: #92400e;
}

/* Detail drawer */
.detail-drawer {
  position: fixed;
  top: 0;
  right: -440px;
  width: 420px;
  height: 100vh;
  background: #fff;
  border-left: 1px solid var(--line);
  box-shadow: -6px 0 28px rgba(0, 0, 0, 0.13);
  z-index: 600;
  transition: right 0.24s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.detail-drawer.open {
  right: 0;
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.3);
  z-index: 599;
  display: none;
}

.drawer-overlay.open {
  display: block;
}

.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #f9fafb;
  flex-shrink: 0;
}

.drawer-head h3 {
  margin: 0;
  font-size: 15px;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.drawer-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.drawer-row:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.drawer-row dt {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.03em;
}

.drawer-row dd {
  font-size: 14px;
  color: #1f2937;
  margin: 0;
}

/* File upload dropzone */
.upload-dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  padding: 44px 20px;
  text-align: center;
  background: #f8fafc;
  cursor: pointer;
  transition:
    border-color 0.18s,
    background 0.18s;
}

.upload-dropzone:hover,
.upload-dropzone.dragging {
  border-color: #3b82f6;
  background: #eff6ff;
}

.upload-dropzone p {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.upload-dropzone-icon {
  font-size: 36px;
  color: #94a3b8;
}

.upload-selected-file {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 14px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  font-size: 13px;
}

/* Bulk update step content */
.step-pane {
  display: none;
}

.step-pane.active {
  display: block;
}

.refmaster-update-mode {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.mode-option {
  flex: 1;
  min-width: 200px;
  border: 2px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.15s;
}

.mode-option.selected {
  border-color: #c81e1e;
  background: #fff1f2;
}

.mode-option h4 {
  margin: 0 0 4px;
  font-size: 14px;
}

.mode-option p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.warning-box {
  padding: 12px 14px;
  border: 1px solid #fbbf24;
  background: #fffbeb;
  border-radius: 8px;
  font-size: 13px;
  color: #92400e;
  margin-bottom: 14px;
}

.warning-box strong {
  display: block;
  margin-bottom: 4px;
}

.error-box {
  padding: 12px 14px;
  border: 1px solid #fca5a5;
  background: #fff1f2;
  border-radius: 8px;
  font-size: 13px;
  color: #991b1b;
  margin-bottom: 14px;
}

.check-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.check-summary-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}

.check-summary-item dt {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
}

.check-summary-item dd {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  color: #1f2937;
}

.check-summary-item.has-error dd {
  color: #dc2626;
}

/* ================================================================
   フィールドレベルヘルプアイコン（ホバートゥールチップ）
   ================================================================ */

.field-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid #94a3b8;
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
  cursor: default;
  margin-left: 5px;
  position: relative;
  vertical-align: middle;
  line-height: 1;
  flex-shrink: 0;
}

.field-help::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%);
  background: #1f2937;
  color: #fff;
  border-radius: 7px;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: normal;
  white-space: pre-line;
  max-width: 300px;
  width: max-content;
  z-index: 300;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  text-align: left;
  line-height: 1.5;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.field-help::before {
  content: "";
  position: absolute;
  bottom: calc(100% + 1px);
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #1f2937;
  z-index: 301;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.field-help:hover::after,
.field-help:hover::before {
  opacity: 1;
}

/* 申請確認: 証憑添付 */
.evidence-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.evidence-simple-section {
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.evidence-simple-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.evidence-simple-title h3 {
  margin: 0;
  font-size: 14px;
}

.evidence-requirement-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.evidence-requirement-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}

.evidence-requirement-card.evidence-row-missing {
  background: #fff7ed;
  border-color: #fed7aa;
}

.evidence-requirement-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.evidence-requirement-head strong {
  font-size: 13px;
}

.evidence-required-chip {
  font-size: 11px;
}

.evidence-limit {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.evidence-requirement-files {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.evidence-file-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 10px;
  background: #f9fafb;
  border-radius: 6px;
}

.evidence-file-name {
  flex: 1 1 200px;
  font-size: 13px;
  word-break: break-all;
}

.evidence-empty-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.evidence-requirement-foot {
  margin-top: 8px;
}

.evidence-shortage-msg {
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid #fed7aa;
  border-radius: 6px;
  background: #fff7ed;
  color: #c2410c;
  font-size: 13px;
}

.evidence-type-buttons {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.evidence-type-btn {
  min-width: 0;
  padding: 3px 7px;
  border-radius: 5px;
  font-size: 11px;
}

.evidence-type-btn.active {
  border-color: var(--accent);
  background: #fff1f2;
  color: #991b1b;
  font-weight: 700;
}

.evidence-file-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-left: auto;
}

.evidence-file-actions .button-secondary {
  padding: 3px 9px;
  font-size: 11px;
  white-space: nowrap;
}

.evidence-target-label {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: #f9fafb;
  font-size: 13px;
}
