:root {
  --bg: #f5f7fa;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #475569;
  --line: #d1d5db;
  --accent: #0b3c5d;
  --blue: #2563eb;
  --blue-muted: #3f5fa8;
  --gray: #64748b;
  --gray-muted: #9aa3ad;
  --win: #16a34a;
  --shadow: 0 10px 30px rgba(15, 23, 42, .08);
  --calendar-wrapper-width: 1200px;
  --calendar-day-row-height: 112px;
  --calendar-event-row-height: 48px;
}

html.dark-mode {
  --bg: #020617;
  /* Slate-950 */
  --card: #1e293b;
  /* Slate-800 */
  --ink: #f8fafc;
  /* Slate-50 */
  --muted: #94a3b8;
  /* Slate-400 */
  --line: #334155;
  /* Slate-700 */
  --accent: #38bdf8;
  /* Sky-400 (Brighter for dark mode) */
  --blue: #3b82f6;
  /* Blue-500 */
  --blue-muted: #60a5fa;
  --gray: #94a3b8;
  --gray-muted: #64748b;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  /* Stronger shadow */
}

/*
  Calendar layout: lock canvas width to the same logical width as My Trade Fairs
  so that Year / Month / Week views do not shrink or grow based on content.
  The panel already lives inside .wrap (max-width:1200px), so we just need the
  calendar container + canvas to always span the full available width and avoid
  fit-content / max-content style shrink.
*/
.page-calendar main.wrap {
  width: min(var(--calendar-wrapper-width), 100%);
}

.page-calendar .panel {
  /* Ensure the calendar panel is treated as a full-width block within the wrap */
  width: 100%;
  max-width: 100%;
}

.page-calendar .trade-calendar {
  /* Stable canvas wrapper: never shrink below the dashboard width */
  width: 100%;
  max-width: 100%;
}

.page-calendar .trade-calendar-canvas {
  /* Lock the internal calendar grid to the same logical width as the wrapper.
     This prevents Month / Week / empty months from collapsing narrower than Year. */
  width: 100%;
  max-width: 100%;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Anti-FOUC: Hide CONTENT initially, reveal when nav-ready */
/* This keeps the injected Sidebar/Header visible instantly */
main,
.site-footer {
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

html.nav-ready main,
html.nav-ready .site-footer {
  opacity: 1;
}

/* Global Link Reset: prevent "underlined code" look during load or fallback */
a {
  text-decoration: none;
  color: inherit;
}

main {
  flex: 1;
}

.app-page {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 28px 18px;
}

.dashboard-main-panel {
  width: 100%;
  max-width: 1280px;
  background: var(--card);
  /* Was #ffffff */
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  padding: 24px 32px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  margin: 0 auto;
}

html.route-trade-fairs .dashboard-main-panel {
  border-color: transparent !important;
  background:
    linear-gradient(var(--card), var(--card)) padding-box,
    linear-gradient(135deg, rgba(34, 211, 238, 0.9), rgba(59, 130, 246, 0.68) 48%, rgba(139, 92, 246, 0.82)) border-box !important;
  box-shadow:
    0 0 0 1px rgba(139, 92, 246, 0.2),
    0 0 28px rgba(34, 211, 238, 0.18),
    0 18px 48px rgba(15, 23, 42, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    inset 0 0 24px rgba(139, 92, 246, 0.045) !important;
}

@media (max-width: 768px) {
  .app-page {
    padding: 16px;
  }

  .dashboard-main-panel {
    padding: 20px;
    border-radius: 12px;
  }
}


.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 18px;
}

/* --- CRITICAL: Anti-FOUC for Notifications --- */
/* These styles must be here because notifications.css loads async */
.notification-dropdown {
  display: none;
  position: absolute;
  top: 40px;
  right: 0;
  z-index: 1000;
}

.notification-badge,
.mail-badge {
  display: none;
}

/* --------------------------------------------- */

.site-header,
.topbar {
  background: #0c1420;
  color: #e2e8f0;
  border-bottom: 1px solid #0f172a;
  position: relative;
  z-index: 20;
}

.site-header .wrap {
  padding: 14px 18px;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 56px;
}

.header-controls {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand {
  color: #e5e7eb;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: .6px;
  font-size: 17px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand:hover {
  color: #ffffff;
}

.primary-nav {
  margin-left: 0;
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0;
  padding: 0;
  font-size: 15px;
  font-weight: 600;
}

.nav-links a {
  color: #e2e8f0;
  text-decoration: none;
  padding: 6px 0;
  transition: color .2s ease, text-decoration-color .2s ease;
}

.nav-links a:hover,
.nav-links a:focus {
  color: #93c5fd;
  text-decoration: underline;
  outline: none;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  background: none;
  border: 1px solid #243142;
  color: #e2e8f0;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

#site-header:not([data-header-loaded="true"]) .global-search-inline,
#site-header:not([data-header-loaded="true"]) .global-search-trigger,
#site-header:not([data-header-loaded="true"]) .global-search-overlay {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.global-search-inline {
  display: none;
  align-items: center;
  gap: 8px;
  background: #111b2f;
  border: 1px solid #1f2a3a;
  border-radius: 999px;
  padding: 6px 12px;
  min-width: 220px;
  max-width: 320px;
  color: #e2e8f0;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.global-search-inline:focus-within {
  border-color: #374baf;
  box-shadow: 0 0 0 2px rgba(147, 197, 253, .25);
}

.global-search-input {
  background: transparent;
  border: none;
  color: inherit;
  font-size: 14px;
  width: 100%;
  min-width: 120px;
}

.global-search-input:focus {
  outline: none;
}

.global-search-input::placeholder {
  color: #94a3b8;
}

.global-search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #0c1420;
  border: 1px solid #1f2a3a;
  border-radius: 12px;
  padding: 6px 0;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .55);
  max-height: 320px;
  overflow: auto;
  display: none;
  z-index: 30;
}

.global-search-dropdown.is-open {
  display: block;
}

.global-search-result {
  width: 100%;
  border: none;
  background: none;
  color: #e2e8f0;
  text-align: left;
  padding: 10px 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 14px;
}

.global-search-result:hover,
.global-search-result:focus-visible {
  background: #131b2f;
  outline: none;
}

.global-search-result-label {
  font-weight: 600;
}

.global-search-result-meta {
  font-size: 12px;
  color: #94a3b8;
}

.global-search-empty {
  padding: 12px 14px;
  font-size: 13px;
  color: #94a3b8;
}

.global-search-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 50%;
  border: 1px solid #243142;
  background: none;
  color: #e2e8f0;
  cursor: pointer;
}

.global-search-trigger-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.global-search-overlay {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 40;
  align-items: flex-start;
  justify-content: center;
}

.global-search-overlay.is-active {
  display: flex;
}

.global-search-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .65);
}

.global-search-overlay-panel {
  position: relative;
  margin-top: 40px;
  width: min(620px, 100%);
  max-height: calc(100% - 32px);
  background: #0c1420;
  border: 1px solid #1f2a3a;
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .65);
}

.global-search-overlay-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.global-search-overlay-input {
  flex: 1;
  background: #111b2f;
  border-radius: 12px;
  border: 1px solid #1f2a3a;
  padding: 10px 14px;
  color: #e2e8f0;
  font-size: 15px;
  min-width: 0;
}

.global-search-overlay-input:focus {
  outline: 2px solid #93c5fd;
}

.global-search-overlay-close {
  background: none;
  border: none;
  color: #e2e8f0;
  font-size: 20px;
  line-height: 1;
  padding: 6px;
  cursor: pointer;
}

.global-search-overlay-results {
  background: #0c1420;
  border-radius: 12px;
  border: 1px solid #1f2a3a;
  max-height: 320px;
  overflow: auto;
  padding-bottom: 4px;
}

@media (max-width: 760px) {
  .global-search-inline {
    display: none;
  }

  .global-search-trigger {
    display: flex;
  }

  .global-search-overlay-panel {
    margin-top: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
    max-height: 100%;
    padding: 16px;
  }

}

.nav-toggle-box {
  display: grid;
  gap: 4px;
}

.nav-toggle-line {
  width: 18px;
  height: 2px;
  background: #e2e8f0;
  display: block;
}

.nav-toggle-text {
  font-size: 14px;
  letter-spacing: .3px;
}

.site-footer {
  background: #0c1420;
  color: #d6dce7;
  border-top: 1px solid #0f172a;
  margin-top: 32px;
  padding: 40px 18px 26px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 0;
  align-items: center;
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
}

.footer-section-title {
  font-size: 13px;
  letter-spacing: .3px;
  font-weight: 600;
  text-transform: uppercase;
  color: #b1b9c7;
  margin: 0;
  text-align: center;
  justify-self: center;
}

.footer-section-title-site {
  grid-column: 1 / 4;
  grid-row: 1;
}

.footer-section-title-legal {
  grid-column: 4 / 6;
  grid-row: 1;
}

.wordmark {
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  font-size: 30px;
}

.brand-logo {
  width: min(280px, 100%);
  max-width: 100%;
  height: auto;
  display: block;
}

.site-header .brand-logo {
  width: clamp(190px, 24vw, 280px);
  height: auto;
  max-width: 100%;
}

.site-footer .footer-logo-img {
  width: min(430px, 100%);
  height: auto;
  max-width: 100%;
}

.wordmark-line {
  font-size: 1em;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.wordmark-plant {
  color: #334155;
  font-style: italic;
}

.wordmark-benchmark {
  color: var(--blue);
  font-style: italic;
}

.wordmark-tagline {
  font-size: 0.42em;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gray-muted);
}

.footer-brand {
  font-weight: 800;
  letter-spacing: .6px;
  color: #f4f7fb;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.footer-logo-tagline {
  color: #9aa3b5;
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
}

.topbar-brand-logo {
  display: block;
  width: clamp(196px, 18vw, 280px);
  height: auto;
  max-width: 100%;
  filter:
    drop-shadow(0 0 10px rgba(34, 211, 238, 0.16))
    drop-shadow(0 0 16px rgba(139, 92, 246, 0.1));
}

.topbar-brand-icon {
  display: none;
  width: 46px;
  height: auto;
  filter:
    drop-shadow(0 0 10px rgba(34, 211, 238, 0.2))
    drop-shadow(0 0 16px rgba(139, 92, 246, 0.14));
}

.footer-wordmark {
  align-items: center;
  text-align: center;
  margin: 0 auto;
}

.site-header .wordmark {
  align-items: flex-start;
  text-align: left;
}

.wordmark-footer {
  font-size: 40px;
}

.footer-sections {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 22px 12px;
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  justify-content: center;
  align-items: start;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links-site-col-1 {
  grid-column: 1;
  grid-row: 2;
}

.footer-links-site-col-2 {
  grid-column: 2;
  grid-row: 2;
}

.footer-links-site-col-3 {
  grid-column: 3;
  grid-row: 2;
}

.footer-links-legal-col-1 {
  grid-column: 4;
  grid-row: 2;
}

.footer-links-legal-col-2 {
  grid-column: 5;
  grid-row: 2;
}

.footer-links a {
  color: #9aa3b5;
  text-decoration: none;
  font-weight: 500;
  font-size: 12px;
  display: block;
}

.footer-links a:hover,
.footer-links a:focus {
  color: #e2e8f0;
  text-decoration: underline;
}

.footer-note {
  color: #b7becb;
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
}

.nav-toggle:focus-visible,
.nav-links a:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 4px;
}

@media (max-width: 1100px) {
  .nav-links {
    gap: 14px;
    font-size: 14px;
  }

  .brand {
    font-size: 16px;
  }

  .wordmark {
    font-size: 28px;
  }
}

/* Standard Page Header */
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  gap: 16px;
  border-bottom: 1px solid transparent;
  /* Optional: adds structure without visual noise */
}

.panel-head h1 {
  font-family: inherit;
  font-weight: 800;
  font-size: 32px;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 8px 0;
  letter-spacing: -0.5px;
}

.panel-sub {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.5;
  font-weight: 400;
  max-width: 800px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .panel-head {
    flex-direction: column;
    margin-bottom: 20px;
  }

  .panel-head h1 {
    font-size: 26px;
  }
}

/* 
position: relative;
display: flex;
align-items: center;
height: 100%;
}
*/

.nav-dropdown-trigger {
  background: none;
  border: none;
  color: #e2e8f0;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  cursor: pointer;
  padding: 6px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-dropdown-trigger:after {
  content: '';
  display: block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
  opacity: 0.7;
}

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: #0c1420;
  border: 1px solid #1f2a3a;
  border-radius: 8px;
  padding: 8px 0;
  min-width: 200px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 100;
}

.nav-item-has-dropdown:hover .nav-dropdown,
.nav-item-has-dropdown:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown li {
  display: block;
}

.nav-dropdown a {
  display: block;
  padding: 8px 16px;
  font-size: 14px;
  color: #e2e8f0;
  white-space: nowrap;
}

.nav-dropdown a:hover {
  background: #1e293b;
  color: #fff;
  text-decoration: none;
}


@media (max-width: 760px) {
  .nav-ready .site-header .wrap {
    padding: 12px 16px;
  }

  .nav-ready .nav-toggle {
    display: flex;
    margin-left: auto;
  }

  .nav-ready .primary-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #0c1420;
    border-top: 1px solid #1f2a3a;
    padding: 12px 0 14px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  }

  .nav-ready .primary-nav.is-open {
    display: block;
  }

  .nav-ready .nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 0 18px;
  }

  .nav-ready .nav-links a {
    width: 100%;
  }

  .wordmark {
    font-size: 24px;
  }

  .site-footer .wordmark-footer {
    font-size: 18px;
    max-width: 100%;
    width: 100%;
    overflow: hidden;
    align-items: center;
  }

  .site-footer .wordmark-footer .wordmark-line {
    width: 100%;
    justify-content: center;
    white-space: nowrap;
    transform: translateX(4%) skewX(-12deg);
    transform-origin: center;
  }
}

@media (max-width: 768px) {
  .footer-sections {
    grid-template-columns: 1fr;
    row-gap: 12px;
    justify-items: center;
  }

  .footer-links {
    align-items: center;
  }

  .footer-links a {
    text-align: center;
  }

  .footer-section-title {
    text-align: center;
    margin-top: 24px;
  }

  .footer-section-title-site,
  .footer-section-title-legal,
  .footer-links-site-col-1,
  .footer-links-site-col-2,
  .footer-links-site-col-3,
  .footer-links-legal-col-1,
  .footer-links-legal-col-2 {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .site-footer .footer-logo-img {
    width: min(360px, 100%);
    height: auto;
  }

  .site-footer .wordmark-footer {
    font-size: 32px;
  }

  .site-footer .wordmark-footer .wordmark-line {
    transform: none;
  }
}

.content-hero h1 {
  font-size: 34px;
}

.breadcrumb {
  margin: 18px 0 8px;
  color: var(--gray-muted);
  font-size: 13px;
}

.breadcrumb ol {
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  align-items: center;
}

.breadcrumb li {
  display: flex;
  align-items: center;
  color: inherit;
}

.breadcrumb li+li::before {
  content: '/';
  margin: 0 8px;
  color: var(--gray);
}

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

.back-to-fairs {
  display: inline-block;
  margin: 6px 0 18px;
  font-size: 0.85rem;
  color: inherit;
  text-decoration: none;
}

.back-to-fairs:hover,
.back-to-fairs:focus-visible {
  text-decoration: underline;
}

.breadcrumb-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 18px 0 18px;
}

.breadcrumb-row .breadcrumb {
  margin: 0;
}

.breadcrumb-row .back-to-fairs {
  margin: 0;
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 26px;
  align-items: start;
  margin-top: 10px;
}

.content-page {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.content-page .contact-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.content-page .contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
  width: 100%;
  max-width: 720px;
}

.content-page .contact-form label {
  font-weight: 700;
  font-size: 14px;
}

.content-page .contact-form input,
.content-page .contact-form textarea {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
}

.content-page .contact-form textarea {
  min-height: 140px;
  resize: vertical;
}

.content-page .contact-form button {
  align-self: flex-start;
}

.contact-form-response {
  margin-top: 10px;
  font-size: 14px;
  color: #0f172a;
}

.contact-privacy-notice {
  font-size: 13px;
  color: #475569;
  margin-top: 10px;
}

.contact-privacy-notice a {
  color: #2563eb;
}

.content-hero h1 {
  margin: 6px 0 12px;
  font-size: 36px;
  line-height: 1.15;
}

.content-hero .lede {
  color: var(--muted);
  line-height: 1.6;
  font-size: 16px;
  margin: 0 0 10px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .8px;
  font-weight: 800;
  color: #64748b;
  font-size: 12px;
  margin: 0;
}

.cta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.content-body p {
  line-height: 1.7;
  color: var(--ink);
  /* Was #334155 */
  opacity: 0.9;
  margin: 10px 0;
}

.popular-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.popular-links a {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.popular-links a:hover,
.popular-links a:focus {
  text-decoration: underline;
}

.hero-left h1 {
  font-size: 44px;
  line-height: 1.05;
  margin: 6px 0 14px;
}

.hero-left p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
  margin: 0 0 18px;
}

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

.selector-title {
  font-weight: 800;
  margin-bottom: 10px;
}

.selector-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.selector-clear {
  border: none;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  padding: 0;
}

.selector-clear:disabled {
  color: var(--line);
  cursor: not-allowed;
}

.selector-helper-text {
  margin-top: 6px;
  margin-bottom: 12px;
}

.hint {
  color: #64748b;
  font-size: 13px;
  margin-top: 10px;
}

.btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 12px 14px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
}

.btn:hover {
  filter: brightness(.98);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  border-color: transparent;
  background: var(--accent);
  color: #fff;
  padding: 14px 18px;
  border-radius: 16px;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-ghost {
  background: #fff;
}

.btn.wide {
  width: 100%;
  margin-top: 10px;
  padding: 14px 16px;
  border-radius: 16px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  background: #0c1420;
  color: #e2e8f0;
  padding: 10px 14px;
  border-radius: 10px;
  z-index: 999;
  text-decoration: none;
  font-weight: 700;
}

.skip-link:focus {
  left: 12px;
  outline: 2px solid #93c5fd;
}

.suggested {
  margin-top: 18px;
}

.suggested-title {
  font-weight: 800;
  margin-bottom: 10px;
}

.suggested-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.suggested-grid button {
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-weight: 700;
}

.slots {
  --slot-width: 250px;
  --slot-height: 64px;
  display: grid;
  grid-template-columns: repeat(2, var(--slot-width));
  grid-auto-rows: var(--slot-height);
  gap: 12px;
  justify-content: flex-start;
}

.slot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  width: var(--slot-width);
  min-width: 240px;
  max-width: 260px;
  min-height: var(--slot-height);
}

.slot select {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 700;
  background: #fff;
  width: 100%;
}

.slot .remove {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.slot-add {
  justify-content: center;
}

.slot-add .add-btn {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  background: #fff;
}

.slot.slot-search {
  position: relative;
}

.slot-search-label {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 8px;
}

.slot-search-input {
  width: 100%;
}

.slot-search-input input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 700;
  background: #fff;
  outline: none;
}

.slot-search-results {
  position: absolute;
  top: calc(var(--slot-height) + 12px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  max-height: 220px;
  overflow: auto;
  padding: 8px 0;
  z-index: 10;
}

.slot-search-option {
  border: none;
  background: transparent;
  text-align: left;
  padding: 10px 14px;
  width: 100%;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink);
}

.slot-search-option:hover {
  background: var(--line);
}

.slot-search-empty {
  font-size: 13px;
  color: var(--muted);
  padding: 10px 14px;
  text-align: center;
}

.select-companies .slots {
  width: 100%;
}

@media (max-width: 768px) {
  .select-companies .slots {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }

  .select-companies .slot {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }
}

.panel {
  margin-top: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.panel-head h2 {
  margin: 0;
  font-size: 22px;
}

.panel-sub {
  color: #64748b;
  font-size: 13px;
}

.winner-hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.winner-card {
  /* reserve space so the badge never overlaps the logo/text */
  --badge-space: 2.2rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: calc(18px + var(--badge-space)) 18px 18px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.winner-card.winner {
  border-color: #a7f3d0;
  box-shadow: 0 16px 40px rgba(22, 163, 74, .14);
}

.winner-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--win);
  color: #fff;
  font-weight: 900;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
}

.overall-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: #e5e7eb;
  color: #1f2937;
  font-weight: 800;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 12px;
  border: 1px solid #d5d9e0;
  letter-spacing: 0;
}

.overall-badge.badge-winner {
  background: var(--win);
  color: #fff;
  border-color: rgba(22, 163, 74, .22);
}

.overall-badge.badge-strong {
  background: #e0ecff;
  color: #0b3c5d;
  border-color: #c7ddff;
}

.overall-badge.badge-competitive {
  background: #eef1f7;
  color: #111827;
  border-color: #daddf0;
}

.overall-badge.badge-reference {
  background: #edf2ff;
  color: #1e293b;
  border-color: #dce6ff;
}

/* =========================
   WINNER / COMPETITOR LOGO
   ========================= */

.winner-logo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: #ffffff;
  border: 6px solid #eef2f6;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  margin: 0 auto 16px;

  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);

  /* reveal animation */
  transform: scale(.85);
  opacity: 0;
  animation: logoReveal .6s ease-out forwards;
}

/* logo image */
.winner-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}


/* fallback letter */
.winner-logo:not(:has(img)) {
  font-size: 56px;
  font-weight: 900;
  color: #1e293b;
  background: #f1f5f9;
}

/* hover overlay */
.winner-logo::after {
  content: "View company";
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .75);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .25s ease;
}

.winner-logo {
  cursor: pointer;
}


.winner-logo:hover::after {
  opacity: 1;
  cursor: pointer;
}

/* winner emphasis */
.winner-card.winner .winner-logo {
  width: 130px;
  height: 130px;
  border-color: var(--win);
  animation:
    logoReveal .6s ease-out forwards,
    pulseOnce 1.4s ease-out 1;
}

@keyframes pulseOnce {
  0% {
    box-shadow: 0 0 0 0 rgba(22, 163, 74, .45);
  }

  100% {
    box-shadow: 0 0 0 14px rgba(22, 163, 74, 0);
  }
}


/* reveal keyframes */
@keyframes logoReveal {
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* pulse winner */
@keyframes pulseWinner {
  0% {
    box-shadow: 0 0 0 0 rgba(22, 163, 74, .45);
  }

  70% {
    box-shadow: 0 0 0 18px rgba(22, 163, 74, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0);
  }
}

.winner-card h3 {
  margin: 0;
  font-size: 18px;
}

.winner-score {
  margin-top: 8px;
  font-size: 26px;
  font-weight: 900;
  color: var(--blue);
}

.winner-links {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-top: 12px;
}

.winner-links a {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.overall-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.overall-row {
  display: grid;
  grid-template-columns: 160px 1fr 70px;
  gap: 12px;
  align-items: center;
}

.overall-name {
  font-weight: 800;
}

.overall-score {
  text-align: right;
  font-weight: 900;
  color: #0f172a;
}

.progress {
  height: 12px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.progress>.fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--blue));
  animation: reveal .9s ease forwards;
}

@keyframes reveal {
  to {
    width: var(--w);
  }
}

.company-hero {
  padding: 24px;
}

.company-hero-grid {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 18px 26px;
  align-items: center;
}

.company-title {
  margin: 0;
  font-size: 38px;
  line-height: 1.1;
}

.company-sub {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.company-links {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.company-admin-notes-wrap {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.98), rgba(239, 246, 255, 0.92));
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}

.company-admin-notes-wrap[hidden] {
  display: none !important;
}

