:root {
  --bg-top: #f5f7fb;
  --bg-bottom: #edf2f8;
  --glass: rgba(255, 255, 255, 0.68);
  --glass-strong: rgba(255, 255, 255, 0.84);
  --border: rgba(255, 255, 255, 0.78);
  --ink: #111827;
  --muted: #6b7280;
  --accent: #0a84ff;
  --accent-soft: rgba(10, 132, 255, 0.12);
  --shadow: 0 20px 60px rgba(25, 35, 58, 0.12);
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  color-scheme: light;
  min-height: 100%;
  background: var(--bg-bottom);
}

body {
  position: relative;
  margin: 0;
  color: var(--ink);
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Display",
    "SF Pro Text",
    "Segoe UI",
    sans-serif;
  background:
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 5% 10%, rgba(10, 132, 255, 0.18), transparent 34%),
    radial-gradient(ellipse at 98% 8%, rgba(52, 199, 89, 0.14), transparent 30%),
    radial-gradient(ellipse at 0% 74%, rgba(10, 132, 255, 0.12), transparent 32%),
    radial-gradient(ellipse at 100% 72%, rgba(52, 199, 89, 0.1), transparent 30%);
}

.auth-screen,
.page {
  position: relative;
  z-index: 1;
}

.page {
  max-width: 1320px;
  margin: 0 auto;
  padding: 24px;
  zoom: 0.93;
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card {
  width: min(420px, 100%);
  border-radius: var(--radius-xl);
  padding: 26px;
}

.auth-card h1 {
  margin-bottom: 18px;
  font-size: 26px;
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.auth-form input,
.admin-self-password-form input,
.admin-user-form input,
.temporary-password-card input {
  min-height: 42px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  padding: 0 12px;
  font: inherit;
  font-size: 13px;
  outline: none;
}

.auth-message {
  min-height: 18px;
  margin-top: 12px;
  color: #b42318;
  font-size: 12px;
  font-weight: 650;
}

.primary-button,
.ghost-button {
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  padding: 0 15px;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 0;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.primary-button {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 24px rgba(10, 132, 255, 0.22);
}

.ghost-button {
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
}

.ghost-button:disabled,
.primary-button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.session-strip {
  position: static;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: auto;
  margin-bottom: 14px;
  padding: 10px 14px;
  border-radius: 18px;
}

.session-strip div {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 12px;
  min-width: 0;
}

.session-strip strong {
  font-size: 12px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.session-strip span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.session-strip .ghost-button {
  flex: 0 0 auto;
}

.feedback-open-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  border: 1px solid rgba(10, 132, 255, 0.2);
  border-radius: 999px;
  background:
    radial-gradient(circle at 20% 12%, rgba(255, 255, 255, 0.95), transparent 36%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(224, 242, 255, 0.7));
  color: #0f172a;
  padding: 0 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.92),
    0 10px 24px rgba(10, 132, 255, 0.1);
}

.feedback-open-button:hover {
  border-color: rgba(10, 132, 255, 0.36);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.96),
    0 14px 28px rgba(10, 132, 255, 0.16);
}

.feedback-open-icon {
  position: relative;
  display: inline-block;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: linear-gradient(145deg, #0a84ff, #64d2ff);
  box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.1);
}

.feedback-open-icon::before,
.feedback-open-icon::after {
  content: "";
  position: absolute;
  background: #fff;
}

.feedback-open-icon::before {
  inset: 4px 4px auto;
  height: 2px;
  border-radius: 999px;
}

.feedback-open-icon::after {
  left: 5px;
  right: 6px;
  bottom: 4px;
  height: 2px;
  border-radius: 999px;
}

body.has-side-admin-rail .session-strip {
  position: absolute;
  top: 30px;
  left: var(--side-session-left, -112px);
  z-index: 4;
  display: grid;
  align-items: start;
  justify-content: stretch;
  gap: 8px;
  width: 126px;
  margin-bottom: 0;
  padding: 10px;
}

body.has-side-admin-rail .session-strip div {
  display: grid;
  gap: 4px;
}

body.has-side-admin-rail .session-strip .ghost-button {
  width: 100%;
  min-height: 34px;
  padding: 0 10px;
}

body.has-side-admin-rail .feedback-open-button {
  width: 100%;
  min-height: 44px;
  border-radius: 14px;
  padding: 0 8px;
}

.glass {
  background: var(--glass);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
}

.hero,
.panel,
.metric,
.filter-bar {
  border-radius: var(--radius-xl);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: 12px;
  min-height: 74px;
  padding: 4px 16px;
}

.hero-copy {
  max-width: 1000px;
  min-width: 0;
}

.eyebrow,
.panel-eyebrow,
.filter-group label {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 20px;
  line-height: 0.98;
  font-weight: 700;
}

h2 {
  font-size: 20px;
  line-height: 1.08;
  font-weight: 650;
}

h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.hero-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  justify-self: end;
  width: 100%;
}

.meta-card {
  width: max-content;
  min-width: 220px;
  padding: 5px 9px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.62));
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 12px;
}

.meta-card-compact {
  min-width: 238px;
  padding: 5px 9px;
}

.sync-status-line {
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.sync-status-line strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1;
}

.sync-updated-line {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1;
}

.sync-updated-line strong {
  color: var(--ink);
  font-size: 10px;
  font-weight: 650;
}

.sync-setting {
  display: grid;
  grid-template-columns: max-content max-content;
  align-items: center;
  justify-content: start;
  gap: 10px;
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid rgba(107, 114, 128, 0.12);
  color: var(--muted);
  font-size: 10px;
}

.sync-setting strong {
  color: var(--ink);
  font-size: 10px;
  font-weight: 650;
}

.meta-label,
.metric .label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.metric .label {
  letter-spacing: 0;
  text-transform: none;
}

.meta-value,
.metric .value {
  margin-top: 8px;
  font-size: 22px;
  line-height: 1;
  font-weight: 700;
  color: var(--ink);
}

.meta-note,
.metric .note {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.meta-card .meta-value {
  margin-top: 4px;
  font-size: 18px;
}

.meta-card .meta-note {
  margin-top: 4px;
  font-size: 10px;
  line-height: 1.22;
}

.filter-bar {
  position: relative;
  z-index: 30;
  display: grid;
  grid-template-columns: max-content 148px max-content max-content;
  grid-template-areas:
    "bookmakers dates primary-tabs report-actions"
    "admin-tabs admin-tabs primary-tabs report-actions";
  align-items: start;
  gap: 14px;
  padding: 14px;
  margin-top: 16px;
  justify-content: start;
}

.filter-group {
  display: flex;
  flex-direction: column;
}

.filter-group-bookmakers {
  grid-area: bookmakers;
  min-width: 0;
}

.bookmaker-builder {
  --bookmaker-chip-width: 118px;
  display: grid;
  grid-template-columns: repeat(4, var(--bookmaker-chip-width));
  justify-content: start;
  justify-items: start;
  gap: 7px;
}

.bookmaker-chip {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  min-height: 34px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--muted);
  width: var(--bookmaker-chip-width);
  padding: 0 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.9),
    0 8px 22px rgba(25, 35, 58, 0.06);
  transition:
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.bookmaker-chip::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(107, 114, 128, 0.35);
  transition:
    background 160ms ease,
    box-shadow 160ms ease;
}

.bookmaker-chip:hover {
  transform: translateY(-1px);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
}

.bookmaker-chip.is-active {
  border-color: rgba(10, 132, 255, 0.28);
  background: rgba(10, 132, 255, 0.12);
  color: var(--ink);
  box-shadow:
    0 10px 28px rgba(10, 132, 255, 0.12),
    inset 0 1px 1px rgba(255, 255, 255, 0.9);
}

.bookmaker-chip.is-active::before {
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.12);
}

.bookmaker-chip-all {
  background: rgba(255, 255, 255, 0.84);
  color: var(--ink);
}

.filter-group select,
.filter-group input[type="date"],
.date-range-trigger {
  height: 44px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  padding: 0 14px;
  font-size: 14px;
  font-weight: 500;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.filter-group select:focus,
.filter-group input[type="date"]:focus,
.date-range-trigger:focus {
  border-color: rgba(10, 132, 255, 0.45);
  box-shadow:
    0 0 0 4px rgba(10, 132, 255, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.filter-group-dates {
  grid-area: dates;
  position: relative;
  display: flex;
  align-items: center;
  align-self: center;
  width: 148px;
  min-width: 0;
  padding-top: 0;
}

.filter-group-dates > label {
  display: none;
}

.date-range {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.date-range-picker {
  position: relative;
  width: 100%;
}

.date-range-trigger {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "caption icon"
    "value icon";
  align-items: center;
  align-content: center;
  gap: 7px 10px;
  width: 100%;
  min-height: 88px;
  height: auto;
  border-color: rgba(10, 132, 255, 0.16);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 252, 0.78));
  padding: 0 12px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.94),
    0 10px 24px rgba(25, 35, 58, 0.06);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease,
    background 160ms ease;
}

.date-range-trigger:hover {
  transform: translateY(-1px);
  border-color: rgba(10, 132, 255, 0.3);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 248, 255, 0.86));
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.96),
    0 14px 30px rgba(10, 132, 255, 0.1);
}

.date-range-caption {
  grid-area: caption;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

#date-range-label {
  grid-area: value;
  white-space: pre-line;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
}

.date-range-icon {
  grid-area: icon;
  align-self: center;
  justify-self: end;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 9px;
  background: rgba(10, 132, 255, 0.1);
  color: var(--accent);
  font-size: 14px;
  box-shadow: inset 0 0 0 1px rgba(10, 132, 255, 0.1);
}

.date-popover {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
  display: grid;
  grid-template-columns: 170px minmax(500px, 1fr);
  width: var(--date-popover-width, min(740px, calc(100vw - 28px)));
  max-width: calc(100vw - 28px);
  max-height: calc(100vh - 28px);
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 24px 72px rgba(15, 23, 42, 0.2);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.date-popover[hidden] {
  display: none;
}

.date-presets {
  padding: 10px;
  border-right: 1px solid rgba(148, 163, 184, 0.2);
}

.date-preset {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 34px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  padding: 0 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 550;
  text-align: left;
  cursor: pointer;
}

.date-preset:hover,
.date-preset.is-active {
  background: rgba(10, 132, 255, 0.12);
  color: var(--ink);
}

.date-preset.is-active {
  box-shadow: inset 3px 0 0 var(--accent);
}

.date-calendar {
  position: relative;
  padding: 18px 18px 16px;
}

.calendar-nav {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.calendar-nav button {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.calendar-nav button:hover {
  background: rgba(10, 132, 255, 0.14);
}

.calendar-months {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.calendar-month-title {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar-weekday,
.calendar-day {
  display: grid;
  place-items: center;
  height: 32px;
  border-radius: 10px;
  font-size: 12px;
}

.calendar-weekday {
  color: var(--muted);
  font-weight: 700;
}

.calendar-day {
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
}

.calendar-day.is-muted {
  color: rgba(107, 114, 128, 0.48);
}

.calendar-day.is-in-range {
  background: rgba(10, 132, 255, 0.1);
}

.calendar-day.is-start,
.calendar-day.is-end {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(10, 132, 255, 0.22);
}

.calendar-day:hover {
  background: rgba(10, 132, 255, 0.14);
}

.date-separator {
  color: var(--muted);
  font-size: 16px;
  text-align: center;
}

.grid {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.dashboard-section-tabs {
  display: grid;
  align-content: start;
  gap: 10px;
  margin: 0;
}

.dashboard-section-tabs-primary {
  grid-area: primary-tabs;
  grid-template-columns: repeat(2, max-content);
  width: max-content;
  padding-top: 21px;
}

.dashboard-section-tabs-primary .dashboard-section-button {
  width: auto;
  min-width: 232px;
  min-height: 75px;
  padding-right: 16px;
}

.dashboard-section-tabs-admin {
  grid-area: admin-tabs;
  grid-template-columns: repeat(2, minmax(210px, 1fr));
  width: min(100%, 680px);
  padding-top: 0;
}

body.has-side-admin-rail .filter-bar {
  --admin-side-width: 126px;
  grid-template-areas: "bookmakers dates primary-tabs report-actions";
}

body.has-side-admin-rail .dashboard-section-tabs-admin {
  position: absolute;
  top: var(--side-admin-rail-top, calc(100% + 126px));
  left: calc((var(--admin-side-width) + 10px) * -1);
  z-index: 2;
  grid-template-columns: 1fr;
  width: var(--admin-side-width);
  padding-top: 0;
}

body.has-side-admin-rail .dashboard-section-tabs-admin .dashboard-section-button {
  min-width: 0;
  min-height: 54px;
}

.dashboard-section-button {
  --section-accent: var(--accent);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  background: color-mix(in srgb, var(--section-accent) 6%, rgba(255, 255, 255, 0.78));
  color: var(--muted);
  padding: 8px 10px;
  font: inherit;
  font-size: 12px;
  line-height: 1.15;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.9),
    0 10px 24px rgba(25, 35, 58, 0.07);
  transition:
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.dashboard-section-button:hover {
  transform: translateY(-1px);
  color: var(--ink);
  background: color-mix(in srgb, var(--section-accent) 10%, rgba(255, 255, 255, 0.86));
}

.dashboard-section-button.is-coming-soon {
  overflow: hidden;
  cursor: not-allowed;
  opacity: 1;
  color: color-mix(in srgb, var(--ink) 72%, var(--muted));
}

.dashboard-section-button.is-coming-soon > span {
  position: relative;
  z-index: 1;
}

.dashboard-section-button.is-coming-soon::after {
  content: "В разработке";
  position: absolute;
  right: -14px;
  bottom: 7px;
  z-index: 0;
  width: 118px;
  padding: 3px 0;
  transform: rotate(-13deg);
  background: transparent;
  color: color-mix(in srgb, var(--section-accent) 78%, var(--ink));
  opacity: 0.22;
  font-size: 9px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
  pointer-events: none;
}

.dashboard-section-button.is-coming-soon:hover {
  transform: none;
}

.dashboard-section-button.is-active {
  border-color: color-mix(in srgb, var(--section-accent) 34%, rgba(255, 255, 255, 0.86));
  background: color-mix(in srgb, var(--section-accent) 16%, rgba(255, 255, 255, 0.84));
  color: var(--ink);
  box-shadow:
    0 12px 28px color-mix(in srgb, var(--section-accent) 16%, transparent),
    inset 0 1px 1px rgba(255, 255, 255, 0.9);
}

.dashboard-section-button[data-dashboard-section="product"] {
  --section-accent: #006c7a;
}

.dashboard-section-button[data-dashboard-section="finance"] {
  --section-accent: #2fb17d;
}

.dashboard-section-button-players {
  --section-accent: #ff9f0a;
}

.dashboard-section-button-hypothesis {
  --section-accent: #00c8ff;
}

.dashboard-section-button[data-dashboard-section="admin"] {
  --section-accent: #667085;
}

.dashboard-section-button[data-dashboard-section="incidents"] {
  --section-accent: #d65a4a;
}

.dashboard-section-button[data-dashboard-section="parsers"] {
  --section-accent: #0f9f8f;
}

.dashboard-section-button[data-dashboard-section="glossary"] {
  --section-accent: #4f46e5;
}

.dashboard-section-button[data-dashboard-section],
.dashboard-section-button[data-dashboard-section].is-active,
.dashboard-section-button[data-dashboard-section]:not(.is-active) {
  --section-accent: #94a3b8;
  background: rgba(248, 250, 252, 0.78);
  color: var(--muted);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.9),
    0 8px 20px rgba(25, 35, 58, 0.05);
}

.dashboard-section-button[data-dashboard-section].is-active {
  border-color: rgba(10, 132, 255, 0.26);
  background: rgba(255, 255, 255, 0.84);
  color: var(--ink);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.9),
    0 10px 24px rgba(25, 35, 58, 0.08);
}

.dashboard-section-button[data-dashboard-section="product"] .section-icon {
  --section-accent: #006c7a;
}

.dashboard-section-button[data-dashboard-section="finance"] .section-icon {
  --section-accent: #ffcc00;
}

.dashboard-section-button[data-dashboard-section="admin"] .section-icon {
  --section-accent: #5856d6;
}

.dashboard-section-button[data-dashboard-section="incidents"] .section-icon {
  --section-accent: #ff9f0a;
}

.dashboard-section-button[data-dashboard-section="parsers"] .section-icon {
  --section-accent: #0f9f8f;
}

.dashboard-section-button[data-dashboard-section="glossary"] .section-icon {
  --section-accent: #4f46e5;
}

.dashboard-section-button-players .section-icon {
  --section-accent: #ff9f0a;
}

.dashboard-section-button-hypothesis .section-icon {
  --section-accent: #00c8ff;
}

.dashboard-section-button,
.dashboard-section-button:not(.is-active),
.dashboard-section-button.is-active,
.dashboard-section-button:hover {
  background: rgba(248, 250, 252, 0.78);
}

.dashboard-section-button.is-active {
  border-color: rgba(10, 132, 255, 0.26);
  background: rgba(255, 255, 255, 0.84);
  color: var(--ink);
}

.dashboard-section-button:not(.is-active) {
  color: #64748b;
}

.dashboard-section-button-players,
.dashboard-section-button-players:hover {
  border-color: rgba(255, 159, 10, 0.26);
  background: linear-gradient(180deg, rgba(255, 249, 238, 0.94), rgba(255, 252, 246, 0.84));
  color: #7c4b08;
}

.dashboard-section-button-hypothesis,
.dashboard-section-button-hypothesis:hover {
  border-color: rgba(0, 200, 255, 0.24);
  background: linear-gradient(180deg, rgba(238, 252, 255, 0.92), rgba(247, 253, 255, 0.84));
  color: #0e5f78;
}

.dashboard-section-button:not(.is-coming-soon).is-active {
  border-color: rgba(10, 132, 255, 0.48);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 248, 255, 0.94));
  color: var(--ink);
  box-shadow:
    0 0 0 4px rgba(10, 132, 255, 0.1),
    0 14px 30px rgba(10, 132, 255, 0.16),
    inset 0 1px 1px rgba(255, 255, 255, 0.96);
}

.dashboard-section-button:not(.is-coming-soon).is-active::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 13px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(10, 132, 255, 0.12);
  transform: translateY(-50%);
}

.dashboard-section-button:not(.is-coming-soon).is-active .section-icon {
  background: rgba(255, 255, 255, 0.98);
  box-shadow:
    inset 0 0 0 1px rgba(10, 132, 255, 0.12),
    0 8px 16px rgba(10, 132, 255, 0.12);
}

.dashboard-section-button[data-dashboard-section="finance"]:not(.is-coming-soon).is-active {
  border-color: rgba(255, 204, 0, 0.58);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 249, 226, 0.96));
  box-shadow:
    0 0 0 4px rgba(255, 204, 0, 0.13),
    0 14px 30px rgba(214, 142, 0, 0.15),
    inset 0 1px 1px rgba(255, 255, 255, 0.96);
}

