:root {
  font-family: Arial, Helvetica, sans-serif;
  color: #172033;
  background: #f4f6fa;
}

body {
  margin: 0;
}

.page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
}

.card {
  background: white;
  border: 1px solid #d9dfec;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(20, 32, 55, 0.06);
  padding: 20px;
  margin-bottom: 18px;
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
  align-items: end;
}

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

.form label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
}

.inline {
  display: flex;
  gap: 10px;
}

input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #cbd3e1;
  border-radius: 8px;
  font-size: 16px;
}

button {
  padding: 10px 16px;
  border: 0;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
}

.muted {
  color: #64748b;
}

.notice {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  font-weight: 700;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th,
.table td {
  padding: 9px;
  border-bottom: 1px solid #e5eaf3;
  text-align: left;
  vertical-align: top;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #edf2f7;
  font-size: 12px;
  white-space: nowrap;
}

.badge.ok {
  background: #dcfce7;
}

.badge.warn {
  background: #ffedd5;
}

.heat {
  border: 1px solid #e5eaf3;
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 10px;
}

.heat-title {
  font-weight: 700;
  margin-bottom: 6px;
}

.numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.number {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 8px;
  background: #eef2ff;
  font-weight: 700;
}

.error {
  color: #b42318;
  font-weight: 700;
}

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

  .inline {
    flex-direction: column;
  }
}


a {
  color: #1d4ed8;
  font-weight: 700;
}

.mt {
  margin-top: 14px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.actions button {
  padding: 8px 10px;
  font-size: 12px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid #e5eaf3;
  margin-bottom: 16px;
  padding-bottom: 12px;
}

.tabs button {
  background: #edf2f7;
  color: #172033;
}

.tabs button.active {
  background: #172033;
  color: white;
}

.tab-content h3 {
  margin-top: 6px;
}

.subcard {
  border: 1px solid #e5eaf3;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
  background: #fbfdff;
}

.table.compact th {
  width: 180px;
}

.table.compact th,
.table.compact td {
  padding: 7px 9px;
}

.live-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: #edf2f7;
  color: #334155;
}

.live-status::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
}

.live-status.ok {
  background: #dcfce7;
  color: #166534;
}

.live-status.warn {
  background: #ffedd5;
  color: #9a3412;
}

.live-status.error {
  background: #fee2e2;
  color: #991b1b;
}

.rule-block {
  margin: 1rem 0 1.4rem;
  padding: 0.75rem;
  border: 1px solid #d7dbe3;
  border-radius: 10px;
  background: #fff;
  overflow-x: auto;
}

.rule-block h4 {
  margin: 0 0 0.6rem;
}

.ok-lite {
  border-color: #9bd3ad;
  background: #f2fbf5;
}

.official-report {
  border-color: #c7d2fe;
  background: #f8fbff;
}

.raw-report {
  white-space: pre-wrap;
  overflow-x: auto;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 10px;
  padding: 12px;
  font-size: 12px;
}

select {
  padding: 10px 12px;
  border: 1px solid #cbd3e1;
  border-radius: 8px;
  font-size: 15px;
  background: white;
}

.inline.narrow {
  align-items: center;
  min-width: 440px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 14px;
}

.audit-badges,
.audit-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.metric {
  min-width: 110px;
  border: 1px solid #e5eaf3;
  background: #fbfdff;
  border-radius: 12px;
  padding: 10px 12px;
}

.metric-value {
  font-size: 22px;
  font-weight: 800;
}

.metric-label {
  font-size: 12px;
  color: #64748b;
}

.audit-metrics.small .metric {
  min-width: 88px;
  padding: 8px 10px;
}

.audit-metrics.small .metric-value {
  font-size: 18px;
}

.badge.error {
  background: #fee2e2;
  color: #991b1b;
}

.issue-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.issue {
  border: 1px solid #e5eaf3;
  border-radius: 10px;
  padding: 9px 10px;
  margin-bottom: 8px;
  background: #fbfdff;
}

.issue.warning {
  border-color: #fed7aa;
  background: #fff7ed;
}

.issue.error {
  border-color: #fecaca;
  background: #fef2f2;
}

.audit-category {
  border: 1px solid #e5eaf3;
  border-radius: 12px;
  margin-bottom: 10px;
  background: white;
  overflow: hidden;
}

.audit-category.warning {
  border-color: #fed7aa;
}

.audit-category.error {
  border-color: #fecaca;
}

.audit-category summary {
  cursor: pointer;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 12px;
  align-items: center;
}

.audit-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.audit-counts {
  color: #475569;
  font-size: 13px;
  white-space: nowrap;
}

.audit-detail {
  border-top: 1px solid #e5eaf3;
  padding: 14px;
  background: #fbfdff;
}

.compact-table {
  font-size: 13px;
}

@media (max-width: 900px) {
  .section-header {
    display: block;
  }
  .inline.narrow {
    min-width: 0;
    margin-top: 12px;
  }
  .audit-category summary {
    grid-template-columns: 1fr;
  }
  .audit-counts {
    white-space: normal;
  }
}
.audit-export-actions {
  margin-top: 12px;
  flex-wrap: wrap;
}
.audit-export-actions button {
  margin-right: 8px;
}

.card-header-row {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: flex-start;
}

.button-link {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 8px;
  background: #edf2f7;
  color: #172033;
  text-decoration: none;
  font-weight: 700;
}

.event-list {
  margin-top: 12px;
}

.small {
  font-size: 13px;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.pill {
  padding: 7px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #1e3a8a;
  font-size: 12px;
}

.link-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
  padding: 12px;
  border: 1px solid #e5eaf3;
  border-radius: 12px;
  margin-bottom: 10px;
  background: #fbfdff;
}

.link-row input,
.table input[readonly] {
  width: 100%;
  box-sizing: border-box;
  font-size: 13px;
  background: #f8fafc;
}

@media (max-width: 900px) {
  .card-header-row,
  .link-row {
    display: block;
  }

  .card-header-row .actions,
  .link-row .actions {
    margin-top: 10px;
  }
}

/* Public client page - WDSF-like one-page view */
.client-body {
  min-height: 100vh;
  background: #ffffff;
  color: #071625;
  font-family: Arial, Helvetica, sans-serif;
}

.client-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 28px;
  max-width: 1420px;
  margin: 0 auto;
  padding: 12px 28px 40px 20px;
}

.client-sidebar {
  position: sticky;
  top: 12px;
  align-self: start;
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  background: #f7f0e7;
  border-right: 1px solid #e2c393;
}