.company-admin-notes-toggle {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(11, 60, 93, 0.08);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.company-admin-notes-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.company-admin-notes-label {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #64748b;
  font-weight: 800;
}

.company-admin-notes-summary {
  color: #0f172a;
  font-size: 14px;
  line-height: 1.45;
}

.company-admin-notes-panel {
  width: min(660px, calc(100% - 32px));
}

.company-admin-notes-intro {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}

.company-admin-notes-meta {
  margin: -2px 0 0;
  color: #64748b;
  font-size: 13px;
}

.company-admin-note-slots {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 10px;
}

.company-admin-notes-help {
  margin: -2px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}

.company-admin-notes-actions {
  align-items: flex-end;
  flex-wrap: wrap;
}

.company-admin-notes-status-wrap {
  min-height: 20px;
  flex: 1 1 auto;
}

.company-admin-notes-status {
  display: inline-block;
  font-size: 13px;
  color: #64748b;
}

.company-admin-notes-status.is-success {
  color: #047857;
}

.company-admin-notes-status.is-error {
  color: #b91c1c;
}

.profile-logo {
  margin: 0;
  width: 140px;
  height: 140px;
  border-color: #eef2f6;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .12);
  cursor: default;
}

.profile-logo::after {
  display: none;
}

.table-wrap {
  overflow: auto;
  margin-top: 12px;
}

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

.compare-table th,
.compare-table td {
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: middle;
}

.compare-table th {
  background: #eef2f7;
  font-size: 13px;
  text-transform: none;
}

.param {
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 10px;
}

.company-criterion-label {
  min-width: 0;
}

.company-criterion-note-toggle {
  margin-left: 2px;
  flex-shrink: 0;
}

.tip {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #94a3b8;
  color: #64748b;
  font-size: 12px;
  cursor: help;
  position: relative;
}

.tip:hover::after {
  content: attr(data-tip);
  position: absolute;
  left: 0;
  top: 28px;
  width: 280px;
  background: #111827;
  color: #fff;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.4;
  z-index: 50;
}

.cell-score {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.score-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.score-num {
  font-weight: 900;
}

.score-num.win {
  color: var(--blue);
}

.micro-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  color: #0b3c5d;
  background: #e7eef9;
  border: 1px solid #d7e3f6;
  line-height: 1.4;
  vertical-align: middle;
}

.micro-badge.badge-shared {
  background: #eef2ff;
  border-color: #dce6ff;
  color: #1e293b;
}

.micro-badge.badge-top {
  background: #e7eef9;
  border-color: #d7e3f6;
  color: #0b3c5d;
}

.mini-progress {
  height: 8px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
  width: var(--mini-bar-width, 160px);
  max-width: 100%;
}

.mini-bar {
  width: 0;
  height: 100%;
  background: var(--gray);
  animation: reveal .8s ease forwards;
}

.mini-bar.win {
  background: linear-gradient(90deg, var(--accent), var(--blue));
}


.mini-bar.win {
  background: var(--blue);
}

.seo-content {
  max-width: 880px;
  margin-top: 16px;
}

.seo-content h3 {
  margin-top: 22px;
  margin-bottom: 8px;
  font-size: 18px;
}

.seo-content p {
  line-height: 1.65;
  color: #334155;
  margin: 6px 0 12px;
}

.seo-content ul {
  margin: 8px 0 16px 18px;
}

.seo-content li {
  margin: 6px 0;
  line-height: 1.6;
}


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

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

  .overall-row {
    grid-template-columns: 1fr;
  }

  .company-hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }

  .company-links {
    justify-content: center;
  }

  .company-admin-notes-wrap {
    width: 100%;
    justify-content: flex-start;
    text-align: left;
  }

  .content-hero h1 {
    font-size: 30px;
  }

  .content-hero .lede {
    font-size: 15px;
  }
}

.highlights {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
}

.highlight-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.highlight {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px;
  font-size: 14px;
  line-height: 1.5;
}

.highlight strong {
  color: #0f172a;
}

.highlight.win {
  border-left: 4px solid #16a34a;
}

.highlight.loss {
  border-left: 4px solid #64748b;
}

.glossary details {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px 14px;
  margin: 10px 0;
  background: white;
}

.glossary summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.glossary summary::marker {
  display: none;
}

.glossary details[open] {
  background: #f8fafc;
}

/* skeleton loader */
.skeleton {
  background: linear-gradient(90deg,
      #f1f5f9 25%,
      #e5e7eb 37%,
      #f1f5f9 63%);
  background-size: 400% 100%;
  animation: skeleton 1.4s ease infinite;
  border-radius: 50%;
}

@keyframes skeleton {
  0% {
    background-position: 100% 0;
  }

  100% {
    background-position: 0 0;
  }
}

.score-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.score-num {
  font-weight: 900;
  font-size: 15px;
}

.score-num.win {
  color: var(--blue);
}

.score-num .adv {
  font-size: 12px;
  font-weight: 800;
  color: var(--win);
  margin-left: 4px;
}

/* Emphasize scores when showing a single company */
.single-mode .profile-table td:last-child {
  padding-left: 22px;
}

.single-mode .profile-table .score-row {
  gap: 12px;
}

.single-mode .profile-table .score-num {
  font-size: 1.2em;
  font-weight: 900;
  line-height: 1.2;
}

@media (max-width: 720px) {
  .single-mode .profile-table .score-num {
    font-size: 1.12em;
  }

  .company-admin-note-slots {
    width: 100%;
  }

  .company-admin-notes-actions {
    align-items: stretch;
  }

  .company-admin-notes-status-wrap {
    width: 100%;
  }
}

.mini-bar.tie {
  background: linear-gradient(90deg, #93c5fd, #3b82f6);
  opacity: .85;
}

.micro-copy {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.5;
  color: #64748b;
  max-width: 900px;
}


.highlights {
  font-size: 15px;
}

.highlights .tie {
  color: #64748b;
  font-size: 14px;
}

.highlight-main {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}

.highlight-meta {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 10px;
}

.micro-copy {
  font-size: 13px;
  line-height: 1.5;
  color: #475569;
  margin-top: 8px;
}


.strong-lead {
  margin-top: 6px;
  display: inline-block;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #166534;
  background: #dcfce7;
  border-radius: 999px;
}

.winner-card.single {
  --badge-space: 0;
  width: 100%;
  max-width: 100%;
  padding: 32px 36px;
  display: grid;
  grid-template-columns: 180px 1fr;
  align-items: center;
  gap: 18px 28px;
  text-align: left;
  justify-self: stretch;
}

.winner-card.single .winner-logo {
  width: 150px;
  height: 150px;
  margin: 0;
}

.winner-card.single .winner-score {
  font-size: 36px;
}

.winner-card.single h3 {
  margin: 0;
  font-size: 22px;
}

.winner-card.single .winner-links {
  justify-content: flex-start;
}

.winner-hero.single-mode {
  grid-template-columns: 1fr;
  justify-items: stretch;
}

@media (max-width: 720px) {
  .winner-card.single {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }

  .winner-card.single .winner-links {
    justify-content: center;
    flex-wrap: wrap;
  }

  .winner-card.single .winner-logo {
    margin: 0 auto;
  }

  .winner-hero.single-mode {
    grid-template-columns: 1fr;
  }

  .content-hero h1 {
    font-size: 26px;
  }

  .content-hero .lede {
    font-size: 14px;
  }

  .footer-inner {
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }
}

a.winner-logo {
  color: inherit;
  text-decoration: none;
}

.mobile-compare {
  display: none;
  gap: 12px;
  margin-top: 12px;
}

.criterion-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
  background: #fff;
  box-shadow: 0 6px 14px rgba(15, 23, 42, .04);
}

.criterion-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  margin: 0 0 10px;
}

.criterion-info {
  font-size: 13px;
  color: #64748b;
  margin: 0 0 8px;
  line-height: 1.5;
}

.criterion-entry {
  display: grid;
  grid-template-columns: 1fr 110px;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid #eef2f7;
}

.criterion-entry:first-of-type {
  border-top: none;
  padding-top: 0;
}

.criterion-company {
  font-weight: 700;
  color: #0f172a;
}

.criterion-score {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.criterion-score .score-row {
  justify-content: space-between;
}

.criterion-score .score-num {
  font-size: 15px;
}

.mobile-compare .mini-progress {
  width: 100%;
}

.micro-note {
  font-size: 13px;
  color: #64748b;
  margin-top: 6px;
}

@media (max-width: 768px) {

  /* switch to stacked comparison on mobile while keeping desktop table untouched */
  .has-mobile-compare .table-wrap {
    display: none;
  }

  .has-mobile-compare .mobile-compare {
    display: flex;
    flex-direction: column;
  }

  .criterion-entry {
    grid-template-columns: 1fr;
  }

  .criterion-score .score-row {
    justify-content: flex-start;
    gap: 8px;
  }
}

@media (max-width: 768px) {

  /* comparator mobile fix */
  .page-compare {
    overflow-x: hidden;
    overflow-x: clip;
  }

  .page-compare .wrap,
  .page-compare #compareSection {
    max-width: 100%;
  }

  .page-compare .hero,
  .page-compare .hero-left,
  .page-compare .hero-right {
    min-width: 0;
  }

  .page-compare h1,
  .page-compare h2,
  .page-compare h3,
  .page-compare .selector-title,
  .page-compare .suggested-title {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .page-compare .select-companies .slots {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .page-compare .select-companies .slot {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .page-compare .select-companies .slot select {
    min-width: 0;
  }

  .page-compare .suggested-grid button {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .page-compare .compare-table {
    min-width: 0;
  }
}

@media (max-width: 380px) {

  /* comparator mobile fix */
  html,
  body {
    overflow-x: hidden;
  }

  .page-compare main {
    padding-top: calc(var(--header-height, 72px) + 8px);
  }

  .page-compare *,
  .page-compare *::before,
  .page-compare *::after {
    box-sizing: border-box;
    max-width: 100%;
  }

  .page-compare .panel,
  .page-compare .selector-card,
  .page-compare .hero,
  .page-compare .winner-hero,
  .page-compare .table-wrap {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .page-compare h1 {
    font-size: clamp(1.6rem, 6vw, 1.9rem);
    line-height: 1.15;
  }
}

@media (max-width: 360px) {
  .page-compare {
    overflow-x: hidden;
    overflow-x: clip;
  }

  .page-compare .site-header .wrap {
    padding-left: 12px;
    padding-right: 12px;
  }

  .page-compare .header-inner,
  .page-compare .brand,
  .page-compare .header-controls {
    min-width: 0;
  }

  .page-compare .header-inner {
    flex-wrap: wrap;
  }

  .page-compare .nav-toggle {
    max-width: 100%;
  }

  .page-compare *,
  .page-compare *::before,
  .page-compare *::after {
    box-sizing: border-box;
    max-width: 100%;
  }
}

@media (max-width: 319px) {

  html,
  body {
    overflow-x: hidden;
  }

  .site-header,
  .site-header .wrap,
  .header-inner {
    max-width: 100%;
  }

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

  input,
  select,
  textarea,
  button {
    max-width: 100%;
  }
}

.tech-table-wrapper {
  position: relative;
}

.tablet-scroll-hint {
  display: none;
}

@media (min-width: 769px) and (max-width: 1024px) {

  /* Tablet: selector slots stay two-up but fluid */
  .select-companies .slots {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: auto;
  }

  .select-companies .slot {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Tablet: summary cards in two columns for breathing room */
  .winner-hero {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Tablet: soften table density */
  .compare-table {
    font-size: 13px;
  }

  .compare-table th,
  .compare-table td {
    padding: 10px;
  }

  .micro-badge {
    white-space: nowrap;
  }

  /* Tablet: table scroll window with cue */
  .tech-table-wrapper .table-wrap {
    overflow-x: auto;
    position: relative;
  }

  .tech-table-wrapper::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 48px;
    height: 100%;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(245, 247, 250, 0), rgba(245, 247, 250, 0.9));
  }

  .tech-table-wrapper .tablet-scroll-hint {
    display: block;
    text-align: right;
    font-size: 12px;
    color: var(--muted);
    margin-top: 6px;
  }
}

/* Trade fairs (scoped) */
.trade-fairs-note {
  margin: 0 0 12px;
  color: #475569;
  line-height: 1.5;
  font-size: 14px;
}

.trade-fairs-filters {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e2e8f0;
}

/* Standardize spacing below filters */
.trade-fairs-filters+.dashboard-grid,
.trade-fairs-filters+.kpi-grid,
.trade-fairs-filters+.crm-kpi-grid,
.trade-fairs-filters+.br-kpis,
.trade-fairs-filters+.rr-kpis,
.trade-fairs-filters+.reports-tabs,
.trade-fairs-filters+.trade-calendar-controls,
.trade-fairs-filters+.stats-summary-bar,
.trade-fairs-filters+.team-tabs,
.trade-fairs-filters+.trade-fairs-insight {
  margin-top: 0 !important;
}

.trade-fairs-filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.trade-fairs-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}

.trade-fairs-controls .trade-fairs-filters {
  margin-bottom: 0;
}

.trade-fairs-insight {
  font-size: 14px;
  color: var(--muted);
}

.trade-fairs-insight-overview {
  min-height: 8rem;
  max-height: 8rem;
  height: 8rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.trade-fairs-insight-title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #0f172a;
}

.trade-fairs-insight-list {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.trade-fairs-insight-list li {
  margin: 0;
  color: #475569;
  line-height: 1.5;
}

.trade-fairs-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 700;
  color: #0f172a;
  min-width: 180px;
  flex: 1;
}

.trade-fairs-field select {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  font-weight: 700;
}

.trade-fairs-mobile-select {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  font-weight: 700;
  color: #0f172a;
  cursor: pointer;
  text-align: left;
}

.trade-fairs-mobile-select:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.18);
}

.trade-fairs-mobile-select-value {
  flex: 1;
}

.trade-fairs-mobile-select-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  flex-shrink: 0;
}

.trade-fairs-filters[aria-label="Status overview"] {
  width: min(100%, 1140px);
  max-width: 1140px;
  margin: 18px auto;
}

.trade-fairs-filters[aria-label="Status overview"] .trade-fairs-filters-row {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
}

.trade-fairs-filters[aria-label="Status overview"] .trade-fairs-field {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 74px;
  padding: 12px 18px;
  border: 1px solid #d1d9e6;
  border-radius: 12px;
  background: #f8fafc;
  box-sizing: border-box;
  font-weight: 600;
  color: #0f172a;
}

.trade-fairs-filters[aria-label="Status overview"] .trade-fairs-field span:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #0f172a;
}

.trade-fairs-filters[aria-label="Status overview"] .trade-fairs-field svg {
  width: 20px;
  height: 20px;
  display: block;
}

.trade-fairs-filters[aria-label="Status overview"] .trade-fairs-field div {
  font-size: 16px;
  color: #475569;
  font-weight: 700;
}

.trade-fairs-filters[aria-label="Status overview"] .trade-fairs-field.is-enabled {
  cursor: pointer;
  opacity: 1;
}

.trade-fairs-filters[aria-label="Status overview"] .trade-fairs-field.is-disabled {
  cursor: not-allowed;
  opacity: 0.55;
  pointer-events: none;
}

.trade-fairs-filters[aria-label="Status overview"] .trade-fairs-field.is-active {
  border-color: #0f172a;
  background: #ffffff;
}

.page-my-trade-fairs main.wrap {
  width: min(1200px, 100%);
}

.page-my-trade-fairs .trade-fairs-list {
  width: 100%;
  max-width: 100%;
}

@media (max-width: 1199px) {

  .page-my-trade-fairs .trade-fairs-table-fixed,
  .page-my-trade-fairs .trade-fairs-table-wrap {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .page-my-trade-fairs .trade-fairs-table {
    width: 100% !important;
    min-width: 0 !important;
  }

  .page-my-trade-fairs .trade-fairs-table-fixed {
    overflow: visible !important;
  }

  .page-my-trade-fairs .trade-fairs-table-wrap {
    overflow-x: auto !important;
  }
}

@media (max-width: 1023px) {
  .page-my-trade-fairs .trade-fairs-filters[aria-label="Status overview"] {
    width: 100%;
    margin: 18px 0;
  }

  .page-my-trade-fairs main.wrap {
    max-width: 100%;
    width: 100%;
  }

  .page-my-trade-fairs .trade-fairs-filters-row--primary .trade-fairs-field {
    min-width: 0;
  }

  .page-my-trade-fairs .trade-fairs-filters-row--primary .trade-fairs-field--mobile-select {
    flex: 1 1 calc(50% - 6px);
  }

  .page-my-trade-fairs .trade-fairs-filters[aria-label="Status overview"] .trade-fairs-field {
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
  }

  .page-my-trade-fairs .trade-fairs-table-fixed,
  .page-my-trade-fairs .trade-fairs-table-wrap {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .page-my-trade-fairs .trade-fairs-table-fixed {
    overflow: visible !important;
  }

  .page-my-trade-fairs .trade-fairs-table-wrap {
    overflow-x: auto !important;
  }

  .page-my-trade-fairs .trade-fairs-table {
    width: 100% !important;
    min-width: 0 !important;
  }

  .page-my-trade-fairs .trade-fairs-filters[aria-label="Status overview"] .trade-fairs-filters-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.trade-fairs-mobile-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.25);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 120;
}

.trade-fairs-mobile-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.trade-fairs-mobile-panel {
  width: min(92vw, 360px);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: #f8fafc;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18);
  transform: translateY(8px);
  transition: transform 0.2s ease;
}

.trade-fairs-mobile-overlay.is-open .trade-fairs-mobile-panel {
  transform: translateY(0);
}

.trade-fairs-mobile-panel-title {
  margin: 0 0 12px;
  font-size: 14px;
  letter-spacing: 0.01em;
  color: #0f172a;
}

.trade-fairs-mobile-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: min(60vh, 320px);
  overflow-y: auto;
  padding-right: 2px;
}

.trade-fairs-mobile-option {
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
  text-align: left;
}

.trade-fairs-mobile-option.is-selected {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

.trade-fairs-mobile-option:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.18);
}

.trade-fairs-mobile-option:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.trade-fairs-mobile-option-check {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0f172a;
  background: #fff;
  opacity: 0;
  flex-shrink: 0;
}

.trade-fairs-mobile-option.is-selected .trade-fairs-mobile-option-check {
  opacity: 1;
  background: #e2e8f0;
  border-color: #94a3b8;
}

.trade-fairs-mobile-modal-open {
  overflow: hidden;
}

.trade-fairs-advanced-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.25);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 130;
}

.trade-fairs-advanced-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.trade-fairs-advanced-overlay-inner {
  width: 100%;
  display: flex;
  justify-content: center;
}

.trade-fairs-advanced-toggle {
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 10px 16px;
  background: var(--accent);
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  align-self: flex-end;
  height: fit-content;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.trade-fairs-advanced-toggle.is-active {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
}

.trade-fairs-advanced-wrap {
  position: relative;
  display: inline-flex;
  align-items: flex-end;
}

.trade-fairs-advanced-toggle:hover {
  background: #0a3856;
}

.trade-fairs-advanced-toggle.is-active:hover {
  background: var(--accent);
}

.trade-fairs-advanced-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.18);
}

.trade-fairs-advanced-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 280px;
  width: min(420px, calc(100vw - 32px));
  max-width: 420px;
  max-height: min(78vh, 640px);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  box-sizing: border-box;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  z-index: 20;
}

.trade-fairs-advanced-panel[hidden] {
  display: none !important;
}

.trade-fairs-advanced-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.trade-fairs-advanced-panel-header h4 {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.01em;
  color: #0f172a;
}

.trade-fairs-advanced-panel-header #tradeFairsClearFilters {
  border: none;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
}

.trade-fairs-advanced-panel-header #tradeFairsClearFilters:hover {
  color: #475569;
  text-decoration: underline;
}

.trade-fairs-advanced-panel-header #tradeFairsClearFilters:focus-visible {
  outline: none;
  text-decoration: underline;
}

.trade-fairs-advanced-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.trade-fairs-advanced-group-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.trade-fairs-advanced-group--sector {
  gap: 8px;
}

.trade-fairs-advanced-group-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  font-weight: 700;
}

.trade-fairs-advanced-meta {
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
}

.trade-fairs-advanced-options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.trade-fairs-advanced-options--stacked {
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
}

.trade-fairs-advanced-disclosure {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trade-fairs-advanced-disclosure-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #edf2f7;
  color: #0f172a;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}

.trade-fairs-advanced-disclosure-toggle:hover {
  background: #e2e8f0;
}

.trade-fairs-advanced-disclosure-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
}

.trade-fairs-advanced-disclosure-panel {
  padding-left: 4px;
}

.trade-fairs-advanced-disclosure-panel .trade-fairs-advanced-options--stacked {
  margin-top: 4px;
}

.trade-fairs-advanced-chevron {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.18s ease;
  margin-right: 2px;
}

.trade-fairs-advanced-disclosure-toggle[aria-expanded="true"] .trade-fairs-advanced-chevron {
  transform: rotate(-135deg);
}

.trade-fairs-advanced-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #0f172a;
  font-weight: 600;
  max-width: 100%;
}

.trade-fairs-advanced-option input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.trade-fairs-advanced-option--block {
  width: 100%;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-sizing: border-box;
}

.trade-fairs-advanced-option--block.is-selected {
  border-color: rgba(15, 23, 42, 0.18);
  background: #eef6ff;
}

.trade-fairs-advanced-option--block input {
  flex: 0 0 auto;
  margin-top: 2px;
}

.trade-fairs-advanced-option--block span {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.trade-fairs-advanced-empty {
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: #fff;
  color: #64748b;
  font-size: 13px;
  line-height: 1.4;
}

.trade-fairs-advanced-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.trade-fairs-advanced-apply,
.trade-fairs-advanced-reset {
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 700;
  border: 1px solid var(--line);
  cursor: pointer;
}

.trade-fairs-advanced-apply {
  background: #0f172a;
  color: #fff;
  border-color: #0f172a;
}

.trade-fairs-advanced-reset {
  background: #fff;
  color: #0f172a;
}

@media (max-width: 480px) {
  .trade-fairs-field--mobile-select select {
    display: none;
  }

  .trade-fairs-mobile-select {
    display: flex;
  }

  .trade-fairs-advanced-wrap {
    width: 100%;
    justify-content: flex-end;
  }

  .trade-fairs-advanced-overlay .trade-fairs-advanced-panel {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    transform: none;
    width: min(92vw, 360px);
    max-width: 360px;
    max-height: min(80vh, 520px);
    overflow-y: auto;
    box-sizing: border-box;
    padding: 14px;
    gap: 12px;
  }

  .trade-fairs-advanced-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: auto;
    right: 0;
    transform: none;
    width: min(420px, calc(100vw - 32px));
    max-width: calc(100vw - 32px);
    max-height: min(72vh, 560px);
    overflow-y: auto;
    box-sizing: border-box;
    padding: 14px;
    gap: 12px;
  }

  .trade-fairs-advanced-group {
    gap: 8px;
  }

  .trade-fairs-advanced-options {
    gap: 10px;
  }

  .trade-fairs-advanced-options--stacked {
    max-height: 220px;
  }
}

.trade-fairs-field--toggle {
  min-width: 160px;
}

.trade-fairs-toggle {
  position: relative;
  width: 46px;
  height: 26px;
  display: inline-flex;
  align-items: center;
}

.trade-fairs-toggle-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}

.trade-fairs-toggle-track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #e2e8f0;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.trade-fairs-toggle-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.16);
  transition: transform 0.2s ease;
}

.trade-fairs-toggle-input:checked+.trade-fairs-toggle-track {
  background: var(--accent);
  border-color: var(--accent);
}

.trade-fairs-toggle-input:checked+.trade-fairs-toggle-track::after {
  transform: translateX(20px);
}

.trade-fairs-toggle-input:focus-visible+.trade-fairs-toggle-track {
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.18);
}

.trade-fairs-field--search {
  min-width: 260px;
  flex: 1 1 320px;
  max-width: 360px;
}

.trade-fairs-search-input-wrap {
  position: relative;
}

.trade-fairs-search-icon {
  display: none;
}

.trade-fairs-search-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  font-weight: 700;
  font-size: 14px;
  color: #0f172a;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.trade-fairs-search-input::placeholder {
  color: var(--muted);
}

.trade-fairs-search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.12);
}

.trade-fairs-month-slider {
  margin-top: 18px;
  padding-top: 6px;
  padding-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 112px;
}

.trade-fairs-month-slider-peak {
  min-height: 1.3rem;
  max-height: 1.3rem;
  height: 1.3rem;
  line-height: 1.3rem;
  font-size: 0.82rem;
  color: #475569;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
}


.trade-fairs-month-slider-labels {
  display: grid;
  grid-template-columns: repeat(13, minmax(0, 1fr));
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #475569;
  min-height: 20px;
  height: 20px;
  pointer-events: none;
  justify-items: center;
}

.trade-fairs-month-slider-labels span {
  text-align: center;
  font-weight: 600;
  position: relative;
  padding-top: 8px;
}

.trade-fairs-month-slider-labels span::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -100%);
  width: 1px;
  height: 6px;
  background: rgba(15, 23, 42, 0.45);
}

#tradeMonthSliderContainer .trade-fairs-month-slider-timeline {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.02em;
  cursor: pointer;
  position: relative;
}

.trade-fairs-month-slider-timeline input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.trade-fairs-month-slider-timeline-title {
  font-weight: 600;
}

.trade-fairs-month-slider-timeline::after {
  content: "";
}

.trade-fairs-month-slider-timeline.active::after {
  content: "•";
  position: absolute;
  left: 100%;
  margin-left: 6px;
  color: inherit;
  font-weight: 600;
  line-height: 1;
}

.trade-fairs-month-slider-timeline.active {
  color: rgba(15, 23, 42, 0.85);
  font-weight: 600;
}

#tradeMonthSliderContainer .trade-fairs-month-slider-labels span:is(.active, .is-active, [data-active="true"], [data-active="1"], [aria-current="true"]) {
  color: var(--blue);
  font-weight: 700;
}

