/* Organizer workspace: Matching visual language, scoped away from member/public pages.
   Existing IDs, handlers, permissions, data adapters and mobile visibility stay intact. */
html body.te-organizer-surface {
  --sidebar-w: 256px;
  --header-h: 84px;
  --organizer-accent: #12805e;
  --green: #12805e;
  --green-dark: #096448;
  --green-light: #e8f4ef;
  --black: #202124;
  --gray-dark: #45474f;
  --gray-mid: #777982;
  --gray-light: #9698a1;
  --gray-line: #e8e8ee;
  --bg-off: #f5f5f8;
  --radius-sm: 12px;
  --radius-md: 24px;
  --radius-lg: 28px;
  --shadow-card: 0 2px 6px rgba(27, 31, 44, .015);
  --organizer-surface-bg: #f5f5f8;
  --organizer-surface-ink: var(--black);
  --organizer-surface-muted: var(--gray-mid);
  --organizer-surface-line: var(--gray-line);
  background: var(--bg-off);
  color: var(--black);
  font-family: 'Helvetica Neue', Arial, 'Noto Sans Thai', sans-serif;
}
body.te-organizer-surface :is(.beta-main, .beta-sidebar, .beta-header, .modal, .modal-backdrop) * {
  font-family: 'Helvetica Neue', Arial, 'Noto Sans Thai', sans-serif !important;
}
body.te-organizer-surface :is(p, .page-sub, .section-sub) { color: var(--gray-mid) !important; }
body.te-organizer-surface .beta-header {
  left: var(--sidebar-w);
  height: var(--header-h);
  background: #fff !important;
  border-bottom: 1px solid var(--gray-line) !important;
  backdrop-filter: none;
  padding: 0 28px;
  gap: 18px;
}
body.te-organizer-surface .beta-header-logo { display: none; }
body.te-organizer-surface .ong-workspace-label {
  color: var(--gray-mid);
  font-size: 14px;
  letter-spacing: .01em;
  white-space: nowrap;
}
body.te-organizer-surface .beta-header-section { display: none; }
body.te-organizer-surface .beta-header-user { padding: 0; }
body.te-organizer-surface :is(.beta-avatar, #header-avatar) {
  background: #e3f0e9 !important;
  color: #187459 !important;
  box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--gray-line);
}
body.te-organizer-surface .beta-avatar span { color: #187459; }
body.te-organizer-surface .te-lang-pill { border-radius: 14px; background: var(--bg-off); }
body.te-organizer-surface .beta-sidebar {
  top: 0;
  width: var(--sidebar-w);
  background: #fff !important;
  border-right: 1px solid var(--gray-line) !important;
  z-index: 201;
}
body.te-organizer-surface .ong-workspace-logo {
  display: flex;
  align-items: center;
  min-height: 142px;
  padding: 32px 28px;
}
body.te-organizer-surface .ong-workspace-logo img { width: 186px; height: auto; }
body.te-organizer-surface .ong-profile { padding: 4px 22px 20px; gap: 10px; }
body.te-organizer-surface .ong-avatar { background: #e8f4ef; width: 32px; height: 32px; }
body.te-organizer-surface .ong-avatar span { color: #187459; }
body.te-organizer-surface .ong-profile-name { font-size: 12px; font-weight: 500; max-width: 164px; }
body.te-organizer-surface .ong-mode-badge { color: var(--gray-mid); font-size: 11px; }
body.te-organizer-surface .ong-divider { margin: 0 22px 6px; background: var(--gray-line); }
body.te-organizer-surface .beta-nav-group { padding: 0 12px; }
body.te-organizer-surface .beta-nav-group-label {
  padding: 24px 14px 10px;
  font-size: 10px;
  font-weight: 600;
  color: var(--gray-mid);
  letter-spacing: .16em;
}
body.te-organizer-surface .beta-nav-item {
  min-height: 50px;
  padding: 12px 14px !important;
  margin-bottom: 5px;
  gap: 12px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 400;
  color: #72747d;
}
body.te-organizer-surface .beta-nav-icon {
  width: 21px !important;
  height: 21px !important;
  padding: 0;
  border-radius: 0;
  background: transparent;
}
body.te-organizer-surface .beta-nav-item:hover {
  background: #f3f7f5 !important;
  color: #187459 !important;
}
body.te-organizer-surface .beta-nav-item:hover .beta-nav-icon { background: transparent; }
body.te-organizer-surface .beta-nav-item.is-active.accent-organizer {
  background: #e8f4ef !important;
  color: #187459 !important;
  font-weight: 500 !important;
}
body.te-organizer-surface .beta-nav-item.is-active.accent-organizer .beta-nav-icon { background: transparent !important; }
body.te-organizer-surface :is(.ong-soon, .ong-lock) { font-size: 9px; font-weight: 500; letter-spacing: .02em; }
body.te-organizer-surface .beta-main {
  width: calc(100% - var(--sidebar-w));
  max-width: none;
  margin-left: var(--sidebar-w);
  padding: calc(var(--header-h) + 40px) 32px 64px !important;
  min-width: 0;
}
body.te-organizer-surface .beta-main .beta-content { width: 100%; max-width: 1440px; margin: 0 auto; min-width: 0; }
body.te-organizer-surface .beta-main :is(.page-header, .page-hero, .onsite-hero) {
  gap: 20px;
  margin-bottom: 30px;
  padding-bottom: 0;
  border-bottom: 0;
}
body.te-organizer-surface .beta-main :is(.page-title, .onsite-title, .beta-page-title) {
  font-size: clamp(28px, 3.2vw, 42px);
  font-weight: 650;
  line-height: 1.22;
  letter-spacing: -.035em;
  color: var(--black);
}
body.te-organizer-surface .beta-main :is(.page-sub, .onsite-subtitle, .beta-page-subtitle) {
  font-size: 15px;
  line-height: 1.65;
  margin-top: 12px;
  color: var(--gray-mid);
}
body.te-organizer-surface .beta-main :is(.card, .stat-card, .event-card, .src-section, .plan-card, .settings-card, .tool-card) {
  background: #fff;
  border: 1px solid var(--gray-line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}
body.te-organizer-surface .beta-main :is(.stat-grid, .stats-container, .stats-bar) { gap: 16px; margin-bottom: 28px; }
body.te-organizer-surface .beta-main .stat-card {
  padding: 24px;
  min-height: 170px;
  align-items: stretch;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  border-top: 1px solid var(--gray-line);
}
body.te-organizer-surface .beta-main .stat-card .stat-icon { display: none; }
body.te-organizer-surface .beta-main .stat-content { display: flex; flex-direction: column; }
body.te-organizer-surface .beta-main .stat-label {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: .01em;
  text-transform: none;
  color: var(--gray-mid);
}
body.te-organizer-surface .beta-main .stat-value {
  font-size: clamp(32px, 3.3vw, 46px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -.04em;
  margin: 18px 0 8px;
  color: var(--black);
}
body.te-organizer-surface .beta-main :is(.stat-sub, .stat-change) { color: var(--gray-mid); font-size: 12px; font-weight: 400; }
body.te-organizer-surface .beta-main :is(.btn-primary, .btn-save, .btn-new, .modal-btn-primary, .gate-launch) {
  background: var(--organizer-accent);
  color: #fff;
  border: 1px solid var(--organizer-accent);
  border-radius: 14px;
  min-height: 46px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  box-shadow: none;
  transform: none;
}
body.te-organizer-surface .beta-main :is(.btn-secondary, .btn-export, .modal-btn-secondary, .btn-outline) {
  background: #fff;
  color: var(--gray-dark);
  border: 1px solid var(--gray-line);
  border-radius: 14px;
  min-height: 46px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  box-shadow: none;
  transform: none;
}
body.te-organizer-surface .beta-main :is(.btn-primary, .btn-save, .btn-new, .modal-btn-primary):hover { background: var(--green-dark); box-shadow: none; transform: none; }
body.te-organizer-surface .beta-main :is(.btn-secondary, .btn-export, .btn-outline):hover:not(:disabled) {
  background: #f1f7f4;
  color: var(--green-dark);
  border-color: #cce1d7;
  box-shadow: none;
  transform: none;
}
body.te-organizer-surface .beta-main .header-actions .btn-export:first-child,
body.te-organizer-surface .beta-main .modal-actions .btn-export:last-child {
  background: var(--organizer-accent);
  border-color: var(--organizer-accent);
  color: #fff;
}
body.te-organizer-surface .beta-main :is(.form-control, .modal-input, .search-input, .event-select, .form-field input, .form-field select, .form-field textarea) {
  background-color: #f8f8fa;
  border: 1px solid var(--gray-line);
  border-radius: 13px;
  min-height: 46px;
  font-size: 14px;
  font-weight: 400;
  color: var(--gray-dark);
}
body.te-organizer-surface .beta-main :is(.form-control, .modal-input, .search-input, .event-select):focus {
  outline: 2px solid #cce8dc;
  outline-offset: 2px;
  border-color: var(--organizer-accent);
}
body.te-organizer-surface .beta-main :is(.form-label, .modal-label) { font-size: 13px; font-weight: 500; color: var(--gray-mid); }
body.te-organizer-surface .beta-main :is(.toolbar, .header-actions) { gap: 12px; }
body.te-organizer-surface .beta-main .filter-tabs {
  background: #fff;
  padding: 16px;
  gap: 8px;
  border-bottom: 1px solid var(--gray-line);
}
body.te-organizer-surface .beta-main .filter-tab { border-color: transparent; border-radius: 10px; font-size: 13px; font-weight: 500; padding: 9px 12px; }
body.te-organizer-surface .beta-main .filter-tab span { background: #f0f1f4; color: var(--gray-mid); }
body.te-organizer-surface .beta-main .filter-tab.active { background: var(--green-light); border-color: transparent; color: var(--green-dark); }
body.te-organizer-surface .beta-main .filter-tab.active span { background: #d4eae0; color: var(--green-dark); }
body.te-organizer-surface .beta-main thead th {
  padding: 18px 20px;
  background: #fafafd;
  border-bottom: 1px solid var(--gray-line);
  color: var(--gray-mid);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: .08em;
}
body.te-organizer-surface .beta-main td { padding: 20px; border-color: var(--gray-line); font-size: 13px; }
/* A ticket code is a table cell here, not the shared inline ticket badge. */
body.te-organizer-surface .beta-main td.ticket-code { display: table-cell; border: 0; border-radius: 0; background: transparent; letter-spacing: .025em; line-height: 1.5; }
body.te-organizer-surface .beta-main tbody tr:hover { background: #fafcfb; }
body.te-organizer-surface .beta-main .attendee-name { font-size: 14px; font-weight: 600; line-height: 1.5; }
body.te-organizer-surface .beta-main .attendee-contact { font-size: 12px; margin-top: 5px; }
body.te-organizer-surface .beta-main .pill { border-radius: 9px; padding: 5px 9px; font-weight: 500; }
body.te-organizer-surface .beta-main .btn-checkin { border-radius: 10px; padding: 8px 12px; font-weight: 500; }
body.te-organizer-surface .beta-main :is(.modal, .modal-content) { border-radius: 24px; }
body.te-organizer-surface .beta-main .modal-head { background: #fff; border-color: var(--gray-line); }
body.te-organizer-surface .beta-main .data-notice { background: #f0f2f4; border-color: var(--gray-line); border-radius: 14px; }
body.te-organizer-surface .beta-main :is(.settings-nav-link.active, .settings-nav-link:hover) { background: var(--green-light); box-shadow: none; color: var(--green-dark); }
body.te-organizer-surface .beta-main :focus-visible { outline: 2px solid var(--organizer-accent); outline-offset: 3px; }
@media (max-width: 1100px) and (min-width: 769px) {
  html body.te-organizer-surface { --sidebar-w: 232px; }
  body.te-organizer-surface .beta-main { padding-left: 24px !important; padding-right: 24px !important; }
  body.te-organizer-surface .ong-workspace-label { font-size: 12px; }
  body.te-organizer-surface .beta-header { padding: 0 20px; gap: 10px; }
  body.te-organizer-surface .beta-header-user > div[style*="text-align:right"] { max-width: 120px; }
}
@media (max-width: 768px) {
  html body.te-organizer-surface { --sidebar-w: 0px; --header-h: 68px; }
  body.te-organizer-surface .beta-header { left: 0; padding: 0 10px; gap: 6px; }
  body.te-organizer-surface .beta-header-logo { display: flex; min-width: 94px; width: auto; padding: 0 4px; border-right: 0 !important; }
  body.te-organizer-surface .beta-header-logo img { height: 28px !important; max-width: 94px; }
  body.te-organizer-surface .ong-workspace-label { display: none; }
  body.te-organizer-surface .beta-header-user { min-width: 0; gap: 8px; }
  body.te-organizer-surface .beta-header-user > div[style*="text-align:right"],
  body.te-organizer-surface #header-org-name { display: none; }
  body.te-organizer-surface .beta-header > div[style*="flex:1"] { min-width: 0; padding: 0 6px !important; gap: 8px !important; }
  body.te-organizer-surface .beta-header-menu-toggle { width: 40px; height: 40px; flex-shrink: 0; border: 1px solid var(--gray-line); border-radius: 12px; box-shadow: none; }
  body.te-organizer-surface .beta-sidebar { top: var(--header-h); width: 280px; z-index: 150; }
  body.te-organizer-surface .ong-workspace-logo { min-height: 104px; padding: 24px; }
  body.te-organizer-surface .ong-workspace-logo img { width: 158px; }
  body.te-organizer-surface .beta-main { width: 100%; margin-left: 0; padding: calc(var(--header-h) + 24px) 16px 40px !important; }
  body.te-organizer-surface .beta-main .stat-card { padding: 18px; min-height: 136px; }
  body.te-organizer-surface .beta-main .stat-value { font-size: 34px; margin-top: 12px; }
  body.te-organizer-surface .beta-main :is(.page-header, .page-hero, .onsite-hero) { flex-wrap: wrap; }
}
@media (max-width: 600px) {
  body.te-organizer-surface .beta-main .stats-container { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.te-organizer-surface .beta-main :is(.page-title, .onsite-title, .beta-page-title) { font-size: 28px; }
  body.te-organizer-surface .beta-main :is(.page-sub, .onsite-subtitle, .beta-page-subtitle) { font-size: 13px; }
  body.te-organizer-surface .beta-main .stat-card { border-radius: 18px; padding: 16px; }
  body.te-organizer-surface .beta-main .stat-label { font-size: 12px; }
  body.te-organizer-surface .beta-main td.ticket-code { display: inline-block; background: var(--bg-off); border: 1px solid var(--gray-line); border-radius: 99px; }
  body.te-organizer-surface .beta-main td { padding: 12px 14px; }
  body.te-organizer-surface .beta-main .filter-tabs { padding: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  body.te-organizer-surface .beta-main { animation: none; transition: none; }
}

/* Override the legacy organizer typography and decorative stat stripe. */
body.te-organizer-surface .beta-main .stat-card::before { display: none; }
body.te-organizer-surface .beta-main :is(.stat-label, .metric-label) { font-weight: 400 !important; letter-spacing: .01em !important; }
body.te-organizer-surface .beta-main :is(.stat-value, .metric-value) { font-weight: 500 !important; letter-spacing: -.04em !important; }
body.te-organizer-surface .beta-main :is(.page-title, .onsite-title, .beta-page-title) { letter-spacing: -.035em !important; }
body.te-organizer-surface .beta-main :is(.panel, .metric, .overview-card, .section-card, .current-card, .usage-card, .locked-card, .plan-gate) { border-radius: var(--radius-md); box-shadow: var(--shadow-card); }
/* Page-specific legacy components share the same workspace treatments. */
body.te-organizer-surface .beta-main :is(.org-welcome-name, .rf-title, .pricing-title, .bill-title, .hero h1) {
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.22 !important;
  font-weight: 600 !important;
  letter-spacing: -.035em !important;
  color: var(--black);
}
body.te-organizer-surface .beta-main .stats-container { grid-template-columns: repeat(3, minmax(0, 1fr)); }
body.te-organizer-surface .beta-main .metric { padding: 24px; background: #fff; }
body.te-organizer-surface .beta-main .metric > span { font-size: 14px; color: var(--gray-mid); }
body.te-organizer-surface .beta-main .metric > strong { font-size: 36px; font-weight: 500 !important; color: var(--black); margin: 16px 0 8px; }
body.te-organizer-surface .beta-main .btn {
  border-radius: 14px;
  background: #fff;
  color: var(--gray-dark);
  border: 1px solid var(--gray-line);
  box-shadow: none;
}
body.te-organizer-surface .beta-main :is(.btn.primary, .btn.green, .btn.gold) { background: var(--organizer-accent); color: #fff; border-color: var(--organizer-accent); }
body.te-organizer-surface .beta-main :is(.link-card, .balance-hero, .how-item, .guide-card) {
  background: #fff;
  border: 1px solid var(--gray-line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}
body.te-organizer-surface .beta-main .balance-hero::before,
body.te-organizer-surface .beta-main .balance-hero::after { display: none; }
body.te-organizer-surface .beta-main :is(.bal-eyebrow, .bal-unit, .bal-stat-label) { color: var(--gray-mid); }
body.te-organizer-surface .beta-main :is(.bal-number, .bal-stat-value, .bal-stat-value.gold) { color: var(--black); font-weight: 500; }
body.te-organizer-surface .beta-main :is(.bal-stats, .bal-stat) { border-color: var(--gray-line); }
body.te-organizer-surface .beta-main .bal-expiry { background: var(--green-light); color: var(--green-dark); border-color: var(--gray-line); }
@media (max-width: 768px) {
  body.te-organizer-surface .beta-sidebar { z-index: 300; }
  body.te-organizer-surface .beta-main :is(.org-welcome-name, .rf-title, .pricing-title, .bill-title, .hero h1) { font-size: 28px; }
  body.te-organizer-surface .beta-main .stats-container { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  body.te-organizer-surface .beta-main :is(.controls-col, .controls-row, .settings-layout > *, .form-grid > *, .score-ring-wrap, .sub-score-grid > *) { min-width: 0; max-width: 100%; }
  body.te-organizer-surface .beta-main .controls-col { width: 100%; }
  body.te-organizer-surface .beta-main :is(.controls-row, .date-presets) { flex-wrap: wrap; }
  body.te-organizer-surface .beta-main .controls-row .event-select { min-width: 0; max-width: 100%; flex: 1 1 220px; }
  body.te-organizer-surface .beta-main .settings-layout { grid-template-columns: minmax(0, 1fr); }
  body.te-organizer-surface .beta-main .settings-layout .form-control { min-width: 0; }
  body.te-organizer-surface .beta-main .entry-method-row { flex-wrap: wrap; }
  body.te-organizer-surface .beta-main .sub-score-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.te-organizer-surface .beta-main .card { max-width: 100%; }
  body.te-organizer-surface:has(.controls-col) .beta-main .card { overflow-x: auto; }
}

body.te-organizer-surface .beta-main :is(.sub-score-label, .sub-score-note) { overflow-wrap: anywhere; }
/* Registration preview shows both contact methods without widening the table. */
body.te-organizer-surface .beta-main .attendee-contact-line {
  display: block;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
@media (max-width: 600px) {
  body.te-organizer-surface .beta-main .mob-contact {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.6;
  }
}
body.te-organizer-surface .beta-main .attendee-registered {
  display: block;
  margin-top: 5px;
  font-size: 11px;
  line-height: 1.6;
  color: var(--gray-mid);
  white-space: normal;
  overflow-wrap: anywhere;
}