.dashboard-section-button[data-dashboard-section="finance"]:not(.is-coming-soon).is-active::after {
  background: #ffcc00;
  box-shadow: 0 0 0 5px rgba(255, 204, 0, 0.16);
}

.dashboard-section-button[data-dashboard-section="finance"]:not(.is-coming-soon).is-active .section-icon {
  box-shadow:
    inset 0 0 0 1px rgba(255, 204, 0, 0.2),
    0 8px 16px rgba(214, 142, 0, 0.12);
}

.section-icon {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
  transform-origin: center;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.section-icon::before,
.section-icon::after {
  transform-origin: center;
}

@media (prefers-reduced-motion: no-preference) {
  .dashboard-section-button:hover .section-icon {
    transform: translateY(-1px) scale(1.08);
    background: rgba(255, 255, 255, 0.94);
    box-shadow:
      inset 0 0 0 1px rgba(15, 23, 42, 0.05),
      0 8px 16px rgba(15, 23, 42, 0.1);
  }

  .dashboard-section-button:hover .section-icon::before {
    animation: section-icon-wake 620ms cubic-bezier(0.2, 0.8, 0.2, 1);
  }

  .dashboard-section-button:hover .section-icon::after {
    animation: section-icon-spark 620ms cubic-bezier(0.2, 0.8, 0.2, 1);
  }
}

@keyframes section-icon-wake {
  0% {
    transform: scale(1) rotate(0deg);
    filter: saturate(1);
  }
  42% {
    transform: scale(1.14) rotate(-4deg);
    filter: saturate(1.35);
  }
  100% {
    transform: scale(1) rotate(0deg);
    filter: saturate(1);
  }
}

@keyframes section-icon-spark {
  0% {
    transform: translateY(0) scale(1);
    opacity: 0.9;
  }
  45% {
    transform: translateY(-2px) scale(1.08);
    opacity: 1;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 0.9;
  }
}

.section-icon-product {
  position: relative;
}

.section-icon-product::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--section-accent);
  box-shadow:
    7px 5px 0 var(--section-accent),
    14px 12px 0 var(--section-accent);
}

.section-icon-product::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 9px;
  width: 12px;
  height: 10px;
  border-top: 2px solid var(--section-accent);
  border-right: 2px solid var(--section-accent);
  border-radius: 3px;
  transform: skewY(24deg);
}

.section-icon-finance {
  position: relative;
  perspective: 80px;
  color: var(--section-accent);
  font-size: 0;
  font-weight: 800;
}

.section-icon-finance::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 34% 26%, rgba(255, 255, 255, 0.95), transparent 28%),
    linear-gradient(135deg, #fff4a8 0%, var(--section-accent) 47%, #f4a700 100%);
  box-shadow:
    inset 0 0 0 1px rgba(174, 107, 0, 0.42),
    inset 0 0 0 4px rgba(255, 255, 255, 0.25),
    0 2px 4px rgba(174, 107, 0, 0.18);
  transform-style: preserve-3d;
}

.section-icon-finance::after {
  content: "";
  position: absolute;
  right: 5px;
  width: 3px;
  height: 13px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff7bf, #e8a400);
  box-shadow: -5px 0 0 rgba(255, 255, 255, 0.22);
  opacity: 0.72;
}

@media (prefers-reduced-motion: no-preference) {
  .dashboard-section-button[data-dashboard-section="finance"]:hover .section-icon-finance::before {
    animation: finance-coin-spin 760ms cubic-bezier(0.2, 0.8, 0.2, 1);
  }

  .dashboard-section-button[data-dashboard-section="finance"]:hover .section-icon-finance::after {
    animation: finance-coin-edge 760ms cubic-bezier(0.2, 0.8, 0.2, 1);
  }
}

@keyframes finance-coin-spin {
  0% {
    transform: rotateY(0deg) scaleX(1);
    filter: saturate(1);
  }
  42% {
    transform: rotateY(72deg) scaleX(0.42);
    filter: saturate(1.18);
  }
  72% {
    transform: rotateY(252deg) scaleX(0.78);
    filter: saturate(1.28);
  }
  100% {
    transform: rotateY(360deg) scaleX(1);
    filter: saturate(1);
  }
}

@keyframes finance-coin-edge {
  0% {
    transform: translateX(0) scaleX(1);
    opacity: 0.72;
  }
  42% {
    transform: translateX(-6px) scaleX(1.6);
    opacity: 0.92;
  }
  72% {
    transform: translateX(1px) scaleX(0.7);
    opacity: 0.66;
  }
  100% {
    transform: translateX(0) scaleX(1);
    opacity: 0.72;
  }
}

.section-icon-players {
  position: relative;
}

.section-icon-players::before {
  content: "";
  position: absolute;
  left: 5px;
  bottom: 6px;
  width: 14px;
  height: 9px;
  border-left: 2px solid var(--section-accent);
  border-bottom: 2px solid var(--section-accent);
  border-radius: 0 0 0 5px;
  box-shadow: 0 4px 9px color-mix(in srgb, var(--section-accent) 16%, transparent);
}

.section-icon-players::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--section-accent);
  box-shadow:
    6px 6px 0 color-mix(in srgb, var(--section-accent) 78%, #ffffff),
    13px 1px 0 color-mix(in srgb, var(--section-accent) 55%, #ffffff);
}

.section-icon-hypothesis {
  position: relative;
}

.section-icon-hypothesis::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 14px;
  width: 17px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffffff 0 28%, var(--section-accent) 28% 100%);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--section-accent) 18%, transparent),
    0 2px 5px color-mix(in srgb, var(--section-accent) 18%, transparent);
  transform: rotate(-42deg);
  transform-origin: center;
}

.section-icon-hypothesis::after {
  content: "✦";
  position: absolute;
  right: 3px;
  top: 1px;
  color: var(--section-accent);
  font-size: 14px;
  line-height: 1;
  font-weight: 900;
  text-shadow:
    -10px 8px 0 color-mix(in srgb, var(--section-accent) 48%, transparent),
    -2px 15px 0 color-mix(in srgb, var(--section-accent) 34%, transparent);
}

.section-icon-admin::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background:
    linear-gradient(var(--section-accent), var(--section-accent)) 3px 3px / 8px 2px no-repeat,
    linear-gradient(var(--section-accent), var(--section-accent)) 3px 6px / 8px 2px no-repeat,
    linear-gradient(var(--section-accent), var(--section-accent)) 3px 9px / 8px 2px no-repeat;
  box-shadow: inset 0 0 0 2px var(--section-accent);
}

.section-icon-incidents::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 15px solid var(--section-accent);
}

.section-icon-parsers {
  position: relative;
}

.section-icon-parsers::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 5px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid var(--section-accent);
  border-top-color: transparent;
}

.section-icon-parsers::after {
  content: "";
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 7px;
  height: 4px;
  border-left: 2px solid var(--section-accent);
  border-bottom: 2px solid var(--section-accent);
  transform: rotate(-45deg);
}

.section-icon-glossary {
  position: relative;
}

.section-icon-glossary::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 5px;
  width: 12px;
  height: 15px;
  border: 2px solid var(--section-accent);
  border-radius: 3px 5px 5px 3px;
  background:
    linear-gradient(var(--section-accent), var(--section-accent)) 3px 4px / 6px 1.5px no-repeat,
    linear-gradient(var(--section-accent), var(--section-accent)) 3px 8px / 6px 1.5px no-repeat;
}

.section-icon-glossary::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 7px;
  width: 3px;
  height: 11px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--section-accent) 72%, #ffffff);
}

.dashboard-section-tabs-primary {
  grid-template-columns: repeat(2, 138px);
  gap: 10px;
  align-self: center;
  width: max-content;
  padding-top: 0;
}

.dashboard-section-tabs-primary .dashboard-section-button,
.dashboard-section-tabs-primary .dashboard-section-button:not(.is-active),
.dashboard-section-tabs-primary .dashboard-section-button.is-active,
.dashboard-section-tabs-primary .dashboard-section-button:hover {
  --section-accent: #006c7a;
  display: grid;
  grid-template-rows: 54px minmax(0, 1fr);
  justify-items: center;
  align-items: center;
  gap: 7px;
  width: 138px;
  min-width: 0;
  min-height: 104px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  background:
    radial-gradient(circle at 26% 18%, rgba(255, 255, 255, 0.98), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(246, 248, 252, 0.76));
  color: #475569;
  padding: 12px 12px 11px;
  text-align: center;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.95),
    0 12px 28px rgba(25, 35, 58, 0.07);
  transform: none;
}

.dashboard-section-tabs-primary .dashboard-section-button > span {
  position: relative;
  z-index: 2;
}

.dashboard-section-tabs-primary .dashboard-section-button > span:not(.section-icon) {
  align-self: start;
  max-width: 112px;
  color: inherit;
  font-size: 10.5px;
  font-weight: 780;
  line-height: 1.12;
  letter-spacing: 0;
}

.dashboard-section-tabs-primary .dashboard-section-button:hover {
  border-color: color-mix(in srgb, var(--section-accent) 26%, rgba(148, 163, 184, 0.22));
  color: var(--ink);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.96),
    0 16px 34px color-mix(in srgb, var(--section-accent) 12%, rgba(25, 35, 58, 0.08));
  transform: translateY(-1px);
}

.dashboard-section-tabs-primary .dashboard-section-button:not(.is-coming-soon).is-active {
  border-color: color-mix(in srgb, var(--section-accent) 46%, rgba(255, 255, 255, 0.9));
  background:
    radial-gradient(circle at 50% 24%, color-mix(in srgb, var(--section-accent) 18%, transparent), transparent 44%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), color-mix(in srgb, var(--section-accent) 9%, rgba(245, 249, 255, 0.94)));
  color: var(--ink);
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--section-accent) 11%, transparent),
    0 18px 38px color-mix(in srgb, var(--section-accent) 18%, rgba(25, 35, 58, 0.1)),
    inset 0 1px 1px rgba(255, 255, 255, 0.96);
}

.dashboard-section-tabs-primary .dashboard-section-button:not(.is-coming-soon).is-active::after {
  content: "";
  position: absolute;
  inset: 9px;
  z-index: 0;
  border-radius: 14px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--section-accent) 18%, transparent), transparent 58%),
    radial-gradient(circle at 74% 26%, color-mix(in srgb, var(--section-accent) 24%, transparent), transparent 22%);
  opacity: 1;
  transform: none;
  pointer-events: none;
}

