:root {
  --color-bg: var(--ds-bg);
  --color-surface: var(--ds-panel);
  --color-surface-soft: var(--ds-panel-soft);
  --color-surface-strong: var(--ds-panel-strong);
  --color-text: var(--ds-ink);
  --color-text-soft: var(--ds-text-soft);
  --color-text-muted: var(--ds-text-muted);
  --color-border: var(--ds-line);
  --color-border-soft: var(--ds-line-soft);
  --color-brand: var(--ds-brand);
  --color-brand-deep: var(--ds-brand-deep);
  --color-brand-soft: var(--ds-brand-soft);
  --color-accent: var(--ds-accent);
  --color-accent-soft: var(--ds-accent-soft);
  --color-success: var(--ds-status-success);
  --color-danger: var(--ds-status-danger);
  --radius-sm: var(--ds-radius-sm);
  --radius-md: var(--ds-radius-md);
  --radius-lg: var(--ds-radius-lg);
  --radius-xl: var(--ds-radius-xl);
  --radius-pill: var(--ds-radius-pill);
  --shadow-soft: var(--ds-shadow-soft);
  --shadow-card: var(--ds-shadow-card);
  --shadow-float: var(--ds-shadow-float);
}

.dashboard-shell,
.dashboard-main,
.main-stage {
  min-height: 0;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

.hidden {
  display: none !important;
}

[hidden] {
  display: none !important;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--color-accent);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.login-screen {
  min-height: 100vh;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(10, 42, 34, 0.42), rgba(26, 86, 69, 0.18)),
    url("https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?auto=format&fit=crop&w=1800&q=80") center center /
      cover no-repeat;
}

.login-backdrop {
  min-height: calc(100vh - 48px);
  display: grid;
  place-items: center;
}

.login-card h1,
.dashboard-header h2,
.stage-topline h3 {
  margin: 0;
}

.login-card {
  width: min(640px, 100%);
  min-height: 210px;
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  overflow: hidden;
  border: 1px solid var(--ds-glass-line);
  border-radius: var(--radius-lg);
  background: var(--ds-glass-dark);
  box-shadow: var(--ds-shadow-hero);
  backdrop-filter: blur(14px);
}

.login-brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 30px 30px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(90deg, rgba(10, 42, 34, 0.08), rgba(255, 255, 255, 0.02)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(10, 42, 34, 0.08));
}

.login-brand .eyebrow {
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
  letter-spacing: 0.18em;
}

.login-brand h1 {
  font-size: clamp(1.7rem, 3.2vw, 2.5rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
  color: #f7f0e4;
}

.login-form-wrap {
  padding: 24px 20px;
  display: grid;
  align-content: center;
  gap: 10px;
  background: var(--ds-glass-dark-soft);
}

.login-card label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.9);
}

.login-card input {
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  font-size: 11px;
  outline: none;
}

.login-card input::placeholder {
  color: rgba(226, 232, 240, 0.55);
}

.login-card input:focus {
  border-color: rgba(255, 255, 255, 0.32);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.08);
}

.login-card .login-remember {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  user-select: none;
}

.login-card .login-remember input {
  width: 14px;
  min-height: 14px;
  height: 14px;
  margin: 0;
  padding: 0;
  border-radius: 4px;
  accent-color: var(--ds-brand);
}

.login-card button,
.ghost-button,
.stage-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 14px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.login-card button {
  margin-top: 2px;
  border: none;
  color: #fff;
  background: rgba(10, 42, 34, 0.82);
  box-shadow: var(--shadow-float);
  min-height: 34px;
  border-radius: 999px;
  font-size: 11px;
}

.login-card .oidc-login-button {
  margin-top: 0;
  color: #10231b;
  background: #f8fafc;
  box-shadow: none;
}

.login-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  color: rgba(248, 250, 252, 0.58);
  font-size: 10px;
  font-weight: 800;
}

.login-divider::before,
.login-divider::after {
  content: "";
  height: 1px;
  background: rgba(248, 250, 252, 0.16);
}

