:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-strong: #f4f4f4;
  --text: #111111;
  --muted: #6f6f6f;
  --line: #e2e2e2;
  --brand: #e30613;
  --brand-dark: #b8000b;
  --accent: #2f2f2f;
  --warning: #a56600;
  --danger: #b42318;
  --shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
  --radius: 2px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 58px);
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 210px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #fff;
  background: var(--brand);
  border-radius: 0;
  font-weight: 800;
}

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

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.nav a {
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
}

.nav a:hover {
  color: var(--brand);
  background: transparent;
  border-bottom-color: var(--brand);
}
.nav-user {
  align-self: center;
  color: var(--text);
  font-weight: 700;
}

.nav button {
  padding: 8px 0;
  color: inherit;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  cursor: pointer;
}

.nav button:hover {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

.login-body {
  min-height: 100vh;
  background: #f7f7f7;
}

.login-main {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 170px);
}

.login-panel {
  display: grid;
  gap: 22px;
  width: min(460px, 100%);
  padding: clamp(24px, 5vw, 38px);
  background: #fff;
  border: 1px solid var(--line);
  border-top: 5px solid var(--brand);
  box-shadow: var(--shadow);
}

.login-copy h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 48px);
  line-height: 1.05;
  letter-spacing: 0;
}

.login-copy p:last-child {
  margin: 12px 0 0;
  color: var(--muted);
}

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

.login-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 520px) {
  .login-main {
    align-items: start;
    min-height: auto;
  }

  .login-panel {
    box-shadow: none;
  }

  .login-actions {
    grid-template-columns: 1fr;
  }
}

main {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 14px clamp(18px, 4vw, 52px) 54px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 34px;
  align-items: stretch;
  padding: clamp(14px, 2.5vw, 30px) 0 clamp(24px, 4vw, 48px);
  color: var(--text);
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

.admin-hero {
  background: #ffffff;
}

.hero h1 {
  max-width: 860px;
  margin: 0;
  font-size: clamp(38px, 4.8vw, 62px);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: 0;
}

.title-mobile {
  display: none;
}

.hero p {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: var(--brand);
}

.hero-panel {
  display: grid;
  gap: 12px;
  align-content: center;
}

.hero-panel div {
  padding: 18px 0 18px 18px;
  background: #ffffff;
  border-left: 4px solid var(--brand);
  border-radius: 0;
}

.metric {
  display: block;
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
}

.hero-panel small {
  color: var(--muted);
}


.admin-hero .hero-panel {
  grid-template-columns: repeat(3, minmax(92px, 1fr));
  gap: 16px;
  align-items: stretch;
  width: min(460px, 100%);
}

.admin-hero .hero-panel div {
  min-width: 0;
  padding: 16px 0 16px 16px;
}

@media (max-width: 640px) {
  .admin-hero .hero-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
  }

  .admin-hero .hero-panel div {
    padding: 12px 0 12px 12px;
  }
}

.toolbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 14px;
  margin: 26px 0;
  padding: 20px;
  background: #f7f7f7;
  border: 1px solid var(--line);
  border-radius: 0;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select {
  min-height: 42px;
  width: 100%;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
}

select[multiple] {
  min-height: 84px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(350px, 420px);
  gap: 24px;
  align-items: start;
}

.content-stack,
.section {
  display: grid;
  gap: 22px;
}

.section {
  padding-top: 8px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.section-head h2,
.section-head h3 {
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
}

.section-head.compact h2 {
  font-size: 24px;
}

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

.course-card,
.session-row,
.plan-inner,
.table-wrap,
.request-grid > div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0;
}

.course-card {
  display: grid;
  gap: 14px;
  padding: 22px;
  border-top: 4px solid var(--brand);
}

.course-card h3,
.session-row h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.description,
.session-row p {
  margin: 0;
  color: var(--muted);
}

.card-top,
.session-meta,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.action-row {
  justify-content: flex-end;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  color: var(--text);
  background: #f1f1f1;
  border-radius: 0;
  font-size: 12px;
  font-weight: 700;
}

.pill.ok {
  color: #0f6b3d;
  background: #eef8f1;
}

.pill.warn {
  color: var(--warning);
  background: #fff5db;
}

.goals {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.session-list {
  display: grid;
  gap: 12px;
}

.session-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  white-space: nowrap;
}

.session-status-dot {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  border-radius: 50%;
  background: #168a4f;
}

.session-status.limited .session-status-dot {
  background: #d97904;
}

.session-status.sold-out .session-status-dot {
  background: #d20d1c;
}

.session-table th:first-child,
.session-table td:first-child {
  width: 1%;
  padding-inline: 8px;
  white-space: nowrap;
}

.session-table th:nth-child(2),
.session-table td:nth-child(2) {
  width: 1%;
  white-space: nowrap;
}

.session-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) minmax(220px, 280px);
  gap: 16px;
  align-items: center;
  padding: 14px;
}

.date-box {
  display: grid;
  place-items: center;
  min-height: 72px;
  color: var(--brand-dark);
  background: var(--surface-strong);
  border-radius: var(--radius);
}

.date-box strong {
  font-size: 28px;
  line-height: 1;
}

.date-box span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.session-main {
  display: grid;
  gap: 6px;
}

.session-actions {
  display: grid;
  gap: 8px;
}