@media (max-width: 430px) {
  #tradeMonthSliderContainer .trade-fairs-month-slider-labels {
    font-size: 0.7rem;
    letter-spacing: 0;
    text-transform: none;
    color: var(--muted);
    min-height: 18px;
    height: 18px;
  }

  #tradeMonthSliderContainer .trade-fairs-month-slider-labels span {
    font-weight: 500;
    padding-top: 6px;
    line-height: 1;
    font-size: 0;
  }

  #tradeMonthSliderContainer .trade-fairs-month-slider-labels span::after {
    display: block;
    font-size: 0.7rem;
    line-height: 1;
    font-variant-numeric: tabular-nums;
  }

  #tradeMonthSliderContainer .trade-fairs-month-slider-labels span:nth-child(1)::after {
    content: "All";
  }

  #tradeMonthSliderContainer .trade-fairs-month-slider-labels span:nth-child(2)::after {
    content: "1";
  }

  #tradeMonthSliderContainer .trade-fairs-month-slider-labels span:nth-child(3)::after {
    content: "2";
  }

  #tradeMonthSliderContainer .trade-fairs-month-slider-labels span:nth-child(4)::after {
    content: "3";
  }

  #tradeMonthSliderContainer .trade-fairs-month-slider-labels span:nth-child(5)::after {
    content: "4";
  }

  #tradeMonthSliderContainer .trade-fairs-month-slider-labels span:nth-child(6)::after {
    content: "5";
  }

  #tradeMonthSliderContainer .trade-fairs-month-slider-labels span:nth-child(7)::after {
    content: "6";
  }

  #tradeMonthSliderContainer .trade-fairs-month-slider-labels span:nth-child(8)::after {
    content: "7";
  }

  #tradeMonthSliderContainer .trade-fairs-month-slider-labels span:nth-child(9)::after {
    content: "8";
  }

  #tradeMonthSliderContainer .trade-fairs-month-slider-labels span:nth-child(10)::after {
    content: "9";
  }

  #tradeMonthSliderContainer .trade-fairs-month-slider-labels span:nth-child(11)::after {
    content: "10";
  }

  #tradeMonthSliderContainer .trade-fairs-month-slider-labels span:nth-child(12)::after {
    content: "11";
  }

  #tradeMonthSliderContainer .trade-fairs-month-slider-labels span:nth-child(13)::after {
    content: "12";
  }

  #tradeMonthSliderContainer .trade-fairs-month-slider-labels span:is(.active, .is-active, [data-active="true"], [data-active="1"], [aria-current="true"]) {
    color: var(--muted);
    font-weight: 500;
  }
}

#tradePeakLabel {
  min-height: 1.2rem;
  line-height: 1.2rem;
  display: inline-block;
  visibility: hidden;
  opacity: 0;
  transition: opacity .25s ease;
}

.trade-fairs-table-wrap {
  overflow-x: auto;
  overflow-y: visible;
  max-height: 520px;
  min-height: 320px;
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.trade-fairs-table-wrap::-webkit-scrollbar {
  width: 8px;
}

.trade-fairs-table-wrap::-webkit-scrollbar-track {
  background: transparent;
}

.trade-fairs-table-wrap::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}

.trade-fairs-table-wrap::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
  background-clip: content-box;
}

html.route-trade-fairs .trade-fairs-table-wrap {
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 92, 246, 0.72) rgba(226, 232, 240, 0.48);
}

html.route-trade-fairs .trade-fairs-table-wrap::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

html.route-trade-fairs .trade-fairs-table-wrap::-webkit-scrollbar-track {
  background: linear-gradient(180deg, rgba(226, 232, 240, 0.34), rgba(239, 246, 255, 0.76));
  border: 3px solid rgba(255, 255, 255, 0.84);
  border-radius: 999px;
}

html.route-trade-fairs .trade-fairs-table-wrap::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #67e8f9 0%, #3b82f6 48%, #a855f7 100%);
  background-clip: padding-box;
  border: 3px solid rgba(255, 255, 255, 0.84);
  border-radius: 999px;
  box-shadow:
    0 0 12px rgba(139, 92, 246, 0.3),
    0 0 8px rgba(34, 211, 238, 0.22);
}

html.route-trade-fairs .trade-fairs-table-wrap::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #22d3ee 0%, #2563eb 48%, #9333ea 100%);
  background-clip: padding-box;
}

.trade-fairs-cards {
  display: none;
}

.trade-fairs-card {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trade-fairs-card.is-past {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.trade-fairs-card.is-past .trade-fairs-card-title {
  color: var(--muted);
}

.trade-fairs-card.is-past .trade-fairs-card-location {
  color: var(--muted);
}

.trade-fairs-card.is-past .trade-fairs-card-date {
  color: var(--muted);
}

.trade-fairs-card-title {
  font-weight: 800;
  font-size: 16px;
  color: #0f172a;
  overflow-wrap: anywhere;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.trade-fairs-name-text {
  flex: 1 1 auto;
  min-width: 0;
}

.trade-fairs-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  margin-left: auto;
}

.trade-fairs-card-location {
  color: #475569;
  font-size: 14px;
  overflow-wrap: anywhere;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.trade-fairs-card-date {
  font-weight: 700;
  font-size: 14px;
  color: #0f172a;
}

.trade-fairs-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.trade-fairs-card-link {
  margin-top: 2px;
}

.official-website-link,
.trade-fair-website-link {
  color: #4a647f;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border .2s ease;
}

.official-website-link:hover,
.official-website-link:focus-visible,
.official-website-link:focus,
.trade-fair-website-link:hover,
.trade-fair-website-link:focus-visible,
.trade-fair-website-link:focus {
  border-color: #cbd5f5;
}

@media (max-width: 768px) {
  .trade-fairs-table-wrap {
    display: none;
  }

  .trade-fairs-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .trade-fairs-card-title .trade-fairs-favorite-toggle {
    padding: 8px;
    margin: -8px;
  }
}

@media (max-width: 479px) {
  .trade-fairs-card {
    padding: 12px;
  }

  .trade-fairs-card-title {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .trade-fairs-card-actions {
    order: -1;
    width: auto;
    justify-content: center;
    flex-wrap: nowrap;
    margin-left: 0;
  }

  .trade-fairs-name-text {
    text-align: center;
  }

  .trade-fairs-card-location,
  .trade-fairs-card-date {
    justify-content: center;
    text-align: center;
  }

  .trade-fairs-card-tags {
    justify-content: center;
  }

  .trade-fairs-card-link {
    text-align: center;
  }
}

@media (max-width: 767px) {
  .page-my-trade-fairs {
    overflow-x: hidden;
  }

  .page-my-trade-fairs main.wrap {
    max-width: 100%;
    width: 100%;
    padding-left: 12px;
    padding-right: 12px;
  }

  .page-my-trade-fairs .panel {
    padding: 16px;
  }

  .page-my-trade-fairs .trade-fairs-table-fixed {
    display: none;
  }

  .page-my-trade-fairs .trade-fairs-cards {
    width: 100%;
  }

  .page-my-trade-fairs .trade-fairs-card {
    width: 100%;
  }

  .page-my-trade-fairs .trade-fairs-filters[aria-label="Status overview"] .trade-fairs-filters-row {
    grid-template-columns: 1fr;
  }
}

.trade-fairs-card-title .trade-fairs-favorite-toggle {
  align-self: center;
  transform: translateY(-1px) scale(1.25);
}

@media (min-width: 1024px) {
  .trade-fairs-controls {
    gap: 10px;
  }

  .trade-fairs-controls .trade-fairs-filters {
    width: 100%;
  }

  .trade-fairs-insight {
    width: 100%;
    padding-top: 4px;
  }
}

.trade-fairs-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
  table-layout: auto;
}

.trade-fairs-table th,
.trade-fairs-table td {
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  vertical-align: middle;
}

.trade-fairs-table th {
  background: #eef2f7;
  font-weight: 800;
  color: #0f172a;
  font-size: 13px;
}

.trade-fairs-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
}

.trade-fairs-footer {
  position: sticky;
  bottom: 0;
  background: var(--card);
  border-top: 1px solid #e5e7eb;
}

.trade-fairs-footer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  height: 44px;
}

.trade-fairs-footer-header>* {
  flex: 0 0 auto;
}

.trade-fairs-footer .trade-fairs-methodology {
  margin: 0;
}

.trade-fairs-footer .trade-fairs-methodology>summary {
  display: inline-flex;
  align-items: center;
}

.trade-fairs-methodology-icon {
  display: inline-block;
  width: 1em;
  text-align: center;
  margin-right: 6px;
}

.trade-fairs-footer .trade-fairs-methodology[open] .trade-fairs-methodology-icon {
  transform: rotate(90deg);
}

.trade-fairs-methodology-content {
  display: none;
  padding: 0 12px 12px;
}

.trade-fairs-footer:has(.trade-fairs-methodology[open]) .trade-fairs-methodology-content {
  display: block;
}

.trade-fairs-table-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.trade-fairs-export-button {
  border: 1px solid var(--line);
  background: #f8fafc;
  color: var(--ink);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
}

.trade-fairs-export-button:hover {
  background: #eef2f7;
}

.trade-fairs-export-button:focus-visible {
  outline: 2px solid #1d4ed8;
  outline-offset: 2px;
}

.trade-fairs-export-button:disabled {
  background: #e2e8f0;
  border-color: #cbd5e1;
  color: #94a3b8;
  cursor: not-allowed;
}

.trade-fairs-header-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.trade-fairs-name-tooltip {
  position: relative;
  display: inline-block;
}

@media (hover: hover) and (pointer: fine) {
  .trade-fairs-header-label::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 0;
    top: 100%;
    margin-top: 6px;
    padding: 6px 8px;
    border-radius: 6px;
    background: #0f172a;
    color: #fff;
    font-size: 11px;
    line-height: 1.2;
    white-space: nowrap;
    z-index: 5;
    opacity: 0;
    pointer-events: none;
  }

  .trade-fairs-header-label:hover::after {
    opacity: 1;
  }

  .trade-fairs-name-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 0;
    top: 100%;
    margin-top: 6px;
    padding: 6px 8px;
    border-radius: 6px;
    background: #0f172a;
    color: #fff;
    font-size: 11px;
    line-height: 1.2;
    white-space: normal;
    max-width: 260px;
    word-break: break-word;
    overflow-wrap: break-word;
    z-index: 5;
    opacity: 0;
    pointer-events: none;
  }

  .trade-fairs-name-tooltip:hover::after {
    opacity: 1;
  }
}

@media (hover: none) and (pointer: coarse) {
  .trade-fairs-name-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 0;
    top: 100%;
    margin-top: 6px;
    padding: 6px 8px;
    border-radius: 6px;
    background: #0f172a;
    color: #fff;
    font-size: 11px;
    line-height: 1.2;
    white-space: normal;
    max-width: 260px;
    word-break: break-word;
    overflow-wrap: break-word;
    z-index: 5;
    opacity: 0;
    pointer-events: none;
  }

  .trade-fairs-name-tooltip:active::after {
    opacity: 1;
  }
}

.trade-fairs-favorite-header .trade-fairs-header-label::after {
  right: 0;
  left: auto;
  max-inline-size: min(240px, calc(100vw - 32px));
}

.trade-fairs-table th:nth-child(1),
.trade-fairs-table td:nth-child(1) {
  width: 32%;
}

.trade-fairs-table th:nth-child(2),
.trade-fairs-table td:nth-child(2) {
  width: 22%;
}

.trade-fairs-table th:nth-child(3),
.trade-fairs-table td:nth-child(3) {
  width: 18%;
}

.trade-fairs-table th:nth-child(4),
.trade-fairs-table td:nth-child(4) {
  width: 28%;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
}

.trade-fairs-table th.trade-fairs-favorite-header,
.trade-fairs-table td.trade-fairs-favorite-cell {
  width: 40px;
  text-align: center;
  padding-left: 6px;
  padding-right: 6px;
}

.trade-fairs-table td.trade-fairs-notes-cell {
  width: 40px;
  text-align: center;
  padding-left: 6px;
  padding-right: 6px;
  box-sizing: border-box;
  position: relative;
  overflow: visible;
}

.trade-fairs-table td.trade-fairs-notes-cell .trade-fairs-notes-toggle {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.trade-fairs-table th.trade-fairs-planning-header,
.trade-fairs-table td.trade-fairs-planning-cell {
  width: 40px;
  text-align: center;
  padding-left: 6px;
  padding-right: 6px;
  box-sizing: border-box;
}

.trade-fairs-table td.trade-fairs-planning-cell .trade-fairs-planning-toggle {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.trade-fairs-table th.trade-fairs-attended-header,
.trade-fairs-table td.trade-fairs-attended-cell {
  width: 40px;
  text-align: center;
  padding-left: 6px;
  padding-right: 6px;
  box-sizing: border-box;
}

.trade-fairs-table td.trade-fairs-attended-cell .trade-fairs-attended-toggle {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.trade-fairs-notes-tooltip {
  position: absolute;
  top: 50%;
  left: 100%;
  margin-left: 8px;
  transform: translateY(-50%);
  background: #0f172a;
  color: #fff;
  font-size: 11px;
  line-height: 1.2;
  padding: 6px 8px;
  border-radius: 6px;
  max-width: 160px;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}

.trade-fairs-notes-toggle:hover+.trade-fairs-notes-tooltip,
.trade-fairs-notes-toggle:focus-visible+.trade-fairs-notes-tooltip {
  opacity: 1;
}


@media (min-width: 769px) {
  .trade-fairs-table tbody tr:not(.is-active):not(.is-past):hover {
    background: #f7f9fc;
  }
}

.trade-fairs-table tr.is-active {
  background-color: rgba(11, 60, 93, 0.06);
}

.trade-fairs-table tr.is-active:hover {
  background-color: rgba(11, 60, 93, 0.06);
}

.trade-fairs-table tr.is-active td:first-child {
  box-shadow: inset 4px 0 0 0 rgba(11, 60, 93, 0.45);
}

.trade-fairs-table tr.is-past td {
  color: var(--muted);
  background: #f8fafc;
}

.trade-fairs-table tr.is-past .trade-fairs-tag {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #6b7280;
}

.trade-fairs-name {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.trade-fairs-name-text {
  font-weight: 600;
  font-size: 15px;
  color: #0b1426;
}

.trade-fair-link {
  color: inherit;
  text-decoration: none;
}

.trade-fair-link:hover {
  text-decoration: underline;
}

.trade-fairs-location {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
  color: #475569;
}

.trade-fairs-table td:nth-child(2),
.trade-fairs-table td:nth-child(2) .trade-fairs-location {
  overflow: visible;
}

.trade-fairs-status,
.trade-fairs-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
}

.trade-fairs-status {
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.trade-fairs-status.is-upcoming {
  background: #e7eef9;
  border: 1px solid #d7e3f6;
  color: var(--accent);
}

.trade-fairs-status.is-ongoing {
  background: #e0ecff;
  border: 1px solid #c7ddff;
  color: var(--accent);
}

.trade-fairs-status.is-past {
  background: #eef1f7;
  border: 1px solid #daddf0;
  color: var(--muted);
}

.compare-table th:nth-child(4),
.compare-table td.trade-fairs-sectors {
  width: auto;
  white-space: normal;
}

.trade-fairs-sectors {
  min-width: 0;
}

.trade-fairs-sector-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: flex-start;
  align-content: flex-start;
  width: 100%;
  overflow: visible;
  flex: 1 1 auto;
  min-width: 0;
}

.trade-fairs-tag {
  border: 1px solid #dce6ff;
  color: #1e293b;
  background: #eef2ff;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  min-width: 0;
  max-width: none;
  flex-shrink: 1;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: none;
}

.page-trade-fair .trade-fairs-sector-list .trade-fairs-tag {
  border-color: var(--line);
  background: var(--card);
  color: var(--ink);
  font-weight: 600;
}

.trade-fairs-empty {
  margin-top: 12px;
  border: 1px dashed #cbd5f5;
  border-radius: 14px;
  padding: 16px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trade-fairs-empty-title {
  font-weight: 700;
  color: #0f172a;
}

.trade-fairs-empty-subtext {
  font-size: 14px;
  color: #64748b;
  line-height: 1.4;
}

.trade-fairs-empty-button {
  align-self: flex-start;
  border-radius: 999px;
  padding: 8px 16px;
  border: 1px solid #0f172a;
  background: #0f172a;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.trade-fairs-map {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: #fff;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}

.trade-fairs-map.is-table-scrolling {
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.1);
}

.trade-fairs-map-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.trade-fairs-map-head h3 {
  margin: 0;
  font-size: 18px;
}

.trade-fairs-map-sub {
  font-size: 13px;
  color: #64748b;
}

.trade-fairs-geo-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 10px;
}

.trade-fairs-map-country-filter {
  border-top: 1px solid var(--line);
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  margin: 14px 0 14px;
  padding-top: 12px;
}

.trade-fairs-map-country-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: min(100%, 260px);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.trade-fairs-map-country-field span {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.trade-fairs-map-country-field select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  padding: 9px 12px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.trade-fairs-map-country-field select:disabled {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.7;
}

.trade-fairs-map-country-field select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.trade-fairs-map-country-reset {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 9px 14px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color .2s ease, color .2s ease, background .2s ease, opacity .2s ease;
}

.trade-fairs-map-country-reset:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.trade-fairs-map-country-reset:disabled {
  color: var(--muted);
  cursor: default;
  opacity: 0.55;
}

.trade-fairs-map-country-reset:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.trade-region-label {
  font-weight: 600;
  color: var(--ink);
}

.trade-region-empty {
  color: var(--muted);
  font-weight: 600;
}

.trade-region-options {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0 0;
  width: 100%;
  box-sizing: border-box;
}

.trade-region-option {
  flex-shrink: 0;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.trade-region-option__text {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

.trade-region-option--disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.trade-region-option--disabled .trade-region-option__check {
  background: transparent;
}

.trade-region-more {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.trade-region-more-popover {
  position: absolute;
  top: calc(100% + 0.3rem);
  right: 0;
  width: 220px;
  max-width: calc(100vw - 48px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.5rem;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity .2s ease, transform .2s ease;
  z-index: 20;
}

.trade-region-more-popover--visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.trade-region-more-popover__item {
  font-size: 13px;
  color: var(--ink);
  line-height: 1.4;
  padding: 0.15rem 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
  display: block;
}

.trade-region-more-popover__item:hover,
.trade-region-more-popover__item:focus-visible {
  color: var(--accent);
}

.trade-region-more-popover__item:last-child {
  border-bottom: none;
}

.trade-region-option__check {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  line-height: 1;
  opacity: 1;
  background: transparent;
  color: transparent;
  transition: opacity .2s ease, background .2s ease, border-color .2s ease;
}

.trade-region-option--active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.trade-region-option--active .trade-region-option__check {
  opacity: 1;
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

.trade-region-option:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.trade-fairs-map .trade-region-options {
  gap: 8px 10px;
}

.trade-fairs-map .trade-region-option {
  min-height: 34px;
  padding: 7px 13px;
  border-color: rgba(184, 196, 228, 0.9);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 255, 0.9));
  color: #42506e;
  font-weight: 800;
  box-shadow:
    0 8px 18px rgba(35, 51, 92, 0.06),
    0 1px 0 rgba(255, 255, 255, 0.95) inset;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    color 0.18s ease;
}

.trade-fairs-map .trade-region-option:not(.trade-region-option--disabled):not(.trade-region-option--active):hover {
  transform: translateY(-1px);
  border-color: rgba(34, 211, 238, 0.55);
  color: #0b3c5d;
  box-shadow:
    0 12px 24px rgba(7, 11, 26, 0.12),
    0 0 0 3px rgba(34, 211, 238, 0.12);
}

.trade-fairs-map .trade-region-option__text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trade-fairs-map .trade-region-option__check {
  width: 17px;
  height: 17px;
  border-color: rgba(152, 168, 208, 0.86);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.04);
}

.trade-fairs-map .trade-region-option--active {
  border-color: rgba(34, 211, 238, 0.78);
  background:
    radial-gradient(circle at 22% 30%, rgba(34, 211, 238, 0.34), transparent 36%),
    linear-gradient(135deg, #070b1a 0%, #16216a 52%, #342394 100%);
  color: #ffffff !important;
  box-shadow:
    0 14px 30px rgba(7, 11, 26, 0.28),
    0 0 24px rgba(34, 211, 238, 0.25);
}

.trade-fairs-map .trade-region-option--active:hover,
.trade-fairs-map .trade-region-option--active:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(125, 211, 252, 0.88);
  color: #ffffff !important;
  background:
    radial-gradient(circle at 20% 26%, rgba(34, 211, 238, 0.42), transparent 38%),
    linear-gradient(135deg, #070b1a 0%, #16216a 52%, #342394 100%);
  box-shadow:
    0 16px 32px rgba(7, 11, 26, 0.34),
    0 0 0 3px rgba(34, 211, 238, 0.14),
    0 0 26px rgba(139, 92, 246, 0.28);
}

.trade-fairs-map .trade-region-option--active .trade-region-option__text {
  color: #ffffff !important;
  opacity: 1;
}

.trade-fairs-map .trade-region-option--active .trade-region-option__check {
  border-color: rgba(130, 218, 255, 0.72);
  background: linear-gradient(135deg, #22d3ee, #3b82f6 58%, #8b5cf6);
  color: #ffffff;
  box-shadow:
    0 0 0 3px rgba(34, 211, 238, 0.2),
    0 0 16px rgba(139, 92, 246, 0.38);
}

.trade-fairs-map .trade-region-option--disabled {
  opacity: 0.52;
  background: rgba(248, 250, 255, 0.78);
  box-shadow: none;
}

.trade-fairs-map-body {
  height: 320px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  background: #eef2f7;
  position: relative;
}

.trade-fairs-fullscreen-toggle {
  font-family: inherit;
  font-size: 16px;
  line-height: 1;
}

#tradeFairsMap:fullscreen {
  height: 100%;
  width: 100%;
  border-radius: 0;
}

#tradeFairsMap:-webkit-full-screen {
  height: 100%;
  width: 100%;
  border-radius: 0;
}

.trade-fairs-map-empty {
  margin-top: 8px;
  font-size: 14px;
  color: #64748b;
}

.trade-fairs-map-legend {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 2;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
  pointer-events: auto;
}

.trade-fairs-map-legend-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 16px;
}

.trade-fairs-map-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;

}

/* Fix for KPI Title Overflow */
/* Fix for KPI Title Overflow */
/* Ensure grid items can shrink */
.kpi-grid>.kpi-card {
  min-width: 0;
}

/* Specific styling for Text-based KPIs (Titles) */
.kpi-value.kpi-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;

  /* Match standard KPI look as much as possible while accommodating text */
  font-size: 20px;
  font-weight: 800;
  /* Match standard .kpi-value weight */
  line-height: 1.2;
  height: 2.4em;
  /* Fixed height for alignment (~48px) */
  color: var(--primary-blue);
  /* Ensure color consistency */
}


.trade-fairs-map-legend-item.is-inactive {
  opacity: 1;
}

.trade-fairs-map-legend-item.is-inactive .trade-fairs-map-legend-star,
.trade-fairs-map-legend-item.is-inactive .trade-fairs-map-legend-notes,
.trade-fairs-map-legend-item.is-inactive .trade-fairs-map-legend-planning,
.trade-fairs-map-legend-item.is-inactive .trade-fairs-map-legend-attended,
.trade-fairs-map-legend-item.is-inactive .trade-fairs-map-legend-outline,
.trade-fairs-map-legend-item.is-inactive .trade-fairs-map-legend-dot {
  opacity: 0.45;
}

.trade-fairs-map-legend-outline {
  width: 8px;
  height: 6px;
  border: 1px solid rgba(40, 55, 70, 0.75);
  border-radius: 2px;
  flex: 0 0 auto;
}

.trade-fairs-map-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 1px rgba(11, 60, 93, 0.35);
  flex: 0 0 auto;
}

.trade-fairs-map-legend-dot--past {
  background: var(--gray-muted);
  box-shadow: 0 0 0 1px rgba(154, 163, 173, 0.3);
  opacity: 0.6;
}

.trade-fairs-map-legend-star {
  width: 0.75em;
  height: 0.75em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex: 0 0 auto;
}

.trade-fairs-map-legend-star svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: currentColor;
}

.trade-fairs-map-legend-notes {
  width: 0.9em;
  height: 0.9em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex: 0 0 auto;
}

.trade-fairs-map-legend-notes svg {
  width: 100%;
  height: 100%;
  display: block;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
}

.trade-fairs-map-legend-notes .trade-fairs-notes-icon-fill {
  fill: currentColor;
  opacity: 0.28;
  stroke: none;
}

.trade-fairs-map-legend .trade-fairs-map-legend-item--notes .trade-fairs-map-legend-notes {
  color: var(--muted);
}

.trade-fairs-map-legend .trade-fairs-map-legend-item--notes .trade-fairs-notes-icon-fill {
  opacity: 0;
}

.trade-fairs-map-legend .trade-fairs-map-legend-item--notes.is-active .trade-fairs-map-legend-notes {
  color: var(--accent);
}

.trade-fairs-map-legend .trade-fairs-map-legend-item--notes.is-active .trade-fairs-notes-icon-fill {
  opacity: 0.28;
}

.trade-fairs-map-legend-planning {
  width: 0.9em;
  height: 0.9em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex: 0 0 auto;
}

.trade-fairs-map-legend-planning svg {
  width: 100%;
  height: 100%;
  display: block;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trade-fairs-map-legend-planning .trade-fairs-planning-icon-fill {
  fill: currentColor;
  opacity: 0.28;
  stroke: none;
}

.trade-fairs-map-legend .trade-fairs-map-legend-item--planning .trade-fairs-map-legend-planning {
  color: var(--muted);
}

.trade-fairs-map-legend .trade-fairs-map-legend-item--planning .trade-fairs-planning-icon-fill {
  opacity: 0;
}

.trade-fairs-map-legend .trade-fairs-map-legend-item--planning.is-active .trade-fairs-map-legend-planning {
  color: var(--accent);
}

.trade-fairs-map-legend .trade-fairs-map-legend-item--planning.is-active .trade-fairs-planning-icon-fill {
  opacity: 1;
}

.trade-fairs-map-legend-attended {
  width: 0.9em;
  height: 0.9em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex: 0 0 auto;
}

.trade-fairs-map-legend-attended svg {
  width: 100%;
  height: 100%;
  display: block;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trade-fairs-map-legend-attended .trade-fairs-attended-icon-fill {
  fill: currentColor;
  opacity: 0.28;
  stroke: none;
}

.trade-fairs-map-legend .trade-fairs-map-legend-item--attended .trade-fairs-map-legend-attended {
  color: var(--muted);
}

.trade-fairs-map-legend .trade-fairs-map-legend-item--attended .trade-fairs-attended-icon-fill {
  opacity: 0;
}

.trade-fairs-map-legend .trade-fairs-map-legend-item--attended.is-active .trade-fairs-map-legend-attended {
  color: var(--accent);
}

.trade-fairs-map-legend .trade-fairs-map-legend-item--attended.is-active .trade-fairs-attended-icon-fill {
  opacity: 1;
}

.trade-fairs-map-legend-toggle,
.trade-fairs-map-legend-info {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.trade-fairs-map-legend-info {
  display: none;
}

.trade-fairs-map-legend--collapsed {
  padding: 6px;
}

.trade-fairs-map-legend--collapsed .trade-fairs-map-legend-content {
  display: none;
}

.trade-fairs-map-legend--collapsed .trade-fairs-map-legend-toggle {
  display: none;
}

.trade-fairs-map-legend--collapsed .trade-fairs-map-legend-info {
  display: flex;
}

.trade-fair-map-panel {
  margin-top: 0;
}

.trade-fair-mini-map {
  width: 100%;
  height: 220px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #f4f6fb;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}

.page-trade-fair .trade-fair-map-panel {
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.045);
}

.trade-fair-mini-map-fallback {
  margin-top: 14px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: #475569;
  font-size: 14px;
  text-align: center;
}

.trade-fairs-popup {
  font-family: inherit;
  min-width: 180px;
  position: relative;
}

.trade-fairs-popup-title {
  font-weight: 800;
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}

.map-popup-link {
  color: inherit;
  text-decoration: none;
}

.map-popup-link:hover,
.map-popup-link:focus {
  text-decoration: underline;
}

.trade-fairs-favorite-toggle {
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  color: var(--accent);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  font-family: inherit;
  position: relative;
  transform: scale(1.25);
  transform-origin: center;
}

.trade-fairs-notes-toggle {
  border: 1px solid transparent;
  background: transparent;
  padding: 0;
  margin: 0;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--accent);
  border-radius: 8px;
}

.trade-fairs-planning-toggle {
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--accent);
}

.trade-fairs-attended-toggle {
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--accent);
}

.trade-fairs-notes-toggle svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
}

