:root {
  color: #183b56;
  background: #f6f9fa;
  font-family: Pretendard, "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  --primary: #20b8a6;
  --primary-dark: #118f82;
  --navy: #183b56;
  --accent: #f59e42;
  --background: #f6f9fa;
  --line: #dfe8eb;
  --muted: #687c8b;
  --white: #ffffff;
  --danger: #c53d4b;
  --sidebar-width: 240px;
  --topbar-height: 72px;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--primary-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-page {
  background: linear-gradient(135deg, #ecf9f6, #f7fafb 56%, #fff5e9);
}

.auth-shell {
  display: grid;
  width: min(1120px, calc(100% - 48px));
  min-height: 680px;
  margin: 48px auto;
  overflow: hidden;
  border-radius: 28px;
  background: var(--white);
  box-shadow: 0 30px 80px rgba(24, 59, 86, 0.13);
  grid-template-columns: 1.1fr 0.9fr;
}

.auth-brand {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 54px;
  background:
    radial-gradient(circle at 90% 10%, rgba(245, 158, 66, 0.2), transparent 28%),
    linear-gradient(145deg, #e4f8f3, #f5fbfa);
}

.auth-brand img {
  width: 205px;
  height: 205px;
  border-radius: 28px;
  object-fit: cover;
}

.auth-brand h1 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(2.25rem, 4vw, 3.55rem);
  letter-spacing: -0.05em;
  line-height: 1.17;
}

.auth-brand div > p:last-child {
  max-width: 440px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

.auth-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px;
}

.mobile-brand {
  display: none;
}

.auth-card h2,
.page-heading h1 {
  margin: 0;
  color: var(--navy);
  font-size: 2rem;
  letter-spacing: -0.04em;
}

.section-copy,
.page-heading > p:last-child {
  margin: 12px 0 30px;
  color: var(--muted);
  line-height: 1.6;
}

form,
label,
.field-grid {
  display: grid;
}

form {
  gap: 20px;
}

label,
.field-grid {
  gap: 9px;
}

label {
  color: var(--navy);
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 52px;
  padding: 11px 14px;
  border: 1px solid #cbd9de;
  border-radius: 10px;
  color: var(--navy);
  background: var(--white);
}

input:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(32, 184, 166, 0.25);
  outline-offset: 2px;
}

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

.check-row input {
  width: 22px;
  min-height: 22px;
  accent-color: var(--primary);
}

.field-help,
.test-hint {
  margin: -12px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.test-hint {
  margin: 18px 0;
  padding: 12px 14px;
  border-radius: 9px;
  background: #f0f8f7;
  text-align: center;
}

.button {
  display: grid;
  min-height: 52px;
  border: 0;
  border-radius: 10px;
  font-weight: 800;
  cursor: pointer;
  place-items: center;
  text-decoration: none;
}

.primary {
  color: var(--white);
  background: var(--primary);
}

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

.outline {
  border: 1px solid var(--primary);
  color: var(--primary-dark);
  background: var(--white);
}

.soft {
  padding: 0 18px;
  color: var(--primary-dark);
  background: #e6f7f4;
  white-space: nowrap;
}

.text-link {
  margin-top: 20px;
  color: var(--muted);
  text-align: center;
  text-decoration: none;
}

.form-message {
  min-height: 1.4em;
  margin: -12px 0 0;
  font-size: 0.9rem;
}

.organization-results {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f9fbfc;
}

.organization-results[hidden] {
  display: none;
}

.result-heading {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.organization-result-list {
  display: grid;
  max-height: 430px;
  overflow-y: auto;
}

.organization-result-card {
  display: grid;
  padding: 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: #365369;
  background: var(--white);
  cursor: pointer;
  gap: 5px;
  text-align: left;
}

.organization-result-card:last-child {
  border-bottom: 0;
}

.organization-result-card:hover,
.organization-result-card.selected {
  background: #eaf8f5;
}

.organization-result-card.selected {
  box-shadow: inset 4px 0 var(--primary);
}

.organization-result-card strong {
  color: var(--navy);
  font-size: 1rem;
}

.organization-result-card span {
  font-size: 0.86rem;
}

.empty-result {
  margin: 0;
  padding: 24px 16px;
  color: var(--muted);
  line-height: 1.6;
  text-align: center;
}

.organization-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  gap: 14px;
}

.organization-pagination[hidden] {
  display: none;
}

.organization-pagination .button {
  min-height: 38px;
  padding: 0 16px;
}

.organization-pagination .button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.selected-organization {
  display: grid;
  padding: 20px;
  border: 1px solid #b8e6de;
  border-radius: 12px;
  background: #f3fbf9;
  gap: 7px;
}

.selected-organization[hidden] { display: none; }
.selected-organization-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px; gap: 12px; }
.selected-organization-heading span { color: var(--primary-dark); font-size: .82rem; font-weight: 850; }
.selected-organization-heading .button { min-height: 36px; padding: 0 12px; }
.selected-organization > strong { color: var(--navy); font-size: 1.08rem; }
.selected-organization > p { margin: 0; color: var(--muted); line-height: 1.5; }
.selected-organization > .form-message { margin-top: 5px; }
.selected-organization > .button { justify-self: start; }

.error {
  color: var(--danger);
}

.success {
  color: var(--primary-dark);
}

.form-page {
  background: var(--background);
}

.simple-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--topbar-height);
  padding: 0 max(24px, calc((100% - 960px) / 2));
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.simple-header a {
  color: var(--navy);
  font-size: 1.45rem;
  font-weight: 900;
  text-decoration: none;
}

