.promoter-page { font-size: 15px; }
.promoter-page [hidden] { display: none; }
.promoter-page a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 4px; }
.promoter-page :focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.promoter-page ::selection { background: var(--teal-soft); color: var(--ink); }
.promo-header { max-width: 1280px; margin: auto; padding: 22px 40px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.promo-brand { display: inline-flex; gap: 10px; align-items: center; font-size: 18px; font-weight: 650; text-decoration: none; }
.promo-brand img { width: 32px; height: 32px; }
.promo-header nav { display: flex; gap: 12px; align-items: center; font-size: 13.5px; }
.promo-header .ghost { text-decoration: none; padding: 9px 12px; }
#promoUsername { max-width: 180px; overflow-wrap: anywhere; }
.promo-main { max-width: 1120px; margin: auto; padding: 40px 32px 36px; }
.promo-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.promo-title h1, .promo-login h1, .promo-gate h1 { margin: 0 0 10px; font-size: 28px; font-weight: 650; letter-spacing: -.02em; }
.promo-title p { margin: 0; }
.promo-main .muted { color: var(--muted); font-size: 13.5px; line-height: 1.7; }
.promo-summary { display: flex; flex-wrap: wrap; gap: 24px 56px; margin: 30px 0 0; padding: 20px 0 28px; border-bottom: 1px solid var(--line); }
.promo-summary div { display: flex; align-items: baseline; gap: 14px; }
.promo-summary dt { color: var(--muted); font-size: 13.5px; }
.promo-summary dd { margin: 0; font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.promo-section { padding: 30px 0; border-bottom: 1px solid var(--line); }
.promo-section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.promo-section h2 { font-size: 19px; margin: 0 0 6px; font-weight: 650; }
.promo-section-head p { margin: 0; }
.promo-test { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.promo-test-code { width: 224px; font-size: 22px; font-weight: 650; letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.promo-test .promo-status { margin-right: 8px; }
.promo-status { display: inline-block; padding: 4px 8px; font-size: 12.5px; border-radius: var(--r-1); background: var(--surface-2); white-space: nowrap; }
.promo-status.on { color: var(--teal-ink); background: var(--teal-soft); }
.promo-create { display: grid; grid-template-columns: 1.1fr 1.5fr .7fr auto; gap: 12px; align-items: end; margin-bottom: 22px; }
.promo-create label, .promo-login label, .promo-edit label { display: grid; gap: 8px; min-width: 0; font-size: 13.5px; }
.promo-create button { min-height: 42px; white-space: nowrap; }
.promo-list-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.promo-list-tools form, .promo-account-search { display: flex; gap: 8px; width: min(100%, 350px); }
.promo-list-tools button, .promo-account-search button { flex-shrink: 0; }
.promo-account-search { margin-bottom: 16px; }
.promo-history { display: flex; gap: 8px; align-items: center; font-size: 13.5px; cursor: pointer; }
.promo-history input { width: 16px; height: 16px; accent-color: var(--teal); }
.promo-table-wrap { overflow-x: auto; scrollbar-color: var(--line-2) transparent; scrollbar-width: thin; }
.promo-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13.5px; }
.promo-table th { color: var(--muted); background: var(--surface-2); font-weight: 500; }
.promo-table th, .promo-table td { padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.promo-table td { font-variant-numeric: tabular-nums; }
.promo-table tbody tr:last-child td { border-bottom: 0; }
.promo-table .promo-number { text-align: right; }
.promo-code { font-weight: 650; overflow-wrap: anywhere; }
.promo-code-note { display: block; color: var(--muted); margin-top: 5px; max-width: 36ch; overflow-wrap: anywhere; font-size: 12.5px; }
.promo-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.promo-actions button { padding: 7px 10px; white-space: nowrap; min-height: 34px; font-size: 12.5px; }
.promo-table td.promo-empty { text-align: center; color: var(--muted); padding: 34px 14px; line-height: 1.7; }
.promo-edit { display: grid; grid-template-columns: 1fr 1.3fr .7fr auto auto; gap: 12px; align-items: end; padding: 12px 0; }
.promo-pager { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 12px; min-height: 32px; color: var(--muted); font-size: 12.5px; }
.promo-pager button { padding: 7px 11px; min-height: 34px; }
.promo-test-history { margin-top: 22px; }
.promo-test-history summary { cursor: pointer; font-size: 13.5px; padding: 8px 0; }
.promo-footer { padding-top: 20px; }
.promo-login { max-width: 400px; margin: 7vh auto; }
.promo-login p { margin-bottom: 28px; }
.promo-login label { margin: 18px 0; }
.promo-gate { max-width: 500px; padding-top: 8vh; }
.promo-notice { display: flex; align-items: center; gap: 16px; justify-content: space-between; padding: 14px 16px; margin: 20px 0; background: var(--surface-2); border-radius: var(--r-2); font-size: 13.5px; line-height: 1.6; }
#promoError { color: var(--danger); }
.promo-toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); max-width: min(90vw, 520px); padding: 12px 18px; background: var(--ink); color: var(--page); border-radius: var(--r-2); font-size: 13.5px; line-height: 1.5; z-index: 200; }
@media (max-width: 720px) {
  .promo-header { padding: 16px 20px; }
  .promo-header nav { gap: 6px; }
  .promo-main { padding: 28px 20px; }
  .promo-create { grid-template-columns: 1fr 1fr; gap: 14px; }
  .promo-create label:nth-child(2) { grid-column: 2; }
  .promo-create button { align-self: end; }
  .promo-summary { gap: 16px 24px; }
  .promo-summary div { gap: 10px; }
  .promo-summary dd { font-size: 20px; }
  .promo-table { min-width: 560px; }
  .promo-edit { min-width: 660px; }
  .promo-test { gap: 10px; }
  .promo-test-code { width: 100%; }
  .promo-login { margin-top: 4vh; }
}
@media (max-width: 420px) {
  .promo-header { align-items: flex-start; }
  .promo-header nav { flex-wrap: wrap; justify-content: flex-end; max-width: 205px; }
  #promoUsername { width: 100%; text-align: right; order: 3; }
  .promo-title h1 { font-size: 25px; }
  .promo-summary { gap: 14px; }
  .promo-summary div { gap: 7px; }
  .promo-summary dt { font-size: 12.5px; }
}
@media (prefers-reduced-motion: reduce) { .promoter-page * { scroll-behavior: auto; transition: none; } }
/* Labels stay available to screen readers without taking a table/search column. */
.promoter-page .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
#promoRefresh, .promo-test button, #promoGateRetry { min-height: 38px; padding: 8px 14px; border-radius: var(--r-2); font-size: 13.5px; }