.dashboard-section-tabs-primary .dashboard-section-button.is-coming-soon {
  opacity: 1;
  cursor: not-allowed;
}

.dashboard-section-tabs-primary .dashboard-section-button.is-coming-soon::after {
  content: "В разработке";
  right: -18px;
  bottom: 10px;
  z-index: 1;
  width: 118px;
  padding: 3px 0;
  transform: rotate(-15deg);
  color: color-mix(in srgb, var(--section-accent) 68%, #64748b);
  opacity: 0.2;
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.dashboard-section-button.is-coming-soon::after,
.dashboard-section-tabs-primary .dashboard-section-button.is-coming-soon::after {
  content: none;
  display: none;
}

.dashboard-section-tabs-primary .section-icon {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.95), transparent 30%),
    linear-gradient(145deg, color-mix(in srgb, var(--section-accent) 28%, #ffffff), color-mix(in srgb, var(--section-accent) 74%, #ffffff));
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.78),
    inset 0 -10px 22px color-mix(in srgb, var(--section-accent) 20%, transparent),
    0 10px 22px color-mix(in srgb, var(--section-accent) 18%, rgba(25, 35, 58, 0.08));
}

.dashboard-section-tabs-primary .section-icon::before,
.dashboard-section-tabs-primary .section-icon::after {
  z-index: 1;
}

.dashboard-section-tabs-primary .dashboard-section-button[data-dashboard-section="product"],
.dashboard-section-tabs-primary .dashboard-section-button[data-dashboard-section="product"] .section-icon {
  --section-accent: #006c7a;
}

.dashboard-section-tabs-primary .dashboard-section-button[data-dashboard-section="finance"],
.dashboard-section-tabs-primary .dashboard-section-button[data-dashboard-section="finance"] .section-icon {
  --section-accent: #f2b705;
}

.dashboard-section-tabs-primary .dashboard-section-button-players,
.dashboard-section-tabs-primary .dashboard-section-button-players .section-icon {
  --section-accent: #ff9f0a;
}

.dashboard-section-tabs-primary .dashboard-section-button-hypothesis,
.dashboard-section-tabs-primary .dashboard-section-button-hypothesis .section-icon {
  --section-accent: #00c8ff;
}

.dashboard-section-tabs-primary .section-icon-product::before {
  left: 15px;
  top: 14px;
  width: 8px;
  height: 8px;
  box-shadow:
    13px 9px 0 var(--section-accent),
    23px 25px 0 var(--section-accent);
}

.dashboard-section-tabs-primary .section-icon-product::after {
  left: 19px;
  top: 20px;
  width: 20px;
  height: 17px;
  border-top-width: 3px;
  border-right-width: 3px;
  border-radius: 7px;
  opacity: 0.95;
}

.dashboard-section-tabs-primary .section-icon-finance::before {
  width: 31px;
  height: 31px;
  background:
    radial-gradient(circle at 34% 26%, rgba(255, 255, 255, 0.98), transparent 28%),
    linear-gradient(135deg, #fff6b8 0%, var(--section-accent) 48%, #d79800 100%);
  box-shadow:
    inset 0 0 0 1px rgba(174, 107, 0, 0.38),
    inset 0 0 0 7px rgba(255, 255, 255, 0.24),
    0 5px 12px rgba(174, 107, 0, 0.22);
}

.dashboard-section-tabs-primary .section-icon-finance::after {
  right: 15px;
  width: 5px;
  height: 25px;
}

.dashboard-section-tabs-primary .section-icon-players::before {
  left: 14px;
  top: 13px;
  width: 9px;
  height: 9px;
  box-shadow: 16px 2px 0 color-mix(in srgb, var(--section-accent) 66%, #ffffff);
}

.dashboard-section-tabs-primary .section-icon-players::after {
  left: 11px;
  bottom: 12px;
  width: 31px;
  height: 16px;
  background:
    radial-gradient(ellipse at 27% 100%, var(--section-accent) 0 11px, transparent 11.5px),
    radial-gradient(ellipse at 78% 100%, color-mix(in srgb, var(--section-accent) 66%, #ffffff) 0 10px, transparent 10.5px);
}

.dashboard-section-tabs-primary .section-icon-hypothesis::before {
  left: 12px;
  top: 30px;
  width: 29px;
  height: 4px;
  border-radius: 999px;
  transform: rotate(-42deg);
}

.dashboard-section-tabs-primary .section-icon-hypothesis::after {
  right: 8px;
  top: 7px;
  font-size: 26px;
  text-shadow:
    -18px 17px 0 color-mix(in srgb, var(--section-accent) 42%, transparent),
    -4px 29px 0 color-mix(in srgb, var(--section-accent) 30%, transparent);
}

@media (prefers-reduced-motion: no-preference) {
  .dashboard-section-tabs-primary .section-icon {
    animation: primary-section-icon-breathe 4.2s ease-in-out infinite;
  }

  .dashboard-section-tabs-primary .dashboard-section-button:nth-child(2) .section-icon {
    animation-delay: 500ms;
  }

  .dashboard-section-tabs-primary .dashboard-section-button:nth-child(3) .section-icon {
    animation-delay: 900ms;
  }

  .dashboard-section-tabs-primary .dashboard-section-button:nth-child(4) .section-icon {
    animation-delay: 1300ms;
  }

  .dashboard-section-tabs-primary .dashboard-section-button:hover .section-icon,
  .dashboard-section-tabs-primary .dashboard-section-button.is-active .section-icon {
    animation-duration: 2.2s;
    transform: translateY(-2px) scale(1.04);
  }
}

@keyframes primary-section-icon-breathe {
  0%,
  100% {
    transform: translateY(0) scale(1);
    filter: saturate(1);
  }
  50% {
    transform: translateY(-2px) scale(1.025);
    filter: saturate(1.08);
  }
}

/* Compact Apple-style liquid receiver for the primary dashboard sections. */
.dashboard-section-tabs-primary {
  --receiver-cell-w: 128px;
  --receiver-height: var(--primary-tabs-height, 160px);
  --receiver-cell-h: calc((var(--receiver-height) - 20px) / 2);
  --receiver-gap: 6px;
  --receiver-pad: 6px;
  --receiver-active: #006c7a;
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, var(--receiver-cell-w));
  grid-template-rows: repeat(2, var(--receiver-cell-h));
  gap: var(--receiver-gap);
  align-self: start;
  width: max-content;
  height: var(--receiver-height);
  max-height: var(--receiver-height);
  margin-top: var(--primary-tabs-offset, 0px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 30px;
  padding: var(--receiver-pad);
  background:
    radial-gradient(circle at 24% 14%, rgba(255, 255, 255, 0.9), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.66), rgba(238, 244, 251, 0.38));
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.92),
    inset 0 -16px 32px rgba(148, 163, 184, 0.08),
    0 16px 42px rgba(25, 35, 58, 0.08);
  backdrop-filter: blur(18px) saturate(1.18);
  -webkit-backdrop-filter: blur(18px) saturate(1.18);
}

.dashboard-section-tabs-primary::before {
  content: "";
  position: absolute;
  top: var(--receiver-pad);
  left: var(--receiver-pad);
  z-index: 0;
  width: var(--receiver-cell-w);
  height: var(--receiver-cell-h);
  border: 1px solid color-mix(in srgb, var(--receiver-active) 44%, rgba(255, 255, 255, 0.92));
  border-radius: 24px;
  background:
    radial-gradient(circle at 21% 16%, rgba(255, 255, 255, 0.96), transparent 20%),
    radial-gradient(circle at 70% 28%, color-mix(in srgb, var(--receiver-active) 18%, transparent), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), color-mix(in srgb, var(--receiver-active) 13%, rgba(239, 247, 255, 0.92)));
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--receiver-active) 10%, transparent),
    0 16px 34px color-mix(in srgb, var(--receiver-active) 18%, rgba(25, 35, 58, 0.08)),
    inset 0 1px 2px rgba(255, 255, 255, 0.96),
    inset 0 -18px 28px color-mix(in srgb, var(--receiver-active) 9%, transparent);
  transform: translate(0, 0);
  transition:
    transform 260ms cubic-bezier(0.2, 0.86, 0.2, 1),
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.dashboard-section-tabs-primary:has(.dashboard-section-button-players.is-active)::before {
  transform: translate(calc(var(--receiver-cell-w) + var(--receiver-gap)), 0);
}

.dashboard-section-tabs-primary:has(.dashboard-section-button[data-dashboard-section="finance"].is-active) {
  --receiver-active: #f0aa14;
}

.dashboard-section-tabs-primary:has(.dashboard-section-button[data-dashboard-section="finance"].is-active)::before {
  transform: translate(0, calc(var(--receiver-cell-h) + var(--receiver-gap)));
}

.dashboard-section-tabs-primary:has(.dashboard-section-button-hypothesis.is-active) {
  --receiver-active: #00c8ff;
}

.dashboard-section-tabs-primary:has(.dashboard-section-button-hypothesis.is-active)::before {
  transform: translate(calc(var(--receiver-cell-w) + var(--receiver-gap)), calc(var(--receiver-cell-h) + var(--receiver-gap)));
}

.dashboard-section-tabs-primary .dashboard-section-button,
.dashboard-section-tabs-primary .dashboard-section-button:not(.is-active),
.dashboard-section-tabs-primary .dashboard-section-button.is-active,
.dashboard-section-tabs-primary .dashboard-section-button:hover {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 38px minmax(0, 1fr);
  justify-items: center;
  align-items: center;
  gap: 0;
  width: var(--receiver-cell-w);
  min-width: 0;
  height: var(--receiver-cell-h);
  min-height: 0;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 24px;
  background: transparent;
  color: #5f6b7d;
  padding: 5px 8px 4px;
  text-align: center;
  box-shadow: none;
  transform: none;
}

.dashboard-section-tabs-primary .dashboard-section-button {
  z-index: 1;
}

.dashboard-section-tabs-primary .dashboard-section-button:not(.is-coming-soon):hover {
  color: var(--ink);
}

.dashboard-section-tabs-primary .dashboard-section-button:not(.is-coming-soon).is-active {
  border-color: transparent;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}

.dashboard-section-tabs-primary .dashboard-section-button:not(.is-coming-soon).is-active::after {
  display: none;
}

.dashboard-section-tabs-primary .dashboard-section-button > span {
  position: relative;
  z-index: 2;
}

.dashboard-section-tabs-primary .dashboard-section-button > span:not(.section-icon) {
  align-self: center;
  max-width: 104px;
  color: inherit;
  font-size: 10px;
  font-weight: 850;
  line-height: 1.02;
  letter-spacing: 0;
  text-align: center;
}

.dashboard-section-tabs-primary .dashboard-section-button.is-coming-soon {
  opacity: 1;
  color: #6f7b8c;
}

.dashboard-section-tabs-primary .dashboard-section-button.is-coming-soon > span:not(.section-icon) {
  max-width: 98px;
}

.dashboard-section-tabs-primary .dashboard-section-button.is-coming-soon::after {
  content: "В разработке";
  position: absolute;
  top: 7px;
  right: -24px;
  z-index: 1;
  width: 108px;
  padding: 2px 0;
  transform: rotate(-16deg);
  background: transparent;
  color: color-mix(in srgb, var(--section-accent) 62%, #64748b);
  opacity: 0.22;
  font-size: 7px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
  pointer-events: none;
}

.dashboard-section-tabs-primary .dashboard-section-button.is-coming-soon::after {
  content: none;
  display: none;
}

.dashboard-section-tabs-primary .section-icon {
  width: 38px;
  height: 38px;
  border-radius: 17px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.98), transparent 28%),
    linear-gradient(145deg, color-mix(in srgb, var(--section-accent) 17%, #ffffff), color-mix(in srgb, var(--section-accent) 70%, #ffffff));
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.86),
    inset 0 -10px 22px color-mix(in srgb, var(--section-accent) 18%, transparent),
    0 9px 18px color-mix(in srgb, var(--section-accent) 18%, rgba(25, 35, 58, 0.08));
}

.dashboard-section-tabs-primary .dashboard-section-button[data-dashboard-section="product"],
.dashboard-section-tabs-primary .dashboard-section-button[data-dashboard-section="product"] .section-icon {
  --section-accent: #006c7a;
}

.dashboard-section-tabs-primary .dashboard-section-button[data-dashboard-section="finance"],
.dashboard-section-tabs-primary .dashboard-section-button[data-dashboard-section="finance"] .section-icon {
  --section-accent: #f0aa14;
}

.dashboard-section-tabs-primary .dashboard-section-button-players,
.dashboard-section-tabs-primary .dashboard-section-button-players .section-icon {
  --section-accent: #ff9f0a;
}

.dashboard-section-tabs-primary .dashboard-section-button-hypothesis,
.dashboard-section-tabs-primary .dashboard-section-button-hypothesis .section-icon {
  --section-accent: #00c8ff;
}

.dashboard-section-tabs-primary .section-icon-product::before {
  left: 10px;
  top: 10px;
  width: 6px;
  height: 6px;
  box-shadow:
    10px 7px 0 var(--section-accent),
    18px 20px 0 var(--section-accent);
}

.dashboard-section-tabs-primary .section-icon-product::after {
  left: 13px;
  top: 15px;
  width: 17px;
  height: 13px;
  border-top-width: 3px;
  border-right-width: 3px;
  border-radius: 7px;
  opacity: 0.96;
}

.dashboard-section-tabs-primary .section-icon-finance::before {
  content: "\20BD";
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.98), transparent 28%),
    linear-gradient(145deg, #fff8ca 0%, #ffd75a 42%, #f0aa14 100%);
  color: #7a4d00;
  font-size: 16px;
  font-weight: 950;
  line-height: 1;
  box-shadow:
    inset 0 0 0 1px rgba(150, 94, 0, 0.3),
    inset 0 -5px 9px rgba(141, 81, 0, 0.12),
    0 5px 13px rgba(201, 134, 0, 0.2);
  transform: translate(-50%, -50%);
}

.dashboard-section-tabs-primary .section-icon-finance::after {
  content: "";
  position: absolute;
  left: 11px;
  top: 8px;
  width: 11px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  opacity: 0.9;
  transform: rotate(-24deg);
}

.dashboard-section-tabs-primary .section-icon-players::before {
  left: 9px;
  bottom: 10px;
  width: 22px;
  height: 15px;
  border-left: 3px solid var(--section-accent);
  border-bottom: 3px solid var(--section-accent);
  border-radius: 0 0 0 8px;
  background: transparent;
  box-shadow: 0 7px 14px color-mix(in srgb, var(--section-accent) 18%, transparent);
}