.trade-fairs-planning-toggle svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trade-fairs-attended-toggle svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trade-fairs-notes-icon-fill {
  fill: currentColor;
  opacity: 0;
  stroke: none;
}

.trade-fairs-planning-icon-fill {
  fill: currentColor;
  opacity: 0;
  stroke: none;
}

.trade-fairs-planning-toggle[aria-pressed="true"] .trade-fairs-planning-icon-fill {
  opacity: 1;
}

.trade-fairs-attended-icon-fill {
  fill: currentColor;
  opacity: 0;
  stroke: none;
}

.trade-fairs-attended-toggle[aria-pressed="true"] .trade-fairs-attended-icon-fill {
  opacity: 1;
}

.trade-fairs-notes-toggle[data-has-note="true"] .trade-fairs-notes-icon-fill {
  opacity: 0.28;
}

.trade-fairs-notes-icon-line {
  stroke: currentColor;
}

.trade-fairs-notes-toggle:hover {
  border-color: rgba(11, 60, 93, 0.2);
}

.trade-fairs-planning-toggle:hover {
  box-shadow: 0 0 0 2px rgba(11, 60, 93, 0.22);
  border-radius: 4px;
}

.trade-fairs-attended-toggle:hover {
  box-shadow: 0 0 0 2px rgba(11, 60, 93, 0.22);
  border-radius: 4px;
}

.trade-fairs-notes-toggle:focus-visible {
  outline: 2px solid rgba(11, 60, 93, 0.35);
  outline-offset: 2px;
}

.trade-fairs-planning-toggle:focus-visible {
  outline: 2px solid rgba(11, 60, 93, 0.35);
  outline-offset: 2px;
  border-radius: 4px;
}

.trade-fairs-attended-toggle:focus-visible {
  outline: 2px solid rgba(11, 60, 93, 0.35);
  outline-offset: 2px;
  border-radius: 4px;
}

.trade-fairs-popup-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.trade-fairs-popup-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 6px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.trade-fairs-popup-action-bar .trade-fairs-popup-actions {
  flex: 0 0 auto;
}

.trade-fairs-popup-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.trade-fairs-popup-actions .trade-fairs-notes-action {
  border: 1px solid transparent;
  background: transparent;
  color: var(--accent);
  padding: 0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.trade-fairs-popup>.trade-fairs-notes-action:disabled,
.trade-fairs-notes-toggle:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.trade-fairs-notes-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.trade-fairs-notes-modal[hidden] {
  display: none;
}

.trade-fairs-notes-panel {
  width: min(520px, calc(100% - 32px));
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.15);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.trade-fairs-notes-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.trade-fairs-notes-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
}

.trade-fairs-notes-close {
  border: none;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
  color: #64748b;
  line-height: 1;
}

.trade-fairs-notes-textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  resize: vertical;
  min-height: 140px;
}

.trade-fairs-notes-textarea:focus {
  outline: 2px solid rgba(11, 60, 93, 0.2);
  border-color: rgba(11, 60, 93, 0.3);
}

.trade-fairs-notes-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
}

.trade-fairs-notes-actions-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.note-slots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.note-slot {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.note-slot:hover {
  border-color: rgba(11, 60, 93, 0.35);
}

.note-slot:focus-visible {
  outline: 2px solid rgba(11, 60, 93, 0.2);
  outline-offset: 2px;
}

.note-slot.is-active,
.note-slot[aria-pressed="true"] {
  background: rgba(11, 60, 93, 0.08);
  border-color: rgba(11, 60, 93, 0.45);
}

.trade-fairs-table .trade-fairs-favorite-toggle {
  width: 32px;
  height: 32px;
  font-size: 20px;
  line-height: 1;
  transform: none;
}

.trade-fairs-table .trade-fairs-favorite-toggle::before {
  content: none;
}

@media (max-width: 768px) {
  .trade-fairs-table .trade-fairs-favorite-toggle {
    font-size: 22px;
  }
}

.trade-fairs-popup-title .trade-fairs-favorite-toggle {
  margin-left: auto;
}

.trade-fairs-popup-actions .trade-fairs-favorite-toggle {
  margin: 0;
  width: 20px;
  height: 20px;
  font-size: 18px;
  transform: none;
}

.trade-fairs-popup-actions .maplibregl-popup-close-button,
.trade-fairs-popup-actions .mapboxgl-popup-close-button {
  position: static;
  width: 28px;
  height: 28px;
  padding: 0;
  margin: 0;
  line-height: 1;
  font-size: 18px;
  border: none;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  border-radius: 6px;
}

.trade-fairs-popup-actions .maplibregl-popup-close-button:hover,
.trade-fairs-popup-actions .mapboxgl-popup-close-button:hover {
  background: rgba(11, 60, 93, 0.08);
}

.trade-fairs-popup-actions .maplibregl-popup-close-button:focus-visible,
.trade-fairs-popup-actions .mapboxgl-popup-close-button:focus-visible {
  outline: 2px solid rgba(11, 60, 93, 0.35);
  outline-offset: 2px;
}

.trade-fairs-map-favorite-marker {
  font-family: inherit;
  font-size: 9px;
  line-height: 1;
  color: var(--accent);
  width: 10px;
  height: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  text-shadow: 0 0 2px rgba(15, 23, 42, 0.4), 0 0 3px rgba(255, 255, 255, 0.6);
}

.trade-fairs-favorite-toggle::before {
  content: "";
  position: absolute;
  top: -8px;
  right: -8px;
  bottom: -8px;
  left: -8px;
}

.trade-fairs-favorite-toggle:hover {
  box-shadow: 0 0 0 2px rgba(11, 60, 93, 0.22);
  border-radius: 4px;
}

.trade-fairs-favorite-toggle:focus-visible {
  outline: 2px solid rgba(11, 60, 93, 0.35);
  outline-offset: 2px;
  border-radius: 4px;
}

.trade-fairs-popup-meta {
  font-size: 13px;
  color: #475569;
}

.trade-fairs-popup-tags {
  margin-top: 6px;
  font-size: 12px;
  color: #0f172a;
}

.trade-fairs-insights {
  display: grid;
  gap: 12px;
  margin: 14px 0;
}

.trade-fairs-insight-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: #fff;
  box-shadow: var(--shadow);
}

.trade-fairs-insight-head h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.trade-fairs-insight-head p {
  margin: 0 0 10px;
  color: #475569;
  font-size: 14px;
  line-height: 1.5;
}

.trade-fairs-insight-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.trade-fairs-insight-row {
  display: grid;
  grid-template-columns: 1fr 1.8fr 60px;
  gap: 10px;
  align-items: center;
}

.trade-fairs-insight-label {
  font-weight: 700;
  color: #0f172a;
  font-size: 14px;
}

.trade-fairs-insight-bar {
  height: 10px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}

.trade-fairs-insight-bar span {
  display: block;
  height: 100%;
  background: #cbd5e1;
}

.trade-fairs-insight-value {
  text-align: right;
  font-weight: 800;
  color: #0f172a;
}

.trade-fairs-insights-empty,
.trade-fairs-insight-note {
  font-size: 14px;
  color: #64748b;
}

@media (max-width: 640px) {
  .trade-fairs-insight-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .trade-fairs-insight-value {
    text-align: left;
  }
}

#tradeMonthSliderContainer #tradeMonthSlider {
  width: 100%;
  height: 6px;
  margin: 0;
  box-sizing: border-box;
  background: #e5e7eb;
  border-radius: 999px;
  border: none;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  accent-color: var(--blue-muted);
}

#tradeMonthSliderContainer #tradeMonthSlider:focus-visible {
  outline: 2px solid rgba(15, 23, 42, 0.25);
  outline-offset: 4px;
}

#tradeMonthSliderContainer #tradeMonthSlider:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  pointer-events: none;
}

#tradeMonthSliderContainer #tradeMonthSlider::-webkit-slider-runnable-track,
#tradeMonthSliderContainer #tradeMonthSlider::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: #e5e7eb;
}

#tradeMonthSliderContainer #tradeMonthSlider::-moz-range-progress {
  background: var(--blue-muted);
  border-radius: 999px;
}

#tradeMonthSliderContainer #tradeMonthSlider::-webkit-slider-thumb,
#tradeMonthSliderContainer #tradeMonthSlider::-moz-range-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--card);
  background: var(--blue-muted);
  box-shadow: none;
  box-sizing: border-box;
  cursor: pointer;
}

#tradeMonthSliderContainer #tradeMonthSlider::-webkit-slider-thumb {
  margin-top: -4px;
}

#tradeMonthSliderContainer #tradeMonthSlider:disabled::-webkit-slider-thumb,
#tradeMonthSliderContainer #tradeMonthSlider:disabled::-moz-range-thumb {
  background: #94a3b8;
  border-color: #94a3b8;
}

#tradeMonthSliderContainer.trade-fairs-month-slider {
  --timeline-axis-padding: 22px;
  --timeline-axis-padding-total: 44px;
  --timeline-slider-width: calc(92.3077% - 40.62px);
  position: relative;
  min-height: 138px;
  margin: 16px 24px 24px;
  padding: 0 14px 4px;
  gap: 0;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
  overflow-y: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#tradeMonthSliderContainer .trade-fairs-month-slider-peak {
  position: relative;
  z-index: 1;
  min-width: 0;
  max-width: 100%;
  min-height: 24px;
  height: 24px;
  max-height: 24px;
  color: #14213f;
  font-size: 14px;
  font-weight: 850;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px;
}

#tradeMonthSliderContainer .trade-fairs-month-slider-peak-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

#tradeMonthSliderContainer .trade-fairs-month-density {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(var(--timeline-slots, 192), minmax(0, 1fr));
  align-items: end;
  gap: clamp(0px, 0.12vw, 2px);
  height: 54px;
  margin-top: 0;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  padding: 2px var(--timeline-axis-padding) 4px;
  box-sizing: border-box;
  pointer-events: none;
}

#tradeMonthSliderContainer .trade-fairs-month-density-bar {
  position: relative;
  width: min(100%, 4px);
  min-width: 0;
  max-width: 100%;
  height: calc(3px + (var(--density, 0) * 42px));
  justify-self: center;
  border-radius: 999px 999px 2px 2px;
  background: linear-gradient(180deg, rgba(126, 216, 232, 0.96), rgba(37, 132, 166, 0.9) 58%, rgba(11, 60, 93, 0.88));
  box-shadow:
    0 0 8px rgba(34, 211, 238, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.18) inset;
  opacity: calc(0.44 + (var(--density, 0) * 0.5));
}

#tradeMonthSliderContainer .trade-fairs-month-density-bar.is-empty {
  height: 2px;
  opacity: 0.2;
  background: rgba(11, 60, 93, 0.18);
  box-shadow: none;
}

#tradeMonthSliderContainer .trade-fairs-month-slider-timeline {
  order: -1;
  color: #14213f;
  font-weight: 850;
}

#tradeMonthSliderContainer .trade-fairs-month-slider-timeline.active {
  color: #0b3c5d;
  text-shadow: none;
}

#tradeMonthSliderContainer .trade-fairs-month-slider-timeline.active::after {
  content: "";
}

#tradeMonthSliderContainer #tradeMonthSlider {
  position: relative;
  z-index: 4;
  width: var(--timeline-slider-width);
  max-width: calc(100% - var(--timeline-axis-padding-total));
  height: 10px;
  margin: -2px var(--timeline-axis-padding) 0;
  background: transparent;
  accent-color: #0b3c5d;
  opacity: 0;
}

#tradeMonthSliderContainer #tradeMonthSlider::-webkit-slider-runnable-track,
#tradeMonthSliderContainer #tradeMonthSlider::-moz-range-track {
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(11, 60, 93, 0.16) 0%, rgba(11, 60, 93, 0.42) 48%, rgba(34, 211, 238, 0.38) 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.72) inset,
    0 6px 18px rgba(15, 35, 83, 0.06);
}

#tradeMonthSliderContainer #tradeMonthSlider::-moz-range-progress {
  background: #0b3c5d;
  border-radius: 999px;
}

#tradeMonthSliderContainer #tradeMonthSlider::-webkit-slider-thumb,
#tradeMonthSliderContainer #tradeMonthSlider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 4px solid rgba(255, 255, 255, 0.98);
  background: #0b3c5d;
  box-shadow:
    0 0 0 5px rgba(11, 60, 93, 0.12),
    0 6px 14px rgba(30, 44, 101, 0.14);
}

#tradeMonthSliderContainer #tradeMonthSlider::-webkit-slider-thumb {
  margin-top: -6px;
}

#tradeMonthSliderContainer .trade-fairs-month-slider-thumb {
  position: absolute;
  z-index: 3;
  width: 18px;
  height: 18px;
  border: 4px solid rgba(255, 255, 255, 0.98);
  border-radius: 50%;
  background: #0b3c5d;
  box-sizing: border-box;
  box-shadow:
    0 0 0 5px rgba(11, 60, 93, 0.12),
    0 6px 14px rgba(30, 44, 101, 0.14);
  pointer-events: none;
  transform: translate(-50%, -50%);
}

#tradeMonthSliderContainer .trade-fairs-month-slider-thumb.is-disabled {
  background: #94a3b8;
  border-color: #94a3b8;
}

#tradeMonthSliderContainer .trade-fairs-month-slider-labels {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(13, minmax(0, 1fr));
  min-width: 0;
  max-width: 100%;
  min-height: 36px;
  height: 36px;
  align-items: start;
  margin: 0;
  padding: 14px var(--timeline-axis-padding) 0;
  box-sizing: border-box;
  border-radius: 0;
  background: transparent;
  color: #43516f;
  font-size: 0.73rem;
  letter-spacing: 0;
  box-shadow: none;
}

#tradeMonthSliderContainer .trade-fairs-month-slider-labels span {
  justify-self: stretch;
  min-width: 0;
  font-weight: 750;
  text-align: left;
  white-space: nowrap;
}

#tradeMonthSliderContainer .trade-fairs-month-slider-labels span::before {
  left: 0;
  right: auto;
  top: -10px;
  transform: none;
  height: 12px;
  background: rgba(112, 137, 190, 0.54);
}

#tradeMonthSliderContainer .trade-fairs-month-slider-labels::after {
  content: "";
  position: absolute;
  top: 4px;
  right: var(--timeline-axis-padding);
  width: 1px;
  height: 12px;
  background: rgba(112, 137, 190, 0.54);
}

#tradeMonthSliderContainer .trade-fairs-month-slider-label-all {
  color: #65738f;
  font-weight: 700;
}

@media (max-width: 760px) {
  #tradeMonthSliderContainer.trade-fairs-month-slider {
    --timeline-axis-padding: 14px;
    --timeline-axis-padding-total: 28px;
    --timeline-slider-width: calc(92.3077% - 25.85px);
    margin: 14px 12px 20px;
    padding: 0 4px 2px;
  }

  #tradeMonthSliderContainer .trade-fairs-month-density {
    height: 42px;
  }

  #tradeMonthSliderContainer #tradeMonthSlider {
    width: var(--timeline-slider-width);
    margin-inline: var(--timeline-axis-padding);
  }

  #tradeMonthSliderContainer .trade-fairs-month-slider-labels {
    padding-inline: var(--timeline-axis-padding);
    font-size: 0.68rem;
  }

  #tradeMonthSliderContainer .trade-fairs-month-slider-labels::after {
    right: var(--timeline-axis-padding);
  }
}

@media (max-width: 540px) {
  #tradeMonthSliderContainer.trade-fairs-month-slider {
    margin-inline: 4px;
    padding-inline: 0;
  }

  #tradeMonthSliderContainer .trade-fairs-month-slider-peak {
    font-size: 12px;
    gap: 8px;
  }

  #tradeMonthSliderContainer .trade-fairs-month-slider-labels {
    font-size: 0.62rem;
  }
}

@media (max-width: 430px) {
  #tradeMonthSliderContainer.trade-fairs-month-slider {
    --timeline-axis-padding: 14px;
    --timeline-axis-padding-total: 28px;
    --timeline-slider-width: calc(92.3077% - 25.85px);
  }

  #tradeMonthSliderContainer .trade-fairs-month-slider-labels {
    font-size: 0.7rem;
    letter-spacing: 0;
    text-transform: none;
    color: var(--muted);
    min-height: 18px;
    height: 18px;
  }

  #tradeMonthSliderContainer .trade-fairs-month-slider-labels span {
    font-weight: 500;
    padding-top: 6px;
    line-height: 1;
    font-size: 0;
  }

  #tradeMonthSliderContainer .trade-fairs-month-slider-labels span::after {
    display: block;
    font-size: 0.7rem;
    line-height: 1;
    font-variant-numeric: tabular-nums;
  }

  #tradeMonthSliderContainer .trade-fairs-month-slider-labels span:nth-child(1)::after {
    content: "All";
  }

  #tradeMonthSliderContainer .trade-fairs-month-slider-labels span:nth-child(2)::after {
    content: "1";
  }

  #tradeMonthSliderContainer .trade-fairs-month-slider-labels span:nth-child(3)::after {
    content: "2";
  }

  #tradeMonthSliderContainer .trade-fairs-month-slider-labels span:nth-child(4)::after {
    content: "3";
  }

  #tradeMonthSliderContainer .trade-fairs-month-slider-labels span:nth-child(5)::after {
    content: "4";
  }

  #tradeMonthSliderContainer .trade-fairs-month-slider-labels span:nth-child(6)::after {
    content: "5";
  }

  #tradeMonthSliderContainer .trade-fairs-month-slider-labels span:nth-child(7)::after {
    content: "6";
  }

  #tradeMonthSliderContainer .trade-fairs-month-slider-labels span:nth-child(8)::after {
    content: "7";
  }

  #tradeMonthSliderContainer .trade-fairs-month-slider-labels span:nth-child(9)::after {
    content: "8";
  }

  #tradeMonthSliderContainer .trade-fairs-month-slider-labels span:nth-child(10)::after {
    content: "9";
  }

  #tradeMonthSliderContainer .trade-fairs-month-slider-labels span:nth-child(11)::after {
    content: "10";
  }

  #tradeMonthSliderContainer .trade-fairs-month-slider-labels span:nth-child(12)::after {
    content: "11";
  }

  #tradeMonthSliderContainer .trade-fairs-month-slider-labels span:nth-child(13)::after {
    content: "12";
  }

  #tradeMonthSliderContainer .trade-fairs-month-slider-labels span:is(.active, .is-active, [data-active="true"], [data-active="1"], [aria-current="true"]) {
    color: var(--muted);
    font-weight: 500;
  }
}

.page-trade-fair .trade-fair-panel {
  gap: 16px;
}

.page-trade-fair .trade-fair-panel.trade-fair-evaluation {
  margin-top: 18px;
}

.trade-fair-evaluation-body {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
  align-items: start;
}

.trade-fair-evaluation-field {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.trade-fair-evaluation-field label,
.trade-fair-evaluation-value-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #0f172a;
  text-transform: uppercase;
}

.trade-fair-evaluation-field select {
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 10px 12px;
  font-weight: 700;
  background: #fff;
}

.trade-fair-evaluation-value-set {
  display: flex;
  gap: 12px;
  flex-wrap: nowrap;
  justify-content: space-between;
}

.trade-fair-evaluation-value-pill {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  width: 52px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: box-shadow .2s ease, transform .1s ease, border .2s ease;
  text-align: center;
}

.trade-fair-evaluation-value-pill.is-active {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 12px 20px rgba(11, 60, 93, 0.28);
}

.trade-fair-evaluation-value-pill:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(11, 60, 93, 0.25);
}

.trade-fair-evaluation-notes {
  min-height: 136px;
}

.trade-fair-evaluation-actions {
  grid-column: 1 / -1;
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
}

.trade-fair-evaluation-actions .btn {
  padding: 12px 18px;
  font-size: 14px;
  border-radius: 14px;
  height: auto;
}

