/* eBet / Cherry Hub customer portal. Every brand value comes from the --brand-* custom properties that
   templates/layouts/base.html writes from theme.brand_config — no brand literal belongs in this file
   (Task 1.3 check). Layout follows the Zenplates theme the Zendesk portals use today. */

*, *::before, *::after { box-sizing: border-box; }

html { font-size: 16px; }
body {
  margin: 0;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  color: var(--brand-text);
  background: #fff;
  line-height: 1.6;
}
h1, h2, h3, h4 { color: var(--brand-heading); line-height: 1.25; margin: 0 0 0.75rem; font-weight: 600; }
a { color: var(--brand-link); }
img { max-width: 100%; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 1.5rem; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 1000; background: #fff; padding: 0.5rem 1rem; }

.portal-shell { min-height: 100vh; display: flex; flex-direction: column; }
.portal-main { flex: 1; }

/* Header */
.portal-header { background: var(--brand-header-bg); color: var(--brand-header-link); border-bottom: 1px solid var(--brand-border); }
.portal-header--sticky { position: sticky; top: 0; z-index: 50; }
.portal-header__inner { display: flex; align-items: center; gap: 1.5rem; min-height: 72px; }
.portal-header__brand { display: flex; align-items: center; margin-right: auto; }
.portal-header__logo { height: var(--brand-logo-height); width: auto; display: block; }
.portal-header__nav { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.portal-header__link, .portal-header__nav a { color: var(--brand-header-link); text-decoration: none; font-weight: 500; cursor: pointer; }
.portal-header__link:hover, .portal-header__nav a:hover { text-decoration: underline; }
.portal-header__venue { color: var(--brand-header-link); }
.portal-header__venue select {
  font: inherit; color: inherit; background: transparent; border: 1px solid currentColor; border-radius: 4px; padding: 0.25rem 0.5rem;
}
.portal-header__venue option { color: var(--brand-text); }
.portal-header__user { position: relative; }
.portal-header__user summary { list-style: none; }
.portal-header__user summary::after { content: " \25BE"; }
.portal-header__menu {
  position: absolute; right: 0; top: calc(100% + 0.5rem); min-width: 10rem; background: #fff; border: 1px solid var(--brand-border);
  border-radius: 4px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12); padding: 0.5rem 0; z-index: 60;
}
.portal-header__menu a { display: block; padding: 0.5rem 1rem; color: var(--brand-text); }

/* Footer */
.portal-footer { background: var(--brand-footer-bg); color: var(--brand-footer-link); border-top: 1px solid var(--brand-border); padding: 2rem 0; }
.portal-footer__inner { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; font-size: 0.9375rem; }
.portal-footer a { color: var(--brand-footer-link); }

/* Buttons */
.btn {
  display: inline-block; padding: 0.625rem 1.25rem; border-radius: 4px; font-weight: 600; text-decoration: none;
  background: var(--brand-primary); color: var(--brand-primary-inverse); border: 0; cursor: pointer; font: inherit;
}
.btn:hover { filter: brightness(0.92); }
.btn--secondary { background: var(--brand-secondary); color: #fff; }

/* Home — hero */
.hero {
  background-color: var(--hero-bg, var(--brand-secondary)); background-size: cover; background-position: center;
  color: var(--hero-text, var(--brand-primary-inverse)); text-align: center; padding: 4rem 0 3.5rem;
}
.hero h1, .hero p { color: var(--hero-text, var(--brand-primary-inverse)); }
.hero h1 { font-size: 2.25rem; }
.hero__search { max-width: 36rem; margin: 1.5rem auto 0; }
.hero__search input { width: 100%; padding: 0.875rem 1rem; border-radius: 4px; border: 0; font: inherit; }

/* Home — sections */
.section { padding: 3rem 0; }
.section--muted { background: var(--section-bg, transparent); }
.section h2 { text-align: center; }
.cards { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); margin-top: 1.5rem; }
.card { border: 1px solid var(--brand-border); border-radius: 6px; padding: 1.5rem; background: #fff; text-align: center; }
.card h3 { font-size: 1.125rem; }
.card p { margin: 0; }
.card a { text-decoration: none; }

/* Home — CTA */
.cta { background: var(--cta-bg, var(--brand-header-bg)); color: var(--cta-text, var(--brand-header-link)); }
.cta__inner { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; padding: 2rem 1.5rem; }
.cta h2 { color: inherit; margin: 0; text-align: left; }
.cta p { color: inherit; opacity: 0.9; margin: 0.25rem 0 0; }

/* Messages (venue step, no-access, errors) */
.panel { max-width: 36rem; margin: 3rem auto; padding: 2rem; border: 1px solid var(--brand-border); border-radius: 6px; background: #fff; }
.panel__error { color: #9b1c1c; }
.venue-list { list-style: none; padding: 0; margin: 1rem 0 1.5rem; }
.venue-list li { padding: 0.5rem 0; border-bottom: 1px solid var(--brand-border); }
.venue-list label { display: flex; gap: 0.75rem; align-items: center; cursor: pointer; }
.venue-list__primary { font-size: 0.8125rem; color: var(--brand-secondary); }
.venue-filter { width: 100%; padding: 0.5rem 0.75rem; border: 1px solid var(--brand-border); border-radius: 4px; font: inherit; }

@media (max-width: 720px) {
  .portal-header__inner { flex-wrap: wrap; padding-top: 0.75rem; padding-bottom: 0.75rem; }
  .hero h1 { font-size: 1.75rem; }
}

/* Knowledge base (knowledge-base spec; wireframes.md). Token-driven like the rest of this file. */
.kb-searchbar { background: var(--brand-secondary); padding: 1rem 0; }
.kb-search { position: relative; }
.kb-searchbar .kb-search { max-width: 36rem; margin-left: auto; }
.kb-search input { width: 100%; padding: 0.75rem 1rem; border-radius: 4px; border: 1px solid var(--brand-border); font: inherit; }
.kb-suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 0.25rem); z-index: 40; list-style: none; margin: 0; padding: 0.25rem 0;
  background: #fff; border: 1px solid var(--brand-border); border-radius: 4px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12); text-align: left;
}
.kb-suggest li a { display: block; padding: 0.5rem 1rem; color: var(--brand-text); text-decoration: none; }
.kb-suggest li.is-active a, .kb-suggest li a:hover { background: var(--section-bg, #f7fafc); text-decoration: underline; }
.kb-suggest__all { border-top: 1px solid var(--brand-border); font-weight: 500; }
.kb-page { padding-top: 1.5rem; padding-bottom: 3rem; }
.kb-breadcrumbs { font-size: 0.875rem; margin-bottom: 1rem; }
.kb-lead { font-size: 1.0625rem; }
.kb-meta { color: var(--brand-secondary); font-size: 0.875rem; }
.kb-state { padding: 1.5rem 0; }
.kb-state--error { color: #9b1c1c; }
.kb-skeleton { height: 1rem; margin: 0.75rem 0; border-radius: 4px; background: linear-gradient(90deg, #edf2f7, #f7fafc, #edf2f7); background-size: 200% 100%; animation: kb-shimmer 1.2s infinite; }
.kb-skeleton:nth-child(odd) { width: 70%; }
@keyframes kb-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.kb-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.kb-list__item { padding: 0.375rem 0; }
.kb-list__item--current > a { font-weight: 600; color: var(--brand-heading); text-decoration: none; }
.kb-list--columns { columns: 2 18rem; column-gap: 2rem; }
.kb-badge { display: inline-block; margin-left: 0.5rem; padding: 0 0.5rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; vertical-align: middle; background: var(--brand-tertiary); color: var(--brand-tertiary-inverse); }
.kb-card { text-align: left; }
.kb-card__links { list-style: none; padding: 0; margin: 0.5rem 0; }
.kb-card__links li { padding: 0.125rem 0; }
.kb-card__all { font-weight: 500; }
.kb-subcategory { margin: 2rem 0; }
.kb-group { margin: 0.5rem 0 0.5rem 0; padding-left: 1rem; border-left: 2px solid var(--brand-border); }
.kb-more { background: none; border: 0; padding: 0; color: var(--brand-link); font: inherit; cursor: pointer; text-decoration: underline; }
.kb-article { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 2rem; }
.kb-article--toc { grid-template-columns: 15rem minmax(0, 1fr) 13rem; }
.kb-article__body table { border-collapse: collapse; width: 100%; }
.kb-article__body th, .kb-article__body td { border: 1px solid var(--brand-border); padding: 0.5rem; text-align: left; vertical-align: top; }
.kb-table { overflow-x: auto; margin: 1rem 0; }
.kb-article__body iframe, .kb-article__body video { max-width: 100%; }
.kb-aside__title { font-size: 1rem; }
.kb-toc { position: sticky; top: 6rem; font-size: 0.875rem; }
.kb-toc summary { font-weight: 600; cursor: pointer; }
.kb-toc__list { list-style: none; padding: 0; }
.kb-toc__h3 { padding-left: 1rem; }
.kb-prevnext { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--brand-border); }
.kb-related { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--brand-border); }
.kb-zoomable { cursor: zoom-in; }
.kb-lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, 0.85); display: flex; align-items: center; justify-content: center; padding: 2rem; }
.kb-lightbox img { max-width: 100%; max-height: 100%; background: #fff; }
.kb-results { list-style: none; padding: 0; }
.kb-result { padding: 1rem 0; border-bottom: 1px solid var(--brand-border); }
.kb-result__title { font-weight: 600; font-size: 1.0625rem; }
.kb-result__crumb { font-size: 0.8125rem; color: var(--brand-secondary); margin: 0.25rem 0; }
.kb-result__summary { margin: 0; }
.kb-pager { display: flex; gap: 0.75rem; margin-top: 1.5rem; }
.kb-pager__current { font-weight: 700; }
@media (max-width: 960px) {
  .kb-article, .kb-article--toc { grid-template-columns: minmax(0, 1fr); }
  .kb-article__toc { order: -1; }
  .kb-article__section { order: 2; }
  .kb-toc { position: static; }
  .kb-toc:not([open]) { border: 1px solid var(--brand-border); padding: 0.5rem; }
}

/* Zendesk "Zenplates" home look (screenshots 2026-10-09; theme settings in docs/reference/zendesk-portal/ebet). */
h1, h2, h3 { font-weight: 700; }
.portal--home .portal-header { position: absolute; top: 0; left: 0; right: 0; z-index: 50; background: transparent; border-bottom: 0; }
.portal-header__who { display: inline-flex; align-items: center; gap: 0.5rem; }
.portal-header__avatar { width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, 0.85); color: #a0aec0; display: inline-flex; align-items: flex-end; justify-content: center; overflow: hidden; }
.portal-header__avatar svg { width: 24px; height: 24px; }
.hero { position: relative; background-size: cover; background-position: center; padding: 8.5rem 0 7.5rem; }
.hero h1 { font-size: 3rem; letter-spacing: -0.01em; }
.hero__inner { position: relative; z-index: 1; }
.hero__search { position: relative; max-width: 36rem; }
.hero__search input { height: 52px; padding-left: 3rem; border-radius: 2px; font-size: 1.125rem; }
.kb-search__icon { position: absolute; left: 1rem; top: 26px; transform: translateY(-50%); width: 20px; height: 20px; color: #4a5568; pointer-events: none; }
.hero__wave { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 70px; }
.notice { display: flex; gap: 1.25rem; align-items: flex-start; background: var(--notice-bg); color: var(--notice-text); padding: 1.75rem 2rem; margin: 1.5rem auto 0; max-width: 1076px; }
.notice__icon { width: 24px; height: 24px; flex: none; margin-top: 0.125rem; }
.notice__body { flex: 1; }
.notice__body p { margin: 0 0 1rem; }
.notice__body p:last-child { margin-bottom: 0; }
.notice__body a { color: var(--brand-link); text-decoration: none; }
.notice__close { background: none; border: 0; font-size: 1.75rem; line-height: 1; cursor: pointer; color: inherit; padding: 0 0.25rem; }
.section--tight { padding-top: 4rem; padding-bottom: 2.5rem; }
.feature-card { display: block; max-width: 1076px; margin: 0 auto; padding: 2rem; text-align: center; background: #fff; border: 1px solid var(--brand-border); border-radius: 2px; text-decoration: none; box-shadow: 0 8px 20px -12px rgba(0, 0, 0, 0.12); transition: box-shadow 0.15s; }
.feature-card:hover { box-shadow: 0 10px 24px -8px rgba(0, 0, 0, 0.18); }
.feature-card__img { height: 42px; width: auto; display: block; margin: 0 auto 1rem; }
.feature-card__title { font-size: 1.25rem; margin: 0 0 0.75rem; }
.feature-card__text { margin: 0; color: var(--brand-text); }
.section h2 { font-size: 1.75rem; }
.section__title--left { text-align: left !important; display: flex; align-items: center; gap: 0.5rem; }
.section__icon { width: 24px; height: 24px; color: #00a9b1; }
.cards--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cards--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { border-radius: 2px; transition: box-shadow 0.15s; }
a.card:hover, .contact-card:hover { box-shadow: 0 8px 20px -10px rgba(0, 0, 0, 0.2); }
.kb-card { display: block; text-align: center; padding: 1.5rem 1.5rem 2rem; text-decoration: none; }
.kb-card__icon { height: 36px; width: auto; display: block; margin: 0 auto 1.5rem; }
.kb-card h3 { color: var(--brand-heading); font-size: 1.25rem; margin-bottom: 1rem; }
.kb-card p { color: var(--brand-text); }
.promo-card { display: block; text-align: left; padding: 1.75rem 1.5rem; text-decoration: none; }
.promo-card__category { display: block; color: var(--brand-link); font-size: 0.9375rem; margin-bottom: 0.75rem; }
.promo-card__title { color: var(--brand-heading); font-size: 1.125rem; margin-bottom: 1rem; }
.promo-card__summary { color: var(--brand-text); margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.contact-card { display: flex; gap: 1.25rem; align-items: flex-start; padding: 1.5rem 1.5rem 2rem; border: 1px solid var(--brand-border); border-radius: 2px; background: #fff; text-decoration: none; color: var(--brand-text); }
.contact-card__icon { width: 32px; height: 32px; flex: none; object-fit: contain; }
.contact-card__title { display: block; color: var(--brand-heading); font-weight: 700; font-size: 1.125rem; margin-bottom: 0.75rem; }
.contact-card__text { display: block; }
@media (max-width: 720px) {
  .cards--two, .cards--three { grid-template-columns: minmax(0, 1fr); }
  .hero { padding: 7rem 0 5rem; }
  .hero h1 { font-size: 2rem; }
  .notice { padding: 1.25rem; }
}

/* Zendesk inner pages: category, article, search (screenshots 2026-10-09, docs/reference/zendesk-portal/ebet/screenshots). */
.kb-searchbar { background: #F7FAFC; padding: 1rem 0; border-bottom: 1px solid var(--brand-border); }
.kb-searchbar .kb-search { max-width: none; margin: 0; }
.kb-search input { padding-left: 2.75rem; height: 42px; border-radius: 2px; border: 1px solid var(--brand-border); background: #fff; }
.kb-searchbar .kb-search__icon { top: 21px; left: 0.875rem; width: 18px; height: 18px; }
.kb-search input:focus { outline: 2px solid rgba(0, 169, 177, 0.25); border-color: var(--brand-primary); }
.kb-page { padding-top: 0; padding-bottom: 0; }
.kb-layout { display: grid; grid-template-columns: minmax(0, 1fr) 16rem; gap: 0; }
.kb-layout__main { padding: 2.5rem 3rem 3rem 0; min-width: 0; }
.kb-layout__side { padding: 2.5rem 0 3rem 1.5rem; border-left: 1px solid var(--brand-border); }
.kb-breadcrumbs { font-size: 0.9375rem; margin: 0 0 2rem; color: var(--brand-text); }
.kb-breadcrumbs a { text-decoration: none; }
.kb-breadcrumbs__sep { margin: 0 0.6rem; color: var(--brand-text); }
.kb-results-layout + * { margin-top: 0; }
.kb-title { font-size: 2.5rem; color: var(--brand-heading); margin: 0 0 1.25rem; }
.kb-lead { font-size: 1.125rem; color: #718096; margin-bottom: 2.5rem; }
.kb-meta { color: #718096; font-size: 1rem; margin-bottom: 2rem; }
.kb-section { margin-bottom: 2.25rem; }
.kb-section__title { font-size: 1.25rem; margin-bottom: 1.25rem; }
.kb-section__title a { text-decoration: none; }
.kb-subsection { margin: 1.5rem 0; }
.kb-subsection h3, .kb-subsection h4 { font-size: 1.0625rem; }
.kb-bullets { margin: 0 0 1rem; padding-left: 1.5rem; }
.kb-bullets li { padding: 0.375rem 0; max-width: 22rem; }
.kb-layout__main .kb-bullets li { max-width: none; }
.kb-bullets li::marker { color: var(--brand-text); }
.kb-bullets a { text-decoration: none; }
.kb-bullets a:hover, .kb-bullets .is-current a { text-decoration: underline; }
.kb-seeall { display: inline-block; font-size: 0.875rem; padding: 0.25rem 0.75rem; border: 1px solid var(--brand-border); border-radius: 2px; color: var(--brand-text); text-decoration: none; }
.kb-catnav { margin-bottom: 2.5rem; }
.kb-catnav__cat { margin-bottom: 1.25rem; }
.kb-catnav__cat > summary { list-style: none; display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-weight: 600; font-size: 1.0625rem; }
.kb-catnav__cat > summary::-webkit-details-marker { display: none; }
.kb-catnav__cat > summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin: 0 0.5rem 0.25rem 1rem; flex: none; }
.kb-catnav__cat[open] > summary::after { transform: rotate(-135deg); margin-bottom: -0.25rem; }
.kb-catnav__cat > summary a { color: var(--brand-text); text-decoration: none; }
.kb-catnav__cat.is-current > summary a { color: var(--brand-heading); }
.kb-catnav__subs { list-style: none; margin: 0.75rem 0 0; padding-left: 0.75rem; }
.kb-catnav__subs li { padding: 0.375rem 0; }
.kb-catnav__subs a { color: var(--brand-text); text-decoration: none; font-weight: 500; font-size: 0.9375rem; }
.kb-catnav__subs a.is-current { color: var(--brand-heading); }
.kb-cta { background: #000; color: #fff; padding: 2rem; margin-top: 1rem; }
.kb-cta__title { color: #fff; font-size: 1.25rem; margin-bottom: 1rem; }
.kb-cta__text { margin: 0 0 1.75rem; }
.kb-cta__btn { display: block; text-align: center; padding: 0.75rem 1rem; border-radius: 2px; }
.kb-side__block { margin-bottom: 2.5rem; }
.kb-side__title { font-size: 1.25rem; color: var(--brand-heading); margin-bottom: 1.25rem; }
.kb-toc__list { list-style: none; padding: 0; margin: 0; }
.kb-toc__list a { display: block; padding: 0.4rem 0.9rem; text-decoration: none; border-radius: 2px; }
.kb-toc__list a.is-current { background: var(--brand-primary); color: var(--brand-primary-inverse); }
.kb-toc__h3 a { padding-left: 1.75rem; }
.kb-article__body { color: var(--brand-text); }
.kb-article__body h2, .kb-article__body h3 { color: var(--brand-heading); margin-top: 2rem; }
.kb-article__body table { border: 1px solid #4a5568; }
.kb-article__body th, .kb-article__body td { border: 1px solid #4a5568; padding: 0.75rem; }
.kb-article__body td p, .kb-article__body th p { margin: 0 0 0.75rem; }
.kb-prevnext { display: flex; justify-content: space-between; gap: 2rem; margin-top: 4rem; padding-top: 0; border-top: 0; }
.kb-prevnext > div { max-width: 45%; }
.kb-prevnext__next { text-align: right; margin-left: auto; }
.kb-prevnext__label { display: block; font-weight: 700; color: var(--brand-heading); margin-bottom: 0.5rem; font-size: 1.0625rem; }
.kb-prevnext a { text-decoration: none; }
.kb-results-layout { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 3rem; padding-bottom: 3rem; }
.kb-types { display: flex; flex-direction: column; gap: 0.5rem; }
.kb-types__item { padding: 0.5rem 1rem; color: var(--brand-link); border-radius: 2px; }
.kb-types__item.is-current { background: var(--brand-primary); color: var(--brand-primary-inverse); }
.kb-results-title { font-size: 1.25rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--brand-border); margin-bottom: 0; }
.kb-result { padding: 1.5rem 0; }
.kb-result__title { font-size: 1.125rem; font-weight: 700; text-decoration: none; }
.kb-result__crumb { color: var(--brand-text); margin: 0.75rem 0; white-space: pre-wrap; }
.kb-result__summary { color: var(--brand-text); margin: 0 0 0.75rem; }
.kb-result__date { color: #718096; margin: 0; }
mark { background: #fbef8a; color: inherit; padding: 0 0.15em; }
.kb-result__summary mark { font-style: italic; }
.kb-suggest { border-radius: 2px; padding: 0; }
.kb-suggest li { border-bottom: 1px solid var(--brand-border); }
.kb-suggest li a { padding: 0.9rem 1.25rem; color: #2b6cb0; }
.kb-suggest__title { display: block; font-size: 1rem; }
.kb-suggest__title mark { font-weight: 700; color: #2b6cb0; }
.kb-suggest__crumb { display: block; font-size: 0.8125rem; color: var(--brand-text); margin-top: 0.25rem; }
.kb-suggest__all a { color: var(--brand-link); }
@media (max-width: 900px) {
  .kb-layout, .kb-results-layout { grid-template-columns: minmax(0, 1fr); }
  .kb-layout__main { padding-right: 0; }
  .kb-layout__side { border-left: 0; border-top: 1px solid var(--brand-border); padding-left: 0; }
  .kb-title { font-size: 2rem; }
}

/* ---------------------------------------------------------------- customer tickets (customer-tickets spec) */
.tickets-page { padding-top: 1.5rem; padding-bottom: 3rem; }
.tickets-head { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.tickets-head h1 { margin: 0; }
.tickets-tabs { display: flex; flex-wrap: wrap; gap: 0.25rem; border-bottom: 1px solid var(--brand-border); margin-bottom: 1rem; }
.tickets-tab { background: none; border: 0; border-bottom: 3px solid transparent; padding: 0.6rem 1rem; font: inherit; color: var(--brand-text); cursor: pointer; }
.tickets-tab.is-active { border-bottom-color: var(--brand-primary); color: var(--brand-heading); font-weight: 600; }
.tickets-tab:focus-visible, .tickets-sort:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: 2px; }
.tickets-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.tickets-search { flex: 1 1 16rem; min-width: 0; padding: 0.6rem 0.8rem; border: 1px solid var(--brand-border); border-radius: 4px; font: inherit; }
.tickets-filter { padding: 0.55rem 0.6rem; border: 1px solid var(--brand-border); border-radius: 4px; font: inherit; background: #fff; }
.tickets-table-wrap { overflow-x: auto; }
.tickets-table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.tickets-table th, .tickets-table td { text-align: left; padding: 0.7rem 0.6rem; border-bottom: 1px solid var(--brand-border); vertical-align: top; }
.tickets-table th { font-weight: 600; color: var(--brand-heading); white-space: nowrap; }
.tickets-sort { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: inherit; cursor: pointer; }
.tickets-subject a { font-weight: 500; }
.tickets-num, .tickets-date { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tickets-cc, .tickets-before { display: inline-block; margin-left: 0.5rem; font-size: 0.75rem; padding: 0.05rem 0.4rem; border-radius: 999px; border: 1px solid var(--brand-border); color: var(--brand-text); }
.tickets-status { display: inline-block; font-size: 0.8125rem; font-weight: 600; padding: 0.15rem 0.6rem; border-radius: 999px; white-space: nowrap; }
.tickets-status--open { background: #e6f4ea; color: #276749; }
.tickets-status--done { background: #edf2f7; color: #4a5568; }
.tickets-note { font-size: 0.875rem; padding: 0.5rem 0.75rem; background: #fffbea; border: 1px solid #f6e05e; border-radius: 4px; }
.tickets-layout { display: grid; grid-template-columns: minmax(0, 1fr) 18rem; gap: 2rem; }
@media (max-width: 860px) { .tickets-layout { grid-template-columns: minmax(0, 1fr); } }
.tickets-layout__main { display: grid; gap: 1rem; align-content: start; min-width: 0; }
.tickets-layout__side { display: grid; gap: 1.25rem; align-content: start; min-width: 0; }
.tickets-msg { border: 1px solid var(--brand-border); border-radius: 6px; padding: 1rem 1.1rem; background: #fff; min-width: 0; }
.tickets-msg--customer, .tickets-msg--portal { background: #fbfbfd; }
.tickets-msg__head { display: flex; flex-wrap: wrap; gap: 0.25rem 0.75rem; align-items: baseline; margin-bottom: 0.5rem; }
.tickets-msg__head time { margin-left: auto; font-size: 0.8125rem; color: #718096; font-variant-numeric: tabular-nums; }
.tickets-msg__via { font-size: 0.8125rem; color: #718096; }
.tickets-msg__cc { font-size: 0.8125rem; color: #718096; margin: 0 0 0.5rem; overflow-wrap: anywhere; }
.tickets-msg__body { overflow-wrap: anywhere; }
.tickets-msg__body table { max-width: 100%; display: block; overflow-x: auto; }
.tickets-msg__files { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.tickets-file { font-size: 0.875rem; border: 1px solid var(--brand-border); border-radius: 4px; padding: 0.3rem 0.6rem; text-decoration: none; }
.tickets-notice { margin: 0; padding: 0.75rem 1rem; border-radius: 4px; background: #edf2f7; }
.tickets-notice--soft { background: transparent; border: 1px dashed var(--brand-border); color: #718096; }
.tickets-panel { border: 1px solid var(--brand-border); border-radius: 6px; padding: 1rem; background: #fff; }
.tickets-panel h2 { font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.75rem; }
.tickets-facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.4rem 0.9rem; margin: 0; font-size: 0.9rem; }
.tickets-facts dt { color: #718096; }
.tickets-facts dd { margin: 0; overflow-wrap: anywhere; }
.tickets-people, .tickets-attachments { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; font-size: 0.9rem; }
.tickets-people li { display: flex; justify-content: space-between; gap: 0.5rem; }
.tickets-people small { color: #718096; }
.tickets-reply { display: grid; gap: 0.6rem; border: 1px solid var(--brand-border); border-radius: 6px; padding: 1rem 1.1rem; background: #fff; }
.tickets-reply__title { font-size: 1rem; margin: 0; }
.tickets-reply__text { width: 100%; box-sizing: border-box; padding: 0.7rem; border: 1px solid var(--brand-border); border-radius: 4px; font: inherit; resize: vertical; min-height: 7rem; }
.tickets-reply__label { font-size: 0.875rem; font-weight: 600; }
.tickets-reply__ccrow { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; border: 1px solid var(--brand-border); border-radius: 4px; padding: 0.35rem; }
.tickets-reply__cc { flex: 1 1 12rem; min-width: 0; border: 0; padding: 0.3rem; font: inherit; outline: none; }
.tickets-chips { display: contents; }
.tickets-chip { display: inline-flex; align-items: center; gap: 0.25rem; background: #edf2f7; border-radius: 999px; padding: 0.15rem 0.3rem 0.15rem 0.6rem; font-size: 0.8125rem; }
.tickets-chip__x { background: none; border: 0; cursor: pointer; font-size: 1rem; line-height: 1; padding: 0 0.25rem; color: #4a5568; }
.tickets-reply__hint { font-size: 0.8125rem; color: #718096; margin: 0; }
.tickets-reply__filesrow { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.tickets-reply__file { position: absolute; width: 1px; height: 1px; opacity: 0; }
.tickets-reply__files { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.25rem; font-size: 0.875rem; }
.tickets-reply__msg { margin: 0; font-size: 0.9rem; min-height: 1.2em; }
.tickets-reply__msg.is-error { color: #9b1c1c; }
.tickets-reply__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: flex-end; }

/* ---------------------------------------------------------------- venue step, no access (portal-foundation) */
.portal-step { max-width: 36rem; padding-top: 3rem; padding-bottom: 3rem; }
.venue-step { display: grid; gap: 0.75rem; }
.venue-step__search { padding: 0.6rem 0.8rem; border: 1px solid var(--brand-border); border-radius: 4px; font: inherit; }
.venue-step__list { display: grid; gap: 0.25rem; max-height: 22rem; overflow-y: auto; }
.venue-step__item { display: flex; gap: 0.5rem; align-items: center; padding: 0.55rem 0.75rem; border: 1px solid var(--brand-border); border-radius: 4px; cursor: pointer; }
.venue-step__item small { color: #718096; }
.venue-step__hint, .venue-step__msg { font-size: 0.875rem; color: #718096; }
.portal-header__venue-select { font: inherit; padding: 0.3rem 0.5rem; border-radius: 4px; border: 1px solid var(--brand-border); max-width: 16rem; }

/* ---------------------------------------------------------------- membership pages (portal-foundation Task 2.4) */
.membership-page form { display: grid; gap: 0.75rem; }
.membership-page input[type="email"], .membership-page input[type="password"], .membership-page input[type="text"] { width: 100%; box-sizing: border-box; padding: 0.65rem 0.8rem; border: 1px solid var(--brand-border); border-radius: 4px; font: inherit; }
.membership-page input[type="submit"], .membership-page button[type="submit"] { background: var(--brand-primary); color: var(--brand-primary-inverse); border: 0; border-radius: 4px; padding: 0.7rem 1.2rem; font: inherit; font-weight: 600; cursor: pointer; }
.membership-page__help { font-size: 0.9rem; color: #718096; margin-top: 1.5rem; }

/* ---------------------------------------------------------------- request forms (request-forms spec) */
.rf-page { padding: 2rem 0 3rem; max-width: 52rem; }
.rf-intro, .rf-tip { color: var(--brand-muted, var(--brand-text)); }
.rf-tip { border-left: 4px solid var(--brand-primary); padding: 0.5rem 0.75rem; background: var(--brand-surface, #f7f7f7); }
.rf-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.rf-card { display: flex; flex-direction: column; gap: 0.35rem; padding: 1.25rem; border: 1px solid var(--brand-border); border-radius: 0.5rem; text-decoration: none; color: var(--brand-text); background: #fff; }
.rf-card:hover, .rf-card:focus-visible { border-color: var(--brand-primary); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); }
.rf-card__title { font-weight: 600; color: var(--brand-heading); }
.rf-card__text { font-size: 0.9rem; }
.rf-back { margin-bottom: 1rem; }
.rf-section { border: 0; padding: 0; margin: 0 0 1.75rem; }
.rf-section legend { font-size: 1.15rem; font-weight: 600; color: var(--brand-heading); margin-bottom: 0.75rem; }
.rf-field { margin-bottom: 1rem; }
.rf-label, .rf-sublabel { display: block; font-weight: 500; margin-bottom: 0.35rem; }
.rf-field input[type="text"], .rf-field input[type="email"], .rf-field input[type="tel"], .rf-field input[type="date"], .rf-field select, .rf-field textarea {
  width: 100%; padding: 0.55rem 0.7rem; border: 1px solid var(--brand-border); border-radius: 0.35rem; font: inherit; background: #fff; }
.rf-field input[readonly] { background: var(--brand-surface, #f3f3f3); color: var(--brand-muted, #555); }
.rf-field--invalid input, .rf-field--invalid select, .rf-field--invalid textarea { border-color: #b42318; }
.rf-help { font-size: 0.85rem; margin: 0.3rem 0 0; color: var(--brand-muted, #555); }
.rf-error { color: #b42318; font-size: 0.9rem; margin: 0.3rem 0 0; }
.rf-check { display: block; margin: 0.25rem 0; }
.rf-checks { columns: 2 14rem; }
.rf-cascade__level + .rf-cascade__level { margin-top: 0.6rem; }
.rf-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.rf-add { display: inline-block; }
.rf-files { list-style: none; padding: 0; margin: 0.5rem 0 0; }
.rf-file { display: flex; gap: 0.75rem; align-items: center; padding: 0.35rem 0; border-bottom: 1px solid var(--brand-border); }
.rf-file__name { flex: 1; word-break: break-all; }
.rf-file--bad .rf-file__status { color: #b42318; }
.rf-file__remove, .rf-file__retry { background: none; border: 0; color: var(--brand-link); cursor: pointer; font: inherit; text-decoration: underline; }
.rf-suggest { margin-top: 0.5rem; padding: 0.6rem 0.8rem; border: 1px dashed var(--brand-border); border-radius: 0.35rem; }
.rf-suggest__title { font-weight: 500; margin: 0 0 0.3rem; }
.rf-suggest ul { margin: 0; padding-left: 1.1rem; }
.rf-summary, .rf-notice--error { color: #b42318; }
.rf-summary { margin-bottom: 1rem; font-weight: 500; }
.rf-notice { margin: 1rem 0; }
.rf-actions { margin-top: 1.25rem; display: flex; gap: 0.75rem; flex-wrap: wrap; }
.rf-done h1 { margin-top: 0.5rem; }