.helper-text {
  margin: 0;
  min-height: 16px;
  font-size: 10px;
  color: rgba(248, 250, 252, 0.8);
}

.helper-text:empty {
  visibility: hidden;
}

.dashboard-shell {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dashboard-header {
  min-height: 52px;
  background: rgba(255, 250, 243, 0.94);
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
  display: grid;
  grid-template-columns: minmax(max-content, auto) minmax(280px, 1fr) auto;
  align-items: center;
  justify-content: stretch;
  gap: clamp(14px, 2vw, 34px);
  padding: 2px 10px 2px 18px;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
}

.header-left,
.header-middle,
.header-right,
.header-actions {
  position: relative;
  z-index: 2;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: none;
  min-width: 0;
}

.header-left-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.header-page-title,
.header-mh-title {
  flex: 0 0 auto;
  color: #fff7ea;
  font-size: clamp(20px, 1.45vw, 26px);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1;
  white-space: nowrap;
}

.header-page-title-link {
  text-decoration: none;
  cursor: pointer;
}

.header-page-title-link:hover,
.header-page-title-link:focus-visible {
  color: var(--color-accent);
  outline: none;
}

.header-brand-mark {
  flex: 0 0 auto;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--color-accent);
  white-space: nowrap;
}

.header-brand-mark--baron {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 19px;
  letter-spacing: -0.01em;
}

.header-brand-logo {
  width: 30px;
  height: 20px;
  display: inline-block;
  flex: 0 0 auto;
  background-color: #d4a14a;
  -webkit-mask-image: url("/baron-consultant-ci.png");
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
  mask-image: url("/baron-consultant-ci.png");
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
}

.header-brand-text {
  display: inline-block;
  line-height: 1;
}

.header-middle {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  min-width: 0;
  width: clamp(220px, calc((100vw - 920px) * 0.67), 280px);
  max-width: calc(100% - 760px);
  margin-inline: 0;
}

.header-right {
  margin-left: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  flex: none;
  min-width: max-content;
  pointer-events: none;
}

.header-right > * {
  pointer-events: auto;
}

.header-primary-nav {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-wrap: nowrap;
  white-space: nowrap;
  min-width: 0;
  overflow: visible;
  flex: 1 1 auto;
}

.header-center-slot {
  min-height: 40px;
}

.header-controlbar {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(10px, 1.4vw, 18px);
  width: 100%;
  min-width: 0;
}

.header-select-field {
  position: relative;
  flex: 0 1 160px;
  min-width: 120px;
  min-height: 34px;
  border-bottom: 1px solid rgba(242, 196, 132, 0.62);
}