@media (max-width:1100px) {
  .trade-fair-evaluation-body {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

@media (max-width:720px) {
  .trade-fair-evaluation-body {
    grid-template-columns: 1fr;
  }

  .trade-fair-evaluation-value-set {
    justify-content: space-between;
  }

  .trade-fair-evaluation-actions {
    justify-content: center;
  }

  .trade-fair-evaluation-actions .btn {
    width: 100%;
  }
}

.page-trade-fair .trade-fair-hero-card {
  display: block;
}

.page-trade-fair .trade-fair-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.page-trade-fair .trade-fair-panel .panel-head h1 {
  font-size: 36px;
  line-height: 1.15;
  margin: 6px 0 12px;
  font-weight: 600;
}

.page-trade-fair .panel-sub {
  color: #64748b;
  font-size: 13px;
}

.page-trade-fair .trade-fair-metadata h3,
.page-trade-fair .trade-fair-sectors h3,
.page-trade-fair .trade-fair-notes h3 {
  text-transform: uppercase;
  letter-spacing: .8px;
  font-size: 12px;
  font-weight: 800;
  color: #64748b;
  margin-bottom: 6px;
}

.page-trade-fair .trade-fair-metadata {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 32px;
  align-items: baseline;
}

.page-trade-fair .trade-fair-metadata>div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.page-trade-fair .trade-fair-metadata p {
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
}

.page-trade-fair .trade-fair-description {
  color: var(--ink);
  line-height: 1.75;
  font-size: 16px;
}

.page-trade-fair .trade-fair-description-body {
  margin: 8px 0 0;
  width: min(100%, 70ch);
}

.page-trade-fair .trade-fair-description-block {
  margin: 0;
  padding: 0;
}

.page-trade-fair .trade-fair-description-heading h3 {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 600;
}

.page-trade-fair .trade-fair-map-panel {
  margin: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.page-trade-fair .trade-fair-map-panel .trade-fair-mini-map {
  min-height: 260px;
}

.page-trade-fair .trade-fair-map-panel .trade-fair-mini-map-fallback {
  margin-top: 0;
}

.page-trade-fair .trade-fair-section-title {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 600;
}

.page-trade-fair .trade-fair-top {
  width: 100%;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  align-items: flex-start;
}

.page-trade-fair .trade-fair-about {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.page-trade-fair .trade-fair-sectors {
  margin-top: 12px;
}

.page-trade-fair .trade-fair-key-facts {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
}

.page-trade-fair .trade-fair-map-heading {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.page-trade-fair .trade-fair-map-heading h2 {
  margin: 0;
  font-size: 22px;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: 0.03em;
}

@media (max-width: 720px) {
  .page-trade-fair .trade-fair-metadata {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .page-trade-fair .trade-fair-top {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .page-trade-fair .trade-fair-panel {
    max-width: 420px;
    margin: 16px auto;
    padding: 12px;
  }

  .page-trade-fair .trade-fair-hero-head {
    display: grid;
    grid-template-columns: 1fr;
    row-gap: 8px;
    justify-items: center;
    text-align: center;
  }

  .page-trade-fair .trade-fair-hero-title,
  .page-trade-fair .trade-fair-hero-title h1,
  .page-trade-fair .trade-fair-subtitle {
    text-align: center;
  }

  .page-trade-fair .trade-fair-hero-actions {
    justify-content: center;
    flex-wrap: nowrap;
    margin: 0;
    justify-self: center;
    grid-row: 1;
  }

  .page-trade-fair .trade-fair-hero-title {
    grid-row: 2;
  }

  .page-trade-fair .trade-fair-hero-title h1 {
    margin: 6px 0 8px;
    line-height: 1.1;
  }

  .page-trade-fair .panel-sub {
    text-align: center;
  }

  .page-trade-fair .trade-fair-top {
    gap: 14px;
  }

  .page-trade-fair .trade-fair-description-heading h3,
  .page-trade-fair .trade-fair-description {
    text-align: center;
  }

  .page-trade-fair .trade-fair-description-body {
    margin: 6px auto 0;
    max-width: 38ch;
  }

  .page-trade-fair .trade-fair-sectors {
    align-items: center;
    text-align: center;
  }

  .page-trade-fair .trade-fair-sectors h3,
  .page-trade-fair .trade-fair-tags h3 {
    text-align: center;
  }

  .page-trade-fair .trade-fair-tags {
    align-items: center;
  }

  .page-trade-fair .trade-fair-sectors h3,
  .page-trade-fair .trade-fair-key-facts .trade-fair-section-title,
  .page-trade-fair .trade-fair-map-heading h2,
  .page-trade-fair .trade-fair-map-heading .panel-sub,
  .page-trade-fair .trade-fair-related h2 {
    text-align: center;
  }

  .page-trade-fair .trade-fairs-sector-list,
  .page-trade-fair .trade-fair-tags {
    display: flex;
    flex-wrap: wrap;
  }

  .page-trade-fair .trade-fairs-sector-list,
  .page-trade-fair .trade-fair-tags {
    justify-content: center;
  }

  .page-trade-fair .trade-fair-metadata {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 14px;
    text-align: center;
    justify-items: center;
  }

  .page-trade-fair .trade-fair-metadata>div {
    align-items: center;
  }

  .page-trade-fair .trade-fair-map-panel {
    width: 100%;
    margin-top: 10px;
  }

  .page-trade-fair .trade-fair-map-heading {
    align-items: center;
  }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 12px);
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  max-width: min(520px, calc(100vw - 32px));
  padding: 12px 18px;
  border-radius: 999px;
  background: #1f2933;
  color: #f5f7fa;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: .01em;
  text-align: center;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .24);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Standardized Pill Tabs Containers */
.calendar-tabs-container,
.reports-tabs-container,
.reminders-tabs-container,
.team-tabs-container,
.crm-tabs-container,
.rr-tabs-container,
.stats-tabs-container,
.dashboard-tabs-container {
  margin: 0 0 24px;
  padding: 4px;
  background: #f1f5f9;
  border-radius: 12px;
  width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE/Edge */
  -webkit-overflow-scrolling: touch;
  display: flex;
}

.calendar-tabs-container::-webkit-scrollbar,
.reports-tabs-container::-webkit-scrollbar,
.reminders-tabs-container::-webkit-scrollbar,
.team-tabs-container::-webkit-scrollbar,
.crm-tabs-container::-webkit-scrollbar,
.rr-tabs-container::-webkit-scrollbar,
.stats-tabs-container::-webkit-scrollbar,
.dashboard-tabs-container::-webkit-scrollbar {
  display: none;
  /* Chrome/Safari */
}

.stats-tabs,
.dashboard-tabs {
  display: flex;
  width: 100%;
}

.trade-calendar-view-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: none;
  border-radius: 10px;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.trade-calendar-view-toggle:hover {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.5);
}

.trade-calendar-view-toggle.is-active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

/* Unified calendar navigation */
.trade-calendar-nav {
  display: inline-flex;
  align-items: center;
  gap: 0;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(15, 23, 42, .15);
  border-radius: 999px;
  padding: 2px;
  min-width: 220px;
  max-width: 220px;
}

.trade-calendar-nav-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: transparent;
  font-size: 1rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .15s ease;
}

.trade-calendar-nav-btn:hover {
  background: rgba(15, 23, 42, .08);
}

.trade-calendar-nav-btn:focus {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}

.trade-calendar-nav-label {
  flex: 1;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 4px;
}

.trade-calendar-legend-group--nav {
  flex-shrink: 0;
}

.trade-calendar {
  width: 100%;
  max-width: var(--calendar-wrapper-width);
  margin: 0 auto;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}

.trade-calendar-canvas {
  width: 100%;
  box-sizing: border-box;
  position: relative;
  min-height: 520px;
  padding-top: 8px;
}

.trade-calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
  padding: 0;
}

.trade-calendar-weekdays span {
  text-align: center;
}

/* Calendar control bar - unified interaction area */
.trade-calendar-control-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 24px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 12px;
  margin-bottom: 12px;
}

.trade-calendar-control-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.trade-calendar-control-group--nav {
  flex: 0 0 auto;
}

.trade-calendar-control-label {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

.trade-calendar-controls,
.reports-tabs,
.filter-bar,
.team-tabs,
.crm-tabs,
.rr-tabs,
.stats-tabs,
.dashboard-tabs,
.trade-calendar-control-items {
  display: flex;
  gap: 4px;
  flex: 1;
}

/* Legacy legend classes kept for compatibility */
.trade-calendar-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 16px 24px;
  margin-bottom: 6px;
}

.trade-calendar-legend-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.trade-calendar-legend-group--nav {
  flex: 0 0 auto;
  justify-content: center;
}

.trade-calendar-legend-heading {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.trade-calendar-legend-items {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.trade-calendar-legend-item {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, .15);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.5);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.trade-calendar-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.trade-calendar-legend-item--ongoing .trade-calendar-legend-dot {
  background: #1e3a5f;
}

.trade-calendar-legend-item--upcoming .trade-calendar-legend-dot {
  background: var(--blue);
}

.trade-calendar-legend-item--past .trade-calendar-legend-dot {
  background: #94a3b8;
}

.trade-calendar-legend-item--favorite {
  font-size: 1rem;
}

.trade-calendar-legend-item--planning {
  font-size: 1rem;
}

.trade-calendar-legend-item--attended {
  font-size: 1rem;
}

.trade-calendar-legend-item--notes {
  font-size: 1rem;
}

/* Statistics page - control bar extensions */
.page-statistics .trade-calendar-control-bar {
  margin-bottom: 0;
  border-radius: 12px 12px 0 0;
  justify-content: space-between;
}

.page-statistics .trade-calendar-control-group {
  flex: 0 0 auto;
}

.page-statistics .trade-calendar-control-group--nav {
  flex: 0 0 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-statistics .trade-calendar-control-group--relation {
  flex: 0 0 auto;
}

/* Summary bar - inside container for stability */
/* Standard KPI Grid (Pills) */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.kpi-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.5px;
}

.kpi-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1;
}

.kpi-value.kpi-title {
  font-size: 16px;
  line-height: 1.3;
  font-weight: 700;
  white-space: normal;
}

.kpi-card.highlight .kpi-value {
  color: var(--blue);
}


.stats-summary-item strong {
  color: var(--ink);
  font-weight: 600;
  margin-right: 4px;
}

.stats-summary-item {
  font-size: 0.9rem;
  color: var(--ink);
  white-space: nowrap;
  min-width: 80px;
}

.stats-summary-item strong {
  font-weight: 700;
  color: var(--blue);
  font-size: 1.2rem;
  display: inline-block;
  min-width: 2ch;
}

.page-statistics .stats-filter-note {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 16px;
  min-height: 1.2em;
}

/* Toggle button states for statistics */
.page-statistics .trade-calendar-legend-item {
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.page-statistics .trade-calendar-legend-item:not(.is-active) {
  background: var(--card);
  color: var(--muted);
  border: 1px solid var(--line);
}

.page-statistics .trade-calendar-legend-item--favorite:not(.is-active),
.page-statistics .trade-calendar-legend-item--planning:not(.is-active),
.page-statistics .trade-calendar-legend-item--attended:not(.is-active),
.page-statistics .trade-calendar-legend-item--notes:not(.is-active) {
  background: var(--card);
  color: var(--muted);
}

.page-statistics .trade-calendar-legend-item--ongoing:not(.is-active) .trade-calendar-legend-dot,
.page-statistics .trade-calendar-legend-item--upcoming:not(.is-active) .trade-calendar-legend-dot,
.page-statistics .trade-calendar-legend-item--past:not(.is-active) .trade-calendar-legend-dot {
  background: var(--muted);
}

/* Prevent layout shifts in charts */
.page-statistics .stats-content {
  min-height: 400px;
}

.page-statistics .stats-block {
  min-height: 180px;
}

/* UI Stability: Fixed widths for relation pills to prevent layout shifts */
.page-statistics .trade-calendar-legend-item--favorite,
.page-statistics .trade-calendar-legend-item--planning,
.page-statistics .trade-calendar-legend-item--attended,
.page-statistics .trade-calendar-legend-item--notes {
  min-width: 36px;
  justify-content: center;
}

/* Temporal state pills - fixed min-width */
.page-statistics .trade-calendar-legend-item--ongoing,
.page-statistics .trade-calendar-legend-item--upcoming,
.page-statistics .trade-calendar-legend-item--past {
  min-width: 90px;
}

.trade-calendar-year-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(240px, 1fr));
  gap: 24px;
}

.trade-calendar-year-month {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-sizing: border-box;
}

.trade-calendar-year-month--past {
  opacity: 0.55;
}

.trade-calendar-year-month:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.trade-calendar-year-month-header {
  display: flex;
  justify-content: center;
}

.trade-calendar-year-month-button {
  border: none;
  background: transparent;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  padding: 0;
}

.trade-calendar-year-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  gap: 4px;
}

.trade-calendar-year-weekdays span {
  text-align: center;
}

.trade-calendar-year-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.trade-calendar-year-day {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 2px;
  height: 32px;
  width: 100%;
  font-size: 0.7rem;
  text-align: center;
  color: var(--ink);
  box-sizing: border-box;
  background: transparent;
  pointer-events: auto;
}

.trade-calendar-year-day--placeholder {
  visibility: hidden;
}

.trade-calendar-year-day--today {
  background: rgba(15, 23, 42, .06);
  border-radius: 4px;
}

/* Day number: ALWAYS above event bars */
.trade-calendar-year-day-number {
  position: absolute;
  top: 2px;
  left: 0;
  right: 0;
  font-weight: 500;
  font-size: 0.65rem;
  line-height: 1;
  z-index: 30;
  pointer-events: none;
  text-align: center;
  background: transparent;
}

/* v2.5: Top-anchored events area */
.year-view-day-events {
  position: absolute;
  top: 12px;
  left: 1px;
  right: 1px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 1px;
  z-index: 10;
  overflow: hidden;
  max-height: 20px;
}

/* Event bars: BELOW day numbers (z-index < 30) */
.year-view-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 4px;
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-sizing: border-box;
  cursor: pointer !important;
  flex-shrink: 0;
  z-index: 10;
  pointer-events: auto !important;
  position: relative;
}

.year-view-bar--single-day {
  height: 3px;
}

.year-view-bar--multi-day {
  height: 5px;
}

.year-view-bar:hover {
  filter: brightness(1.15);
}

.year-view-bar--ongoing {
  background: #1e3a5f;
}

.year-view-bar--upcoming {
  background: var(--blue);
}

.year-view-bar--past {
  background: #94a3b8;
}

.year-view-bar-icon {
  color: #fff;
  font-size: 9px;
  line-height: 1;
  margin-right: 2px;
}

.year-view-bar--past .year-view-bar-icon {
  color: #475569;
}

.year-view-overflow {
  font-size: 0.45rem;
  font-weight: 600;
  color: var(--muted);
  text-align: right;
  line-height: 1;
  padding-right: 1px;
}

/* Year view bar hover */
.year-view-bar--hover {
  filter: brightness(1.25);
}

/* Year view tooltip */
.year-view-tooltip {
  position: absolute;
  z-index: 9999;
  pointer-events: none;
  background: var(--ink);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  transition: opacity .12s ease;
}

.year-view-tooltip.is-visible {
  opacity: 1;
}

.year-view-tooltip-relations {
  font-size: 13px;
  margin-bottom: 2px;
}

.year-view-tooltip-name {
  font-weight: 600;
  font-size: 13px;
}

.year-view-tooltip-detail {
  opacity: 0.8;
  font-size: 11px;
}

/* Legend filter active state */
.trade-calendar-legend-item.is-active {
  background: var(--accent);
  color: #fff;
}

.trade-calendar-day {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(15, 23, 42, .15);
  border-radius: 12px;
  padding: 10px;
  height: var(--calendar-day-row-height);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  position: relative;
  overflow: hidden;
  font-size: 0.9rem;
}

.trade-calendar-day--week {
  flex-direction: column;
  gap: 4px;
}

.trade-calendar-day--outside {
  opacity: 0.45;
}

.trade-calendar-day-number {
  font-weight: 600;
  color: var(--ink);
  position: relative;
  z-index: 3;
}

.trade-calendar-day-number-secondary {
  font-size: 0.75rem;
  color: var(--muted);
}

.trade-calendar-day-overflow {
  font-size: 0.65rem;
  color: var(--muted);
  margin-top: auto;
  background: rgba(15, 23, 42, .06);
  border: none;
  cursor: pointer;
  padding: 3px 8px;
  border-radius: 10px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background .15s ease, color .15s ease;
}

.trade-calendar-day-overflow:hover {
  background: rgba(37, 99, 235, .12);
  color: var(--blue);
}

/* Month day overflow popup */
.month-day-overflow-popup {
  position: absolute;
  z-index: 9999;
  background: var(--card);
  border: 1px solid rgba(15, 23, 42, .15);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .15);
  min-width: 280px;
  max-width: 360px;
  max-height: 400px;
  overflow: hidden;
  display: none;
}

.month-day-overflow-popup.is-visible {
  display: block;
}

.month-day-overflow-popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(15, 23, 42, .1);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
}

.month-day-overflow-popup-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--muted);
  line-height: 1;
  padding: 0;
}

.month-day-overflow-popup-close:hover {
  color: var(--ink);
}

.month-day-overflow-popup-list {
  overflow-y: auto;
  max-height: 340px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.month-day-overflow-popup-item {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(15, 23, 42, .1);
  background: rgba(255, 255, 255, 0.5);
}

.month-day-overflow-popup-item:hover {
  background: rgba(15, 23, 42, .04);
}

.month-day-overflow-popup-item-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.month-day-overflow-popup-relations {
  font-size: 0.85rem;
}

.month-day-overflow-popup-item-name {
  font-weight: 600;
  color: var(--ink);
  font-size: 0.85rem;
}

.month-day-overflow-popup-item-detail {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.3;
}

.month-day-overflow-popup-item-status {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.month-day-overflow-popup-item--ongoing {
  border-left: 3px solid var(--blue);
}

.month-day-overflow-popup-item--upcoming {
  border-left: 3px solid var(--accent);
}

.month-day-overflow-popup-item--ended {
  border-left: 3px solid var(--gray-muted);
}

/* Month event tooltip */
.month-event-tooltip {
  position: absolute;
  z-index: 9999;
  background: var(--ink);
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .25);
  font-size: 0.8rem;
  max-width: 280px;
  pointer-events: none;
  display: none;
}

.month-event-tooltip.is-visible {
  display: block;
}

.month-event-tooltip-relations {
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.month-event-tooltip-name {
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.month-event-tooltip-detail {
  font-size: 0.75rem;
  opacity: 0.85;
  line-height: 1.4;
}

.month-event-tooltip-status {
  font-size: 0.7rem;
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  opacity: 0.7;
}

.trade-calendar-day-events {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  margin-top: 4px;
}

.trade-calendar-day-event {
  display: block;
  position: relative;
  text-decoration: none;
  color: inherit;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trade-calendar-day-event--ongoing {
  background: rgba(37, 99, 235, .12);
  border-left: 3px solid var(--blue);
}

.trade-calendar-day-event--upcoming {
  background: rgba(37, 99, 235, .06);
  border-left: 3px dashed var(--blue);
}

.trade-calendar-day-event--ended {
  background: rgba(148, 163, 184, .12);
  border-left: 3px solid var(--gray-muted);
}

.trade-calendar-day-event-name {
  font-weight: 500;
  color: var(--ink);
}

.trade-calendar-month-view,
.trade-calendar-week-view {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.trade-calendar-grid-stack {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.trade-calendar-month-days,
.trade-calendar-week-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  grid-auto-rows: var(--calendar-day-row-height);
  position: relative;
  z-index: 1;
}

.trade-calendar-month-events-grid,
.trade-calendar-week-events-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  grid-auto-rows: var(--calendar-event-row-height);
  pointer-events: none;
  z-index: 2;
}

.trade-calendar-event-card {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid rgba(15, 23, 42, .1);
  background: var(--card);
  font-size: 0.8rem;
  box-shadow: 0 2px 6px rgba(15, 23, 42, .08);
  align-self: flex-start;
  pointer-events: auto;
  overflow: hidden;
}

.trade-calendar-event-card-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  margin-bottom: 2px;
}

.trade-calendar-event-card-name {
  font-weight: 600;
  color: var(--ink);
}

.trade-calendar-event-card-status {
  font-size: 0.75rem;
  color: var(--muted);
}

.trade-calendar-event-card-detail {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.3;
}

.trade-calendar-event-card--ongoing {
  border-color: transparent;
  border-left: 4px solid var(--blue);
  background: rgba(37, 99, 235, .12);
}

.trade-calendar-event-card--upcoming {
  border-color: transparent;
  border-left: 4px dashed var(--blue);
  background: rgba(37, 99, 235, .06);
}

.trade-calendar-event-card--ended {
  border-color: transparent;
  border-left: 4px solid var(--gray-muted);
  background: rgba(148, 163, 184, .12);
}

.trade-calendar-event-precision {
  display: inline-flex;
  margin-top: 2px;
  font-size: 0.65rem;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, .2);
}

.trade-calendar-event-states {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.trade-calendar-event-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(15, 23, 42, .2);
  font-size: 0.7rem;
}

.trade-calendar-empty {
  font-size: 0.9rem;
  color: var(--muted);
  padding: 12px 0;
  text-align: center;
}

/* Rolling Week View - Card Layout */
.rolling-week-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 10px 0;
}

.rolling-week-empty {
  font-size: 0.9rem;
  color: var(--muted);
  padding: 24px 0;
  text-align: center;
}

.trade-fair-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.trade-fair-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.card-status-indicator {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
}

.trade-fair-card.state-ongoing .card-status-indicator {
  background: #2563eb;
}

.trade-fair-card.state-upcoming .card-status-indicator {
  background: #93c5fd;
}

.trade-fair-card.state-past .card-status-indicator {
  background: #94a3b8;
}

.trade-fair-card.state-ongoing {
  border-left: 5px solid #2563eb;
}

.trade-fair-card.state-upcoming {
  border-left: 5px solid #93c5fd;
}

.trade-fair-card.state-past {
  border-left: 5px solid #94a3b8;
  opacity: 0.7;
}

.card-content {
  flex: 1;
  min-width: 0;
  padding-left: 8px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.card-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-icons {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.card-icon {
  font-size: 0.9rem;
}

.card-meta {
  font-size: 0.85rem;
  color: #64748b;
  margin-top: 4px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.meta-location,
.meta-date {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

@media (max-width:1199px) {
  .trade-calendar-year-grid {
    grid-template-columns: repeat(2, minmax(280px, 1fr));
  }
}

@media (max-width:767px) {
  .trade-calendar-year-grid {
    grid-template-columns: minmax(280px, 1fr);
  }
}

@media (max-width:1023px) {
  .trade-calendar {
    overflow-x: auto;
  }

  .trade-calendar-month-days,
  .trade-calendar-week-days {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }

  .trade-calendar-month-events-grid,
  .trade-calendar-week-events-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
}

@media (max-width:767px) {
  .trade-calendar-controls {
    justify-content: flex-start;
  }

  .trade-calendar-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .trade-calendar {
    overflow-x: auto;
  }
}

/* ============================================
   STATISTICS PAGE STYLES
   Compact professional B2B analytics layout
   ============================================ */

/* Page layout */
.page-statistics main.wrap {
  width: min(1200px, 100%);
}


/* Empty State */
.stats-empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--gray);
}

.stats-empty-state h2 {
  margin: 0 0 8px;
  font-size: 16px;
  color: var(--ink);
}

.stats-empty-state p {
  margin: 0;
  font-size: 13px;
}

.stats-empty-state a {
  color: var(--blue);
}

/* Stats Content */
.stats-content {
  width: 100%;
}

/* Two Column Grid */
.stats-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.stats-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Stats Blocks */
.stats-block {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
}

.stats-block-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: .3px;
}

.stats-mini-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .2px;
}

/* Bar Chart (compact) */
.stats-bar-chart {
  padding: 0;
}

.stats-bar-container {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 3px;
  align-items: flex-end;
  height: 80px;
}

.stats-bar {
  background: var(--blue);
  border-radius: 2px 2px 0 0;
  min-height: 3px;
  position: relative;
  transition: background .15s ease;
}

.stats-bar:hover {
  background: var(--accent);
}

.stats-bar-value {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 700;
  color: var(--ink);
  opacity: 0;
  transition: opacity .15s ease;
}

.stats-bar:hover .stats-bar-value {
  opacity: 1;
}

.stats-bar-labels {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 3px;
  margin-top: 4px;
  text-align: center;
  font-size: 9px;
  color: var(--gray);
  font-weight: 600;
}

/* Geographic (compact) */
.stats-geo-compact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.stats-country-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 12px;
}

.stats-country-list li {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px solid #f1f5f9;
}

.stats-country-list li:last-child {
  border-bottom: none;
}

.stats-country-list li::before {
  display: none;
}

.stats-country-list .country-name {
  color: var(--ink);
}

.stats-country-list .country-count {
  font-weight: 700;
  color: var(--blue);
}

.stats-country-empty {
  color: var(--gray);
  font-size: 11px;
  font-style: italic;
}

/* Continent bars */
.stats-continent-bars {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stats-continent-item {
  display: grid;
  grid-template-columns: 55px 1fr 32px;
  gap: 6px;
  align-items: center;
  font-size: 11px;
}

.stats-continent-name {
  color: var(--ink);
  font-weight: 500;
}

.stats-continent-bar {
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}

.stats-continent-fill {
  height: 100%;
  background: var(--blue);
  border-radius: 4px;
  transition: width .3s ease;
}

.stats-continent-pct {
  font-weight: 700;
  color: var(--blue);
  text-align: right;
}

/* Focus Breakdown */
.stats-focus-section {
  margin-bottom: 10px;
}

.stats-focus-section:last-child {
  margin-bottom: 0;
}

.stats-focus-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stats-focus-item {
  display: grid;
  grid-template-columns: 1fr 60px 28px;
  gap: 6px;
  align-items: center;
  font-size: 12px;
  padding: 3px 0;
  border-bottom: 1px solid #f1f5f9;
}

.stats-focus-item--interactive {
  cursor: pointer;
  border-radius: 8px;
}

.stats-focus-item--interactive:focus-visible,
.stats-focus-item--interactive.is-active {
  background: rgba(37, 99, 235, 0.08);
  outline: none;
}

.stats-focus-item:last-child {
  border-bottom: none;
}

.stats-focus-name {
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stats-focus-bar {
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
}

.stats-focus-fill {
  height: 100%;
  background: var(--blue);
  border-radius: 3px;
}

.stats-focus-pct {
  font-weight: 700;
  color: var(--blue);
  text-align: right;
  font-size: 11px;
}

.stats-focus-count {
  font-weight: 700;
  color: var(--blue);
  text-align: right;
  font-size: 11px;
}

.stats-focus-empty {
  color: var(--gray);
  font-size: 11px;
  font-style: italic;
  padding: 4px 0;
}

/* Activity (compact) */
.stats-activity-compact {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  align-items: center;
}

.stats-donut-small {
  position: relative;
  width: 80px;
  height: 80px;
}

.stats-donut {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.stats-donut-bg {
  fill: none;
  stroke: #e2e8f0;
  stroke-width: 8;
}

.stats-donut-segment {
  fill: none;
  stroke-width: 8;
  transition: stroke-dasharray .3s ease, stroke-dashoffset .3s ease;
}

.stats-donut-favorite {
  stroke: #f59e0b;
}

.stats-donut-planning {
  stroke: #3b82f6;
}

.stats-donut-attended {
  stroke: #10b981;
}

.stats-donut-notes {
  stroke: #8b5cf6;
}

.stats-donut-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.stats-donut-total {
  font-size: 18px;
  font-weight: 900;
  color: var(--ink);
}

.stats-activity-legend-compact {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stats-legend-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.stats-legend-row strong {
  margin-left: auto;
  color: var(--ink);
}

.stats-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.stats-legend-favorite {
  background: #f59e0b;
}

.stats-legend-planning {
  background: #3b82f6;
}

.stats-legend-attended {
  background: #10b981;
}

.stats-legend-notes {
  background: #8b5cf6;
}

/* Insights (compact) */
.stats-insights-block {
  margin-top: 12px;
}

.stats-insights-compact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stats-insight {
  flex: 1 1 auto;
  min-width: 280px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  background: #f8fafc;
  border-radius: 6px;
  font-size: 12px;
  color: var(--ink);
  line-height: 1.4;
}

.stats-insight-icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--win);
  color: #fff;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 700;
}

.stats-insight-bullet {
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  background: var(--blue);
  border-radius: 50%;
  margin-top: 5px;
}

.stats-insight-empty {
  color: var(--gray);
  font-style: italic;
  font-size: 12px;
  margin: 0;
  padding: 8px 0;
}

/* Responsive: Tablet */
@media (max-width:1023px) {
  .stats-grid-2col {
    grid-template-columns: 1fr;
  }

  .stats-geo-compact {
    grid-template-columns: 1fr 1fr;
  }
}

/* Responsive: Mobile */
@media (max-width:767px) {
  .page-statistics .trade-calendar-control-bar {
    gap: 12px;
    padding: 12px;
    flex-direction: column;
    align-items: stretch;
    border-radius: 12px 12px 0 0;
  }

  .page-statistics .trade-calendar-control-group--nav {
    flex: 0 0 auto;
    order: -1;
  }

  .page-statistics .trade-calendar-control-group--temporal,
  .page-statistics .trade-calendar-control-group--relation {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .stats-summary-bar {
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    border-radius: 0 0 12px 12px;
    min-height: auto;
    padding: 10px 12px;
  }

  .page-statistics .stats-content {
    min-height: 300px;
  }

  .page-statistics .stats-block {
    min-height: 150px;
  }

  .stats-geo-compact {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .stats-activity-compact {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 10px;
  }

  .stats-activity-legend-compact {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
  }

  .stats-legend-row {
    flex: 0 0 auto;
  }

  .stats-insight {
    min-width: 100%;
  }
}

/* ============================================
   POST-EVENT PERFORMANCE INSIGHTS
   ============================================ */

.post-event-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 2px solid #e2e8f0;
}

.post-event-header {
  margin-bottom: 16px;
}

.post-event-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 4px;
}

.post-event-subtitle {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

/* Post-Event KPI Cards */
.post-event-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
  min-height: 80px;
}

.post-event-kpi-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  min-height: 68px;
}

.post-event-kpi-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--blue);
  min-width: 2ch;
  text-align: center;
}