.plan {
  position: sticky;
  top: 86px;
}

.plan-inner {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.participant-list-title {
  margin: 22px 0 10px;
  color: var(--text);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.15;
  text-transform: none;
}

.participant-form,
.participant-list,
.plan-items,
.admin-list {
  display: grid;
  gap: 10px;
}

.two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.participant,
.plan-item,
.admin-item {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: var(--surface-strong);
  border-radius: var(--radius);
}

.participant {
  gap: 3px;
  background: #f7f7f7;
  border-left: 3px solid var(--brand);
}

.participant .contact-card-head,
.participant header,
.plan-items-title {
  margin: 16px 0 8px;
  font-size: 18px;
}

.plan-item header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}


.contact-card-actions {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.participant .participant-edit {
  color: var(--brand);
}

.icon-button {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  color: var(--danger);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
}

.button {
  min-height: 42px;
  padding: 9px 16px;
  color: #fff;
  background: var(--brand);
  border: 1px solid var(--brand);
  border-radius: 0;
  font-weight: 800;
  cursor: pointer;
}

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

.button.secondary {
  color: var(--brand);
  background: #ffffff;
  border-color: var(--brand);
}

.button.secondary:hover {
  color: #ffffff;
  background: var(--brand);
}

.button.ghost {
  align-self: end;
  color: var(--text);
  background: #fff;
  border-color: var(--line);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.inline-check {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inline-check input {
  width: auto;
  min-height: auto;
}

.plan-total {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 18px;
}

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

.message.ok {
  color: #087443;
}

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

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

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

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

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.request-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.request-grid > div {
  padding: 16px;
}

.request-grid h3 {
  margin: 0 0 12px;
}

@media (max-width: 1080px) {
  .hero,
  .layout,
  .toolbar,
  .request-grid {
    grid-template-columns: 1fr;
  }

  .plan {
    position: static;
  }
}

@media (max-width: 780px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero h1 {
    font-size: clamp(36px, 11vw, 52px);
    line-height: 0.98;
  }

  .title-desktop {
    display: none;
  }

  .title-mobile {
    display: inline;
  }

  .nav {
    justify-content: flex-start;
  }

  .course-grid,
  .session-row,
  .two-cols {
    grid-template-columns: 1fr;
  }

  .session-row {
    align-items: stretch;
  }

  .date-box {
    place-items: start;
    align-content: center;
    padding: 12px;
  }
}

.detail-main { max-width: 1180px; }
.detail-back-button {
  margin-top: 18px;
}
.breadcrumb { color: var(--muted); font-size: 14px; margin: 18px 0 0; }
.breadcrumb a { color: var(--brand); font-weight: 700; }
.detail-hero { padding: 38px 0 26px; border-bottom: 1px solid var(--line); }
.detail-hero h1 { margin: 0; font-size: clamp(42px, 6vw, 72px); line-height: 1; font-weight: 800; }
.detail-hero h2 { margin: 18px 0 0; font-size: 28px; }
.course-facts { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); margin-bottom: 34px; }
.course-facts div { padding: 20px 18px 20px 0; }
.course-facts span { display: block; color: var(--muted); font-size: 13px; font-weight: 700; }
.course-facts strong { display: block; margin-top: 8px; font-size: 17px; white-space: pre-line; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 36px; align-items: start; }
.detail-content { display: grid; gap: 28px; }
.detail-content section { border-bottom: 1px solid var(--line); padding-bottom: 24px; }
.detail-content h3 { margin: 0 0 12px; font-size: 22px; }
.detail-content p { color: var(--muted); margin: 0; }
.detail-content li { margin: 8px 0; }
.detail-side { position: sticky; top: 92px; }
.detail-dates { margin-top: 42px; }
.course-card h3 a:hover { color: var(--brand); }
@media (max-width: 980px) { .course-facts, .detail-layout { grid-template-columns: 1fr; } .detail-side { position: static; } }


/* course type symbols */
.pill.course-type {
  gap: 6px;
  letter-spacing: 0;
}
.pill.course-type-base {
  color: #ffffff;
  background: #31363f;
  border-color: #31363f;
}
.pill.course-type-advanced {
  color: #ffffff;
  background: #7a1d78;
  border-color: #7a1d78;
}
.pill.course-type-update {
  color: #ffffff;
  background: #e30613;
  border-color: #e30613;
}
.pill.course-type-special,
.pill.course-type-other {
  color: #111111;
  background: #d8d8d8;
  border-color: #bdbdbd;
}

/* saturated chips */
.pill {
  color: #111111;
  background: #e2e2e2;
  border: 1px solid #c8c8c8;
  font-weight: 800;
}
.pill.ok {
  color: #ffffff;
  background: #00843d;
  border-color: #00843d;
}
.pill.warn {
  color: #111111;
  background: #ffc400;
  border-color: #e2a600;
}
/* softened chips override */
.pill { color: #222222; background: #eeeeee; border: 1px solid #d6d6d6; font-weight: 750; }
.pill.ok { color: #0b6b3a; background: #e3f4eb; border-color: #b7e2ca; }
.pill.warn { color: #8a5a00; background: #fff2c2; border-color: #efd47f; }
.pill.course-type-base { color: #26313d; background: #edf0f3; border-color: #d8dde3; }
.pill.course-type-advanced { color: #6c2f6b; background: #f4eaf4; border-color: #e4cfe4; }
.pill.course-type-update { color: #b8000b; background: #fde7e9; border-color: #f7c5c9; }
.pill.course-type-special, .pill.course-type-other { color: #4a4a4a; background: #eeeeee; border-color: #d6d6d6; }

/* softer chips final */
.pill { color: #333333; background: #f4f4f4; border: 1px solid #e4e4e4; font-weight: 700; }
.pill.ok { color: #23633f; background: #f0f8f3; border-color: #d9ecdf; }
.pill.warn { color: #7a5a15; background: #fff8df; border-color: #f0df9b; }
.pill.course-type-base { color: #3d4650; background: #f3f5f7; border-color: #e2e6ea; }
.pill.course-type-advanced { color: #684466; background: #f7f1f7; border-color: #eaddea; }
.pill.course-type-update { color: #aa1f28; background: #fff0f1; border-color: #f4d6d9; }
.pill.course-type-special, .pill.course-type-other { color: #555555; background: #f5f5f5; border-color: #e2e2e2; }


/* chip alignment */
.course-card .card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}
.course-card .availability {
  margin-left: auto;
  white-space: nowrap;
}
.course-card .type {
  min-width: 0;
}

/* quiet chips reset */
.pill {
  color: #334155;
  background: #f1f5f9;
  border: 1px solid #e5e7eb;
  font-weight: 700;
  box-shadow: none;
}
.pill.ok {
  color: #166534;
  background: #edf7f0;
  border-color: #dcefe3;
}
.pill.warn {
  color: #8a5a00;
  background: #fff7df;
  border-color: #f2e4b6;
}
.pill.course-type,
.pill.course-type-base,
.pill.course-type-advanced,
.pill.course-type-update,
.pill.course-type-special,
.pill.course-type-other {
  color: #334155;
  background: #f1f5f9;
  border-color: #e5e7eb;
}


/* final quiet chip style v2 */
.course-card .pill {
  color: #4b5563 !important;
  background: #f7f7f7 !important;
  border: 1px solid #ececec !important;
  font-weight: 650 !important;
  box-shadow: none !important;
}
.course-card .pill.ok {
  color: #3f6b4d !important;
  background: #f5faf6 !important;
  border-color: #e5f0e8 !important;
}
.course-card .pill.warn {
  color: #786329 !important;
  background: #fffaf0 !important;
  border-color: #f2ead0 !important;
}
.course-card .pill.course-type,
.course-card .pill.course-type-base,
.course-card .pill.course-type-advanced,
.course-card .pill.course-type-update,
.course-card .pill.course-type-special,
.course-card .pill.course-type-other {
  color: #4b5563 !important;
  background: #f7f7f7 !important;
  border-color: #ececec !important;
}
/* availability chip right edge */
.course-card .card-top {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: start !important;
  gap: 12px !important;
  width: 100% !important;
}
.course-card .availability {
  justify-self: end !important;
  margin-left: 0 !important;
  white-space: nowrap !important;
}
.course-card .type {
  justify-self: start !important;
  min-width: 0 !important;
}

/* typed chip pastel colors */
.course-card .pill.course-type-base {
  color: #31536b !important;
  background: #edf6fb !important;
  border-color: #d6eaf5 !important;
}
.course-card .pill.course-type-advanced {
  color: #684466 !important;
  background: #f7f1f7 !important;
  border-color: #eaddea !important;
}
.course-card .pill.course-type-update {
  color: #9c2b33 !important;
  background: #fff0f1 !important;
  border-color: #f4d6d9 !important;
}
.course-card .pill.course-type-special,
.course-card .pill.course-type-other {
  color: #555555 !important;
  background: #f5f5f5 !important;
  border-color: #e2e2e2 !important;
}

/* final visible chip colors v3 */
.course-card .card-top {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: start !important;
  gap: 12px !important;
  width: 100% !important;
}
.course-card .availability {
  justify-self: end !important;
  margin-left: 0 !important;
  white-space: nowrap !important;
}
.course-card .type {
  justify-self: start !important;
  min-width: 0 !important;
}
.course-card .pill {
  color: #4b5563 !important;
  background: #f7f7f7 !important;
  border: 1px solid #ececec !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}
.course-card .pill.ok {
  color: #3d6b4a !important;
  background: #f4faf6 !important;
  border-color: #dcefe3 !important;
}
.course-card .pill.warn {
  color: #7a5f18 !important;
  background: #fff8df !important;
  border-color: #f2e5bd !important;
}
.course-card .pill.course-type-base {
  color: #31536b !important;
  background: #edf6fb !important;
  border-color: #d6eaf5 !important;
}
.course-card .pill.course-type-advanced {
  color: #674767 !important;
  background: #f7f1f7 !important;
  border-color: #eaddea !important;
}
.course-card .pill.course-type-update {
  color: #9c2b33 !important;
  background: #fff0f1 !important;
  border-color: #f4d6d9 !important;
}
.course-card .pill.course-type-special,
.course-card .pill.course-type-other {
  color: #555555 !important;
  background: #f5f5f5 !important;
  border-color: #e2e2e2 !important;
}

/* dynamic search field */
.toolbar {
  grid-template-columns: minmax(220px, 1.2fr) repeat(5, minmax(130px, 0.8fr)) minmax(160px, 0.8fr);
}
.search-field input {
  border-color: #d4d4d4;
  background: #ffffff;
}
.search-field input:focus {
  outline: 2px solid rgba(227, 6, 19, 0.16);
  border-color: var(--brand);
}
.date-field input {
  min-width: 0;
}
.admin-training-filter {
  margin-top: 8px;
  color: var(--text);
}
.admin-status-filter-group {
  min-width: 0;
}
@media (max-width: 1080px) {
  .toolbar {
    grid-template-columns: 1fr;
  }
}

/* steel course frame */
.course-card.course-card-steel {
  border-color: var(--line) !important;
  border-top-color: #2f80d1 !important;
  box-shadow: none !important;
}
.course-card.course-card-steel .course-type {
  color: #245f9f !important;
  background: #eef6ff !important;
  border-color: #d4e8fb !important;
}

/* start mode modal */
body.modal-open {
  overflow: hidden;
}
.start-modal[hidden] {
  display: none;
}
.start-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: rgba(17, 17, 17, 0.34);
}
.start-dialog {
  width: min(760px, 100%);
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  padding: clamp(28px, 4vw, 46px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: #ffffff;
  border-top: 5px solid var(--brand);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
}
@media (max-width: 780px) {
  .start-modal {
    padding: 12px;
  }

  .start-dialog {
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
  }
}
.start-dialog h2 {
  margin: 0;
  font-size: clamp(28px, 3.8vw, 42px);
  line-height: 1.06;
}
.start-dialog p:not(.eyebrow) {
  color: var(--muted);
  margin: 14px 0 0;
  font-size: 17px;
}
.start-options {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}
.start-option {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 18px 20px;
  color: var(--text);
  background: #ffffff;
  border: 1px solid var(--line);
  text-align: left;
  cursor: pointer;
}
.start-option:hover,
.start-option:focus-visible {
  border-color: var(--brand);
  outline: 2px solid rgba(227, 6, 19, 0.14);
}
.start-option strong {
  font-size: 18px;
}
.start-option span {
  color: var(--muted);
}
.mode-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.text-button {
  padding: 0;
  color: var(--brand);
  background: transparent;
  border: 0;
  font-weight: 700;
  cursor: pointer;
}

.slim-button {
  min-height: 32px;
  padding: 7px 14px;
  font-size: 13px;
  line-height: 1.1;
}
body[data-plan-mode="browse"] .layout {
  grid-template-columns: minmax(0, 1fr);
}

/* browse mode hides prices */
body[data-plan-mode="browse"] .cost-fact,
body[data-plan-mode="browse"] .plan-total,
body[data-plan-mode="browse"] #planItems,
body[data-plan-mode="browse"] .action-row {
  display: none !important;
}

/* participant popup */
.participant-dialog {
  width: min(620px, 100%);
}
.course-modal-title {
  font-size: clamp(28px, 4vw, 42px) !important;
  line-height: 1.08 !important;
}
.course-modal-title span {
  display: block;
}
.course-modal-title .course-title-prefix {
  white-space: nowrap;
}
.course-modal-title .course-title-rest {
  max-width: 14ch;
}
.modal-participant-form {
  margin-top: 24px;
}
.modal-participant-form .button {
  margin-top: 8px;
}

/* otp modal step */
.otp-step {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}
.otp-step[hidden] {
  display: none;
}
.otp-step input {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-align: center;
}
#otpMessage {
  color: var(--muted);
  min-height: 20px;
}

/* session calendar view */
.session-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  flex-wrap: wrap;
}
.view-toggle {
  display: inline-flex;
  border: 1px solid var(--line);
  background: #ffffff;
}
.view-button {
  min-height: 34px;
  padding: 6px 13px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-right: 1px solid var(--line);
  font-weight: 700;
  cursor: pointer;
}
.view-button:last-child {
  border-right: 0;
}
.view-button.active {
  color: #ffffff;
  background: var(--brand);
}
.calendar-view {
  display: grid;
  gap: 24px;
}
.calendar-month {
  border: 1px solid var(--line);
  background: #ffffff;
}
.calendar-month h3 {
  margin: 0;
  padding: 16px 18px;
  border-top: 4px solid var(--brand);
  border-bottom: 1px solid var(--line);
  font-size: 22px;
}
.calendar-grid {
  display: grid;
  grid-template-columns: 46px repeat(5, minmax(92px, 1fr));
  isolation: isolate;
}
.calendar-weekday,
.calendar-week-number {
  padding: 10px;
  color: var(--muted);
  background: #f7f7f7;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.calendar-week-number {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  color: var(--muted);
  background: #fafafa;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-weight: 800;
}
.calendar-week-number-head {
  text-align: center;
}
.calendar-day {
  position: relative;
  z-index: 0;
  min-height: 128px;
  padding: 9px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  overflow: visible;
}

.calendar-day.has-floating-event {
  z-index: 2;
}

.calendar-day.has-planned-event {
  z-index: 3;
}
.calendar-day.empty {
  background: #fafafa;
}
.calendar-day strong {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}
.calendar-event {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 3px;
  width: 100%;
  margin-top: 6px;
  padding: 7px 8px;
  color: var(--text);
  background: #f7f7f7;
  border: 1px solid #e7e7e7;
  border-left: 3px solid var(--brand);
  text-align: left;
  cursor: pointer;
}
.calendar-event.multi-day {
  width: calc((100% + 19px) * var(--calendar-span, 1) - 19px);
  max-width: none;
  z-index: 4;
}

.calendar-event:hover,
.calendar-event:focus-visible {
  border-color: var(--brand);
  outline: 2px solid rgba(227, 6, 19, 0.12);
}
.calendar-event span {
  overflow: hidden;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.calendar-event small {
  color: var(--muted);
  font-size: 11px;
}
.calendar-event.sold-out {
  border-left-color: #9ca3af;
  opacity: 0.7;
}
@media (max-width: 900px) {
  .calendar-grid {
    --calendar-mobile-row-height: 104px;
    grid-template-columns: 1fr;
  }
  .calendar-weekday,
  .calendar-week-number,
  .calendar-day.empty {
    display: none;
  }
  .calendar-day {
    min-height: var(--calendar-mobile-row-height);
    padding: 9px 9px 9px 56px;
  }
  .calendar-day > strong {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 5;
    width: 34px;
    margin: 0;
  }
  .calendar-event {
    margin-top: 0;
  }
  .calendar-event.multi-day {
    position: absolute;
    top: 9px;
    right: 9px;
    left: 56px;
    width: auto;
    height: calc(var(--calendar-mobile-row-height) * var(--calendar-span, 1) - 18px);
    min-height: 0;
    align-content: center;
  }
}

/* compact mobile logo */
@media (max-width: 780px) {
  .topbar {
    gap: 10px;
    padding: 12px 18px;
  }
  .brand {
    min-width: 0;
  }
  .brand-logo {
    width: 118px;
    max-width: 44vw;
  }
}

@media (max-width: 420px) {
  .brand-logo {
    width: 104px;
    max-width: 42vw;
  }
}

/* planner contact card */
.contact-info:empty {
  display: none;
}
.contact-card {
  display: grid;
  gap: 3px;
  padding: 12px;
  background: #f7f7f7;
  border-left: 3px solid var(--brand);
}
.contact-card span,
.participant .contact-card-head span {
  color: var(--brand);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.contact-card strong,
.participant strong {
  font-size: 15px;
}
.contact-card small,
.participant small {
  color: var(--muted);
  font-size: 13px;
}

.participant-picker {
  display: flex;
  min-height: 44px;
  padding: 6px;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  background: #ffffff;
  border: 1px solid var(--line);
}

.participant-choice {
  display: inline-flex;
  min-height: 30px;
  padding: 5px 9px;
  gap: 7px;
  align-items: center;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  background: #f7f8fa;
  border: 1px solid #dfe3e8;
  cursor: pointer;
  user-select: none;
}

.participant-choice input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--brand);
}

.participant-choice.selected {
  color: var(--brand-dark);
  background: #fff1f2;
  border-color: #f2b8bd;
}

.participant-picker-empty {
  color: var(--muted);
  font-size: 13px;
}
.calendar-event.in-plan {
  z-index: 5;
  color: #074f2a;
  background: #e8f6ee;
  border-color: #b8dfc8;
  border-left-color: #087443;
}

.calendar-event.in-plan small {
  color: #0b6b3a;
}

.calendar-event.in-plan:hover,
.calendar-event.in-plan:focus-visible {
  border-color: #087443;
  outline-color: rgba(8, 116, 67, 0.18);
}
.calendar-participant-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.calendar-modal-choice {
  width: 100%;
  justify-content: flex-start;
  min-height: 38px;
  padding: 8px 10px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 8px;
}



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

.contact-card .contact-edit {
  color: var(--brand);
  background: #ffffff;
  border-color: #f0c4c7;
  font-size: 15px;
  line-height: 1;
}

#userEditForm input:disabled {
  color: var(--muted);
  background: #f3f3f3;
}

.participant-launcher {
  display: block;
}

.participant-launcher .button {
  width: 100%;
}


.course-summary-list {
  display: grid;
  gap: 12px;
}

.course-summary-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--brand);
}

.course-summary-row.course-card-steel {
  border-top-color: var(--steel);
}

.course-summary-main {
  display: grid;
  gap: 9px;
}

.course-summary-row h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

@media (max-width: 780px) {
  .course-summary-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}

.price-pill {
  color: #4b5563;
  background: #f7f7f7;
  border-color: #ececec;
}

.course-card .price-pill {
  grid-column: 1;
  justify-self: start;
}
.code-pill {
  color: #111111;
  background: #ffffff;
  border-color: #d8d8d8;
  font-variant-numeric: tabular-nums;
}

.course-card .code-pill {
  justify-self: start;
}

.calendar-code {
  color: #555555;
  font-weight: 800;
}

.admin-code-input {
  width: 112px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  font: inherit;
  font-weight: 800;
  text-transform: uppercase;
}

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

.admin-course-card {
  display: grid;
  gap: 14px;
  min-height: 100%;
  padding: 20px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--brand);
}

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

.admin-course-card h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.admin-course-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

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

.admin-course-facts div {
  min-width: 0;
}

.admin-course-facts dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-course-facts dd {
  margin: 2px 0 0;
  font-weight: 700;
}

.admin-course-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
}

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

.admin-edit-section {
  padding: 22px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--brand);
}

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

.form-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
  font: inherit;
  font-weight: 500;
}

.form-grid textarea {
  resize: vertical;
  line-height: 1.45;
}

.form-grid .span-2 {
  grid-column: 1 / -1;
}

.form-grid .check-row {
  display: flex;
  min-height: 42px;
  gap: 8px;
  align-items: center;
  color: var(--text);
}

.form-grid .check-row input {
  width: auto;
  min-height: auto;
}

.admin-form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
}

@media (max-width: 900px) {
  .admin-course-grid,
  .form-grid,
  .admin-course-facts {
    grid-template-columns: 1fr;
  }
}

/* course card clean meta layout */
.course-card .card-top,
.course-summary-row .card-top {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 12px !important;
  width: 100% !important;
}
.course-card .card-tags,
.course-summary-row .card-tags {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}
.course-card .availability,
.course-summary-row .availability {
  flex: 0 0 auto;
  margin-left: auto !important;
  white-space: nowrap !important;
}
.price-text {
  margin: -4px 0 0;
  color: #4b5563;
  font-size: 13px;
  font-weight: 700;
}


/* session action buttons */
.session-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}
.session-actions .button {
  width: 100%;
  text-align: center;
}


/* compact contact cards */
.contact-card,
.participant {
  position: relative;
  padding-right: 54px;
}
.contact-card .contact-card-head,
.participant .contact-card-head {
  display: block;
  min-height: 0;
  margin: 0 0 2px;
}
.contact-card .contact-edit,
.participant .contact-card-actions {
  position: absolute;
  top: 10px;
  right: 10px;
}
.contact-card strong,
.participant strong {
  display: block;
  margin-top: 0;
  line-height: 1.2;
}
.contact-card small,
.participant small {
  display: block;
  margin-top: 2px;
  line-height: 1.3;
}


/* slimmer buttons */
.button {
  min-height: 36px;
  padding: 7px 13px;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.2;
}
.button.ghost {
  min-height: 36px;
}
.view-button {
  min-height: 31px;
  padding: 5px 11px;
  font-size: 14px;
}
.icon-button {
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  font-size: 14px;
}
.modal-participant-form .button {
  margin-top: 4px;
}
.action-row,
.modal-actions,
.session-actions {
  gap: 7px;
}


/* admin session management */
.admin-session-dialog {
  width: min(840px, 100%);
}
.admin-row-actions {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
  white-space: nowrap;
}
#newSessionButton {
  flex: 0 0 auto;
}
#sessionEditForm > label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
#adminSessionRows td:last-child {
  text-align: right;
}


/* contact meta lines */
.person-company,
.person-email {
  display: block;
  overflow-wrap: anywhere;
}
.person-email {
  margin-top: 1px;
}
.contact-card small .person-company,
.contact-card small .person-email,
.participant small .person-company,
.participant small .person-email {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  text-transform: none;
}


/* plan item meta typography */
.plan-item > span,
.plan-item-date,
.plan-item-people,
.plan-item-price {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.plan-item > span + span,
.plan-item-people,
.plan-item-price {
  margin-top: 1px;
}
.plan-item-price {
  text-align: right;
  font-weight: 700;
}


/* detail course title split */
.detail-course-title span {
  display: block;
}
.detail-course-title .course-title-prefix {
  white-space: nowrap;
}
.detail-course-title .course-title-rest {
  max-width: 16ch;
}
@media (max-width: 780px) {
  .detail-course-title .course-title-rest {
    max-width: 12ch;
  }
}


/* admin view switch */
.admin-viewbar {
  display: flex;
  justify-content: flex-end;
  margin: -10px 0 18px;
}
.admin-viewbar .view-toggle {
  flex: 0 0 auto;
}


/* enforce hidden sections */
[hidden] {
  display: none !important;
}


/* admin log */
.log-list {
  display: block;
}

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

.admin-log-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-top: 4px solid var(--brand);
}

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

.admin-log-table th {
  color: var(--muted);
  background: #f7f7f7;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-log-table td {
  font-size: 14px;
  line-height: 1.35;
}

.admin-log-table .log-time {
  width: 170px;
  white-space: nowrap;
}

.admin-log-table .log-scope {
  margin-bottom: 5px;
}

.admin-log-table .log-email {
  max-width: 240px;
  overflow-wrap: anywhere;
}

.admin-log-table td small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.log-details summary {
  width: fit-content;
  cursor: pointer;
  color: var(--brand);
  font-weight: 800;
}

.log-details code {
  display: block;
  max-width: 520px;
  max-height: 220px;
  margin-top: 8px;
  padding: 10px;
  overflow: auto;
  background: #f5f6f7;
  border: 1px solid var(--line);
  color: var(--muted);
  font: 12px/1.35 ui-monospace, SFMono-Regular, Consolas, monospace;
  white-space: pre-wrap;
}

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


/* catalog view switch */
.catalog-tools {
  flex: 0 0 auto;
}
@media (max-width: 720px) {
  .catalog-section-head {
    flex-direction: column;
    align-items: stretch;
  }
  .catalog-section-head .catalog-tools {
    min-width: 0;
    max-width: 100%;
    width: 100%;
  }
  .catalog-section-head .catalog-tools .view-toggle {
    display: flex;
    min-width: 0;
    max-width: 100%;
    width: 100%;
  }
  .catalog-section-head .catalog-tools .view-button {
    flex: 1 1 0;
    min-width: 0;
    padding-inline: 8px;
  }
}


/* privacy notice */
.privacy-note {
  margin: 8px 0 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.privacy-note a,
.legal-footer a {
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
}
.privacy-note a:hover,
.legal-footer a:hover {
  text-decoration: underline;
}
.legal-main {
  width: min(980px, 100%);
}
.legal-hero p {
  max-width: 680px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.45;
}
.legal-content {
  display: grid;
  gap: 26px;
  padding-bottom: 48px;
}
.legal-content section {
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.legal-content h2 {
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.2;
}
.legal-content p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}
.legal-footer {
  display: flex;
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 52px) 28px;
  gap: 18px;
  color: var(--muted);
  font-size: 13px;
}

.plan-item-warning-state {
  border-left: 3px solid #d08a00;
}

.plan-item-warning {
  margin: 6px 0 0;
  color: #8a5a00;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.booking-dialog {
  width: min(760px, 100%);
}

.booking-summary {
  display: grid;
  gap: 12px;
  margin: 14px 0 16px;
}

.booking-summary-list {
  display: grid;
  gap: 8px;
}

.booking-summary-item {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  background: #f7f7f7;
  border-left: 3px solid var(--brand);
}

.booking-summary-item span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.booking-summary-price {
  text-align: right;
  font-weight: 700;
}

.booking-summary-total {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: #f7f7f7;
  border-top: 1px solid var(--line);
}

.agb-check {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: start;
  gap: 10px;
  margin-top: 0;
  padding: 12px;
  background: #f7f7f7;
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  font-weight: 400;
}

.agb-check input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--brand);
}

.agb-check span {
  display: grid;
  gap: 3px;
}

.agb-check strong {
  font-size: 13px;
  font-weight: 800;
}

.agb-check small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.agb-check a {
  color: var(--brand);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.quote-notice {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

/* admin configuration */
.config-form {
  max-width: 980px;
}

.config-note {
  display: grid;
  gap: 3px;
  padding: 12px 14px;
  background: #f7f7f7;
  border-left: 3px solid var(--brand);
}

.config-note strong {
  font-size: 13px;
  font-weight: 800;
}

.config-note span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.config-status {
  max-width: 540px;
}

.template-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.template-card {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--brand);
}

.template-card legend {
  padding: 0 6px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
}

.template-card textarea {
  min-height: 190px;
  resize: vertical;
}

.mail-template-preview {
  margin-top: 2px;
}

.mail-preview-shell {
  border: 1px solid var(--line);
  background: #f6f6f6;
}

.mail-preview-browser {
  padding: 7px 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
}

.mail-preview-recipient {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px;
  padding: 9px 10px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.mail-preview-recipient strong {
  color: var(--brand);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.mail-preview-card {
  margin: 12px;
  padding: 18px 20px 16px;
  background: #fff;
  border-top: 4px solid var(--brand);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .06);
}

.mail-preview-eyebrow {
  margin: 0 0 6px;
  color: var(--brand);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.mail-preview-card h3 {
  margin: 0 0 12px;
  font-size: 20px;
  line-height: 1.15;
}

.mail-preview-body {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.mail-preview-body p {
  margin: 0 0 10px;
}

.mail-preview-body .mail-preview-section-label {
  margin-top: 14px;
}

.mail-preview-data-table {
  width: 100%;
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--brand);
  border-collapse: collapse;
  table-layout: fixed;
  color: var(--ink);
  font-size: 11px;
}

.mail-preview-data-table th,
.mail-preview-data-table td {
  padding: 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.mail-preview-data-table thead th,
.mail-preview-key-value th {
  background: #f1f1f1;
  color: #333;
  font-weight: 900;
}

.mail-preview-key-value th {
  width: 24%;
}

.mail-preview-key-value th,
.mail-preview-key-value td,
.mail-preview-participants-table th,
.mail-preview-participants-table td {
  height: 22px;
  padding: 0 8px;
  line-height: 16px;
  vertical-align: middle;
}

.mail-preview-course-table th:nth-child(1) { width: 25%; }
.mail-preview-course-table th:nth-child(2) { width: 16%; }
.mail-preview-course-table th:nth-child(3) { width: 34%; }
.mail-preview-course-table th:nth-child(4) { width: 25%; }

.mail-preview-data-table small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.mail-preview-plan {
  margin: 2px 0 14px;
}

.mail-preview-plan-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

.mail-preview-plan-summary div {
  padding: 10px 12px;
  border-left: 3px solid var(--brand);
  background: #f5f5f5;
}

.mail-preview-plan-summary strong,
.mail-preview-plan-summary span {
  display: block;
}

.mail-preview-plan-summary strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
}

.mail-preview-plan-summary span,
.mail-preview-plan-item section > span {
  margin-top: 4px;
  color: var(--brand);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.mail-preview-plan-item {
  display: grid;
  grid-template-columns: 29% 43% 28%;
  margin-bottom: 7px;
  border-left: 3px solid var(--brand);
  background: #f6f6f6;
}

.mail-preview-plan-item section {
  min-width: 0;
  padding: 10px;
}

.mail-preview-plan-item section > span,
.mail-preview-plan-item section > strong,
.mail-preview-plan-item section > small {
  display: block;
}

.mail-preview-plan-item section > strong {
  margin-top: 4px;
  color: var(--ink);
  line-height: 1.35;
}

.mail-preview-plan-item section > small {
  margin-top: 4px;
  color: var(--muted);
}

.mail-preview-plan-item section > b {
  display: inline-block;
  margin: 4px 0 2px;
  padding: 2px 5px;
  background: #e8edf3;
  color: #333;
  font-size: 9px;
}

.mail-preview-code {
  margin: 14px 0 2px;
  padding: 13px 14px;
  background: #f5f5f5;
  border-left: 3px solid var(--brand);
  color: var(--ink);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: .08em;
  text-align: center;
}

.mail-preview-card footer {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

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

.plan-preview-action {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.plan-preview-action .button {
  min-width: 164px;
}

body[data-plan-mode="browse"] .plan-preview-action {
  display: none;
}

.plan-preview-dialog {
  width: min(940px, 100%);
}

.plan-preview-content {
  margin: 16px 0 18px;
}

.plan-preview-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.plan-preview-summary-box {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  background: #f7f7f7;
  border-left: 3px solid var(--brand);
}

.plan-preview-summary-box strong {
  font-size: 22px;
  line-height: 1;
}

.plan-preview-summary-box span,
.plan-preview-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.plan-preview-list {
  display: grid;
  gap: 10px;
}

.plan-preview-card {
  display: grid;
  grid-template-columns: minmax(150px, .55fr) minmax(0, 1.2fr) minmax(180px, .75fr);
  gap: 16px;
  padding: 14px 16px;
  background: #f8f8f8;
  border-left: 3px solid var(--brand);
}

.plan-preview-card section {
  min-width: 0;
}

.plan-preview-date,
.plan-preview-data,
.plan-preview-people {
  display: grid;
  align-content: start;
  gap: 6px;
}

.plan-preview-date strong {
  font-size: 18px;
  line-height: 1.15;
}

.plan-preview-code {
  width: fit-content;
  padding: 3px 7px;
  background: #eef2f5;
  color: var(--ink) !important;
  font-size: 12px !important;
  font-weight: 800;
}

.plan-preview-title {
  font-size: 15px;
  line-height: 1.25;
}

.plan-preview-meta,
.plan-preview-people strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
}

.plan-preview-date .plan-preview-meta {
  color: var(--muted);
}

.plan-preview-warning-state {
  border-left-color: #d79300;
}

.plan-preview-warning {
  margin: 2px 0 0;
  color: #8a5a00 !important;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

@media (max-width: 760px) {
  .plan-preview-summary,
  .plan-preview-card {
    grid-template-columns: 1fr;
  }

  .plan-preview-card {
    gap: 12px;
    padding: 12px;
  }
}

@page {
  size: A4 landscape;
  margin: 10mm;
}

@media print {
  body {
    background: #fff !important;
    zoom: 0.8;
  }

  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .toolbar {
    display: none !important;
  }

  .legal-footer {
    display: none !important;
  }

  .layout {
    display: block !important;
  }

  .calendar-view {
    gap: 0 !important;
  }

  .calendar-month {
    width: 100% !important;
    break-before: page;
    break-after: page;
    break-inside: avoid-page;
    page-break-before: always;
    page-break-after: always;
    page-break-inside: avoid;
  }

  .calendar-month h3 {
    padding: 10px 12px;
    font-size: 18px;
  }

  .calendar-day {
    min-height: 24mm;
    padding: 5px;
  }

  .calendar-weekday,
  .calendar-week-number {
    padding: 6px;
  }

  .plan {
    margin-top: 20px;
  }

  body.print-popup-only {
    zoom: 1;
  }

  body.print-popup-only * {
    visibility: hidden !important;
  }

  body.print-popup-only > * {
    display: none !important;
  }

  body.print-popup-only #planPreviewModal,
  body.print-popup-only #planPreviewModal * {
    visibility: visible !important;
  }

  body.print-popup-only #planPreviewModal {
    position: static !important;
    display: block !important;
    padding: 0 !important;
    background: #fff !important;
  }

  body.print-popup-only #planPreviewModal .plan-preview-dialog {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 20px !important;
    border-top: 4px solid var(--brand) !important;
    box-shadow: none !important;
  }

  body.print-popup-only #planPreviewModal .plan-preview-controls {
    display: none !important;
  }
}
.booking-followup-note {
  margin: -4px 0 0;
  padding: 10px 12px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.4;
}

.start-dialog .privacy-note {
  margin: 16px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}


.admin-calendar-day {
  cursor: context-menu;
}

.admin-calendar-event {
  text-align: left;
}

.admin-calendar-event .calendar-code {
  display: block;
  margin-bottom: 2px;
}


/* admin users */
.admin-users-table {
  width: 100%;
  border-collapse: collapse;
}
.admin-users-table th,
.admin-users-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.admin-users-table th {
  color: var(--muted);
  background: #f7f7f7;
  font-size: 12px;
  text-transform: uppercase;
}
.admin-users-table td:last-child,
.admin-users-table th:last-child {
  text-align: right;
}
.muted-pill {
  color: var(--muted);
  background: #f2f2f2;
  border-color: var(--line);
}

.print-frame {
  position: fixed;
  right: 0;
  bottom: 0;
  width: 0;
  height: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}