.dashboard-section-tabs-primary .section-icon-players::after {
  left: 12px;
  top: 11px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--section-accent);
  box-shadow:
    9px 9px 0 color-mix(in srgb, var(--section-accent) 78%, #ffffff),
    19px 2px 0 color-mix(in srgb, var(--section-accent) 55%, #ffffff);
}

.dashboard-section-tabs-primary .section-icon-hypothesis::before {
  left: 9px;
  top: 22px;
  width: 22px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.98) 0 28%, var(--section-accent) 28% 100%);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--section-accent) 18%, transparent),
    0 5px 10px color-mix(in srgb, var(--section-accent) 18%, transparent);
  transform: rotate(-42deg);
}

.dashboard-section-tabs-primary .section-icon-hypothesis::after {
  content: "\2726";
  right: 6px;
  top: 3px;
  color: var(--section-accent);
  font-size: 20px;
  line-height: 1;
  font-weight: 900;
  text-shadow:
    -14px 15px 0 color-mix(in srgb, var(--section-accent) 38%, transparent),
    -2px 23px 0 color-mix(in srgb, var(--section-accent) 24%, transparent);
}

@media (prefers-reduced-motion: no-preference) {
  .dashboard-section-tabs-primary .section-icon {
    animation: primary-receiver-icon-float 4.6s ease-in-out infinite;
  }

  .dashboard-section-tabs-primary .dashboard-section-button:nth-child(2) .section-icon {
    animation-delay: 420ms;
  }

  .dashboard-section-tabs-primary .dashboard-section-button:nth-child(3) .section-icon {
    animation-delay: 760ms;
  }

  .dashboard-section-tabs-primary .dashboard-section-button:nth-child(4) .section-icon {
    animation-delay: 1120ms;
  }

  .dashboard-section-tabs-primary .dashboard-section-button:hover .section-icon,
  .dashboard-section-tabs-primary .dashboard-section-button.is-active .section-icon {
    animation-duration: 2.4s;
  }

  .dashboard-section-tabs-primary .dashboard-section-button[data-dashboard-section="finance"]:hover .section-icon-finance::before {
    animation: primary-receiver-coin-pulse 760ms cubic-bezier(0.2, 0.8, 0.2, 1);
  }

  .dashboard-section-tabs-primary .dashboard-section-button[data-dashboard-section="finance"]:hover .section-icon-finance::after {
    animation: none;
  }
}

@keyframes primary-receiver-icon-float {
  0%,
  100% {
    transform: translateY(0) scale(1);
    filter: saturate(1);
  }
  50% {
    transform: translateY(-1px) scale(1.025);
    filter: saturate(1.08);
  }
}

@keyframes primary-receiver-coin-pulse {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
  48% {
    transform: translate(-50%, -50%) scale(1.08) rotateY(24deg);
  }
}

.report-actions-panel {
  --report-cell-w: 118px;
  --report-height: var(--primary-tabs-height, 160px);
  --report-cell-h: calc((var(--report-height) - 20px) / 2);
  grid-area: report-actions;
  display: grid;
  grid-template-columns: repeat(2, var(--report-cell-w));
  grid-template-rows: repeat(2, var(--report-cell-h));
  gap: 6px;
  align-self: start;
  justify-self: start;
  width: max-content;
  height: var(--report-height);
  margin-top: var(--primary-tabs-offset, 0px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 30px;
  padding: 6px;
  background:
    radial-gradient(circle at 24% 14%, rgba(255, 255, 255, 0.92), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.64), rgba(238, 244, 251, 0.36));
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.92),
    inset 0 -16px 32px rgba(148, 163, 184, 0.08),
    0 16px 42px rgba(25, 35, 58, 0.08);
  backdrop-filter: blur(18px) saturate(1.18);
  -webkit-backdrop-filter: blur(18px) saturate(1.18);
}

.report-action-button {
  --report-accent: #0a84ff;
  position: relative;
  display: grid;
  grid-template-rows: 38px minmax(0, 1fr);
  justify-items: center;
  align-items: center;
  gap: 0;
  width: var(--report-cell-w);
  height: var(--report-cell-h);
  min-height: 0;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 24px;
  background:
    radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.96), transparent 30%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), color-mix(in srgb, var(--report-accent) 6%, rgba(248, 250, 252, 0.72)));
  color: #5f6b7d;
  padding: 5px 8px 4px;
  font: inherit;
  font-size: 10px;
  font-weight: 850;
  line-height: 1.02;
  letter-spacing: 0;
  text-align: center;
  cursor: pointer;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.92),
    0 8px 18px rgba(25, 35, 58, 0.04);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease,
    transform 160ms ease,
    background 160ms ease;
}

.report-action-button:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--report-accent) 30%, rgba(255, 255, 255, 0.86));
  background:
    radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.98), transparent 30%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), color-mix(in srgb, var(--report-accent) 13%, rgba(248, 250, 252, 0.86)));
  color: var(--ink);
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--report-accent) 9%, transparent),
    0 14px 30px color-mix(in srgb, var(--report-accent) 14%, rgba(25, 35, 58, 0.08)),
    inset 0 1px 1px rgba(255, 255, 255, 0.96);
}

.report-action-button > span {
  position: relative;
  z-index: 1;
}

.report-action-button > span:not(.report-action-icon) {
  max-width: 102px;
}

.report-action-icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 17px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.98), transparent 28%),
    linear-gradient(145deg, color-mix(in srgb, var(--report-accent) 18%, #ffffff), color-mix(in srgb, var(--report-accent) 70%, #ffffff));
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.86),
    inset 0 -10px 22px color-mix(in srgb, var(--report-accent) 18%, transparent),
    0 9px 18px color-mix(in srgb, var(--report-accent) 18%, rgba(25, 35, 58, 0.08));
  transform-origin: center;
  transition:
    box-shadow 180ms ease,
    filter 180ms ease,
    transform 180ms ease;
}

.report-action-icon::before,
.report-action-icon::after {
  content: "";
  position: absolute;
}

.report-action-pdf {
  --report-accent: #ff453a;
}

.report-action-raw {
  --report-accent: #5e5ce6;
}

.report-action-compare {
  --report-accent: #30d158;
}

.report-action-comment {
  --report-accent: #7c5cff;
}

.report-action-icon-pdf::before {
  width: 18px;
  height: 22px;
  border: 2px solid var(--report-accent);
  border-radius: 5px;
  background:
    linear-gradient(var(--report-accent), var(--report-accent)) 4px 13px / 10px 2px no-repeat,
    linear-gradient(var(--report-accent), var(--report-accent)) 4px 17px / 8px 2px no-repeat,
    rgba(255, 255, 255, 0.72);
}

.report-action-icon-pdf::after {
  right: 9px;
  top: 8px;
  width: 8px;
  height: 8px;
  border-left: 2px solid var(--report-accent);
  border-bottom: 2px solid var(--report-accent);
  background: rgba(255, 255, 255, 0.86);
  transform: rotate(-90deg);
}

.report-action-icon-raw::before {
  width: 21px;
  height: 21px;
  border-radius: 7px;
  background:
    linear-gradient(var(--report-accent), var(--report-accent)) 7px 4px / 2px 14px no-repeat,
    linear-gradient(var(--report-accent), var(--report-accent)) 13px 4px / 2px 14px no-repeat,
    linear-gradient(var(--report-accent), var(--report-accent)) 4px 9px / 14px 2px no-repeat,
    linear-gradient(var(--report-accent), var(--report-accent)) 4px 15px / 14px 2px no-repeat;
  box-shadow: inset 0 0 0 2px var(--report-accent);
}

.report-action-icon-compare::before {
  left: 9px;
  bottom: 9px;
  width: 5px;
  height: 15px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--report-accent) 58%, #ffffff);
  box-shadow:
    8px -6px 0 0 var(--report-accent),
    16px -11px 0 0 color-mix(in srgb, var(--report-accent) 72%, #ffffff);
}

.report-action-icon-compare::after {
  left: 11px;
  top: 11px;
  width: 17px;
  height: 12px;
  border-top: 2px solid var(--report-accent);
  border-right: 2px solid var(--report-accent);
  border-radius: 4px;
  transform: skewY(-22deg);
}

.report-action-icon-comment::before {
  width: 23px;
  height: 18px;
  border-radius: 9px;
  background:
    radial-gradient(circle at 7px 8px, #ffffff 0 2px, transparent 2.5px),
    radial-gradient(circle at 13px 8px, #ffffff 0 2px, transparent 2.5px),
    radial-gradient(circle at 19px 8px, #ffffff 0 2px, transparent 2.5px),
    linear-gradient(145deg, var(--report-accent), color-mix(in srgb, var(--report-accent) 58%, #ffffff));
}

.report-action-icon-comment::after {
  right: 9px;
  bottom: 8px;
  width: 8px;
  height: 8px;
  border-radius: 0 0 8px 0;
  background: var(--report-accent);
  transform: rotate(28deg);
}

@media (prefers-reduced-motion: no-preference) {
  .report-action-icon {
    animation: report-action-icon-breathe 4.8s ease-in-out infinite;
  }

  .report-action-raw .report-action-icon {
    animation-delay: 420ms;
  }

  .report-action-compare .report-action-icon {
    animation-delay: 840ms;
  }

  .report-action-comment .report-action-icon {
    animation-delay: 1260ms;
  }

  .report-action-button:hover .report-action-icon {
    animation: report-action-icon-pop 680ms cubic-bezier(0.2, 0.86, 0.2, 1);
    filter: saturate(1.14);
    box-shadow:
      inset 0 1px 2px rgba(255, 255, 255, 0.9),
      inset 0 -10px 22px color-mix(in srgb, var(--report-accent) 24%, transparent),
      0 13px 24px color-mix(in srgb, var(--report-accent) 26%, rgba(25, 35, 58, 0.1));
  }

  .report-action-pdf:hover .report-action-icon-pdf::before {
    animation: report-pdf-page-wake 680ms cubic-bezier(0.2, 0.86, 0.2, 1);
  }

  .report-action-pdf:hover .report-action-icon-pdf::after {
    animation: report-pdf-fold-wake 680ms cubic-bezier(0.2, 0.86, 0.2, 1);
  }

  .report-action-raw .report-action-icon-raw::before {
    animation: report-raw-grid-pulse 3.8s ease-in-out infinite;
  }

  .report-action-raw:hover .report-action-icon-raw::before {
    animation: report-raw-grid-wake 680ms cubic-bezier(0.2, 0.86, 0.2, 1);
  }

  .report-action-compare .report-action-icon-compare::before {
    animation: report-compare-bars 3.6s ease-in-out infinite;
  }

  .report-action-compare .report-action-icon-compare::after {
    animation: report-compare-line 3.6s ease-in-out infinite;
  }

  .report-action-compare:hover .report-action-icon-compare::before,
  .report-action-compare:hover .report-action-icon-compare::after {
    animation-duration: 720ms;
  }

  .report-action-comment .report-action-icon-comment::before {
    animation: report-comment-bubble 4.1s ease-in-out infinite;
  }

  .report-action-comment .report-action-icon-comment::after {
    animation: report-comment-tail 4.1s ease-in-out infinite;
  }

  .report-action-comment:hover .report-action-icon-comment::before,
  .report-action-comment:hover .report-action-icon-comment::after {
    animation-duration: 720ms;
  }
}

@keyframes report-action-icon-breathe {
  0%,
  100% {
    transform: translateY(0) scale(1);
    filter: saturate(1);
  }
  50% {
    transform: translateY(-1px) scale(1.025);
    filter: saturate(1.08);
  }
}

@keyframes report-action-icon-pop {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  45% {
    transform: translateY(-2px) scale(1.08);
  }
}

@keyframes report-pdf-page-wake {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  44% {
    transform: translateY(-2px) rotate(-4deg);
  }
}

@keyframes report-pdf-fold-wake {
  0%,
  100% {
    transform: rotate(-90deg) translate(0, 0);
  }
  44% {
    transform: rotate(-90deg) translate(-1px, 1px);
  }
}

@keyframes report-raw-grid-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.94;
  }
  50% {
    transform: scale(1.045);
    opacity: 1;
  }
}

@keyframes report-raw-grid-wake {
  0%,
  100% {
    transform: scale(1) rotate(0deg);
  }
  45% {
    transform: scale(1.12) rotate(3deg);
  }
}

@keyframes report-compare-bars {
  0%,
  100% {
    transform: translateY(0);
  }
  48% {
    transform: translateY(-2px);
  }
}

@keyframes report-compare-line {
  0%,
  100% {
    transform: skewY(-22deg) translate(0, 0);
  }
  48% {
    transform: skewY(-22deg) translate(1px, -2px);
  }
}

@keyframes report-comment-bubble {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  45% {
    transform: translateY(-1px) scale(1.04);
  }
}

@keyframes report-comment-tail {
  0%,
  100% {
    transform: rotate(28deg) translate(0, 0);
  }
  45% {
    transform: rotate(28deg) translate(1px, -1px);
  }
}

.report-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2400;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.report-dialog {
  width: min(720px, calc(100vw - 32px));
  max-height: min(720px, calc(100vh - 48px));
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 26px;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.98), transparent 32%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(239, 245, 252, 0.88));
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.96),
    0 28px 80px rgba(15, 23, 42, 0.26);
}

.report-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 10px;
}

.report-dialog-title {
  flex: 1 1 auto;
  min-width: 0;
}

.report-dialog-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.08;
  font-weight: 800;
}

.report-dialog-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.report-dialog-head-extra {
  flex: 0 0 auto;
  margin-left: auto;
}

.compare-range-form {
  display: grid;
  grid-template-columns: 96px 96px 34px;
  grid-template-areas:
    "caption caption caption"
    "from to submit";
  align-items: center;
  gap: 5px;
  width: 238px;
  padding: 8px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.95), transparent 32%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(241, 248, 255, 0.58));
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.92),
    0 10px 24px rgba(25, 35, 58, 0.06);
}

.compare-range-form span {
  grid-area: caption;
  color: var(--muted);
  font-size: 10px;
  line-height: 1;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.compare-range-form label {
  min-width: 0;
}

.compare-range-form label:first-of-type {
  grid-area: from;
}

.compare-range-form label:nth-of-type(2) {
  grid-area: to;
}

.compare-range-form input {
  width: 100%;
  height: 28px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  padding: 0 6px;
  font: inherit;
  font-size: 10px;
  font-weight: 750;
  outline: none;
}

.compare-range-form input:focus {
  border-color: rgba(10, 132, 255, 0.42);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.1);
}