.post-event-kpi-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .3px;
  margin-top: 4px;
  text-align: center;
}

.post-event-kpi-count .post-event-kpi-value {
  color: var(--ink);
}

/* Post-Event Rankings */
.post-event-rankings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.post-event-block {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px;
}

.post-event-block-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 4px;
}

.post-event-block-hint {
  font-size: 11px;
  color: var(--gray);
  margin: 0 0 10px;
}

.post-event-fair-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.post-event-fair-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  background: #f8fafc;
  border-radius: 6px;
  gap: 10px;
}

.post-event-fair-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.post-event-fair-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post-event-fair-meta {
  font-size: 11px;
  color: var(--muted);
}

.post-event-rating-badge {
  flex-shrink: 0;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
}

.post-event-rating-badge.rating-high {
  background: #dcfce7;
  color: #166534;
}

.post-event-rating-badge.rating-mid {
  background: #fef9c3;
  color: #854d0e;
}

.post-event-rating-badge.rating-low {
  background: #fee2e2;
  color: #991b1b;
}

.post-event-empty {
  font-size: 12px;
  color: var(--gray);
  font-style: italic;
  padding: 8px 0;
}

/* Post-Event Actions */
.post-event-actions {
  margin-top: 16px;
  text-align: center;
}

.post-event-view-all-btn {
  padding: 10px 24px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.post-event-view-all-btn:hover {
  background: var(--accent);
}

/* Post-Event All Evaluations Table */
.post-event-all-evaluations {
  margin-top: 20px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
}

.post-event-table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.post-event-table-header .post-event-block-title {
  margin: 0;
}

.post-event-close-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: #e2e8f0;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s ease;
}

.post-event-close-btn:hover {
  background: #cbd5e1;
}

/* Post-Event Notes Preview (in table) */
.post-event-notes-preview {
  display: block;
  max-width: 150px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: help;
}

.post-event-notes-preview:hover {
  color: var(--ink);
}

/* Post-Event Note Indicator (on Best/Worst cards) */
.post-event-note-indicator {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 5px;
  background: var(--blue);
  color: #fff;
  font-size: 9px;
  font-weight: 600;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: .3px;
  cursor: help;
  vertical-align: middle;
}

/* Post-Event Year Badge */
.post-event-year-badge {
  display: inline-block;
  padding: 2px 8px;
  background: var(--blue);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  border-radius: 4px;
  margin-left: 8px;
  vertical-align: middle;
}

/* Post-Event Modal Overlay */
.post-event-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.post-event-modal-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

.post-event-modal-content {
  background: #fff;
  border-radius: 12px;
  width: 90%;
  max-width: 900px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: translateY(20px);
  transition: transform 0.2s ease;
}

.post-event-modal-overlay.is-visible .post-event-modal-content {
  transform: translateY(0);
}

.post-event-modal-content .post-event-table-header {
  border-radius: 12px 12px 0 0;
  flex-shrink: 0;
}

/* Post-Event Responsive */
@media (max-width:767px) {
  .post-event-kpis {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .post-event-kpi-card {
    padding: 10px 12px;
    min-height: 60px;
  }

  .post-event-kpi-value {
    font-size: 18px;
  }

  .post-event-rankings {
    grid-template-columns: 1fr;
  }

  .post-event-modal-content {
    width: 95%;
    max-height: 85vh;
  }
}

/* ========================================
   REVIEWS & RATINGS SECTION
   Isolated styles for the Reviews & Ratings page
   ======================================== */

.reviews-ratings-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.reviews-ratings-section .panel-head h1 {
  font-size: 28px;
  margin: 0;
}

/* Reviews & Ratings KPI Cards */
.rr-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 16px 0;
}

.rr-kpi-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 16px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  min-height: 76px;
  text-align: center;
}

.rr-kpi-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--blue);
  line-height: 1.2;
}

.rr-kpi-value--text {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rr-kpi-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-top: 6px;
}

.rr-kpi-card--last-event .rr-kpi-value {
  color: var(--ink);
}

/* Reviews & Ratings Main Content Layout */
.rr-main-content {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  align-items: start;
}

/* Reviews Table Area */
.rr-table-area {
  min-width: 0;
}

.rr-table-wrap {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 480px;
  min-height: 200px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.rr-table-wrap::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.rr-table-wrap::-webkit-scrollbar-track {
  background: transparent;
}

.rr-table-wrap::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

.rr-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}

.rr-table th,
.rr-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.rr-table th {
  background: #f1f5f9;
  font-weight: 700;
  font-size: 12px;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: .3px;
  position: sticky;
  top: 0;
  z-index: 2;
}

.rr-table td {
  font-size: 14px;
  color: #334155;
}

.rr-table tbody tr:hover {
  background: #f8fafc;
}

.rr-table td:first-child {
  font-weight: 600;
  color: #0f172a;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rr-table td:nth-child(5) {
  font-weight: 700;
  color: var(--blue);
}

/* Rating Score Badge */
.rr-score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
}

.rr-score-badge.score-high {
  background: #dcfce7;
  color: #166534;
}

.rr-score-badge.score-mid {
  background: #fef9c3;
  color: #854d0e;
}

.rr-score-badge.score-low {
  background: #fee2e2;
  color: #991b1b;
}

/* Review Status Badge */
.rr-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .2px;
}

.rr-status-badge.status-reviewed {
  background: #dcfce7;
  color: #166534;
}

.rr-status-badge.status-pending {
  background: #e2e8f0;
  color: #334155;
}

/* Action Buttons */
.rr-action-btn {
  padding: 6px 10px;
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all .15s ease;
}

.rr-action-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.rr-action-btn--delete {
  color: #dc2626;
  border-color: #fecaca;
}

.rr-action-btn--delete:hover {
  background: #fef2f2;
  border-color: #fca5a5;
}

/* Empty State */
.rr-empty-state {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
}

.rr-empty-state p {
  margin: 0;
}

/* Reviews & Ratings Sidebar Form */
.rr-sidebar {
  position: sticky;
  top: 20px;
}

.rr-form-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, .06);
}

.rr-form-title {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 4px;
}

.rr-form-subtitle {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 16px;
}

.rr-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rr-form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rr-form-field label {
  font-size: 12px;
  font-weight: 700;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: .3px;
}

.rr-form-field input,
.rr-form-field select,
.rr-form-field textarea {
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  color: #0f172a;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
  width: 100%;
  max-width: 100%;
}

.rr-form-field input:focus,
.rr-form-field select:focus,
.rr-form-field textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.rr-form-field input::placeholder,
.rr-form-field textarea::placeholder {
  color: #9ca3af;
}

.rr-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.rr-form-section-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  margin: 24px 0 12px;
  /* Increased top margin for section breathing room */
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
}

.trade-fair-evaluation-body hr {
  margin: 32px 0 24px !important;
  opacity: 0.3;
}

.trade-fair-evaluation-field.full-width {
  width: 100%;
  margin-top: 16px;
}

/* Reports & Downloads Styles */
.reports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 16px;
}

.report-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all 0.2s ease;
  height: 100%;
}

.report-card:hover {
  border-color: #2563eb;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
  transform: translateY(-2px);
}

.report-card-icon {
  width: 44px;
  height: 44px;
  background: #eff6ff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2563eb;
}

.report-card-info h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.report-card-info p {
  margin: 8px 0 0;
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
}

.report-download-btn {
  margin-top: auto;
  width: 100%;
  justify-content: center;
}

/* Trade Fair Evaluation Grid */
.trade-fair-evaluation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 16px 32px;
  margin-bottom: 24px;
}

.trade-fair-evaluation-body .trade-fair-evaluation-field.rr-form-field--rating {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 0px;
}

.trade-fair-evaluation-value-set {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
}

.trade-fair-evaluation-value-pill {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
  flex-shrink: 0;
}

.trade-fair-evaluation-value-pill:hover {
  border-color: #3b82f6;
  color: #3b82f6;
  background: #eff6ff;
  transform: translateY(-1px);
}

.trade-fair-evaluation-value-pill.is-active {
  background: #0f172a;
  /* Dark theme to match overall value button in screenshot */
  color: white;
  border-color: #0f172a;
  box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.2);
}

@media (max-width: 991px) {
  .trade-fair-evaluation-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .trade-fair-evaluation-body .trade-fair-evaluation-field.rr-form-field--rating {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

.rr-form-field--rating {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.rr-form-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rr-rating-label {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
}

.rr-rating-stars {
  display: flex;
  flex-direction: row-reverse;
  gap: 4px;
  position: relative;
}

.rr-rating-stars input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  left: -9999px;
}

.rr-rating-stars label {
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
}

.rr-rating-stars label::before {
  content: "★";
}

.rr-rating-stars input:checked~label,
.rr-rating-stars label:hover,
.rr-rating-stars label:hover~label {
  color: #f59e0b;
}

.rr-submit-btn {
  margin-top: 8px;
  width: 100%;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 700;
}

/* Mobile Cards View */
.rr-cards {
  display: none;
  flex-direction: column;
  gap: 12px;
}

.rr-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.rr-card-title {
  font-weight: 700;
  font-size: 15px;
  color: #0f172a;
}

.rr-card-location {
  font-size: 13px;
  color: #64748b;
}

.rr-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: #64748b;
}

.rr-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

/* Reviews & Ratings Responsive */
@media (max-width:1023px) {
  .rr-main-content {
    grid-template-columns: 1fr;
  }

  .rr-sidebar {
    position: static;
    order: 2;
  }

  .rr-table-area {
    order: 1;
  }
}

@media (max-width:767px) {
  .rr-kpis {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .rr-kpi-card {
    padding: 12px;
    min-height: 68px;
  }

  .rr-kpi-value {
    font-size: 20px;
  }

  .rr-table-wrap {
    display: none;
  }

  .rr-cards {
    display: flex;
  }

  .rr-form-row {
    grid-template-columns: 1fr;
  }

  .reviews-ratings-section .trade-fairs-field {
    min-width: 0;
    flex: 1 1 calc(50% - 6px);
  }

  .reviews-ratings-section .trade-fairs-field--search {
    flex: 1 1 100%;
    max-width: 100%;
  }
}

@media (max-width:479px) {
  .rr-kpis {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .rr-kpi-card {
    padding: 10px;
    min-height: 60px;
  }

  .rr-kpi-value {
    font-size: 18px;
  }

  .rr-kpi-label {
    font-size: 10px;
  }

  .rr-card {
    padding: 12px;
  }

  .rr-card-header {
    flex-direction: column;
    gap: 8px;
  }

  .rr-card-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

/* Page-specific styles for Reviews & Ratings */
.page-reviews-ratings .reviews-ratings-section {
  display: flex;
}

/* Add Trade Fair page */
.page-add-trade-fair .panel {
  width: 100%;
}

.page-add-trade-fair main.wrap {
  width: min(1200px, 100%);
}

.add-fair-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.add-fair-step-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.add-fair-step-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.add-fair-step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 28px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #0f172a;
  font-weight: 600;
  font-size: 13px;
}

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

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

.add-fair-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.add-fair-field input,
.add-fair-field select,
.add-fair-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #ffffff;
  color: var(--ink);
  font-size: 14px;
  font-family: inherit;
}

.add-fair-field input:focus,
.add-fair-field select:focus,
.add-fair-field textarea:focus {
  outline: 2px solid rgba(37, 99, 235, 0.2);
  outline-offset: 1px;
  border-color: #93c5fd;
}

.add-fair-field--wide {
  grid-column: 1 / -1;
}

.add-fair-alert {
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #7f1d1d;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
}

.add-fair-multi {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
}

.add-fair-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink);
}

.add-fair-map {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 18px;
}

.add-fair-map-preview {
  position: relative;
  min-height: 220px;
  border-radius: 14px;
  border: 1px solid var(--line);
  overflow: hidden;
  background: #f8fafc;
}

.add-fair-map-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.add-fair-map-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
}

.add-fair-map-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.add-fair-map-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.add-fair-states {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.add-fair-state {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--ink);
}

.add-fair-actions-panel .add-fair-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.trade-fairs-user-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 6px;
  font-size: 12px;
}

.trade-fairs-user-action {
  border: none;
  background: none;
  padding: 0;
  color: var(--blue);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}

.trade-fairs-user-remove {
  color: #b91c1c;
}

@media (max-width: 980px) {

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

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

  .add-fair-map {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1023px) {
  .page-add-trade-fair main.wrap {
    max-width: 100%;
    width: 100%;
  }
}

@media (max-width: 720px) {

  .add-fair-grid,
  .add-fair-grid--two {
    grid-template-columns: 1fr;
  }

  .add-fair-multi {
    grid-template-columns: 1fr;
  }

  .add-fair-actions-panel .add-fair-actions {
    justify-content: stretch;
  }

  .add-fair-actions-panel .add-fair-actions .btn {
    width: 100%;
  }
}

/* Reports & Downloads */
.page-reports .reports-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
}



.reports-tabs {
  display: flex;
  width: 100%;
}

.page-reports .trade-calendar-legend-item {
  cursor: pointer;
}

.reports-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.reports-block-title {
  margin: 0;
  font-size: 18px;
}

.reports-grid {
  display: grid;
  gap: 12px;
}

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

.reports-grid--triple {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.reports-card {
  text-align: left;
  cursor: pointer;
  width: 100%;
  font: inherit;
  color: inherit;
}

.reports-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.reports-card-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.reports-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.reports-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 16px;
  align-items: start;
}

.reports-help {
  align-self: start;
}

.reports-help-link {
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
}

.reports-formats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  flex-direction: row;
}

.reports-formats-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
  color: var(--muted);
}

@media (max-width: 1023px) {

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

  .reports-split {
    grid-template-columns: 1fr;
  }

  .reports-help {
    display: none;
  }
}

@media (max-width: 767px) {

  .reports-grid--quad,
  .reports-grid--triple {
    grid-template-columns: 1fr;
  }
}

/* --- Trade Fair Contacts & Follow-up Section --- */

.trade-fair-contacts .contacts-body,
.trade-fair-organizers .contacts-body {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}


.contacts-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.contact-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow 0.15s ease;
}

.contact-card:hover {
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

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

.contact-name {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}

.contact-sub {
  font-size: 13px;
  color: #64748b;
  margin-top: 2px;
}

.contact-card-actions {
  display: flex;
  gap: 6px;
}

.btn-icon {
  background: transparent;
  border: 1px solid transparent;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 16px;
  line-height: 1;
}

.btn-icon:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #e2e8f0;
}

.btn-icon-danger:hover {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}

.contact-meta-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.contact-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.type-badge {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.interest-badge {
  border: 1px solid transparent;
}

.interest-low {
  background: #f1f5f9;
  color: #64748b;
}

.interest-medium {
  background: #fff7ed;
  color: #9a3412;
  border-color: #fed7aa;
}

.interest-high {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.status-badge {
  border: 1px solid transparent;
}

.status-pending {
  background: #f8fafc;
  color: #64748b;
  border-color: #e2e8f0;
  border-style: dashed;
}

.status-contacted {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.status-closed {
  background: #f0fdf4;
  color: #15803d;
  border-color: #bbf7d0;
}

.contact-communication-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px 0;
  border-top: 1px solid #f1f5f9;
  border-bottom: 1px solid #f1f5f9;
}

.contact-detail-link {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  color: var(--blue);
  text-decoration: none;
  transition: opacity 0.15s;
}

.contact-detail-link:hover {
  text-decoration: underline;
  opacity: 0.8;
}

.contact-notes {
  margin-top: 4px;
  background: #f8fafc;
  padding: 10px;
  border-radius: 8px;
  font-size: 13px;
  color: #475569;
  line-height: 1.5;
  white-space: pre-wrap;
}

/* Form */
.contacts-form-container {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  margin-top: 10px;
}

.contact-form-title {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

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

.contact-form-grid .full-width {
  grid-column: 1 / -1;
}

.contact-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}

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

.supplier-summary-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.supplier-summary-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.supplier-summary-value {
  font-size: 28px;
  line-height: 1;
  color: #0f172a;
}

.supplier-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.supplier-toolbar__search,
.supplier-toolbar__select {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #dbe2ea;
  border-radius: 12px;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
}

.supplier-toolbar__search:focus,
.supplier-toolbar__select:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.supplier-workspace {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(0, 1.45fr);
  gap: 18px;
  margin-top: 18px;
  align-items: start;
}

.supplier-workspace__master,
.supplier-workspace__detail {
  min-width: 0;
}

.supplier-master-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.supplier-master-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 15px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #ffffff;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.supplier-master-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}

.supplier-master-card.is-active {
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.supplier-master-card__header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.supplier-master-card__title {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
}

.supplier-master-card__meta,
.supplier-master-card__foot {
  font-size: 13px;
  color: #64748b;
  line-height: 1.45;
}

.supplier-master-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.supplier-detail-container {
  min-height: 100%;
}

.supplier-detail-empty,
.supplier-detail-card {
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #ffffff;
  padding: 18px;
}

.supplier-detail-empty {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #64748b;
}

.supplier-detail-empty h3,
.supplier-detail-card h3,
.supplier-detail-panel h4 {
  margin: 0;
  color: #0f172a;
}

.supplier-detail-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.supplier-detail-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.supplier-detail-card__subtitle {
  margin: 6px 0 0;
  font-size: 14px;
  color: #64748b;
}

.supplier-detail-card__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.supplier-detail-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.supplier-detail-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
}

.supplier-detail-kv {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 0;
}

.supplier-detail-kv div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.supplier-detail-kv dt {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.supplier-detail-kv dd {
  margin: 0;
  font-size: 14px;
  color: #0f172a;
  line-height: 1.45;
  word-break: break-word;
}

.supplier-detail-kv a {
  color: var(--blue);
  text-decoration: none;
}

.supplier-detail-kv a:hover {
  text-decoration: underline;
}

.supplier-detail-attachments {
  margin-top: 4px;
  border-top: 1px solid #e2e8f0;
  padding-top: 14px;
}

.supplier-detail-attachments summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.supplier-attachments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.supplier-form-shell {
  margin-top: 0;
}

.status-to_contact,
.status-quote_requested {
  background: #f8fafc;
  color: #64748b;
  border-color: #e2e8f0;
  border-style: dashed;
}

.status-quote_received,
.status-under_review {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.status-approved,
.status-confirmed {
  background: #f0fdf4;
  color: #15803d;
  border-color: #bbf7d0;
}

.status-rejected {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

@media (max-width: 768px) {
  .supplier-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .supplier-toolbar {
    grid-template-columns: 1fr;
  }

  .supplier-workspace {
    grid-template-columns: 1fr;
  }

  .supplier-detail-grid {
    grid-template-columns: 1fr;
  }

  .supplier-detail-card__header {
    flex-direction: column;
    align-items: stretch;
  }

  .contacts-list-grid {
    grid-template-columns: 1fr;
  }

  .contact-form-grid {
    grid-template-columns: 1fr;
  }
}


/* --- Stand & Operational Checklist Section --- */

.trade-fair-checklist {
  margin-top: 24px;
}

.checklist-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.checklist-header h2 {
  font-size: 20px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.checklist-overall-progress {
  font-size: 14px;
  color: #64748b;
  font-weight: 500;
  background: #f1f5f9;
  padding: 4px 10px;
  border-radius: 999px;
}

.checklist-categories {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checklist-category {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.checklist-category-header {
  padding: 12px 16px;
  background: #f8fafc;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  font-weight: 600;
  color: #334155;
  transition: background-color 0.15s;
}

.checklist-category-header:hover {
  background: #f1f5f9;
}

.checklist-category-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checklist-category-stats {
  font-size: 13px;
  color: #64748b;
  font-weight: normal;
}

.checklist-items {
  border-top: 1px solid #e2e8f0;
  display: none;
  /* Collapsed by default */
  animation: slideDown 0.2s ease-out;
}

.checklist-category.is-expanded .checklist-items {
  display: block;
}

.checklist-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  /* Checkbox, Label, Notes Icon */
  gap: 12px;
  padding: 10px 16px;
  align-items: start;
  border-bottom: 1px solid #f1f5f9;
  transition: background-color 0.1s;
}

.checklist-item:last-child {
  border-bottom: none;
}

.checklist-item:hover {
  background-color: #fafafa;
}

/* Custom Checkbox Logic */
.checklist-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid #cbd5e1;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  background: #fff;
  flex-shrink: 0;
  margin-top: 2px;
}

.checklist-checkbox:hover {
  border-color: #94a3b8;
}

/* Pending: Empty box */

/* Completed: Green check */
.checklist-item.status-completed .checklist-checkbox {
  background-color: #10b981;
  border-color: #10b981;
  color: #fff;
}

.checklist-item.status-completed .checklist-checkbox::after {
  content: '\2713';
  /* Check mark */
  font-size: 14px;
  font-weight: bold;
}

/* Not Applicable: Gray Dash */
.checklist-item.status-not_applicable .checklist-checkbox {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
  color: #94a3b8;
}

.checklist-item.status-not_applicable .checklist-checkbox::after {
  content: '-';
  font-size: 20px;
  line-height: 14px;
  font-weight: bold;
}

.checklist-label {
  font-size: 15px;
  color: #1e293b;
  line-height: 1.5;
  cursor: pointer;
}

.checklist-item.status-completed .checklist-label {
  text-decoration: line-through;
  color: #94a3b8;
}

.checklist-item.status-not_applicable .checklist-label {
  color: #94a3b8;
  font-style: italic;
}

.checklist-notes-area {
  grid-column: 1 / -1;
  margin-top: 8px;
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 8px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 60px;
}

.checklist-item-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.checklist-delete-btn,
.checklist-notes-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #94a3b8;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.checklist-delete-btn:hover {
  color: #dc2626;
  background-color: #fef2f2;
}

.checklist-notes-btn:hover,
.checklist-notes-btn.has-notes {
  color: #3b82f6;
  background-color: #eff6ff;
}


@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Checklist Custom Items Styles --- */
.checklist-add-row {
  padding: 10px 16px;
  border-bottom: 1px solid #f1f5f9;
  background: #fff;
}

.checklist-add-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  padding: 0;
  color: var(--blue);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  opacity: 0.8;
}

.checklist-add-trigger:hover {
  opacity: 1;
  transform: translateX(2px);
}

.checklist-add-trigger svg {
  stroke: currentColor;
}

.checklist-inline-input-wrap {
  padding: 12px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: slideDown 0.2s ease-out;
}

.checklist-inline-input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  font-family: inherit;
  color: #1e293b;
  background: #ffffff;
  transition: border-color 0.2s;
}

.checklist-inline-input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.checklist-inline-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.checklist-inline-save {
  background: var(--blue);
  color: #fff;
  border: none;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.checklist-inline-save:hover {
  background: #1d4ed8;
}

.checklist-inline-cancel {
  background: transparent;
  color: #64748b;
  border: 1px solid #e2e8f0;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.checklist-inline-cancel:hover {
  background: #f1f5f9;
  color: #0f172a;
}


/* --- Collapsible Panels --- */
.trade-fair-panel {
  width: 100%;
  box-sizing: border-box;
}

.collapsible-panel .panel-head {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s ease;
  min-height: 54px;
  /* Uniform height */
  padding: 12px 16px;
  /* Consistent padding */
}


.collapsible-panel .panel-head:hover {
  background-color: #f8fafc;
}

.panel-toggle-btn {
  background: none;
  border: none;
  padding: 4px;
  color: var(--muted);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 12px;
}

.collapsible-panel.is-collapsed .panel-toggle-btn {
  transform: rotate(-90deg);
}

.collapsible-panel .panel-head:hover .panel-toggle-btn {
  color: var(--blue);
}

/* Hide all children except panel-head when collapsed */
.collapsible-panel.is-collapsed>*:not(.panel-head) {
  display: none !important;
}

/* Hide panel-sub when collapsed */
.collapsible-panel.is-collapsed .panel-sub {
  display: none !important;
}

/* Specific adjustments for certain panels */
.collapsible-panel .panel-head h2 {
  margin-bottom: 0;
  display: flex;
  align-items: center;
}

.panel-head-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* --- Documents Section --- */
.trade-fair-documents .documents-body {
  margin-top: 16px;
}

.documents-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.document-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  transition: background-color 0.15s;
}

.document-item:hover {
  background: #f8fafc;
}

.document-icon {
  color: #64748b;
  display: flex;
  align-items: center;
}

.document-info {
  flex: 1;
  min-width: 0;
}

.document-name {
  font-size: 14px;
  font-weight: 500;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.document-meta {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 2px;
}

.document-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}



/* --- Stand Details Section --- */
.trade-fair-stand-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 4px;
  margin-bottom: 20px;
}

.trade-fair-stand .trade-fair-evaluation-actions {
  margin-top: 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.trade-fairs-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}

.trade-fairs-field input,
.trade-fairs-field select,
.trade-fairs-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  background: var(--card);
  /* Ensure background is dynamic */
}

.trade-fairs-field textarea {
  resize: vertical;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .trade-fair-stand-grid {
    grid-template-columns: 1fr;
  }
}




/* Legacy wrap support/override if needed, 
   but ideally pages switch to .app-page */

/* Standard App Container - Enterprise Grade */
.app-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px;
  width: 100%;
}

