:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #eef2f6;
  --text: #1f2933;
  --muted: #687582;
  --line: #d8dee6;
  --primary: #b4232a;
  --primary-dark: #8f1d23;
  --accent: #1f5f8b;
  --gold: #c79a2b;
  --ink: #4a2f1f;
  --ok: #157347;
  --warn: #9a5b00;
  --danger: #b4232a;
  --shadow: 0 8px 24px rgba(30, 41, 59, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(31, 95, 139, 0.28);
  outline-offset: 3px;
}

.page {
  width: min(1160px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}

.nav a {
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}

.nav a:hover,
.nav a.active {
  background: var(--surface-2);
  color: var(--text);
}

.brand {
  margin-right: auto;
  font-weight: 700;
  color: var(--text);
}

.section {
  margin: 20px 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.2;
  letter-spacing: 0;
}

h1 {
  font-size: 44px;
}

h2 {
  font-size: 26px;
}

h3 {
  font-size: 17px;
}

p {
  margin: 8px 0;
}

.muted {
  color: var(--muted);
}

.eyebrow,
.role-kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 750;
  text-transform: uppercase;
}

.home-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.9fr);
  gap: 18px;
  align-items: stretch;
  margin: 20px 0;
}

.home-title-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
}

.home-title-block {
  display: grid;
  align-content: center;
  min-height: 230px;
}

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

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

.card,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.panel {
  box-shadow: none;
}

.entry {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 184px;
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0 26px;
}

.role-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 258px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.role-card .actions {
  margin-top: auto;
}

.role-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
}

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

.kpi {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.kpi strong {
  display: block;
  font-size: 28px;
}

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

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

label {
  display: grid;
  gap: 6px;
  color: var(--text);
  font-size: 14px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 10px;
  color: var(--text);
  background: white;
  font: inherit;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(31, 95, 139, 0.18);
  border-color: var(--accent);
}

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

.btn,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 10px 18px;
  background: linear-gradient(180deg, #c42a31 0%, #9f1f26 100%);
  color: white;
  font: inherit;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(143, 29, 35, 0.18);
  transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
  touch-action: manipulation;
}

.btn:hover,
button:hover {
  background: linear-gradient(180deg, #d0363d 0%, #8f1d23 100%);
  box-shadow: 0 16px 30px rgba(143, 29, 35, 0.24);
  transform: translateY(-1px);
}

.btn.secondary,
button.secondary {
  background: #ffffff;
  color: #8f1d23;
  border-color: rgba(180, 35, 42, 0.26);
  box-shadow: none;
}

.btn.secondary:hover,
button.secondary:hover {
  background: #fff5ef;
  border-color: rgba(180, 35, 42, 0.42);
  box-shadow: 0 10px 20px rgba(143, 29, 35, 0.1);
}

.btn.blue,
button.blue {
  background: var(--accent);
}

.btn.danger,
button.danger {
  background: var(--danger);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.message {
  min-height: 24px;
  color: var(--muted);
}

.message.ok {
  color: var(--ok);
}

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

.auth-page {
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(159, 31, 38, 0.08) 0 1px, transparent 1px) 0 0 / 96px 96px,
    linear-gradient(180deg, #fffaf1 0%, #f3e7d8 48%, #eef2f6 100%);
  color: #4a2f1f;
}

.auth-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: url("/assets/ahkf-flag-raising-hero.jpg") center / cover no-repeat;
  opacity: 0.16;
}

.auth-page::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(115deg, rgba(255, 250, 241, 0.97) 0%, rgba(255, 250, 241, 0.9) 48%, rgba(15, 36, 54, 0.74) 100%),
    linear-gradient(180deg, rgba(159, 31, 38, 0.08), rgba(199, 154, 43, 0.14));
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(380px, 1fr);
  gap: 0;
  width: min(1040px, calc(100vw - 40px));
  min-height: calc(100vh - 64px);
  margin: 32px auto;
  overflow: hidden;
  border: 1px solid rgba(15, 36, 54, 0.18);
  border-radius: 8px;
  background: #fffaf1;
  box-shadow: 0 34px 80px rgba(16, 28, 44, 0.2);
}

.auth-shell-wide {
  grid-template-columns: minmax(320px, 0.52fr) minmax(620px, 1fr);
  width: min(1240px, calc(100vw - 40px));
}

.auth-panel {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 520px;
  padding: 34px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(15, 36, 54, 0.92), rgba(15, 29, 45, 0.96)),
    #4a2f1f;
  color: #f8f4eb;
}

.auth-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 8px;
  background: linear-gradient(180deg, #9f1f26, #c79a2b 58%, #4a2f1f);
}

.auth-panel::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: 64px;
  width: 220px;
  height: 220px;
  border: 1px solid rgba(199, 154, 43, 0.28);
  transform: rotate(45deg);
}

.auth-brand,
.auth-copy,
.auth-nav {
  position: relative;
  z-index: 1;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: inherit;
  text-decoration: none;
}

.auth-logo {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  padding: 4px;
  border: 1px solid rgba(248, 244, 235, 0.32);
  border-radius: 50%;
  background: #fffaf1;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.auth-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.auth-brand strong,
.auth-brand small {
  display: block;
}

.auth-brand strong {
  font-family: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  font-size: 21px;
  line-height: 1.12;
}

.auth-brand small {
  margin-top: 4px;
  color: #f3d99a;
  font-size: 12px;
  font-weight: 800;
}

.auth-copy {
  display: grid;
  align-content: center;
  padding: 42px 0;
}

.auth-copy .eyebrow {
  color: #f0c766;
}

.auth-copy h1 {
  max-width: 420px;
  color: #ffffff;
  font-family: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  font-size: clamp(42px, 4.5vw, 60px);
  font-weight: 900;
  line-height: 1.05;
}

.auth-copy p:not(.eyebrow) {
  max-width: 410px;
  margin-top: 18px;
  color: #d9e1ea;
  font-size: 17px;
  line-height: 1.8;
}

.auth-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.auth-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  color: #eef4f8;
  font-size: 14px;
  font-weight: 760;
  text-decoration: none;
}

.auth-nav a:hover,
.auth-nav a.active {
  border-color: rgba(240, 199, 102, 0.5);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.auth-form-panel {
  display: grid;
  align-content: center;
  padding: 40px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 250, 241, 0.96)),
    #fffaf1;
}

.auth-shell-wide .auth-form-panel {
  align-content: start;
}

.auth-form {
  gap: 16px;
  width: 100%;
  padding: 28px;
  border-color: rgba(15, 36, 54, 0.16);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 44px rgba(16, 28, 44, 0.12);
}

.registration-form {
  gap: 14px;
}

.registration-route-guide {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(240px, 0.75fr);
  gap: 12px;
  margin-bottom: 16px;
}

.registration-route-card {
  display: grid;
  gap: 5px;
  padding: 16px 18px;
  border: 1px solid rgba(15, 36, 54, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.84);
  color: #3a2418;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(16, 28, 44, 0.08);
}

.registration-route-card span,
.registration-tag,
.legacy-claim-summary-kicker {
  color: #8e3928;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.registration-route-card strong {
  font-size: 17px;
  line-height: 1.28;
}

.registration-route-card p {
  margin: 0;
  color: #5f422e;
  font-size: 13px;
  line-height: 1.55;
}

.registration-route-card.is-primary {
  border-color: rgba(180, 35, 42, 0.24);
  background:
    linear-gradient(135deg, rgba(255, 244, 228, 0.88), rgba(255, 255, 255, 0.94)),
    #fffaf1;
}

.registration-route-card.is-secondary {
  border-color: rgba(31, 95, 139, 0.18);
  background: rgba(238, 242, 246, 0.72);
}

.registration-route-card.is-secondary:hover {
  border-color: rgba(31, 95, 139, 0.42);
  background: rgba(230, 238, 246, 0.9);
}

.registration-main-intro {
  display: grid;
  gap: 6px;
  padding: 18px 20px;
  border: 1px solid rgba(180, 35, 42, 0.18);
  border-radius: 12px;
  background:
    radial-gradient(circle at 12% 0%, rgba(240, 199, 102, 0.28), transparent 32%),
    linear-gradient(135deg, rgba(255, 250, 241, 0.96), rgba(255, 255, 255, 0.92));
}

.registration-main-intro h2 {
  color: #3a2418;
  font-size: 24px;
}

.registration-main-intro p {
  margin: 0;
  color: #5f422e;
}

#registrationForm,
#legacyQuickClaim {
  scroll-margin-top: 18px;
}

.form-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 2px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(15, 36, 54, 0.12);
  color: #4a2f1f;
}

.form-section-title span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: #4a2f1f;
  color: #f3d99a;
  font-size: 12px;
  font-weight: 850;
}

.form-section-title strong {
  font-size: 16px;
}

.auth-form label,
.choice-field legend {
  color: #24364a;
  font-weight: 760;
}

.auth-form input,
.auth-form select,
.auth-form textarea {
  min-height: 46px;
  border-color: rgba(15, 36, 54, 0.2);
  background: #fbfcfd;
}

.auth-form input::placeholder {
  color: #8a96a3;
}

.auth-form .actions {
  margin-top: 2px;
}

.verification-actions {
  align-items: flex-start;
}

.choice-field {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 15px;
  border: 1px solid rgba(15, 36, 54, 0.16);
  border-radius: 8px;
  background: #fbfcfd;
}

.choice-field legend {
  grid-column: 1 / -1;
  padding: 0 4px;
  font-size: 14px;
}

.choice-field label {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid rgba(15, 36, 54, 0.12);
  border-radius: 6px;
  background: #ffffff;
}

.choice-field input {
  width: 16px;
  min-height: 16px;
  margin: 0;
  accent-color: #9f1f26;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

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

th {
  background: var(--surface-2);
  color: #344252;
  font-weight: 700;
}

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

.table-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
  white-space: nowrap;
}

.badge.pending {
  background: #fff3cd;
  color: var(--warn);
}

.badge.approved,
.badge.active {
  background: #dff3e8;
  color: var(--ok);
}

.badge.rejected,
.badge.inactive {
  background: #f8d7da;
  color: var(--danger);
}

.badge.cancelled {
  background: #f8d7da;
  color: var(--danger);
}

.badge.draft {
  background: #edf1f5;
  color: #4b5a69;
}

.badge.published {
  background: #dff3e8;
  color: var(--ok);
}

.badge.closed {
  background: #e4edf7;
  color: #1f5f8b;
}

.badge.not_started {
  background: #edf1f5;
  color: #4b5a69;
}

.badge.in_progress {
  background: #fff3cd;
  color: var(--warn);
}

.badge.completed {
  background: #dff3e8;
  color: var(--ok);
}

.badge.officer {
  background: #fff3cd;
  color: #76501a;
}

.badge.trainee {
  background: #e4edf7;
  color: #1f5f8b;
}

.badge.both {
  background: #f3eadc;
  color: #654f24;
}

.badge.school {
  background: #f1e8d6;
  color: #7a5616;
}

.badge.association,
.badge.service {
  background: #e4edf7;
  color: #1f5f8b;
}

.badge.manual_submission {
  background: #edf1f5;
  color: #39506a;
}

.empty {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fbfcfd;
}

.admin-activity-page {
  width: min(1240px, calc(100vw - 32px));
}

.admin-ops-page {
  width: min(1240px, calc(100vw - 32px));
}

.admin-activity-page,
.admin-ops-page,
.role-dashboard-page {
  color: #4a2f1f;
}

.admin-activity-page::before,
.admin-ops-page::before,
.role-dashboard-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(159, 31, 38, 0.08) 0 1px, transparent 1px) 0 0 / 96px 96px,
    linear-gradient(180deg, #fffaf1 0%, #f2e4d1 48%, #f5f6f8 100%);
}

.admin-activity-page::after,
.admin-ops-page::after,
.role-dashboard-page::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(115deg, rgba(255, 250, 241, 0.94) 0%, rgba(255, 250, 241, 0.6) 48%, rgba(16, 28, 44, 0.1) 100%),
    linear-gradient(180deg, rgba(199, 154, 43, 0.08), rgba(159, 31, 38, 0.04));
  pointer-events: none;
}

.admin-activity-page > .nav,
.admin-ops-page > .nav,
.role-dashboard-page > .nav {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 66px;
  margin-bottom: 22px;
  padding: 8px;
  border: 1px solid rgba(16, 28, 44, 0.13);
  border-radius: 8px;
  background: rgba(255, 250, 241, 0.92);
  box-shadow: 0 16px 40px rgba(31, 24, 15, 0.08);
  backdrop-filter: blur(14px) saturate(140%);
}

.admin-activity-page > .nav::before,
.admin-ops-page > .nav::before,
.role-dashboard-page > .nav::before {
  content: "";
  align-self: stretch;
  width: 4px;
  border-radius: 4px;
  background: linear-gradient(180deg, #8f1d23, #c79a2b);
}

.admin-activity-page > .nav .brand,
.admin-ops-page > .nav .brand,
.role-dashboard-page > .nav .brand {
  color: #4a2f1f;
  font-family: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  font-size: 21px;
  font-weight: 900;
}

.admin-activity-page > .nav a,
.admin-ops-page > .nav a,
.role-dashboard-page > .nav a {
  color: #364352;
  font-weight: 750;
}

.admin-activity-page > .nav a:hover,
.admin-activity-page > .nav a.active,
.admin-ops-page > .nav a:hover,
.admin-ops-page > .nav a.active,
.role-dashboard-page > .nav a:hover,
.role-dashboard-page > .nav a.active {
  background: #efe2d2;
  color: #4a2f1f;
}

.activity-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.38fr);
  gap: 0;
  align-items: stretch;
  margin: 22px 0 18px;
  overflow: hidden;
  border: 1px solid rgba(16, 28, 44, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(199, 154, 43, 0.12) 0 1px, transparent 1px) 0 0 / 72px 72px,
    linear-gradient(135deg, rgba(159, 31, 38, 0.26), rgba(159, 31, 38, 0) 34%),
    linear-gradient(115deg, #4a2f1f 0%, #f1d0aa 62%, #fff4e4 100%);
  color: #f8f4eb;
  box-shadow: 0 28px 60px rgba(31, 24, 15, 0.18);
}

.activity-hero::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 8px;
  background: linear-gradient(180deg, #8f1d23, #c79a2b);
}

.activity-hero::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 8px;
  height: 3px;
  background: linear-gradient(90deg, #c79a2b, rgba(199, 154, 43, 0));
}

.activity-hero > div:first-child {
  padding: 42px 44px 42px 52px;
}

.activity-hero .eyebrow {
  color: #f0c766;
}

.activity-hero h1 {
  max-width: 720px;
  color: #ffffff;
  font-family: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  font-size: 48px;
  font-weight: 900;
  line-height: 1.08;
}

.activity-hero p:not(.eyebrow) {
  max-width: 680px;
  margin-top: 16px;
  color: #d9e1ea;
  font-size: 17px;
  line-height: 1.8;
}

.activity-hero-panel {
  display: grid;
  align-content: end;
  min-height: 250px;
  padding: 32px;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(199, 154, 43, 0.16), rgba(199, 154, 43, 0)),
    rgba(255, 255, 255, 0.05);
}

.activity-hero-panel span,
.activity-hero-panel small {
  color: #d9e1ea;
}

.activity-hero-panel strong {
  display: block;
  margin: 8px 0;
  color: #f3d99a;
  font-size: 23px;
  line-height: 1.25;
}

.admin-service-hero .activity-hero-panel,
.hours-hero .activity-hero-panel,
.practicum-hero .activity-hero-panel {
  background:
    linear-gradient(180deg, rgba(159, 31, 38, 0.18), rgba(199, 154, 43, 0.1)),
    rgba(255, 255, 255, 0.06);
}

.ops-hero h1 {
  max-width: 780px;
}

.activity-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.activity-kpis .kpi {
  position: relative;
  overflow: hidden;
  min-height: 116px;
  border-color: rgba(16, 28, 44, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 250, 241, 0.9), rgba(255, 255, 255, 0.98)),
    #ffffff;
  box-shadow: 0 14px 34px rgba(31, 24, 15, 0.08);
}

.activity-kpis .kpi::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, #8f1d23, #c79a2b);
}

.activity-kpis .kpi strong {
  color: #4a2f1f;
  font-size: 32px;
}

.activity-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.52fr);
  gap: 18px;
  align-items: start;
  margin: 18px 0 22px;
}

.practicum-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.46fr);
  gap: 18px;
  align-items: start;
}

.activity-form {
  padding: 24px;
  border-color: rgba(16, 28, 44, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 250, 241, 0.88), rgba(255, 255, 255, 0.98)),
    #ffffff;
  box-shadow: 0 16px 40px rgba(31, 24, 15, 0.09);
}

.practicum-form {
  padding: 24px;
  border-color: rgba(16, 28, 44, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 250, 241, 0.88), rgba(255, 255, 255, 0.98)),
    #ffffff;
  box-shadow: 0 16px 40px rgba(31, 24, 15, 0.08);
}

.activity-guide {
  position: sticky;
  top: 24px;
  padding: 26px;
  border-color: rgba(16, 28, 44, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 250, 241, 0.96), rgba(255, 255, 255, 0.98)),
    #fffaf1;
}

.activity-guide .eyebrow {
  color: var(--primary-dark);
}

.activity-guide h2 {
  color: #4a2f1f;
  font-family: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  font-size: 28px;
  line-height: 1.2;
}

.activity-guide ul {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.activity-guide li {
  position: relative;
  padding-left: 18px;
  color: #52606e;
  line-height: 1.7;
}

.activity-guide li::before {
  content: "";
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 7px;
  height: 7px;
  background: var(--gold);
  transform: rotate(45deg);
}

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

.practicum-card {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid rgba(16, 28, 44, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 250, 241, 0.86), rgba(255, 255, 255, 0.98)),
    #ffffff;
  box-shadow: 0 14px 34px rgba(31, 24, 15, 0.08);
}

.practicum-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, #8f1d23, #c79a2b);
}

.practicum-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.practicum-card-head > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.practicum-card-head strong {
  color: #4a2f1f;
  font-size: 19px;
  white-space: nowrap;
}

.practicum-card h3 {
  color: #4a2f1f;
  font-family: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  font-size: 23px;
}

.practicum-card p {
  margin: 0;
  color: #52606e;
  line-height: 1.75;
}

.practicum-review-note {
  padding-top: 12px;
  border-top: 1px solid rgba(16, 28, 44, 0.12);
  color: #654f24;
  font-size: 14px;
  font-weight: 750;
}

.activity-filters {
  display: grid;
  grid-template-columns: 150px minmax(220px, 1fr);
  gap: 10px;
  min-width: min(430px, 100%);
}

.ops-filters {
  width: min(560px, 100%);
  margin: 0 0 14px;
}

.ops-section {
  padding: 24px;
  border: 1px solid rgba(16, 28, 44, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 250, 241, 0.82), rgba(255, 255, 255, 0.98)),
    #ffffff;
  box-shadow: 0 16px 40px rgba(31, 24, 15, 0.08);
}


.activity-card-list {
  display: grid;
  gap: 18px;
}

.activity-list-card {
  overflow: hidden;
  border: 1px solid rgba(74, 47, 31, 0.16);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 250, 241, 0.94), rgba(255, 255, 255, 0.98)),
    #fffaf1;
  box-shadow: 0 16px 36px rgba(74, 47, 31, 0.08);
}