.simple-header span {
  color: var(--muted);
  font-weight: 700;
}

.form-container {
  width: min(760px, calc(100% - 40px));
  margin: 58px auto 80px;
}

.page-heading {
  margin-bottom: 28px;
}

.signup-card {
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
}

fieldset {
  display: grid;
  margin: 0;
  padding: 0 0 28px;
  border: 0;
  border-bottom: 1px solid var(--line);
  gap: 20px;
}

fieldset + fieldset {
  padding-top: 6px;
}

legend {
  margin-bottom: 18px;
  color: var(--navy);
  font-size: 1.12rem;
  font-weight: 850;
}

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

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

.inline-field {
  display: flex;
  gap: 10px;
}

.center {
  text-align: center;
}

.terms-consent {
  padding-top: 24px;
}

.terms-all {
  display: flex;
  align-items: center;
  gap: 9px;
}

.terms-all {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.terms-all input,
.term-row input {
  width: 22px;
  min-height: 22px;
  accent-color: var(--primary);
}

.term-row {
  display: grid;
  align-items: center;
  padding-top: 14px;
  gap: 8px;
  grid-template-columns: 22px minmax(0, 1fr);
}

.term-title-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  min-height: 38px;
  padding: 4px 2px;
  border: 0;
  color: var(--primary-dark);
  background: transparent;
  font-weight: 750;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
}

.term-title-button b {
  margin-left: 6px;
  font-size: 1.3rem;
}

.terms-message {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.terms-dialog {
  width: min(720px, calc(100% - 24px));
  height: min(82vh, 820px);
  padding: 0;
  border: 0;
  border-radius: 16px;
  color: var(--navy);
}

.terms-dialog::backdrop { background: rgba(14, 34, 48, 0.55); }
.terms-dialog-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.terms-dialog-header h2 { margin: 0; font-size: 1.1rem; }
.terms-dialog-header button { min-height: 40px; padding: 4px 12px; border: 0; border-radius: 8px; background: var(--background); font-size: 1.4rem; cursor: pointer; }
.terms-dialog pre { height: calc(100% - 77px); margin: 0; padding: 22px; overflow: auto; font: inherit; line-height: 1.7; white-space: pre-wrap; }

.dashboard-page {
  overflow-x: hidden;
  background: var(--background);
}

.dashboard-shell {
  display: grid;
  min-height: 100vh;
  grid-template-areas:
    "topbar topbar"
    "sidebar main";
  grid-template-columns: var(--sidebar-width) 1fr;
  grid-template-rows: var(--topbar-height) 1fr;
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: var(--white);
  grid-area: topbar;
}

.wordmark {
  color: var(--navy);
  font-size: 1.55rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.organization-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.organization-profile span:last-child {
  display: grid;
  gap: 2px;
}

.organization-profile small {
  color: var(--muted);
}

.profile-mark {
  display: grid;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: var(--white);
  background: var(--primary);
  font-weight: 800;
  place-items: center;
}

.sidebar {
  position: sticky;
  top: var(--topbar-height);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: calc(100vh - var(--topbar-height));
  padding: 24px 14px;
  border-right: 1px solid var(--line);
  background: var(--white);
  grid-area: sidebar;
}

.sidebar nav {
  display: grid;
  gap: 7px;
}

.nav-item {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  gap: 12px;
  border: 0;
  border-radius: 10px;
  color: #577080;
  background: transparent;
  font-weight: 750;
  cursor: pointer;
  text-align: left;
}

.nav-item span {
  width: 22px;
  color: #78909c;
  font-size: 1.15rem;
  text-align: center;
}

.nav-item:hover,
.nav-item.active {
  color: var(--primary-dark);
  background: #eaf8f5;
}

.nav-item.active span {
  color: var(--primary);
}

.logout {
  color: var(--danger);
}

.main-content {
  min-width: 0;
  padding: 34px;
  grid-area: main;
}

.content-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 26px;
  gap: 20px;
}

.heading-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.content-heading h1 {
  margin: 0;
  color: var(--navy);
  font-size: 1.75rem;
  letter-spacing: -0.04em;
}

.heading-title-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
}