.compare-range-form button {
  grid-area: submit;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 28px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(10, 132, 255, 0.2);
}

.compare-range-form button:disabled {
  opacity: 0.5;
  cursor: wait;
}

.compare-range-form.is-invalid {
  border-color: rgba(255, 59, 48, 0.34);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.92),
    0 0 0 4px rgba(255, 59, 48, 0.08);
}

.report-dialog-close {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--muted);
  font: inherit;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.92),
    0 8px 20px rgba(25, 35, 58, 0.08);
}

.report-dialog-body {
  display: grid;
  gap: 12px;
  padding: 8px 18px 18px;
}

.feedback-form {
  display: grid;
  gap: 14px;
}

.feedback-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.feedback-form textarea {
  width: 100%;
  min-height: 172px;
  resize: vertical;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.96), transparent 34%),
    rgba(255, 255, 255, 0.84);
  color: var(--ink);
  padding: 13px 14px;
  font: inherit;
  font-size: 14px;
  line-height: 1.45;
  outline: none;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.92),
    0 10px 24px rgba(25, 35, 58, 0.06);
}

.feedback-form textarea:focus {
  border-color: rgba(10, 132, 255, 0.38);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.96),
    0 0 0 4px rgba(10, 132, 255, 0.1),
    0 12px 28px rgba(25, 35, 58, 0.08);
}

.feedback-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.feedback-form-status {
  min-height: 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.feedback-form-status.is-success {
  color: #067647;
}

.feedback-form-status.is-error {
  color: #b42318;
}

.report-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.report-choice-button {
  --choice-accent: #0a84ff;
  min-height: 82px;
  border: 1px solid color-mix(in srgb, var(--choice-accent) 20%, rgba(255, 255, 255, 0.86));
  border-radius: 20px;
  background:
    radial-gradient(circle at 20% 16%, rgba(255, 255, 255, 0.98), transparent 30%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), color-mix(in srgb, var(--choice-accent) 9%, rgba(248, 250, 252, 0.88)));
  color: var(--ink);
  padding: 14px;
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.94),
    0 12px 28px color-mix(in srgb, var(--choice-accent) 10%, rgba(25, 35, 58, 0.08));
}

.report-choice-button strong,
.report-choice-button span {
  display: block;
}

.report-choice-button strong {
  font-size: 15px;
  line-height: 1.1;
  font-weight: 850;
}

.report-choice-button span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  font-weight: 650;
}

.report-choice-csv {
  --choice-accent: #5e5ce6;
}

.report-choice-xls {
  --choice-accent: #30d158;
}

.report-compare-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
}

.report-compare-table th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-align: left;
}

.report-compare-table td {
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
}

.report-compare-table td:first-child {
  border-radius: 14px 0 0 14px;
}

.report-compare-table td:last-child {
  border-radius: 0 14px 14px 0;
}

.report-delta-positive {
  color: #168b45 !important;
}

.report-delta-negative {
  color: #b42318 !important;
}

.report-delta-neutral {
  color: var(--muted) !important;
}

.smart-comment-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.smart-comment-list li {
  position: relative;
  min-height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.66);
  color: #243044;
  padding: 11px 12px 11px 34px;
  font-size: 13px;
  line-height: 1.32;
  font-weight: 650;
}

.smart-comment-list li::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 17px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #7c5cff;
  box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.12);
}

.report-dialog-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 650;
}

.metrics {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.metrics[data-section="finance"] {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.metrics[data-section="players"] {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.players-insight-panel {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.player-data-note {
  max-width: 460px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
  font-weight: 650;
  text-align: right;
}

.players-analysis-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(0, 1.25fr);
  gap: 14px;
  align-items: start;
}

.players-analysis-block {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.86);
}

.players-cohort-block,
.players-reactivation-block,
.players-bookmaker-block {
  grid-column: 1 / -1;
}

.players-segmentation-block,
.players-threshold-block {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.86);
}

.players-segmentation-chart-shell {
  position: relative;
  min-height: 260px;
  overflow-x: auto;
  overflow-y: hidden;
}

#players-segmentation-chart {
  display: block;
  width: 100%;
  min-width: 760px;
  height: 280px;
  min-height: 260px;
}

.players-threshold-block {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.players-threshold-tool {
  display: grid;
  grid-template-columns: minmax(220px, 0.44fr) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  min-width: 0;
}

.players-threshold-dates,
.players-threshold-sliders {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.players-threshold-dates {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.player-threshold-date-button,
.player-threshold-slider {
  min-width: 0;
  max-width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.66);
  padding: 10px 12px;
}

.players-threshold-dates span,
.player-threshold-date-button em,
.player-threshold-slider span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.player-threshold-date-button {
  position: relative;
  min-height: 78px;
  padding: 12px 48px 12px 14px;
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.player-threshold-date-button::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 28px;
  width: 17px;
  height: 17px;
  border: 2px solid #0a84ff;
  border-radius: 5px;
  background:
    linear-gradient(#0a84ff, #0a84ff) 3px 5px / 11px 2px no-repeat,
    linear-gradient(#0a84ff, #0a84ff) 5px -1px / 2px 6px no-repeat,
    linear-gradient(#0a84ff, #0a84ff) 10px -1px / 2px 6px no-repeat,
    rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 5px rgba(10, 132, 255, 0.08);
}

.player-threshold-date-button:hover,
.player-threshold-date-button:focus-within {
  border-color: rgba(10, 132, 255, 0.46);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 24px rgba(10, 132, 255, 0.12);
  transform: translateY(-1px);
}

.player-threshold-date-button strong {
  display: block;
  margin-top: 9px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
}

.player-threshold-date-button em {
  margin-top: 7px;
  color: #0a84ff;
  font-style: normal;
  text-transform: none;
}

.player-threshold-date-button input[type="date"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.player-threshold-slider {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) max-content;
  gap: 8px 12px;
  align-items: center;
}

.player-threshold-slider strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.player-threshold-slider input[type="range"] {
  grid-column: 1 / -1;
  width: 100%;
  height: 26px;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
}

.player-threshold-slider input[type="range"]::-webkit-slider-runnable-track {
  height: 10px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(226, 232, 240, 0.9));
  box-shadow:
    inset 0 1px 2px rgba(15, 23, 42, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.86);
}

.player-threshold-slider input[type="range"]::-webkit-slider-thumb {
  width: 24px;
  height: 24px;
  margin-top: -7px;
  border: 3px solid #0a84ff;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 6px 16px rgba(10, 132, 255, 0.26);
  appearance: none;
  -webkit-appearance: none;
}

.player-threshold-slider input[type="range"]::-moz-range-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.9);
}

.player-threshold-slider input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border: 3px solid #0a84ff;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 6px 16px rgba(10, 132, 255, 0.26);
}

.player-threshold-table {
  min-width: 760px;
}

#players-threshold-table {
  min-width: 0;
  max-width: 100%;
}

.player-cohort-matrix {
  display: grid;
  gap: 9px;
  overflow: auto;
  padding: 4px 2px 8px;
  scrollbar-color: rgba(15, 23, 42, 0.28) transparent;
}

.player-cohort-head,
.player-cohort-row {
  display: grid;
  grid-template-columns: 150px repeat(var(--cohort-columns), minmax(88px, 1fr));
  gap: 8px;
  min-width: calc(150px + var(--cohort-columns) * 96px);
  align-items: stretch;
}

.player-cohort-head {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-align: center;
}

.player-cohort-head span {
  min-height: 28px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.5);
  padding-top: 7px;
}

.player-cohort-label,
.player-cohort-cell {
  min-width: 0;
  border-radius: 14px;
  padding: 10px;
}

.player-cohort-label {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.1);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.86),
    0 8px 18px rgba(15, 23, 42, 0.04);
}

.player-cohort-label strong,
.player-cohort-label span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-cohort-cell strong,
.player-cohort-cell span {
  display: block;
  min-width: 0;
  white-space: nowrap;
}

.player-cohort-label strong,
.player-cohort-cell strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.player-cohort-label span,
.player-cohort-cell span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.player-cohort-cell {
  position: relative;
  min-height: 66px;
  border: 1px solid rgba(255, 255, 255, 0.66);
  background: rgba(255, 255, 255, 0.76);
  padding-bottom: 20px;
  text-align: center;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.86),
    0 10px 24px rgba(15, 23, 42, 0.05);
}

.player-cohort-month-badge {
  position: absolute;
  right: 9px;
  bottom: 7px;
  color: rgba(71, 85, 105, 0.72);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  pointer-events: none;
}

.player-cohort-tone-excellent {
  background:
    linear-gradient(180deg, rgba(210, 255, 225, 0.98), rgba(116, 220, 143, 0.62));
  border-color: rgba(48, 209, 88, 0.26);
}

.player-cohort-tone-good {
  background:
    linear-gradient(180deg, rgba(215, 245, 255, 0.98), rgba(100, 210, 255, 0.44));
  border-color: rgba(50, 173, 230, 0.24);
}

.player-cohort-tone-watch {
  background:
    linear-gradient(180deg, rgba(255, 249, 218, 0.98), rgba(255, 214, 10, 0.42));
  border-color: rgba(255, 204, 0, 0.28);
}

.player-cohort-tone-weak {
  background:
    linear-gradient(180deg, rgba(255, 236, 218, 0.98), rgba(255, 159, 10, 0.42));
  border-color: rgba(255, 159, 10, 0.28);
}

.player-cohort-tone-critical,
.player-cohort-tone-zero {
  background:
    linear-gradient(180deg, rgba(255, 232, 236, 0.98), rgba(255, 55, 95, 0.3));
  border-color: rgba(255, 55, 95, 0.26);
}

.player-cohort-tone-empty {
  color: rgba(15, 23, 42, 0.52);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(248, 250, 252, 0.68));
  border-color: rgba(148, 163, 184, 0.08);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.72);
}

.player-cohort-tone-empty strong,
.player-cohort-tone-empty span {
  color: rgba(15, 23, 42, 0.5);
}

.player-reactivation-chart-shell {
  position: relative;
  min-height: 260px;
  overflow-x: auto;
  overflow-y: hidden;
}

#players-reactivation-chart {
  display: block;
  width: 100%;
  min-width: 760px;
  height: 280px;
  min-height: 260px;
}

.player-reactivation-sleep-track {
  fill: rgba(226, 232, 240, 0.32);
  stroke: rgba(255, 255, 255, 0.72);
  stroke-width: 1;
}

.player-reactivation-bar,
.player-reactivation-legend-bar {
  fill: url(#player-reactivation-bar-gradient);
  filter: drop-shadow(0 10px 18px rgba(14, 165, 233, 0.2));
}

.player-reactivation-sleep-line {
  fill: none;
  stroke: rgba(99, 102, 241, 0.82);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 6px 12px rgba(99, 102, 241, 0.16));
}

.player-reactivation-sleep-dot {
  fill: #ffffff;
  stroke: rgba(99, 102, 241, 0.92);
  stroke-width: 2.5;
  filter: drop-shadow(0 5px 12px rgba(99, 102, 241, 0.18));
}

.player-reactivation-rate-label,
.player-reactivation-sleep-label,
.player-reactivation-rule-label {
  fill: rgba(71, 85, 105, 0.78);
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Text",
    "Segoe UI",
    sans-serif;
  font-size: 9.5px;
  font-weight: 850;
}

.player-reactivation-sleep-label {
  fill: rgba(79, 70, 229, 0.76);
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 3px;
}

.player-reactivation-rule-label {
  font-size: 10px;
}

.player-reactivation-hit-zone {
  cursor: crosshair;
  pointer-events: all;
}

.player-table-wrap {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.56);
}

.player-table {
  min-width: 860px;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.player-table th,
.player-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  text-align: left;
  vertical-align: top;
}

.player-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(248, 250, 252, 0.92);
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.player-table-sort-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  max-width: 100%;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  padding: 0 8px;
  font: inherit;
  cursor: pointer;
}

.player-table-sort-button:hover,
.player-table-sort-button:focus-visible {
  background: rgba(10, 132, 255, 0.08);
  color: var(--ink);
  outline: none;
}

.player-table-sort-button.is-active {
  color: #0a84ff;
  background: rgba(10, 132, 255, 0.1);
}

.player-table-sort-button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-table-sort-button em {
  color: currentColor;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
  opacity: 0.72;
}

.player-table strong,
.player-table span {
  display: block;
  min-width: 0;
}

.player-table strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.player-table span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.player-table .player-table-sort-button span {
  display: inline;
  margin-top: 0;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.player-table .player-table-sort-button em {
  display: inline;
  margin-top: 0;
}

.players-coverage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.player-coverage-item {
  padding: 12px 13px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-left: 4px solid rgba(148, 163, 184, 0.5);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.86);
}

.player-coverage-item.finance-tone-positive {
  border-left-color: #30d158;
}

.player-coverage-item.finance-tone-warning {
  border-left-color: #ff9f0a;
}

.player-coverage-item.finance-tone-danger {
  border-left-color: #ff375f;
}

.player-coverage-item strong,
.player-coverage-item span,
.player-coverage-item em {
  display: block;
  min-width: 0;
}

.player-coverage-item strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.player-coverage-item span,
.player-coverage-item em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.3;
  font-style: normal;
  font-weight: 700;
}

.finance-import-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.finance-insight-panel {
  display: grid;
  gap: 14px;
}

.finance-insight-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.finance-insight-list {
  display: grid;
  gap: 12px;
}

.finance-contract-tabs {
  --contract-tab-count: 4;
  --contract-tab-gap: 4px;
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--contract-tab-gap);
  max-width: 560px;
  min-height: 46px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(229, 234, 241, 0.96), rgba(210, 218, 228, 0.9));
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.86),
    inset 0 2px 12px rgba(15, 23, 42, 0.07),
    inset 0 -1px 0 rgba(255, 255, 255, 0.66),
    0 14px 34px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(18px) saturate(1.2);
}

.finance-contract-tabs::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 5px;
  z-index: 0;
  width: calc((100% - 10px - (var(--contract-tab-gap) * (var(--contract-tab-count) - 1))) / var(--contract-tab-count));
  height: calc(100% - 10px);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 249, 253, 0.9));
  box-shadow:
    0 8px 20px rgba(15, 23, 42, 0.16),
    inset 0 0 0 1px rgba(255, 255, 255, 0.96),
    inset 0 -10px 22px rgba(10, 132, 255, 0.06);
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.finance-contract-tabs:has(.finance-contract-tab:nth-child(2).is-active)::before {
  transform: translateX(calc(100% + var(--contract-tab-gap)));
}