.header-select-field::after {
  content: "";
  position: absolute;
  right: 2px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 2px solid rgba(255, 247, 234, 0.9);
  border-bottom: 2px solid rgba(255, 247, 234, 0.9);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.header-select-field select {
  width: 100%;
  height: 34px;
  padding: 0 20px 0 0;
  border: 0;
  background: transparent;
  color: #fff7ea;
  outline: none;
  appearance: none;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 900;
}

.header-select-field select option {
  color: var(--ds-ink);
  background: #fff7ea;
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 2px;
  border-radius: 0;
  border: none;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 0 0 auto;
}

.nav-pill.active {
  background: transparent;
  border-bottom-color: var(--color-accent);
  color: var(--color-text);
}

.nav-pill.muted {
  color: rgba(102, 117, 109, 0.64);
}

.nav-pill:hover {
  transform: none;
  color: var(--color-accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  padding-left: 14px;
  border-left: 1px solid var(--color-border);
}

.header-secondary-link {
  flex: 0 0 auto;
  text-decoration: none;
}

.header-menu {
  position: relative;
  flex: 0 0 auto;
}

.header-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 41;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: default;
}

.header-menu-trigger {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    color 0.2s ease,
    opacity 0.2s ease;
  opacity: 0.92;
}

.header-menu-trigger:hover {
  color: var(--color-accent);
  opacity: 1;
}

.header-menu-trigger svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.header-menu-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 232px;
  padding: 8px;
  border: 1px solid var(--ds-dialog-line);
  border-radius: var(--ds-radius-lg);
  background: var(--ds-dialog-surface);
  box-shadow: var(--ds-shadow-card);
  backdrop-filter: var(--ds-backdrop-blur);
  z-index: 43;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.header-menu-link {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border-radius: var(--ds-radius-sm);
  color: var(--ds-ink);
  font-size: var(--ds-type-caption);
  font-weight: var(--ds-font-weight-strong);
  letter-spacing: var(--ds-letter-spacing);
  text-decoration: none;
  transition:
    background 0.16s ease,
    color 0.16s ease,
    transform 0.16s ease;
}

.header-menu-button {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.header-menu-button--danger {
  color: var(--ds-status-danger);
}

.header-menu-button--danger:hover {
  color: var(--ds-status-danger);
}

.header-menu-popover a + .header-menu-button {
  margin-top: 4px;
  border-top: 1px solid var(--ds-dialog-row-line);
  border-radius: 0 0 var(--ds-radius-sm) var(--ds-radius-sm);
}

.header-actions--menu-only {
  display: block;
  width: 0;
  height: 0;
  padding: 0;
  border-left: 0;
  overflow: visible;
}

.header-actions--menu-only > .header-user-button,
.header-actions--menu-only > .header-logout-button {
  display: none;
}

.header-menu-link:hover {
  background: var(--ds-date-hover-surface);
  color: var(--ds-ink);
  transform: translateY(-1px);
}

.header-menu-link.active {
  background: var(--ds-date-selected-surface);
  color: var(--ds-ink);
}

.header-date-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  margin-right: 0;
  flex: 0 0 auto;
  min-width: 0;
}

.header-date-label {
  font-size: 12.5px;
  font-weight: 900;
  color: var(--color-text-muted);
  letter-spacing: -0.02em;
  text-transform: none;
}

.header-date-field {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid rgba(217, 197, 168, 0.72);
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  box-shadow: none;
}

.header-date-field input {
  border: 0;
  background: transparent;
  color: var(--color-text);
  accent-color: var(--ds-date-selected-line, var(--color-brand));
  font-size: 12.5px;
  font-weight: 900;
  outline: none;
  cursor: pointer;
  color-scheme: light;
  padding: 0;
  margin: 0;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
}

.header-date-field input::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 1;
  filter: brightness(0) invert(1);
  margin-left: 6px;
}

.header-date-field select {
  border: 0;
  background: transparent;
  color: var(--color-text);
  font-size: 12.5px;
  font-weight: 900;
  outline: none;
  appearance: none;
  padding-right: 2px;
}

.header-date-sep {
  color: var(--color-text-muted);
  font-size: 12px;
  font-weight: 900;
}

.team-date-controls {
  position: relative;
}

.team-date-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 20px;
  max-width: 260px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid rgba(242, 196, 132, 0.42);
  border-radius: 0;
  background: transparent;
  color: #fff7ea;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: var(--ds-font-weight-strong);
  letter-spacing: -0.02em;
  box-shadow: none;
}

.team-date-trigger:hover,
.team-date-trigger[aria-expanded="true"] {
  border-bottom-color: rgba(255, 230, 178, 0.72);
  background: transparent;
}

#team-date-picker-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-date-trigger-caret {
  color: rgba(255, 244, 230, 0.68);
  font-size: 10px;
  line-height: 1;
}

.team-date-popover {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 80;
  width: min(760px, calc(100vw - 32px));
  padding: 16px;
  border: 1px solid var(--ds-date-line);
  border-radius: 22px;
  background: var(--ds-date-surface);
  color: var(--ds-date-text);
  box-shadow: var(--ds-shadow-card);
}

.team-date-popover[data-team-date-mode="detail"] {
  width: min(620px, calc(100vw - 32px));
  padding: 12px;
}