.sidebar-title {
  background: #c57b1d;
  color: #fff;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 16px 18px;
}

.sidebar-content {
  background: #6d5870;
  color: #fff;
}

.side-section-title {
  background: #d0831f;
  color: #fff;
  padding: 12px 16px;
  font-weight: 800;
  border-top: 2px solid #fff;
  text-transform: uppercase;
  font-size: 14px;
}

.side-row {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 0;
  border-bottom: 2px solid rgba(255,255,255,0.9);
  background: #6d5870;
  color: #fff;
  text-align: left;
  padding: 14px 16px;
  font-weight: 800;
  line-height: 1.2;
}

.side-row span,
.side-row small {
  display: block;
}

.side-row small {
  margin-top: 5px;
  color: rgba(255,255,255,0.82);
  font-weight: 600;
  font-size: 12px;
}

.side-row:hover,
.side-row.selected,
.side-row.active {
  background: #3e3040;
}

.side-row.active-event {
  background: #5b285d;
}

.side-row.closed-event {
  background: #6d5870;
}

.side-row.home-row {
  background: #210f24;
  font-size: 15px;
}

.side-block {
  padding: 14px 16px;
  background: #27132a;
  border-bottom: 2px solid #fff;
}

.side-block small,
.side-block strong,
.side-block span {
  display: block;
}

.side-block small {
  color: #f5b24d;
  font-weight: 800;
  margin-bottom: 5px;
}

.side-block strong {
  font-size: 15px;
  line-height: 1.3;
}

.side-block span {
  margin-top: 6px;
  color: rgba(255,255,255,0.82);
  font-size: 12px;
}

.side-empty {
  margin: 0;
  padding: 12px 16px;
  color: rgba(255,255,255,0.82);
  border-bottom: 2px solid rgba(255,255,255,0.55);
}

.home-button {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 20;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 999px;
  background: #210f24;
  color: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,0.22);
  font-size: 24px;
  line-height: 42px;
  text-align: center;
}

.client-main {
  min-width: 0;
  padding-left: 0;
}

.client-hero-panel,
.client-heading-panel,
.client-section,
.result-block {
  background: #fff;
  padding: 8px 0 22px;
  margin-bottom: 26px;
}

.eyebrow {
  color: #c57b1d;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  margin: 0 0 6px;
}

.client-main h1 {
  font-weight: 300;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: clamp(32px, 4vw, 48px);
  margin: 0 0 24px;
  color: #10223a;
}

.client-main h2 {
  text-transform: uppercase;
  letter-spacing: 0.01em;
  font-size: 28px;
  margin: 24px 0 16px;
  color: #071625;
}

.client-main h3 {
  margin: 18px 0 10px;
}

.lead {
  max-width: 780px;
  line-height: 1.5;
  font-size: 17px;
}

.event-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.event-card,
.category-card {
  border: 1px solid #e7d5be;
  border-left: 5px solid #d0831f;
  padding: 16px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,0.04);
}

.event-card.is-active,
.category-card.is-active {
  border-left-color: #5b285d;
}

.event-card h3,
.category-card h3 {
  margin-top: 10px;
  margin-bottom: 10px;
}

.event-card-top,
.category-meta-line,
.category-card {
  display: flex;
  gap: 10px;
  align-items: center;
}

.event-card-top,
.category-meta-line {
  flex-wrap: wrap;
}

.category-card {
  justify-content: space-between;
  align-items: flex-start;
}

.category-card-list {
  display: grid;
  gap: 10px;
}

.client-primary,
.client-tab {
  background: #d0831f;
  color: #fff;
  border-radius: 3px;
  padding: 10px 14px;
}

.client-primary:hover,
.client-tab:hover:not(:disabled) {
  background: #a86518;
}

.client-tab.active {
  background: #210f24;
}

.client-tab:disabled {
  background: #c9c1ca;
  color: #ffffff;
  cursor: not-allowed;
  opacity: 0.72;
}

.client-action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid #e4c08a;
}

.client-dl {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 12px 18px;
  margin: 0;
}

.client-dl dt {
  font-weight: 800;
  color: #071625;
}

.client-dl dd {
  margin: 0;
}

.compact-dl {
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 6px 10px;
  font-size: 14px;
}

.event-info-dl {
  max-width: 820px;
}

.category-info-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(280px, 1fr);
  gap: 24px;
  max-width: 980px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  max-width: 860px;
}

.stat-box {
  border-top: 1px solid #d0831f;
  border-bottom: 1px solid #d0831f;
  padding: 12px 8px;
  background: #f3f3f3;
}

.stat-box strong {
  display: block;
  font-size: 26px;
}

.stat-box span {
  color: #526173;
  font-size: 13px;
}

.client-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.client-table th,
.client-table td {
  padding: 9px 10px;
  border-bottom: 1px solid #d0831f;
  text-align: left;
  vertical-align: top;
}

.client-table th {
  font-weight: 800;
  color: #000;
}

.client-table tbody tr:nth-child(odd) {
  background: #f2f2f2;
}

.client-table.compact-public th,
.client-table.compact-public td,
.compact-public th,
.compact-public td {
  padding: 7px 8px;
  font-size: 13px;
}

.ranking-table td:first-child {
  color: #c57b1d;
  width: 42px;
}

.wide-scroll {
  overflow-x: auto;
  max-width: 100%;
}

.wide-block {
  max-width: 100%;
}

.marks-table th,
.marks-table td {
  text-align: center;
  white-space: nowrap;
}

.marks-table th:first-child,
.marks-table td:first-child {
  text-align: left;
  min-width: 240px;
}

.heat-public {
  border-top: 1px solid #d0831f;
  padding: 12px 0;
}

.heat-public h3 {
  margin: 0 0 8px;
}