.heading-summary {
  color: var(--primary-dark);
  font-size: 0.92rem;
  font-weight: 800;
}

.heading-summary i {
  margin: 0 5px;
  color: #bcc9cd;
  font-style: normal;
}

.content-heading p {
  margin: 8px 0 0;
  color: var(--muted);
}

.compact-button {
  display: inline-grid;
  min-height: 42px;
  padding: 0 17px;
  border: 0;
  border-radius: 9px;
  color: var(--white);
  background: var(--primary);
  font-weight: 800;
  cursor: pointer;
  place-items: center;
}

.metric-grid {
  display: grid;
  margin-bottom: 24px;
  gap: 18px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-card,
.content-card {
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--white);
}

.metric-card {
  padding: 22px;
}

.metric-card p,
.metric-card strong {
  margin: 0;
}

.metric-card p {
  color: var(--muted);
  font-size: 0.9rem;
}

.metric-card strong {
  display: block;
  margin-top: 10px;
  color: var(--navy);
  font-size: 1.9rem;
}

.metric-card small {
  color: var(--primary-dark);
}

.dashboard-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
}

.content-card {
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

.card-header h2 {
  margin: 0;
  font-size: 1.04rem;
}

.education-count-card .card-header > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 16px;
}

.education-count-card .card-header strong {
  color: var(--primary-dark);
  font-size: 1.15rem;
}

.yearly-education-summary {
  display: grid;
  margin: 0;
  padding: 18px 22px;
  list-style: none;
  gap: 0;
}

.yearly-education-summary li {
  display: grid;
  align-items: center;
  padding: 16px 4px;
  border-bottom: 1px solid var(--line);
  gap: 16px;
  grid-template-columns: minmax(90px, 0.6fr) repeat(2, minmax(140px, 1fr)) minmax(80px, auto);
}

.yearly-education-summary li:last-child {
  border-bottom: 0;
}

.yearly-education-summary span {
  color: var(--muted);
}

.yearly-education-summary b {
  color: var(--primary-dark);
  text-align: right;
}

.card-header button {
  border: 0;
  color: var(--primary-dark);
  background: transparent;
  font-weight: 750;
  cursor: pointer;
}

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

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

th,
td {
  padding: 15px 18px;
  border-bottom: 1px solid #edf2f3;
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  background: #fbfcfc;
  font-size: 0.82rem;
}

td {
  color: #365369;
  font-size: 0.92rem;
}

tbody tr[data-worker-id] {
  cursor: pointer;
}

tbody tr[data-worker-id]:hover,
tbody tr[data-education-id]:hover {
  background: #f3fbf9;
}

tbody tr[data-education-id] {
  cursor: pointer;
}