.team-date-popover.hidden,
.team-date-panel.hidden,
.team-date-detail-panel.hidden {
  display: none;
}

.team-date-popover__top,
.team-date-detail-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: var(--ds-date-surface-soft);
  border: 1px solid var(--ds-date-line);
}

.team-date-mode-btn,
.team-date-detail-tab {
  min-height: 34px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ds-date-text-muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: var(--ds-font-weight-strong);
}

.team-date-mode-btn.active,
.team-date-detail-tab.active {
  background: var(--ds-date-selected-surface);
  color: var(--ds-date-text);
  box-shadow: none;
}

.team-date-popover[data-team-date-mode="detail"] .team-date-popover__top {
  margin-right: 292px;
}

.team-date-popover[data-team-date-mode="detail"] .team-date-panel[data-team-date-panel="detail"] {
  padding-top: 10px;
}

.team-date-yearbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 16px 0 12px;
}

.team-date-yearbar strong {
  font-size: 18px;
  font-weight: var(--ds-font-weight-strong);
}

.team-date-yearbar--compact {
  margin-top: 12px;
}

.team-date-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--ds-date-line);
  border-radius: 999px;
  background: var(--ds-date-surface-soft);
  color: var(--ds-date-text);
  cursor: pointer;
  font-size: 24px;
  font-weight: var(--ds-font-weight-strong);
}

.team-date-month-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(84px, 1fr));
  gap: 12px;
}

.team-date-month-card,
.team-date-preset-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 92px;
  border: 1px solid var(--ds-date-line);
  border-radius: 14px;
  background: var(--ds-date-surface-soft);
  color: var(--ds-date-text);
  cursor: pointer;
  font-weight: var(--ds-font-weight-strong);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.team-date-month-card:hover,
.team-date-preset-card:hover {
  transform: translateY(-1px);
  border-color: var(--ds-date-selected-line);
  background: var(--ds-date-hover-surface);
}

.team-date-month-card:disabled,
.team-date-month-card[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.42;
  transform: none;
}

.team-date-month-card:disabled:hover,
.team-date-month-card[aria-disabled="true"]:hover {
  border-color: var(--ds-date-line);
  background: var(--ds-date-surface-soft);
}

.team-date-month-card.selected {
  border-color: var(--ds-date-selected-line);
  background: var(--ds-date-selected-surface);
  box-shadow: none;
}

.team-date-month-card span,
.team-date-preset-card span,
.team-date-help {
  color: var(--ds-date-text-muted);
  font-size: 12px;
  font-weight: var(--ds-font-weight-bold);
}

.team-date-month-card strong {
  margin-top: 4px;
  font-size: 15px;
}

.team-date-detail-tabs {
  margin-top: 16px;
}

.team-date-popover[data-team-date-mode="detail"] .team-date-detail-tabs {
  position: absolute;
  top: 12px;
  right: 12px;
  margin-top: 0;
}

.team-date-native-range {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 12px;
  margin-top: 18px;
}

.team-date-native-range label {
  display: grid;
  gap: 7px;
  color: var(--ds-date-text-muted);
  font-size: 12px;
  font-weight: 900;
}

.team-date-native-range input {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--ds-date-line);
  border-radius: 12px;
  background: var(--ds-date-surface);
  color: var(--ds-date-text);
  font-weight: var(--ds-font-weight-strong);
}

.team-date-presets,
.team-date-year-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(100px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.team-date-year-grid {
  grid-template-columns: repeat(3, minmax(110px, 1fr));
}

.team-date-popover__foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--ds-date-row-line);
}

.team-date-foot-btn {
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid var(--ds-date-line);
  border-radius: 999px;
  background: var(--ds-date-surface);
  color: var(--ds-date-text);
  cursor: pointer;
  font-weight: var(--ds-font-weight-strong);
}

.team-date-foot-btn--primary {
  border-color: var(--ds-brand);
  background: var(--ds-brand);
  color: #fff7ea;
}

.ghost-button {
  min-height: 34px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  padding: 0 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  transition: all 0.2s ease;
}