.heat-numbers-public {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.heat-numbers-public span {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f2f2f2;
  border: 1px solid #d0831f;
  font-weight: 800;
}

.official-report-public,
.rule-block-public {
  border: 1px solid #e7d5be;
  padding: 12px;
  margin: 14px 0;
  background: #fffdf9;
}

.rule-block-public h4,
.rule-block-public h3 {
  margin-top: 0;
}

.rule-block-public h4 span {
  color: #64748b;
  font-weight: 400;
}

.client-live-status {
  position: fixed;
  right: 16px;
  bottom: 14px;
  z-index: 30;
}

@media (max-width: 920px) {
  .client-shell {
    grid-template-columns: 1fr;
    padding: 66px 14px 30px;
  }

  .client-sidebar {
    position: static;
    max-height: none;
  }

  .home-button {
    top: 12px;
    left: 14px;
  }

  .category-info-grid,
  .client-dl {
    grid-template-columns: 1fr;
  }

  .category-card {
    display: block;
  }

  .category-card .client-primary {
    margin-top: 10px;
  }
}

/* Event selection page - WDSF-like browser */
.event-browser-mode .client-shell {
  display: block;
  max-width: 1160px;
  padding: 18px 28px 44px;
}

.event-browser-mode .client-sidebar {
  display: none;
}

.event-browser-mode .client-main {
  width: 100%;
}

.client-main:focus {
  outline: none;
}

.event-browser-mode .home-button {
  display: none;
}

.event-browser-page h1 {
  margin: 0 0 26px;
  font-size: 32px;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: #10223a;
  text-align: center;
  padding: 0 110px;
}

.browser-toolbar {
  margin-bottom: 18px;
}

.browser-toolbar-top,
.browser-advanced-row {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.browser-toolbar-top {
  justify-content: space-between;
}

.browser-advanced-row {
  margin-top: 28px;
}

.browser-filter {
  position: relative;
  min-width: 150px;
}

.browser-filter.competition-filter {
  min-width: 190px;
}

.browser-filter-button,
.advanced-filter-button {
  width: 100%;
  min-height: 45px;
  padding: 0 18px;
  border: 1px solid #b9b9b9;
  border-radius: 0;
  background: #fff;
  color: #6a6f77;
  font-weight: 400;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.advanced-filter-button {
  width: auto;
  margin-left: auto;
  color: #000;
  border-color: transparent;
  background: transparent;
}

.advanced-filter-button.open {
  border-color: #1f2937;
  background: #fff;
}

.browser-filter.open .browser-filter-button {
  background: #505b62;
  color: #fff;
  border-color: #505b62;
}

.filter-chevron {
  font-size: 20px;
  line-height: 1;
}

.browser-filter-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% - 1px);
  left: 0;
  min-width: 100%;
  max-height: 520px;
  overflow-y: auto;
  background: #fff;
  border-left: 1px solid #c77a2c;
  border-right: 1px solid #c77a2c;
  border-bottom: 1px solid #c77a2c;
  box-shadow: 0 14px 28px rgba(0,0,0,0.14);
}

.browser-filter-menu button {
  display: block;
  width: 100%;
  padding: 7px 12px;
  border-radius: 0;
  background: #fff;
  color: #172033;
  text-align: left;
  font-weight: 400;
}

.browser-filter-menu button:hover {
  background: #f2f2f2;
}

.browser-filter-group {
  padding: 9px 12px 5px;
  font-weight: 800;
  color: #000;
}

.location-search-wrap {
  display: flex;
  gap: 18px;
  align-items: center;
}

.location-search-wrap input {
  width: 275px;
  min-height: 45px;
  border-radius: 999px;
  border-color: #b9b9b9;
  padding: 0 20px;
  font-size: 14px;
}

.browser-go-button {
  width: 52px;
  height: 45px;
  padding: 0;
  border-radius: 999px;
  background: #c27a13;
  color: #fff;
}

.browser-clear-button {
  min-height: 45px;
  border: 1px solid #cbd3e1;
  background: #f8fafc;
  color: #334155;
  border-radius: 0;
}

.browser-month-heading h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0 18px;
  font-size: 28px;
  text-transform: none;
  letter-spacing: 0;
}

.calendar-icon {
  color: #c27a13;
  font-size: 24px;
  transform: rotate(90deg);
}

.browser-month-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 0 14px;
}

.month-nav-button {
  display: inline-flex;
  gap: 14px;
  align-items: center;
  background: transparent;
  color: #c08637;
  border-radius: 0;
  padding: 0;
  font-size: 14px;
}

.month-nav-button span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 29px;
  height: 29px;
  border-radius: 999px;
  background: #c08637;
  color: #fff;
  font-size: 25px;
  line-height: 1;
}

.month-nav-button.next span {
  order: 2;
}

.month-nav-button:disabled {
  visibility: hidden;
}

.browser-results-count {
  margin: 0 0 8px;
  color: #64748b;
  font-size: 13px;
}

.browser-event-list {
  display: grid;
  gap: 8px;
}

.browser-event-row {
  display: grid;
  grid-template-columns: 280px 300px minmax(0, 1fr);
  min-height: 72px;
  border: 1px solid #b7b7b7;
  border-left-width: 7px;
  background: #fff;
  cursor: pointer;
  align-items: center;
}

.browser-event-row:hover,
.browser-event-row:focus {
  outline: 2px solid rgba(194,122,19,0.35);
  background: #f8f8f8;
}

.browser-event-row.wdsf {
  border-left-color: #0064bd;
}

.browser-event-row.national {
  border-left-color: #ef6425;
}

.browser-event-row.mixed {
  border-left-color: #c50043;
}

.browser-event-date,
.browser-event-location,
.browser-event-details {
  padding: 14px 22px;
}

.browser-event-date {
  color: #0064bd;
  font-weight: 800;
}

.browser-event-row.national .browser-event-date {
  color: #ef6425;
}

.browser-event-row.mixed .browser-event-date {
  color: #c50043;
}

.browser-event-location {
  color: #000;
  font-weight: 800;
}

.browser-event-details {
  font-size: 14px;
  line-height: 1.45;
}

.browser-event-details p {
  margin: 0 0 3px;
}

.browser-event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.browser-event-meta span {
  border: 1px solid #d9dfec;
  background: #f8fafc;
  border-radius: 999px;
  padding: 2px 8px;
  color: #64748b;
  font-size: 12px;
}

@media (max-width: 920px) {
  .event-browser-mode .client-shell {
    padding: 66px 14px 30px;
  }

  .browser-toolbar-top,
  .browser-advanced-row,
  .location-search-wrap {
    display: block;
  }

  .browser-filter,
  .browser-filter.competition-filter,
  .location-search-wrap input,
  .browser-go-button,
  .browser-clear-button {
    width: 100%;
    margin-bottom: 10px;
  }

  .advanced-filter-button {
    width: 100%;
    border-color: #b9b9b9;
  }

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

  .browser-event-date,
  .browser-event-location,
  .browser-event-details {
    padding: 10px 14px;
  }
}