.activity-list-card + .activity-list-card {
  margin-top: 2px;
}

.activity-card-main {
  display: grid;
  grid-template-columns: minmax(260px, 1.1fr) minmax(360px, 1.5fr) auto;
  gap: 18px;
  align-items: start;
  padding: 20px 22px;
  border-top: 4px solid rgba(143, 29, 35, 0.74);
}

.activity-card-title-block {
  min-width: 0;
}

.activity-card-title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.activity-card-title-row strong {
  color: #3f2a1e;
  font-size: 18px;
  line-height: 1.35;
}

.activity-card-title-block p {
  margin: 8px 0 0;
  color: #6b5b4a;
  line-height: 1.65;
}

.activity-card-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 14px;
  margin: 0;
}

.activity-card-facts div {
  min-width: 0;
  padding-left: 12px;
  border-left: 2px solid rgba(199, 154, 43, 0.38);
}

.activity-card-facts dt {
  margin: 0 0 4px;
  color: #8b6f4d;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.activity-card-facts dd {
  margin: 0;
  color: #2f3a45;
  font-size: 14px;
  line-height: 1.5;
}

.activity-card-actions {
  justify-content: flex-end;
  min-width: 134px;
}

.activity-card-signups {
  padding: 0 16px 16px;
}

.activity-card-signups .latest-signups-panel,
.activity-card-signups .latest-signups-empty {
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.76);
}


.latest-signups-bulk-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border-top: 1px solid rgba(74, 47, 31, 0.1);
  background: rgba(255, 250, 247, 0.82);
}

.latest-signups-bulk-toolbar.has-selection {
  background: rgba(255, 244, 238, 0.96);
  box-shadow: inset 0 1px 0 rgba(159, 31, 38, 0.08);
}

.latest-signups-select-all,
.latest-signups-selected-count {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #3b241b;
  font-weight: 800;
}

.latest-signups-select-all input,
.latest-signups-select-col input {
  width: 18px;
  height: 18px;
  accent-color: #9f1f26;
}

.latest-signups-select-col {
  width: 64px;
  text-align: center;
  white-space: nowrap;
}

.latest-signups-bulk-actions {
  margin-left: auto;
}

@media (max-width: 720px) {
  .latest-signups-bulk-toolbar {
    align-items: stretch;
  }

  .latest-signups-bulk-actions,
  .latest-signups-bulk-actions button {
    width: 100%;
  }

  .latest-signups-select-col {
    width: auto;
    text-align: left;
  }
}

.activity-card-signups .latest-signups-panel {
  border: 1px solid rgba(74, 47, 31, 0.13);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.activity-card-signups .latest-signups-empty {
  padding: 16px;
  border: 1px dashed rgba(74, 47, 31, 0.2);
}

@media (max-width: 1080px) {
  .activity-card-main {
    grid-template-columns: 1fr;
  }

  .activity-card-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .activity-card-main {
    padding: 18px;
  }

  .activity-card-facts {
    grid-template-columns: 1fr;
  }

  .activity-card-signups {
    padding: 0 12px 12px;
  }
}

.activity-table-wrap table {
  min-width: 980px;
}

.activity-table-wrap {
  border-color: rgba(16, 28, 44, 0.14);
  box-shadow: 0 12px 28px rgba(31, 24, 15, 0.06);
}

.activity-table-wrap th {
  background: #4a2f1f;
  color: #f8f4eb;
}

.table-actions button {
  min-height: 38px;
  padding: 8px 12px;
}

.table-actions button.danger {
  background: #8f1d23;
}

.role-dashboard-page {
  width: min(1320px, calc(100vw - 32px));
}

.role-shell-page {
  padding-bottom: 42px;
}

.role-app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.role-sidebar {
  position: sticky;
  top: 88px;
  overflow: hidden;
  border: 1px solid rgba(16, 28, 44, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 250, 241, 0.95), rgba(255, 255, 255, 0.92)),
    #fffaf1;
  box-shadow: 0 18px 44px rgba(31, 24, 15, 0.09);
}

.role-sidebar::before {
  content: "";
  display: block;
  height: 5px;
  background: linear-gradient(90deg, #8f1d23, #c79a2b, #4a2f1f);
}

.role-sidebar-brand {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 18px;
  border-bottom: 1px solid rgba(16, 28, 44, 0.12);
}

.role-sidebar-brand .dashboard-mark {
  width: 54px;
  height: 54px;
  box-shadow: 0 10px 22px rgba(31, 24, 15, 0.12);
}

.role-sidebar-brand strong {
  display: block;
  color: #4a2f1f;
  font-family: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  font-size: 18px;
  line-height: 1.3;
}

.role-sidebar-brand span:not(.brand-mark) {
  display: block;
  margin-top: 4px;
  color: #6d7886;
  font-size: 13px;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.role-side-nav {
  display: grid;
  gap: 6px;
  padding: 12px;
}

.role-side-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 11px 13px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #364352;
  font-size: 15px;
  font-weight: 850;
  text-decoration: none;
}

.role-side-nav a:hover,
.role-side-nav a.active {
  border-color: rgba(143, 29, 35, 0.16);
  background:
    linear-gradient(90deg, rgba(143, 29, 35, 0.1), rgba(199, 154, 43, 0.12)),
    #fff7ea;
  color: #4a2f1f;
}

.role-main-panel {
  min-width: 0;
}

.role-page-heading {
  position: relative;
  margin: 0 0 18px;
  padding: 28px 32px;
  overflow: hidden;
  border: 1px solid rgba(16, 28, 44, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(159, 31, 38, 0.2), rgba(159, 31, 38, 0) 36%),
    linear-gradient(115deg, #4a2f1f 0%, #f1d0aa 62%, #fff4e4 100%);
  color: #f8f4eb;
  box-shadow: 0 24px 54px rgba(31, 24, 15, 0.16);
}

.role-page-heading::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 8px;
  background: linear-gradient(180deg, #8f1d23, #c79a2b);
}

.role-page-heading .eyebrow {
  color: #f0c766;
}

.role-page-heading h1 {
  color: #ffffff;
  font-family: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  font-size: 36px;
  line-height: 1.18;
}

.role-page-heading p {
  color: #d9e1ea;
}

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

.trainee-feature-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.role-feature-card {
  position: relative;
  min-height: 176px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid rgba(16, 28, 44, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(143, 29, 35, 0.08), rgba(199, 154, 43, 0.09)),
    #ffffff;
  color: #4a2f1f;
  text-decoration: none;
  box-shadow: 0 14px 32px rgba(31, 24, 15, 0.07);
}

.role-feature-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, #8f1d23, #c79a2b);
}

.role-feature-card span {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 16px;
  border-radius: 50%;
  color: #ffffff;
  background: #8f1d23;
  font-size: 13px;
  font-weight: 900;
}

.role-feature-card strong {
  display: block;
  color: #4a2f1f;
  font-family: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  font-size: 22px;
  line-height: 1.28;
}

.role-feature-card p {
  margin: 10px 0 0;
  color: #52606e;
  line-height: 1.65;
}

.role-dashboard-hero {
  position: relative;
  margin: 22px 0;
  padding: 34px 38px;
  overflow: hidden;
  border: 1px solid rgba(16, 28, 44, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(159, 31, 38, 0.24), rgba(159, 31, 38, 0) 36%),
    linear-gradient(115deg, #4a2f1f 0%, #f1d0aa 62%, #fff4e4 100%);
  color: #f8f4eb;
  box-shadow: 0 28px 60px rgba(31, 24, 15, 0.18);
}

.role-dashboard-hero::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 8px;
  background: linear-gradient(180deg, #8f1d23, #c79a2b);
}

.role-dashboard-hero-copy {
  display: flex;
  align-items: center;
  gap: 18px;
}

.dashboard-mark {
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  padding: 5px;
  border: 1px solid rgba(248, 244, 235, 0.36);
  border-radius: 50%;
  background: #fffaf1;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
}

.dashboard-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.role-dashboard-hero .eyebrow {
  color: #f0c766;
}

.role-dashboard-hero h1 {
  color: #ffffff;
  font-family: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  font-size: 44px;
}

.role-dashboard-hero p {
  color: #d9e1ea;
}

.role-dashboard-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 26px;
  margin-left: 90px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.role-dashboard-meta div {
  min-height: 98px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.05);
}

.role-dashboard-meta span {
  display: block;
  color: #f3d99a;
  font-size: 13px;
  font-weight: 800;
}

.role-dashboard-meta strong {
  display: block;
  margin-top: 8px;
  color: #ffffff;
  font-size: 20px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.role-progress-strip {
  display: grid;
  grid-template-columns: minmax(240px, 0.82fr) minmax(180px, 0.5fr) minmax(300px, 1fr);
  gap: 16px;
  align-items: center;
  margin: 0 0 22px;
  padding: 22px 24px;
  border: 1px solid rgba(16, 28, 44, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(199, 154, 43, 0.18), rgba(255, 255, 255, 0) 45%),
    #fffaf1;
  box-shadow: 0 16px 40px rgba(31, 24, 15, 0.08);
}

.role-progress-strip h2 {
  margin: 4px 0;
  color: #4a2f1f;
  font-family: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  font-size: 26px;
  line-height: 1.25;
}

.progress-meter {
  overflow: hidden;
  height: 14px;
  border-radius: 999px;
  background: rgba(16, 28, 44, 0.12);
  box-shadow: inset 0 1px 2px rgba(16, 28, 44, 0.12);
}

.progress-meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8f1d23, #c79a2b);
  transition: width 260ms ease;
}

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

.progress-facts div {
  min-height: 86px;
  padding: 14px;
  border: 1px solid rgba(16, 28, 44, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
}

.progress-facts dt {
  color: #6d7886;
  font-size: 12px;
  font-weight: 850;
}

.progress-facts dd {
  margin: 8px 0 0;
  color: #4a2f1f;
  font-size: 18px;
  font-weight: 850;
  line-height: 1.35;
}

.service-record-strip {
  grid-template-columns: minmax(260px, 0.9fr) minmax(340px, 1.1fr);
}

.certification-flow-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 22px;
}

.certification-flow-strip article {
  min-height: 150px;
  padding: 20px;
  border: 1px solid rgba(16, 28, 44, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(143, 29, 35, 0.08), rgba(199, 154, 43, 0.08)),
    #ffffff;
  box-shadow: 0 14px 32px rgba(31, 24, 15, 0.07);
}

.certification-flow-strip span {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 14px;
  border-radius: 50%;
  color: #ffffff;
  background: #8f1d23;
  font-size: 13px;
  font-weight: 900;
}

.certification-flow-strip strong {
  display: block;
  color: #4a2f1f;
  font-family: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  font-size: 22px;
}

.certification-flow-strip p {
  margin: 8px 0 0;
  color: #52606e;
  line-height: 1.65;
}

.profile-form {
  max-width: none;
}


.full-profile-grid {
  display: grid;
  gap: 16px;
}

.profile-detail-card {
  padding: 18px;
  border: 1px solid rgba(16, 28, 44, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 28px rgba(31, 24, 15, 0.06);
}

.profile-detail-card h3 {
  margin: 0 0 14px;
  color: #4a2f1f;
  font-family: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  font-size: 20px;
}

.profile-detail-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  background:
    linear-gradient(135deg, rgba(143, 29, 35, 0.08), rgba(199, 154, 43, 0.1)),
    #ffffff;
}

.profile-detail-summary div {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.profile-detail-summary strong {
  color: #1f2933;
  font-size: 18px;
}

.profile-detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin: 0;
}

.profile-detail-list div {
  padding: 12px;
  border: 1px solid rgba(16, 28, 44, 0.08);
  border-radius: 8px;
  background: #fbf6ed;
}

.profile-detail-list dt {
  color: #6d7886;
  font-size: 12px;
  font-weight: 800;
}

.profile-detail-list dd {
  margin: 5px 0 0;
  color: #1f2933;
  line-height: 1.45;
}

.profile-detail-table-card h3 {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  justify-content: space-between;
}

.profile-detail-table-wrap {
  margin-top: 8px;
}

.profile-detail-table-wrap table {
  min-width: 760px;
}

.empty-inline {
  margin: 0;
  color: #6d7886;
}

@media (max-width: 760px) {
  .profile-detail-summary,
  .profile-detail-list {
    grid-template-columns: 1fr;
  }

  .profile-detail-card {
    padding: 14px;
  }

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

.manual-hour-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(280px, 0.62fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}

.manual-hour-form {
  max-width: none;
}

.record-card-grid {
  margin-top: 14px;
}

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

.role-activity-card {
  position: relative;
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 1px solid rgba(16, 28, 44, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 250, 241, 0.84), rgba(255, 255, 255, 0.98)),
    #ffffff;
  box-shadow: var(--shadow);
}

.role-activity-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, #8f1d23, #c79a2b);
}

.role-activity-main {
  display: grid;
  gap: 12px;
}

.role-activity-main > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.role-activity-main h3 {
  color: #4a2f1f;
  font-family: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  font-size: 24px;
}

.role-activity-main p {
  margin: 0;
  color: #52606e;
  line-height: 1.75;
}

.role-activity-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.role-activity-facts div {
  padding: 12px;
  border: 1px solid rgba(16, 28, 44, 0.1);
  border-radius: 6px;
  background: #fbf6ed;
}

.role-activity-facts dt {
  color: #6d7886;
  font-size: 12px;
  font-weight: 800;
}

.role-activity-facts dd {
  margin: 5px 0 0;
  color: #1f2933;
  font-size: 14px;
  line-height: 1.45;
}

.role-activity-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid rgba(16, 28, 44, 0.12);
}

.role-activity-actions button {
  min-height: 40px;
  padding: 8px 12px;
}

.role-activity-actions span {
  color: var(--muted);
  font-size: 13px;
}


/* Role records table view 2026-05-09 */
.role-record-table-wrap {
  width: 100%;
  min-width: 0;
}

.role-record-table-scroll {
  overflow-x: auto;
  border: 1px solid rgba(16, 28, 44, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 26px rgba(31, 24, 15, 0.06);
}

.role-record-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  color: #1f2933;
  font-size: 14px;
}

.role-record-table th,
.role-record-table td {
  padding: 13px 14px;
  border-bottom: 1px solid rgba(16, 28, 44, 0.1);
  text-align: left;
  vertical-align: top;
}

.role-record-table th {
  background: #f8efe2;
  color: #5f4b34;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.role-record-table tbody tr:nth-child(even) {
  background: rgba(255, 250, 241, 0.48);
}

.role-record-table tbody tr:last-child td {
  border-bottom: 0;
}

.role-record-table strong {
  display: block;
  color: #3f2a1e;
  font-weight: 850;
  line-height: 1.45;
}

.role-record-table .table-meta {
  margin-top: 4px;
  color: #6d7886;
  font-size: 12px;
  line-height: 1.45;
}

@media (max-width: 760px) {
  .role-record-table-scroll {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .role-record-table,
  .role-record-table thead,
  .role-record-table tbody,
  .role-record-table tr,
  .role-record-table td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .role-record-table thead {
    display: none;
  }

  .role-record-table tbody {
    display: grid;
    gap: 8px;
  }

  .role-record-table tr {
    padding: 10px 12px;
    border: 1px solid rgba(16, 28, 44, 0.12);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 6px 16px rgba(31, 24, 15, 0.04);
  }

  .role-record-table td {
    display: grid;
    grid-template-columns: minmax(78px, 31%) minmax(0, 1fr);
    gap: 8px;
    padding: 7px 0;
    border-bottom: 1px solid rgba(16, 28, 44, 0.08);
    font-size: 13px;
    overflow-wrap: anywhere;
  }

  .role-record-table td:last-child {
    border-bottom: 0;
  }

  .role-record-table td::before {
    content: attr(data-label);
    color: #6d7886;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.03em;
  }

  .role-record-table strong {
    font-size: 14px;
  }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 250, 241, 0.96);
  border-bottom: 1px solid rgba(28, 37, 52, 0.14);
  box-shadow: 0 10px 30px rgba(31, 24, 15, 0.06);
  backdrop-filter: blur(14px) saturate(140%);
}

.site-header::before {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg, #8f1d23 0 34%, #c79a2b 34% 44%, #4a2f1f 44% 100%);
}

.site-topline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  width: min(1240px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 8px 0 7px;
  color: #654f24;
  font-size: 13px;
  font-weight: 700;
}

.site-topline span:first-child {
  color: #4a2f1f;
}

.official-nav {
  width: min(1240px, calc(100vw - 40px));
  margin: 0 auto;
  min-height: 70px;
  border-top: 1px solid rgba(22, 31, 45, 0.1);
  border-bottom: 0;
  gap: 6px;
}

.official-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border-radius: 6px;
  color: #364352;
  font-size: 14px;
  font-weight: 750;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.official-nav a:hover,
.official-nav a.active {
  background: #efe2d2;
  color: #4a2f1f;
}

.official-nav a:hover {
  transform: translateY(-1px);
}

.official-nav .brand {
  gap: 12px;
  min-width: max-content;
  color: #4a2f1f;
  font-family: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  font-size: 23px;
  font-weight: 900;
}

.official-nav .brand.active {
  background: transparent;
  padding-left: 0;
}

.brand-text {
  white-space: nowrap;
}

.official-nav .nav-join {
  border: 1px solid rgba(159, 31, 38, 0.28);
  background: #fff7ee;
  color: #8f1d23;
  font-weight: 850;
  box-shadow: 0 8px 18px rgba(143, 29, 35, 0.08);
}

.home-page {
  --home-ink: #4a2f1f;
  --home-navy: #fff4e4;
  --home-red: #9f1f26;
  --home-gold: #c79a2b;
  --home-ivory: #fffaf1;
  --home-warm: #efe2d2;
  background: #f7efe2;
  color: var(--home-ink);
}

.official-container {
  width: min(1240px, calc(100vw - 40px));
  margin: 0 auto;
}

.official-hero {
  position: relative;
  overflow: hidden;
  padding: 52px 0 68px;
  color: var(--home-ink);
  background:
    linear-gradient(90deg, rgba(159, 31, 38, 0.08) 0 1px, transparent 1px) 0 0 / 96px 96px,
    linear-gradient(180deg, #fffaf1 0%, #f2e4d1 58%, #fbf6ed 58%, #fbf6ed 100%);
}

.official-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0) 48%),
    linear-gradient(90deg, rgba(199, 154, 43, 0.18), rgba(199, 154, 43, 0) 34%);
  pointer-events: none;
}

.official-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: rgba(199, 154, 43, 0.55);
}

.hero-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(540px, 1.04fr) minmax(430px, 0.96fr);
  gap: 0;
  align-items: stretch;
  min-height: 560px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(16, 28, 44, 0.18);
  border-radius: 8px;
  background: var(--home-navy);
  box-shadow: 0 34px 70px rgba(31, 24, 15, 0.22);
}

.hero-shell::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 3;
  width: 9px;
  background: linear-gradient(180deg, var(--home-red), #c79a2b);
}

.hero-shell::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 9px;
  z-index: 3;
  height: 3px;
  background: linear-gradient(90deg, var(--home-gold), rgba(199, 154, 43, 0));
}

.official-hero-content {
  display: grid;
  align-content: center;
  min-height: 560px;
  max-width: none;
  padding: 52px 54px 48px 64px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0;
  background:
    linear-gradient(135deg, rgba(159, 31, 38, 0.2), rgba(159, 31, 38, 0) 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0));
  box-shadow: none;
}