/* Responsive adjustments for app-page */
@media (max-width: 1024px) {
  .app-page {
    padding: 24px 16px;
  }
}

/* Performance CLS Optimization */
.site-header {
  min-height: 80px;
}

.site-footer {
  min-height: 400px;
}

/* Reports Page */
.reports-formats {
  margin-top: 32px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.reports-formats-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  margin-right: 8px;
}

/* Reviews & Ratings One-Column Mobile Fix */
@media (max-width: 768px) {
  .rr-form-row {
    grid-template-columns: 1fr !important;
  }

  .rr-form-field--rating {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }

  .rr-rating-stars {
    margin-left: 0;
  }

  .rr-submit-grid {
    grid-template-columns: 1fr !important;
  }
}

/* =========================================
   MODERN DASHBOARD SIDEBAR LAYOUT
   ========================================= */

:root {
  --app-sidebar-width: 292px;
  --app-topbar-height: 78px;
  --topbar-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Body Support for fixed sidebar */
@media (min-width: 1024px) {
  body.dashboard-layout {
    padding-left: var(--app-sidebar-width);
    /* Sidebar Width */
    padding-top: var(--app-topbar-height);
    /* Topbar Height */
  }

  body.dashboard-layout #site-header {
    display: contents;
    /* Let sidebar and topbar live in body flow */
  }
}

@media (max-width: 1023px) {
  body.dashboard-layout {
    padding-top: var(--app-topbar-height);
  }
}

/* -----------------------------------------
   SIDEBAR (Desktop Fixed, Mobile Drawer)
   ----------------------------------------- */
.app-sidebar {
  --sidebar-bg: #070b1a;
  --sidebar-bg-2: #0b1020;
  --sidebar-surface: rgba(30, 41, 80, 0.35);
  --sidebar-active-blue: #3b82f6;
  --sidebar-cyan: #22d3ee;
  --sidebar-purple: #8b5cf6;
  --sidebar-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --sidebar-text: #f8fafc;
  --sidebar-text-muted: #cbd5e1;
  --sidebar-icon-muted: #94a3b8;
  position: fixed;
  top: var(--app-topbar-height);
  left: 0;
  bottom: 0;
  width: var(--app-sidebar-width);
  isolation: isolate;
  overflow: hidden;
  background:
    linear-gradient(180deg, var(--sidebar-bg) 0%, var(--sidebar-bg-2) 47%, #050816 100%);
  color: var(--sidebar-text);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(59, 130, 246, 0.28);
  box-shadow:
    inset -1px 0 0 rgba(34, 211, 238, 0.22),
    inset 0 1px 0 rgba(248, 250, 252, 0.08),
    18px 0 48px rgba(7, 11, 26, 0.34);
  transition: transform 0.4s ease-in-out;
  will-change: transform;
}

.app-sidebar::before,
.app-sidebar::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.app-sidebar::before {
  z-index: 0;
  background-image:
    linear-gradient(135deg, transparent 0 61%, rgba(59, 130, 246, 0.18) 61.2% 61.55%, transparent 61.8%),
    linear-gradient(90deg, transparent 0 78%, rgba(34, 211, 238, 0.14) 78.2% 78.55%, transparent 78.8%),
    radial-gradient(circle, rgba(34, 211, 238, 0.18) 0 1px, transparent 1.5px);
  background-position: 18px 10px, -30px 72px, 22px 112px;
  background-size: 250px 190px, 205px 150px, 16px 16px;
  opacity: 0.28;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 8%, #000 88%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 8%, #000 88%, transparent 100%);
}

.app-sidebar::after {
  z-index: 1;
  border: 1px solid rgba(148, 163, 184, 0.05);
  border-left: 0;
  background:
    linear-gradient(90deg, rgba(34, 211, 238, 0.04), transparent 28%),
    linear-gradient(180deg, rgba(139, 92, 246, 0.09), transparent 26%, transparent 72%, rgba(34, 211, 238, 0.08));
  box-shadow:
    inset -12px 0 24px rgba(34, 211, 238, 0.05),
    inset 0 1px 0 rgba(248, 250, 252, 0.06);
}

/* Mobile: Hidden by default */
@media (max-width: 1023px) {
  .app-sidebar {
    transform: translateX(-100%);
    z-index: 1050;
    width: min(var(--app-sidebar-width), 88vw);
  }

  .app-sidebar.is-open {
    transform: translateX(0);
    box-shadow:
      0 0 40px rgba(0, 0, 0, 0.5),
      12px 0 34px rgba(34, 211, 238, 0.1);
  }
}

/* Logo Area Hidden (Moved to Topbar) */
.sidebar-logo {
  display: none;
}

.sidebar-logo span {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-right: 6px;
}

.sidebar-logo-panel {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  min-height: 142px;
  padding: 28px 22px 26px;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(34, 211, 238, 0.16);
  background:
    radial-gradient(circle at 18% 28%, rgba(34, 211, 238, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(8, 14, 34, 0.8), rgba(8, 14, 34, 0.3));
  box-shadow:
    inset 0 -1px 0 rgba(139, 92, 246, 0.12),
    0 12px 28px rgba(7, 11, 26, 0.22);
}

.sidebar-logo-panel::before,
.sidebar-logo-panel::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.sidebar-logo-panel::before {
  left: 22px;
  right: 22px;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.45), rgba(139, 92, 246, 0.34), transparent);
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.22);
}

.sidebar-logo-panel::after {
  right: 24px;
  bottom: 17px;
  width: 22px;
  height: 6px;
  border-top: 2px solid rgba(139, 92, 246, 0.72);
  border-bottom: 2px solid rgba(34, 211, 238, 0.38);
  transform: skewX(-28deg);
  filter: drop-shadow(0 0 6px rgba(139, 92, 246, 0.34));
}

.sidebar-logo-panel img {
  display: block;
  width: 100%;
  max-width: 248px;
  height: auto;
  filter:
    drop-shadow(0 0 10px rgba(34, 211, 238, 0.22))
    drop-shadow(0 0 18px rgba(139, 92, 246, 0.16));
}

/* Scrollable Content */
.sidebar-content {
  flex: 1;
  overflow-y: auto;
  position: relative;
  z-index: 2;
  padding: 26px 18px 88px;
  scrollbar-width: thin;
  scrollbar-color: rgba(34, 211, 238, 0.18) transparent;
}

.sidebar-content::-webkit-scrollbar {
  width: 5px;
}

.sidebar-content::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.22), rgba(139, 92, 246, 0.18));
  border-radius: 4px;
}

/* Menu Sections */
.sidebar-section {
  margin-bottom: 30px;
}

.sidebar-section-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: Inter, Montserrat, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 800;
  color: #8bdcff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
  margin-bottom: 15px;
  padding: 0 8px;
  text-shadow: 0 0 12px rgba(34, 211, 238, 0.28);
}

.sidebar-section-title::before,
.sidebar-section-title::after {
  content: "";
  height: 1px;
  background: linear-gradient(90deg, rgba(34, 211, 238, 0), rgba(34, 211, 238, 0.72), rgba(139, 92, 246, 0.28));
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.35);
}

.sidebar-section-title::before {
  width: 18px;
  flex: 0 0 18px;
}

.sidebar-section-title::after {
  flex: 1;
  min-width: 18px;
}

.sidebar-nav {
  display: grid;
  gap: 6px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 46px;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: #b8c3d8;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  will-change: transform, background, border-color, box-shadow;
  transition:
    background 220ms var(--sidebar-ease),
    background-position 260ms var(--sidebar-ease),
    border-color 220ms var(--sidebar-ease),
    box-shadow 220ms var(--sidebar-ease),
    color 180ms var(--sidebar-ease),
    transform 220ms var(--sidebar-ease);
}

.sidebar-link:not(.sidebar-toggle-btn) {
  padding-right: 25px;
}

.sidebar-link::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, transparent 0%, rgba(34, 211, 238, 0.94) 18%, rgba(96, 165, 250, 0.82) 54%, rgba(139, 92, 246, 0.7) 86%, transparent 100%);
  box-shadow:
    0 0 8px rgba(34, 211, 238, 0.32),
    0 0 14px rgba(59, 130, 246, 0.12);
  opacity: 0;
  z-index: 2;
  pointer-events: none;
  transition: opacity 220ms var(--sidebar-ease), box-shadow 220ms var(--sidebar-ease);
}

.sidebar-link:not(.sidebar-toggle-btn)::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  opacity: 0;
  transform: translateY(-50%) rotate(45deg);
  z-index: 1;
  pointer-events: none;
  transition: opacity 220ms var(--sidebar-ease), right 220ms var(--sidebar-ease);
}

.sidebar-link:hover,
.sidebar-link:focus-visible {
  background:
    linear-gradient(90deg, rgba(30, 41, 80, 0.34), rgba(49, 46, 129, 0.18));
  border-color: rgba(34, 211, 238, 0.22);
  color: #edf6ff;
  box-shadow:
    0 0 12px rgba(34, 211, 238, 0.07),
    0 0 20px rgba(139, 92, 246, 0.04),
    inset 0 1px 0 rgba(125, 211, 252, 0.06);
  transform: translateX(2px);
}

.sidebar-link:focus-visible {
  outline: 2px solid rgba(125, 211, 252, 0.92);
  outline-offset: 3px;
  box-shadow:
    0 0 0 4px rgba(34, 211, 238, 0.13),
    0 0 18px rgba(34, 211, 238, 0.18),
    inset 0 0 18px rgba(59, 130, 246, 0.08);
}

.sidebar-link:hover::before,
.sidebar-link:focus-visible::before {
  opacity: 0.42;
  box-shadow:
    0 0 10px rgba(34, 211, 238, 0.38),
    0 0 16px rgba(139, 92, 246, 0.12);
}

.sidebar-link:hover:not(.sidebar-toggle-btn)::after,
.sidebar-link:focus-visible:not(.sidebar-toggle-btn)::after {
  right: 8px;
  opacity: 0.52;
}

.sidebar-link.active {
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.055), transparent 36%),
    radial-gradient(circle at 18% 18%, rgba(34, 211, 238, 0.055), transparent 34%),
    linear-gradient(104deg, rgba(14, 25, 54, 0.92), rgba(27, 37, 85, 0.66) 48%, rgba(35, 24, 76, 0.72));
  background-size: 100% 100%, 100% 100%, 145% 100%;
  background-position: 0 0, 0 0, 0% 50%;
  border-color: rgba(89, 130, 226, 0.42);
  border-radius: 7px;
  color: var(--sidebar-text);
  font-weight: 800;
  text-shadow: 0 0 10px rgba(248, 250, 252, 0.12);
  box-shadow:
    0 0 0 1px rgba(139, 92, 246, 0.1),
    0 10px 24px rgba(5, 8, 22, 0.22),
    0 0 16px rgba(34, 211, 238, 0.08),
    inset 0 1px 0 rgba(190, 232, 255, 0.18),
    inset 0 -1px 0 rgba(139, 92, 246, 0.18),
    inset 0 0 18px rgba(15, 23, 42, 0.2);
  animation: sidebar-active-breathe 5.5s ease-in-out infinite;
}

.sidebar-link.active:hover,
.sidebar-link.active:focus-visible {
  border-color: rgba(125, 211, 252, 0.5);
  color: #ffffff;
  box-shadow:
    0 0 0 1px rgba(139, 92, 246, 0.14),
    0 12px 26px rgba(5, 8, 22, 0.24),
    0 0 18px rgba(34, 211, 238, 0.11),
    inset 0 1px 0 rgba(190, 232, 255, 0.22),
    inset 0 -1px 0 rgba(139, 92, 246, 0.22),
    inset 0 0 18px rgba(15, 23, 42, 0.16);
  transform: translateX(2px);
}

.sidebar-icon {
  width: 22px;
  height: 22px;
  min-width: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--sidebar-icon-muted);
  opacity: 0.84;
  filter: none;
  position: relative;
  z-index: 2;
  transition: color 180ms var(--sidebar-ease), opacity 180ms var(--sidebar-ease), filter 220ms var(--sidebar-ease);
}

.sidebar-icon svg {
  width: 21px;
  height: 21px;
  display: block;
  stroke-width: 2;
}

.sidebar-icon svg * {
  vector-effect: non-scaling-stroke;
}

.sidebar-link:hover .sidebar-icon,
.sidebar-link:focus-visible .sidebar-icon {
  color: #67e8f9;
  opacity: 1;
  filter:
    drop-shadow(0 0 7px rgba(34, 211, 238, 0.32))
    drop-shadow(0 0 12px rgba(139, 92, 246, 0.12));
}

.sidebar-link.active .sidebar-icon {
  color: #a5f3fc;
  opacity: 1;
  filter:
    drop-shadow(0 0 8px rgba(34, 211, 238, 0.42))
    drop-shadow(0 0 14px rgba(139, 92, 246, 0.16));
}

.sidebar-link.active::before {
  opacity: 1;
  box-shadow:
    0 0 10px rgba(34, 211, 238, 0.44),
    0 0 18px rgba(59, 130, 246, 0.18);
  animation: sidebar-left-edge-pulse 5.4s ease-in-out infinite;
}

.sidebar-link.active:not(.sidebar-toggle-btn)::after {
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  width: auto;
  height: auto;
  border: 0;
  border-radius: inherit;
  background:
    linear-gradient(90deg, transparent 0%, rgba(34, 211, 238, 0) 18%, rgba(103, 232, 249, 0.68) 28%, rgba(96, 165, 250, 0.4) 42%, transparent 58%) top left / 230% 1px no-repeat,
    linear-gradient(90deg, transparent 0%, rgba(139, 92, 246, 0) 42%, rgba(139, 92, 246, 0.56) 62%, rgba(34, 211, 238, 0.36) 76%, transparent 100%) bottom left / 230% 1px no-repeat,
    linear-gradient(90deg, rgba(34, 211, 238, 0.32), rgba(96, 165, 250, 0.12) 46%, rgba(139, 92, 246, 0.24)) top left / 100% 1px no-repeat,
    linear-gradient(90deg, rgba(34, 211, 238, 0.18), rgba(96, 165, 250, 0.1) 46%, rgba(139, 92, 246, 0.3)) bottom left / 100% 1px no-repeat,
    linear-gradient(180deg, rgba(34, 211, 238, 0.42), transparent 30%, transparent 70%, rgba(139, 92, 246, 0.42)) right top / 1px 100% no-repeat,
    linear-gradient(100deg, transparent 8%, rgba(248, 250, 252, 0.035) 25%, transparent 43%) left top / 180% 100% no-repeat;
  opacity: 0.86;
  pointer-events: none;
  transform: none;
  filter:
    drop-shadow(0 0 6px rgba(34, 211, 238, 0.22))
    drop-shadow(0 0 10px rgba(139, 92, 246, 0.12));
  z-index: 1;
  animation: sidebar-edge-energy 5.8s var(--sidebar-ease) infinite;
}

@keyframes sidebar-active-breathe {
  0%,
  100% {
    background-position: 0 0, 0 0, 0% 50%;
    border-color: rgba(89, 130, 226, 0.42);
    box-shadow:
      0 0 0 1px rgba(139, 92, 246, 0.1),
      0 10px 24px rgba(5, 8, 22, 0.22),
      0 0 16px rgba(34, 211, 238, 0.08),
      inset 0 1px 0 rgba(190, 232, 255, 0.18),
      inset 0 -1px 0 rgba(139, 92, 246, 0.18),
      inset 0 0 18px rgba(15, 23, 42, 0.2);
  }
  50% {
    background-position: 0 0, 0 0, 100% 50%;
    border-color: rgba(125, 211, 252, 0.48);
    box-shadow:
      0 0 0 1px rgba(34, 211, 238, 0.12),
      0 11px 25px rgba(5, 8, 22, 0.24),
      0 0 18px rgba(34, 211, 238, 0.1),
      inset 0 1px 0 rgba(190, 232, 255, 0.24),
      inset 0 -1px 0 rgba(139, 92, 246, 0.22),
      inset 0 0 18px rgba(15, 23, 42, 0.16);
  }
}

@keyframes sidebar-edge-energy {
  0%,
  100% {
    background-position:
      -140% 0,
      132% 100%,
      0 0,
      0 100%,
      100% 0,
      -90% 0;
    opacity: 0.66;
  }
  42% {
    background-position:
      112% 0,
      -74% 100%,
      0 0,
      0 100%,
      100% 0,
      54% 0;
    opacity: 0.88;
  }
  68% {
    background-position:
      158% 0,
      -132% 100%,
      0 0,
      0 100%,
      100% 0,
      132% 0;
    opacity: 0.72;
  }
}

@keyframes sidebar-left-edge-pulse {
  0%,
  100% {
    box-shadow:
      0 0 8px rgba(34, 211, 238, 0.42),
      0 0 14px rgba(59, 130, 246, 0.16);
  }
  50% {
    box-shadow:
      0 0 12px rgba(34, 211, 238, 0.62),
      0 0 20px rgba(139, 92, 246, 0.2);
  }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar-link,
  .sidebar-link::before,
  .sidebar-link::after,
  .sidebar-icon,
  .sidebar-chevron,
  .sidebar-sublink {
    transition-duration: 1ms;
    animation: none;
  }

  .sidebar-link:hover,
  .sidebar-link:focus-visible,
  .sidebar-sublink:hover,
  .sidebar-sublink:focus-visible {
    transform: none;
  }

  .sidebar-link.active {
    animation: none;
  }

  .sidebar-link.active::before {
    animation: none;
  }

  .sidebar-link.active:not(.sidebar-toggle-btn)::after {
    animation: none;
    opacity: 0.5;
  }
}

/* Submenu Styles */
.sidebar-toggle-btn {
  width: 100%;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between !important;
  font: inherit;
}

.sidebar-label {
  flex: 1;
  min-width: 0;
  line-height: 1.25;
  white-space: nowrap;
  position: relative;
  z-index: 2;
}

.sidebar-chevron {
  transition: transform 260ms var(--sidebar-ease), color 180ms var(--sidebar-ease), opacity 180ms var(--sidebar-ease), filter 220ms var(--sidebar-ease);
  opacity: 0.56;
  display: flex;
  align-items: center;
  color: var(--sidebar-icon-muted);
  position: relative;
  z-index: 2;
}

.sidebar-link:hover .sidebar-chevron,
.sidebar-link:focus-visible .sidebar-chevron {
  color: var(--sidebar-cyan);
  opacity: 0.95;
  filter: drop-shadow(0 0 8px rgba(34, 211, 238, 0.34));
}

.sidebar-item-group.is-open .sidebar-chevron {
  transform: rotate(180deg);
}

.sidebar-submenu {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, margin 0.3s ease;
  opacity: 0;
  overflow: hidden;
  padding-left: 18px;
  /* Indent sub-items */
  margin-top: 0;
  margin-bottom: 0;
  border-left: 1px solid rgba(34, 211, 238, 0.16);
}

.sidebar-submenu-inner {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-item-group.is-open .sidebar-submenu {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 6px;
  margin-bottom: 12px;
}

.sidebar-sublink {
  display: block;
  padding: 8px 12px 8px 26px;
  border-radius: 6px;
  color: #a8b3c7;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition:
    background 220ms var(--sidebar-ease),
    border-color 220ms var(--sidebar-ease),
    color 180ms var(--sidebar-ease),
    transform 220ms var(--sidebar-ease),
    box-shadow 220ms var(--sidebar-ease);
  position: relative;
  border: 1px solid transparent;
}

.sidebar-sublink:before {
  content: '';
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--sidebar-cyan);
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.38);
  opacity: 0.36;
}

.sidebar-sublink:hover,
.sidebar-sublink:focus-visible {
  background: rgba(30, 41, 80, 0.36);
  border-color: rgba(139, 92, 246, 0.26);
  color: var(--sidebar-text);
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.08);
  transform: translateX(1px);
  outline: none;
}

.sidebar-sublink:focus-visible {
  outline: 2px solid rgba(125, 211, 252, 0.82);
  outline-offset: 2px;
}

.sidebar-sublink.active {
  color: var(--sidebar-text);
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(34, 211, 238, 0.36);
  font-weight: 800;
}

.sidebar-link[aria-disabled="true"],
.sidebar-link.is-disabled,
.sidebar-link.disabled,
.sidebar-sublink[aria-disabled="true"],
.sidebar-sublink.is-disabled,
.sidebar-sublink.disabled {
  color: rgba(148, 163, 184, 0.48);
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
  text-shadow: none;
  animation: none;
}

.sidebar-link[aria-disabled="true"] .sidebar-icon,
.sidebar-link.is-disabled .sidebar-icon,
.sidebar-link.disabled .sidebar-icon {
  color: rgba(148, 163, 184, 0.44);
  opacity: 0.54;
  filter: none;
}

.sidebar-link[aria-disabled="true"]::before,
.sidebar-link[aria-disabled="true"]::after,
.sidebar-link.is-disabled::before,
.sidebar-link.is-disabled::after,
.sidebar-link.disabled::before,
.sidebar-link.disabled::after,
.sidebar-sublink[aria-disabled="true"]::before,
.sidebar-sublink.is-disabled::before,
.sidebar-sublink.disabled::before {
  opacity: 0;
  animation: none;
}


/* -----------------------------------------
   TOPBAR (Fixed Top)
   ----------------------------------------- */
.app-topbar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  height: var(--app-topbar-height);
  isolation: isolate;
  overflow: visible;
  background:
    radial-gradient(circle at 12% 15%, rgba(59, 130, 246, 0.16), transparent 32%),
    radial-gradient(circle at 92% 30%, rgba(139, 92, 246, 0.11), transparent 28%),
    linear-gradient(90deg, #070b1a 0%, #090f22 42%, #0b1020 100%);
  border-bottom: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(22px, 3vw, 46px) 0 clamp(26px, 3.5vw, 58px);
  gap: 18px;
  box-shadow:
    0 14px 34px rgba(7, 11, 26, 0.22),
    inset 0 1px 0 rgba(248, 250, 252, 0.04);
}

.app-topbar::before,
.app-topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
}

.app-topbar::before {
  bottom: -9px;
  height: 9px;
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.2), rgba(59, 130, 246, 0.18), rgba(139, 92, 246, 0.18));
  filter: blur(10px);
  opacity: 0.55;
}

.app-topbar::after {
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.84), rgba(59, 130, 246, 0.58) 48%, rgba(139, 92, 246, 0.78));
  box-shadow:
    0 0 10px rgba(34, 211, 238, 0.26),
    0 0 14px rgba(139, 92, 246, 0.18);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1 1 auto;
  height: 100%;
  min-width: 0;
}

@media (min-width: 1024px) {
  .app-topbar {
    padding-left: 0;
  }

  .app-topbar .topbar-left {
    flex: 0 0 var(--app-sidebar-width);
    width: var(--app-sidebar-width);
  }

  .app-topbar .topbar-brand-link {
    width: 100%;
    justify-content: center;
    padding: 0 22px;
  }

  .app-topbar .topbar-brand-logo {
    width: min(236px, 100%);
  }
}

/* Hamburger Toggle (Mobile) */
.toggle-sidebar-btn {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  margin-left: -8px;
  cursor: pointer;
  color: #f1f5f9;
  /* Light Icon for dark header */
}

.toggle-sidebar-btn svg {
  width: 24px;
  height: 24px;
  display: block;
}

@media (max-width: 1023px) {
  .toggle-sidebar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
  }
}

/* Brand styling in Topbar */
.topbar-brand-link {
  display: inline-flex;
  align-items: center;
  height: 100%;
  flex-shrink: 0;
  padding-right: 30px;
  position: relative;
  color: inherit;
  text-decoration: none;
  transition: filter 220ms var(--topbar-ease), transform 220ms var(--topbar-ease);
}

.topbar-brand-link::after {
  content: "";
  position: absolute;
  right: 0;
  top: 17px;
  bottom: 17px;
  width: 1px;
  height: auto;
  background: linear-gradient(180deg, transparent, rgba(148, 163, 184, 0.42) 28%, rgba(34, 211, 238, 0.32) 50%, rgba(139, 92, 246, 0.28) 72%, transparent);
  box-shadow: 0 0 9px rgba(34, 211, 238, 0.12);
}

