:root {
  color-scheme: light;
  --ink: #17251f;
  --muted: #64736c;
  --line: #dce5df;
  --surface: #ffffff;
  --surface-soft: #f5f8f6;
  --brand: #176b4d;
  --brand-dark: #0f5039;
  --accent: #e7f4ed;
  --new: #b94d16;
  --shadow: 0 14px 34px rgba(20, 55, 42, 0.09);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #edf3ef;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", sans-serif;
  line-height: 1.5;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-shell {
  width: min(100%, 440px);
}

.auth-card {
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-card h1 {
  font-size: 2rem;
}

.auth-lead,
.auth-provider-note {
  color: var(--muted);
}

.auth-error {
  padding: 12px 14px;
  border: 1px solid #efb6b0;
  border-radius: 10px;
  background: #fff1ef;
  color: #9e2d24;
  font-weight: 700;
}

.auth-google,
.auth-form button {
  display: flex;
  width: 100%;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-weight: 750;
  text-decoration: none;
}

.auth-google {
  border: 1px solid #c5cec9;
  background: #fff;
  color: #27312d;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
  height: 1px;
  flex: 1;
  background: var(--line);
  content: "";
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-form label {
  display: grid;
  gap: 6px;
  font-weight: 700;
}

.auth-form input {
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid #b8c9bf;
  border-radius: 9px;
  font: inherit;
}

.auth-form button,
.header-logout button {
  border: 0;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
}

.header-logout,
.ec-logout-form {
  margin: 0;
}

.header-logout button,
.ec-logout-form button {
  min-height: 38px;
  padding: 7px 12px;
  border-radius: 9px;
  font: inherit;
  font-weight: 700;
}

.ec-auth-user {
  max-width: 220px;
  overflow: hidden;
  color: #dceee5;
  font-size: 0.85rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

a {
  color: var(--brand);
}

.page-shell {
  width: min(1760px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0 64px;
}

.page-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--brand);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  line-height: 1.15;
}

.lead,
.results-heading p {
  margin-bottom: 0;
  color: var(--muted);
}

.result-summary {
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-width: 130px;
  padding: 14px 18px;
  border: 1px solid #cae0d4;
  border-radius: 16px;
  background: var(--accent);
}

.result-summary strong {
  color: var(--brand-dark);
  font-size: 1.8rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.primary-link,
.secondary-link,
.edit-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
}

.primary-link {
  min-height: 46px;
  padding: 10px 17px;
  background: var(--brand);
  color: #fff;
}

.primary-link:hover {
  background: var(--brand-dark);
}

.secondary-link,
.edit-link {
  border: 1px solid #bfd2c7;
  background: #fff;
  color: var(--brand-dark);
}

.secondary-link {
  min-height: 44px;
  padding: 9px 15px;
}

.edit-link {
  min-height: 34px;
  padding: 6px 12px;
}

.filter-panel,
.results {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.filter-panel {
  margin-bottom: 24px;
  padding: 22px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: 1.15rem;
}

.filter-state,
.new-badge {
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.filter-state {
  padding: 5px 10px;
  background: var(--accent);
  color: var(--brand-dark);
}

.filter-form {
  display: grid;
  grid-template-columns: minmax(260px, 1.6fr) repeat(4, minmax(150px, 1fr));
  gap: 14px;
  align-items: end;
}

.field {
  display: grid;
  gap: 6px;
  color: #405048;
  font-size: 0.78rem;
  font-weight: 700;
}

input,
select,
button {
  min-height: 44px;
  border-radius: 10px;
  font: inherit;
}

input,
select {
  width: 100%;
  border: 1px solid #cbd8d0;
  background: #fff;
  color: var(--ink);
  padding: 9px 11px;
}

input:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(23, 107, 77, 0.22);
  outline-offset: 2px;
}

.check-field {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  color: #405048;
  font-size: 0.88rem;
  font-weight: 700;
}

.check-field input {
  width: 18px;
  min-height: auto;
  height: 18px;
  accent-color: var(--brand);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

button {
  border: 0;
  background: var(--brand);
  color: #fff;
  padding: 10px 18px;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  background: var(--brand-dark);
}

.form-actions a {
  font-size: 0.85rem;
}

.results {
  overflow: hidden;
}

.results-heading {
  margin: 0;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

.results-heading p {
  font-size: 0.82rem;
}

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

table {
  width: 100%;
  min-width: 2100px;
  border-collapse: collapse;
  font-size: 0.84rem;
}

th,
td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-soft);
  color: #4b5c53;
  font-size: 0.74rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

tbody tr:hover {
  background: #fafcfb;
}

tbody th {
  min-width: 230px;
  font-size: 0.9rem;
}

.date-range {
  display: block;
  color: var(--muted);
}

.status-pill {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface-soft);
  white-space: nowrap;
}

.new-badge {
  display: inline-flex;
  padding: 4px 8px;
  background: #fff0e8;
  color: var(--new);
}

.external-link {
  white-space: nowrap;
  font-weight: 700;
  text-underline-offset: 3px;
}

.empty-row td {
  padding: 70px 20px;
  text-align: center;
}

.empty-row strong,
.empty-row span {
  display: block;
}

.form-page {
  width: min(1080px, calc(100% - 32px));
}

.form-page-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.error-summary {
  display: grid;
  gap: 3px;
  margin-bottom: 18px;
  padding: 14px 17px;
  border: 1px solid #e5a78e;
  border-radius: 12px;
  background: #fff4ef;
  color: #8a3515;
}

.error-summary span {
  font-size: 0.85rem;
}

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

.form-section {
  margin: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.form-section legend {
  padding: 0 8px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 800;
}

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

.form-field {
  display: grid;
  align-content: start;
  gap: 7px;
  color: #405048;
  font-size: 0.82rem;
  font-weight: 700;
}

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

.form-field em {
  margin-left: 7px;
  color: var(--new);
  font-size: 0.7rem;
  font-style: normal;
}

textarea {
  width: 100%;
  border: 1px solid #cbd8d0;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  padding: 10px 11px;
  font: inherit;
  resize: vertical;
}

textarea:focus {
  outline: 3px solid rgba(23, 107, 77, 0.22);
  outline-offset: 2px;
}

[aria-invalid="true"] {
  border-color: #c65a32;
  background: #fff9f6;
}

.field-error {
  color: #a43f1a;
  font-size: 0.76rem;
  font-weight: 700;
}

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

.toggle-field {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}

.toggle-field input {
  width: 19px;
  height: 19px;
  min-height: auto;
  margin-top: 2px;
  accent-color: var(--brand);
}

.toggle-field span,
.toggle-field small {
  display: block;
}

.toggle-field small {
  margin-top: 2px;
  color: var(--muted);
}

.submit-bar {
  position: sticky;
  bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.empty-row span {
  margin-top: 6px;
  color: var(--muted);
}

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

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

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 20px, 680px);
    padding: 24px 0 40px;
  }

  .page-header {
    align-items: stretch;
    flex-direction: column;
  }

  .header-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .primary-link {
    width: 100%;
  }

  .result-summary {
    width: fit-content;
  }

  .filter-panel {
    padding: 18px;
  }

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

  .field-search {
    grid-column: auto;
  }

  .form-actions {
    flex-wrap: wrap;
  }

  .form-actions button {
    width: 100%;
  }

  .results-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    padding: 18px;
  }

  .table-wrap {
    overflow: visible;
  }

  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
  }

  table {
    min-width: 0;
  }

  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  tbody tr {
    padding: 16px 18px;
    border-bottom: 8px solid var(--surface-soft);
  }

  tbody tr:last-child {
    border-bottom: 0;
  }

  tbody th,
  tbody td {
    display: grid;
    grid-template-columns: minmax(105px, 38%) 1fr;
    gap: 12px;
    min-width: 0;
    padding: 8px 0;
    border: 0;
    overflow-wrap: anywhere;
  }

  tbody th::before,
  tbody td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
  }

  .empty-row td {
    display: block;
    padding: 52px 10px;
  }

  .empty-row td::before {
    content: none;
  }

  .form-page {
    width: min(100% - 20px, 680px);
  }

  .form-page-header {
    align-items: stretch;
    flex-direction: column;
  }

  .secondary-link {
    width: 100%;
  }

  .form-section {
    padding: 18px;
  }

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

  .form-field-wide {
    grid-column: auto;
  }

  .submit-bar {
    bottom: 8px;
  }

  .submit-bar button {
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}

.candidate-dashboard {
  --ec-bg: #f4f6f8;
  --ec-panel: #ffffff;
  --ec-text: #17202a;
  --ec-muted: #667085;
  --ec-line: #e5e7eb;
  --ec-brand: #0f766e;
  --ec-brand-dark: #115e59;
  --ec-brand-soft: #dff5f1;
  --ec-danger: #b42318;
  --ec-shadow: 0 6px 24px rgba(15, 23, 42, 0.08);
  margin: 0;
  background: var(--ec-bg);
  color: var(--ec-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", sans-serif;
}

.candidate-dashboard button,
.candidate-dashboard input,
.candidate-dashboard select,
.candidate-dashboard textarea {
  font: inherit;
}

.ec-app {
  min-height: 100vh;
}

.ec-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #0b1220;
  color: #fff;
}

.ec-brand,
.ec-top-actions {
  display: flex;
  align-items: center;
}

.ec-brand {
  gap: 12px;
  font-weight: 750;
}

.ec-mobile-nav-toggle,
.ec-mobile-nav,
.ec-mobile-nav-overlay {
  display: none;
}

.ec-logo {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(145deg, #2dd4bf, #0f766e);
  font-weight: 900;
}

.ec-top-actions {
  gap: 10px;
}

.ec-top-actions button,
.ec-updated {
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 0.78rem;
}

.ec-top-actions button {
  cursor: pointer;
}

.ec-notification-banner {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 30px;
  align-items: center;
  justify-self: center;
  width: min(100%, 560px);
  max-width: 560px;
  min-height: 44px;
  padding: 4px 7px;
  border: 1px solid #a9d8cf;
  border-radius: 999px;
  background: #ccefeb;
  color: #154f4d;
}

.ec-notification-arrow {
  display: grid;
  width: 30px;
  min-width: 30px;
  min-height: 34px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #165e59;
  background: transparent;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
}

.ec-notification-arrow:hover,
.ec-notification-arrow:focus-visible {
  background: rgb(255 255 255 / 55%);
  outline: none;
}

.ec-notification-arrow:disabled {
  cursor: default;
  opacity: .4;
}

.ec-notification-content {
  min-width: 0;
  text-align: center;
}

.ec-notification-date {
  display: inline;
  margin: 0 6px 0 0;
  color: #285f5b;
  font-size: .75rem;
  font-weight: 700;
  white-space: nowrap;
}

.ec-notification-links {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2px 5px;
  max-width: 100%;
  line-height: 1.3;
  vertical-align: middle;
}

.ec-notification-links button,
.ec-notification-candidate {
  min-height: 28px;
  padding: 2px 4px;
  border: 0;
  border-radius: 5px;
  color: #125d57;
  background: transparent;
  font: inherit;
  font-size: .78rem;
  font-weight: 800;
  text-align: left;
  text-decoration: underline;
  cursor: pointer;
}

.ec-notification-links button:hover,
.ec-notification-links button:focus-visible,
.ec-notification-candidate:hover,
.ec-notification-candidate:focus-visible {
  background: #dcfce7;
}

.ec-notification-links .ec-notification-priority {
  color: #b42318;
}

.ec-notification-detail {
  max-height: 280px;
  grid-column: 1 / -1;
  margin: 3px 2px 0;
  padding: 10px 12px;
  overflow: auto;
  border-top: 1px solid #a9d8cf;
  border-radius: 10px;
  background: #fff;
}

.ec-notification-detail h3,
.ec-notification-detail h4 {
  margin: 0 0 6px;
}

.ec-notification-detail ul {
  margin: 0 0 10px;
  padding-left: 20px;
}

.ec-notification-update {
  margin: 0 0 10px;
}

.ec-notification-update dl {
  display: grid;
  gap: 5px;
  margin: 0;
}

.ec-notification-update dl > div {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 6px;
}

.ec-notification-update dt {
  color: #52645a;
  font-weight: 700;
}

.ec-notification-update dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.ec-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
}

.ec-sidebar {
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  padding: 18px 14px;
  overflow: auto;
  background: #101828;
  color: #cbd5e1;
}

.ec-nav-title {
  margin: 18px 10px 8px;
  color: #8090a7;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ec-nav-item {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 40px;
  margin: 0 0 4px;
  padding: 10px 12px;
  gap: 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #dbe4ef;
  font-size: 0.85rem;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.ec-nav-item:hover,
.ec-nav-item.is-active {
  background: #1d2939;
  color: #fff;
}

.ec-nav-item.is-disabled {
  opacity: 0.55;
  cursor: default;
}

.ec-nav-badge {
  margin-left: auto;
  padding: 2px 7px;
  border-radius: 999px;
  background: #344054;
  color: #fff;
  font-size: 0.68rem;
}

.ec-main {
  min-width: 0;
  padding: 24px;
}

.ec-page-head {
  display: grid;
  grid-template-columns: minmax(220px, auto) minmax(280px, 1fr) auto;
  align-items: flex-start;
  margin-bottom: 18px;
  gap: 16px;
}

.ec-page-title h1 {
  margin: 0 0 5px;
  font-size: 1.65rem;
}

.ec-page-title p,
.ec-panel-head p,
.ec-detail-head p,
.ec-modal-head p {
  margin: 0;
  color: var(--ec-muted);
  font-size: 0.82rem;
}

.ec-primary {
  padding: 10px 16px;
  border: 0;
  border-radius: 10px;
  background: var(--ec-brand);
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.24);
  color: #fff;
  font-weight: 750;
  cursor: pointer;
}

.ec-primary:disabled {
  box-shadow: none;
  opacity: 0.55;
  cursor: not-allowed;
}

.ec-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 16px;
  gap: 12px;
}

