:root {
  --portal-bg: #f4fcfe;
  --portal-card: #fff;
  --portal-ink: #123b46;
  --portal-muted: #587680;
  --portal-line: #dcecef;
  --portal-cyan: #22bcd6;
  --portal-cyan-dark: #08798c;
  --portal-navy: #0d3f49;
  --portal-coral: #c64838;
  --portal-green: #26ad68;
  --portal-yellow: #fff7d9;
  --portal-shadow: 0 12px 34px rgba(31, 100, 113, 0.09);
  --portal-space-1: 0.5rem;
  --portal-space-2: 0.75rem;
  --portal-space-3: 1rem;
  --portal-space-4: 1.25rem;
  --portal-space-5: 1.5rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  display: flex;
  min-height: 100vh;
  margin: 0;
  flex-direction: column;
  color: var(--portal-ink);
  background:
    radial-gradient(circle at 8% 0%, rgba(199, 240, 248, 0.72), transparent 28rem),
    linear-gradient(180deg, var(--portal-bg), #fff 38rem);
  font-family: -apple-system, BlinkMacSystemFont, "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

a { color: inherit; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.portal-skip {
  position: fixed;
  z-index: 1000;
  left: 1rem;
  top: -5rem;
  padding: 0.65rem 0.9rem;
  color: #fff;
  background: var(--portal-navy);
  border-radius: 0 0 8px 8px;
}
.portal-skip:focus { top: 0; }

.portal-utility {
  margin: 0;
  padding: 0.35rem max(20px, calc((100% - 1180px) / 2));
  color: #65828a;
  background: #fff;
  border-bottom: 1px solid #eef5f6;
  font-size: 0.75rem;
}

.portal-header {
  position: sticky;
  z-index: 70;
  top: 0;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--portal-line);
  backdrop-filter: blur(16px);
}

.portal-header-inner {
  display: flex;
  width: min(1180px, calc(100% - 40px));
  min-height: 72px;
  margin: 0 auto;
  gap: 1rem;
  align-items: center;
}

.portal-brand {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  color: var(--portal-ink);
  font-size: 1.25rem;
  font-weight: 900;
  text-decoration: none;
}

.portal-brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #08798c, #065f70);
  border-radius: 50%;
  box-shadow: 0 5px 15px rgba(10, 139, 160, 0.25);
}

.portal-header-note {
  margin: 0;
  color: var(--portal-muted);
  font-size: 0.8125rem;
  font-weight: 700;
}

.portal-nav {
  display: flex;
  margin-left: auto;
  gap: 0.45rem;
  align-items: center;
}

.portal-nav a {
  padding: 0.55rem 0.72rem;
  color: #365962;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 800;
  text-decoration: none;
}
.portal-nav a:hover { color: var(--portal-cyan-dark); border-color: #bde6ed; }
.portal-nav .portal-nav-strong { color: #fff; background: var(--portal-navy); }

.portal-menu {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  padding: 0;
  color: var(--portal-navy);
  background: #fff;
  border: 1px solid var(--portal-line);
  border-radius: 10px;
  font-size: 1.2rem;
}

.portal-main {
  flex: 1 0 auto;
  width: min(1180px, calc(100% - 40px));
  min-height: 60vh;
  margin: 0 auto;
  padding: 1.25rem 0 4.5rem;
}

.portal-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1rem;
  color: var(--portal-muted);
  font-size: 0.8125rem;
}
.portal-breadcrumb a { color: var(--portal-cyan-dark); }
.portal-breadcrumb span::before { margin-right: 0.4rem; content: "/"; color: #9bb4ba; }

.portal-title {
  margin-bottom: 1.2rem;
  padding: 1.45rem 1.6rem;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #fff, #edfbfe);
  border: 1px solid #d9edf1;
  border-radius: 18px;
  box-shadow: var(--portal-shadow);
}
.portal-title::after {
  position: absolute;
  width: 180px;
  height: 180px;
  top: -105px;
  right: -42px;
  background: rgba(34, 188, 214, 0.12);
  border-radius: 50%;
  content: "";
}
.portal-title small { color: var(--portal-cyan-dark); font-weight: 900; letter-spacing: 0.12em; }
.portal-title h1 { margin: 0.25rem 0 0; font-size: clamp(1.45rem, 3vw, 2.1rem); line-height: 1.35; }
.portal-title p { margin: 0.45rem 0 0; color: var(--portal-muted); font-size: 0.84rem; line-height: 1.7; }

.portal-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.2rem; align-items: start; }
.portal-grid-wide { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.portal-stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; min-width: 0; }

.portal-card {
  min-width: 0;
  padding: 1.35rem 1.5rem;
  background: var(--portal-card);
  border: 1px solid var(--portal-line);
  border-radius: 16px;
  box-shadow: var(--portal-shadow);
}
.portal-card h2 { margin: 0 0 0.95rem; font-size: 1.08rem; }
.portal-card h3 { margin: 1rem 0 0.55rem; font-size: 0.93rem; }
.portal-card p { color: #43646d; font-size: 0.875rem; line-height: 1.85; }

.portal-section-title { display: flex; gap: 0.55rem; align-items: center; }
.portal-section-title::before { width: 5px; height: 1.25rem; background: linear-gradient(var(--portal-cyan), var(--portal-cyan-dark)); border-radius: 999px; content: ""; }

.portal-notice {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  color: #775c00;
  background: var(--portal-yellow);
  border: 1px solid #f0dda0;
  border-radius: 10px;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.65;
}
.portal-notice.info { color: #246171; background: #eafbfe; border-color: #bee8ef; }
.portal-notice.danger { color: #9a4437; background: #fff3ef; border-color: #ffd2ca; }

.progress-steps { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0 0 1rem; padding: 0; list-style: none; }
.progress-steps li { padding: 0.75rem 0.55rem; color: #526b72; background: #edf6f7; border-right: 2px solid #fff; font-size: 0.75rem; font-weight: 800; text-align: center; }
.progress-steps li:first-child { border-radius: 9px 0 0 9px; }
.progress-steps li:last-child { border-radius: 0 9px 9px 0; border-right: 0; }
.progress-steps li.active { color: #fff; background: var(--portal-cyan-dark); }

.portal-form { display: grid; gap: 0; }
.form-row { display: grid; grid-template-columns: 230px minmax(0, 1fr); border-top: 1px solid var(--portal-line); }
.form-row:is(fieldset) { min-width: 0; margin: 0; padding: 0; border-right: 0; border-bottom: 0; border-left: 0; }
.form-row:last-child { border-bottom: 1px solid var(--portal-line); }
.form-label { display: flex; padding: 1rem; align-items: center; color: #365962; background: #f5fbfc; font-size: 0.875rem; font-weight: 800; white-space: nowrap; }
.form-row > legend.form-label { width: auto; max-width: none; }
.form-label .required { flex: 0 0 auto; margin-left: 0.45rem; padding: 0.2rem 0.4rem; color: #fff; background: var(--portal-coral); border-radius: 4px; font-size: 0.75rem; line-height: 1; white-space: nowrap; }
.form-control { min-width: 0; padding: 0.9rem 1rem; }
.form-control input:not([type="radio"]):not([type="checkbox"]), .form-control select, .form-control textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.65rem 0.75rem;
  color: var(--portal-ink);
  background: #fff;
  border: 1px solid #cadfe3;
  border-radius: 8px;
  outline: none;
}
.form-control textarea { min-height: 120px; resize: vertical; }
.form-control input:focus, .form-control select:focus, .form-control textarea:focus { border-color: var(--portal-cyan); box-shadow: 0 0 0 3px rgba(34,188,214,.15); }
.form-help { display: block; margin-top: 0.45rem; color: #526b72; font-size: 0.75rem; line-height: 1.65; }
.choice-row { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; min-height: 44px; }
.choice-row label { display: inline-flex; min-height: 36px; gap: 0.45rem; align-items: center; color: #43646d; font-size: 0.875rem; }
.choice-row input { width: 18px; height: 18px; accent-color: var(--portal-cyan); }
.choice-row select { min-height: 44px; padding: 0.6rem 0.75rem; color: var(--portal-ink); background: #fff; border: 1px solid #cadfe3; border-radius: 8px; }

.portal-actions { display: flex; justify-content: center; gap: 0.7rem; margin-top: 1.2rem; }
.portal-button {
  display: inline-flex;
  min-height: 46px;
  padding: 0.65rem 1.2rem;
  justify-content: center;
  align-items: center;
  color: #fff;
  background: linear-gradient(135deg, #08798c, #065f70);
  border: 0;
  border-radius: 10px;
  box-shadow: 0 7px 16px rgba(10,139,160,.18);
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}
.portal-button.sub { color: #365962; background: #fff; border: 1px solid #cadfe3; box-shadow: none; }
.portal-button.green { background: var(--portal-green); }
.portal-button.coral { background: var(--portal-coral); }
.portal-button:focus-visible { outline: 3px solid rgba(34,188,214,.25); outline-offset: 2px; }

.review-list { margin: 0; border-top: 1px solid var(--portal-line); }
.review-list div { display: grid; grid-template-columns: 160px 1fr; border-bottom: 1px solid var(--portal-line); }
.review-list dt, .review-list dd { padding: 0.9rem; font-size: 0.875rem; }
.review-list dt { color: #365962; background: #f5fbfc; font-weight: 800; }
.review-list dd { margin: 0; color: #43646d; }

.job-mini {
  display: block;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--portal-line);
  border-radius: 16px;
  box-shadow: var(--portal-shadow);
}
.job-mini-image { display: block; aspect-ratio: 3 / 1; overflow: hidden; background: #eef9fb; }
.job-mini-image img { display: block; width: 100%; height: 100%; object-fit: contain; }
.job-mini-body { padding: 1.15rem 1.25rem 1.25rem; }
.job-mini h3 { margin: 0.35rem 0; font-size: 1.15rem; }
.job-mini h3 a { color: inherit; text-decoration: none; }
.job-mini p { margin: 0.45rem 0; color: var(--portal-muted); font-size: 0.8125rem; }
.job-mini .job-mini-intro { display: -webkit-box; overflow: hidden; color: #43646d; line-height: 1.75; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.job-mini .job-mini-pay { margin-top: 0.8rem; padding: 0.7rem 0.8rem; background: #effbfd; border: 1px solid #d5edf1; border-radius: 9px; }
.job-mini .job-mini-pay strong { color: var(--portal-cyan-dark); font-size: 1rem; }
.job-mini-facts { margin: 0.75rem 0; border-top: 1px solid var(--portal-line); }
.job-mini-facts div { display: grid; grid-template-columns: 110px minmax(0, 1fr); border-bottom: 1px solid var(--portal-line); }
.job-mini-facts dt, .job-mini-facts dd { padding: 0.65rem 0.7rem; font-size: 0.8rem; line-height: 1.65; }
.job-mini-facts dt { color: #365962; background: #f5fbfc; font-weight: 800; }
.job-mini-facts dd { margin: 0; color: #43646d; white-space: pre-line; }
.job-mini-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.75rem 0; }
.job-mini-tags span { padding: 0.25rem 0.48rem; color: var(--portal-cyan-dark); background: #e8f9fb; border-radius: 5px; font-size: 0.75rem; font-weight: 700; }
.job-mini-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.55rem; }
.job-mini-actions label { display: inline-flex; min-height: 40px; gap: 0.4rem; align-items: center; color: #365962; font-size: 0.8125rem; font-weight: 800; }
.job-mini-actions a, .job-mini-actions button { display: inline-flex; min-height: 40px; padding: 0.5rem 0.75rem; align-items: center; color: #365962; background: #fff; border: 1px solid #cadfe3; border-radius: 7px; font-size: 0.8125rem; font-weight: 800; text-decoration: none; cursor: pointer; }
.job-mini-actions .job-mini-apply { margin-left: auto; color: #fff; background: var(--portal-cyan-dark); border-color: var(--portal-cyan-dark); }
.job-mini-status { display: flex; justify-content: space-between; gap: .6rem; align-items: center; }
.job-mini-status strong { color: #168447; font-size: .75rem; }
.job-mini-actions .job-mini-line { color: #fff; background: #168447; border-color: #168447; }

.single-column-list,
.application-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

.bulk-toolbar {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.bulk-toolbar h2,
.bulk-toolbar p {
  margin: 0;
}

.bulk-toolbar p {
  margin-top: 0.25rem;
}

.bulk-toolbar .portal-button {
  flex: 0 0 auto;
}

.application-job {
  margin-bottom: 1rem;
}

.optional-fields {
  margin-top: 0.9rem;
  overflow: hidden;
  border: 1px solid var(--portal-line);
  border-radius: 10px;
}

.optional-fields summary {
  padding: 0.85rem 1rem;
  color: var(--portal-cyan-dark);
  background: #f2fbfd;
  font-size: 0.875rem;
  font-weight: 900;
  cursor: pointer;
}

.optional-fields .form-row:first-of-type {
  border-top: 1px solid var(--portal-line);
}

.side-card { position: sticky; top: 88px; }
.side-card nav { display: grid; }
.side-card a { padding: 0.8rem 0.75rem; color: #496a72; border-bottom: 1px solid #e9f1f3; font-size: 0.8125rem; font-weight: 700; text-decoration: none; }
.side-card a.active { color: var(--portal-cyan-dark); background: #eafbfe; }
.side-card a.portal-button { color: #fff; }
.side-card a.portal-button.sub { color: #365962; }

.message-list { display: grid; gap: 0.8rem; }
.message { max-width: 78%; padding: 0.9rem 1rem; color: #365962; background: #eef8fa; border-radius: 12px 12px 12px 2px; font-size: 0.875rem; line-height: 1.7; }
.message.mine { margin-left: auto; color: #fff; background: var(--portal-cyan-dark); border-radius: 12px 12px 2px 12px; }
.message time { display: block; margin-top: 0.4rem; font-size: 0.75rem; opacity: 0.78; }

.dashboard-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.8rem; }
.metric-card { padding: 1rem; background: #fff; border: 1px solid var(--portal-line); border-radius: 13px; box-shadow: var(--portal-shadow); }
.metric-card span { color: var(--portal-muted); font-size: 0.8125rem; font-weight: 700; }
.metric-card strong { display: block; margin-top: 0.35rem; color: var(--portal-cyan-dark); font-size: 1.5rem; }
.admin-shell { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 1rem; align-items: start; }
.admin-side { position: sticky; top: 88px; overflow: hidden; padding: 0; background: var(--portal-navy); border-radius: 15px; box-shadow: var(--portal-shadow); }
.admin-shop { padding: 1.1rem; color: #fff; border-bottom: 1px solid rgba(255,255,255,.12); }
.admin-shop small { display: block; margin-bottom: 0.25rem; opacity: .65; }
.admin-side nav { display: grid; padding: 0.5rem; }
.admin-side a { padding: 0.8rem 0.85rem; color: rgba(255,255,255,.82); border-radius: 8px; font-size: 0.8125rem; font-weight: 700; text-decoration: none; }
.admin-side a:hover, .admin-side a.active { color: #fff; background: rgba(34,188,214,.23); }
.admin-content { min-width: 0; }

.data-table { width: 100%; max-width: 100%; min-width: 0; border-collapse: collapse; }
.data-table th, .data-table td { padding: 0.85rem 0.75rem; border-bottom: 1px solid var(--portal-line); font-size: 0.8125rem; text-align: left; vertical-align: middle; }
.data-table th { color: #587680; background: #f4fafb; font-weight: 800; }
.data-table a { color: var(--portal-cyan-dark); font-weight: 800; }
body[data-page="management-registrations"] .admin-content .portal-card { overflow-x: auto; }
body[data-page="management-registrations"] .data-table :is(th, td):not(:nth-child(4)) { white-space: nowrap; }
.badge { display: inline-block; padding: 0.3rem 0.55rem; border-radius: 999px; font-size: 0.75rem; font-weight: 900; line-height: 1.2; }
.badge.cyan { color: #08798c; background: #e2f8fb; }
.badge.green { color: #167946; background: #e6f8ee; }
.badge.orange { color: #8b5b00; background: #fff3cf; }
.badge.gray { color: #637980; background: #edf3f4; }
.badge.red { color: #a33942; background: #ffe9eb; }

.management-side { background: linear-gradient(180deg, #14253f 0%, #0b1729 100%); }
.management-shell p, .management-shell li, .management-shell label, .management-shell button, .management-shell a, .management-shell td, .management-shell th { font-size: max(.82rem, 14px); }
.management-shell small { font-size: max(.75rem, 12px); }
.management-side a:hover, .management-side a.active { background: rgba(91, 196, 216, .2); }
.management-account { padding: .85rem 1rem 1rem; color: rgba(255,255,255,.72); border-top: 1px solid rgba(255,255,255,.1); font-size: .75rem; font-weight: 700; }
.status-dot { display: inline-block; width: 8px; height: 8px; margin-right: .4rem; background: #43d38a; border-radius: 50%; }
.management-metrics .metric-card { border-top: 3px solid var(--portal-cyan); }
.management-metrics .metric-card.warning { border-top-color: #f0b33e; }
.management-metrics .metric-card.danger { border-top-color: #ef6b75; }
.metric-card small { display: block; margin-top: .3rem; color: var(--portal-muted); font-size: .75rem; }
.management-section-head { display: flex; margin-bottom: .8rem; gap: 1rem; align-items: center; justify-content: space-between; }
.management-section-head .portal-section-title { margin: 0; }
.management-section-head a, .management-section-head button { min-height: 40px; padding: .45rem .65rem; color: var(--portal-cyan-dark); background: #eef9fb; border: 1px solid #c7e9ee; border-radius: 8px; font-size: .8125rem; font-weight: 800; text-decoration: none; cursor: pointer; }
.review-list.compact div { grid-template-columns: 1fr auto; }
.management-toolbar { display: grid; grid-template-columns: minmax(220px,2fr) repeat(2,minmax(130px,1fr)) auto; gap: .75rem; align-items: end; }
.management-toolbar label { display: grid; gap: .4rem; color: var(--portal-muted); font-size: .8125rem; font-weight: 800; }
.management-toolbar input, .management-toolbar select { width: 100%; padding: .68rem .72rem; background: #fff; border: 1px solid #b8d3d9; border-radius: 8px; font: inherit; }
.data-table button { min-height: 36px; padding: .45rem .65rem; color: var(--portal-cyan-dark); background: #eef9fb; border: 1px solid #b9e4eb; border-radius: 7px; font-size: .75rem; font-weight: 800; cursor: pointer; }
.management-summary { display: flex; padding: 1rem; gap: 1rem; align-items: center; justify-content: space-between; color: #fff; background: linear-gradient(135deg,#15324c,#0a7385); border-radius: 15px; box-shadow: var(--portal-shadow); }
.management-summary > div { display: flex; gap: .85rem; align-items: center; }
.management-summary img { width: 72px; height: 72px; object-fit: cover; background: #fff; border-radius: 13px; }
.management-summary h2, .management-summary p { margin: .15rem 0; }
.management-summary small { opacity: .7; }
.completion-ring { display: grid; width: 125px; height: 125px; margin: .4rem auto 1.2rem; place-items: center; align-content: center; color: var(--portal-cyan-dark); background: radial-gradient(circle at center,#fff 54%,transparent 55%), conic-gradient(var(--portal-cyan) 0 96%,#e5eef0 96%); border-radius: 50%; }
.completion-ring strong { font-size: 1.55rem; }
.completion-ring span { color: var(--portal-muted); font-size: .75rem; }
.review-queue { display: grid; gap: .75rem; }
.review-queue article { display: grid; grid-template-columns: minmax(0,1fr) 100px auto; padding: 1rem; gap: 1rem; align-items: center; border: 1px solid var(--portal-line); border-radius: 12px; }
.review-queue h2 { margin: .35rem 0 .15rem; font-size: .95rem; }
.review-queue p, .review-queue small { margin: 0; color: var(--portal-muted); font-size: .8125rem; }
.review-score { display: grid; place-items: center; color: var(--portal-cyan-dark); }
.review-score strong { font-size: 1.6rem; }
.review-score small { color: var(--portal-muted); font-size: .75rem; }
.review-score.large { width: 110px; height: 110px; margin: 0 auto 1rem; background: #eef9fb; border: 8px solid #a9e4ed; border-radius: 50%; align-content: center; }
.change-list { display: grid; gap: .8rem; }
.change-list div { display: grid; grid-template-columns: 110px 1fr 1fr; gap: .7rem; align-items: start; }
.change-list span { font-weight: 800; }
.change-list del, .change-list ins { padding: .8rem; border-radius: 8px; font-size: .8125rem; line-height: 1.65; text-decoration: none; }
.change-list del { color: #8f5960; background: #fff1f2; }
.change-list ins { color: #1e7050; background: #ecfaf2; }
.check-result { display: grid; padding: 0; gap: .45rem; list-style: none; }
.check-result li { padding: .7rem .75rem; color: #526f77; background: #f4fafb; border-radius: 8px; font-size: .8125rem; }
.check-result li::before { margin-right: .45rem; content: "•"; }
.check-result li.ok::before { color: #22a866; content: "✓"; }
.check-result li.attention::before { color: #d89116; content: "!"; }
.plan-admin-card { padding: 1.2rem; color: #fff; border-radius: 15px; box-shadow: var(--portal-shadow); }
.plan-admin-card.platinum { background: linear-gradient(135deg,#0a8ba0,#22bcd6); }
.plan-admin-card.free { color: #365962; background: #fff; border: 1px solid var(--portal-line); }
.plan-admin-card h2 { margin: .25rem 0; }
.plan-admin-card > strong { display: block; font-size: 1.7rem; }
.plan-admin-card p { opacity: .8; }
.plan-admin-card dl { display: grid; margin: 1rem 0 0; gap: .4rem; }
.plan-admin-card dl div { display: flex; padding-top: .4rem; border-top: 1px solid rgba(255,255,255,.2); justify-content: space-between; }
.plan-admin-card.free dl div { border-color: var(--portal-line); }
.mail-template-list { display: grid; gap: .45rem; }
.mail-template-list button { display: grid; grid-template-columns: 36px minmax(0,1fr) auto; padding: .7rem; gap: .65rem; align-items: center; color: #365962; background: #f7fbfc; border: 1px solid var(--portal-line); border-radius: 9px; text-align: left; cursor: pointer; }
.mail-template-list button span { display: grid; width: 32px; height: 32px; place-items: center; color: #fff; background: var(--portal-cyan-dark); border-radius: 8px; font-size: .75rem; font-weight: 900; }
.mail-template-list button small { color: #238052; font-weight: 800; }

.tabs { display: flex; gap: 0.35rem; margin-bottom: 1rem; overflow-x: auto; }
.tabs button { flex: 0 0 auto; min-height: 40px; padding: 0.6rem 0.85rem; color: #587680; background: #fff; border: 1px solid var(--portal-line); border-radius: 8px; font-size: 0.8125rem; font-weight: 800; cursor: pointer; }
.tabs button.active { color: #fff; background: var(--portal-cyan-dark); border-color: var(--portal-cyan-dark); }
.tab-panel[hidden] { display: none; }

.upload-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
.upload-box { display: grid; min-height: 150px; padding: 1.1rem; place-items: center; color: #617d84; background: #f7fcfd; border: 2px dashed #bddde3; border-radius: 12px; font-size: 0.8125rem; text-align: center; }
.upload-box img { width: 100%; height: 120px; object-fit: cover; border-radius: 8px; }
.upload-grid-wide { grid-template-columns: 1fr; }
.upload-grid-wide .upload-box img { height: auto; aspect-ratio: 3 / 1; }
.upload-box img.upload-logo { width: 120px; height: 120px; object-fit: cover; }

.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9rem; }
.article-item { overflow: hidden; background: #fff; border: 1px solid var(--portal-line); border-radius: 14px; box-shadow: var(--portal-shadow); text-decoration: none; }
.article-cover { display: grid; min-height: 130px; padding: 1rem; place-items: center; color: #fff; background: linear-gradient(135deg,#62d4e6,#0a8ba0); font-size: 1.05rem; font-weight: 900; text-align: center; }
.article-item div:last-child { padding: 0.85rem; }
.article-item small { color: var(--portal-cyan-dark); font-weight: 800; }
.article-item h2 { margin: 0.35rem 0; font-size: 0.9rem; line-height: 1.55; }

.content-copy h2 { margin: 2rem 0 0.6rem; padding-left: 0.7rem; border-left: 5px solid var(--portal-cyan); font-size: 1.1rem; }
.content-copy h3 { color: var(--portal-cyan-dark); }
.content-copy p, .content-copy li { color: #43646d; font-size: 0.875rem; line-height: 1.95; }
.content-copy img { width: 100%; max-height: 360px; object-fit: cover; border-radius: 14px; }

.complete-box { padding: 3rem 1.5rem; text-align: center; }
.complete-icon { display: grid; width: 72px; height: 72px; margin: 0 auto 1rem; place-items: center; color: #fff; background: var(--portal-green); border-radius: 50%; font-size: 2rem; font-weight: 900; }

.review-index { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9rem; }
.review-group { padding: 1rem; background: #fff; border: 1px solid var(--portal-line); border-radius: 13px; box-shadow: var(--portal-shadow); }
.review-group h2 { margin: 0 0 0.65rem; color: var(--portal-cyan-dark); font-size: 0.95rem; }
.review-group nav { display: grid; }
.review-group a { padding: 0.7rem 0.5rem; color: #365962; border-bottom: 1px solid #ebf2f3; font-size: 0.8125rem; font-weight: 700; text-decoration: none; }
.review-group a::after { float: right; color: var(--portal-cyan); content: "→"; }

.portal-footer { color: #fff; background: var(--portal-navy); }
.portal-footer-inner { display: flex; width: min(1180px, calc(100% - 40px)); min-height: 120px; margin: 0 auto; gap: 1.5rem; align-items: center; }
.portal-footer .portal-brand { color: #fff; }
.portal-footer nav { display: flex; flex-wrap: wrap; margin-left: auto; gap: 0.4rem 1rem; justify-content: flex-end; }
.portal-footer nav a { padding: .45rem .15rem; color: rgba(255,255,255,.82); font-size: 0.8125rem; text-decoration: none; }
.portal-copy { margin: 0; padding: 0.75rem 1rem; color: rgba(255,255,255,.62); background: #082f37; font-size: 0.75rem; text-align: center; }

.toast {
  position: fixed;
  z-index: 100;
  right: 1rem;
  bottom: 1rem;
  max-width: 360px;
  padding: 0.8rem 1rem;
  color: #fff;
  background: var(--portal-navy);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.2);
  font-size: 0.8125rem;
}

@media (max-width: 920px) {
  .portal-nav { display: none; position: absolute; top: 72px; right: 20px; left: 20px; padding: 0.7rem; background: #fff; border: 1px solid var(--portal-line); border-radius: 12px; box-shadow: var(--portal-shadow); }
  .portal-nav.open { display: grid; }
  .portal-menu { display: block; }
  .portal-grid, .portal-grid-wide, .admin-shell { grid-template-columns: 1fr; }
  .side-card, .admin-side { position: static; }
  .side-card nav { grid-template-columns: repeat(2, 1fr); }
  .admin-side nav { grid-template-columns: repeat(3, 1fr); }
  .dashboard-cards { grid-template-columns: repeat(2, 1fr); }
  .article-grid { grid-template-columns: repeat(2, 1fr); }
  .management-toolbar { grid-template-columns: repeat(2, 1fr); }
  .management-toolbar .portal-button { width: 100%; }
}

@media (max-width: 640px) {
  .portal-utility, .portal-header-note { display: none; }
  .portal-header-inner, .portal-main, .portal-footer-inner { width: min(100% - 24px, 1180px); }
  .portal-header-inner { min-height: 62px; }
  .portal-brand { font-size: 1.05rem; }
  .portal-brand-mark { width: 34px; height: 34px; }
  .portal-title { padding: 1rem; }
  .portal-card { padding: 1rem; }
  .form-row, .review-list div { grid-template-columns: 1fr; }
  .form-label { padding: 0.75rem 0.8rem 0.35rem; background: #fff; }
  .form-control { padding: 0.4rem 0.8rem 0.8rem; }
  .job-mini-body { padding: 1rem; }
  .job-mini-facts div { grid-template-columns: 92px minmax(0, 1fr); }
  .job-mini-actions .job-mini-apply { margin-left: 0; }
  .bulk-toolbar { align-items: stretch; flex-direction: column; }
  .dashboard-cards, .article-grid, .upload-grid { grid-template-columns: 1fr; }
  .review-index { grid-template-columns: 1fr; }
  .admin-side nav { grid-template-columns: repeat(2, 1fr); }
  .portal-footer-inner { display: grid; padding: 1.4rem 0; }
  .portal-footer nav { margin-left: 0; justify-content: flex-start; }
  .portal-actions { flex-direction: column; }
  .portal-button { width: 100%; }
  .progress-steps li { padding: 0.65rem 0.4rem; font-size: 0.75rem; }
  .data-table { display: block; width: 100%; max-width: 100%; overflow-x: auto; white-space: nowrap; }
  .management-toolbar, .review-queue article, .change-list div { grid-template-columns: 1fr; }
  .review-queue .portal-button { width: 100%; }
  .management-summary { align-items: flex-start; }
  .admin-content,
  .portal-stack > *,
  .management-shell .portal-grid,
  .management-shell .dashboard-cards { min-width: 0; max-width: 100%; }
  .management-shell .portal-grid { width: 100%; }
}

.not-found-mascot { display: block; width: 140px; height: auto; margin: 0 auto 0.75rem; }

/* Avoid stray one- or two-character lines in headings and copy */
h1, h2, h3 { text-wrap: balance; }
p, dd, li { text-wrap: pretty; }
.portal-brand, .portal-brand span { white-space: nowrap; }
.progress-steps li { white-space: nowrap; }
@media (max-width: 680px) {
  .progress-steps li { padding: 0.65rem 0.15rem; font-size: 0.66rem; }
}
span, strong { text-wrap: pretty; }
dd { text-wrap: balance; }
.badge { white-space: nowrap; }