.sort-button {
  padding: 4px 0;
  border: 0;
  color: inherit;
  background: transparent;
  font-size: inherit;
  font-weight: 800;
  cursor: pointer;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.status-complete,
.status-active {
  color: #087c66;
  background: #ddf6ee;
}

.status-pending,
.status-review {
  color: #a35b12;
  background: #fff0dc;
}

.status-overdue {
  color: #b53543;
  background: #fde8eb;
}

.progress-list,
.notice-list {
  display: grid;
  margin: 0;
  padding: 20px 22px;
  list-style: none;
  gap: 20px;
}

.progress-row {
  display: grid;
  gap: 8px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #365369;
  font-size: 0.9rem;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #eaf0f2;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

.notice-list li {
  display: grid;
  gap: 5px;
}

.notice-list strong {
  color: #365369;
  font-size: 0.92rem;
}

.notice-list time {
  color: var(--muted);
  font-size: 0.8rem;
}

.toolbar {
  display: flex;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  gap: 10px;
}

.toolbar input,
.toolbar select {
  width: auto;
  min-height: 42px;
}

.toolbar input {
  min-width: 250px;
}

.worker-toolbar {
  align-items: end;
  flex-wrap: wrap;
}

.worker-toolbar label {
  display: flex;
  align-items: center;
  min-width: 130px;
  gap: 8px;
  white-space: nowrap;
}

.worker-toolbar select {
  min-width: 130px;
}

.worker-register-button {
  margin-left: auto;
}

.row-action {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #365369;
  background: var(--white);
  font-weight: 750;
  cursor: pointer;
}

.danger-action,
.danger-button {
  color: var(--danger);
}

.danger-button {
  border: 1px solid #f0c4ca;
  background: #fff5f6;
}

.panel-form {
  display: grid;
  padding: 24px 0;
  gap: 18px;
}

.panel-form label,
.worker-search-result {
  display: grid;
  gap: 8px;
}

.panel-form input {
  width: 100%;
  min-height: 46px;
}

.panel-form select,
.panel-form textarea {
  width: 100%;
}

.panel-form textarea {
  min-height: 100px;
  resize: vertical;
}

.panel-form .compact-button {
  justify-self: start;
}

.target-checklist {
  display: grid;
  max-height: 260px;
  padding: 14px;
  gap: 10px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.target-checklist label,
.assignment-worker-check {
  display: flex;
  align-items: center;
  gap: 9px;
}

.panel-form .target-checklist input,
.assignment-worker-check input {
  width: 18px;
  min-height: 18px;
}

.assignment-worker-check span {
  display: grid;
}

.assignment-filter-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.education-period-warning,
.education-completion-notice {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 18px 0;
  padding: 14px 16px;
  gap: 12px;
  border-radius: 12px;
}

.eligibility-notice {
  padding: 13px 15px;
  border-radius: 10px;
  color: #6b5200;
  background: #fff8dc;
}

.eligibility-summary {
  display: grid;
  margin: 18px 0;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
}

.eligibility-summary span {
  display: grid;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--white);
}

.eligibility-summary strong {
  color: var(--navy);
  font-size: 1.35rem;
}

.eligibility-status {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 999px;
  font-weight: 800;
  white-space: nowrap;
}

.eligibility-target { color: #12685d; background: #eaf8f5; }
.eligibility-not_target { color: #52606a; background: #edf1f3; }
.eligibility-exempt { color: #52606a; background: #edf1f3; }
.eligibility-review_required { color: #8a4b08; background: #fff4df; }
.eligibility-completed { color: #2459a6; background: #eaf1ff; }

.registration-targets {
  min-width: 0;
  margin: 4px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.registration-targets legend {
  padding: 0 6px;
  color: var(--navy);
  font-weight: 800;
}

.panel-form .registration-targets input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
}

.education-period-warning {
  color: #8a4b08;
  background: #fff4df;
}

.education-completion-notice {
  color: #12685d;
  background: #eaf8f5;
}

.panel-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.worker-search-result {
  margin-top: 6px;
  padding: 20px;
  border: 1px solid #b8e6de;
  border-radius: 12px;
  background: #f3fbf9;
}

.worker-search-result > span {
  color: var(--muted);
}

.connection-warning {
  margin: 0;
  padding: 13px 14px;
  border: 1px solid #f2d39e;
  border-radius: 9px;
  color: #8a5313;
  background: #fff8e9;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.55;
}

.registration-state-message {
  margin: 4px 0 0;
  padding: 13px 14px;
  border: 1px solid #f0c4ca;
  border-radius: 9px;
  color: var(--danger);
  background: #fff5f6;
  font-weight: 800;
}

.worker-search-result .definition-list {
  padding: 8px 0;
  grid-template-columns: 90px 1fr;
}

.education-toolbar {
  align-items: end;
  flex-wrap: wrap;
}

.certificate-toolbar {
  flex-direction: column;
  align-items: stretch;
}

.certificate-filter-row {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
}

.certificate-toolbar label {
  display: flex;
  align-items: center;
  min-width: 145px;
  gap: 8px;
  white-space: nowrap;
}

.certificate-toolbar input,
.certificate-toolbar select {
  min-width: 145px;
}

#certificate-education-title {
  width: min(360px, 60vw);
}

.heading-expand {
  flex: 0 0 auto;
  white-space: nowrap;
}

.education-toolbar label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.education-toolbar select {
  min-width: 118px;
}

.segmented {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.segmented button {
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-right: 1px solid var(--line);
  background: var(--white);
  cursor: pointer;
}

.segmented button:last-child {
  border-right: 0;
}

.segmented button.active {
  color: var(--white);
  background: var(--primary);
}

.inline-check {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  gap: 8px;
  white-space: nowrap;
}

.inline-check input {
  width: 20px;
  min-width: 20px;
  min-height: 20px;
  accent-color: var(--primary);
}

.toolbar .inline-check {
  min-width: auto;
  gap: 7px;
}

.toolbar .inline-check input {
  flex: 0 0 20px;
  width: 20px;
  min-width: 20px;
  margin: 0;
}

.definition-list {
  display: grid;
  margin: 0;
  padding: 24px;
  gap: 18px;
  grid-template-columns: 150px 1fr;
}

.definition-list dt {
  color: var(--muted);
  font-weight: 700;
}

.definition-list dd {
  margin: 0;
  color: #365369;
  font-weight: 650;
}

.icon-button {
  display: grid;
  border: 0;
  background: transparent;
  cursor: pointer;
  place-items: center;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  font-size: 1.35rem;
}

.detail-panel {
  position: fixed;
  z-index: 50;
  top: 0;
  right: 0;
  width: min(440px, 100%);
  height: 100vh;
  overflow-y: auto;
  padding: 32px;
  background: var(--white);
  box-shadow: -20px 0 60px rgba(24, 59, 86, 0.16);
  transform: translateX(105%);
  transition: transform 180ms ease;
}

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

.detail-panel.education-detail-panel {
  width: min(720px, calc(100% - var(--sidebar-width)));
  min-width: 440px;
  max-width: calc(100% - 24px);
  resize: horizontal;
  direction: rtl;
}

.detail-panel.education-detail-panel > * {
  direction: ltr;
}

.panel-close {
  width: 42px;
  height: 42px;
  margin-left: auto;
  border-radius: 50%;
  color: var(--muted);
  background: var(--background);
  font-size: 1.6rem;
}

.panel-profile {
  padding: 18px 0 26px;
  border-bottom: 1px solid var(--line);
}

.panel-profile h2 {
  margin: 0 0 7px;
}

.panel-profile p {
  margin: 0;
  color: var(--muted);
}

.panel-section {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.panel-section h3 {
  margin: 0 0 16px;
  font-size: 1rem;
}

.education-information {
  display: grid;
  margin: 0;
  gap: 10px 16px;
  grid-template-columns: 90px 1fr;
}

.education-information dt {
  color: var(--muted);
  font-weight: 700;
}

.education-information dd {
  min-width: 0;
  margin: 0;
  color: #365369;
  line-height: 1.6;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.education-information a {
  color: var(--primary-dark);
  font-weight: 700;
}

.education-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}

.education-summary button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  cursor: pointer;
}

.education-summary button.active {
  border-color: var(--primary);
  color: var(--primary-dark);
  background: #eaf8f5;
}

.panel-list ul {
  display: grid;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.panel-list li {
  display: grid;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  gap: 5px;
}

.panel-list li span,
.muted-cell,
.panel-toolbar span {
  color: var(--muted);
  font-size: 0.84rem;
}

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

.panel-table-scroll {
  max-height: calc(100vh - 270px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.panel-table-scroll thead {
  position: sticky;
  z-index: 1;
  top: 0;
}

.panel-table-scroll td small,
.certificate-worker-row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.unassigned-row {
  opacity: 0.38;
}

.assignment-icon {
  display: inline-grid;
  width: 25px;
  height: 25px;
  margin-right: 8px;
  border-radius: 50%;
  font-weight: 900;
  place-items: center;
}

.assignment-completed { color: #087c66; background: #ddf6ee; }
.assignment-pending { color: #a35b12; background: #fff0dc; }
.assignment-overdue { color: #b53543; background: #fde8eb; }
.assignment-unassigned { color: var(--muted); background: #edf2f3; }

.certificate-worker-row td {
  border-top: 2px solid var(--line);
  background: #f5faf9;
}

.certificate-worker-toggle {
  display: grid;
  align-items: center;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  grid-template-columns: 22px auto 1fr;
}

.certificate-worker-toggle strong,
.certificate-worker-toggle small {
  grid-column: 2;
}

.certificate-worker-toggle > span {
  grid-row: 1 / span 2;
}

.certificate-worker-toggle b {
  grid-column: 3;
  grid-row: 1 / span 2;
  color: var(--primary-dark);
  text-align: right;
}

.heading-download {
  flex: 0 0 auto;
}

.certificate-detail-row td {
  background: var(--white);
}

.download-button {
  min-height: 36px;
  padding: 0 13px;
  border: 0;
  border-radius: 8px;
  color: var(--white);
  background: var(--primary);
  font-weight: 750;
  cursor: pointer;
}

.download-button:disabled {
  color: #82929c;
  background: #e7edef;
  cursor: not-allowed;
}

.backdrop {
  position: fixed;
  z-index: 40;
  inset: 0;
  background: rgba(14, 34, 48, 0.38);
}

@media (max-width: 980px) {
  .metric-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 760px) {
  .auth-shell {
    display: block;
    width: min(100%, 520px);
    min-height: 100vh;
    margin: 0 auto;
    border-radius: 0;
  }

  .auth-brand {
    display: none;
  }

  .auth-card {
    min-height: 100vh;
    padding: 38px 24px;
  }

  .mobile-brand {
    display: block;
    margin-bottom: 60px;
    color: var(--navy);
    font-size: 1.5rem;
    font-weight: 900;
    text-decoration: none;
  }

  .two-column {
    grid-template-columns: 1fr;
  }

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

  .signup-card {
    padding: 24px 20px;
  }

  .dashboard-shell {
    display: block;
    padding-top: var(--topbar-height);
  }

  .topbar {
    position: fixed;
    right: 0;
    left: 0;
    height: var(--topbar-height);
    padding: 0 14px;
  }

  .menu-toggle {
    display: grid;
  }

  .organization-profile strong {
    display: none;
  }

  .sidebar {
    position: fixed;
    z-index: 45;
    top: var(--topbar-height);
    left: 0;
    width: var(--sidebar-width);
    transform: translateX(-105%);
    transition: transform 180ms ease;
  }

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

  .main-content {
    padding: 24px 16px 50px;
  }

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

  .yearly-education-summary li {
    align-items: start;
    gap: 7px;
    grid-template-columns: 1fr 1fr;
  }

  .yearly-education-summary li strong,
  .yearly-education-summary li b {
    text-align: left;
  }

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

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

  .toolbar input,
  .toolbar select {
    width: 100%;
    min-width: 0;
  }

  .worker-register-button {
    width: 100%;
    margin-left: 0;
  }

  .segmented {
    width: 100%;
  }

  .segmented button {
    flex: 1;
    padding: 0 8px;
  }

  .detail-panel.education-detail-panel {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    resize: none;
  }
}

@media (max-width: 440px) {
  .terms-consent { padding-right: 0; padding-left: 0; }
  .term-title-button { font-size: 0.78rem; }

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

  .inline-field {
    align-items: stretch;
    flex-direction: column;
  }

  .definition-list {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .definition-list dd {
    margin-bottom: 12px;
  }
}