.icon-button {
  width: 38px;
  height: 38px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface-soft);
}

.icon-button:hover {
  background: var(--ds-bg-soft);
  border-color: var(--color-border);
  color: var(--color-accent);
  transform: translateY(-1px);
}

.icon-button svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.header-icon-action {
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    color 0.2s ease,
    transform 0.2s ease,
    opacity 0.2s ease;
  opacity: 0.82;
}

.header-icon-action:hover {
  color: var(--color-accent);
  opacity: 1;
  transform: translateY(-1px);
}

.header-icon-action svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ghost-button-soft {
  background: var(--color-surface-soft);
}

.header-user-button {
  min-height: 22px;
  padding: 0;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid rgba(217, 197, 168, 0.72);
  background: transparent;
  box-shadow: none;
}

.header-logout-button {
  flex: 0 0 auto;
  color: var(--color-text);
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  cursor: pointer;
}

.user-chip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-surface-strong);
  color: var(--color-text-soft);
  font-size: 10px;
  font-weight: 900;
  flex: 0 0 auto;
}

.user-chip-text {
  display: flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
}

.user-chip-text strong,
.user-chip-text em {
  font-size: 11px;
  font-style: normal;
}

.user-chip-text strong {
  color: var(--color-text);
}

.user-chip-text em {
  color: var(--color-text-muted);
}

.user-chip-caret {
  color: var(--color-text-muted);
  font-size: 9px;
  line-height: 1;
}

.header-logout-button svg {
  width: 22px;
  height: 22px;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(560px, 100%);
  min-height: 34px;
  padding: 0 0 0 4px;
  border-bottom: 1px solid rgba(217, 197, 168, 0.9);
  background: transparent;
}

.header-search-shell {
  position: relative;
  width: min(560px, 100%);
}

.header-search-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  flex: 0 0 auto;
}

.header-search-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2.1;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.header-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.96);
  font-size: 12.5px;
  font-weight: 900;
  outline: none;
  -webkit-text-fill-color: rgba(255, 255, 255, 0.96);
}

.header-search input::placeholder {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12.5px;
  font-weight: 900;
}

.header-search input::-webkit-search-cancel-button {
  filter: invert(1) brightness(1.9);
  cursor: pointer;
  opacity: 0.92;
}

.header-search-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: min(620px, 100%);
  max-height: min(62vh, 480px);
  overflow: auto;
  border: 1px solid rgba(217, 197, 168, 0.6);
  border-radius: 18px;
  background: rgba(255, 250, 243, 0.98);
  box-shadow: var(--shadow-float);
  backdrop-filter: blur(12px);
  z-index: 40;
}

.header-search-dropdown__empty {
  padding: 16px 18px;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-muted);
}

.header-search-dropdown__item {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  border: 0;
  border-top: 1px solid rgba(217, 197, 168, 0.22);
  background: transparent;
  color: var(--color-text);
  text-align: left;
  cursor: pointer;
}

.header-search-dropdown__item:first-child {
  border-top: 0;
}

.header-search-dropdown__item:hover,
.header-search-dropdown__item:focus-visible,
.header-search-dropdown__item.is-active {
  background: var(--ds-date-selected-surface);
  outline: none;
}

.header-search-dropdown__item.is-active {
  box-shadow: inset 3px 0 0 var(--ds-date-selected-line);
}

.header-search-dropdown__main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.header-search-dropdown__title {
  font-size: 13px;
  font-weight: 900;
  color: var(--color-text);
  line-height: 1.3;
}

.header-search-dropdown__path {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-muted);
  line-height: 1.35;
}

.header-search-dropdown__type {
  flex: 0 0 auto;
  margin-top: 1px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  text-transform: uppercase;
}

.user-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 280px;
  padding: 16px;
  border: 1px solid var(--ds-dialog-line);
  border-radius: var(--ds-radius-lg);
  background: var(--ds-dialog-surface);
  box-shadow: var(--ds-shadow-card);
  backdrop-filter: var(--ds-backdrop-blur);
  z-index: 44;
}