.topbar-brand-link::before {
  content: none;
}

.topbar-brand-link:hover,
.topbar-brand-link:focus-visible {
  filter:
    drop-shadow(0 0 10px rgba(34, 211, 238, 0.18))
    drop-shadow(0 0 16px rgba(139, 92, 246, 0.1));
}

.topbar-brand-link:focus-visible {
  outline: 2px solid rgba(125, 211, 252, 0.7);
  outline-offset: 5px;
  border-radius: 6px;
}

@media (max-width: 900px) {
  .topbar-brand-link .wordmark {
    display: none !important;
    /* Hide text on tablet/small screens to save space and prevent overlap */
  }
}

.wordmark-benchmark {
  padding-right: 20px;
  /* Extra space for the italic K */
}

/* Base state for mobile search btn */
.search-mobile-btn {
  display: none !important;
}

@media (max-width: 768px) {
  .app-topbar {
    display: flex;
    justify-content: space-between;
    padding: 0 16px;
    gap: 8px;
  }

  .topbar-search {
    display: none !important;
    /* Hide full search bar on mobile */
  }

  .search-mobile-btn {
    display: flex !important;
    /* Show icon instead */
  }

  .topbar-actions {
    gap: 6px;
    /* Even tighter gap for all icons */
    margin-left: auto;
  }
}

@media (max-width: 500px) {
  .topbar-brand-link {
    display: flex !important;
    margin-left: 0 !important;
    padding-right: 14px;
  }

  .topbar-brand-logo--full {
    display: none;
  }

  .topbar-brand-icon {
    display: block;
  }

  .topbar-actions {
    gap: 4px;
    /* Extreme tight gap for very small screens */
  }

  .action-btn {
    width: 34px;
    height: 34px;
  }

  .topbar-profile-cluster {
    gap: 3px;
  }

  .topbar-profile-cluster .user-profile-btn {
    width: 34px;
    height: 34px;
  }

  .profile-chevron-btn {
    width: 20px;
  }

  .app-topbar {
    padding: 0 10px;
    /* Minimum side padding */
    gap: 4px;
    /* Tighten gap between logo and actions */
  }

  .toggle-sidebar-btn {
    margin-left: 0;
    padding: 10px 4px;
  }
}

/* Search Bar (Top Center) */
.topbar-search {
  width: 400px;
  margin: 0 auto;
}

.topbar-search-input {
  width: 100%;
  height: 40px;
  padding: 0 16px 0 44px;
  background: #1e293b;
  /* Slate-800 input bg */
  border: 1px solid #334155;
  /* Slate-700 border */
  border-radius: 999px;
  font-size: 14px;
  color: #f8fafc;
  /* Light Text */
  transition: all 0.2s ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 14px center;
}

.topbar-search-input:focus {
  outline: none;
  background: #1e293b;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2); // Blue shadow
}

/* Right Actions */
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: flex-end;
  margin-left: auto;
}

.action-btn {
  background: rgba(15, 23, 42, 0.08);
  border: 1px solid transparent;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9aa8bd;
  cursor: pointer;
  transition:
    background 220ms var(--topbar-ease),
    border-color 220ms var(--topbar-ease),
    box-shadow 220ms var(--topbar-ease),
    color 180ms var(--topbar-ease),
    transform 220ms var(--topbar-ease);
}

.action-btn svg {
  width: 22px;
  height: 22px;
  stroke-width: 2;
}

.action-btn:hover,
.action-btn:focus-visible {
  background: rgba(30, 41, 80, 0.34);
  border-color: rgba(34, 211, 238, 0.22);
  color: #e8fbff;
  box-shadow:
    0 0 14px rgba(34, 211, 238, 0.16),
    0 0 22px rgba(139, 92, 246, 0.08);
  transform: translateY(-1px);
}

.action-btn:focus-visible {
  outline: 2px solid rgba(125, 211, 252, 0.72);
  outline-offset: 3px;
}

.notification-container,
.mail-btn-container {
  position: relative;
  line-height: 0;
}

.topbar-profile-cluster {
  align-items: center;
  gap: 7px;
  margin-left: 4px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

body.auth-ready .topbar-profile-cluster,
body.is-authenticated .topbar-profile-cluster {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.topbar-profile-cluster .user-profile-btn {
  width: 44px;
  height: 44px;
  padding: 0;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(139, 92, 246, 0.18));
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(226, 232, 240, 0.86);
  box-shadow:
    0 0 0 1px rgba(34, 211, 238, 0.32),
    0 0 14px rgba(34, 211, 238, 0.18),
    0 0 22px rgba(139, 92, 246, 0.16);
  cursor: pointer;
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease,
    border-color 220ms var(--topbar-ease),
    box-shadow 220ms var(--topbar-ease),
    transform 220ms var(--topbar-ease);
}

.topbar-profile-cluster .user-profile-btn:hover,
.topbar-profile-cluster .user-profile-btn:focus-visible {
  border-color: rgba(165, 243, 252, 0.96);
  box-shadow:
    0 0 0 1px rgba(139, 92, 246, 0.44),
    0 0 18px rgba(34, 211, 238, 0.3),
    0 0 28px rgba(139, 92, 246, 0.24);
  transform: translateY(-1px);
}

.topbar-profile-cluster .user-profile-btn:focus-visible,
.profile-chevron-btn:focus-visible {
  outline: 2px solid rgba(125, 211, 252, 0.72);
  outline-offset: 3px;
}

.topbar-profile-cluster .user-profile-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-chevron-btn {
  width: 28px;
  height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    color 180ms var(--topbar-ease),
    filter 220ms var(--topbar-ease),
    transform 220ms var(--topbar-ease);
}

.profile-chevron-btn:hover,
.profile-chevron-btn:focus-visible,
.topbar-profile-cluster:hover .profile-chevron-btn {
  color: #e8fbff;
  filter: drop-shadow(0 0 8px rgba(34, 211, 238, 0.24));
  transform: translateY(-1px);
}

/* Mobile Screen Overlay */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* =========================================
   DARK MODE COMPREHENSIVE FIXES
   ========================================= */

/* General Card Backgrounds */
html.dark-mode .dashboard-main-panel,
html.dark-mode .panel,
html.dark-mode .card,
html.dark-mode .kpi-card,
html.dark-mode .stats-card,
html.dark-mode .rr-form-card,
html.dark-mode .rr-kpi-card,
html.dark-mode .content-body {
  background-color: var(--card) !important;
  border-color: var(--line) !important;
  color: var(--ink) !important;
}

/* Inputs & Form Fields */
html.dark-mode input,
html.dark-mode select,
html.dark-mode textarea,
html.dark-mode .trade-fairs-field input,
html.dark-mode .trade-fairs-field select,
html.dark-mode .trade-fairs-field textarea,
html.dark-mode .rr-form-field input,
html.dark-mode .rr-form-field select,
html.dark-mode .rr-form-field textarea,
html.dark-mode .topbar-search-input {
  background-color: var(--card) !important;
  color: var(--ink) !important;
  border-color: var(--line) !important;
}

html.dark-mode input::placeholder,
html.dark-mode textarea::placeholder {
  color: var(--muted) !important;
}

/* Specific Filter Inputs */
html.dark-mode .global-search-inline {
  background: var(--card) !important;
  border-color: var(--line) !important;
}

html.dark-mode .global-search-input {
  color: var(--ink) !important;
}

/* Text Colors */
html.dark-mode h1,
html.dark-mode h2,
html.dark-mode h3,
html.dark-mode h4,
html.dark-mode h5,
html.dark-mode h6,
html.dark-mode strong,
html.dark-mode b,
html.dark-mode .panel-head h1,
html.dark-mode .kpi-value {
  color: var(--ink) !important;
}

html.dark-mode p,
html.dark-mode span,
html.dark-mode .panel-sub,
html.dark-mode .kpi-label {
  color: var(--muted) !important;
  /* Muted for secondary text */
}

/* Fix "Compare" Modal Inputs specifically if they have unique classes */
html.dark-mode .modal-content,
html.dark-mode .company-search-input {
  background-color: var(--card) !important;
  color: var(--ink) !important;
}

/* =========================================
   DARK MODE FIXES PART 2 (Maps, Tables, Buttons)
   ========================================= */

/* --- Tables (General & Trade Fairs) --- */
html.dark-mode table,
html.dark-mode thead,
html.dark-mode tbody,
html.dark-mode tr,
html.dark-mode th,
html.dark-mode td {
  background-color: var(--card) !important;
  color: var(--ink) !important;
  border-color: var(--line) !important;
}

html.dark-mode .trade-fairs-header-label,
html.dark-mode .trade-fairs-table th {
  color: var(--muted) !important;
}

html.dark-mode.route-trade-fairs .dashboard-main-panel {
  border-color: transparent !important;
  background:
    linear-gradient(var(--card), var(--card)) padding-box,
    linear-gradient(135deg, rgba(34, 211, 238, 0.72), rgba(59, 130, 246, 0.58) 48%, rgba(139, 92, 246, 0.74)) border-box !important;
  box-shadow:
    0 0 0 1px rgba(139, 92, 246, 0.18),
    0 0 28px rgba(34, 211, 238, 0.13),
    0 18px 48px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 0 24px rgba(139, 92, 246, 0.08) !important;
}

html.dark-mode.route-trade-fairs .trade-fairs-table-wrap {
  scrollbar-color: rgba(139, 92, 246, 0.78) rgba(15, 23, 42, 0.8);
}

html.dark-mode.route-trade-fairs .trade-fairs-table-wrap::-webkit-scrollbar-track {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.5), rgba(30, 41, 59, 0.72));
  border-color: rgba(15, 23, 42, 0.84);
}

html.dark-mode.route-trade-fairs .trade-fairs-table-wrap::-webkit-scrollbar-thumb {
  border-color: rgba(15, 23, 42, 0.84);
}

/* --- Map Containers --- */
html.dark-mode .trade-fairs-map-wrap,
html.dark-mode .trade-fairs-map-container,
html.dark-mode .europe-map-container,
html.dark-mode .geo-distribution-container,
html.dark-mode .map-wrapper {
  background-color: #0f172a !important;
  /* Darker than card for map background */
  border-color: var(--line) !important;
}

/* Leaflet/Map Specifics - Try to invert or darken if possible, 
   or at least fix the container around it */
html.dark-mode .leaflet-container {
  background: #0f172a !important;
}

/* --- Comparator / Modals --- */
html.dark-mode .modal-window,
html.dark-mode .company-selector,
html.dark-mode .company-selector-results,
html.dark-mode .company-selector-item {
  background-color: var(--card) !important;
  color: var(--ink) !important;
  border-color: var(--line) !important;
}

html.dark-mode .company-selector-search input {
  background-color: var(--bg) !important;
  color: var(--ink) !important;
}

/* --- Buttons (Ghost & Secondary) --- */
html.dark-mode .btn-ghost,
html.dark-mode .btn-secondary,
html.dark-mode .btn-outline {
  background-color: transparent !important;
  color: var(--ink) !important;
  border-color: var(--line) !important;
}

html.dark-mode .btn-ghost:hover,
html.dark-mode .btn-secondary:hover,
html.dark-mode .btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
}

/* --- FAQs --- */
html.dark-mode .faq-item,
html.dark-mode .faq-question,
html.dark-mode .faq-answer {
  background-color: var(--card) !important;
  color: var(--ink) !important;
  border-color: var(--line) !important;
}

/* --- Budget & ROI Charts --- */
html.dark-mode .participation-chart,
html.dark-mode .budget-chart,
html.dark-mode .roi-chart,
html.dark-mode .chart-container {
  background-color: var(--card) !important;
  color: var(--ink) !important;
}

html.dark-mode text {
  fill: var(--muted) !important;
  /* SVG Text in charts */
}

/* --- Specific Fix: Back to Comparison --- */
html.dark-mode a.back-link,
html.dark-mode .back-to-comparison {
  color: var(--accent) !important;
}

/* --- Fix: My Trade Fairs Map Container --- */
html.dark-mode .trade-fairs-map {
  background-color: var(--card) !important;
  border-color: var(--line) !important;
  color: var(--ink) !important;
}

html.dark-mode .trade-fairs-map-head h3 {
  color: var(--ink) !important;
}

html.dark-mode .trade-fairs-map-sub {
  color: var(--muted) !important;
}

html.dark-mode .trade-fairs-geo-summary {
  color: var(--ink) !important;
}

html.dark-mode .trade-fairs-map-country-filter {
  border-color: var(--line) !important;
}

html.dark-mode .trade-fairs-map-country-field span {
  color: var(--ink) !important;
}

html.dark-mode .trade-fairs-map-country-field select {
  background-color: var(--card) !important;
  border-color: var(--line) !important;
  color: var(--ink) !important;
}

html.dark-mode .trade-fairs-map-country-reset {
  background-color: var(--card) !important;
  border-color: var(--line) !important;
  color: var(--ink) !important;
}

html.dark-mode .trade-fairs-map-country-reset:disabled {
  color: var(--muted) !important;
}

html.dark-mode .trade-fairs-insight {
  background-color: var(--card) !important;
  border-color: var(--line) !important;
  color: var(--ink) !important;
}

/* --- Fix: Buttons (Ghost, Outline, General) --- */
/* Ensures buttons that might be hardcoded to white bg are readable */
html.dark-mode .btn,
html.dark-mode .btn-ghost {
  background-color: var(--card) !important;
  color: var(--ink) !important;
  border-color: var(--line) !important;
}

html.dark-mode .btn:hover,
html.dark-mode .btn-ghost:hover {
  background-color: var(--bg) !important;
  filter: brightness(1.1);
}

html.dark-mode .btn-primary {
  background-color: var(--accent) !important;
  color: #fff !important;
  /* Keep primary buttons distinct */
}

/* --- Fix: Glossary / Accordion --- */
html.dark-mode .glossary details {
  background-color: var(--card) !important;
  border-color: var(--line) !important;
}

html.dark-mode .glossary details[open] {
  background-color: var(--bg) !important;
  /* Distinct background when open */
}

html.dark-mode .glossary summary {
  color: var(--ink) !important;
}

html.dark-mode .glossary p {
  color: var(--muted) !important;
}

/* =========================================
   AUTH MODAL & ANTI-FLICKER STYLES
   ========================================= */

/* 1. Hide User Profile Button by default (Anti-Flicker) */
.user-profile-btn {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

/* 2. Show Button only when Auth Check is Done OR if we are explicitly authenticated */
body.auth-ready .user-profile-btn,
body.is-authenticated .user-profile-btn {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* 3. Auth Modal Overlay (Critical for Anti-FOUC) */
.auth-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  /* Changed from center to allow scrolling from top */
  padding: 40px 16px;
  /* Added padding for mobile/viewport edges */
  overflow-y: auto;
  /* Allow scrolling if modal is tall */
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
}

.auth-modal-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

/* Documents Grid Styles */
.docs-categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  width: 100%;
}

.document-category-slot {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.doc-category-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.doc-cat-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
}

.doc-cat-icon {
  font-size: 16px;
}

.doc-category-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.doc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border: 1px solid var(--line);
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 13px;
}

.doc-link {
  text-decoration: none;
  color: var(--blue);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.doc-link:hover {
  text-decoration: underline;
}

.doc-del-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0 4px;
}

.doc-del-btn:hover {
  color: #dc2626;
}

.btn-text-action {
  background: none;
  border: none;
  color: var(--blue);
  font-size: 12px;
  cursor: pointer;
  text-align: left;
  padding: 4px 0;
}

.btn-text-action:hover {
  text-decoration: underline;
}

.doc-empty-msg {
  html.dark-mode .trade-fairs-map-sub {
    color: var(--muted) !important;
  }

  html.dark-mode .trade-fairs-geo-summary {
    color: var(--ink) !important;
  }

  html.dark-mode .trade-fairs-insight {
    background-color: var(--card) !important;
    border-color: var(--line) !important;
    color: var(--ink) !important;
  }

  /* --- Fix: Buttons (Ghost, Outline, General) --- */
  /* Ensures buttons that might be hardcoded to white bg are readable */
  html.dark-mode .btn,
  html.dark-mode .btn-ghost {
    background-color: var(--card) !important;
    color: var(--ink) !important;
    border-color: var(--line) !important;
  }

  html.dark-mode .btn:hover,
  html.dark-mode .btn-ghost:hover {
    background-color: var(--bg) !important;
    filter: brightness(1.1);
  }

  html.dark-mode .btn-primary {
    background-color: var(--accent) !important;
    color: #fff !important;
    /* Keep primary buttons distinct */
  }

  /* --- Fix: Glossary / Accordion --- */
  html.dark-mode .glossary details {
    background-color: var(--card) !important;
    border-color: var(--line) !important;
  }

  html.dark-mode .glossary details[open] {
    background-color: var(--bg) !important;
    /* Distinct background when open */
  }

  html.dark-mode .glossary summary {
    color: var(--ink) !important;
  }

  html.dark-mode .glossary p {
    color: var(--muted) !important;
  }

  /* =========================================
   AUTH MODAL & ANTI-FLICKER STYLES
   ========================================= */

  /* 1. Hide User Profile Button by default (Anti-Flicker) */
  .user-profile-btn {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
  }

  /* 2. Show Button only when Auth Check is Done */
  body.auth-ready .user-profile-btn {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  /* 3. Auth Modal Overlay (Critical for Anti-FOUC) */
  .auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 16px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
  }

  .auth-modal-overlay.is-visible {
    opacity: 1;
    visibility: visible;
  }

  /* Documents Grid Styles */
  .docs-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    width: 100%;
  }

  .document-category-slot {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .doc-category-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
  }

  .doc-cat-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .doc-cat-icon {
    font-size: 16px;
  }

  .doc-category-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .doc-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border: 1px solid var(--line);
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 13px;
  }

  .doc-link {
    text-decoration: none;
    color: var(--blue);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
  }

  .doc-link:hover {
    text-decoration: underline;
  }

  .doc-del-btn {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0 4px;
  }

  .doc-del-btn:hover {
    color: #dc2626;
  }

  .btn-text-action {
    background: none;
    border: none;
    color: var(--blue);
    font-size: 12px;
    cursor: pointer;
    text-align: left;
    padding: 4px 0;
  }

  .btn-text-action:hover {
    text-decoration: underline;
  }

  .doc-empty-msg {
    font-size: 12px;
    color: var(--muted);
    font-style: italic;
  }

  .upload-doc-btn {
    width: 100%;
  }

  /* SECURITY: Protect UI Elements */
  /* SECURITY: Protect UI Elements */
  .nav-item-protected,
  .panel.nav-item-protected,
  section.nav-item-protected {
    display: none !important;
  }

  /* Default show as flex (for sidebar links and panels) */
  body.is-authenticated .nav-item-protected,
  body.is-authenticated .panel.nav-item-protected,
  body.is-authenticated section.nav-item-protected {
    display: flex !important;
  }

  /* Exception: Sidebar Sections must be block to preserve title/nav stacking */
  body.is-authenticated .sidebar-section.nav-item-protected {
    display: block !important;
  }

  .nav-item-paid,
  .nav-item-protected.nav-item-paid,
  .panel.nav-item-paid,
  .panel.nav-item-protected.nav-item-paid,
  section.nav-item-paid,
  section.nav-item-protected.nav-item-paid,
  body.is-authenticated .nav-item-protected.nav-item-paid,
  body.is-authenticated .panel.nav-item-protected.nav-item-paid,
  body.is-authenticated section.nav-item-protected.nav-item-paid {
    display: none !important;
  }

  body.has-paid-access .nav-item-paid,
  body.has-paid-access .nav-item-protected.nav-item-paid,
  body.has-paid-access .panel.nav-item-paid,
  body.has-paid-access .panel.nav-item-protected.nav-item-paid,
  body.has-paid-access section.nav-item-paid,
  body.has-paid-access section.nav-item-protected.nav-item-paid {
    display: flex !important;
  }

  body.has-paid-access .sidebar-section.nav-item-paid,
  body.has-paid-access .sidebar-item-group.nav-item-paid {
    display: block !important;
  }

  body.has-paid-access .sidebar-sublink.nav-item-paid {
    display: block !important;
  }

  .fair-tab-content.nav-item-protected,
  body.is-authenticated .fair-tab-content.nav-item-protected,
  body.is-authenticated .fair-tab-content.nav-item-protected.nav-item-paid,
  body.has-paid-access .fair-tab-content.nav-item-paid {
    display: none !important;
  }

  body.is-authenticated .fair-tab-content.nav-item-protected:not(.nav-item-paid).is-active,
  body.has-paid-access .fair-tab-content.nav-item-paid.is-active {
    display: block !important;
  }

  body:not(.has-paid-access) .requires-paid-access {
    display: none !important;
  }

  /* Evaluation Pills Fix */
  .trade-fair-evaluation-value-pill {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
  }

  .trade-fair-evaluation-value-pill.is-active {
    background: var(--accent);
    color: #fff;
    border-color: transparent;
  }

  #rrFormOverallContainer {
    flex-wrap: wrap;
  }


  /* Trade Fair Status Toggles (Single Page) */
  .trade-fairs-favorite-toggle.is-active {
    color: #fbbf24;
    /* Amber-400 */
  }

  .trade-fairs-planning-toggle.is-active {
    color: #3b82f6;
    /* Blue-500 */
  }

  .trade-fairs-planning-toggle.is-active .trade-fairs-planning-icon-fill {
    display: block;
  }

  .trade-fairs-planning-toggle.is-active .trade-fairs-planning-icon-outline {
    display: none;
  }

  .trade-fairs-attended-toggle.is-active {
    color: #16a34a;
    /* Green-600 */
  }

  .trade-fairs-attended-toggle.is-active .trade-fairs-attended-icon-fill {
    display: block;
  }

  .trade-fairs-attended-toggle.is-active .trade-fairs-attended-icon-outline {
    display: none;
  }

  /* Base styles for the SVG icons inside toggles (if not already present) */
  .trade-fairs-planning-icon-fill,
  .trade-fairs-attended-icon-fill,
  .trade-fairs-notes-icon-fill {
    display: none;
    /* Hidden by default */
  }

  /* Notes Toggle Active State */
  .trade-fairs-notes-toggle.is-active {
    color: #8b5cf6;
    /* Violet-500 */
  }

  .trade-fairs-notes-toggle.is-active .trade-fairs-notes-icon-fill {
    display: block;
  }

  .trade-fairs-notes-toggle.is-active .trade-fairs-notes-icon-outline {
    display: none;
  }

  /* =========================================
   PAGE TRANSITIONS
   ========================================= */

  @keyframes pageFadeIn {
    from {
      opacity: 0;
    }

    to {
      opacity: 1;
    }
  }

  @keyframes pageFadeOut {
    from {
      opacity: 1;
    }

    to {
      opacity: 0;
    }
  }

  body {
    /* No global animation on body, handled by main opacity */
  }

  body.page-transitioning main,
  body.page-transitioning .site-footer {
    animation: pageFadeOut 0.3s ease-in forwards !important;
    pointer-events: none;
  }

  /* --- Reminders in Calendar --- */
  .trade-calendar-day-event.reminder-high {
    background-color: #fef2f2 !important;
    border-left: 3px solid #ef4444 !important;
    color: #991b1b !important;
  }

  .trade-calendar-day-event.reminder-medium {
    background-color: #fffbeb !important;
    border-left: 3px solid #f59e0b !important;
    color: #92400e !important;
  }

  .trade-calendar-day-event.reminder-low {
    background-color: #eff6ff !important;
    border-left: 3px solid #3b82f6 !important;
    color: #1e40af !important;
  }

  .trade-calendar-day-event[class*="reminder-"] .trade-calendar-day-event-name {
    font-weight: 600;
  }

  /* Week View Cards for Reminders */
  .trade-fair-card.reminder-high {
    border-top: 3px solid #ef4444 !important;
    background: #fffafa;
  }

  .trade-fair-card.reminder-medium {
    border-top: 3px solid #f59e0b !important;
    background: #fffdf5;
  }

  .trade-fair-card.reminder-low {
    border-top: 3px solid #3b82f6 !important;
    background: #f7fbff;
  }

  /* Custom Company Styling */
  .badge-custom {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    border: 1px solid rgba(37, 99, 235, 0.2);
  }

  .slot-search-option.is-custom::after {
    content: 'CUSTOM';
    font-size: 9px;
    background: #e0f2fe;
    color: #0369a1;
    padding: 1px 4px;
    border-radius: 3px;
    margin-left: auto;
    font-weight: bold;
  }

  .winner-card.is-custom {
    border-style: dashed;
  }

  .winner-card.is-custom h3::after {
    content: 'Custom';
    display: block;
    font-size: 11px;
    color: #475569;
    font-weight: normal;
    margin-top: 2px;
  }

  .overall-name.is-custom::after {
    content: '(Custom)';
    font-size: 10px;
    color: #475569;
    margin-left: 6px;
    font-style: italic;
  }


  .winner-card {
    position: relative;
  }

  /* --- Auth Visibility Rules --- */
  #goToAddCustomBtn {
    display: none !important;
  }

  body.is-admin #goToAddCustomBtn {
    display: inline-block !important;
    /* Only show for Admins */
  }

  /* Fix Sign In Button Layout */
  .sign-in-btn {
    white-space: nowrap;
    width: auto !important;
    flex-shrink: 0;
    max-width: 120px;
  }

  .topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
  }