.hero-brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 25px;
  color: rgba(248, 244, 235, 0.8);
  font-family: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

.official-hero .eyebrow {
  color: #f0c766;
  letter-spacing: 0.08em;
}

.home-band .eyebrow,
.entry-copy .eyebrow {
  color: var(--home-red);
  letter-spacing: 0.06em;
}

.official-hero h1 {
  width: max-content;
  max-width: 100%;
  color: #ffffff;
  font-family: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  font-size: clamp(52px, 4.2vw, 66px);
  font-weight: 900;
  line-height: 1.04;
  white-space: nowrap;
}

.hero-subtitle {
  margin: 20px 0 0;
  color: #f3d99a;
  font-size: clamp(23px, 2.05vw, 31px);
  font-weight: 850;
  line-height: 1.28;
}

.hero-subtitle span {
  display: inline;
}

.hero-intro {
  max-width: 580px;
  margin: 24px 0 0;
  color: #dce5ee;
  font-size: 18px;
  line-height: 1.85;
}

.hero-actions {
  margin-top: 36px;
  gap: 14px;
}

.hero-actions .btn {
  min-height: 54px;
  padding-inline: 26px;
}


.install-home-btn {
  cursor: pointer;
}

.install-home-panel {
  max-width: 580px;
  margin-top: 18px;
  padding: 18px 20px;
  border: 1px solid rgba(243, 217, 154, 0.34);
  border-radius: 16px;
  background: rgba(7, 20, 34, 0.54);
  color: #eaf0f6;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
}

.install-home-panel[hidden] {
  display: none;
}

.install-home-panel strong {
  display: block;
  color: #f3d99a;
  font-size: 16px;
  font-weight: 850;
}

.install-home-panel p {
  margin: 8px 0 0;
  color: #dce5ee;
  line-height: 1.7;
}

.install-home-panel ol {
  margin: 12px 0 0 20px;
  padding: 0;
  color: #f7fbff;
  line-height: 1.75;
}

.remember-login-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 15px;
  border: 1px solid rgba(15, 36, 54, 0.16);
  border-radius: 12px;
  background: #fbfcfd;
  cursor: pointer;
}

.auth-form .remember-login-option input {
  width: 18px;
  min-height: 18px;
  margin-top: 3px;
  accent-color: #b4232a;
}

.remember-login-option span {
  display: grid;
  gap: 3px;
}

.remember-login-option strong {
  color: #24364a;
  font-size: 14px;
}

.remember-login-option small {
  color: #627386;
  font-weight: 520;
  line-height: 1.55;
}

.hero-trust-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  color: #cfd8e3;
  font-size: 14px;
}

.hero-trust-list span {
  position: relative;
  padding-left: 15px;
}

.hero-trust-list span::before {
  content: "";
  position: absolute;
  top: 0.68em;
  left: 0;
  width: 6px;
  height: 6px;
  background: var(--home-gold);
  transform: rotate(45deg);
}

.btn.light,
button.light {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.42);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.btn.light:hover,
button.light:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.62);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
}

.hero-visual-wrap {
  position: relative;
  display: grid;
  grid-template-rows: 1fr;
  min-height: 560px;
  background: #f1d0aa;
}

.hero-visual {
  position: relative;
  min-height: 0;
  border-radius: 0;
  overflow: hidden;
  background: #f1d0aa;
  box-shadow: none;
}

.hero-visual img {
  width: 100%;
  height: 100%;
  min-height: 560px;
  object-fit: cover;
  object-position: center;
  opacity: 0.96;
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 29, 45, 0.58), rgba(17, 29, 45, 0.04) 36%, rgba(17, 29, 45, 0.2) 100%),
    linear-gradient(180deg, rgba(16, 28, 44, 0.02), rgba(16, 28, 44, 0.58));
  pointer-events: none;
}

.hero-institution-strip span {
  display: block;
  color: #6d7886;
  font-size: 13px;
  font-weight: 750;
}

.hero-institution-strip strong {
  display: block;
  margin-top: 5px;
  color: var(--home-ink);
  font-size: 17px;
  line-height: 1.45;
}

.hero-institution-strip {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 24px;
  overflow: hidden;
  border-block: 1px solid rgba(22, 31, 45, 0.14);
  border-radius: 0;
  background: rgba(255, 250, 241, 0.72);
  color: var(--home-ink);
  box-shadow: none;
}

.hero-institution-strip div {
  min-height: 94px;
  padding: 22px 26px;
  border-right: 1px solid rgba(22, 31, 45, 0.12);
}

.hero-institution-strip div:last-child {
  border-right: 0;
}

.home-band {
  position: relative;
  padding: 84px 0;
}

.home-band-intro {
  background: #fbf6ed;
}

.home-band-service {
  background:
    linear-gradient(90deg, rgba(199, 154, 43, 0.16) 0 1px, transparent 1px) 0 0 / 90px 90px,
    #efe2d2;
}

.home-band-entry {
  background:
    radial-gradient(circle at 18% 18%, rgba(199, 154, 43, 0.16), rgba(199, 154, 43, 0) 30%),
    linear-gradient(105deg, #fff4e4 0%, #fff4e4 54%, #172940 100%);
  color: #f8f4eb;
}

.intro-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 0.68fr);
  gap: 52px;
  align-items: end;
}

.section-copy p,
.section-summary,
.entry-copy p {
  color: #52606e;
  font-size: 16px;
  line-height: 1.85;
}

.section-copy p {
  max-width: 720px;
}

.official-section-head {
  margin-bottom: 38px;
}

.official-section-head h2,
.section-copy h2,
.entry-copy h2 {
  max-width: 940px;
  color: var(--home-ink);
  font-family: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  font-size: clamp(31px, 3.1vw, 44px);
  font-weight: 900;
  line-height: 1.2;
}

.home-band-entry h2 {
  color: #ffffff;
}

.home-band-entry .entry-copy p {
  color: #d9e1ea;
}

.section-summary {
  max-width: 500px;
  margin: 0;
}

.mission-list {
  display: grid;
  gap: 0;
  border-top: 3px solid rgba(159, 31, 38, 0.5);
}

.mission-item {
  display: grid;
  gap: 8px;
  padding: 24px 0;
  border-bottom: 1px solid rgba(22, 31, 45, 0.15);
}

.mission-item strong {
  color: var(--home-ink);
  font-size: 21px;
}

.mission-item span {
  color: #52606e;
  line-height: 1.75;
}

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

.service-item {
  position: relative;
  min-height: 280px;
  padding: 30px;
  overflow: hidden;
  border: 1px solid rgba(22, 31, 45, 0.13);
  border-top: 5px solid var(--home-red);
  border-radius: 8px;
  background: rgba(255, 250, 241, 0.94);
  box-shadow: 0 20px 42px rgba(31, 24, 15, 0.09);
}

.service-item::after {
  content: "";
  position: absolute;
  right: -34px;
  top: -42px;
  width: 130px;
  height: 130px;
  border: 1px solid rgba(199, 154, 43, 0.3);
  transform: rotate(45deg);
}

.service-index,
.role-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 28px;
  border-radius: 50%;
  background: var(--home-ink);
  color: #f3d99a;
  font-weight: 850;
  font-size: 13px;
}

.service-item h3,
.official-role-card h3 {
  color: var(--home-ink);
  font-size: 22px;
}

.service-item p,
.official-role-card p {
  color: #52606e;
  line-height: 1.76;
}

.entry-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.4fr) minmax(0, 1fr);
  gap: 52px;
  align-items: start;
}

.entry-copy {
  position: sticky;
  top: 122px;
}

.official-role-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 0;
}

.official-role-card {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  min-height: 0;
  padding: 24px 26px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-left: 6px solid var(--home-gold);
  border-radius: 8px;
  background: #fbf3e7;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.18);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.official-role-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 44px rgba(0, 0, 0, 0.22);
}

.official-role-card .role-number {
  margin: 0;
}

.official-role-card .actions {
  justify-content: flex-end;
  min-width: 284px;
}

.official-role-card .btn {
  min-height: 48px;
}

.role-kicker {
  color: var(--home-red);
}

.site-footer {
  background: #4a2f1f;
  color: #f8f4eb;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 34px 0;
}

.footer-grid p {
  margin-bottom: 0;
  color: #c8d2df;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
  justify-content: flex-end;
}