.user-popover--menu {
  position: fixed;
  top: 62px;
  right: 12px;
}

.user-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ds-dialog-row-line);
}

.user-popover-head strong {
  font-size: var(--ds-type-section-title);
  font-weight: var(--ds-font-weight-heavy);
  color: var(--ds-ink);
  letter-spacing: var(--ds-letter-spacing);
}

.user-popover-settings {
  color: var(--color-text);
  opacity: 0.9;
}

.user-popover-settings:hover {
  color: var(--color-accent);
  opacity: 1;
}

.user-popover-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 36px;
  font-size: var(--ds-type-caption);
  padding: 8px 0;
  color: var(--ds-ink);
}

.user-popover-row strong {
  font-weight: var(--ds-font-weight-heavy);
  color: var(--ds-ink);
  text-align: right;
}

.user-popover-row + .user-popover-row {
  border-top: 1px solid var(--ds-dialog-row-line);
}

.user-popover-label {
  color: var(--ds-muted);
  font-weight: var(--ds-font-weight-strong);
}

.dashboard-main {
  flex: 1;
  height: calc(100dvh - 52px);
  padding: 0;
  overflow: hidden;
}

.main-stage {
  height: calc(100dvh - 52px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dashboard-footer {
  position: fixed;
  right: 10px;
  bottom: 0;
  left: 10px;
  z-index: 45;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 10px;
  color: rgba(33, 70, 52, 0.76);
  font-size: 11px;
  font-weight: 800;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.18s ease;
}

.dashboard-footer.is-scroll-muted {
  opacity: 0.22;
}

.shell-footer-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
}

.shell-footer-title {
  color: rgba(33, 70, 52, 0.82);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.shell-footer-version {
  align-self: flex-end;
  color: rgba(33, 70, 52, 0.58);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  transform: translateY(1px);
}

.shell-footer-version:empty {
  display: none;
}

.shell-footer-data-month {
  color: rgba(33, 70, 52, 0.62);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.stage-frame {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.stage-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--color-surface);
}

.stage-empty {
  flex: 1;
  min-height: 0;
  background: transparent;
}

.shell-forbidden-stage {
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: var(--ds-bg);
}

.shell-forbidden-panel {
  display: flex;
  width: min(460px, 100%);
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.shell-forbidden-panel strong {
  color: var(--color-text);
  font-size: 24px;
  font-weight: 900;
}

.shell-forbidden-panel p {
  margin: 0;
  color: var(--color-text-soft);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.55;
}

.shell-forbidden-logout {
  min-width: 104px;
  min-height: 38px;
  margin-top: 12px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--color-brand-deep);
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.shell-forbidden-logout:hover {
  background: var(--color-brand);
}

@media (max-width: 1180px) {
  .dashboard-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .header-left,
  .header-middle,
  .header-right {
    width: 100%;
  }

  .header-left {
    order: 1;
  }

  .header-middle {
    position: relative;
    left: auto;
    transform: none;
    order: 2;
    justify-content: flex-start;
    width: 100%;
    max-width: none;
    margin-top: 8px;
  }

  .header-right {
    order: 3;
    justify-content: space-between;
    margin-top: 8px;
    gap: 12px;
  }

  .header-actions {
    padding-left: 0;
    border-left: 0;
  }

  .header-date-controls {
    width: auto;
    justify-content: flex-start;
    margin-left: 0;
    margin-right: 0;
  }
}

@media (max-width: 980px) {
  .login-screen {
    padding: 16px;
  }

  .login-backdrop {
    min-height: calc(100vh - 32px);
  }

  .login-card {
    grid-template-columns: 1fr;
  }

  .login-brand {
    padding: 40px 28px 20px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .login-form-wrap {
    padding: 28px;
  }
}

@media (max-width: 720px) {
  .dashboard-main {
    padding: 0;
  }

  .main-stage {
    height: calc(100vh - 52px);
  }
}