.ec-stat {
  appearance: none;
  padding: 16px;
  border: 1px solid var(--ec-line);
  border-radius: 14px;
  background: var(--ec-panel);
  box-shadow: var(--ec-shadow);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.ec-stat:hover {
  border-color: #99d5cd;
  transform: translateY(-1px);
}

.ec-stat:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.2);
  outline-offset: 2px;
}

.ec-stat.is-active {
  border-color: var(--ec-brand);
  background: var(--ec-brand-soft);
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.12), var(--ec-shadow);
}

.ec-stat p {
  margin: 0 0 9px;
  color: var(--ec-muted);
  font-size: 0.75rem;
}

.ec-stat strong {
  display: block;
  font-size: 1.75rem;
  line-height: 1;
}

.ec-stat strong.is-warning {
  color: var(--ec-danger);
}

.ec-stat small {
  display: block;
  margin-top: 8px;
  color: var(--ec-muted);
  font-size: 0.68rem;
}

.ec-toolbar {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--ec-line);
  border-radius: 14px;
  background: var(--ec-panel);
  box-shadow: var(--ec-shadow);
}

.ec-filter-layout {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) repeat(5, minmax(125px, 1fr));
  gap: 10px;
}

.ec-filter-search-block,
.ec-advanced-filters {
  min-width: 0;
}

.ec-advanced-filters {
  display: contents;
}

.ec-mobile-filter-toggle {
  display: none;
}

.ec-toolbar-grid {
  display: grid;
  gap: 10px;
}

.ec-toolbar-grid-primary {
  display: contents;
}

.ec-toolbar-grid-secondary {
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  max-width: 680px;
}

.ec-field {
  display: block;
  min-width: 0;
}