.footer-links a {
  color: #f8f4eb;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

@media (max-width: 980px) {
  .auth-shell,
  .auth-shell-wide {
    grid-template-columns: 1fr;
    width: min(760px, calc(100vw - 28px));
    min-height: 0;
    margin: 14px auto;
  }

  .auth-shell-wide .auth-form-panel {
    max-height: none;
    overflow: visible;
  }

  .auth-panel {
    min-height: 330px;
  }

  .activity-hero,
  .activity-workbench,
  .practicum-workbench,
  .manual-hour-workbench,
  .certification-flow-strip,
  .practicum-card-grid,
  .role-activity-grid,
  .role-app-shell,
  .role-feature-grid,
  .trainee-feature-grid {
    grid-template-columns: 1fr;
  }

  .role-sidebar {
    position: static;
  }

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

  .activity-guide {
    position: static;
  }

  .hero-shell,
  .intro-layout,
  .entry-layout {
    grid-template-columns: 1fr;
  }

  .hero-shell {
    gap: 0;
    max-height: none;
    min-height: 0;
  }

  .official-hero h1 {
    width: auto;
    white-space: normal;
  }

  .official-hero {
    padding: 16px 0 26px;
    background: #f3eadc;
  }

  .entry-copy {
    position: static;
  }

  .official-role-card {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .official-role-card .actions {
    grid-column: 2;
    justify-content: flex-start;
    min-width: 0;
  }
}

@media (max-width: 760px) {
  .auth-page {
    background: #fffaf1;
  }

  .auth-shell,
  .auth-shell-wide {
    width: 100%;
    margin: 0;
    border-inline: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .auth-panel {
    min-height: 0;
    padding: 24px 22px;
  }

  .auth-brand {
    align-items: flex-start;
  }

  .auth-logo {
    width: 50px;
    height: 50px;
  }

  .auth-brand strong {
    font-size: 18px;
  }

  .auth-copy {
    padding: 34px 0 26px;
  }

  .auth-copy h1 {
    font-size: 36px;
  }

  .auth-form-panel {
    padding: 18px 14px 28px;
  }

  .auth-form {
    padding: 18px;
  }

  .choice-field label {
    min-height: 40px;
  }

  .page {
    width: min(1160px, calc(100vw - 20px));
    padding-top: 18px;
  }

  .nav {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .brand {
    width: 100%;
  }

  .grid,
  .grid.two,
  .home-overview,
  .role-grid,
  .kpis,
  .activity-kpis,
  .form-row,
  .choice-field,
  .service-grid,
  .hero-institution-strip {
    grid-template-columns: 1fr;
  }

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

  .activity-hero {
    gap: 0;
  }

  .activity-hero > div:first-child,
  .activity-hero-panel {
    padding: 24px 22px;
  }

  .activity-hero-panel {
    min-height: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    border-left: 0;
  }

  .activity-hero h1 {
    font-size: 36px;
  }

  .activity-filters {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .admin-activity-page .activity-table-wrap,
  .admin-ops-page .activity-table-wrap,
  .admin-volunteers-page .table-wrap,
  .admin-notifications-page .table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .admin-activity-page .activity-table-wrap table,
  .admin-ops-page .activity-table-wrap table,
  .admin-volunteers-page .table-wrap table,
  .admin-notifications-page .table-wrap table {
    display: block;
    min-width: 0;
  }

  .admin-activity-page .activity-table-wrap thead,
  .admin-ops-page .activity-table-wrap thead,
  .admin-volunteers-page .table-wrap thead,
  .admin-notifications-page .table-wrap thead {
    display: none;
  }

  .admin-activity-page .activity-table-wrap tbody,
  .admin-ops-page .activity-table-wrap tbody,
  .admin-volunteers-page .table-wrap tbody,
  .admin-notifications-page .table-wrap tbody {
    display: grid;
    gap: 12px;
  }

  .admin-activity-page .activity-table-wrap tr,
  .admin-ops-page .activity-table-wrap tr,
  .admin-volunteers-page .table-wrap tr,
  .admin-notifications-page .table-wrap tr {
    display: grid;
    padding: 13px 16px;
    border: 1px solid rgba(16, 28, 44, 0.14);
    border-top: 4px solid var(--gold);
    border-radius: 8px;
    background:
      linear-gradient(180deg, rgba(255, 250, 241, 0.92), rgba(255, 255, 255, 0.98)),
      #ffffff;
    box-shadow: 0 12px 26px rgba(31, 24, 15, 0.07);
  }

  .admin-activity-page .activity-table-wrap td,
  .admin-ops-page .activity-table-wrap td,
  .admin-volunteers-page .table-wrap td,
  .admin-notifications-page .table-wrap td {
    display: grid;
    grid-template-columns: minmax(92px, 34%) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 10px 0;
    border-bottom: 1px solid rgba(16, 28, 44, 0.1);
    font-size: 15px;
    overflow-wrap: anywhere;
  }

  .admin-activity-page .activity-table-wrap td:last-child,
  .admin-ops-page .activity-table-wrap td:last-child,
  .admin-volunteers-page .table-wrap td:last-child,
  .admin-notifications-page .table-wrap td:last-child {
    border-bottom: 0;
  }

  .admin-activity-page .activity-table-wrap td::before,
  .admin-ops-page .activity-table-wrap td::before,
  .admin-volunteers-page .table-wrap td::before,
  .admin-notifications-page .table-wrap td::before {
    content: attr(data-label);
    color: #6d7886;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.45;
  }

  .role-dashboard-hero {
    padding: 24px 22px;
  }

  .role-page-heading {
    padding: 24px 22px;
  }

  .role-page-heading h1 {
    font-size: 32px;
  }

  .role-dashboard-meta,
  .role-progress-strip,
  .progress-facts,
  .role-activity-facts {
    grid-template-columns: 1fr;
  }

  .role-sidebar-brand {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .role-sidebar-brand .dashboard-mark {
    width: 48px;
    height: 48px;
  }

  .role-side-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 14px;
    scrollbar-width: thin;
  }

  .role-side-nav a {
    flex: 0 0 auto;
    min-height: 40px;
    white-space: nowrap;
  }

  .site-header {
    position: static;
  }

  .site-topline {
    display: none;
  }

  .official-nav,
  .official-container {
    width: min(1220px, calc(100vw - 24px));
  }

  .official-nav {
    align-items: flex-start;
    gap: 4px;
    padding: 9px 0 10px;
    min-height: 0;
  }

  .official-nav .brand {
    width: 100%;
    font-size: 18px;
  }

  .official-nav a {
    min-height: 40px;
    padding: 7px 8px;
    font-size: 13px;
  }

  .hero-shell {
    gap: 0;
    min-height: 0;
    padding: 0;
  }

  .official-hero-content {
    min-height: 0;
    padding: 21px 22px 20px 30px;
  }

  .hero-brand-lockup {
    margin-bottom: 13px;
    font-size: 12px;
  }

  .official-hero h1 {
    font-size: 35px;
    line-height: 1.08;
  }

  .hero-subtitle {
    margin-top: 13px;
    font-size: 19px;
  }

  .hero-subtitle span {
    display: block;
  }

  .hero-intro {
    font-size: 16px;
    line-height: 1.58;
    margin-top: 15px;
  }

  .hero-actions {
    margin-top: 18px;
  }

  .hero-actions .btn {
    min-height: 48px;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-trust-list {
    display: none;
  }

  .hero-visual-wrap {
    min-height: 0;
  }

  .hero-visual,
  .hero-visual img {
    min-height: 96px;
  }

  .hero-institution-strip div {
    min-height: 0;
    padding: 18px;
    border-right: 0;
    border-bottom: 1px solid rgba(22, 31, 45, 0.12);
  }

  .hero-institution-strip div:last-child {
    border-bottom: 0;
  }

  .hero-institution-strip {
    display: none;
  }

  .home-band {
    padding: 52px 0;
  }

  .official-section-head h2,
  .section-copy h2,
  .entry-copy h2 {
    font-size: 30px;
  }

  .service-item {
    min-height: 0;
  }

  .official-role-card {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .official-role-card .actions {
    grid-column: auto;
  }

  .footer-grid {
    flex-direction: column;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

/* Homepage institutional visual refinement */
.site-header {
  background:
    linear-gradient(180deg, rgba(255, 250, 241, 0.98), rgba(251, 246, 237, 0.94));
  border-bottom-color: rgba(16, 28, 44, 0.18);
  box-shadow: 0 12px 34px rgba(16, 28, 44, 0.08);
}

.site-header::before {
  height: 5px;
  background: linear-gradient(90deg, #8f1d23 0 31%, #c79a2b 31% 41%, #4a2f1f 41% 100%);
}

.site-topline {
  padding: 9px 0 8px;
  color: #6e5a2b;
  font-size: 12px;
}

.official-nav {
  min-height: 76px;
  gap: 10px;
}

.official-nav a {
  border: 1px solid transparent;
  font-weight: 800;
}

.official-nav a:hover,
.official-nav a.active {
  background: rgba(239, 226, 210, 0.82);
  color: #4a2f1f;
}

.official-nav .brand {
  gap: 14px;
  padding-right: 18px;
}

.official-nav .brand.active {
  padding-left: 0;
}

.brand-mark {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  padding: 3px;
  border: 1px solid rgba(159, 31, 38, 0.2);
  border-radius: 50%;
  background: #fffaf1;
  box-shadow: 0 8px 20px rgba(16, 28, 44, 0.12);
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-stack {
  display: grid;
  gap: 2px;
}

.brand-text {
  color: #4a2f1f;
  font-family: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  font-size: 22px;
  line-height: 1.08;
  white-space: nowrap;
}

.brand-subtext {
  color: #7b6540;
  font-family: "Noto Sans TC", system-ui, sans-serif;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.official-nav .nav-join {
  border-color: rgba(159, 31, 38, 0.34);
  background: #fffaf1;
  color: #8f1d23;
  box-shadow: 0 10px 22px rgba(143, 29, 35, 0.1);
}

.home-page {
  --home-ink: #4a2f1f;
  --home-navy: #fff4e4;
  --home-red: #9f1f26;
  --home-gold: #c79a2b;
  --home-paper: #fffaf1;
  --home-warm: #f0e3d1;
  background: #f7efe2;
}

.home-page .btn {
  border-color: #9f1f26;
  border-bottom-color: #72151a;
  background: linear-gradient(180deg, #c92b32 0%, #9f1f26 100%);
  box-shadow: 0 16px 30px rgba(143, 29, 35, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.home-page .btn:hover {
  background: linear-gradient(180deg, #d63840 0%, #8f1d23 100%);
  box-shadow: 0 20px 38px rgba(143, 29, 35, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.home-page .btn.secondary {
  border-color: rgba(159, 31, 38, 0.26);
  background: #fffaf1;
  color: #8f1d23;
  box-shadow: inset 0 -1px 0 rgba(159, 31, 38, 0.08);
}

.home-page .btn.secondary:hover {
  background: #fff4e4;
  border-color: rgba(159, 31, 38, 0.44);
  box-shadow: 0 12px 24px rgba(143, 29, 35, 0.12);
}

.official-hero {
  padding: 48px 0 70px;
  background:
    linear-gradient(90deg, rgba(159, 31, 38, 0.08) 0 1px, transparent 1px) 0 0 / 108px 108px,
    linear-gradient(180deg, #fffaf1 0%, #f1e4d2 56%, #fbf6ed 56%, #fbf6ed 100%);
}

.official-hero::before {
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.78) 0%, rgba(255, 255, 255, 0) 44%),
    linear-gradient(90deg, rgba(159, 31, 38, 0.08), rgba(199, 154, 43, 0.12) 44%, rgba(199, 154, 43, 0));
}

.hero-shell {
  grid-template-columns: minmax(520px, 0.92fr) minmax(460px, 1.08fr);
  min-height: 590px;
  border-color: rgba(15, 36, 54, 0.22);
  border-radius: 6px;
  background: var(--home-navy);
  box-shadow: 0 36px 80px rgba(31, 24, 15, 0.24);
}

.hero-shell::before {
  width: 10px;
  background: linear-gradient(180deg, #8f1d23 0%, #c79a2b 54%, #4a2f1f 100%);
}

.official-hero-content {
  min-height: 590px;
  padding: 54px 56px 50px 68px;
  background:
    linear-gradient(135deg, rgba(159, 31, 38, 0.22), rgba(159, 31, 38, 0) 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0)),
    var(--home-navy);
}

.hero-brand-lockup {
  align-items: stretch;
  gap: 14px;
  margin-bottom: 28px;
  color: rgba(248, 244, 235, 0.82);
  font-family: "Noto Sans TC", system-ui, sans-serif;
  line-height: 1.25;
}

.hero-brand-lockup > span:last-child {
  display: grid;
  align-content: center;
  gap: 2px;
}

.hero-brand-lockup strong {
  color: #f1d892;
  font-size: 12px;
  font-weight: 900;
}

.hero-mark {
  width: 72px;
  height: 72px;
  padding: 4px;
  border-color: rgba(246, 215, 125, 0.54);
  background: #fffaf1;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}

.official-hero .eyebrow {
  color: #f6d77d;
  font-size: 13px;
  font-weight: 900;
}

.official-hero h1 {
  color: #ffffff;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
}

.hero-subtitle {
  max-width: 620px;
  color: #f3d99a;
  font-size: clamp(24px, 2.2vw, 32px);
}

.hero-subtitle span {
  display: block;
}

.hero-intro {
  max-width: 610px;
  color: #dde7f0;
  font-size: 18px;
}

.hero-actions {
  gap: 12px;
}

.hero-actions .btn {
  min-height: 56px;
  padding-inline: 28px;
}

.btn.light,
button.light {
  border-color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.btn.light:hover,
button.light:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.58);
}

.hero-trust-list {
  gap: 14px;
  margin-top: 36px;
  padding-top: 26px;
  color: #d5dde6;
}

.hero-trust-list span {
  padding-left: 18px;
}

.hero-trust-list span::before {
  top: 0.6em;
  width: 7px;
  height: 7px;
  background: #f3d99a;
}

.hero-visual-wrap {
  min-height: 590px;
  background:
    linear-gradient(180deg, rgba(15, 36, 54, 0.92), rgba(15, 36, 54, 0.78)),
    #f1d0aa;
}

.hero-visual img {
  min-height: 590px;
  object-position: 58% 50%;
  filter: saturate(1.05) contrast(1.04);
}

.hero-visual::after {
  background:
    linear-gradient(90deg, rgba(15, 29, 45, 0.58), rgba(15, 29, 45, 0.02) 38%, rgba(15, 29, 45, 0.22) 100%),
    linear-gradient(180deg, rgba(15, 36, 54, 0), rgba(15, 36, 54, 0.66));
}

.hero-visual-note {
  position: absolute;
  z-index: 4;
  background: rgba(255, 250, 241, 0.92);
  color: var(--home-ink);
  border: 1px solid rgba(255, 255, 255, 0.64);
  box-shadow: 0 24px 52px rgba(16, 28, 44, 0.28);
  backdrop-filter: blur(10px);
}

.hero-visual-note {
  left: 34px;
  right: 34px;
  bottom: 34px;
  padding: 24px 26px 23px;
  border-left: 6px solid var(--home-red);
  border-radius: 6px;
}

.hero-visual-note span {
  display: block;
  color: #687582;
  font-size: 13px;
  font-weight: 850;
}

.hero-visual-note strong {
  display: block;
  margin-top: 5px;
  color: var(--home-ink);
  font-size: 19px;
  line-height: 1.36;
}

.hero-visual-note p {
  margin: 10px 0 0;
  color: #52606e;
  line-height: 1.7;
}

.hero-institution-strip {
  margin-top: 26px;
  background: rgba(255, 250, 241, 0.86);
  border-top: 1px solid rgba(15, 36, 54, 0.16);
  border-bottom: 1px solid rgba(199, 154, 43, 0.52);
  box-shadow: 0 14px 34px rgba(31, 24, 15, 0.06);
}

.hero-institution-strip div {
  min-height: 98px;
  padding: 23px 28px;
}

.hero-institution-strip span {
  color: #6b7785;
  font-weight: 850;
}

.hero-institution-strip strong {
  color: var(--home-ink);
  font-size: 18px;
}

.home-band {
  padding: 92px 0;
}

.home-band-intro {
  background:
    linear-gradient(180deg, #fbf6ed, #fffaf1);
}

.home-band-service {
  background:
    linear-gradient(90deg, rgba(199, 154, 43, 0.16) 0 1px, transparent 1px) 0 0 / 92px 92px,
    linear-gradient(180deg, #efe2d2, #f6ead8);
}

.home-band-entry {
  background:
    linear-gradient(90deg, rgba(199, 154, 43, 0.1) 0 1px, transparent 1px) 0 0 / 94px 94px,
    linear-gradient(105deg, #fff4e4 0%, #f0cfaa 56%, #fff8ec 100%);
}

.intro-layout {
  gap: 64px;
}

.section-copy p,
.section-summary,
.entry-copy p {
  color: #52606e;
  font-size: 17px;
}

.official-section-head h2,
.section-copy h2,
.entry-copy h2 {
  color: var(--home-ink);
  font-size: clamp(32px, 3vw, 46px);
}

.mission-list {
  padding: 8px 0;
  border-top-color: rgba(159, 31, 38, 0.62);
}

.mission-item {
  grid-template-columns: minmax(0, 1fr);
  padding: 26px 0;
}

.mission-item strong {
  font-family: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  font-size: 23px;
}

.service-grid {
  gap: 22px;
}

.service-item {
  min-height: 294px;
  padding: 32px;
  border-top-width: 0;
  border-left: 6px solid var(--home-red);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 250, 241, 0.92)),
    #fffaf1;
  box-shadow: 0 24px 46px rgba(31, 24, 15, 0.1);
}

.service-item::after {
  right: -44px;
  top: -48px;
  width: 150px;
  height: 150px;
  border-color: rgba(199, 154, 43, 0.34);
}

.service-index,
.role-number {
  border-radius: 6px;
  background: #4a2f1f;
  color: #f3d99a;
}

.service-item h3,
.official-role-card h3 {
  font-family: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  font-size: 24px;
}

.entry-layout {
  grid-template-columns: minmax(280px, 0.42fr) minmax(0, 1fr);
  gap: 58px;
}

.home-band-entry .eyebrow {
  color: #f3d99a;
}

.home-band-entry .entry-copy h2 {
  color: #ffffff;
}

.home-band-entry .entry-copy p {
  color: #d9e1ea;
}

.official-role-grid {
  gap: 16px;
}

.official-role-card {
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 24px;
  padding: 26px 28px;
  border-left-color: var(--home-gold);
  background:
    linear-gradient(90deg, rgba(199, 154, 43, 0.16), rgba(199, 154, 43, 0)),
    #fbf3e7;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.2);
}

.official-role-card .actions {
  gap: 10px;
}

@media (max-width: 980px) {
  .official-nav {
    min-height: 68px;
  }

  .entry-layout,
  .intro-layout {
    grid-template-columns: 1fr;
  }

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

  .official-hero-content {
    min-height: 0;
    padding: 44px 44px 42px 54px;
  }

  .hero-visual-wrap {
    min-height: 0;
  }

  .hero-visual img {
    min-height: 330px;
  }

  .hero-visual-note {
    left: 24px;
    right: 24px;
    bottom: 24px;
  }

  .official-role-card {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .official-role-card .actions {
    grid-column: 2;
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .site-header {
    position: static;
  }

  .site-header::before {
    height: 4px;
  }

  .official-nav,
  .official-container {
    width: min(1220px, calc(100vw - 24px));
  }

  .official-nav {
    gap: 5px;
    padding: 10px 0 12px;
  }

  .official-nav .brand {
    width: 100%;
    gap: 10px;
    padding-right: 0;
  }

  .brand-mark {
    width: 52px;
    height: 52px;
    padding: 3px;
  }

  .brand-text {
    font-size: 19px;
  }

  .brand-subtext {
    font-size: 11px;
  }

  .official-nav a {
    min-height: 40px;
    padding: 7px 8px;
    font-size: 13px;
  }

  .official-hero {
    padding: 18px 0 30px;
  }

  .hero-shell {
    border-radius: 6px;
  }

  .hero-shell::before {
    width: 8px;
  }

  .official-hero-content {
    padding: 30px 24px 28px 32px;
  }

  .hero-brand-lockup {
    align-items: center;
    margin-bottom: 16px;
    font-size: 12px;
  }

  .hero-mark {
    width: 56px;
    height: 56px;
  }

  .official-hero h1 {
    font-size: 38px;
    white-space: normal;
  }

  .hero-subtitle {
    font-size: 22px;
  }

  .hero-intro {
    font-size: 16px;
    line-height: 1.68;
  }

  .hero-actions .btn {
    width: 100%;
    min-height: 50px;
  }

  .hero-trust-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 26px;
    padding-top: 20px;
  }

  .hero-visual img {
    min-height: 240px;
  }

  .hero-visual-note {
    position: static;
    margin: 0;
    border-width: 1px 0 0;
    border-left-width: 6px;
    border-radius: 0;
    box-shadow: none;
  }

  .hero-visual-note strong {
    font-size: 18px;
  }

  .hero-institution-strip {
    display: grid;
    margin-top: 14px;
  }

  .home-band {
    padding: 58px 0;
  }

  .official-section-head {
    margin-bottom: 26px;
  }

  .official-section-head h2,
  .section-copy h2,
  .entry-copy h2 {
    font-size: 31px;
  }

  .section-copy p,
  .section-summary,
  .entry-copy p {
    font-size: 16px;
  }

  .service-item {
    min-height: 0;
    padding: 26px;
  }

  .official-role-card {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 22px;
  }

  .official-role-card .actions {
    grid-column: auto;
  }

  .official-role-card .btn {
    width: 100%;
  }
}

/* Warm visual refresh: remove dark blue workbench surfaces across public, role and admin pages. */
:root {
  --bg: #fff8ec;
  --surface: #fffdf7;
  --surface-2: #f6ead8;
  --text: #3a2a1e;
  --muted: #7d6653;
  --line: #ead8bf;
  --primary: #b84c31;
  --primary-dark: #8e3928;
  --accent: #b97825;
  --gold: #d8a84d;
  --ink: #4a3324;
  --ok: #3f7b4b;
  --warn: #a86419;
  --danger: #b84c31;
  --shadow: 0 12px 28px rgba(92, 58, 25, 0.09);
}

body,
.auth-page,
.admin-workbench-body,
.role-dashboard-page {
  background:
    linear-gradient(90deg, rgba(184, 76, 49, 0.05) 0 1px, transparent 1px) 0 0 / 88px 88px,
    linear-gradient(180deg, #fff8ec 0%, #f7ead9 52%, #fffdf7 100%);
  color: var(--text);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline-color: rgba(184, 76, 49, 0.28);
}

.eyebrow,
.role-kicker {
  color: var(--primary-dark);
}

.btn,
button,
input[type="submit"] {
  background: linear-gradient(180deg, #c75e3f 0%, #a9472f 100%);
  border-color: transparent;
  color: #fffdf7;
  box-shadow: 0 12px 24px rgba(169, 71, 47, 0.16);
}

.btn:hover,
button:hover,
input[type="submit"]:hover {
  background: linear-gradient(180deg, #d66a48 0%, #98402c 100%);
  box-shadow: 0 16px 30px rgba(169, 71, 47, 0.22);
}

.secondary,
button.secondary,
.btn.secondary {
  background: #fffaf2;
  color: var(--primary-dark);
  border-color: rgba(184, 76, 49, 0.28);
  box-shadow: 0 10px 20px rgba(92, 58, 25, 0.08);
}

.secondary:hover,
button.secondary:hover,
.btn.secondary:hover {
  background: #fff0df;
  border-color: rgba(184, 76, 49, 0.42);
}

.card,
.panel,
.home-title-block,
.role-card,
.auth-form,
.activity-form,
.practicum-form,
.ops-section,
.activity-guide,
.practicum-card,
.role-sidebar,
.role-feature-card {
  border-color: var(--line);
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.94), rgba(255, 250, 242, 0.98)),
    var(--surface);
  box-shadow: var(--shadow);
}

input,
select,
textarea,
.auth-form input,
.auth-form select,
.auth-form textarea {
  border-color: #e2c8aa;
  background: #fffdf8;
  color: var(--text);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
}

.table-wrap,
.activity-table-wrap {
  border-color: var(--line);
  background: #fffdf8;
  box-shadow: 0 12px 28px rgba(92, 58, 25, 0.07);
}

th,
.activity-table-wrap th {
  background: #f2dcc1;
  color: #4a2f1f;
  border-bottom-color: #dfc29e;
}

td {
  border-bottom-color: #efe0cc;
}

.table-meta {
  color: #856f5b;
}

.badge {
  border: 1px solid rgba(92, 58, 25, 0.09);
}

.badge.active,
.badge.approved,
.badge.checked_out,
.badge.published {
  background: #e9f2df;
  color: #3f6f37;
}

.badge.pending,
.badge.draft,
.badge.checked_in,
.badge.not_checked_in {
  background: #fff0c8;
  color: #885715;
}

.badge.rejected,
.badge.cancelled,
.badge.inactive {
  background: #f8dfd4;
  color: #9a3f2b;
}

.badge.trainee,
.badge.officer,
.badge.both,
.badge.manual_submission,
.badge.activity_attendance,
.badge.school_practicum {
  background: #f6e6ce;
  color: #6c461f;
}

.auth-page::after {
  background:
    linear-gradient(115deg, rgba(255, 248, 236, 0.98) 0%, rgba(255, 244, 225, 0.9) 52%, rgba(232, 197, 154, 0.78) 100%),
    linear-gradient(180deg, rgba(184, 76, 49, 0.08), rgba(216, 168, 77, 0.16));
}

.auth-shell {
  border-color: #e2c8aa;
  background: #fff8ec;
  box-shadow: 0 34px 80px rgba(92, 58, 25, 0.18);
}

.auth-panel {
  background:
    linear-gradient(145deg, rgba(255, 246, 232, 0.96), rgba(244, 217, 184, 0.94)),
    #f6e2c7;
  color: #4a2f1f;
}

.auth-panel::before,
.form-section-title span,
.role-sidebar::before,
.role-feature-card::before,
.practicum-card::before,
.activity-kpis .kpi::before {
  background: linear-gradient(180deg, #b84c31, #d8a84d);
}

.auth-panel::after {
  border-color: rgba(184, 76, 49, 0.18);
}

.auth-copy .eyebrow,
.auth-brand small {
  color: #9d5a1f;
}

.auth-copy h1,
.auth-brand strong,
.form-section-title,
.form-section-title strong {
  color: #4a2f1f;
}

.auth-copy p:not(.eyebrow),
.auth-nav a {
  color: #765943;
}

.auth-logo {
  border-color: rgba(184, 76, 49, 0.22);
  background: #fffdf7;
  box-shadow: 0 12px 26px rgba(92, 58, 25, 0.12);
}

.auth-nav {
  border-top-color: rgba(92, 58, 25, 0.12);
}

.auth-nav a {
  border-color: rgba(184, 76, 49, 0.18);
  background: rgba(255, 253, 247, 0.54);
}

.auth-nav a:hover,
.auth-nav a.active {
  border-color: rgba(184, 76, 49, 0.36);
  background: #fff4e4;
  color: #4a2f1f;
}

.auth-form-panel {
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.78), rgba(255, 248, 236, 0.96)),
    #fff8ec;
}

.admin-activity-page::before,
.admin-ops-page::before,
.role-dashboard-page::before {
  background:
    linear-gradient(90deg, rgba(184, 76, 49, 0.05) 0 1px, transparent 1px) 0 0 / 88px 88px,
    linear-gradient(180deg, #fff8ec 0%, #f6e4cf 48%, #fffdf7 100%);
}

.admin-activity-page::after,
.admin-ops-page::after,
.role-dashboard-page::after {
  background:
    linear-gradient(115deg, rgba(255, 248, 236, 0.94) 0%, rgba(255, 248, 236, 0.56) 50%, rgba(216, 168, 77, 0.11) 100%),
    linear-gradient(180deg, rgba(216, 168, 77, 0.1), rgba(184, 76, 49, 0.05));
}

.activity-hero,
.role-page-heading,
.role-dashboard-hero {
  border-color: #dfc29e;
  background:
    linear-gradient(90deg, rgba(184, 76, 49, 0.08) 0 1px, transparent 1px) 0 0 / 72px 72px,
    linear-gradient(135deg, rgba(184, 76, 49, 0.16), rgba(184, 76, 49, 0) 38%),
    linear-gradient(115deg, #fff4e4 0%, #f1d1ae 58%, #fffaf2 100%);
  color: #4a2f1f;
  box-shadow: 0 24px 54px rgba(92, 58, 25, 0.13);
}

.activity-hero::before,
.role-page-heading::before,
.role-dashboard-hero::before {
  background: linear-gradient(180deg, #b84c31, #d8a84d);
}

.activity-hero::after {
  background: linear-gradient(90deg, #d8a84d, rgba(216, 168, 77, 0));
}

.activity-hero .eyebrow,
.role-page-heading .eyebrow {
  color: #9d4b31;
}

.activity-hero h1,
.role-page-heading h1,
.role-dashboard-hero h1 {
  color: #4a2f1f;
}

.activity-hero p:not(.eyebrow),
.role-page-heading p,
.role-dashboard-hero p {
  color: #765943;
}

.activity-hero-panel,
.admin-service-hero .activity-hero-panel,
.hours-hero .activity-hero-panel,
.practicum-hero .activity-hero-panel {
  border-left-color: rgba(184, 76, 49, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.66), rgba(255, 244, 228, 0.82)),
    rgba(255, 253, 247, 0.56);
}

.activity-hero-panel span,
.activity-hero-panel small,
.activity-hero-panel strong {
  color: #5d412e;
}

.activity-kpis .kpi strong,
.activity-guide h2,
.practicum-card h3,
.practicum-card-head strong,
.role-sidebar-brand strong,
.role-feature-card strong {
  color: #4a2f1f;
}

.service-index,
.role-number,
.role-feature-card span {
  background: #b84c31;
  color: #fff8ec;
}

.dashboard-mark {
  border-color: rgba(184, 76, 49, 0.24);
  background: #fffdf7;
  box-shadow: 0 14px 30px rgba(92, 58, 25, 0.12);
}

.table-actions button.danger {
  background: #b84c31;
}

.home-band-entry .eyebrow {
  color: #ffe4a8;
}

.home-band-entry .entry-copy h2,
.home-band-entry .entry-copy p {
  color: #fffaf2;
}

.official-role-card {
  box-shadow: 0 18px 38px rgba(92, 58, 25, 0.13);
}

.admin-workbench-body .admin-page {
  display: grid;
  grid-template-columns: 254px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  width: min(1440px, calc(100vw - 32px));
  padding-top: 20px;
}

.admin-workbench-body .admin-page > .nav {
  position: sticky;
  top: 20px;
  z-index: 20;
  display: grid;
  gap: 7px;
  align-self: start;
  min-height: auto;
  margin: 0;
  padding: 14px;
  overflow: hidden;
  border: 1px solid #dfc29e;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.96), rgba(255, 244, 228, 0.96)),
    #fff8ec;
  box-shadow: 0 20px 46px rgba(92, 58, 25, 0.12);
  backdrop-filter: none;
}

.admin-workbench-body .admin-page > .nav::before {
  content: "";
  display: block;
  align-self: auto;
  width: auto;
  height: 5px;
  margin: -14px -14px 8px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(90deg, #b84c31, #d8a84d, #f3d4a4);
}

.admin-workbench-body .admin-page > .nav .brand {
  display: grid;
  min-height: 58px;
  margin: 0 0 8px;
  padding: 6px 8px 14px;
  border-bottom: 1px solid rgba(92, 58, 25, 0.12);
  color: #4a2f1f;
  font-family: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  font-size: 19px;
  font-weight: 900;
  line-height: 1.25;
}

.admin-workbench-body .admin-page > .nav .brand::after {
  content: "管理工作台";
  display: block;
  margin-top: 4px;
  color: #9a6b42;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", sans-serif;
  font-size: 12px;
  font-weight: 800;
}

.admin-workbench-body .admin-page > .nav a:not(.brand) {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #6e513a;
  font-size: 15px;
  font-weight: 820;
  text-decoration: none;
}

.admin-workbench-body .admin-page > .nav a:not(.brand):hover,
.admin-workbench-body .admin-page > .nav a:not(.brand).active {
  border-color: rgba(184, 76, 49, 0.22);
  background:
    linear-gradient(90deg, rgba(184, 76, 49, 0.1), rgba(216, 168, 77, 0.12)),
    #fff1dd;
  color: #4a2f1f;
}

.admin-workbench-body .admin-page > .nav [data-admin-logout] {
  margin-top: 8px;
  border-top: 1px solid rgba(92, 58, 25, 0.1);
}

.admin-workbench-body .admin-page > section,
.admin-workbench-body .admin-page > form,
.admin-workbench-body .admin-page > .activity-hero {
  grid-column: 2;
  min-width: 0;
}

.admin-welcome-section,
.admin-module-section,
.admin-volunteers-page > .section,
.admin-notifications-page > .section {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.92), rgba(255, 250, 242, 0.98)),
    #fffdf7;
  box-shadow: var(--shadow);
}

.admin-welcome-section .section-head {
  align-items: center;
}

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

.admin-module-card {
  position: relative;
  display: grid;
  gap: 10px;
  min-height: 166px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid #e5ceb0;
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(184, 76, 49, 0.08), rgba(216, 168, 77, 0.11)),
    #fffdf7;
  color: #4a2f1f;
  text-decoration: none;
  box-shadow: 0 14px 30px rgba(92, 58, 25, 0.08);
}

.admin-module-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, #b84c31, #d8a84d);
}

.admin-module-card span {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 30px;
  border-radius: 999px;
  background: #b84c31;
  color: #fff8ec;
  font-size: 12px;
  font-weight: 900;
}

.admin-module-card strong {
  font-family: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  font-size: 21px;
  line-height: 1.25;
}

.admin-module-card small {
  color: #7d6653;
  font-size: 14px;
  line-height: 1.6;
}

@media (max-width: 1100px) {
  .admin-workbench-body .admin-page {
    grid-template-columns: 1fr;
  }

  .admin-workbench-body .admin-page > .nav,
  .admin-workbench-body .admin-page > section,
  .admin-workbench-body .admin-page > form,
  .admin-workbench-body .admin-page > .activity-hero {
    grid-column: 1;
  }

  .admin-workbench-body .admin-page > .nav {
    position: sticky;
    top: 0;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px;
    border-radius: 0 0 8px 8px;
  }

  .admin-workbench-body .admin-page > .nav::before,
  .admin-workbench-body .admin-page > .nav .brand::after {
    display: none;
  }

  .admin-workbench-body .admin-page > .nav .brand {
    flex: 0 0 auto;
    min-height: 42px;
    margin: 0;
    padding: 10px 12px;
    border-bottom: 0;
    white-space: nowrap;
  }

  .admin-workbench-body .admin-page > .nav a:not(.brand) {
    flex: 0 0 auto;
    white-space: nowrap;
  }

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

@media (max-width: 760px) {
  .admin-workbench-body .admin-page {
    width: min(100vw - 20px, 100%);
    padding-top: 0;
  }

  .activity-hero,
  .role-page-heading,
  .role-dashboard-hero {
    grid-template-columns: 1fr;
  }

  .activity-hero > div:first-child {
    padding: 28px 24px 26px 32px;
  }

  .activity-hero h1,
  .role-page-heading h1 {
    font-size: 32px;
  }

  .activity-hero-panel {
    min-height: 0;
    padding: 20px 24px 24px 32px;
    border-left: 0;
    border-top: 1px solid rgba(184, 76, 49, 0.18);
  }

  .activity-kpis,
  .kpis,
  .admin-module-grid {
    grid-template-columns: 1fr;
  }

  .activity-workbench,
  .practicum-workbench,
  .activity-filters,
  .ops-filters {
    grid-template-columns: 1fr;
  }
}

/* Final warm pass for the public home page and any remaining dark role/admin surfaces. */
.home-page {
  --home-ink: #4a2f1f;
  --home-navy: #fff4e4;
  --home-red: #b84c31;
  --home-gold: #d8a84d;
  --home-paper: #fff8ec;
  --home-warm: #f3dec2;
  background: #fff8ec;
  color: #4a2f1f;
}

.home-page .btn {
  border-color: #b84c31;
  border-bottom-color: #8e3928;
  background: linear-gradient(180deg, #c75e3f 0%, #a9472f 100%);
  box-shadow: 0 16px 30px rgba(169, 71, 47, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.home-page .btn:hover {
  background: linear-gradient(180deg, #d66a48 0%, #98402c 100%);
  box-shadow: 0 20px 38px rgba(169, 71, 47, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.home-page .btn.secondary,
.btn.light,
button.light {
  border-color: rgba(184, 76, 49, 0.28);
  background: #fffaf2;
  color: #8e3928;
  box-shadow: inset 0 -1px 0 rgba(184, 76, 49, 0.08);
}

.home-page .btn.secondary:hover,
.btn.light:hover,
button.light:hover {
  background: #fff0df;
  border-color: rgba(184, 76, 49, 0.44);
  box-shadow: 0 12px 24px rgba(169, 71, 47, 0.12);
}

.official-hero {
  background:
    linear-gradient(90deg, rgba(184, 76, 49, 0.06) 0 1px, transparent 1px) 0 0 / 108px 108px,
    linear-gradient(180deg, #fff8ec 0%, #f4dec2 56%, #fffdf7 56%, #fffdf7 100%);
}

.hero-shell {
  border-color: #dfc29e;
  background:
    linear-gradient(90deg, rgba(184, 76, 49, 0.08) 0 1px, transparent 1px) 0 0 / 84px 84px,
    linear-gradient(115deg, #fff6e7 0%, #f1d0aa 58%, #fffaf2 100%);
  box-shadow: 0 32px 70px rgba(92, 58, 25, 0.16);
}

.hero-shell::before {
  background: linear-gradient(180deg, #b84c31 0%, #d8a84d 58%, #f1d0aa 100%);
}

.official-hero-content {
  border-right-color: rgba(184, 76, 49, 0.16);
  background:
    linear-gradient(135deg, rgba(184, 76, 49, 0.16), rgba(184, 76, 49, 0) 38%),
    linear-gradient(180deg, rgba(255, 253, 247, 0.72), rgba(255, 250, 242, 0.2));
}

.hero-brand-lockup,
.hero-brand-lockup strong,
.official-hero .eyebrow,
.official-hero h1,
.hero-subtitle,
.hero-intro,
.hero-trust-list {
  color: #4a2f1f;
  text-shadow: none;
}

.hero-brand-lockup strong,
.official-hero .eyebrow,
.hero-subtitle {
  color: #8e3928;
}

.hero-trust-list {
  border-top-color: rgba(184, 76, 49, 0.18);
}

.hero-trust-list span::before {
  background: #b84c31;
}

.hero-visual-wrap,
.hero-visual {
  background: #f1d0aa;
}

.hero-visual::after {
  background:
    linear-gradient(90deg, rgba(255, 248, 236, 0.4), rgba(255, 248, 236, 0.04) 36%, rgba(255, 248, 236, 0.24) 100%),
    linear-gradient(180deg, rgba(255, 248, 236, 0.02), rgba(93, 65, 46, 0.18));
}

.home-band-entry {
  background:
    radial-gradient(circle at 18% 18%, rgba(216, 168, 77, 0.18), rgba(216, 168, 77, 0) 30%),
    linear-gradient(105deg, #fff2dc 0%, #efd0aa 58%, #fff8ec 100%);
  color: #4a2f1f;
}

.home-band-entry .eyebrow {
  color: #8e3928;
}

.home-band-entry h2,
.home-band-entry .entry-copy h2,
.home-band-entry .entry-copy p {
  color: #4a2f1f;
}

.official-role-card {
  border-color: #dfc29e;
  background:
    linear-gradient(90deg, rgba(216, 168, 77, 0.14), rgba(216, 168, 77, 0)),
    #fffaf2;
  box-shadow: 0 18px 36px rgba(92, 58, 25, 0.12);
}

.official-role-card:hover {
  box-shadow: 0 24px 44px rgba(92, 58, 25, 0.16);
}

.site-footer {
  background: #f2dcc1;
  color: #4a2f1f;
  border-top: 1px solid #dfc29e;
}

.footer-grid p,
.footer-links a {
  color: #765943;
}

.footer-links a:hover {
  color: #8e3928;
}

.role-page-heading,
.role-dashboard-hero {
  background:
    linear-gradient(90deg, rgba(184, 76, 49, 0.08) 0 1px, transparent 1px) 0 0 / 72px 72px,
    linear-gradient(115deg, #fff4e4 0%, #f1d0aa 58%, #fffaf2 100%);
}

.role-page-heading .eyebrow,
.role-page-heading h1,
.role-page-heading p,
.role-dashboard-hero h1,
.role-dashboard-hero p {
  color: #4a2f1f;
}

.role-sidebar::before {
  background: linear-gradient(90deg, #b84c31, #d8a84d, #f3d4a4);
}

.role-side-nav a:hover,
.role-side-nav a.active {
  border-color: rgba(184, 76, 49, 0.22);
  background:
    linear-gradient(90deg, rgba(184, 76, 49, 0.1), rgba(216, 168, 77, 0.12)),
    #fff1dd;
  color: #4a2f1f;
}

.site-header {
  border-bottom-color: #dfc29e;
  box-shadow: 0 10px 30px rgba(92, 58, 25, 0.07);
}

.site-header::before {
  background: linear-gradient(90deg, #b84c31 0 34%, #d8a84d 34% 50%, #f3d4a4 50% 100%);
}

/* Admin usability pass: compact workbench layout with practical navigation density. */
.admin-workbench-body .admin-page {
  display: block;
  position: relative;
  width: min(1440px, calc(100vw - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 0 48px 276px;
}

.admin-workbench-body .admin-page > .nav {
  position: fixed;
  top: 18px;
  bottom: 18px;
  left: max(16px, calc((100vw - 1440px) / 2 + 16px));
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 236px;
  min-height: 0;
  margin: 0;
  padding: 12px;
  overflow-y: auto;
  border: 1px solid #dfc29e;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.98), rgba(255, 246, 232, 0.98)),
    #fff8ec;
  box-shadow: 0 18px 40px rgba(92, 58, 25, 0.1);
}

.admin-workbench-body .admin-page > .nav::before {
  content: "";
  display: block;
  flex: 0 0 auto;
  width: auto;
  height: 4px;
  margin: -12px -12px 8px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(90deg, #b84c31, #d8a84d, #f3d4a4);
}

.admin-workbench-body .admin-page > .nav .brand {
  display: grid;
  flex: 0 0 auto;
  min-height: 54px;
  margin: 0 0 8px;
  padding: 6px 8px 12px;
  border-bottom: 1px solid rgba(92, 58, 25, 0.12);
  color: #4a2f1f;
  font-family: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.25;
  white-space: normal;
}

.admin-workbench-body .admin-page > .nav .brand::after {
  content: "管理工作台";
  display: block;
  margin-top: 4px;
  color: #9a6b42;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", sans-serif;
  font-size: 12px;
  font-weight: 800;
}

.admin-workbench-body .admin-page > .nav a:not(.brand) {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #6e513a;
  font-size: 14px;
  font-weight: 820;
  text-decoration: none;
}

.admin-workbench-body .admin-page > .nav a:not(.brand):hover,
.admin-workbench-body .admin-page > .nav a:not(.brand).active {
  border-color: rgba(184, 76, 49, 0.22);
  background:
    linear-gradient(90deg, rgba(184, 76, 49, 0.1), rgba(216, 168, 77, 0.12)),
    #fff1dd;
  color: #4a2f1f;
}

.admin-workbench-body .admin-page > .nav [data-admin-logout] {
  margin-top: auto;
  border-top: 1px solid rgba(92, 58, 25, 0.1);
}

.admin-workbench-body .admin-page > section,
.admin-workbench-body .admin-page > form,
.admin-workbench-body .admin-page > .activity-hero {
  min-width: 0;
  margin-right: 0;
  margin-left: 0;
}

.admin-welcome-section,
.admin-module-section,
.admin-volunteers-page > .section,
.admin-notifications-page > .section,
.admin-ops-page .ops-section,
.admin-activity-page > .section {
  margin-top: 14px;
  margin-bottom: 14px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.94), rgba(255, 250, 242, 0.99)),
    #fffdf7;
  box-shadow: 0 14px 32px rgba(92, 58, 25, 0.08);
}

.admin-workbench-body .section-head {
  align-items: center;
  margin-bottom: 12px;
}

.admin-workbench-body h1 {
  font-size: 34px;
  line-height: 1.16;
}

.admin-workbench-body h2 {
  font-size: 24px;
  line-height: 1.22;
}

.admin-welcome-section .section-head {
  min-height: 0;
}

.admin-workbench-body .kpis,
.admin-workbench-body .activity-kpis {
  gap: 10px;
  margin: 12px 0 14px;
}

.admin-workbench-body .kpi {
  min-height: 86px;
  padding: 14px 16px;
  border-color: #e5ceb0;
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.94), rgba(255, 249, 239, 0.98)),
    #fffdf7;
}

.admin-workbench-body .kpi strong,
.admin-workbench-body .activity-kpis .kpi strong {
  font-size: 28px;
}

.admin-workbench-body .activity-hero {
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.32fr);
  margin: 0 0 12px;
  border-color: #dfc29e;
  background:
    linear-gradient(90deg, rgba(184, 76, 49, 0.08) 0 1px, transparent 1px) 0 0 / 72px 72px,
    linear-gradient(115deg, #fff4e4 0%, #f1d1ae 64%, #fffaf2 100%);
  box-shadow: 0 18px 42px rgba(92, 58, 25, 0.11);
}

.admin-workbench-body .activity-hero > div:first-child {
  padding: 28px 30px 28px 38px;
}

.admin-workbench-body .activity-hero h1 {
  max-width: 780px;
  font-size: 38px;
}

.admin-workbench-body .activity-hero p:not(.eyebrow) {
  max-width: 760px;
  margin-top: 10px;
  font-size: 16px;
  line-height: 1.65;
}

.admin-workbench-body .activity-hero-panel {
  align-content: center;
  min-height: 0;
  padding: 24px;
}

.admin-workbench-body .activity-hero-panel strong {
  font-size: 20px;
}

.admin-workbench-body .activity-workbench {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.38fr);
  gap: 14px;
  margin: 14px 0;
}

.admin-workbench-body .activity-form,
.admin-workbench-body .activity-guide {
  padding: 20px;
}

.admin-workbench-body .activity-guide h2 {
  font-size: 22px;
}

.admin-workbench-body .admin-module-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.admin-workbench-body .admin-module-card {
  min-height: 132px;
  padding: 16px;
}

.admin-workbench-body .admin-module-card strong {
  font-size: 20px;
}

.admin-workbench-body .table-wrap,
.admin-workbench-body .activity-table-wrap {
  border-color: #e2c8aa;
}

.admin-workbench-body th,
.admin-workbench-body .activity-table-wrap th {
  background: #efd3ae;
  color: #4a2f1f;
}

.notification-preview-section {
  margin: 14px 0;
}

.notification-preview-form {
  border-color: #d9b88f;
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.98), rgba(255, 248, 235, 0.99)),
    #fffaf1;
}

.notification-workbench {
  display: grid;
  grid-template-columns: minmax(460px, 0.96fr) minmax(420px, 0.84fr);
  gap: 14px;
  margin: 14px 0;
}

.notification-workbench .activity-form,
.notification-preview-section .activity-form {
  min-width: 0;
  border-color: #e2c8aa;
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.96), rgba(255, 249, 239, 0.99)),
    #fffdf7;
}

.notification-workbench code {
  padding: 2px 6px;
  border: 1px solid #e5ceb0;
  border-radius: 6px;
  background: #fff4e4;
  color: #7b3d29;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
}

.notification-template-preview,
.notification-delivery-panel,
.selected-recipient-summary,
.selected-recipient-dialog {
  border: 1px solid #e2c8aa;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(184, 76, 49, 0.07), rgba(216, 168, 77, 0.09)),
    #fffaf2;
}

.notification-template-preview,
.selected-recipient-summary,
.selected-recipient-dialog {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.selected-recipient-summary {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.selected-recipient-summary span {
  color: #9a6b42;
  font-size: 12px;
  font-weight: 900;
}

.selected-recipient-summary strong {
  display: block;
  margin-top: 4px;
  color: #4a2f1f;
  font-size: 18px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(16, 28, 44, 0.54);
}

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

.modal-open {
  overflow: hidden;
}

.selected-recipient-dialog {
  width: min(860px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 40px));
  overflow: auto;
  box-shadow: 0 28px 80px rgba(16, 28, 44, 0.28);
}

.selected-recipient-dialog-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.selected-recipient-dialog-head h2 {
  margin: 4px 0 0;
  color: #4a2f1f;
  font-family: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  font-size: 26px;
}

.selected-recipient-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.selected-recipient-head span {
  color: #9a6b42;
  font-size: 12px;
  font-weight: 900;
}

.selected-recipient-head strong {
  display: block;
  margin-top: 4px;
  color: #4a2f1f;
  font-size: 18px;
}

.selected-recipient-tools {
  margin-top: 4px;
}

.selected-recipient-list {
  display: grid;
  max-height: min(360px, 42vh);
  overflow: auto;
  border: 1px solid rgba(154, 107, 66, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.66);
}

.selected-recipient-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(154, 107, 66, 0.14);
}

.selected-recipient-row:last-child {
  border-bottom: 0;
}

.selected-recipient-row input {
  width: auto;
  margin-top: 4px;
}

.selected-recipient-row strong,
.selected-recipient-row small {
  display: block;
}

.selected-recipient-row small {
  margin-top: 3px;
  color: #7a6a58;
  line-height: 1.5;
}

.selected-recipient-modal-actions {
  justify-content: flex-end;
  margin-top: 4px;
}

.notification-template-preview span,
.notification-delivery-panel .eyebrow {
  color: #9a6b42;
  font-size: 12px;
  font-weight: 900;
}

.notification-template-preview strong {
  color: #4a2f1f;
  font-size: 16px;
}

.notification-template-preview p {
  margin: 0;
  color: #6e513a;
  line-height: 1.65;
  white-space: pre-wrap;
}

.rendered-preview {
  min-height: 150px;
}

.notification-html-preview {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.notification-html-preview iframe {
  width: 100%;
  min-height: 520px;
  border: 1px solid rgba(154, 107, 66, 0.18);
  border-radius: 12px;
  background: #f5f6f8;
}

.notification-grid-section {
  margin-top: 14px;
}

.notification-delivery-panel {
  margin-top: 16px;
  padding: 18px;
}

.notification-delivery-panel h3 {
  margin: 0;
  color: #4a2f1f;
  font-family: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  font-size: 22px;
}
.notification-pagination {
  padding-top: 4px;
}

.notification-pagination[hidden] {
  display: none !important;
}


.form-grid.two,
.form-grid.four {
  display: grid;
  gap: 12px;
}

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

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

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

@media (max-width: 1100px) {
  .admin-workbench-body .admin-page {
    width: min(100vw - 20px, 100%);
    padding: 76px 0 38px;
  }

  .admin-workbench-body .admin-page > .nav {
    top: 0;
    right: 10px;
    bottom: auto;
    left: 10px;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    align-items: center;
    flex-direction: row;
    gap: 6px;
    width: auto;
    min-height: 0;
    max-height: none;
    padding: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: 0 0 8px 8px;
  }

  .admin-workbench-body .admin-page > .nav::before,
  .admin-workbench-body .admin-page > .nav .brand::after {
    display: none;
  }

  .admin-workbench-body .admin-page > .nav .brand,
  .admin-workbench-body .admin-page > .nav a:not(.brand) {
    flex: 0 0 auto;
    min-height: 36px;
    margin: 0;
    padding: 8px 11px;
    border-bottom: 0;
    white-space: nowrap;
  }

  .admin-workbench-body .admin-page > .nav .brand {
    font-size: 14px;
  }

  .admin-workbench-body .admin-page > .nav [data-admin-logout] {
    margin-top: 0;
    border-top: 0;
  }

  .admin-workbench-body .admin-module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .admin-workbench-body .admin-page {
    width: min(100vw - 16px, 100%);
    padding-top: 70px;
  }

  .admin-welcome-section,
  .admin-module-section,
  .admin-volunteers-page > .section,
  .admin-notifications-page > .section,
  .admin-ops-page .ops-section,
  .admin-activity-page > .section {
    padding: 18px;
  }

  .admin-workbench-body h1 {
    font-size: 30px;
  }

  .admin-workbench-body h2 {
    font-size: 23px;
  }

  .admin-workbench-body .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .admin-workbench-body .activity-hero {
    grid-template-columns: 1fr;
  }

  .admin-workbench-body .activity-hero > div:first-child {
    padding: 22px 20px;
  }

  .admin-workbench-body .activity-hero h1 {
    font-size: 29px;
  }

  .admin-workbench-body .activity-hero-panel {
    padding: 18px 20px;
    border-top: 1px solid rgba(184, 76, 49, 0.18);
    border-left: 0;
  }

  .admin-workbench-body .kpis,
  .admin-workbench-body .activity-kpis,
  .admin-workbench-body .admin-module-grid {
    grid-template-columns: 1fr;
  }

  .admin-workbench-body .activity-workbench {
    grid-template-columns: 1fr;
  }

  .notification-workbench,
  .form-grid.two,
  .form-grid.four,
  .selected-recipient-summary {
    grid-template-columns: 1fr;
  }

  .selected-recipient-dialog-head {
    display: grid;
  }

  .notification-delivery-panel {
    padding: 14px;
  }

  .admin-workbench-body .admin-page > .nav {
    right: 8px;
    left: 8px;
    padding: 7px;
  }

  .admin-workbench-body .admin-page > .nav .brand,
  .admin-workbench-body .admin-page > .nav a:not(.brand) {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 13px;
  }

  .admin-workbench-body .admin-page > .nav .brand {
    font-size: 13px;
  }

  .admin-workbench-body .table-wrap:has(tbody:empty) table,
  .admin-workbench-body .activity-table-wrap:has(tbody:empty) table {
    display: none;
  }
}

/* UI fixes 2026-05-04: registration field order and dashboard readability */
.registration-form .field-note {
  margin: -2px 0 4px;
  color: #5f422e;
  font-size: 13px;
  line-height: 1.6;
  font-weight: 650;
}

.registration-form .account-note {
  padding: 10px 12px;
  border: 1px solid rgba(184, 76, 49, 0.16);
  border-radius: 8px;
  background: rgba(255, 244, 228, 0.66);
}

.registration-form .account-credentials-row,
.registration-form .email-verification-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.registration-form .final-verification-title {
  margin-top: 10px;
}

.registration-form .verification-actions {
  margin-top: -4px;
  align-items: center;
}

.registration-form .verification-actions .message {
  min-height: auto;
  margin: 0;
  color: #5f422e;
  font-size: 13px;
  font-weight: 650;
}


/* Legacy quick claim 2026-05-14 feedback */
.legacy-claim-card {
  margin-top: 18px;
  border-color: rgba(180, 35, 42, 0.18);
  background: linear-gradient(180deg, #fffdf9 0%, #ffffff 100%);
}

.legacy-claim-standalone {
  gap: 14px;
  border-color: rgba(31, 95, 139, 0.2);
  background:
    radial-gradient(circle at 88% 0%, rgba(31, 95, 139, 0.1), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #fffdf9 100%);
}

.legacy-claim-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid rgba(31, 95, 139, 0.16);
  border-radius: 12px;
  background: rgba(238, 242, 246, 0.64);
}

.legacy-claim-head h2 {
  margin-top: 4px;
  color: #24364a;
  font-size: 24px;
}

.legacy-claim-head p {
  margin: 6px 0 0;
  color: #5f422e;
}

.legacy-claim-head .btn {
  white-space: nowrap;
}

.legacy-claim-card .account-note {
  padding: 10px 12px;
  border: 1px solid rgba(184, 76, 49, 0.16);
  border-radius: 8px;
  background: rgba(255, 244, 228, 0.66);
  color: #5f422e;
  font-size: 13px;
  line-height: 1.6;
  font-weight: 650;
}

.legacy-claim-card .account-credentials-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.legacy-claim-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(31, 95, 139, 0.16);
  border-radius: 8px;
  background: rgba(238, 242, 246, 0.68);
}

.legacy-claim-summary span {
  display: grid;
  gap: 2px;
  color: var(--text);
  font-size: 14px;
}

.legacy-claim-summary strong {
  color: var(--muted);
  font-size: 12px;
}

.legacy-claim-status {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid rgba(31, 95, 139, 0.18);
  border-left: 5px solid var(--accent);
  border-radius: 10px;
  background: rgba(238, 242, 246, 0.82);
  color: var(--text);
}

.legacy-claim-status[hidden] {
  display: none;
}

.legacy-claim-status strong {
  font-size: 16px;
}

.legacy-claim-status p {
  margin: 0;
  color: var(--muted);
}

.legacy-claim-status.is-pending {
  border-left-color: var(--accent);
  background: rgba(238, 242, 246, 0.9);
}

.legacy-claim-status.is-ok,
.legacy-claim-status.is-success {
  border-left-color: var(--ok);
  background: rgba(21, 115, 71, 0.08);
}

.legacy-claim-status.is-error {
  border-left-color: var(--danger);
  background: rgba(180, 35, 42, 0.08);
}

.legacy-claim-status.is-success strong {
  color: var(--ok);
}

.legacy-claim-status.is-error strong {
  color: var(--danger);
}

.legacy-claim-status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.legacy-claim-status-actions[hidden] {
  display: none;
}

.legacy-claim-actions {
  align-items: center;
  flex-wrap: wrap;
}

.role-dashboard-page .role-dashboard-hero {
  color: #3a2418;
}

.role-dashboard-page .role-dashboard-hero .eyebrow {
  color: #8e3928;
  text-shadow: none;
}

.role-dashboard-page .role-dashboard-hero h1,
.role-dashboard-page .role-dashboard-hero p,
.role-dashboard-page .role-dashboard-hero #userWelcome,
.role-dashboard-page .role-dashboard-hero #dashboardMessage {
  color: #3a2418;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.44);
}

.role-dashboard-page .role-dashboard-meta {
  border-color: rgba(92, 58, 25, 0.2);
  background: rgba(255, 253, 247, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.role-dashboard-page .role-dashboard-meta div {
  background: rgba(255, 250, 242, 0.84);
}

.role-dashboard-page .role-dashboard-meta span {
  color: #7f351f;
  text-shadow: none;
}

.role-dashboard-page .role-dashboard-meta strong {
  color: #2f2118;
  text-shadow: none;
}

@media (max-width: 720px) {
  .registration-route-guide {
    grid-template-columns: 1fr;
  }

  .legacy-claim-head {
    grid-template-columns: 1fr;
  }

  .legacy-claim-head .btn {
    justify-self: start;
    white-space: normal;
  }

  .registration-form .account-credentials-row,
  .registration-form .email-verification-row,
  .legacy-claim-card .account-credentials-row,
  .legacy-claim-summary {
    grid-template-columns: 1fr;
  }
}

/* Admin account role split 2026-05-04 */
.role-management-section {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.role-management-head {
  align-items: stretch;
}

.role-search-box {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 10px;
  align-items: end;
  min-width: min(520px, 100%);
}

.role-search-box label {
  display: grid;
  gap: 6px;
  color: #24364a;
  font-size: 13px;
  font-weight: 760;
}

.account-role-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.account-summary-card {
  padding: 14px 16px;
  border: 1px solid rgba(16, 28, 44, 0.12);
  border-radius: 8px;
  background: linear-gradient(180deg, #fffdf8, #fff4e4);
  box-shadow: 0 12px 28px rgba(92, 58, 25, 0.08);
}

.account-summary-card span,
.hours-summary-block span {
  display: block;
  color: #7f351f;
  font-size: 12px;
  font-weight: 820;
}

.account-summary-card strong {
  display: block;
  margin-top: 6px;
  color: #2f2118;
  font-size: 18px;
  overflow-wrap: anywhere;
}

.role-management-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: stretch;
}

.account-role-panel {
  display: grid;
  gap: 12px;
}

.subsection-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.account-card-list {
  display: grid;
  gap: 12px;
}

.account-detail-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(16, 28, 44, 0.12);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(30, 41, 59, 0.06);
}

.account-card-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.account-card-head h4 {
  margin: 0 0 8px;
  color: #1f2933;
  font-size: 20px;
}


.official-profile-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(74, 47, 31, 0.16);
  background:
    linear-gradient(135deg, rgba(143, 29, 35, 0.08), rgba(199, 154, 43, 0.1)),
    #fffdf8;
}

.official-profile-title-block {
  display: grid;
  gap: 16px;
}

.official-profile-title-row {
  display: flex;
  gap: 18px;
  align-items: center;
}

.official-seal {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 74px;
  height: 74px;
  border: 2px solid rgba(143, 29, 35, 0.75);
  border-radius: 50%;
  color: #8f1d23;
  background: rgba(255, 255, 255, 0.78);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.08em;
  box-shadow: inset 0 0 0 6px rgba(143, 29, 35, 0.06);
}

.official-profile-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.official-profile-meta div {
  padding: 10px 12px;
  border: 1px solid rgba(16, 28, 44, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.official-profile-meta dt {
  margin: 0 0 4px;
  color: #687582;
  font-size: 12px;
  font-weight: 850;
}

.official-profile-meta dd {
  margin: 0;
  color: #1f2933;
  font-size: 15px;
  font-weight: 800;
}

.official-profile-actions {
  align-self: flex-start;
}

@media (max-width: 760px) {
  .official-profile-title-row {
    align-items: flex-start;
  }

  .official-seal {
    width: 58px;
    height: 58px;
    font-size: 14px;
  }

  .official-profile-meta {
    grid-template-columns: 1fr;
  }
}

@media print {
  @page {
    size: A4;
    margin: 14mm;
  }

  body.admin-workbench-body {
    background: #ffffff !important;
  }

  .no-print,
  .admin-volunteer-detail-page > .nav,
  #detailMessage,
  .role-profile-panel form,
  .role-profile-panel button,
  .role-profile-form,
  .actions {
    display: none !important;
  }

  .admin-volunteer-detail-page {
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .admin-volunteer-detail-page .section,
  .admin-volunteer-detail-page .panel,
  .account-summary-card,
  .role-profile-panel {
    break-inside: avoid;
    box-shadow: none !important;
    background: #ffffff !important;
  }

  .official-profile-hero {
    border: 1px solid #222;
    padding: 14px;
  }

  .official-seal {
    color: #222;
    border-color: #222;
    box-shadow: none;
  }

  .detail-summary-grid,
  .detail-grid-two,
  .account-detail-grid,
  .official-profile-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .table-wrap {
    overflow: visible !important;
    border: 1px solid #222;
  }

  table {
    width: 100% !important;
    min-width: 0 !important;
    border-collapse: collapse;
  }

  th,
  td {
    border-color: #333 !important;
    color: #111 !important;
    font-size: 11px;
  }
}

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

.account-detail-grid div {
  min-width: 0;
  padding: 10px 12px;
  border-radius: 7px;
  background: #f8fafc;
  border: 1px solid rgba(16, 28, 44, 0.08);
}

.account-detail-grid dt {
  margin: 0 0 4px;
  color: #687582;
  font-size: 12px;
  font-weight: 800;
}

.account-detail-grid dd {
  margin: 0;
  color: #1f2933;
  font-size: 14px;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.hours-summary-block {
  min-width: 170px;
  padding: 12px 14px;
  border-radius: 8px;
  background: linear-gradient(180deg, #fff4e4, #fffdf8);
  border: 1px solid rgba(184, 76, 49, 0.16);
  text-align: right;
}

.hours-summary-block strong {
  display: block;
  margin-top: 4px;
  color: #2f2118;
  font-size: 26px;
  line-height: 1.1;
}

.hours-summary-block small {
  display: block;
  margin-top: 5px;
  color: #5f422e;
  font-size: 12px;
  font-weight: 700;
}

.account-card-foot {
  color: #687582;
  font-size: 13px;
}

@media (max-width: 980px) {
  .role-management-grid,
  .account-role-summary {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .account-card-head {
    flex-direction: column;
  }

  .account-detail-grid {
    grid-template-columns: 1fr;
  }

  .hours-summary-block {
    width: 100%;
    text-align: left;
  }
}

/* Admin account table pagination 2026-05-04 */
.account-table-wrap {
  border-color: rgba(16, 28, 44, 0.14);
  box-shadow: 0 12px 28px rgba(31, 24, 15, 0.06);
}

.account-management-table {
  min-width: 1180px;
}

.account-management-table th {
  background: #4a2f1f;
  color: #f8f4eb;
  white-space: nowrap;
}

.account-management-table td {
  color: #1f2933;
}

.account-management-table td strong {
  color: #17212b;
}

.account-management-table .table-meta {
  margin-top: 5px;
  color: #52606e;
}

.account-management-table .table-meta strong {
  color: #344252;
  font-weight: 760;
}

.compact-actions {
  flex-wrap: nowrap;
}

.compact-actions button {
  min-height: 40px;
  padding: 8px 12px;
  white-space: nowrap;
}

.table-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-height: 42px;
  margin-top: 12px;
}

.table-pagination button {
  min-height: 38px;
  padding: 7px 13px;
}

.pagination-status {
  color: #52606e;
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 760px) {
  .admin-volunteers-page .account-table-wrap {
    overflow: visible;
    border: 0;
    box-shadow: none;
    background: transparent;
  }

  .admin-volunteers-page .account-management-table {
    min-width: 0;
  }

  .admin-volunteers-page .account-management-table thead {
    display: none;
  }

  .admin-volunteers-page .account-management-table,
  .admin-volunteers-page .account-management-table tbody,
  .admin-volunteers-page .account-management-table tr,
  .admin-volunteers-page .account-management-table td {
    display: block;
    width: 100%;
  }

  .admin-volunteers-page .account-management-table tr {
    margin-bottom: 12px;
    border: 1px solid rgba(16, 28, 44, 0.12);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 22px rgba(30, 41, 59, 0.06);
    overflow: hidden;
  }

  .admin-volunteers-page .account-management-table td {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 10px;
    border-bottom: 1px solid rgba(16, 28, 44, 0.08);
  }

  .admin-volunteers-page .account-management-table td::before {
    content: attr(data-label);
    color: #687582;
    font-size: 12px;
    font-weight: 800;
  }

  .table-pagination {
    justify-content: flex-start;
  }
}

/* Admin volunteer detail page 2026-05-04 */
.detail-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding: 24px;
  border: 1px solid rgba(16, 28, 44, 0.14);
  border-radius: 8px;
  background: linear-gradient(115deg, #fff4e4 0%, #f7dcc0 58%, #fffaf2 100%);
  box-shadow: 0 18px 42px rgba(92, 58, 25, 0.1);
}

.detail-summary-grid,
.role-module-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.detail-summary-grid .account-summary-card small {
  display: block;
  margin-top: 5px;
  color: #5f422e;
  font-size: 12px;
  font-weight: 700;
}

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

.role-module-card {
  padding: 16px;
  border: 1px solid rgba(16, 28, 44, 0.12);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(30, 41, 59, 0.06);
}

.role-module-card h3 {
  margin: 0;
  color: #1f2933;
}

.role-module-card p:not(.eyebrow) {
  color: #52606e;
}

.detail-table {
  min-width: 760px;
}

.detail-table th {
  background: #4a2f1f;
  color: #f8f4eb;
}

.empty-cell {
  color: #687582;
  text-align: center;
  padding: 24px;
}

.inline-detail-link {
  color: #8f1d23;
  font-weight: 800;
  text-decoration: none;
}

.inline-detail-link:hover {
  text-decoration: underline;
}

@media (max-width: 980px) {
  .detail-summary-grid,
  .role-module-grid,
  .detail-grid-two {
    grid-template-columns: 1fr;
  }

  .detail-hero {
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  .admin-volunteer-detail-page .table-wrap {
    overflow: auto;
  }
}

.activity-latest-signups-row td {
  padding: 0 18px 18px;
  background: #fffaf2;
  border-top: 0;
}

.latest-signups-panel {
  border: 1px solid rgba(74, 47, 31, 0.16);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 250, 242, 0.96));
  overflow: hidden;
}

.latest-signups-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(74, 47, 31, 0.12);
}

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

.latest-signups-table {
  min-width: 860px;
  font-size: 0.9rem;
}

.latest-signups-table th {
  background: rgba(74, 47, 31, 0.08);
  color: #2f2118;
}

.latest-signups-table td,
.latest-signups-table th {
  padding: 10px 12px;
}

.latest-signups-empty {
  padding: 14px 16px;
  border: 1px dashed rgba(74, 47, 31, 0.18);
  border-radius: 12px;
  color: #7a6a5b;
  background: rgba(255, 255, 255, 0.62);
}

.role-profile-panel {
  grid-column: span 4;
}

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

.role-profile-form label,
.role-inline-form input,
.role-inline-form select {
  min-width: 0;
}

.role-profile-form label {
  color: #52606e;
  font-size: 13px;
  font-weight: 800;
}

.role-profile-form input,
.role-profile-form textarea,
.role-profile-form select,
.role-inline-form input,
.role-inline-form select {
  width: 100%;
  margin-top: 6px;
}

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

.role-inline-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr)) auto;
  gap: 10px;
  align-items: end;
  margin: 12px 0 16px;
}

@media (max-width: 980px) {
  .role-profile-panel {
    grid-column: span 1;
  }

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

.profile-submission-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  gap: 16px;
  align-items: start;
}

.profile-submission-form [hidden] {
  display: none !important;
}

.submission-list {
  display: grid;
  gap: 12px;
}

.submission-card {
  padding: 14px;
  border: 1px solid rgba(16, 28, 44, 0.1);
  border-radius: 12px;
  background: #fffaf2;
}

@media (max-width: 980px) {
  .profile-submission-workbench {
    grid-template-columns: 1fr;
  }
}


.admin-grade-page {
  width: min(1720px, calc(100vw - 24px));
}

.grade-workbench {
  display: block;
}

.grade-filters {
  width: min(780px, 100%);
  grid-template-columns: minmax(280px, 1fr) minmax(180px, 220px);
}

.grade-batch-summary {
  margin-top: 4px;
  color: #7a4f2a;
  font-size: 13px;
  font-weight: 800;
}

.grade-select-all,
.grade-row-select {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #4a2f1f;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.grade-row-select {
  margin-bottom: 8px;
}

.grade-select-all input,
.grade-row-select input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.grade-dirty-badge {
  display: inline-flex;
  margin-left: 8px;
  vertical-align: middle;
}

.grade-grid-section,
.grade-records-section {
  position: relative;
}

.grade-hidden-compat,
.grade-hidden-compat[hidden] {
  display: none !important;
}


.grade-grid-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.grade-grid-summary-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.grade-grid-table-wrap {
  overflow-x: auto;
  position: relative;
}

.grade-grid-table-wrap table {
  min-width: 1420px;
}

.grade-grid-table-wrap th,
.grade-grid-table-wrap td {
  vertical-align: top;
}

.grade-grid-table-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 6;
}

.grade-grid-table-wrap tbody tr {
  transition: background 0.16s ease, box-shadow 0.16s ease;
}

.grade-grid-table-wrap tbody tr:hover {
  background: rgba(255, 250, 241, 0.72);
}

.grade-trainee-row.previewing {
  background: rgba(180, 35, 42, 0.07);
}

.grade-trainee-row.previewing td {
  box-shadow: inset 0 -1px 0 rgba(16, 28, 44, 0.08), inset 4px 0 0 var(--primary);
}

.grade-trainee-row.is-busy {
  opacity: 0.7;
}

.grade-trainee-row.is-dirty {
  background: rgba(216, 168, 77, 0.12);
}

.grade-trainee-row.is-dirty td {
  box-shadow: inset 0 -1px 0 rgba(16, 28, 44, 0.08), inset 4px 0 0 #d8a84d;
}

.grade-student-cell {
  min-width: 260px;
}

.grade-student-cell strong {
  color: #3f2a1e;
}

.grade-sticky-student-head,
.grade-sticky-student-cell {
  position: sticky;
  left: 0;
  z-index: 5;
  background: #fffdf8;
  box-shadow: 10px 0 18px rgba(74, 47, 31, 0.08);
}

.grade-sticky-student-head {
  z-index: 8;
  background: #efd3ae;
}

.grade-sticky-actions-head,
.grade-sticky-actions-cell {
  position: sticky;
  right: 0;
  z-index: 5;
  background: #fffdf8;
  box-shadow: -10px 0 18px rgba(74, 47, 31, 0.08);
}

.grade-sticky-actions-head {
  z-index: 8;
  background: #efd3ae;
}

.grade-trainee-row:hover .grade-sticky-student-cell,
.grade-trainee-row:hover .grade-sticky-actions-cell {
  background: rgba(255, 250, 241, 0.96);
}

.grade-trainee-row.previewing .grade-sticky-student-cell,
.grade-trainee-row.previewing .grade-sticky-actions-cell {
  background: rgba(255, 247, 244, 0.98);
}

.grade-trainee-row.is-dirty .grade-sticky-student-cell,
.grade-trainee-row.is-dirty .grade-sticky-actions-cell {
  background: rgba(255, 250, 241, 0.98);
}

.grade-inline-select,
.grade-inline-input,
.grade-inline-textarea {
  width: 100%;
  border: 1px solid rgba(16, 28, 44, 0.16);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.grade-inline-select,
.grade-inline-input {
  min-height: 40px;
  padding: 8px 10px;
}

.grade-inline-textarea {
  min-height: 88px;
  padding: 9px 10px;
  resize: vertical;
}

.grade-date-input {
  width: 164px;
  min-width: 164px;
}

.grade-status-cell {
  min-width: 250px;
}

.grade-status-cell .badge {
  margin-bottom: 6px;
}

.grade-row-actions {
  min-width: 320px;
}

.grade-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(132px, 1fr));
  gap: 8px;
}

.grade-inline-btn {
  min-height: 40px;
  padding: 8px 12px;
  white-space: nowrap;
}

.grade-send-btn {
  border: 0;
  border-radius: 8px;
  background: linear-gradient(180deg, #c55b35, #b4232a);
  color: #fff;
  font-weight: 700;
}

.grade-send-btn:hover:enabled {
  background: linear-gradient(180deg, #bb5631, #9f1f26);
}

.grade-row-hint {
  margin-top: 8px;
}

.grade-grid-summary-actions-wide {
  max-width: 980px;
}

.grade-file-picker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  cursor: pointer;
}

.grade-import-file-name {
  max-width: 210px;
  color: var(--muted);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.grade-import-modal {
  z-index: 2110;
}

.grade-import-dialog {
  width: min(1060px, calc(100vw - 32px));
}

.grade-import-notice {
  margin: 0 0 14px;
  border: 1px solid rgba(31, 95, 139, 0.18);
  border-radius: 10px;
  background: rgba(239, 246, 255, 0.72);
  color: #274761;
  padding: 10px 12px;
  font-size: 14px;
}

.grade-import-success {
  display: grid;
  gap: 4px;
  margin: 0 0 14px;
  border: 1px solid rgba(21, 115, 71, 0.24);
  border-radius: 10px;
  background: rgba(240, 253, 244, 0.9);
  color: #14532d;
  padding: 12px 14px;
  font-size: 14px;
}

.grade-import-success[hidden] {
  display: none !important;
}

.grade-import-success strong {
  font-size: 15px;
}

.grade-import-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.grade-import-stats span {
  border: 1px solid rgba(154, 107, 66, 0.18);
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
  color: #7a4f2a;
  font-size: 13px;
  font-weight: 800;
}

.grade-import-stats strong {
  display: block;
  margin-top: 4px;
  color: #3f2a1e;
  font-size: 20px;
}

.grade-import-result-list {
  display: grid;
  gap: 10px;
  max-height: min(460px, 50vh);
  overflow: auto;
  padding-right: 4px;
}

.grade-import-result-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(142px, auto);
  gap: 12px;
  align-items: start;
  border: 1px solid rgba(16, 28, 44, 0.12);
  border-radius: 10px;
  background: #fff;
  padding: 12px;
}

.grade-import-result-item.matched {
  border-color: rgba(22, 101, 52, 0.24);
  background: rgba(240, 253, 244, 0.68);
}

.grade-import-result-item.duplicate,
.grade-import-result-item.duplicate_row {
  border-color: rgba(154, 91, 0, 0.26);
  background: rgba(255, 251, 235, 0.84);
}

.grade-import-result-item.not_found,
.grade-import-result-item.invalid {
  border-color: rgba(180, 35, 42, 0.24);
  background: rgba(255, 247, 247, 0.86);
}

.grade-import-candidates {
  margin: 8px 0 0;
  padding-left: 18px;
  color: #5f4330;
  font-size: 13px;
}

.badge.matched {
  background: #dff3e8;
  color: var(--ok);
}

.badge.duplicate,
.badge.duplicate_row {
  background: #fff3cd;
  color: var(--warn);
}

.badge.not_found,
.badge.invalid {
  background: #f8d7da;
  color: var(--danger);
}

.grade-batch-modal {
  z-index: 2100;
}

.grade-batch-dialog {
  width: min(980px, calc(100vw - 32px));
}

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

.grade-batch-stats span {
  border: 1px solid rgba(154, 107, 66, 0.18);
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
  color: #7a4f2a;
  font-size: 13px;
  font-weight: 800;
}

.grade-batch-stats strong {
  display: block;
  margin-top: 4px;
  color: #3f2a1e;
  font-size: 20px;
}

.grade-batch-result-list {
  display: grid;
  gap: 10px;
  max-height: min(430px, 48vh);
  overflow: auto;
  padding-right: 4px;
}

.grade-batch-result-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  border: 1px solid rgba(16, 28, 44, 0.12);
  border-radius: 10px;
  background: #fff;
  padding: 12px;
}

.grade-batch-result-item.is-sendable {
  border-color: rgba(22, 101, 52, 0.24);
  background: rgba(240, 253, 244, 0.64);
}

.grade-batch-result-item.failed {
  border-color: rgba(180, 35, 42, 0.24);
  background: rgba(255, 247, 247, 0.86);
}

.grade-batch-result-item.sent {
  border-color: rgba(22, 101, 52, 0.24);
  background: rgba(240, 253, 244, 0.82);
}

.grade-pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}
.grade-records-pagination[hidden] {
  display: none !important;
}


.grade-preview-modal[hidden] {
  display: none !important;
}

.grade-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 20px;
}

.grade-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.56);
  backdrop-filter: blur(2px);
}

.grade-preview-dialog {
  position: relative;
  z-index: 1;
  width: min(1280px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(16, 28, 44, 0.14);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.28);
  overflow: hidden;
}

.grade-preview-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1px solid rgba(16, 28, 44, 0.12);
  background: linear-gradient(180deg, rgba(255,250,241,0.92), rgba(255,255,255,0.98));
}

.grade-preview-modal-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 18px;
  background: #f6f7f9;
}

.grade-preview-card {
  margin-top: 0;
  border: 1px solid rgba(16, 28, 44, 0.14);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(31, 24, 15, 0.08);
  overflow: hidden;
}

.grade-preview-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(16, 28, 44, 0.12);
  background: linear-gradient(180deg, rgba(255,250,241,0.82), rgba(255,255,255,0.98));
}

.grade-preview-frame {
  width: 100%;
  min-height: 880px;
  border: 0;
  background: #f6f7f9;
}

.grade-records-table-wrap table {
  min-width: 940px;
}

body.modal-open {
  overflow: hidden;
}

.badge.sent {
  background: #dff3e8;
  color: var(--ok);
}

.badge.failed {
  background: #f8d7da;
  color: var(--danger);
}

@media (max-width: 1180px) {
  .admin-grade-page {
    width: min(100%, calc(100vw - 24px));
  }

  .grade-preview-dialog {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
  }

  .grade-preview-frame {
    min-height: 720px;
  }
}

@media (max-width: 760px) {
  .admin-grade-page .grade-grid-table-wrap,
  .admin-grade-page .grade-records-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    background: #ffffff;
    box-shadow: none;
  }

  .admin-grade-page .grade-grid-table-wrap table {
    display: table;
    min-width: 1220px;
  }

  .admin-grade-page .grade-records-table-wrap table {
    display: table;
    min-width: 940px;
  }

  .admin-grade-page .grade-grid-table-wrap thead,
  .admin-grade-page .grade-records-table-wrap thead {
    display: table-header-group;
  }

  .admin-grade-page .grade-grid-table-wrap tbody,
  .admin-grade-page .grade-records-table-wrap tbody {
    display: table-row-group;
  }

  .admin-grade-page .grade-grid-table-wrap tr,
  .admin-grade-page .grade-records-table-wrap tr {
    display: table-row;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .admin-grade-page .grade-grid-table-wrap td,
  .admin-grade-page .grade-grid-table-wrap th,
  .admin-grade-page .grade-records-table-wrap td,
  .admin-grade-page .grade-records-table-wrap th {
    display: table-cell;
    padding: 11px 12px;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
  }

  .admin-grade-page .grade-grid-table-wrap td::before,
  .admin-grade-page .grade-records-table-wrap td::before {
    content: none;
  }

  .grade-filters {
    grid-template-columns: 1fr;
  }

  .grade-grid-summary-actions,
  .grade-preview-modal-head {
    align-items: stretch;
  }

  .grade-batch-stats,
  .grade-batch-result-item,
  .grade-import-stats,
  .grade-import-result-item {
    grid-template-columns: 1fr;
  }

  .grade-grid-summary-actions-wide {
    max-width: none;
    width: 100%;
  }

  .grade-import-file-name {
    max-width: none;
  }

  .grade-action-grid {
    grid-template-columns: 1fr;
  }

  .grade-preview-modal {
    padding: 10px;
  }

  .grade-preview-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }

  .grade-preview-modal-body {
    padding: 10px;
  }

  .grade-preview-head {
    flex-direction: column;
  }

  .grade-preview-frame {
    min-height: 520px;
  }
}


/* Course application module */

.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;
}

.course-admin-shell {
  display: grid;
  gap: 18px;
  margin: 22px 0;
}

.course-admin-current {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid rgba(15, 36, 54, 0.12);
  border-left: 4px solid #9f1f26;
  border-radius: 14px;
  background: linear-gradient(135deg, #fffaf1 0%, #fff 62%);
  box-shadow: 0 16px 36px rgba(8, 19, 32, 0.07);
}

.course-admin-current h2 {
  margin: 2px 0 6px;
  color: var(--ink);
  font-size: clamp(22px, 3vw, 30px);
}

.course-admin-current .muted {
  margin: 0;
  line-height: 1.6;
}

.course-admin-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(15, 36, 54, 0.12);
  border-radius: 14px;
  background: #f7efe2;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.course-admin-tabs button {
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #4b392d;
  font-weight: 800;
  box-shadow: none;
}

.course-admin-tabs button:hover,
.course-admin-tabs button:focus-visible {
  border-color: rgba(159, 31, 38, 0.28);
  background: rgba(255, 255, 255, 0.7);
  color: #8b1e2a;
}

.course-admin-tabs button.active {
  border-color: rgba(159, 31, 38, 0.32);
  background: #9f1f26;
  color: #fff;
  box-shadow: 0 10px 22px rgba(159, 31, 38, 0.18);
}

.course-admin-panel {
  display: none;
}

.course-admin-panel.active {
  display: block;
}

.course-admin-panel[hidden] {
  display: none !important;
}

.course-admin-panel > .panel,
.course-admin-panel > .activity-kpis,
.course-admin-panel > .activity-workbench,
.course-admin-panel > .section {
  margin-top: 0;
}

.course-admin-panel .course-submissions-section {
  margin-bottom: 18px;
}

.course-admin-panel .course-application-detail {
  margin-top: 18px;
}

.admin-course-applications-page .activity-kpis {
  margin-bottom: 18px;
}

.course-application-fields {
  display: grid;
  gap: 14px;
}

.course-application-field {
  padding: 14px;
  border: 1px solid rgba(15, 36, 54, 0.12);
  border-radius: 8px;
  background: #fffdf8;
}

.field-label-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.required-mark,
.optional-mark {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.required-mark {
  background: #fff3cd;
  color: #8a5b00;
}

.optional-mark {
  background: #edf1f5;
  color: #4b5a69;
}

.field-help {
  color: var(--muted);
  font-size: 13px;
}

.inline-choice-group,
.application-checkbox-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.inline-choice {
  display: inline-flex;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
  width: auto;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.inline-choice input {
  width: 16px;
  min-height: 16px;
  margin: 0;
  accent-color: #9f1f26;
}

.admin-workbench-body .course-application-workbench {
  align-items: start;
  grid-template-columns: minmax(0, 1fr);
}

.admin-workbench-body .course-application-workbench > * {
  grid-column: 1 / -1;
  width: 100%;
}

.admin-workbench-body .course-field-list-card {
  margin-top: 0;
}

.course-application-detail[hidden],
.admin-course-applications-page .empty[hidden] {
  display: none !important;
}

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

.application-detail-item {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.application-detail-item > span {
  color: var(--muted);
  font-size: 13px;
}

.application-detail-files {
  grid-column: 1 / -1;
}

.application-review-panel {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.badge.confirmed {
  background: #dff3e8;
  color: var(--ok);
}

@media (max-width: 760px) {
  .application-detail-grid {
    grid-template-columns: 1fr;
  }

  .inline-choice-group,
  .application-checkbox-row {
    display: grid;
  }
}


.course-submissions-table {
  min-width: 920px;
}

.course-application-actions,
.course-field-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.course-application-actions button,
.course-field-actions button {
  min-height: 36px;
  padding: 7px 10px;
  font-size: 13px;
}

.course-modal[hidden] {
  display: none !important;
}

.course-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(8, 19, 32, 0.58);
}

.course-modal-dialog {
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 36px);
  overflow: auto;
  border: 1px solid rgba(15, 36, 54, 0.18);
  border-radius: 10px;
  background: #fffaf1;
  box-shadow: 0 28px 80px rgba(8, 19, 32, 0.32);
  padding: 20px;
}

.course-payment-dialog {
  width: min(980px, calc(100vw - 32px));
}

.course-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.course-modal-head h2 {
  margin: 0;
}

.payment-preview-body {
  display: grid;
  place-items: center;
  min-height: 360px;
  margin: 14px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.payment-preview-frame {
  width: 100%;
  height: min(70vh, 720px);
  border: 0;
  background: #fff;
}

.payment-preview-image {
  display: block;
  max-width: 100%;
  max-height: min(70vh, 720px);
  object-fit: contain;
}

.badge.follow_up {
  background: #fff3cd;
  color: var(--warn);
}

@media (max-width: 760px) {
  .course-modal {
    padding: 10px;
  }

  .course-modal-dialog {
    width: calc(100vw - 20px);
    padding: 14px;
  }

  .course-modal-head,
  .course-application-actions,
  .course-field-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .course-application-actions button,
  .course-field-actions button {
    width: 100%;
  }
}


.activity-review-email-panel {
  display: grid;
  gap: 12px;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid rgba(139, 30, 42, 0.22);
  border-radius: 12px;
  background: #fff7e8;
}

.activity-review-email-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.activity-review-email-head h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.activity-review-email-head p {
  margin: 0;
  color: var(--muted);
}

.activity-review-email-choice {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.activity-review-email-choice input {
  width: 18px;
  min-height: 18px;
  margin-top: 3px;
}

.activity-review-email-choice strong,
.activity-review-email-choice small {
  display: block;
}

.activity-review-email-choice small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.5;
}

.activity-review-email-choice code {
  padding: 1px 4px;
  border-radius: 4px;
  background: #f4ead8;
  color: #5b2b2b;
}

/* Multi-course application directory and admin course cards */
.course-application-course-list,
.admin-course-list {
  display: grid;
  gap: 14px;
}

.course-application-course-card,
.admin-course-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid rgba(15, 36, 54, 0.12);
  border-radius: 12px;
  background: #fffaf1;
  box-shadow: 0 10px 26px rgba(8, 19, 32, 0.06);
}

.admin-course-card.selected {
  border-color: rgba(137, 28, 34, 0.36);
  box-shadow: 0 14px 34px rgba(137, 28, 34, 0.12);
}

.course-application-course-card h2,
.admin-course-card h3 {
  margin: 3px 0 8px;
  color: var(--ink);
}

.course-application-course-card p,
.admin-course-card p {
  margin: 0;
  color: var(--muted);
}

.course-application-course-meta,
.admin-course-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.course-application-course-meta span:not(.badge),
.admin-course-meta span:not(.badge) {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(15, 36, 54, 0.06);
}

.course-management-workbench {
  margin-bottom: 22px;
}

.course-list-card .section-head {
  align-items: flex-start;
  flex-direction: column;
}

.course-list-card .section-head .secondary {
  flex: 0 0 auto;
  white-space: nowrap;
}

.course-list-card .admin-course-card {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
}

.course-list-card .course-application-actions {
  align-items: center;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.course-list-card .course-application-actions button {
  flex: 0 0 auto;
}

.course-public-choice {
  align-self: end;
  min-height: 44px;
}

.badge.inactive {
  background: #eceff3;
  color: var(--muted);
}

@media (max-width: 760px) {
  .course-admin-current {
    align-items: stretch;
    flex-direction: column;
  }

  .course-admin-current .btn {
    width: 100%;
  }

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

  .course-admin-tabs button {
    min-height: 44px;
  }

  .course-application-course-card,
  .admin-course-card {
    grid-template-columns: 1fr;
  }

  .course-list-card .section-head {
    gap: 12px;
  }

  .course-list-card .section-head .secondary,
  .course-list-card .course-application-actions button {
    width: auto;
  }
}

@media (max-width: 480px) {
  .course-list-card .course-application-actions {
    align-items: stretch;
  }

  .course-list-card .course-application-actions button {
    width: 100%;
  }
}



.service-signup-bulk-toolbar[hidden] {
  display: none;
}

.service-signup-select-col input {
  width: 18px;
  height: 18px;
  accent-color: #9f1f26;
}

.service-signup-bulk-toolbar {
  background: #fffaf7;
}

.application-bulk-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 14px 0;
  padding: 12px 14px;
  border: 1px solid rgba(159, 31, 38, 0.18);
  border-radius: 12px;
  background: #fffaf7;
}

.application-bulk-select-all,
.application-bulk-count {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #3b241b;
}

.application-bulk-select-all input,
.application-select-col input {
  width: 18px;
  height: 18px;
  accent-color: #9f1f26;
}

.application-bulk-toolbar.has-selection {
  border-color: rgba(159, 31, 38, 0.36);
  box-shadow: 0 10px 24px rgba(159, 31, 38, 0.08);
}

.application-bulk-actions {
  margin-left: auto;
}

.application-select-col {
  width: 72px;
  text-align: center;
  white-space: nowrap;
}

.application-bulk-summary {
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f7f1ea;
  color: #3b241b;
  font-weight: 700;
  line-height: 1.5;
}

.application-bulk-email-panel[hidden] {
  display: none;
}

@media (max-width: 720px) {
  .application-bulk-toolbar {
    align-items: stretch;
  }
  .application-bulk-actions,
  .application-bulk-actions button {
    width: 100%;
  }
  .application-select-col {
    width: auto;
    text-align: left;
  }
}

/* Admin hours pagination and bulk review 2026-05-08 */
.hours-bulk-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 14px 0;
  padding: 12px 14px;
  border: 1px solid rgba(159, 31, 38, 0.18);
  border-radius: 12px;
  background: #fffaf7;
}

.hours-bulk-toolbar.has-selection {
  border-color: rgba(159, 31, 38, 0.36);
  box-shadow: 0 10px 24px rgba(159, 31, 38, 0.08);
}

.hours-bulk-select-all,
.hours-bulk-count {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #3b241b;
  font-weight: 700;
}

.hours-bulk-select-all input,
.hours-select-col input {
  width: 18px;
  height: 18px;
  accent-color: #9f1f26;
}

.hours-bulk-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.hours-bulk-actions button.danger {
  background: #8f1d23;
}

.hours-select-col {
  width: 72px;
  text-align: center;
  white-space: nowrap;
}

.hours-table-wrap table {
  min-width: 1060px;
}

.hours-pagination[hidden] {
  display: none !important;
}

@media (max-width: 720px) {
  .hours-bulk-toolbar {
    align-items: stretch;
  }

  .hours-bulk-actions,
  .hours-bulk-actions button {
    width: 100%;
  }

  .hours-select-col {
    width: auto;
    text-align: left;
  }
}


.admin-account-form-section .admin-account-form {
  max-width: 880px;
}

.admin-account-table td:first-child strong {
  display: block;
  margin-bottom: 2px;
}

.admin-account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-account-actions button {
  min-height: 36px;
  padding: 7px 10px;
}

/* Mobile layout audit fixes 2026-05-09 */
@media (max-width: 760px) {
  .role-side-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
    padding-bottom: 0;
  }

  .role-side-nav a {
    flex: initial;
    justify-content: center;
    min-height: 42px;
    padding: 9px 8px;
    text-align: center;
    white-space: normal;
  }

  .admin-workbench-body .admin-page > .nav {
    position: static;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-flow: row;
    grid-auto-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 8px;
    overflow: visible;
    width: 100%;
    max-width: 100%;
    padding: 10px;
    box-sizing: border-box;
  }

  .admin-workbench-body .admin-page > .nav .brand {
    grid-column: 1 / -1;
    width: auto;
    min-width: 0;
    white-space: normal;
  }

  .admin-workbench-body .admin-page > .nav a:not(.brand) {
    flex: initial;
    justify-content: center;
    min-width: 0;
    min-height: 38px;
    padding: 8px 6px;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .admin-grade-page .grade-grid-table-wrap,
  .admin-accounts-page .admin-account-table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .admin-grade-page .grade-grid-table-wrap table,
  .admin-accounts-page .admin-account-table-wrap table {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .admin-grade-page .grade-grid-table-wrap thead,
  .admin-accounts-page .admin-account-table-wrap thead {
    display: none;
  }

  .admin-grade-page .grade-grid-table-wrap tbody,
  .admin-accounts-page .admin-account-table-wrap tbody {
    display: grid;
    gap: 12px;
  }

  .admin-grade-page .grade-grid-table-wrap tr,
  .admin-accounts-page .admin-account-table-wrap tr {
    display: grid;
    padding: 13px 16px;
    border: 1px solid rgba(16, 28, 44, 0.14);
    border-top: 4px solid var(--gold);
    border-radius: 10px;
    background:
      linear-gradient(180deg, rgba(255, 250, 241, 0.92), rgba(255, 255, 255, 0.98)),
      #ffffff;
    box-shadow: 0 12px 26px rgba(31, 24, 15, 0.07);
  }

  .admin-grade-page .grade-grid-table-wrap td,
  .admin-accounts-page .admin-account-table-wrap td {
    display: grid;
    grid-template-columns: minmax(96px, 34%) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 10px 0;
    border-bottom: 1px solid rgba(16, 28, 44, 0.1);
    font-size: 15px;
    overflow-wrap: anywhere;
  }

  .admin-grade-page .grade-grid-table-wrap td:last-child,
  .admin-accounts-page .admin-account-table-wrap td:last-child {
    border-bottom: 0;
  }

  .admin-grade-page .grade-grid-table-wrap td::before,
  .admin-accounts-page .admin-account-table-wrap td::before {
    content: attr(data-label);
    color: #6d7886;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.03em;
  }

  .admin-grade-page .grade-sticky-student-cell,
  .admin-grade-page .grade-sticky-actions-cell,
  .admin-grade-page .grade-grid-table-wrap thead th {
    position: static;
    left: auto;
    right: auto;
    z-index: auto;
    box-shadow: none;
  }

  .admin-grade-page .grade-grid-table-wrap .grade-row-actions,
  .admin-grade-page .grade-grid-table-wrap .grade-action-grid,
  .admin-accounts-page .admin-account-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .admin-grade-page .grade-grid-table-wrap .grade-sticky-actions-cell,
  .admin-grade-page .grade-grid-table-wrap .grade-sticky-actions-cell > *,
  .admin-grade-page .grade-grid-table-wrap .grade-action-grid > *,
  .admin-accounts-page .admin-account-actions > * {
    min-width: 0;
    max-width: 100%;
  }

  .admin-grade-page .grade-grid-table-wrap button,
  .admin-accounts-page .admin-account-actions button {
    width: 100%;
  }
}

/* Profile mobile refinement 2026-05-09 */
@media (max-width: 760px) {
  .role-shell-page .profile-section,
  .role-shell-page .full-profile-section,
  .role-shell-page .profile-submission-section,
  .admin-volunteer-detail-page .section {
    margin: 14px 0;
  }

  .role-shell-page .profile-section .section-head,
  .role-shell-page .full-profile-section .section-head,
  .role-shell-page .profile-submission-section .section-head {
    gap: 10px;
  }

  .role-shell-page .profile-form,
  .role-shell-page .profile-submission-form {
    padding: 15px;
    border-radius: 12px;
    gap: 14px;
  }

  .role-shell-page .profile-form label,
  .role-shell-page .profile-submission-form label {
    gap: 7px;
    color: #4a2f1f;
    font-size: 13px;
    font-weight: 850;
  }

  .role-shell-page .profile-form input,
  .role-shell-page .profile-form select,
  .role-shell-page .profile-form textarea,
  .role-shell-page .profile-submission-form input,
  .role-shell-page .profile-submission-form select,
  .role-shell-page .profile-submission-form textarea {
    min-height: 44px;
    border-radius: 10px;
    font-size: 16px;
  }

  .role-shell-page .profile-form .actions,
  .role-shell-page .profile-submission-form .actions,
  .role-shell-page .full-profile-section .section-head > button,
  .role-shell-page .profile-submission-section .section-head > button {
    width: 100%;
  }

  .role-shell-page .profile-form .actions button,
  .role-shell-page .profile-submission-form .actions button,
  .role-shell-page .full-profile-section .section-head > button,
  .role-shell-page .profile-submission-section .section-head > button {
    width: 100%;
  }

  .full-profile-grid {
    gap: 12px;
  }

  .profile-detail-card {
    padding: 14px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(31, 24, 15, 0.055);
  }

  .profile-detail-card h3 {
    margin-bottom: 12px;
    font-size: 18px;
    line-height: 1.28;
  }

  .profile-detail-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 14px;
  }

  .profile-detail-summary div {
    min-width: 0;
    padding: 11px;
  }

  .profile-detail-summary strong {
    font-size: 16px;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  .profile-detail-list,
  .admin-volunteer-detail-page .account-detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    overflow: hidden;
    border: 1px solid rgba(16, 28, 44, 0.08);
    border-radius: 10px;
    background: #ffffff;
  }

  .profile-detail-list div,
  .admin-volunteer-detail-page .account-detail-grid div {
    display: grid;
    grid-template-columns: minmax(92px, 34%) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    min-width: 0;
    padding: 11px 12px;
    border: 0;
    border-bottom: 1px solid rgba(16, 28, 44, 0.08);
    border-radius: 0;
    background: #fffaf2;
  }

  .profile-detail-list div:last-child,
  .admin-volunteer-detail-page .account-detail-grid div:last-child {
    border-bottom: 0;
  }

  .profile-detail-list dt,
  .admin-volunteer-detail-page .account-detail-grid dt {
    margin: 0;
    color: #7f351f;
    font-size: 12px;
    line-height: 1.45;
    letter-spacing: 0.02em;
  }

  .profile-detail-list dd,
  .admin-volunteer-detail-page .account-detail-grid dd {
    margin: 0;
    color: #1f2933;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
    overflow-wrap: anywhere;
  }

  .profile-detail-table-wrap,
  .admin-volunteer-detail-page .table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .profile-detail-table-wrap table,
  .admin-volunteer-detail-page .detail-table {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .profile-detail-table-wrap thead,
  .admin-volunteer-detail-page .detail-table thead {
    display: none;
  }

  .profile-detail-table-wrap tbody,
  .admin-volunteer-detail-page .detail-table tbody {
    display: grid;
    gap: 10px;
  }

  .profile-detail-table-wrap tr,
  .admin-volunteer-detail-page .detail-table tr {
    display: grid;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid rgba(16, 28, 44, 0.12);
    border-left: 4px solid rgba(143, 29, 35, 0.75);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(31, 24, 15, 0.055);
  }

  .profile-detail-table-wrap td,
  .admin-volunteer-detail-page .detail-table td {
    display: grid;
    grid-template-columns: minmax(86px, 32%) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 9px 0;
    border: 0;
    border-bottom: 1px solid rgba(16, 28, 44, 0.08);
    color: #1f2933;
    font-size: 14px;
    overflow-wrap: anywhere;
  }

  .profile-detail-table-wrap td:last-child,
  .admin-volunteer-detail-page .detail-table td:last-child {
    border-bottom: 0;
  }

  .profile-detail-table-wrap td::before,
  .admin-volunteer-detail-page .detail-table td::before {
    content: attr(data-label);
    color: #7f351f;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.02em;
  }

  .profile-detail-table-wrap .empty-cell,
  .admin-volunteer-detail-page .detail-table .empty-cell {
    display: block;
    padding: 18px;
    text-align: left;
  }

  .profile-detail-table-wrap .empty-cell::before,
  .admin-volunteer-detail-page .detail-table .empty-cell::before {
    display: none;
    content: "";
  }

  .admin-volunteer-detail-page .official-profile-hero {
    padding: 16px;
    border-radius: 14px;
  }

  .admin-volunteer-detail-page .official-profile-title-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: start;
  }

  .admin-volunteer-detail-page .official-profile-title-row > div,
  .admin-volunteer-detail-page .official-profile-title-block,
  .admin-volunteer-detail-page .detail-grid-two > *,
  .admin-volunteer-detail-page .role-module-grid > * {
    min-width: 0;
  }

  .admin-volunteer-detail-page .official-profile-title-row h1 {
    font-size: 28px;
    line-height: 1.18;
    overflow-wrap: anywhere;
  }

  .admin-volunteer-detail-page .official-profile-title-row .muted,
  .admin-volunteer-detail-page .official-profile-meta dd {
    overflow-wrap: anywhere;
  }

  .admin-volunteer-detail-page .official-profile-actions,
  .admin-volunteer-detail-page .official-profile-actions button,
  .admin-volunteer-detail-page .official-profile-actions .btn {
    width: 100%;
  }

  .admin-volunteer-detail-page .detail-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .admin-volunteer-detail-page .account-summary-card {
    padding: 12px;
  }

  .admin-volunteer-detail-page .account-summary-card strong {
    font-size: 16px;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  .role-profile-form,
  .role-inline-form {
    gap: 11px;
  }

  .role-inline-form button,
  .role-profile-form .actions button {
    width: 100%;
  }

  .submission-card {
    padding: 12px;
    border-radius: 12px;
  }
}

/* Profile summary-first disclosure 2026-05-09 */
.profile-page-disclosure,
.profile-mobile-disclosure,
.admin-profile-disclosure {
  display: block;
}

.profile-page-disclosure > summary,
.profile-mobile-disclosure > summary,
.admin-profile-disclosure > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
  color: #2f2118;
  font-weight: 900;
}

.profile-page-disclosure > summary::-webkit-details-marker,
.profile-mobile-disclosure > summary::-webkit-details-marker,
.admin-profile-disclosure > summary::-webkit-details-marker {
  display: none;
}

.profile-page-disclosure > summary::after,
.profile-mobile-disclosure > summary::after,
.admin-profile-disclosure > summary::after {
  content: "展開";
  flex: 0 0 auto;
  min-width: 48px;
  padding: 5px 9px;
  border: 1px solid rgba(143, 29, 35, 0.22);
  border-radius: 999px;
  color: #8f1d23;
  background: #fffaf2;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.profile-page-disclosure[open] > summary::after,
.profile-mobile-disclosure[open] > summary::after,
.admin-profile-disclosure[open] > summary::after {
  content: "收起";
  color: #5f422e;
  border-color: rgba(74, 47, 31, 0.18);
  background: #f7f1ea;
}

.profile-page-disclosure > summary span,
.profile-mobile-disclosure > summary span,
.admin-profile-disclosure > summary span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.profile-page-disclosure > summary small,
.profile-mobile-disclosure > summary small,
.admin-profile-disclosure > summary small {
  margin-left: auto;
  color: #687582;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
  text-align: right;
}

.profile-disclosure-body {
  margin-top: 12px;
}

.profile-page-disclosure[open] > summary,
.profile-mobile-disclosure[open] > summary,
.admin-profile-disclosure[open] > summary {
  margin-bottom: 12px;
}

@media (min-width: 761px) {
  .profile-page-disclosure > summary,
  .profile-mobile-disclosure > summary,
  .admin-profile-disclosure > summary {
    cursor: default;
  }

  .profile-page-disclosure > summary {
    display: none;
  }

  .profile-page-disclosure > summary::after,
  .profile-mobile-disclosure > summary::after,
  .admin-profile-disclosure > summary::after {
    display: none;
  }

  .profile-page-disclosure > summary small,
  .profile-mobile-disclosure > summary small,
  .admin-profile-disclosure > summary small {
    display: none;
  }
}

@media (max-width: 760px) {
  .profile-page-disclosure,
  .profile-mobile-disclosure,
  .admin-profile-disclosure {
    border: 1px solid rgba(16, 28, 44, 0.12);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(31, 24, 15, 0.06);
  }

  .profile-page-disclosure > summary,
  .profile-mobile-disclosure > summary,
  .admin-profile-disclosure > summary {
    min-height: 58px;
    padding: 14px 14px;
    border-radius: 14px;
    background:
      linear-gradient(180deg, rgba(255, 250, 242, 0.94), rgba(255, 255, 255, 0.98)),
      #ffffff;
  }

  .profile-page-disclosure > summary small,
  .profile-mobile-disclosure > summary small,
  .admin-profile-disclosure > summary small {
    display: none;
  }

  .profile-page-disclosure[open] > summary,
  .profile-mobile-disclosure[open] > summary,
  .admin-profile-disclosure[open] > summary {
    border-bottom: 1px solid rgba(16, 28, 44, 0.1);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }

  .profile-page-disclosure .section-head,
  .profile-page-disclosure .subsection-head,
  .admin-profile-disclosure .subsection-head {
    display: none;
  }

  .profile-page-disclosure .profile-form,
  .profile-page-disclosure .profile-submission-workbench,
  .profile-mobile-disclosure .profile-disclosure-body,
  .admin-profile-disclosure > :not(summary) {
    margin: 12px;
  }

  .profile-mobile-disclosure.profile-detail-card,
  .admin-profile-disclosure.panel {
    padding: 0;
  }

  .profile-mobile-disclosure.profile-detail-card h3 {
    display: none;
  }
}


.turnstile-field {
  display: grid;
  gap: 8px;
  margin: 18px 0 4px;
}

.turnstile-field [data-turnstile-widget] {
  min-height: 65px;
}

.turnstile-field .form-hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