/* v12 - language selector + responsive public event browser */
.language-switcher {
  position: fixed;
  top: 12px;
  right: 18px;
  z-index: 80;
  font-family: Arial, Helvetica, sans-serif;
}
.language-button {
  min-width: 86px;
  height: 34px;
  padding: 0 10px;
  border: 2px solid rgba(255,255,255,0.9);
  border-radius: 10px;
  background: #06101d;
  color: #d8e2ee;
  box-shadow: 0 6px 18px rgba(2,8,23,0.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.language-button .flag-icon,
.language-menu .flag-icon,
.flag-icon {
  display: inline-block;
  width: 20px;
  height: 14px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(15,23,42,0.16);
  flex: 0 0 auto;
}
.flag-ro { background: linear-gradient(90deg, #002b7f 0 33.333%, #fcd116 33.333% 66.666%, #ce1126 66.666% 100%); }
.flag-en { background: #012169; position: relative; overflow: hidden; }
.flag-en::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(33deg, transparent 0 43%, #fff 43% 50%, #c8102e 50% 55%, #fff 55% 62%, transparent 62% 100%),
    linear-gradient(147deg, transparent 0 43%, #fff 43% 50%, #c8102e 50% 55%, #fff 55% 62%, transparent 62% 100%),
    linear-gradient(90deg, transparent 0 42%, #fff 42% 58%, transparent 58% 100%),
    linear-gradient(0deg, transparent 0 36%, #fff 36% 64%, transparent 64% 100%),
    linear-gradient(90deg, transparent 0 46%, #c8102e 46% 54%, transparent 54% 100%),
    linear-gradient(0deg, transparent 0 42%, #c8102e 42% 58%, transparent 58% 100%);
}
.language-caret { color: #94a3b8; }
.language-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 176px;
  padding: 8px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(2, 8, 23, 0.25);
  border: 1px solid #e5e7eb;
}
.language-menu button {
  width: 100%;
  border-radius: 7px;
  padding: 9px 10px;
  background: #fff;
  color: #172033;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}
.language-menu button:hover,
.language-menu button.active {
  background: #eef5ff;
  color: #1d4ed8;
}
.event-browser-page {
  padding-right: 0;
}
.event-browser-page h1 {
  padding-left: 110px;
  padding-right: 110px;
}
.browser-event-row {
  transition: background 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}
.browser-event-row:hover,
.browser-event-row:focus {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(2, 8, 23, 0.08);
}
@media (max-width: 1100px) {
  .browser-event-row {
    grid-template-columns: 190px 230px minmax(0, 1fr);
  }
  .browser-event-date,
  .browser-event-location,
  .browser-event-details {
    padding: 12px 16px;
  }
}
@media (max-width: 720px) {
  .event-browser-mode .client-shell {
    padding: 72px 10px 24px;
  }
  .event-browser-page h1 {
    font-size: 27px;
    padding-left: 0;
    padding-right: 0;
    text-align: center;
  }
  .language-switcher {
    top: 10px;
    right: 10px;
  }
  .home-button {
    width: 38px;
    height: 38px;
    line-height: 38px;
  }
  .browser-month-heading h2 {
    font-size: 24px;
  }
  .browser-month-nav {
    gap: 12px;
    align-items: flex-start;
  }
  .month-nav-button {
    max-width: 50%;
    line-height: 1.2;
  }
  .browser-event-row {
    min-height: 0;
  }
  .browser-event-details {
    font-size: 13px;
  }
}
@media (max-width: 480px) {
  .language-button { min-width: 76px; }
  .language-menu { width: 165px; }
  .event-browser-page h1 { font-size: 24px; }
  .browser-filter-button,
  .advanced-filter-button,
  .location-search-wrap input,
  .browser-go-button,
  .browser-clear-button { min-height: 42px; }
  .browser-event-date,
  .browser-event-location,
  .browser-event-details { padding: 9px 12px; }
}

/* Browser month/year picker */
.browser-month-heading {
  position: relative;
  display: inline-block;
  min-width: min(100%, 420px);
}
.browser-month-heading h2 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.browser-calendar-toggle {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.browser-calendar-toggle:hover,
.browser-calendar-toggle:focus {
  border-color: #c08637;
  background: #fff7ed;
  outline: none;
}
.calendar-icon {
  position: relative;
  width: 17px;
  height: 16px;
  border: 2px solid #c08637;
  border-radius: 3px;
  display: inline-block;
  transform: none;
  box-sizing: border-box;
}
.calendar-icon::before,
.calendar-icon::after {
  content: '';
  position: absolute;
  top: -5px;
  width: 3px;
  height: 6px;
  border-radius: 2px;
  background: #c08637;
}
.calendar-icon::before { left: 3px; }
.calendar-icon::after { right: 3px; }
.browser-calendar-popover {
  position: absolute;
  z-index: 55;
  top: calc(100% - 8px);
  left: 0;
  width: min(390px, calc(100vw - 32px));
  background: #fff;
  border: 2px solid #c08637;
  box-shadow: 0 20px 55px rgba(2, 8, 23, 0.28);
  padding: 10px 12px 14px;
}
.browser-calendar-year-wrap {
  position: relative;
  margin-bottom: 12px;
}
.browser-calendar-year-button {
  width: 100%;
  min-height: 58px;
  border-radius: 0;
  background: #59636a;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: 16px;
  font-weight: 800;
}
.browser-calendar-year-menu {
  position: absolute;
  z-index: 60;
  top: calc(100% + 3px);
  left: 0;
  right: 0;
  max-height: 260px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #c08637;
  box-shadow: 0 14px 28px rgba(2, 8, 23, 0.18);
}
.browser-calendar-year-menu button,
.browser-calendar-months button {
  border-radius: 0;
  border: 1px solid transparent;
  background: #fff;
  color: #172033;
  font-weight: 500;
}
.browser-calendar-year-menu button {
  width: 100%;
  display: block;
  padding: 10px 14px;
}
.browser-calendar-year-menu button:hover,
.browser-calendar-year-menu button.active,
.browser-calendar-months button:hover,
.browser-calendar-months button.active {
  border-color: #c08637;
  background: #fff7ed;
  color: #b46b0c;
}
.browser-calendar-months {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
  gap: 10px;
}
.browser-calendar-months button {
  min-height: 52px;
  padding: 0 12px;
}
.browser-calendar-months p {
  margin: 6px 0;
  color: #64748b;
  font-weight: 700;
}
@media (max-width: 720px) {
  .browser-month-heading {
    display: block;
    min-width: 0;
  }
  .browser-calendar-popover {
    left: 0;
    width: calc(100vw - 44px);
  }
}

/* WDSF category stage view v7 */
.category-submenu {
  background: #6d5870;
}

.category-tab-row {
  padding-left: 28px;
  font-size: 13px;
  background: #6d5870;
}

.category-tab-row.selected {
  background: #463848;
}

.gold-text,
.ranking-table td:first-child,
.client-table td:first-child {
  color: #c57b1d;
}

.public-search {
  display: block;
  width: min(760px, 100%);
  box-sizing: border-box;
  border-radius: 0;
  border: 1px solid #b8b8b8;
  margin: 4px 0 6px;
}

.search-label {
  display: block;
  margin-top: 12px;
  font-size: 14px;
}

.tiny-button {
  background: #c57b1d;
  color: #fff;
  border-radius: 3px;
  padding: 5px 8px;
  font-size: 11px;
}

.event-info-list {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 14px 18px;
  max-width: 760px;
}
.event-info-list dt { font-weight: 800; }
.event-info-list dd { margin: 0; }

.wdsf-section { margin-bottom: 34px; }
.wdsf-table th,
.wdsf-table td { border-bottom-color: #d0831f; }
.wdsf-table tbody tr:nth-child(odd) { background: #f2f2f2; }
.marks-scroll { overflow-x: auto; }
.marks-matrix th,
.marks-matrix td { text-align: center; white-space: nowrap; }
.marks-matrix th:nth-child(2),
.marks-matrix td:nth-child(2) { text-align: left; }

/* v10 - public TopTurnier tables */
.round-result-divider th {
  background: #fff;
  color: #0b2239;
  font-size: 0.86rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding-top: 14px;
}
.marks-table th:first-child,
.marks-table td:first-child {
  min-width: 44px;
  width: 44px;
  text-align: left;
}
.marks-table th:nth-child(2),
.marks-table td:nth-child(2) {
  min-width: 72px;
  text-align: left;
}
.marks-table th:nth-child(3),
.marks-table td:nth-child(3) {
  min-width: 48px;
}

/* v15 - visible public language selector */
.public-language-select {
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #ffffff;
  padding: 7px 12px;
  font-weight: 700;
  color: #1f2937;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.category-row.stage-current { outline: 2px solid rgba(22, 163, 74, .55); }
.category-row.stage-unconfirmed { outline: 2px solid rgba(217, 119, 6, .45); }

/* v16: selector pentru rundele din arbitrajul online desktop */
.summary-item.wide { grid-column: 1 / -1; }
.summary-item select { width: 100%; max-width: 100%; padding: 8px 10px; border: 1px solid #cfd8e3; border-radius: 8px; background: #fff; }

/* v17 - public language selector and current round heats */
.hidden { display: none !important; }
.heats-public-block .heats-category-title {
  font-size: 34px;
  line-height: 1.15;
  margin: 0 0 10px;
  color: #06101d;
  text-transform: uppercase;
}
.heat-dance-block {
  margin: 22px 0 26px;
}
.heat-dance-block h3 {
  margin: 0 0 10px;
  font-size: 22px;
}
.heat-public {
  border-top: 1px solid #d98d21;
  padding: 9px 0;
  display: grid;
  grid-template-columns: minmax(80px, 140px) 1fr;
  gap: 14px;
  align-items: center;
}
.heat-public:last-child { border-bottom: 1px solid #d98d21; }
.heat-public-label {
  font-weight: 800;
  color: #111827;
}
.heat-numbers-public {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.heat-numbers-public span,
.numbers .number {
  display: inline-flex;
  min-width: 36px;
  height: 28px;
  padding: 0 8px;
  align-items: center;
  justify-content: center;
  border: 1px solid #d98d21;
  background: #fff;
  color: #111827;
  font-weight: 700;
}

.heats-view-toggle {
  margin: 0 0 1rem;
  padding: .65rem .8rem;
  border: 1px solid rgba(193, 127, 24, .35);
  background: rgba(255, 249, 239, .75);
  max-width: 760px;
}
.heats-view-toggle label {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-weight: 700;
  cursor: pointer;
}
.heats-view-toggle input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
}
.heat-competitor-table-wrap {
  overflow-x: auto;
  max-width: 760px;
}
.heat-competitor-table {
  width: auto;
  min-width: 420px;
}
.heat-competitor-table th,
.heat-competitor-table td {
  text-align: center;
  font-size: 1.05rem;
  padding: .32rem .85rem;
}
.heat-competitor-table tbody th {
  text-align: right;
  font-weight: 800;
  white-space: nowrap;
}


/* TOPTURNIER embedded category pages v25 */
.category-card-main {
  min-width: 260px;
  flex: 1 1 auto;
}
.category-card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 620px;
}
.category-card-actions .client-primary,
.category-card-actions .client-tab {
  border: 0;
  cursor: pointer;
  font-weight: 700;
}
.embedded-category-heading {
  margin-bottom: 12px;
}
.embedded-category-tabs {
  margin: 0 0 12px 0;
}
@media (max-width: 860px) {
  .category-card {
    display: block;
  }
  .category-card-actions {
    justify-content: flex-start;
    margin-top: 12px;
  }
}

/* TOPTURNIER public results/marks/skating/notifications v28 */
.category-context-line {
  margin: 0 0 1rem;
  color: #111827;
}
.link-button {
  appearance: none;
  border: 0;
  background: transparent;
  color: #c47a12;
  padding: 0;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}
.notify-category-link {
  font-weight: 700;
}
.public-toast-stack {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9999;
  display: grid;
  gap: 10px;
  max-width: 420px;
}
.public-toast {
  transform: translateY(8px);
  opacity: 0;
  transition: opacity .25s ease, transform .25s ease;
  background: #111827;
  color: #fff;
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .28);
  font-weight: 700;
}
.public-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.marks-detail-table th,
.marks-detail-table td,
.skating-majority-table th,
.skating-majority-table td {
  text-align: center;
  vertical-align: middle;
}
.marks-detail-table th:nth-child(2),
.marks-detail-table td:nth-child(2),
.skating-majority-table th:first-child,
.skating-majority-table td:first-child {
  text-align: left;
}

/* v40 - public live mobile/tablet navigation */
.menu-toggle {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 130;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 999px;
  background: #210f24;
  color: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,0.22);
  font-size: 24px;
  line-height: 42px;
  text-align: center;
}
.menu-overlay {
  display: none;
}
.category-submenu {
  background: #4f4052;
  border-bottom: 2px solid rgba(255,255,255,0.82);
}
.category-tab-row {
  padding-left: 34px;
  min-height: 42px;
  font-size: 13px;
  background: #4f4052;
  border-bottom: 1px solid rgba(255,255,255,0.35);
}
.category-tab-row.selected,
.category-tab-row:hover {
  background: #210f24;
}
.category-tab-row span::before {
  content: '›';
  display: inline-block;
  margin-right: 8px;
  color: #f5b24d;
}

@media (max-width: 1100px) {
  .client-body.mobile-menu-open {
    overflow: hidden;
  }
  .menu-toggle {
    display: block;
  }
  .client-shell {
    display: block;
    padding: 68px 14px 30px;
    max-width: 100%;
  }
  .client-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 120;
    width: min(86vw, 360px);
    max-height: 100vh;
    overflow-y: auto;
    transform: translateX(-105%);
    transition: transform .22s ease;
    box-shadow: 18px 0 42px rgba(2, 8, 23, .32);
    border-right: 1px solid #e2c393;
  }
  .client-body.mobile-menu-open .client-sidebar {
    transform: translateX(0);
  }
  .menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 110;
    background: rgba(2, 8, 23, .48);
  }
  .client-body.mobile-menu-open .menu-overlay {
    display: block;
  }
  .home-button {
    top: 12px;
    left: 62px;
    z-index: 100;
  }
  .language-switcher {
    z-index: 100;
  }
  .client-main h1 {
    font-size: clamp(25px, 8vw, 36px);
    line-height: 1.15;
    margin-bottom: 16px;
  }
  .client-main h2 {
    font-size: 22px;
  }
  .client-heading-panel,
  .client-section,
  .result-block {
    margin-bottom: 18px;
  }
  .event-card-grid {
    grid-template-columns: 1fr;
  }
  .category-info-grid,
  .client-dl,
  .event-info-list {
    grid-template-columns: 1fr;
  }
  .category-card {
    display: block;
  }
  .category-card-actions {
    justify-content: flex-start;
    margin-top: 12px;
  }
  .client-section,
  .result-block,
  .wide-scroll,
  .marks-scroll,
  .heat-competitor-table-wrap {
    overflow-x: auto;
  }
  .client-table {
    min-width: 560px;
  }
  .compact-public {
    min-width: 520px;
  }
  .heat-public {
    grid-template-columns: 1fr;
    gap: 7px;
  }
  .client-live-status {
    right: 10px;
    bottom: 10px;
    max-width: calc(100vw - 20px);
  }
}

@media (max-width: 520px) {
  .client-shell {
    padding-left: 10px;
    padding-right: 10px;
  }
  .home-button,
  .menu-toggle {
    width: 38px;
    height: 38px;
    line-height: 38px;
  }
  .home-button {
    left: 56px;
  }
  .language-button {
    min-width: 68px;
    height: 32px;
    padding: 0 8px;
  }
  .event-card,
  .category-card,
  .official-report-public,
  .rule-block-public {
    padding: 12px;
  }
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  .stat-box strong {
    font-size: 22px;
  }
}


/* v41: vizualizare arbitraj online protejată */
.protected-online-body { background: #f6f3ea; }
.protected-shell { width: min(1440px, calc(100vw - 24px)); margin: 18px auto 40px; }
.protected-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.protected-head-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.protected-login-card { max-width: 520px; margin: 0 auto; }
.protected-login-form input { width: 100%; box-sizing: border-box; padding: 11px 12px; border-radius: 10px; border: 1px solid rgba(15,23,42,.18); }
.protected-event-grid { margin-top: 16px; }
.protected-category-list { margin-top: 16px; }
.protected-category-actions { gap: 8px; }
.protected-category-actions .client-tab,
.protected-category-actions .client-primary { text-decoration: none; text-align: center; }
.protected-results-table-wrap { margin-top: 14px; }
.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 10px; margin-top: 14px; }
.summary-item { border: 1px solid rgba(15,23,42,.12); border-radius: 12px; padding: 12px; background: #fff; }
.summary-item strong { display: block; font-size: 19px; margin-top: 4px; word-break: break-word; }
.summary-item span { color: #6b7280; font-size: 12px; }
.summary-item.wide { grid-column: 1 / -1; }
.summary-item select { width: 100%; max-width: 100%; padding: 8px 10px; border: 1px solid #cfd8e3; border-radius: 8px; background: #fff; }
.live-judging-table th,
.live-judging-table td { text-align: center; vertical-align: middle; }
.live-judging-table th:first-child,
.live-judging-table td:first-child { text-align: left; min-width: 220px; }
.live-cell { min-width: 38px; padding: 5px 8px; border: 1px solid #d6dee8; border-radius: 8px; background: #eef2f7; color: #1f2937; cursor: pointer; }
.live-cell.has-marks { background: #fff4bd; border-color: #e2b84d; font-weight: 800; }
.live-cell.disabled { display: inline-block; cursor: default; min-height: 28px; }
.modal-backdrop { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; background: rgba(15, 23, 42, 0.48); padding: 24px; }
.modal-backdrop.hidden { display: none; }
.modal-card { width: min(560px, 96vw); max-height: 90vh; overflow: auto; border-radius: 16px; background: #fff; box-shadow: 0 24px 80px rgba(15, 23, 42, 0.32); padding: 18px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.modal-head h3 { margin: 0; }
.danger-lite { background: rgba(239,68,68,.08); border-color: rgba(239,68,68,.25); color: #991b1b; }
@media (max-width: 700px) {
  .protected-shell { width: min(100vw - 14px, 100%); margin-top: 8px; }
  .protected-head { flex-direction: column; }
  .protected-head-actions { width: 100%; justify-content: stretch; }
  .protected-head-actions > * { flex: 1; }
  .live-judging-table th:first-child,
  .live-judging-table td:first-child { min-width: 160px; }
}

/* v43 - protected online results: same mobile/tablet structure as public live page */
.protected-online-body {
  background: #f6f3ea;
}
.protected-client-shell {
  grid-template-columns: minmax(250px, 330px) minmax(0, 1fr);
  max-width: 1500px;
}
.protected-main {
  min-width: 0;
}
.protected-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.protected-head-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.protected-login-card {
  max-width: 520px;
  margin: 0 auto;
}
.protected-login-form input {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, .18);
}
.protected-event-grid {
  margin-top: 16px;
}
.protected-category-list {
  margin-top: 16px;
}
.protected-category-actions {
  gap: 8px;
}
.protected-category-actions .client-tab,
.protected-category-actions .client-primary {
  text-decoration: none;
  text-align: center;
}
.protected-menu-hint {
  display: none;
}
.protected-sidebar .sidebar-row,
.protected-sidebar .link-row {
  width: 100%;
  box-sizing: border-box;
  border: 0;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
}
.protected-sidebar .link-row {
  display: block;
}
.sidebar-current-card {
  padding: 12px 14px;
  background: rgba(255, 255, 255, .12);
  border-bottom: 1px solid rgba(255, 255, 255, .24);
}
.sidebar-current-card strong,
.sidebar-current-card span {
  display: block;
}
.sidebar-current-card span {
  opacity: .82;
  font-size: 12px;
  margin-top: 3px;
}
.protected-sidebar-category.selected > .protected-category-row,
.protected-category-row.selected {
  background: #210f24;
}
.protected-category-submenu .category-tab-row {
  width: 100%;
  border: 0;
  color: #fff;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
}
.protected-category-submenu .category-tab-row:disabled {
  opacity: .45;
  cursor: not-allowed;
}
.protected-category-submenu .category-tab-row.selected {
  background: #210f24;
}
.protected-results-table-wrap {
  margin-top: 14px;
}
.protected-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.summary-item {
  border: 1px solid rgba(15,23,42,.12);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}
.summary-item strong {
  display: block;
  font-size: 19px;
  margin-top: 4px;
  word-break: break-word;
}
.summary-item span {
  color: #6b7280;
  font-size: 12px;
}
.summary-item.wide {
  grid-column: 1 / -1;
}
.summary-item select {
  width: 100%;
  max-width: 100%;
  padding: 8px 10px;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  background: #fff;
}
.live-judging-table {
  table-layout: auto;
}
.live-judging-table th,
.live-judging-table td {
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}
.live-judging-table th:first-child,
.live-judging-table td:first-child {
  text-align: left;
  min-width: 220px;
  white-space: normal;
}
.live-cell {
  min-width: 38px;
  padding: 5px 8px;
  border: 1px solid #d6dee8;
  border-radius: 8px;
  background: #eef2f7;
  color: #1f2937;
  cursor: pointer;
  box-sizing: border-box;
}
.live-cell.has-marks {
  background: #fff4bd;
  border-color: #e2b84d;
  font-weight: 800;
}
.live-cell.disabled {
  display: inline-block;
  cursor: default;
  min-height: 28px;
}
.protected-results-cards {
  display: none;
  margin-top: 12px;
  gap: 10px;
}
.protected-judging-card {
  border: 1px solid #e7d5be;
  border-radius: 14px;
  background: #fffdf9;
  padding: 10px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, .05);
}
.protected-judging-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #ecd2ad;
}
.protected-judging-card-head > div:first-child {
  min-width: 0;
}
.protected-start-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 30px;
  margin-right: 8px;
  border-radius: 999px;
  background: #210f24;
  color: #fff;
}
.protected-judging-card-head span {
  word-break: break-word;
}
.protected-card-result {
  text-align: center;
  min-width: 44px;
  padding: 4px 7px;
  border-radius: 9px;
  background: #f2f2f2;
}
.protected-card-result span {
  display: block;
  font-size: 10px;
  color: #64748b;
  line-height: 1;
}
.protected-card-result strong {
  display: block;
  font-size: 18px;
  line-height: 1.1;
}
.protected-judge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(48px, 1fr));
  gap: 7px;
  margin-top: 10px;
}
.protected-judge-item {
  display: grid;
  gap: 4px;
  justify-items: stretch;
  min-width: 0;
}
.protected-judge-item > span:first-child {
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  color: #071625;
}
.protected-judge-item .live-cell,
.protected-judge-item button.live-cell,
.protected-judge-item span.live-cell {
  width: 100%;
  min-width: 0;
  text-align: center;
  padding: 7px 4px;
}
.protected-calc-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #ecd2ad;
}
.protected-calc-strip span {
  flex: 1 1 58px;
  min-width: 58px;
  border-radius: 9px;
  background: #f3f3f3;
  padding: 5px 7px;
  text-align: center;
}
.protected-calc-strip em,
.protected-calc-strip strong {
  display: block;
  font-style: normal;
}
.protected-calc-strip em {
  font-size: 10px;
  color: #64748b;
}
.protected-calc-strip strong {
  font-size: 13px;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.48);
  padding: 24px;
}
.modal-backdrop.hidden {
  display: none;
}
.modal-card {
  width: min(560px, 96vw);
  max-height: 90vh;
  overflow: auto;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.32);
  padding: 18px;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.modal-head h3 {
  margin: 0;
}
.danger-lite {
  background: rgba(239,68,68,.08);
  border-color: rgba(239,68,68,.25);
  color: #991b1b;
}

@media (max-width: 1100px) {
  .protected-client-shell {
    display: block;
    padding: 68px 14px 30px;
    max-width: 100%;
  }
  .protected-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 120;
    width: min(86vw, 360px);
    max-height: 100vh;
    overflow-y: auto;
    transform: translateX(-105%);
    transition: transform .22s ease;
    box-shadow: 18px 0 42px rgba(2, 8, 23, .32);
    border-right: 1px solid #e2c393;
  }
  .client-body.mobile-menu-open .protected-sidebar {
    transform: translateX(0);
  }
  .protected-home-button {
    top: 12px;
    left: 62px;
    z-index: 100;
  }
  .protected-head,
  .protected-mobile-stack {
    flex-direction: column;
    align-items: stretch;
  }
  .protected-head-actions {
    width: 100%;
    justify-content: stretch;
  }
  .protected-head-actions > * {
    flex: 1;
  }
  .protected-main h1 {
    font-size: clamp(25px, 8vw, 36px);
    line-height: 1.15;
  }
  .protected-main h2 {
    font-size: 22px;
    line-height: 1.18;
  }
  .protected-menu-hint {
    display: block;
  }
  .protected-category-actions {
    margin-top: 12px;
  }
  .protected-category-actions .client-tab {
    display: none;
  }
  .protected-results-table-wrap {
    display: none;
  }
  .protected-results-cards {
    display: grid;
  }
  .protected-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .summary-item.wide {
    grid-column: 1 / -1;
  }
  .protected-detail-table {
    min-width: 420px;
  }
}

@media (max-width: 700px) {
  .protected-client-shell {
    padding-left: 10px;
    padding-right: 10px;
  }
  .protected-head-actions {
    gap: 6px;
  }
  .protected-head-actions > * {
    padding-left: 8px;
    padding-right: 8px;
  }
  .protected-summary-grid {
    grid-template-columns: 1fr 1fr;
    gap: 7px;
  }
  .summary-item {
    padding: 9px;
    border-radius: 10px;
  }
  .summary-item strong {
    font-size: 16px;
  }
  .summary-item select {
    padding: 7px 8px;
    font-size: 13px;
  }
  .protected-results-header .muted {
    display: none;
  }
  .protected-judging-card {
    padding: 9px;
    border-radius: 12px;
  }
  .protected-judging-card-head {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .protected-judging-card-head .protected-card-result:nth-child(3) {
    grid-column: 2;
  }
  .protected-start-no {
    min-width: 34px;
    min-height: 28px;
    margin-right: 6px;
  }
  .protected-judge-grid {
    grid-template-columns: repeat(auto-fit, minmax(42px, 1fr));
    gap: 6px;
  }
  .protected-judge-item .live-cell,
  .protected-judge-item button.live-cell,
  .protected-judge-item span.live-cell {
    padding: 6px 2px;
    border-radius: 7px;
  }
  .modal-backdrop {
    padding: 10px;
    align-items: flex-end;
  }
  .modal-card {
    width: 100%;
    max-height: 88vh;
    border-radius: 16px 16px 0 0;
    padding: 14px;
  }
}

@media (max-width: 430px) {
  .protected-summary-grid {
    grid-template-columns: 1fr;
  }
  .protected-judge-grid {
    grid-template-columns: repeat(auto-fit, minmax(38px, 1fr));
  }
  .protected-card-result {
    min-width: 38px;
    padding-left: 5px;
    padding-right: 5px;
  }
}

/* v43 protected sidebar row aliases */
.protected-sidebar .sidebar-section-title {
  background: #d0831f;
  color: #fff;
  padding: 12px 16px;
  font-weight: 800;
  border-top: 2px solid #fff;
  text-transform: uppercase;
  font-size: 14px;
}
.protected-sidebar .sidebar-row {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 0;
  border-bottom: 2px solid rgba(255,255,255,0.9);
  background: #6d5870;
  color: #fff;
  text-align: left;
  padding: 14px 16px;
  font-weight: 800;
  line-height: 1.2;
}
.protected-sidebar .sidebar-row strong,
.protected-sidebar .sidebar-row span {
  display: block;
}
.protected-sidebar .sidebar-row span {
  margin-top: 5px;
  color: rgba(255,255,255,0.82);
  font-weight: 600;
  font-size: 12px;
}
.protected-sidebar .sidebar-row:hover,
.protected-sidebar .sidebar-row.selected {
  background: #3e3040;
}
.protected-sidebar .sidebar-row:disabled {
  opacity: .45;
  cursor: not-allowed;
}

/* v44 - grupare categorii în meniuri public/protejat */
.category-group-title,
.protected-category-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  padding-bottom: 10px;
}
.category-group-title span,
.protected-category-group-title span {
  display: inline-flex;
  min-width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255,255,255,.20);
  font-size: 12px;
}
.side-category-group-items,
.protected-category-menu-group .protected-sidebar-categories {
  background: #6d5870;
}
.side-empty-compact {
  padding: 9px 16px 10px 28px;
  font-size: 12px;
  border-bottom: 1px solid rgba(255,255,255,.32);
}
.side-category-group-active .category-group-title,
.protected-category-menu-group-live .protected-category-group-title {
  background: #2f7d3c;
}
.side-category-group-not_started .category-group-title {
  background: #8a6b34;
}
.side-category-group-not_closed .category-group-title,
.protected-category-menu-group-not_closed .protected-category-group-title {
  background: #d0831f;
}
.side-category-group-closed .category-group-title,
.protected-category-menu-group-closed .protected-category-group-title {
  background: #4d4651;
}
.protected-category-menu-group .protected-category-row {
  padding-left: 24px;
}

/* v46 - desktop category actions on screen, mobile/tablet actions in menu */
.category-card-actions {
  align-items: flex-start;
}
.category-card-action-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
  max-width: min(720px, 100%);
}
.category-open-button {
  white-space: nowrap;
}
.category-screen-tab {
  border: 1px solid #d0831f;
  border-radius: 999px;
  padding: 8px 12px;
  min-height: 36px;
  line-height: 1;
  background: #fff8ee;
  color: #8a4d00;
  box-shadow: none;
}
.category-screen-tab:hover,
.category-screen-tab:focus-visible,
.category-screen-tab.selected,
.category-screen-tab.is-default {
  background: #d0831f;
  color: #fff;
}
.public-category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
}
.public-category-tabs .category-screen-tab {
  font-weight: 800;
}
.public-mobile-menu-hint {
  display: none;
}
@media (min-width: 1101px) {
  .client-sidebar .category-submenu {
    display: none;
  }
  .category-card-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 9px;
  }
}
@media (max-width: 1100px) {
  .category-card-action-tabs,
  .public-category-tabs {
    display: none;
  }
  .public-mobile-menu-hint {
    display: block;
    margin-top: 12px;
  }
  .category-card-actions {
    display: flex;
    justify-content: flex-start;
    align-items: center;
  }
}


/* v47 - accordion category groups: one open group at a time */
.category-group-title,
.protected-category-group-title {
  width: 100%;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.category-group-title::after,
.protected-category-group-title::after {
  content: '▸';
  margin-left: 8px;
  font-size: 13px;
  opacity: .92;
}
.category-group-title.is-open::after,
.protected-category-group-title.is-open::after {
  content: '▾';
}
.category-group-title span,
.protected-category-group-title span {
  margin-left: auto;
  margin-right: 6px;
}
.side-category-group-items[hidden],
.protected-sidebar-categories[hidden] {
  display: none !important;
}
.side-category-group.is-collapsed + .side-category-group .category-group-title,
.protected-category-menu-group.is-collapsed + .protected-category-menu-group .protected-category-group-title {
  border-top-color: rgba(255,255,255,.85);
}


/* v50 - discreet sum sorting controls for non-final result tables */
.results-sort-toggle,
.protected-sort-toggle {
  margin: 0 0 12px;
  padding: 8px 10px;
  border: 1px solid rgba(193, 127, 24, .25);
  background: rgba(255, 249, 239, .55);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
}
.results-sort-toggle label,
.protected-sort-toggle strong {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-size: 13px;
  line-height: 1.2;
  cursor: pointer;
}
.results-sort-toggle input,
.protected-sort-toggle input {
  width: 14px;
  height: 14px;
  margin: 0;
}
.protected-sort-toggle strong {
  font-size: 13px;
  font-weight: 700;
}
.protected-sort-toggle em {
  font-style: normal;
  color: #374151;
}
@media (max-width: 760px) {
  .results-sort-toggle,
  .protected-sort-toggle {
    width: 100%;
    box-sizing: border-box;
    border-radius: 12px;
    justify-content: flex-start;
  }
}