.ec-field span {
  display: block;
  margin: 0 0 5px;
  color: var(--ec-muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.ec-field input,
.ec-field select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #d0d5dd;
  border-radius: 9px;
  background: #fff;
  color: #344054;
}

.ec-field select {
  padding-right: 40px;
}

.ec-field input[type="date"] {
  min-height: 42px;
  color: #344054;
  color-scheme: light;
  opacity: 1;
  -webkit-appearance: auto;
  -webkit-text-fill-color: #344054;
}

.ec-date-field {
  position: relative;
}

.ec-field input:focus,
.ec-field select:focus {
  border-color: var(--ec-brand);
  outline: 3px solid rgba(15, 118, 110, 0.12);
}

.ec-filter-chips,
.ec-prefectures,
.ec-detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ec-filter-chips {
  grid-column: 1 / -1;
  margin-top: 12px;
}

.ec-filter-error {
  grid-column: 1 / -1;
  margin: 10px 0 0;
  padding: 9px 11px;
  border-radius: 8px;
  background: #fef3f2;
  color: #b42318;
  font-size: 0.76rem;
  font-weight: 700;
}

.ec-chip,
.ec-clear,
.ec-pref,
.ec-tab,
.ec-detail-button {
  cursor: pointer;
}

.ec-chip,
.ec-clear {
  padding: 7px 11px;
  border: 1px solid #d0d5dd;
  border-radius: 999px;
  background: #fff;
  color: #475467;
  font-size: 0.75rem;
}

.ec-chip.is-active {
  border-color: #5eead4;
  background: var(--ec-brand-soft);
  color: var(--ec-brand-dark);
  font-weight: 750;
}

.ec-chip-warning {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

.ec-chip-warning.is-active {
  border-color: #fb923c;
  background: #ffedd5;
  color: #9a3412;
}

.ec-clear {
  border-color: transparent;
  color: var(--ec-brand-dark);
}

.ec-filter-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.ec-prefecture-sort-row {
  display: flex;
  align-items: flex-start;
  margin: 0 0 14px;
  gap: 12px;
}

.ec-prefectures {
  flex: 1 1 auto;
  align-items: center;
  margin: 0;
}

.ec-sort-compact {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  color: var(--ec-muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.ec-sort-compact select {
  width: 180px;
  height: 34px;
  padding: 0 40px 0 10px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #fff;
  color: #344054;
  font-size: 0.72rem;
}

.ec-field select,
.ec-sort-compact select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23344054' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 10px 6px;
}

.ec-prefectures > span {
  flex: 0 0 auto;
  color: var(--ec-muted);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.ec-pref {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  gap: 5px;
  border: 0;
  border-radius: 999px;
  background: #f3f4f6;
  color: #4b5563;
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
}

.ec-pref::before {
  content: "●";
  font-size: 0.58rem;
}

.ec-pref-gunma { background: #fee2e2; color: #991b1b; }
.ec-pref-saitama { background: #dbeafe; color: #1d4ed8; }
.ec-pref-tochigi { background: #dcfce7; color: #166534; }
.ec-pref-ibaraki { background: #fef3c7; color: #92400e; }
.ec-pref-tokyo { background: #ede9fe; color: #6d28d9; }
.ec-pref-kanagawa { background: #cffafe; color: #155e75; }
.ec-pref-nagano { background: #e0f2fe; color: #075985; }
.ec-pref-niigata { background: #fce7f3; color: #9d174d; }
.ec-pref-chiba { background: #ffedd5; color: #9a3412; }

.ec-tabs {
  display: flex;
  margin: 4px 0 14px;
  gap: 4px;
  overflow: auto;
  border-bottom: 1px solid var(--ec-line);
}

.ec-tab {
  padding: 12px 14px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--ec-muted);
  white-space: nowrap;
}

.ec-tab.is-active {
  border-color: var(--ec-brand);
  color: var(--ec-brand);
  font-weight: 800;
}

.ec-panel {
  overflow: hidden;
  border: 1px solid var(--ec-line);
  border-radius: 14px;
  background: var(--ec-panel);
  box-shadow: var(--ec-shadow);
}

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

.ec-panel-head h2 {
  margin: 0 0 3px;
  font-size: 1rem;
}

.ec-panel-head .ec-visible-count {
  margin: 0;
  color: var(--ec-text);
  font-size: 0.82rem;
}

.ec-panel-head .ec-condition-summary {
  margin: 3px 0 0;
  color: var(--ec-muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.ec-import-counts {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
}

.ec-import-counts small {
  width: 100%;
  color: var(--ec-muted);
  text-align: right;
}

.ec-badge,
.ec-priority {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
}

.ec-badge-a { background: #d1fae5; color: #065f46; }
.ec-badge-ab { background: #dbeafe; color: #1d4ed8; }
.ec-badge-b { background: #ede9fe; color: #6d28d9; }
.ec-badge-c { background: #f3f4f6; color: #4b5563; }
.ec-badge-hold { background: #fef3c7; color: #92400e; }
.ec-badge-new { background: #ecfeff; color: #0e7490; }
.ec-badge-updated { background: #ede9fe; color: #6d28d9; }
.ec-priority-0 { background: #fee2e2; color: #991b1b; }
.ec-priority-1 { background: #ffedd5; color: #9a3412; }
.ec-priority-2 { background: #fef3c7; color: #92400e; }
.ec-priority-3,
.ec-priority-9 { background: #f3f4f6; color: #4b5563; }

.ec-table-wrap {
  max-width: 100%;
  max-height: min(72vh, 760px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-gutter: stable both-edges;
}

.candidate-dashboard .ec-table {
  display: table;
  width: max-content;
  min-width: 1900px;
  border-collapse: collapse;
}

.candidate-dashboard .ec-table thead {
  display: table-header-group;
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  clip-path: none;
  white-space: normal;
}

.candidate-dashboard .ec-table tbody {
  display: table-row-group;
}

.candidate-dashboard .ec-table tr {
  display: table-row;
  padding: 0;
  border: 0;
}

.candidate-dashboard .ec-table th,
.candidate-dashboard .ec-table td {
  display: table-cell;
  min-width: 0;
  max-width: none;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid #eef0f2;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.candidate-dashboard .ec-table th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: #f9fafb;
  color: var(--ec-muted);
  font-size: 0.68rem;
  text-align: left;
  white-space: nowrap;
}

.candidate-dashboard .ec-table td {
  font-size: 0.78rem;
}

.candidate-dashboard .ec-table td.ec-cell-nowrap {
  min-width: 104px;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}

.candidate-dashboard .ec-table td.ec-cell-date {
  width: 138px;
  min-width: 138px;
}

.candidate-dashboard .ec-table td.ec-cell-datetime {
  min-width: 142px;
}

.candidate-dashboard .ec-table th.ec-col-deadline,
.candidate-dashboard .ec-table td.ec-cell-deadline {
  width: 220px;
  min-width: 160px;
  max-width: 220px;
}

.candidate-dashboard .ec-table th.ec-col-fee,
.candidate-dashboard .ec-table td.ec-cell-fee {
  width: 180px;
  min-width: 130px;
  max-width: 180px;
}

.candidate-dashboard .ec-table th.ec-col-visitors,
.candidate-dashboard .ec-table td.ec-cell-visitors {
  width: 280px;
  min-width: 200px;
  max-width: 280px;
}

.candidate-dashboard .ec-table th.ec-col-phone,
.candidate-dashboard .ec-table td.ec-cell-phone {
  width: 170px;
  min-width: 150px;
  max-width: 170px;
}

.candidate-dashboard .ec-table td.ec-cell-detail {
  width: 70px;
  min-width: 70px;
}

.candidate-dashboard .ec-table td.ec-cell-priority {
  width: 80px;
  min-width: 80px;
}

.candidate-dashboard .ec-table td.ec-cell-title {
  width: 280px;
  min-width: 280px;
}

.candidate-dashboard .ec-table td.ec-cell-location {
  width: 240px;
  min-width: 240px;
}

.candidate-dashboard .ec-table td.ec-cell-urls {
  width: 130px;
  min-width: 130px;
}

.candidate-dashboard .ec-table td.ec-cell-caution {
  width: 360px;
  min-width: 360px;
}

.candidate-dashboard .ec-table td.ec-cell-nowrap :where(a, span, small, time) {
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}

.candidate-dashboard .ec-date-range,
.candidate-dashboard .ec-deadline-content,
.candidate-dashboard .ec-fee-content,
.candidate-dashboard .ec-visitors-content {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.35;
  white-space: normal;
}

.candidate-dashboard .ec-date-range > span,
.candidate-dashboard .ec-deadline-date,
.candidate-dashboard .ec-fee-content > span:first-child,
.candidate-dashboard .ec-visitors-content > span:first-child {
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}

.candidate-dashboard .ec-deadline-content,
.candidate-dashboard .ec-fee-content,
.candidate-dashboard .ec-visitors-content {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.candidate-dashboard .ec-deadline-content .ec-deadline-label,
.candidate-dashboard .ec-fee-content > span:not(:first-child),
.candidate-dashboard .ec-visitors-content > span:not(:first-child) {
  white-space: normal;
  overflow-wrap: anywhere;
}

.candidate-dashboard .ec-table td.ec-cell-deadline .ec-deadline-label {
  width: fit-content;
  max-width: 100%;
  white-space: normal;
}

.candidate-dashboard .ec-table td.ec-cell-fee,
.candidate-dashboard .ec-table td.ec-cell-visitors,
.candidate-dashboard .ec-table td.ec-cell-phone {
  white-space: normal;
  overflow-wrap: anywhere;
}

.candidate-dashboard .ec-table td.ec-cell-phone .ec-phone {
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}

.candidate-dashboard .ec-table td.ec-cell-phone .ec-phone-content {
  display: flex;
  max-width: 100%;
  flex-direction: column;
  gap: 1px;
  line-height: 1.3;
  white-space: normal;
}

.candidate-dashboard .ec-table td.ec-cell-phone :where(.ec-phone-main, .ec-phone-extra) {
  max-width: 100%;
  overflow-wrap: normal;
  white-space: nowrap;
}

.candidate-dashboard .ec-table td.ec-cell-urls .ec-source-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  flex-direction: column;
  align-items: flex-start;
  gap: 2px 6px;
  line-height: 1.2;
  max-width: 100%;
}

.candidate-dashboard .ec-table td.ec-cell-urls a {
  max-width: 100%;
  white-space: nowrap;
  overflow-wrap: normal;
}

.candidate-dashboard .ec-table td::before {
  content: none;
}

.candidate-dashboard .ec-table tr:hover td {
  background: #fcfcfd;
}

.candidate-row--closed > th,
.candidate-row--closed > td,
.candidate-dashboard .ec-table tr.candidate-row--closed:hover > td {
  background: rgba(17, 24, 39, 0.2) !important;
  color: #991b1b !important;
}

.candidate-row--deadline-today > th,
.candidate-row--deadline-today > td,
.candidate-dashboard .ec-table tr.candidate-row--deadline-today:hover > td {
  background: #dbeafe !important;
  color: #1e3a8a !important;
}

.candidate-row--deadline-soon > th,
.candidate-row--deadline-soon > td,
.candidate-dashboard .ec-table tr.candidate-row--deadline-soon:hover > td {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
}

.candidate-row--closed > th :where(a, span, small, time, div),
.candidate-row--closed > td :where(a, span, small, time, div) {
  color: #991b1b !important;
}

.candidate-row--deadline-today > th :where(a, span, small, time, div),
.candidate-row--deadline-today > td :where(a, span, small, time, div) {
  color: #1e3a8a !important;
}

.candidate-row--deadline-soon > th :where(a, span, small, time, div),
.candidate-row--deadline-soon > td :where(a, span, small, time, div) {
  color: #1d4ed8 !important;
}

.candidate-row--closed .ec-badge,
.candidate-row--closed .ec-priority,
.candidate-row--closed .status-pill {
  border: 1px solid #b91c1c;
  background: #fee2e2 !important;
  color: #991b1b !important;
}

.candidate-row--deadline-today .ec-badge,
.candidate-row--deadline-today .ec-priority,
.candidate-row--deadline-soon .ec-badge,
.candidate-row--deadline-soon .ec-priority {
  border: 1px solid #3b82f6;
  background: #dbeafe !important;
  color: #1e3a8a !important;
}

.candidate-row--closed .ec-detail-button {
  border-color: #b91c1c;
  background: #fff;
  color: #991b1b;
}

.candidate-row--deadline-today .ec-detail-button,
.candidate-row--deadline-soon .ec-detail-button {
  border-color: #2563eb;
  background: #fff;
  color: #1e3a8a;
}

.ec-mobile-candidate.candidate-row--closed {
  background: rgba(17, 24, 39, 0.2);
}

.ec-mobile-candidate.candidate-row--deadline-today {
  background: #dbeafe;
}

.ec-mobile-candidate.candidate-row--deadline-soon {
  background: #eff6ff;
}

.ec-state-badge,
.candidate-state-badge {
  display: inline-flex;
  margin-left: 5px;
  padding: 3px 7px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 850;
  vertical-align: middle;
  white-space: nowrap;
}

.ec-state-badge--closed,
.candidate-state-badge--closed {
  background: #fee2e2;
  color: #991b1b;
}

.ec-state-badge--deadline-today,
.candidate-state-badge--deadline-today {
  background: #bfdbfe;
  color: #1e3a8a;
}

.ec-state-badge--deadline-soon,
.candidate-state-badge--deadline-soon {
  background: #dbeafe;
  color: #1d4ed8;
}

.ec-case-title {
  min-width: 190px;
  margin-bottom: 4px;
  font-weight: 800;
}

.ec-table small,
.ec-muted {
  display: block;
  color: var(--ec-muted);
  font-size: 0.68rem;
}

.ec-location {
  min-width: 155px;
  margin-top: 6px;
}

.ec-deadline-soon {
  color: #1d4ed8;
  font-weight: 800;
}

.ec-deadline-overdue {
  color: #dc2626;
  font-weight: 800;
}

.ec-deadline-label {
  display: block;
  width: fit-content;
  margin-top: 5px;
  padding: 3px 6px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1.2;
}

.ec-deadline-label.is-soon {
  background: #dbeafe;
  color: #1d4ed8;
}

.ec-deadline-label.is-deadline-today {
  background: #bfdbfe;
  color: #1e3a8a;
}

.ec-deadline-label.is-deadline-soon {
  background: #dbeafe;
  color: #1d4ed8;
}

.ec-deadline-label.is-closed {
  background: #fee2e2;
  color: #991b1b;
}

.ec-deadline-label.is-overdue {
  background: #fee2e2;
  color: #b42318;
}

.ec-deadline-label.is-unknown {
  background: #ffedd5;
  color: #9a3412;
}

.ec-source-links {
  display: flex;
  min-width: 90px;
  flex-direction: column;
  gap: 5px;
}

.ec-source-links a,
.ec-phone,
.ec-detail a {
  color: var(--ec-brand);
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
}

.ec-source-links a:hover,
.ec-phone:hover,
.ec-detail a:hover {
  text-decoration: underline;
}

.ec-source-links .ec-google-link,
.ec-google-search {
  color: #1a73e8;
}

.ec-google-search {
  display: inline-flex;
  margin-bottom: 4px;
  padding: 8px 11px;
  border: 1px solid #bfdbfe;
  border-radius: 9px;
  background: #eff6ff;
  text-decoration: none;
}

.ec-caution {
  min-width: 220px;
  max-width: 300px;
}

.ec-analysis-badge {
  display: inline-flex;
  margin-left: 5px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #ede9fe;
  color: #6d28d9;
  font-size: 0.62rem;
  font-weight: 800;
  vertical-align: middle;
  white-space: nowrap;
}

.ec-latest-change {
  display: inline-flex;
  margin-left: 5px;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 850;
  vertical-align: middle;
  white-space: nowrap;
}

.ec-latest-change.is-created {
  background: #dcfce7;
  color: #166534;
}

.ec-latest-change.is-updated {
  background: #ede9fe;
  color: #6d28d9;
}

.ec-conflict-badge {
  display: block;
  width: fit-content;
  margin-top: 5px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #fff7ed;
  color: #c2410c;
  font-size: 0.62rem;
  font-weight: 800;
  white-space: nowrap;
}

.candidate-dashboard .ec-judgment-note {
  display: -webkit-box;
  overflow: hidden;
  max-height: calc(1.45em * 3);
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow-wrap: anywhere;
}

.ec-detail-button {
  padding: 7px 10px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #fff;
  color: var(--ec-brand-dark);
  font-weight: 700;
  white-space: nowrap;
}

.ec-detail-button:hover {
  border-color: var(--ec-brand);
  background: var(--ec-brand-soft);
}

.ec-empty {
  padding: 54px 20px;
  text-align: center;
}

.ec-empty strong,
.ec-empty span {
  display: block;
}

.ec-empty span {
  margin-top: 5px;
  color: var(--ec-muted);
  font-size: 0.8rem;
}

.ec-line-fab {
  display: none;
  position: fixed;
  right: 18px;
  bottom: 20px;
  z-index: 25;
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 50%;
  background: var(--ec-brand);
  box-shadow: 0 10px 25px rgba(15, 118, 110, 0.35);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
}

.ec-drawer-mask {
  display: none;
}

.ec-drawer-mask.is-showing {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(15, 23, 42, 0.42);
}

.ec-detail {
  position: fixed;
  top: 64px;
  right: 0;
  bottom: 0;
  z-index: 50;
  width: min(520px, 94vw);
  overflow: auto;
  transform: translateX(105%);
  background: #fff;
  box-shadow: -14px 0 32px rgba(15, 23, 42, 0.14);
  transition: transform 0.25s ease;
}

.ec-detail.is-open {
  transform: translateX(0);
}

.ec-detail-head {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 18px 58px 18px 18px;
  border-bottom: 1px solid var(--ec-line);
  background: #fff;
}

.ec-detail-head h2,
.ec-modal-head h2 {
  margin: 0 0 6px;
  font-size: 1.25rem;
}

.ec-close {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: #f2f4f7;
  color: #344054;
  cursor: pointer;
}

.ec-detail-head .ec-close {
  position: absolute;
  top: 14px;
  right: 14px;
}

.ec-detail-body {
  padding: 18px;
}

.ec-detail-badges {
  margin-bottom: 16px;
}

.ec-detail-body h3 {
  margin: 22px 0 8px;
  font-size: 0.9rem;
}

.ec-detail-priority {
  padding: 0 14px 12px;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  background: #fff7ed;
}

.ec-analysis {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid #ddd6fe;
  border-radius: 12px;
  background: #fafaff;
}

.ec-analysis > h3 {
  margin-top: 0;
  color: #5b21b6;
}

.ec-analysis-block {
  margin-top: 10px;
  padding: 11px 12px;
  border-left: 4px solid #8b5cf6;
  border-radius: 8px;
  background: #fff;
}

.ec-analysis-block h4 {
  margin: 0 0 5px;
  color: #5b21b6;
  font-size: 0.76rem;
}

.ec-analysis-block p {
  margin: 0;
  color: #344054;
  font-size: 0.8rem;
  line-height: 1.65;
}

.ec-analysis-block.is-positive {
  border-left-color: #16a34a;
  background: #f0fdf4;
}

.ec-analysis-block.is-positive h4 {
  color: #166534;
}

.ec-analysis-block.is-caution {
  border-left-color: #f97316;
  background: #fff7ed;
}

.ec-analysis-block.is-caution h4 {
  color: #9a3412;
}

.ec-analysis-block.is-decision {
  border-left-color: #2563eb;
  background: #eff6ff;
}

.ec-analysis-block.is-decision h4 {
  color: #1d4ed8;
}

.ec-analysis-block.is-target {
  border-left-color: #0891b2;
  background: #ecfeff;
}

.ec-analysis-block.is-target h4 {
  color: #0e7490;
}

.ec-kv {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  padding: 10px 0;
  gap: 8px 12px;
  border-bottom: 1px solid #eef0f2;
  font-size: 0.78rem;
}

.ec-kv dt {
  color: var(--ec-muted);
}

.ec-kv dd {
  margin: 0;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.ec-modal-mask {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  padding: 20px;
  place-items: center;
  background: rgba(15, 23, 42, 0.58);
}

.ec-modal-mask[hidden] {
  display: none;
}

.ec-line-modal {
  width: min(640px, 100%);
  padding: 20px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.24);
}

.ec-modal-head,
.ec-modal-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.ec-line-modal textarea {
  width: 100%;
  margin: 16px 0;
  padding: 12px;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  background: #f9fafb;
  color: #344054;
  line-height: 1.6;
  resize: vertical;
}

.ec-modal-actions {
  align-items: center;
}

.ec-modal-actions span {
  color: var(--ec-brand-dark);
  font-size: 0.78rem;
  font-weight: 700;
}

@media (max-width: 1180px) {
  .ec-stats {
    grid-template-columns: repeat(3, 1fr);
  }

  .ec-filter-layout {
    grid-template-columns: 1.4fr repeat(2, minmax(0, 1fr));
  }

  .ec-toolbar-grid-secondary {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .candidate-dashboard.ec-scroll-locked {
    overflow: hidden;
  }

  .ec-layout {
    display: block;
  }

  .ec-sidebar {
    display: none;
  }

  .ec-main {
    padding: 16px;
  }

  .ec-topbar {
    padding: 0 14px;
  }

  .ec-auth-user {
    display: none;
  }

  .ec-top-actions {
    display: none;
  }

  .ec-mobile-nav-toggle {
    display: inline-grid;
    width: 42px;
    height: 42px;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    cursor: pointer;
    font-size: 1.25rem;
  }

  .ec-mobile-nav-overlay {
    position: fixed;
    z-index: 70;
    inset: 0;
    background: rgba(11, 18, 32, 0.58);
  }

  .ec-mobile-nav-overlay.is-open {
    display: block;
  }

  .ec-mobile-nav {
    position: fixed;
    z-index: 80;
    top: 0;
    bottom: 0;
    left: 0;
    display: block;
    width: min(86vw, 320px);
    padding: 0 14px 22px;
    overflow-y: auto;
    background: #101828;
    color: #cbd5e1;
    box-shadow: 20px 0 45px rgba(15, 23, 42, 0.3);
    transform: translateX(-105%);
    transition: transform 180ms ease;
  }

  .ec-mobile-nav.is-open {
    transform: translateX(0);
  }

  .ec-mobile-nav-head {
    position: sticky;
    z-index: 1;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    border-bottom: 1px solid #344054;
    background: #101828;
    color: #fff;
  }

  .ec-mobile-nav-head button {
    display: grid;
    width: 42px;
    height: 42px;
    padding: 0;
    place-items: center;
    border: 1px solid #475467;
    border-radius: 10px;
    background: #1d2939;
    color: #fff;
    cursor: pointer;
    font-size: 1.4rem;
  }

  .ec-updated {
    display: none;
  }

  .ec-notification-banner {
    grid-template-columns: 28px minmax(0, 1fr) 28px;
    gap: 6px;
    min-height: 42px;
    padding: 3px 5px;
  }

  .ec-notification-arrow {
    width: 28px;
    min-width: 28px;
    min-height: 36px;
  }

  .ec-notification-links {
    display: inline-flex;
    gap: 2px 4px;
  }

  .ec-notification-date {
    display: block;
    margin-right: 0;
    white-space: normal;
  }

  .ec-notification-update dl > div {
    grid-template-columns: 6rem minmax(0, 1fr);
  }

  .ec-page-head {
    grid-template-columns: 1fr;
    align-items: center;
  }

  .ec-page-head .ec-primary {
    display: none;
  }

  .ec-page-title h1 {
    font-size: 1.3rem;
  }

  .ec-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .ec-stat {
    padding: 13px;
  }

  .ec-stat strong {
    font-size: 1.45rem;
  }

  .ec-filter-layout {
    display: block;
  }

  .ec-mobile-filter-toggle {
    display: block;
    width: 100%;
    min-height: 42px;
    margin-top: 10px;
    padding: 8px 12px;
    border: 1px solid #a7f3d0;
    border-radius: 9px;
    background: #ecfdf5;
    color: #065f46;
    cursor: pointer;
    font-weight: 750;
    opacity: 1;
    text-align: left;
    touch-action: manipulation;
    -webkit-appearance: none;
    -webkit-tap-highlight-color: rgba(6, 95, 70, 0.2);
    -webkit-text-fill-color: #065f46;
  }

  .ec-mobile-filter-toggle:hover,
  .ec-mobile-filter-toggle:focus,
  .ec-mobile-filter-toggle:active,
  .ec-mobile-filter-toggle[aria-expanded="false"] {
    border-color: #34d399;
    background: #d1fae5;
    color: #064e3b;
    -webkit-text-fill-color: #064e3b;
  }

  .ec-mobile-filter-toggle:focus,
  .ec-mobile-filter-toggle:focus-visible {
    outline: 3px solid rgba(5, 150, 105, 0.35);
    outline-offset: 2px;
  }

  .ec-mobile-filter-toggle:active {
    border-color: #059669;
    background: #a7f3d0;
    color: #052e2b;
    -webkit-text-fill-color: #052e2b;
  }

  .ec-mobile-filter-toggle[aria-expanded="true"] {
    border-color: #047857;
    background: #0f766e;
    color: #fff;
    -webkit-text-fill-color: #fff;
  }

  .ec-mobile-filter-toggle[aria-expanded="true"]:hover,
  .ec-mobile-filter-toggle[aria-expanded="true"]:focus,
  .ec-mobile-filter-toggle[aria-expanded="true"]:active {
    border-color: #064e3b;
    background: #115e59;
    color: #fff;
    -webkit-text-fill-color: #fff;
  }

  .ec-advanced-filters {
    display: block;
    margin-top: 12px;
  }

  .ec-advanced-filters[hidden] {
    display: none;
  }

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

  .ec-toolbar-grid-secondary {
    display: grid;
    grid-template-columns: 1fr;
    max-width: none;
    margin-top: 10px;
  }

  .ec-mobile-full {
    grid-column: 1 / -1;
  }

  .ec-date-field::after {
    position: absolute;
    right: 38px;
    bottom: 12px;
    left: 11px;
    display: block;
    overflow: hidden;
    background: #fff;
    color: #667085;
    content: "年/月/日";
    font-size: 0.78rem;
    line-height: 18px;
    pointer-events: none;
    white-space: nowrap;
  }

  .ec-date-field.has-value::after {
    display: none;
  }

  .ec-filter-actions {
    margin-top: 10px;
  }

  .ec-filter-actions .ec-clear {
    width: 100%;
    min-height: 42px;
    border-color: #d0d5dd;
  }

  .ec-table-wrap {
    display: block;
    width: 100%;
    max-width: 100%;
    max-height: 68vh;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }

  .candidate-dashboard .candidate-table .ec-detail-button {
    min-width: 48px;
    min-height: 42px;
  }

  .ec-line-fab {
    display: block;
    bottom: calc(20px + env(safe-area-inset-bottom));
  }

  .ec-detail {
    top: 0;
  }

  .ec-prefecture-sort-row {
    flex-direction: column;
  }

  .ec-prefectures {
    width: 100%;
  }

  .ec-sort-compact {
    align-self: flex-end;
  }
}

.ec-mobile-account-actions {
  display: none;
}

@media (max-width: 860px) {
  .ec-mobile-account-actions {
    display: grid;
    gap: 8px;
    margin-top: 18px;
    padding: 16px 10px calc(8px + env(safe-area-inset-bottom));
    border-top: 1px solid #344054;
  }

  .ec-mobile-account-actions > span {
    overflow-wrap: anywhere;
    color: #98a2b3;
    font-size: 0.78rem;
  }

  .ec-mobile-account-actions button {
    width: 100%;
    min-height: 42px;
    border: 1px solid #475467;
    border-radius: 9px;
    color: #fff;
    background: #1d2939;
  }
}

@media (max-width: 520px) {
  .ec-brand span {
    font-size: 0.86rem;
  }

  .ec-main {
    padding: 12px;
  }

  .ec-page-head {
    margin-bottom: 12px;
  }

  .ec-page-title p {
    font-size: 0.72rem;
  }

  .ec-stats {
    display: flex;
    padding-bottom: 4px;
    overflow: auto;
    scroll-snap-type: x mandatory;
  }

  .ec-stat {
    min-width: 145px;
    scroll-snap-align: start;
  }

  .ec-toolbar {
    padding: 11px;
  }

  .ec-clear {
    width: 100%;
    margin-left: 0;
  }

  .ec-prefectures {
    flex-wrap: nowrap;
    overflow: auto;
  }

  .ec-sort-compact {
    width: 100%;
  }

  .ec-sort-compact select {
    flex: 1 1 auto;
    width: auto;
  }

  .ec-panel-head {
    padding: 12px;
  }

  .ec-panel-head .ec-badge {
    display: none;
  }

  .ec-kv {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .ec-line-modal {
    padding: 16px;
  }
}

.auth-success {
  white-space: pre-wrap;
  padding: 10px 12px;
  border: 1px solid #86c69b;
  border-radius: 8px;
  color: #185b2f;
  background: #edf9f0;
}

.auth-check {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.auth-check input {
  width: auto;
  margin: 0;
}

.auth-secondary-link {
  margin: 18px 0 0;
  text-align: center;
}

.admin-page {
  margin: 0;
  color: #24332b;
  background: #f3f6f2;
  overflow-x: hidden;
}

.admin-page input,
.admin-page select,
.admin-page textarea,
.admin-page button {
  box-sizing: border-box;
}

.admin-app {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  min-height: 100vh;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 100vh;
  padding: 18px 14px;
  overflow-y: auto;
  color: #dbe4ef;
  background: #101828;
}

.admin-sidebar-head {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 0 10px 14px;
  border-bottom: 1px solid #344054;
  color: #fff;
}

.admin-nav-close,
.admin-nav-toggle,
.admin-nav-overlay {
  display: none;
}

.admin-nav-links {
  display: grid;
  gap: 4px;
  margin-top: 14px;
}

.admin-nav-links a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 9px 11px;
  border-radius: 9px;
  color: #dbe4ef;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.admin-nav-links a:hover,
.admin-nav-links a:focus-visible {
  color: #fff;
  background: #1d2939;
}

.admin-shell {
  width: min(1500px, calc(100% - 32px));
  min-width: 0;
  margin: 0 auto;
  padding: 28px 0 60px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.admin-card {
  min-width: 0;
  margin-bottom: 20px;
  padding: 20px;
  border: 1px solid #d9e2dc;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgb(26 61 39 / 8%);
}

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

.admin-form-grid label,
.admin-dialog-form label {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.admin-form-grid .auth-check,
.admin-form-grid button {
  white-space: nowrap;
}

.admin-form-grid input,
.admin-dialog-form input {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #bdcbc2;
  border-radius: 7px;
}

.admin-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.mail-template-row-actions {
  flex-wrap: nowrap;
}

.mail-template-table {
  min-width: 900px;
}

.mail-history-table {
  min-width: 1280px;
}

.mail-template-dialog {
  width: min(860px, calc(100% - 32px));
}

.mail-template-form {
  display: grid;
  gap: 14px;
}

.mail-template-form > label:not(.auth-check) {
  display: grid;
  gap: 6px;
  color: #52645a;
  font-size: 0.82rem;
  font-weight: 700;
}

.mail-template-form input[type="text"],
.mail-template-form textarea,
.mail-test-form input {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid #bdcbc2;
  border-radius: 8px;
  color: #24332b;
  background: #fff;
}

.mail-template-form textarea {
  min-height: 260px;
  resize: vertical;
  font: 0.9rem/1.65 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.mail-variable-heading {
  margin: 0 0 8px;
  color: #52645a;
  font-size: 0.8rem;
  font-weight: 700;
}

.mail-variable-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.mail-variable-button {
  min-height: 32px;
  padding: 5px 9px;
  border: 1px solid #b9cec1;
  border-radius: 7px;
  color: #245c3d;
  background: #f3f9f5;
  font: 0.76rem ui-monospace, SFMono-Regular, Menlo, monospace;
}

.mail-template-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.mail-template-actions h3,
.mail-template-actions p {
  margin-top: 0;
}

.mail-test-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.mail-test-form button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.mail-status {
  display: inline-flex;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.mail-status--sent {
  color: #176536;
  background: #e6f6eb;
}

.mail-status--failed {
  color: #9a312b;
  background: #fdecea;
}

.mail-status--pending,
.mail-status--skipped {
  color: #705b1b;
  background: #fff5d8;
}

.system-log-filter-card {
  padding: 14px 16px;
}

.system-log-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}

.system-log-filter-field,
.system-log-resolution-form label {
  display: grid;
  gap: 6px;
  color: #52645a;
  font-size: 0.8rem;
  font-weight: 700;
}

.system-log-filter-field--date {
  flex: 0 1 180px;
  width: 180px;
  min-width: 170px;
}

.system-log-filter-field--select {
  flex: 0 1 170px;
  width: 170px;
  min-width: 160px;
}

.system-log-filter-field input,
.system-log-filter-field select,
.system-log-resolution-form select,
.system-log-resolution-form textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #bdcbc2;
  border-radius: 8px;
  color: #24332b;
  background: #fff;
}

.system-log-unresolved-check {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  margin: 0;
  color: #52645a;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.system-log-unresolved-check input {
  flex: 0 0 18px;
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 0;
  margin: 0;
  padding: 0;
  accent-color: #276b45;
  cursor: pointer;
}

.system-log-filter-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.system-log-table {
  min-width: 1100px;
}

.system-log-summary {
  min-width: 300px;
  white-space: normal;
}

.system-log-level {
  display: inline-flex;
  padding: 3px 9px;
  border-radius: 999px;
  color: #344054;
  background: #eef2f6;
  font-size: 0.75rem;
  font-weight: 800;
}

.system-log-level--warning {
  color: #705b1b;
  background: #fff5d8;
}

.system-log-level--error,
.system-log-level--critical {
  color: #9a312b;
  background: #fdecea;
}

.system-log-dialog {
  width: min(900px, calc(100% - 32px));
}

.system-log-detail dl {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 8px 14px;
}

.system-log-detail dt {
  color: #68796f;
  font-weight: 700;
}

.system-log-detail dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.system-log-detail pre,
.system-document-view pre {
  max-width: 100%;
  margin: 0;
  padding: 12px;
  overflow: auto;
  border: 1px solid #dce6df;
  border-radius: 8px;
  color: #26372d;
  background: #f6f8f7;
  font: 0.8rem/1.6 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.system-log-resolution-form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.candidate-import-alert {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  padding: 12px 16px;
}

.candidate-import-alert--error {
  border-color: #efb0a7;
  color: #8f2e28;
  background: #fff2f0;
}

.candidate-import-log-table {
  min-width: 1900px;
}

.candidate-import-log-table code {
  font: 0.76rem ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: nowrap;
}

.candidate-import-status {
  display: inline-flex;
  padding: 3px 9px;
  border-radius: 999px;
  color: #344054;
  background: #eef2f6;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.candidate-import-status--success {
  color: #176536;
  background: #e6f6eb;
}

.candidate-import-status--warning,
.candidate-import-status--partial_success,
.candidate-import-status--skipped {
  color: #705b1b;
  background: #fff5d8;
}

.candidate-import-status--failed,
.candidate-import-status--timeout,
.candidate-import-status--not_started,
.candidate-import-status--stale_running {
  color: #9a312b;
  background: #fdecea;
}

.candidate-import-timeline {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
  padding-left: 24px;
}

.candidate-import-timeline li {
  display: grid;
  grid-template-columns: 150px 150px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
}

.candidate-import-timeline time,
.candidate-import-timeline strong {
  white-space: nowrap;
}

.documentation-version-card {
  padding: 11px 16px;
}

.documentation-version-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  min-width: 0;
}

.documentation-version-row h2 {
  flex: 0 0 auto;
  margin: 0;
  font-size: 1rem;
  white-space: nowrap;
}

.documentation-version-item {
  display: inline-flex;
  flex: 0 1 auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: #68796f;
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
}

.documentation-version-item code {
  color: #24332b;
  font: 0.7rem ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: nowrap;
}

.documentation-version-status {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 28px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
}

.documentation-version-status--match {
  color: #176536;
  background: #e6f6eb;
}

.documentation-version-status--mismatch {
  color: #8b3a22;
  background: #fff0e8;
}

.documentation-downloads {
  flex: 0 0 auto;
  flex-wrap: nowrap;
  margin: 0 0 0 auto;
  white-space: nowrap;
}

.documentation-row-actions {
  flex-wrap: nowrap;
}

.documentation-table {
  min-width: 1000px;
}

.documentation-summary-cell {
  min-width: 320px;
  max-width: 520px;
}

.documentation-summary {
  display: -webkit-box;
  overflow: hidden;
  color: #52645a;
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.migration-list {
  display: grid;
  gap: 6px;
  padding-left: 22px;
}

.system-document-view pre {
  min-height: 60vh;
  white-space: pre-wrap;
}

.system-document-actions {
  justify-content: flex-end;
  margin: -10px 0 14px;
}

.admin-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 10px;
  border-bottom: 1px solid #e0e7e2;
  text-align: left;
  vertical-align: middle;
}

.admin-table th {
  color: #52645a;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.admin-id,
.admin-datetime,
.admin-nowrap,
.admin-operation,
.admin-table button {
  white-space: nowrap;
}

.admin-id {
  width: 56px;
}

.admin-email {
  min-width: 260px;
  white-space: nowrap;
}

.admin-datetime {
  min-width: 142px;
  font-variant-numeric: tabular-nums;
}

.admin-section-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.admin-section-heading h2,
.admin-section-heading p {
  margin: 0;
}

.admin-section-heading p {
  margin-top: 4px;
  color: #68796f;
  font-size: 0.78rem;
}

.admin-status,
.admin-mail-status {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.admin-status--active,
.admin-mail-status--sent {
  color: #176536;
  background: #e6f6eb;
}

.admin-status--stopped,
.admin-mail-status--failed {
  color: #9a312b;
  background: #fdecea;
}

.admin-mail-status--pending {
  color: #705b1b;
  background: #fff5d8;
}

.admin-edit-button,
.admin-dialog-form button,
.admin-resume-button,
.admin-stop-button,
.admin-delete-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 36px;
  padding: 7px 13px;
  border: 1px solid #276b45;
  border-radius: 8px;
  color: #fff;
  background: #276b45;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.admin-primary-button,
.admin-secondary-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid #276b45;
  border-radius: 10px;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.admin-primary-button {
  color: #fff;
  background: #276b45;
}

.admin-primary-button:hover {
  color: #fff;
  background: #1d5938;
}

.admin-secondary-button {
  color: #276b45;
  background: #fff;
}

.admin-secondary-button:hover {
  color: #fff;
  background: #276b45;
}

.admin-danger-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid #b33a32;
  border-radius: 10px;
  color: #9a312b;
  background: #fff;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}

.admin-danger-button:hover {
  color: #fff;
  background: #b33a32;
}

.candidate-admin-card {
  margin-bottom: 16px;
}

.candidate-admin-toolbar,
.candidate-admin-filters,
.candidate-admin-bulk-actions,
.candidate-admin-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.candidate-admin-filters {
  margin-top: 16px;
}

.candidate-admin-filters label {
  display: grid;
  gap: 5px;
  min-width: 150px;
  color: #52645a;
  font-size: 0.8rem;
  font-weight: 700;
}

.candidate-admin-filters label:first-child {
  min-width: min(320px, 100%);
  flex: 1 1 260px;
}

.candidate-admin-filters input,
.candidate-admin-filters select {
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid #c8d5cc;
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-weight: 400;
}

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

.candidate-admin-table {
  min-width: 1250px;
}

.candidate-admin-table td {
  overflow-wrap: anywhere;
}

.candidate-admin-table .admin-id,
.candidate-admin-table .candidate-admin-deadline,
.candidate-admin-table .admin-nowrap {
  white-space: nowrap;
}

.candidate-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 170px;
}

.candidate-admin-actions .admin-primary-button,
.candidate-admin-actions .admin-secondary-button,
.candidate-admin-actions .admin-danger-button {
  min-height: 38px;
  padding: 8px 11px;
  border-radius: 8px;
  font-size: 0.82rem;
}

.candidate-admin-bulk-actions {
  justify-content: flex-end;
  margin-top: 14px;
}

.candidate-admin-pagination {
  justify-content: flex-end;
  margin-top: 16px;
}

.candidate-admin-pagination > span {
  color: #66776d;
  font-size: 0.85rem;
  font-weight: 700;
}

.admin-muted,
.admin-empty {
  color: #66776d;
}

.admin-edit-button:hover,
.admin-dialog-form button:hover {
  background: #1d5938;
}

.admin-user-dialog {
  width: min(720px, calc(100% - 32px));
  max-height: calc(100dvh - 40px);
  padding: 0;
  border: 0;
  border-radius: 16px;
  color: #24332b;
  background: #fff;
  box-shadow: 0 24px 70px rgb(16 38 25 / 28%);
  overflow-y: auto;
}

.admin-user-dialog::backdrop {
  background: rgb(17 31 23 / 58%);
}

.admin-dialog-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1px solid #dfe8e2;
  background: #fff;
}

.admin-dialog-head h2,
.admin-dialog-head p {
  margin: 0;
}

.admin-dialog-head h2 {
  font-size: 1.15rem;
  overflow-wrap: anywhere;
}

.admin-dialog-head p:last-child {
  margin-top: 4px;
  color: #68796f;
  font-size: 0.8rem;
}

.admin-dialog-close {
  display: flex;
  flex: 0 0 42px;
  align-items: center;
  justify-content: center;
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border: 1px solid #cdd9d1;
  border-radius: 50%;
  color: #374b3f;
  background: #f5f8f6;
  font-size: 0;
  line-height: 1;
  cursor: pointer;
}

.admin-dialog-close::before {
  content: "×";
  font-size: 1.4rem;
  line-height: 1;
  transform: translateY(-1px);
}

.admin-dialog-section {
  padding: 20px 22px;
  border-bottom: 1px solid #e3eae5;
}

.admin-dialog-section h3,
.admin-dialog-section p {
  margin-top: 0;
}

.admin-dialog-form {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.admin-dialog-form--password {
  grid-template-columns: 1fr 1fr auto;
}

.admin-dialog-section--danger {
  border-bottom: 0;
  background: #fffaf8;
}

.admin-dialog-section--danger p {
  color: #79534e;
  font-size: 0.88rem;
}

.admin-danger-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-stop-button {
  border-color: #a84a40;
  color: #8f2f28;
  background: #fff;
}

.admin-resume-button {
  border-color: #276b45;
  color: #276b45;
  background: #fff;
}

.admin-delete-button {
  border-color: #bd3028;
  color: #a12620;
  background: transparent;
}

.danger-button {
  background: #a93029 !important;
}

.admin-stop-button:hover,
.admin-delete-button:hover {
  color: #fff;
  background: #a93029;
}

.admin-resume-button:hover {
  color: #fff;
  background: #276b45;
}

@media (max-width: 860px) {
  .admin-nav-locked {
    overflow: hidden;
  }

  .admin-app {
    display: block;
  }

  .admin-sidebar {
    position: fixed;
    z-index: 80;
    inset: 0 auto 0 0;
    display: block;
    width: min(86vw, 320px);
    height: 100dvh;
    padding-bottom: calc(22px + env(safe-area-inset-bottom));
    box-shadow: 20px 0 45px rgb(15 23 42 / 30%);
    transform: translateX(-105%);
    transition: transform 180ms ease;
  }

  .admin-sidebar.is-open {
    transform: translateX(0);
  }

  .admin-nav-overlay {
    position: fixed;
    z-index: 70;
    inset: 0;
    background: rgb(11 18 32 / 58%);
  }

  .admin-nav-overlay.is-open {
    display: block;
  }

  .admin-sidebar-head {
    justify-content: space-between;
  }

  .admin-nav-close,
  .admin-nav-toggle {
    display: grid;
    place-items: center;
    width: 42px;
    min-width: 42px;
    height: 42px;
    min-height: 42px;
    padding: 0;
    border-radius: 10px;
    cursor: pointer;
  }

  .admin-nav-close {
    border: 1px solid #475467;
    color: #fff;
    background: #1d2939;
    font-size: 1.35rem;
  }

  .admin-nav-toggle {
    border: 1px solid #b8c8be;
    color: #245c3d;
    background: #fff;
    font-size: 1.2rem;
  }
}

@media (max-width: 760px) {
  .admin-shell {
    width: min(100% - 20px, 1500px);
    padding: 16px 0 calc(28px + env(safe-area-inset-bottom));
  }

  .admin-header {
    align-items: center;
    margin-bottom: 14px;
  }

  .admin-header h1 {
    margin: 0;
    font-size: 1.35rem;
    line-height: 1.3;
  }

  .admin-form-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .admin-registration-field {
    grid-template-columns: 8.5rem minmax(0, 1fr);
    align-items: center;
  }

  .admin-registration-field > span {
    white-space: nowrap;
  }

  .admin-registration-input {
    width: 100%;
  }

  .admin-card {
    margin-bottom: 12px;
    padding: 14px;
  }

  .admin-card h2 {
    overflow-wrap: anywhere;
    font-size: 1.05rem;
  }

  .admin-card p,
  .admin-card code,
  .admin-card td {
    overflow-wrap: anywhere;
  }

  .admin-page input:not([type="checkbox"]):not([type="radio"]),
  .admin-page select,
  .admin-page textarea {
    max-width: 100%;
    font-size: 16px;
  }

  .admin-table-wrap {
    overflow: visible;
  }

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

  .candidate-admin-table {
    display: table;
    min-width: 1250px;
  }

  .candidate-admin-table thead {
    display: table-header-group;
  }

  .candidate-admin-table tbody {
    display: table-row-group;
  }

  .candidate-admin-table tr {
    display: table-row;
  }

  .candidate-admin-table td,
  .candidate-admin-table th {
    display: table-cell;
    width: auto;
  }

  .candidate-admin-filters {
    align-items: stretch;
    flex-direction: column;
  }

  .candidate-admin-filters label,
  .candidate-admin-filters label:first-child {
    width: 100%;
    min-width: 0;
  }

  .admin-table {
    min-width: 0;
  }

  .admin-table thead {
    display: none;
  }

  .admin-table,
  .admin-table tbody,
  .admin-user-row {
    display: block;
    width: 100%;
  }

  .admin-user-row {
    margin-bottom: 14px;
    padding: 10px 12px;
    border: 1px solid #dce6df;
    border-radius: 12px;
    background: #fff;
  }

  .admin-table .admin-user-row td {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 10px;
    width: auto;
    min-width: 0;
    padding: 8px 0;
    border-bottom: 1px solid #edf1ee;
    white-space: normal;
  }

  .admin-table .admin-user-row td::before {
    content: attr(data-label);
    color: #66776d;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
  }

  .admin-table .admin-user-row td:last-child {
    border-bottom: 0;
  }

  .admin-email {
    overflow-wrap: anywhere;
  }

  .admin-edit-button {
    width: fit-content;
  }

  .admin-actions {
    align-items: stretch;
    justify-content: flex-start;
  }

  .mail-template-row-actions,
  .documentation-row-actions {
    flex-wrap: wrap;
  }

  .admin-dialog-form,
  .admin-dialog-form--password {
    grid-template-columns: 1fr;
  }

  .admin-dialog-form button {
    width: 100%;
  }

  .admin-user-dialog {
    width: min(100% - 20px, 720px);
  }

  .mail-template-dialog {
    width: min(100% - 20px, 860px);
  }

  .mail-template-actions,
  .mail-test-form {
    grid-template-columns: 1fr;
  }

  .mail-template-actions {
    gap: 14px;
  }

  .mail-template-actions > div {
    padding-top: 2px;
  }

  .system-log-filters {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }

  .system-log-filter-field--date,
  .system-log-filter-field--select {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
  }

  .system-log-filter-card {
    padding: 12px;
  }

  .system-log-filter-field {
    gap: 4px;
    margin: 0;
  }

  .system-log-filter-field input,
  .system-log-filter-field select {
    min-height: 44px;
  }

  .system-log-filter-actions {
    flex-wrap: wrap;
  }

  .system-log-detail dl {
    grid-template-columns: 1fr;
  }

  .candidate-import-alert {
    align-items: flex-start;
    flex-direction: column;
  }

  .candidate-import-timeline li {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .documentation-version-row {
    flex-direction: column;
    align-items: stretch;
  }

  .documentation-version-item {
    display: grid;
    gap: 3px;
    white-space: normal;
  }

  .documentation-version-item code {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .documentation-downloads {
    flex-wrap: wrap;
    margin-left: 0;
  }

  .system-document-actions {
    justify-content: flex-start;
    margin-top: -4px;
  }
}

@media (max-width: 370px) {
  .admin-registration-field {
    grid-template-columns: 1fr;
    gap: 5px;
  }
}

.system-log-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 14px;
  border-bottom: 1px solid #d7dee8;
}

.system-log-tabs a {
  padding: 9px 14px;
  color: #526173;
  text-decoration: none;
  white-space: nowrap;
}

.system-log-tabs a.is-active {
  color: #142338;
  border-bottom: 3px solid #2864a8;
  font-weight: 700;
}

.system-log-history-filters,
.history-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
}

.system-log-history-filters label,
.history-form-grid label {
  display: grid;
  gap: 5px;
  color: #526173;
  font-size: .85rem;
}

.system-log-history-filters input,
.system-log-history-filters select,
.history-form-grid input,
.history-form-grid select,
.history-form-grid textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 9px;
  border: 1px solid #c8d2df;
  border-radius: 5px;
  background: #fff;
  font: inherit;
}

.history-form-wide { grid-column: 1 / -1; }
.history-form-help { margin: 0 0 12px; color: #526173; white-space: pre-wrap; }
.history-list-heading { align-items: center; }
.history-list-actions { display: flex; align-items: center; gap: 8px; }
.history-list-actions form { margin: 0; }
.system-log-history-filters .admin-actions { grid-column: 1 / -1; align-items: end; }
.system-log-history-table .history-nowrap { white-space: nowrap; word-break: normal; overflow-wrap: normal; }
.system-log-history-table .history-title { min-width: 240px; overflow-wrap: anywhere; }
.system-log-history-table .history-related-execution { min-width: 190px; max-width: 280px; white-space: normal; overflow-wrap: anywhere; word-break: normal; }
.history-related-execution > div { margin: 2px 0; }
.history-related-execution-detail { overflow-wrap: anywhere; }
.manual-candidate-json { width: 100%; box-sizing: border-box; font: .9rem/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.manual-json-result { min-height: 1.4em; margin: 8px 0 0; }
.manual-json-result--success { color: #176b42; }
.manual-json-result--error { color: #a12b2b; }
.manual-candidate-form { display: grid; gap: 16px; }
.manual-candidate-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.manual-candidate-grid label { display: grid; gap: 5px; color: #526173; font-size: .85rem; }
.manual-candidate-grid input, .manual-candidate-grid textarea { width: 100%; box-sizing: border-box; padding: 8px 9px; border: 1px solid #c8d2df; border-radius: 5px; background: #fff; font: inherit; }
.manual-candidate-field-wide { grid-column: span 2; }
.manual-candidate-details { margin-top: 8px; }
.manual-candidate-details summary { cursor: pointer; color: #176b42; font-weight: 700; margin-bottom: 12px; }
.history-badge { display: inline-block; padding: 3px 7px; border-radius: 999px; background: #e8eef7; white-space: nowrap; }
.history-detail dl { display: grid; grid-template-columns: minmax(145px, 190px) 1fr; margin: 0; }
.history-detail dt, .history-detail dd { padding: 10px 12px; border-bottom: 1px solid #e4e9f0; margin: 0; }
.history-detail dt { font-weight: 700; color: #526173; }
.history-prewrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.history-detail-actions { display: flex; gap: 8px; margin-bottom: 16px; }
.history-additional-heading { margin: 20px 0 8px; font-size: 1rem; }
.admin-inline-action { display: inline-block; margin-right: 8px; }

@media (max-width: 760px) {
  .system-log-history-filters, .history-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .manual-candidate-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .history-detail dl { grid-template-columns: 1fr; }
  .history-detail dt { border-bottom: 0; padding-bottom: 3px; }
  .history-detail dd { padding-top: 3px; }
}

@media (max-width: 480px) {
  .system-log-history-filters, .history-form-grid { grid-template-columns: 1fr; }
  .manual-candidate-grid { grid-template-columns: 1fr; }
  .manual-candidate-field-wide { grid-column: auto; }
  .history-form-wide { grid-column: auto; }
  .system-log-tabs { overflow-x: auto; }
  .history-list-heading, .history-list-actions { align-items: stretch; flex-direction: column; }
  .history-list-actions > *, .history-list-actions button { width: 100%; box-sizing: border-box; text-align: center; }
}