.finance-contract-tabs:has(.finance-contract-tab:nth-child(3).is-active)::before {
  transform: translateX(calc((100% + var(--contract-tab-gap)) * 2));
}

.finance-contract-tabs:has(.finance-contract-tab:nth-child(4).is-active)::before {
  transform: translateX(calc((100% + var(--contract-tab-gap)) * 3));
}

.finance-contract-tab {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #5f6b7c;
  font: inherit;
  font-size: 13px;
  font-weight: 880;
  letter-spacing: 0;
  cursor: pointer;
  transition:
    opacity 0.16s ease,
    color 0.16s ease,
    transform 0.16s ease;
}

.finance-contract-tab strong {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(213, 221, 232, 0.96), rgba(188, 199, 214, 0.78));
  color: inherit;
  font-size: 12px;
  line-height: 1;
  text-align: center;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.8);
}

.finance-contract-tab.is-active {
  color: var(--ink);
  background: transparent;
  box-shadow: none;
}

.finance-contract-tab.is-active strong {
  background:
    linear-gradient(180deg, rgba(232, 244, 255, 0.96), rgba(207, 231, 255, 0.82));
  color: #1d4ed8;
}

.finance-contract-tab:disabled {
  cursor: default;
  opacity: 0.42;
}

.finance-contract-visual {
  position: relative;
  overflow: visible;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(244, 250, 255, 0.9), rgba(255, 255, 255, 0.7) 46%, rgba(244, 255, 250, 0.72)),
    rgba(255, 255, 255, 0.72);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.88),
    0 18px 38px rgba(25, 35, 58, 0.06);
}

#finance-contract-chart {
  display: block;
  width: 100%;
  min-width: 0;
  height: auto;
}

.finance-contract-chart-bg {
  fill: rgba(255, 255, 255, 0.32);
}

.finance-contract-grid {
  stroke: rgba(20, 31, 52, 0.07);
  stroke-width: 1;
}

.finance-contract-chart-title {
  fill: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.finance-contract-legend text,
.finance-contract-chart-note,
.finance-contract-chart-name {
  fill: var(--muted);
  font-size: 11px;
  font-weight: 780;
}

.finance-contract-chart-note {
  fill: var(--ink);
  font-size: 10px;
}

.finance-contract-chart-note-detail,
.finance-contract-mg-target-label {
  fill: var(--muted);
  font-size: 9px;
  font-weight: 780;
}

.finance-contract-mg-target-line {
  stroke: #7c3aed;
  stroke-width: 2;
  stroke-dasharray: 6 5;
  stroke-linecap: round;
  filter: drop-shadow(0 2px 4px rgba(124, 58, 237, 0.18));
}

.finance-contract-mg-target-label {
  fill: #6d28d9;
}

.finance-contract-hit-zone {
  cursor: crosshair;
  pointer-events: all;
}

.chart-tooltip.is-contract-tooltip {
  min-width: 220px;
  max-width: min(310px, calc(100% - 18px));
  padding: 9px 10px;
}

.finance-contract-tooltip-list {
  margin-top: 6px;
}

.finance-contract-tooltip-grid {
  gap: 3px;
}

.finance-contract-tooltip-grid .chart-breakdown-header,
.finance-contract-tooltip-grid .chart-breakdown-row {
  grid-template-columns: 10px minmax(76px, 96px) minmax(82px, max-content);
  gap: 7px;
}

.finance-contract-tooltip-grid .chart-breakdown-row strong {
  font-size: 10px;
}

.finance-contract-tooltip-grid .chart-breakdown-value {
  min-width: 82px;
}

.finance-contract-tooltip-footer {
  display: grid;
  gap: 2px;
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.finance-contract-tooltip-footer span {
  color: rgba(255, 255, 255, 0.76);
  font-size: 10px;
  font-weight: 720;
}

.finance-contract-group-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(248, 250, 252, 0.5));
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.88),
    0 12px 28px rgba(15, 23, 42, 0.04);
}

.finance-contract-group-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 2px 4px 0;
}

.finance-contract-group-head span,
.finance-contract-group-head p {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.finance-contract-group-head span {
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.finance-contract-group-head h3 {
  margin: 4px 0 2px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.05;
}

.finance-contract-group-head p {
  margin: 0;
}

.finance-contract-group-head > strong {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  color: var(--ink);
  font-size: 12px;
  white-space: nowrap;
}

.finance-contract-table {
  display: grid;
  gap: 8px;
}

.finance-contract-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.25fr) repeat(4, minmax(94px, 0.74fr)) minmax(150px, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-left: 4px solid rgba(142, 142, 147, 0.55);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.86);
}

.finance-contract-bookmaker,
.finance-contract-cell {
  min-width: 0;
}

.finance-contract-bookmaker strong,
.finance-contract-bookmaker span,
.finance-contract-cell strong,
.finance-contract-cell span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-contract-bookmaker strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 880;
}

.finance-contract-bookmaker span,
.finance-contract-cell span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 780;
}

.finance-contract-cell strong {
  margin-top: 3px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.finance-contract-cell.delta-positive strong {
  color: #168b45;
}

.finance-contract-cell.delta-negative strong {
  color: #b42318;
}

.finance-forecast-chart-shell {
  position: relative;
  width: 100%;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.68);
}

#finance-forecast-chart {
  display: block;
  width: 100%;
  min-width: 960px;
  height: auto;
}

.finance-forecast-grid {
  stroke: rgba(54, 65, 88, 0.075);
  stroke-width: 1;
}

.finance-forecast-track {
  fill: rgba(100, 116, 139, 0.1);
}

.finance-forecast-accrued {
  fill: rgba(91, 110, 225, 0.76);
  filter: drop-shadow(0 8px 14px rgba(91, 110, 225, 0.14));
}

.finance-forecast-actual {
  fill: rgba(20, 184, 166, 0.92);
  filter: drop-shadow(0 5px 10px rgba(20, 184, 166, 0.12));
}

.finance-forecast-shortfall {
  fill: rgba(227, 93, 106, 0.86);
  filter: drop-shadow(0 6px 10px rgba(227, 93, 106, 0.12));
}

.finance-forecast-current {
  stroke: #6f4bd8;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-dasharray: 6 5;
  filter: drop-shadow(0 2px 4px rgba(111, 75, 216, 0.18));
}

.finance-forecast-name {
  fill: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

.finance-forecast-signal,
.finance-forecast-value {
  fill: var(--muted);
  font-size: 9px;
  font-weight: 750;
}

.finance-forecast-hit-zone {
  cursor: crosshair;
  pointer-events: all;
}

.finance-forecast-drivers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.finance-forecast-driver {
  padding: 13px 15px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-left: 4px solid rgba(148, 163, 184, 0.38);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.86);
}

.finance-forecast-driver span,
.finance-forecast-driver strong,
.finance-forecast-driver em {
  display: block;
}

.finance-forecast-driver span,
.finance-forecast-driver em {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  font-style: normal;
}

.finance-forecast-driver strong {
  margin: 4px 0 3px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 850;
}

.finance-insight-row {
  display: grid;
  grid-template-columns: minmax(170px, 1.35fr) repeat(4, minmax(118px, 0.8fr)) minmax(150px, 1fr);
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-left: 4px solid rgba(148, 163, 184, 0.38);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.86);
}

.finance-insight-row > div {
  min-width: 0;
}

.finance-insight-row span,
.finance-insight-row strong {
  display: block;
  min-width: 0;
}

.finance-insight-row span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-insight-row strong {
  margin-top: 3px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.finance-insight-main strong {
  margin-top: 0;
  font-size: 14px;
}

.finance-recommendation {
  justify-self: end;
  display: grid;
  place-items: center;
  width: 180px;
  min-height: 48px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  text-align: center;
}

.finance-recommendation span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 740;
  line-height: 1.25;
  white-space: normal;
}

.finance-tone-positive {
  border-left-color: #30d158;
}

.finance-tone-warning {
  border-left-color: #ff9f0a;
}

.finance-tone-danger {
  border-left-color: #ff375f;
}

.finance-tone-neutral {
  border-left-color: #8e8e93;
}

.finance-delta.delta-positive strong {
  color: #168b45;
}

.finance-delta.delta-negative strong {
  color: #b42318;
}

@media (max-width: 1180px) {
  .players-analysis-grid {
    grid-template-columns: 1fr;
  }

  .players-threshold-tool {
    grid-template-columns: 1fr;
  }

  .finance-insight-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .finance-forecast-drivers {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .finance-insight-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .finance-contract-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .finance-recommendation {
    justify-self: stretch;
    width: auto;
  }
}

@media (max-width: 720px) {
  .player-data-note {
    max-width: none;
    text-align: left;
  }

  .players-analysis-block {
    padding: 11px;
  }

  .players-segmentation-block,
  .players-threshold-block {
    padding: 11px;
  }

  .players-threshold-dates {
    grid-template-columns: 1fr;
  }

  .player-threshold-slider {
    grid-template-columns: 1fr;
  }

  .player-threshold-slider strong {
    white-space: normal;
  }

  .finance-insight-summary,
  .finance-forecast-drivers,
  .finance-insight-row,
  .finance-contract-row {
    grid-template-columns: 1fr;
  }

  .finance-contract-tabs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: 100%;
  }

  .finance-contract-tab {
    gap: 5px;
    padding: 0 8px;
    font-size: 11px;
  }
}

.glossary-panel {
  display: grid;
  gap: 18px;
}

.glossary-head {
  align-items: flex-start;
}

.glossary-tools {
  display: grid;
  grid-template-columns: minmax(220px, 320px) auto;
  gap: 8px;
  align-items: center;
  justify-items: end;
  min-width: min(100%, 430px);
}

.glossary-tools input {
  width: 100%;
  height: 42px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  padding: 0 14px;
  font-size: 14px;
  font-weight: 600;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.glossary-tools input::placeholder {
  color: #94a3b8;
}

.glossary-tools input:focus {
  border-color: rgba(10, 132, 255, 0.45);
  box-shadow:
    0 0 0 4px rgba(10, 132, 255, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.glossary-clear-button {
  min-height: 38px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  padding: 0 14px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.glossary-clear-button:hover,
.glossary-clear-button:focus {
  border-color: rgba(10, 132, 255, 0.32);
  color: var(--accent);
  outline: none;
}

.glossary-search-status {
  grid-column: 1 / -1;
  min-height: 16px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.2;
}

.glossary-layout {
  display: grid;
  grid-template-columns: minmax(170px, 0.24fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.glossary-nav {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.58);
}

.glossary-nav a {
  display: flex;
  align-items: center;
  min-height: 34px;
  border-radius: 10px;
  padding: 0 10px;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.glossary-nav a:hover {
  background: rgba(10, 132, 255, 0.08);
  color: var(--ink);
}

.glossary-content {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.glossary-empty {
  margin: 0;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.56);
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}

.glossary-section {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.56);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.82),
    0 10px 24px rgba(25, 35, 58, 0.05);
  scroll-margin-top: 20px;
}

.glossary-section-head {
  display: grid;
  gap: 5px;
}

.glossary-section h3 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.2;
}

.glossary-kicker {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.glossary-source-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.glossary-source-grid article {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.72);
}

.glossary-source-grid strong,
.glossary-definitions dt {
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.glossary-source-grid p,
.glossary-definitions dd,
.glossary-steps li {
  margin: 0;
  color: #475569;
  font-size: 13px;
  line-height: 1.55;
}

.glossary-definitions {
  display: grid;
  gap: 9px;
  margin: 0;
}

.glossary-definitions div {
  display: grid;
  grid-template-columns: minmax(170px, 0.32fr) minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.glossary-definitions div:first-child {
  border-top: 0;
}

.glossary-definitions dt,
.glossary-definitions dd {
  min-width: 0;
}

.glossary-steps {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 22px;
}

.glossary-steps li::marker {
  color: #4f46e5;
  font-weight: 900;
}

.admin-metrics {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin-top: 0;
  margin-bottom: 16px;
}

.admin-details {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-details.is-incident-flow {
  display: block;
}

.incident-management-block {
  width: 100%;
}

.incident-table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.56);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.9),
    0 14px 34px rgba(25, 35, 58, 0.06);
}

.incident-table {
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0;
}

.incident-table th,
.incident-table td {
  padding: 14px 16px;
  vertical-align: top;
}

.incident-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(248, 250, 252, 0.92);
  backdrop-filter: blur(12px);
}

.incident-table td:first-child {
  width: 185px;
}

.incident-table td:nth-child(2) {
  min-width: 330px;
}

.incident-table td:nth-child(3) {
  min-width: 210px;
}

.incident-table td:nth-child(4) {
  width: 180px;
  color: var(--muted);
  font-weight: 650;
}

.incident-table strong,
.incident-table span {
  display: block;
}

.incident-table strong {
  color: var(--ink);
  font-weight: 750;
}

.incident-table span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.incident-row-open td:first-child {
  box-shadow: inset 3px 0 0 #ff453a;
}

.incident-row-in_progress td:first-child {
  box-shadow: inset 3px 0 0 #ffcc00;
}

.incident-row-resolved td:first-child {
  box-shadow: inset 3px 0 0 #34c759;
}

.incident-row-ignored td:first-child {
  box-shadow: inset 3px 0 0 #8e8e93;
}

.incident-status-select {
  min-width: 134px;
  height: 34px;
  padding: 0 34px 0 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.86));
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.92),
    0 8px 18px rgba(25, 35, 58, 0.05);
}

.incident-status-open {
  border-color: rgba(255, 69, 58, 0.28);
  box-shadow: 0 0 0 4px rgba(255, 69, 58, 0.08);
}

.incident-status-in_progress {
  border-color: rgba(255, 204, 0, 0.36);
  box-shadow: 0 0 0 4px rgba(255, 204, 0, 0.1);
}

.incident-status-resolved {
  border-color: rgba(52, 199, 89, 0.3);
}

.incident-status-ignored {
  border-color: rgba(142, 142, 147, 0.28);
  color: var(--muted);
}

.admin-users-section {
  margin-bottom: 16px;
}

.parser-status-section {
  display: grid;
  gap: 14px;
}

.parser-status-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.58);
}

.parser-status-table {
  width: 100%;
  min-width: 1060px;
  border-collapse: collapse;
}

.parser-status-table th,
.parser-status-table td {
  padding: 11px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  text-align: left;
  vertical-align: top;
  font-size: 12px;
}

.parser-status-table th {
  color: var(--muted);
  font-weight: 800;
}

.parser-status-table tr:last-child td {
  border-bottom: 0;
}

.parser-status-table strong,
.parser-status-table span {
  display: block;
}

.parser-status-table strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.parser-status-table span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.parser-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  min-height: 28px;
  margin-top: 0 !important;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(248, 250, 252, 0.86);
  color: #334155 !important;
  font-size: 11px !important;
  font-weight: 850 !important;
}

.parser-status-ok {
  border-color: rgba(48, 209, 88, 0.24);
  background: rgba(48, 209, 88, 0.12);
  color: #16723a !important;
}

.parser-status-lagging,
.parser-status-partial {
  border-color: rgba(255, 159, 10, 0.28);
  background: rgba(255, 159, 10, 0.12);
  color: #9a5b00 !important;
}

.parser-status-failed,
.parser-status-no_data {
  border-color: rgba(255, 59, 48, 0.28);
  background: rgba(255, 59, 48, 0.1);
  color: #b42318 !important;
}

.parser-status-running {
  border-color: rgba(10, 132, 255, 0.26);
  background: rgba(10, 132, 255, 0.1);
  color: #0759b8 !important;
}

.admin-user-manager {
  display: grid;
  gap: 14px;
}

.panel-subhead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.admin-self-password-form,
.admin-user-form,
.temporary-password-card,
.admin-user-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 1.2fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.58);
}

.admin-self-password-form {
  grid-template-columns: minmax(180px, 0.9fr) repeat(3, minmax(150px, 1fr)) auto;
}

.admin-self-password-head,
.admin-self-password-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.admin-self-password-head h3 {
  margin: 0;
}

.admin-self-password-form label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.admin-password-message {
  min-height: 16px;
  margin: 0;
  font-size: 12px;
  font-weight: 700;
}

.admin-password-message.is-success {
  color: #16833a;
}

.admin-password-message.is-error {
  color: #b42318;
}

.admin-user-list {
  display: grid;
  gap: 10px;
}

.admin-user-row {
  grid-template-columns: minmax(220px, 1fr) minmax(290px, 1.2fr) 110px auto;
}

.admin-user-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.admin-user-main span,
.temporary-password-card span {
  color: var(--muted);
  font-size: 12px;
}

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

.permission-check,
.active-switch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  padding: 0 10px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.permission-check input,
.active-switch input {
  accent-color: var(--accent);
}

.admin-user-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.metric {
  padding: 12px 16px;
  min-height: 82px;
}

.metric.has-breakdown,
.forecast-summary-card.has-breakdown {
  cursor: help;
}

.metric.has-breakdown:hover,
.forecast-summary-card.has-breakdown:hover {
  border-color: rgba(10, 132, 255, 0.18);
  box-shadow:
    0 14px 34px rgba(25, 35, 58, 0.1),
    inset 0 1px 1px rgba(255, 255, 255, 0.95);
}

.metric .value {
  margin-top: 6px;
  font-size: 20px;
}

.metric .note {
  margin-top: 6px;
  font-size: 11px;
}

.metric-breakdown-tooltip {
  position: fixed;
  z-index: 2000;
  width: min(330px, calc(100vw - 24px));
  max-height: none;
  overflow: visible;
  padding: 11px 12px 10px;
  border-radius: 14px;
  background: rgba(17, 24, 39, 0.92);
  color: #fff;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.28);
  font-size: 12px;
  line-height: 1.35;
  pointer-events: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.metric-breakdown-tooltip > strong,
.metric-breakdown-tooltip > span {
  display: block;
}

.metric-breakdown-tooltip > strong {
  margin-bottom: 4px;
  font-size: 14px;
  line-height: 1.15;
}

.metric-breakdown-tooltip > span {
  color: rgba(255, 255, 255, 0.86);
  font-weight: 650;
}

.metric-breakdown-list {
  display: grid;
  gap: 5px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.metric-breakdown-row {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
}

.metric-breakdown-row.has-formula {
  grid-template-columns: 14px minmax(0, 1fr) 128px;
  align-items: start;
  column-gap: 6px;
}

.metric-breakdown-header-row {
  margin-bottom: -1px;
}

.metric-breakdown-header-row i {
  visibility: hidden;
}

.metric-breakdown-row i {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--row-color) 84%, #ffffff);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.42),
    0 0 0 3px color-mix(in srgb, var(--row-color) 16%, transparent);
}

.metric-breakdown-row span,
.metric-breakdown-row strong,
.metric-breakdown-row em {
  display: block;
  min-width: 0;
}

.metric-breakdown-row strong {
  overflow: hidden;
  color: #fff;
  font-size: 12px;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-breakdown-row em {
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
  font-style: normal;
  font-weight: 650;
  line-height: 1.3;
}

.metric-breakdown-row.has-formula em {
  margin-top: 1px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
  text-align: right;
  white-space: nowrap;
}

.metric-breakdown-header-row.has-formula em {
  margin-top: 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 9px;
  font-weight: 700;
}

.metric-breakdown-empty {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.panel {
  padding: 20px;
  margin-top: 16px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.chart-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  min-width: 260px;
  margin-top: -8px;
}

.chart-panel #series-title {
  max-width: 430px;
  font-size: 18px;
  line-height: 1.12;
}

.chart-panel.is-player-mode .panel-eyebrow {
  margin-bottom: 4px;
  font-size: 9px;
  line-height: 1.1;
}

.chart-panel.is-player-mode #series-title {
  max-width: 360px;
  font-size: 15px;
  line-height: 1.08;
}

.chart-control-row {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.fullscreen-button {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.9),
    0 8px 22px rgba(25, 35, 58, 0.08);
  transition:
    background 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.fullscreen-button:hover {
  background: rgba(10, 132, 255, 0.12);
  color: var(--ink);
  transform: translateY(-1px);
}

.chart-mode-control {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
  padding: 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.grouping-control {
  display: flex;
  justify-content: flex-end;
}

.segmented-control {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 186px;
  padding: 3px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  box-shadow:
    inset 0 1px 2px rgba(15, 23, 42, 0.1),
    inset 0 0 0 1px rgba(255, 255, 255, 0.56);
}

.segmented-control::before {
  content: "";
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc((100% - 6px) / 3);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow:
    0 3px 10px rgba(15, 23, 42, 0.14),
    inset 0 0 0 1px rgba(255, 255, 255, 0.78);
  transition: transform 190ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.segmented-control.is-week::before {
  transform: translateX(100%);
}

.segmented-control.is-month::before {
  transform: translateX(200%);
}

.segment {
  position: relative;
  z-index: 1;
  height: 26px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
  transition:
    background 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease;
}

.segment.is-active {
  color: var(--ink);
}

.metric-builder {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
  min-width: 300px;
}

.metric-pill {
  --metric-color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease;
}

.metric-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--metric-color);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--metric-color) 14%, transparent);
}

.metric-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.metric-pill:has(input:checked) {
  border-color: color-mix(in srgb, var(--metric-color) 28%, rgba(255, 255, 255, 0.86));
  background: color-mix(in srgb, var(--metric-color) 13%, rgba(255, 255, 255, 0.84));
  color: var(--ink);
  box-shadow: 0 8px 22px color-mix(in srgb, var(--metric-color) 12%, transparent);
}

.metric-pill.is-disabled {
  opacity: 0.42;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.42);
  box-shadow: none;
}

.metric-pill.is-disabled::before {
  box-shadow: none;
}

.metric-pill-clicks {
  --metric-color: #0a84ff;
}

.metric-pill-regs {
  --metric-color: #30d158;
}

.metric-pill-ftd {
  --metric-color: #ffcc00;
}

.metric-pill-c2r {
  --metric-color: #64d2ff;
}

.metric-pill-c2d {
  --metric-color: #ff9f0a;
}

.metric-pill-r2d {
  --metric-color: #af52de;
}

.trend-toggle-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 128px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.86),
    0 8px 22px rgba(25, 35, 58, 0.06);
  transition:
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.trend-toggle-button:hover {
  transform: translateY(-1px);
}

.trend-toggle-button.is-active {
  border-color: rgba(10, 132, 255, 0.3);
  background: rgba(10, 132, 255, 0.13);
  color: var(--ink);
  box-shadow: 0 8px 22px rgba(10, 132, 255, 0.12);
}

.trend-toggle-icon {
  position: relative;
  width: 19px;
  height: 14px;
}

.trend-toggle-icon::before {
  content: "";
  position: absolute;
  left: 1px;
  right: 1px;
  top: 7px;
  border-top: 2px dashed currentColor;
  transform: rotate(-18deg);
  transform-origin: center;
}

.trend-toggle-icon::after {
  content: "";
  position: absolute;
  right: 0;
  top: 2px;
  width: 5px;
  height: 5px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(18deg);
}

.ios-toggle {
  position: relative;
  display: inline-flex;
  width: 52px;
  height: 30px;
  cursor: pointer;
}

.ios-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.ios-toggle-track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.36);
  box-shadow:
    inset 0 1px 2px rgba(15, 23, 42, 0.14),
    inset 0 0 0 1px rgba(15, 23, 42, 0.06);
  transition:
    background 180ms ease,
    box-shadow 180ms ease;
}

.ios-toggle-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.22);
  transition: transform 180ms ease;
}

.ios-toggle input:checked + .ios-toggle-track {
  background: var(--accent);
  box-shadow:
    inset 0 1px 2px rgba(15, 23, 42, 0.08),
    0 0 0 4px rgba(10, 132, 255, 0.12);
}

.ios-toggle input:checked + .ios-toggle-track::after {
  transform: translateX(22px);
}

.chart-panel {
  overflow: hidden;
}

.chart-panel:fullscreen {
  width: 100vw;
  height: 100vh;
  padding: 24px;
  overflow: auto;
  border-radius: 0;
  background:
    radial-gradient(circle at top left, rgba(10, 132, 255, 0.14), transparent 26%),
    linear-gradient(180deg, rgba(246, 248, 252, 0.96), rgba(235, 241, 248, 0.96));
}

.chart-panel:fullscreen .chart-wrap {
  height: calc(100vh - 168px);
  min-height: 520px;
}

.chart-panel:fullscreen #series-chart {
  min-width: 100%;
  height: 100%;
}

.chart-wrap {
  position: relative;
  width: 100%;
  overflow: auto;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.9);
}

#series-chart {
  width: 100%;
  min-width: 860px;
  height: auto;
  display: block;
}

.legend-label,
.axis-label {
  fill: var(--muted);
  font-size: 11px;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Text",
    "Segoe UI",
    sans-serif;
}

.legend-label-compact {
  font-size: 9.5px;
  font-weight: 700;
}

.axis-line {
  stroke: rgba(100, 116, 139, 0.42);
  stroke-width: 1;
}

.grid-line {
  stroke: rgba(148, 163, 184, 0.18);
  stroke-width: 1;
}

.chart-non-working-dot {
  fill: rgba(255, 69, 58, 0.62);
  filter: drop-shadow(0 2px 5px rgba(255, 69, 58, 0.24));
}

.chart-value-label {
  fill: var(--ink);
  stroke: rgba(255, 255, 255, 0.88);
  stroke-width: 3px;
  paint-order: stroke;
  font-size: 10px;
  font-weight: 650;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Text",
    "Segoe UI",
    sans-serif;
}

.chart-trend-line {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 8 7;
  opacity: 0.82;
  filter: drop-shadow(0 2px 5px rgba(15, 23, 42, 0.12));
  pointer-events: none;
}

.chart-trend-line-overlay {
  stroke-width: 2.6;
  opacity: 0.74;
}

.chart-trend-line-backdrop {
  stroke: rgba(255, 255, 255, 0.96);
  stroke-width: 7;
  opacity: 0.95;
  filter: none;
}

.chart-hit-zone {
  cursor: crosshair;
  pointer-events: all;
}

.chart-tooltip {
  position: absolute;
  z-index: 3;
  width: fit-content;
  min-width: 150px;
  max-width: min(420px, calc(100% - 18px));
  max-height: none;
  overflow: visible;
  padding: 8px 9px;
  border-radius: 13px;
  background: rgba(17, 24, 39, 0.9);
  color: #fff;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.22);
  font-size: 11px;
  line-height: 1.25;
  pointer-events: none;
  transform: translate3d(0, 0, 0);
}

.chart-tooltip.is-finance-tooltip {
  max-width: min(430px, calc(100% - 18px));
  padding: 8px 9px;
}

.chart-tooltip strong {
  display: block;
  margin-bottom: 2px;
  font-size: 12px;
}

.chart-tooltip span {
  display: block;
}

.chart-tooltip-section {
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
  font-weight: 760;
}

.chart-tooltip-events {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.chart-tooltip-event {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
}

.chart-breakdown-grid {
  display: grid;
  gap: 2px;
  margin-top: 5px;
  width: max-content;
  max-width: 100%;
  font-variant-numeric: tabular-nums;
}

.chart-breakdown-header,
.chart-breakdown-row {
  display: grid;
  grid-template-columns: 10px minmax(76px, 98px) repeat(var(--metric-count), minmax(86px, max-content));
  align-items: center;
  gap: 8px;
}

.chart-breakdown-header {
  color: rgba(255, 255, 255, 0.68);
  font-size: 9px;
  font-weight: 780;
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.chart-breakdown-header span,
.chart-breakdown-header strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-breakdown-header strong {
  margin: 0;
  font-size: 9px;
}

.chart-breakdown-row i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--row-color) 84%, #ffffff);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.42),
    0 0 0 3px color-mix(in srgb, var(--row-color) 16%, transparent);
}

.chart-breakdown-row strong,
.chart-breakdown-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-breakdown-row strong {
  margin: 0;
  color: #fff;
  font-size: 10px;
  font-weight: 820;
}

.chart-breakdown-value {
  color: rgba(255, 255, 255, 0.86);
  font-size: 9px;
  font-weight: 690;
  text-align: right;
  justify-self: stretch;
  width: 100%;
  min-width: 86px;
}

.chart-breakdown-value-wide {
  min-width: 160px;
}

.ftd-forecast-panel {
  overflow: hidden;
}

.forecast-panel-head {
  align-items: center;
}

.forecast-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

.forecast-delta-toggle {
  display: inline-grid;
  grid-template-columns: 22px auto;
  align-items: center;
  gap: 7px;
  height: 34px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  padding: 0 13px 0 7px;
  font: inherit;
  cursor: pointer;
  box-shadow:
    0 8px 18px rgba(15, 23, 42, 0.07),
    inset 0 1px 1px rgba(255, 255, 255, 0.9);
}

.forecast-delta-toggle span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #0a84ff;
  color: #fff;
  font-size: 13px;
  font-weight: 850;
  line-height: 1;
}

.forecast-delta-toggle strong {
  font-size: 12px;
  font-weight: 780;
  line-height: 1;
  white-space: nowrap;
}

.forecast-delta-toggle.is-active {
  border-color: rgba(10, 132, 255, 0.28);
  background: rgba(235, 245, 255, 0.92);
  color: #0756a8;
}

.forecast-horizon-control {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(54px, 1fr));
  gap: 4px;
  padding: 3px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  box-shadow:
    inset 0 1px 2px rgba(15, 23, 42, 0.08),
    inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.forecast-horizon-button {
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 0 10px;
  font: inherit;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}

.forecast-horizon-button.is-active {
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  box-shadow:
    0 4px 12px rgba(15, 23, 42, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.86);
}

.forecast-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.forecast-summary-card {
  min-width: 0;
  min-height: 76px;
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(248, 250, 252, 0.58));
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.9),
    0 10px 24px rgba(25, 35, 58, 0.05);
}

.forecast-summary-card span,
.forecast-summary-card em {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.25;
}

.forecast-summary-card strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 21px;
  line-height: 1;
  font-weight: 780;
}

.forecast-summary-card em {
  margin-top: 7px;
  overflow-wrap: anywhere;
  font-size: 10px;
}

.forecast-delta-panel {
  margin: -2px 0 12px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.6);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.78);
}

.forecast-delta-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.forecast-delta-head strong,
.forecast-delta-head span {
  display: block;
}

.forecast-delta-head strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.forecast-delta-head span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.forecast-delta-mode {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(58px, 1fr));
  gap: 3px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
}

.forecast-delta-mode-button {
  height: 26px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 0 9px;
  font: inherit;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}

.forecast-delta-mode-button.is-active {
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
}

.forecast-delta-table-wrap {
  overflow: auto;
}

.forecast-delta-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
}

.forecast-delta-table th,
.forecast-delta-table td {
  padding: 9px 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  text-align: right;
  white-space: nowrap;
}

.forecast-delta-table th:first-child,
.forecast-delta-table td:first-child {
  text-align: left;
}

.forecast-delta-table th {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.forecast-delta-table td {
  color: var(--ink);
  font-size: 12px;
  font-weight: 720;
}

.forecast-delta-table td strong,
.forecast-delta-table td span {
  display: block;
}

.forecast-delta-table td span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

.forecast-delta-table .delta-positive {
  color: #0b7a3b;
}

.forecast-delta-table .delta-negative {
  color: #b42318;
}

.forecast-delta-empty {
  color: var(--muted);
  text-align: left !important;
}

.forecast-chart-shell {
  position: relative;
  width: 100%;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.7);
}

#ftd-forecast-chart {
  display: block;
  width: 100%;
  min-width: 960px;
  height: auto;
}

.forecast-month-label {
  fill: var(--muted);
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
}

.forecast-bar {
  fill: #ffcc00;
  opacity: 0.82;
  filter: drop-shadow(0 8px 12px rgba(255, 204, 0, 0.18));
}

.forecast-bar.is-actual {
  fill: #0a84ff;
  opacity: 0.78;
  filter: drop-shadow(0 8px 12px rgba(10, 132, 255, 0.14));
}

.forecast-bar.is-forecast {
  fill: #ffcc00;
}

.forecast-range-line {
  stroke: rgba(10, 132, 255, 0.32);
  stroke-width: 1.5;
  stroke-linecap: round;
}

.forecast-range-cap {
  fill: rgba(10, 132, 255, 0.09);
}

.forecast-baseline-mark {
  stroke: rgba(17, 24, 39, 0.42);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: 3 3;
}

.forecast-split-line {
  stroke: rgba(17, 24, 39, 0.2);
  stroke-width: 1.5;
  stroke-dasharray: 4 5;
}

.forecast-split-label {
  fill: var(--muted);
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
}

.forecast-event-dot {
  fill: #0a84ff;
  stroke: #fff;
  stroke-width: 2;
  filter: drop-shadow(0 4px 8px rgba(10, 132, 255, 0.24));
}

.forecast-event-pop {
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.forecast-event-pop circle {
  fill: #111827;
  stroke: rgba(255, 255, 255, 0.96);
  stroke-width: 2;
  filter: drop-shadow(0 8px 16px rgba(15, 23, 42, 0.22));
}

.forecast-event-pop text {
  fill: #fff;
  font-size: 10px;
  font-weight: 850;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Text",
    "Segoe UI",
    sans-serif;
}

.forecast-day:hover .forecast-event-pop,
.forecast-day.is-hovered .forecast-event-pop {
  opacity: 1;
}

.forecast-hit-zone {
  cursor: crosshair;
  pointer-events: all;
}

.forecast-tooltip {
  position: absolute;
  z-index: 4;
  width: 286px;
  padding: 10px 11px;
  border-radius: 14px;
  background: rgba(17, 24, 39, 0.92);
  color: #fff;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.24);
  font-size: 12px;
  line-height: 1.35;
  pointer-events: none;
}

.forecast-tooltip strong,
.forecast-tooltip span {
  display: block;
}

.forecast-tooltip strong {
  margin-bottom: 3px;
  font-size: 13px;
}

.forecast-tooltip-events {
  display: grid;
  gap: 7px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.forecast-tooltip-event {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
}

.forecast-tooltip-event span {
  min-width: 0;
}

.chart-tooltip.is-viewport-layer,
.forecast-tooltip.is-viewport-layer {
  z-index: 80;
  max-height: var(--tooltip-viewport-max-height, calc(100vh - 16px));
  overflow: auto;
  overscroll-behavior: contain;
}

.chart-tooltip.is-viewport-layer {
  max-width: min(420px, var(--tooltip-viewport-max-width, calc(100vw - 16px)));
}

.chart-tooltip.is-viewport-layer.is-finance-tooltip {
  max-width: min(430px, var(--tooltip-viewport-max-width, calc(100vw - 16px)));
}

.chart-tooltip.is-viewport-layer.is-contract-tooltip {
  max-width: min(310px, var(--tooltip-viewport-max-width, calc(100vw - 16px)));
}

.forecast-tooltip.is-viewport-layer {
  max-width: min(286px, var(--tooltip-viewport-max-width, calc(100vw - 16px)));
}

.forecast-drivers {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.forecast-driver {
  min-height: 58px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.58);
  padding: 11px 12px;
}

.forecast-driver {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  overflow: hidden;
}

.forecast-driver strong,
.forecast-driver span {
  display: block;
  position: relative;
  z-index: 1;
}

.forecast-driver strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 780;
}

.forecast-driver span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.forecast-driver i {
  position: absolute;
  left: 0;
  bottom: 0;
  width: var(--driver-share);
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #0a84ff, #ffcc00);
}

.forecast-sport-icon {
  --sport-color: #0a84ff;
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--sport-color) 16%, #ffffff);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sport-color) 28%, transparent);
}

.forecast-sport-icon::before,
.forecast-sport-icon::after {
  content: "";
  position: absolute;
}

.forecast-sport-football {
  --sport-color: #0a84ff;
}

.forecast-sport-football::before {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, transparent 46%, #fff 47% 53%, transparent 54%),
    linear-gradient(0deg, transparent 46%, #fff 47% 53%, transparent 54%),
    var(--sport-color);
}

.forecast-sport-tennis {
  --sport-color: #30d158;
}

.forecast-sport-tennis::before {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: var(--sport-color);
}

.forecast-sport-tennis::after {
  width: 8px;
  height: 8px;
  border-left: 1.5px solid #fff;
  border-radius: 50%;
  transform: rotate(-28deg);
}

.forecast-sport-hockey {
  --sport-color: #5856d6;
}

.forecast-sport-hockey::before {
  width: 11px;
  height: 4px;
  border-radius: 999px;
  background: var(--sport-color);
  transform: rotate(-28deg);
}

.forecast-sport-basketball {
  --sport-color: #ff9f0a;
}

.forecast-sport-basketball::before {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, transparent 45%, rgba(255, 255, 255, 0.86) 46% 54%, transparent 55%),
    linear-gradient(0deg, transparent 45%, rgba(255, 255, 255, 0.86) 46% 54%, transparent 55%),
    var(--sport-color);
}

.forecast-sport-mma {
  --sport-color: #af52de;
}

.forecast-sport-mma::before {
  width: 10px;
  height: 8px;
  border-radius: 4px 4px 3px 3px;
  background: var(--sport-color);
}

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

thead th {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
}

th,
td {
  text-align: left;
  padding: 10px 6px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.two-col {
  grid-template-columns: 1fr 1fr;
}

.stacked-lists {
  display: grid;
  gap: 14px;
}

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

.clean-list li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  font-size: 13px;
}

.clean-list li strong {
  font-weight: 600;
}

.clean-list li span,
.empty-state {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

@media print {
  body {
    background: #ffffff !important;
  }

  body.is-report-print .page {
    max-width: none;
    padding: 0;
    zoom: 1;
  }

  body.is-report-print .session-strip,
  body.is-report-print .hero,
  body.is-report-print .filter-bar,
  body.is-report-print .dashboard-section-tabs-admin,
  body.is-report-print .report-dialog-backdrop,
  body.is-report-print .chart-controls,
  body.is-report-print .metric-builder,
  body.is-report-print .fullscreen-button,
  body.is-report-print .forecast-horizon-control {
    display: none !important;
  }

  body.is-report-print .metrics,
  body.is-report-print .chart-panel,
  body.is-report-print .ftd-forecast-panel {
    break-inside: avoid;
    page-break-inside: avoid;
    box-shadow: none !important;
    border: 1px solid rgba(148, 163, 184, 0.28) !important;
    background: #ffffff !important;
  }

  body.is-report-print .metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 0;
  }

  body.is-report-print .chart-panel {
    margin-top: 12px;
  }
}

@media (max-width: 1120px) {
  .filter-bar {
    grid-template-columns: max-content 148px minmax(220px, 1fr);
    grid-template-areas:
      "bookmakers dates primary-tabs"
      "report-actions report-actions primary-tabs"
      "admin-tabs admin-tabs primary-tabs";
  }

  .bookmaker-builder {
    grid-template-columns: repeat(3, var(--bookmaker-chip-width));
  }

  .filter-group-dates {
    grid-area: dates;
  }
}

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

  .panel-head {
    flex-wrap: wrap;
  }

  .chart-controls {
    align-items: flex-start;
    min-width: 0;
    margin-top: 0;
  }

  .filter-bar {
    grid-template-columns: 1fr;
    grid-template-areas:
      "bookmakers"
      "dates"
      "primary-tabs"
      "report-actions"
      "admin-tabs";
  }

  .session-strip {
    position: static;
    width: auto;
    margin-bottom: 14px;
  }

  .dashboard-section-tabs {
    grid-template-columns: 1fr;
    width: auto;
    padding-top: 0;
  }

  .dashboard-section-tabs-primary,
  .dashboard-section-tabs-admin,
  .report-actions-panel {
    grid-template-columns: 1fr;
    width: auto;
    padding-top: 0;
  }

  .dashboard-section-tabs-primary .dashboard-section-button {
    width: 100%;
    min-width: 0;
    min-height: 42px;
  }

  .dashboard-section-button {
    width: 100%;
    min-height: 42px;
    border-radius: 12px;
  }

  .report-actions-panel {
    --report-cell-w: minmax(0, 1fr);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    height: auto;
    margin-top: 0;
  }

  .report-action-button {
    width: 100%;
  }

  .admin-self-password-form,
  .admin-user-form,
  .temporary-password-card,
  .admin-user-row {
    grid-template-columns: 1fr;
  }

  .glossary-layout {
    grid-template-columns: 1fr;
  }

  .glossary-tools {
    width: 100%;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr) auto;
    justify-items: stretch;
  }

  .glossary-search-status {
    justify-self: start;
  }

  .glossary-nav {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-group-dates {
    width: 100%;
    max-width: 380px;
    padding-top: 0;
  }

  .date-range-trigger {
    min-height: 88px;
  }

  .grouping-control {
    justify-content: flex-start;
  }

  .forecast-summary-grid,
  .forecast-drivers {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .forecast-head-actions {
    width: 100%;
  }

  h1 {
    font-size: 26px;
  }
}

@media (max-width: 720px) {
  .page {
    padding: 14px;
  }

  .filter-bar {
    grid-template-columns: 1fr;
    grid-template-areas:
      "bookmakers"
      "dates"
      "primary-tabs"
      "report-actions"
      "admin-tabs";
  }

  .session-strip {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-section-button {
    min-height: 40px;
    font-size: 12px;
  }

  .glossary-source-grid,
  .glossary-definitions div,
  .glossary-nav {
    grid-template-columns: 1fr;
  }

  .report-choice-grid {
    grid-template-columns: 1fr;
  }

  .report-dialog-head {
    flex-wrap: wrap;
  }

  .report-dialog-head-extra {
    width: 100%;
    order: 3;
  }

  .compare-range-form {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 40px;
    width: 100%;
  }

  .bookmaker-builder {
    grid-template-columns: repeat(2, var(--bookmaker-chip-width));
  }

  .filter-group-dates {
    width: 100%;
    max-width: none;
  }

  .date-range {
    grid-template-columns: 1fr;
  }

  .date-range-trigger {
    min-height: 82px;
  }

  .date-popover {
    grid-template-columns: 1fr;
    max-width: calc(100vw - 24px);
    border-radius: 22px;
  }

  .date-presets {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    border-right: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  }

  .date-preset {
    min-height: 30px;
    padding: 0 10px;
    font-size: 12px;
  }

  .date-calendar {
    padding: 14px 12px 12px;
  }

  .calendar-nav {
    top: 10px;
    right: 12px;
    left: auto;
    transform: none;
  }

  .calendar-nav button {
    width: 36px;
    height: 36px;
    font-size: 26px;
  }

  .calendar-months {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .calendar-month:not(:first-child) {
    display: none;
  }

  .date-separator {
    display: none;
  }

  h1 {
    font-size: 22px;
  }

  .hero,
  .panel,
  .metric,
  .filter-bar {
    border-radius: 22px;
  }

  .metrics[data-section="finance"] {
    grid-template-columns: 1fr;
  }

  .forecast-panel-head {
    align-items: flex-start;
  }

  .forecast-head-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .forecast-delta-toggle {
    width: 100%;
    justify-content: start;
  }

  .forecast-delta-head {
    align-items: stretch;
    flex-direction: column;
  }

  .forecast-delta-mode {
    width: 100%;
  }

  .forecast-horizon-control,
  .forecast-summary-grid,
  .forecast-drivers {
    width: 100%;
  }

  .forecast-summary-grid,
  .forecast-drivers {
    grid-template-columns: 1fr;
  }

  .forecast-summary-card strong {
    font-size: 19px;
  }
}
