:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-soft: #f2f4f7;
  --surface-quiet: rgba(255, 255, 255, 0.8);
  --ink: #111827;
  --muted: #667085;
  --muted-2: #98a2b3;
  --line: rgba(17, 24, 39, 0.1);
  --line-soft: rgba(17, 24, 39, 0.06);
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --ok: #157347;
  --warn: #9a6700;
  --bad: #b93815;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 8px;
  --shadow-soft: 0 14px 38px rgba(17, 24, 39, 0.045);
}

* {
  box-sizing: border-box;
}

h1,
h2,
h3,
p {
  margin: 0;
}

body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.06), transparent 24%),
    radial-gradient(circle at top left, rgba(17, 24, 39, 0.05), transparent 30%),
    var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(17, 24, 39, 0.018) 1px, transparent 1px);
  background-size: 100% 40px;
  opacity: 0.4;
}

.app-shell {
  width: 100%;
  margin: 0;
  padding: 0;
}

.overline,
.status-key,
.stat-label,
label span,
.feedback,
summary,
th,
.pill {
  font-family: "IBM Plex Mono", monospace;
}

.topbar {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  border: none;
}

.brand {
  padding: 32px 24px;
  border-bottom: 1px solid var(--line-soft);
}

.overline {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
  font-weight: 700;
}

.app-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(37, 99, 235, 0.05));
  box-shadow: none;
  transition: all 200ms ease;
}

.app-logo:hover {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(37, 99, 235, 0.1));
  transform: scale(1.05);
}

.app-logo img {
  display: block;
  width: auto;
  max-width: 32px;
  max-height: 32px;
  object-fit: contain;
}

h1 {
  font-size: 3.2rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0 0 8px 0;
}

.subline {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.95rem;
  max-width: 60ch;
  font-weight: 400;
}

.status-inline {
  display: none !important;
}

.status-item {
  display: inline-grid;
  grid-auto-rows: auto;
  gap: 5px;
  min-width: 132px;
  height: 60px;
  padding: 6px 10px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  align-content: start;
}

.status-item strong {
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.status-detail {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.status-item-wide {
  min-width: 208px;
}

.status-key {
  color: var(--muted-2);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 0 24px;
  border: none;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  justify-content: space-between;
}

.section-nav {
  display: flex;
  align-items: center;
  gap: 0;
  min-height: 56px;
  padding: 0;
  border: none;
  background: transparent;
}

.page-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 0;
  min-height: 56px;
  padding: 0 24px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  text-decoration: none;
  transition: all 160ms ease;
  border-bottom: 2px solid transparent;
  position: relative;
}

.page-nav .secondary-button {
  width: auto;
  margin-right: auto;
  padding: 8px 16px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--accent-strong);
  font-weight: 600;
  min-height: auto;
  transition: all 160ms ease;
}

.page-nav .secondary-button:hover {
  background: rgba(37, 99, 235, 0.12);
  border-color: rgba(37, 99, 235, 0.2);
  transform: translateY(-2px);
}

.page-nav-link:hover {
  background: rgba(37, 99, 235, 0.04);
  color: var(--accent-strong);
}

.page-nav-link:focus-visible,
.section-tab:focus-visible,
.lang-button:focus-visible {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
  outline: 0;
}

.section-tab {
  min-width: 0;
  min-height: 56px;
  padding: 0 20px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 160ms ease;
}

.section-tab:hover {
  color: var(--ink);
  background: rgba(37, 99, 235, 0.03);
}

.section-tab.is-active {
  background: transparent;
  box-shadow: none;
  color: var(--accent-strong);
  border-bottom-color: var(--accent-strong);
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 56px;
  padding: 0 4px;
  border: none;
  background: transparent;
  margin-left: auto;
}

.lang-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: auto;
  min-width: 44px;
  min-height: 40px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: all 160ms ease;
}

.lang-button:hover {
  background: rgba(37, 99, 235, 0.08);
  color: var(--ink);
}

.lang-button .flag {
  display: inline-block;
  width: 16px;
  height: 11px;
  overflow: hidden;
  border-radius: 3px;
  box-shadow: inset 0 0 0 0.5px rgba(37, 99, 235, 0.12);
  flex: 0 0 auto;
  transition: transform 160ms ease;
}

.lang-button:hover .flag {
  transform: scale(1.1);
}

.flag-de {
  background: linear-gradient(to bottom, #111 0 33.33%, #dd0000 33.33% 66.66%, #ffce00 66.66% 100%);
}

.flag-cz {
  background:
    linear-gradient(33deg, #11457e 0 49%, transparent 50%),
    linear-gradient(to bottom, #fff 0 50%, #d7141a 50% 100%);
}

.flag-hu {
  background: linear-gradient(to bottom, #ce2939 0 33.33%, #fff 33.33% 66.66%, #477050 66.66% 100%);
}

.flag-ro {
  background: linear-gradient(to right, #002b7f 0 33.33%, #fcd116 33.33% 66.66%, #ce1126 66.66% 100%);
}

.flag-ua {
  background: linear-gradient(to bottom, #0057b7 0 50%, #ffd700 50% 100%);
}

.flag-gb {
  background:
    linear-gradient(33deg, transparent 0 42%, #fff 42% 48%, #c8102e 48% 53%, #fff 53% 59%, transparent 59%),
    linear-gradient(-33deg, transparent 0 42%, #fff 42% 48%, #c8102e 48% 53%, #fff 53% 59%, transparent 59%),
    linear-gradient(to right, transparent 0 42%, #fff 42% 46%, #c8102e 46% 54%, #fff 54% 58%, transparent 58%),
    linear-gradient(to bottom, transparent 0 35%, #fff 35% 42%, #c8102e 42% 58%, #fff 58% 65%, transparent 65%),
    #012169;
}

.lang-button.is-active {
  background: rgba(37, 99, 235, 0.12);
  box-shadow: inset 0 0 0 1.5px rgba(37, 99, 235, 0.24);
  color: var(--accent-strong);
  font-weight: 700;
}

.analytics-stage {
  margin: 24px 0 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.tab-button {
  width: auto;
  min-width: 0;
  min-height: 40px;
  padding: 10px 15px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-weight: 700;
}

.tab-button.is-active {
  background: rgba(37, 99, 235, 0.12);
  border-color: rgba(37, 99, 235, 0.32);
  color: var(--accent-strong);
}

.tab-hidden {
  display: none !important;
}

.metrics-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 24px;
  padding: 32px 24px 28px;
  margin: 0;
  border-bottom: 1px solid var(--line-soft);
}

.metric {
  min-height: 72px;
  display: grid;
  align-content: center;
  border-left: 1px solid var(--line);
  padding-left: 18px;
}

.metric:first-child {
  border-left: none;
  padding-left: 0;
}

.stat-label {
  display: block;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.68rem;
}

.stat-value {
  display: block;
  margin-top: 8px;
  font-size: 2.45rem;
  line-height: 0.94;
  letter-spacing: -0.04em;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(360px, 0.95fr);
  gap: 36px;
  align-items: start;
  width: min(1520px, calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 24px 42px;
}

.ops-page .workspace {
  grid-template-columns: minmax(0, 1fr);
}

.ops-page .insight-rail,
.admin-page .primary-zone,
.admin-page .metrics-strip {
  display: none;
}

.admin-page .workspace {
  grid-template-columns: minmax(0, 1fr);
}

.admin-page .insight-rail {
  position: static;
  display: block;
}

.admin-page .report-surface,
.admin-page .utility-surface {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-bottom: 28px;
}

.admin-auth-panel {
  margin: 18px 0 22px;
  padding: 14px 0 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.admin-auth-panel .section-head {
  margin-bottom: 10px;
}

.admin-auth-panel .section-head h2 {
  font-size: 1.08rem;
}

.admin-auth-panel .section-head p {
  font-size: 0.82rem;
}

.admin-auth-domain-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 12px;
}

.admin-auth-domain-list span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 9px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: var(--radius-sm);
  color: var(--accent-strong);
  background: rgba(37, 99, 235, 0.08);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
}

.admin-auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-auth-actions button {
  width: auto;
  min-width: 0;
  min-height: 36px;
  padding: 8px 14px;
}

.admin-auth-current {
  margin-top: 8px;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.74rem;
}

.admin-authenticated .admin-auth-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 14px 0 18px;
  padding: 10px 0;
}

.admin-authenticated .admin-auth-panel .section-head,
.admin-authenticated .admin-auth-domain-list,
.admin-authenticated #admin-auth-feedback {
  display: none;
}

.admin-authenticated .admin-auth-actions {
  order: 2;
}

.admin-authenticated .admin-auth-current {
  order: 1;
  margin-top: 0;
  color: var(--accent-strong);
}

.welcome-screen {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 42%, rgba(37, 99, 235, 0.24), transparent 30%),
    radial-gradient(circle at 14% 18%, rgba(154, 103, 0, 0.12), transparent 24%),
    linear-gradient(180deg, #0a0a0b, #111114);
  opacity: 0;
  pointer-events: none;
  transition: opacity 360ms cubic-bezier(0.16, 1, 0.3, 1);
}

.welcome-screen.is-visible {
  opacity: 1;
}

.welcome-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.9'/%3E%3C/svg%3E");
  mix-blend-mode: screen;
}

.welcome-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at center, #000 0 42%, transparent 72%);
  opacity: 0.44;
  transform: perspective(900px) rotateX(58deg) translateY(12%);
  transform-origin: center;
}

.welcome-screen.is-visible .welcome-grid {
  animation: welcomeGrid 4300ms linear both;
}

.welcome-sweep {
  position: absolute;
  inset: -30% -10%;
  background: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, 0.18) 50%, transparent 58%);
  opacity: 0;
  transform: translateX(-42%);
}

.welcome-screen.is-visible .welcome-sweep {
  animation: welcomeSweep 2200ms ease-out 420ms both;
}

.welcome-aurora {
  position: absolute;
  width: 58vmax;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(37, 99, 235, 0.34), transparent 58%),
    conic-gradient(from 120deg, rgba(37, 99, 235, 0.22), rgba(17, 24, 39, 0.08), rgba(154, 103, 0, 0.12), rgba(37, 99, 235, 0.22));
  filter: blur(18px);
  opacity: 0.58;
  transform: scale(0.82) rotate(0deg);
}

.welcome-screen.is-visible .welcome-aurora {
  animation: welcomeAurora 3600ms ease both;
}

.welcome-ring {
  position: absolute;
  width: min(680px, 78vw);
  aspect-ratio: 1;
  border: 1px solid rgba(37, 99, 235, 0.28);
  border-radius: 50%;
  opacity: 0;
}

.welcome-ring-two {
  width: min(520px, 62vw);
  border-color: rgba(255, 255, 255, 0.1);
}

.welcome-screen.is-visible .welcome-ring-one {
  animation: welcomeRing 1900ms ease-out 160ms both;
}

.welcome-screen.is-visible .welcome-ring-two {
  animation: welcomeRing 1700ms ease-out 280ms both;
}

.welcome-line {
  position: absolute;
  left: 50%;
  width: min(920px, 82vw);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.76), transparent);
  opacity: 0;
  transform: translateX(-50%) scaleX(0.35);
}

.welcome-line-top {
  top: 24%;
}

.welcome-line-bottom {
  bottom: 24%;
}

.welcome-screen.is-visible .welcome-line-top {
  animation: welcomeLine 1300ms ease-out 120ms both;
}

.welcome-screen.is-visible .welcome-line-bottom {
  animation: welcomeLine 1300ms ease-out 260ms both;
}

.welcome-card {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 14px;
  width: min(680px, calc(100vw - 40px));
  padding: clamp(34px, 5vw, 60px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  background: rgba(18, 18, 22, 0.62);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 34px 110px rgba(0, 0, 0, 0.54),
    0 0 80px rgba(37, 99, 235, 0.09);
  backdrop-filter: blur(24px) saturate(1.18);
  -webkit-backdrop-filter: blur(24px) saturate(1.18);
  text-align: center;
  transform: translateY(22px) scale(0.96);
}

.welcome-screen.is-visible .welcome-card {
  animation: welcomeCard 760ms cubic-bezier(0.2, 0.9, 0.2, 1.1) 130ms both;
}

.welcome-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 158px;
  min-height: 54px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02)),
    rgba(37, 99, 235, 0.38);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 20px 46px rgba(37, 99, 235, 0.26);
}

.welcome-logo img {
  display: block;
  width: auto;
  max-width: 124px;
  max-height: 30px;
  object-fit: contain;
}

.welcome-logo img:not([src]),
.welcome-logo img[src=""] {
  display: none;
}

.welcome-logo img:not([src]) + .welcome-logo-mark,
.welcome-logo img[src=""] + .welcome-logo-mark {
  display: inline;
}

.welcome-logo-mark {
  display: none;
  font-weight: 700;
  font-size: 1.22rem;
  line-height: 1;
}

.welcome-kicker {
  color: #60a5fa;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.welcome-card h2 {
  color: #f5f5f7;
  font-size: clamp(2.6rem, 6vw, 5.6rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.welcome-card p {
  color: #8a8f98;
  font-size: 1rem;
}

.welcome-progress {
  width: min(360px, 66vw);
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.08);
}

.welcome-progress::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, rgba(255, 255, 255, 0.78), #9a6700);
  transform-origin: left;
  transform: scaleX(0);
}

.welcome-screen.is-visible .welcome-progress::before {
  animation: welcomeProgress 3100ms ease-out 260ms both;
}

@keyframes welcomeAurora {
  0% {
    transform: scale(0.72) rotate(-20deg);
    opacity: 0;
  }
  18% {
    opacity: 0.78;
  }
  100% {
    transform: scale(1.08) rotate(34deg);
    opacity: 0.42;
  }
}

@keyframes welcomeGrid {
  from {
    background-position: 0 0, 0 0;
    opacity: 0.18;
  }
  to {
    background-position: 0 72px, 72px 0;
    opacity: 0.58;
  }
}

@keyframes welcomeSweep {
  0% {
    opacity: 0;
    transform: translateX(-48%);
  }
  18% {
    opacity: 0.95;
  }
  100% {
    opacity: 0;
    transform: translateX(48%);
  }
}

@keyframes welcomeLine {
  0% {
    opacity: 0;
    transform: translateX(-50%) scaleX(0.12);
  }
  35% {
    opacity: 1;
  }
  100% {
    opacity: 0.45;
    transform: translateX(-50%) scaleX(1);
  }
}

@keyframes welcomeRing {
  0% {
    opacity: 0;
    transform: scale(0.45);
  }
  35% {
    opacity: 0.85;
  }
  100% {
    opacity: 0;
    transform: scale(1.18);
  }
}

@keyframes welcomeCard {
  0% {
    opacity: 0;
    transform: translateY(28px) scale(0.94);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes welcomeProgress {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

.admin-auth-pending .workspace,
.admin-auth-pending .analytics-stage,
.admin-auth-pending .metrics-strip {
  display: none;
}

.primary-zone {
  display: grid;
  gap: 32px;
}

.task-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(270px, 0.8fr);
  gap: 28px;
  padding: 22px 0 26px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stage-main,
.stage-side {
  padding-right: 8px;
}

.section-head {
  margin-bottom: 14px;
}

.section-head h2 {
  font-size: 1.38rem;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.section-head p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.45;
}

.section-head-compact h2 {
  font-size: 1.04rem;
}

.section-head-compact p {
  font-size: 0.82rem;
}

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

label {
  display: grid;
  gap: 7px;
}

label span {
  color: var(--muted-2);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.inline-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

input,
textarea,
button {
  width: 100%;
  border-radius: var(--radius-sm);
  font-size: 0.98rem;
}

input,
textarea {
  padding: 12px 13px;
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  background: var(--surface);
  border: 1px solid var(--line);
}

select {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  padding: 11px 12px;
  font-size: 0.92rem;
  font-family: "Space Grotesk", sans-serif;
  background: var(--surface);
  color: var(--ink);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.42);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.08);
}

button {
  cursor: pointer;
  border: 1px solid rgba(37, 99, 235, 0.12);
  padding: 11px 14px;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}

button:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
}

.button-link {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  background: transparent;
}

.bag-calculator {
  display: grid;
  gap: 12px;
  padding: 16px;
  margin: 4px 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.bag-calculator-results {
  display: grid;
  gap: 8px;
}

.bag-calculator-note {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.condition-panel {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(37, 99, 235, 0.16);
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.06), rgba(37, 99, 235, 0.03));
}

.condition-panel.is-hidden {
  display: none;
}

.condition-kicker {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.condition-code {
  margin-top: 4px;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.condition-copy {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.92rem;
}

.assignment-info {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.55);
}

.assignment-info:empty {
  display: none;
}

.assignment-driver {
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
}

.assignment-meta {
  margin-top: 2px;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
}

.assignment-info.is-stale {
  border-color: rgba(154, 103, 0, 0.45);
  background: rgba(154, 103, 0, 0.09);
}

.assignment-warn {
  margin-top: 6px;
  color: #7d5b00;
  font-weight: 700;
  font-size: 0.82rem;
}

.condition-actions {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.damage-reason-panel {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(37, 99, 235, 0.16);
}

.damage-reason-panel.is-hidden {
  display: none;
}

.confirm-ok {
  background: #1f7a45;
}

.confirm-ok:hover {
  background: #15663a;
}

.confirm-damaged {
  background: #ab3f2c;
}

.confirm-damaged:hover {
  background: #913523;
}

.feedback {
  min-height: 1.1rem;
  margin-top: 10px;
  color: var(--muted-2);
  font-size: 0.78rem;
}

.feedback.success {
  color: var(--ok);
}

.feedback.error {
  color: var(--bad);
}

.data-surface {
  padding-top: 4px;
}

.assignments-search-wrap {
  margin: 8px 0 14px;
  max-width: 560px;
}

.surface-divider {
  height: 1px;
  background: var(--line);
  margin: 22px 0;
}

.table-wrap {
  overflow: auto;
  border: none;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.assignments-table-wrap {
  max-height: 360px;
}

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

th,
td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line-soft);
}

thead th {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
  background: transparent;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover td {
  background: rgba(17, 24, 39, 0.018);
}

.insight-rail {
  position: sticky;
  top: 10px;
  display: grid;
  gap: 28px;
}

.report-surface {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
}

.protected-surface .is-hidden {
  display: none;
}

.lock-panel {
  display: grid;
  gap: 12px;
  padding: 18px 0 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line-soft);
}

.report-actions {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  margin: 8px 0 10px;
}

.report-date-picker {
  min-width: 220px;
  display: grid;
  gap: 6px;
  align-self: end;
}

.report-date-picker span {
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.protected-actions {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 12px;
}

.secondary-button {
  width: auto;
  min-width: 200px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}

.report-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.report-upload {
  margin-top: 4px;
  padding: 14px 0 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line-soft);
  border-radius: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  background: transparent;
}

.report-upload-copy h3 {
  font-size: 0.98rem;
}

.report-upload-copy p {
  margin-top: 4px;
  font-size: 0.82rem;
  color: var(--muted);
}

.file-trigger {
  position: relative;
  min-width: 156px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
}

.file-trigger input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.button-group {
  display: flex;
  gap: 10px;
  align-items: center;
}

.button-group button,
.button-group .file-trigger {
  flex: 0 0 auto;
}

.report-accordion {
  margin-top: 18px;
}

.report-accordion summary,
.utility-surface summary {
  cursor: pointer;
  list-style: none;
  color: var(--accent-strong);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.report-accordion summary::-webkit-details-marker,
.utility-surface summary::-webkit-details-marker {
  display: none;
}

.report-section + .report-section {
  margin-top: 18px;
}

.report-section-head {
  margin-bottom: 10px;
}

.report-section-head h3 {
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.report-section-head p {
  margin-top: 3px;
  font-size: 0.82rem;
  color: var(--muted);
}

.report-summary {
  display: grid;
  gap: 2px;
}

.report-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line-soft);
}

.analytics-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 18px;
  margin: 14px 0 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.analytics-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0 20px;
}

.chart-card {
  padding: 14px 0 0;
  border-top: 1px solid var(--line);
}

.chart-head h3 {
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.chart-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.chart-panel {
  margin-top: 10px;
  display: grid;
  gap: 10px;
}

.chart-balance {
  display: grid;
  gap: 12px;
}

.chart-track {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.06);
}

.chart-segment {
  height: 100%;
}

.chart-segment-ok {
  background: linear-gradient(90deg, rgba(21, 115, 71, 0.9), rgba(21, 115, 71, 0.72));
}

.chart-segment-warn {
  background: linear-gradient(90deg, rgba(154, 103, 0, 0.9), rgba(154, 103, 0, 0.7));
}

.chart-balance-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.chart-balance-item {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.55);
}

.chart-balance-label {
  color: var(--muted-2);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chart-balance-item strong {
  font-size: 1.1rem;
  line-height: 1.05;
}

.chart-balance-item span {
  color: var(--muted);
  font-size: 0.78rem;
}

.chart-row {
  display: grid;
  gap: 6px;
}

.chart-row-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: baseline;
}

.chart-row-label {
  font-weight: 700;
  letter-spacing: -0.01em;
}

.chart-row-value {
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.84rem;
}

.chart-bar {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(17, 24, 39, 0.06);
}

.chart-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.92), rgba(37, 99, 235, 0.62));
}

.chart-row-sub {
  color: var(--muted);
  font-size: 0.77rem;
}

.discrepancy-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 6px 0 10px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
}

.checkbox-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  color: var(--muted);
}

.checkbox-row input {
  width: auto;
}

.summary-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  border: none;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 0;
  padding: 12px 0;
  background: transparent;
}

.summary-main {
  font-weight: 700;
  letter-spacing: -0.01em;
}

.summary-meta,
.report-meta,
.report-product-metric,
.order-title {
  color: var(--muted);
  font-size: 0.8rem;
}

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

.report-list-compact {
  max-height: 420px;
  overflow: auto;
  padding-right: 4px;
}

.company-report {
  padding: 14px 0;
  border: none;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 0;
  background: transparent;
}

.company-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.company-summary {
  display: block;
  list-style: none;
  cursor: pointer;
}

.company-summary::-webkit-details-marker {
  display: none;
}

.company-name {
  font-size: 1rem;
  font-weight: 700;
}

.driver-report {
  margin-top: 12px;
  padding: 12px 0 0;
  border: none;
  border-top: 1px solid var(--line-soft);
  border-radius: 0;
  background: transparent;
}

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

.report-name {
  font-size: 0.92rem;
  font-weight: 700;
}

.report-boxes {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.order-report {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}

.report-product-list {
  display: grid;
  gap: 6px;
}

.report-product-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border: none;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 0;
  background: transparent;
}

.utility-surface {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

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

.detail-card {
  border: none;
  border-top: 1px solid var(--line-soft);
  border-radius: 0;
  background: transparent;
  padding: 14px 0 0;
}

.empty-state {
  color: var(--muted-2);
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.7rem;
  font-weight: 500;
}

.pill.ok {
  color: #165b36;
  border-color: rgba(21, 115, 71, 0.18);
  background: rgba(21, 115, 71, 0.08);
}

.pill.warn {
  color: #7d5b00;
  border-color: rgba(154, 103, 0, 0.18);
  background: rgba(154, 103, 0, 0.08);
}

.pill.bad {
  color: #8d321a;
  border-color: rgba(185, 56, 21, 0.18);
  background: rgba(185, 56, 21, 0.08);
}

.pill.neutral {
  color: #475467;
  border-color: rgba(71, 84, 103, 0.16);
  background: rgba(71, 84, 103, 0.08);
}

@media (max-width: 1220px) {
  .workspace,
  .topbar,
  .admin-page .insight-rail {
    grid-template-columns: 1fr;
  }

  .analytics-overview,
  .chart-balance-meta {
    grid-template-columns: 1fr;
  }

  .status-inline {
    justify-content: flex-start;
  }

  .insight-rail {
    position: static;
  }
}

@media (max-width: 900px) {
  .app-shell {
    width: min(100% - 16px, 1520px);
    padding-top: 16px;
  }

  .task-stage,
  .metrics-strip,
  .report-upload,
  .discrepancy-filters,
  .analytics-kpi-grid,
  .condition-actions,
  .inline-fields,
  .summary-row,
  .report-product-row {
    grid-template-columns: 1fr;
  }

  .status-inline {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .status-item,
  .status-item-wide {
    min-width: 0;
  }

  .metric {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--line-soft);
    padding-top: 12px;
  }

  .metric:first-child {
    border-top: none;
    padding-top: 0;
  }

  .report-actions {
    justify-content: stretch;
  }

  .report-date-picker,
  .secondary-button,
  .file-trigger {
    width: 100%;
  }

  .analytics-overview {
    grid-template-columns: 1fr;
  }

  .page-nav {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }

  .page-nav::-webkit-scrollbar {
    display: none;
  }

  .page-nav .secondary-button,
  .section-tab,
  .lang-button {
    width: auto;
    white-space: nowrap;
  }

  .section-nav,
  .lang-switch {
    flex: 0 0 auto;
  }
}

/* ═════════════════════════════════════════════════════════════════════════════
   ADMIN DASHBOARD - CLEAN & MINIMAL
   ═════════════════════════════════════════════════════════════════════════════ */

.admin-dashboard {
  width: min(1400px, calc(100% - 48px));
  margin: 0 auto;
  padding: 32px 24px;
  display: flex !important;
  flex-direction: column;
  gap: 28px;
}

/* KPI SECTION */
.admin-kpi-section {
  padding: 0;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.kpi-widget {
  display: grid;
  gap: 8px;
  padding: 24px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(17, 24, 39, 0.04);
  transition: all 200ms ease;
}

.kpi-widget:hover {
  border-color: rgba(37, 99, 235, 0.2);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
}

.kpi-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
  font-family: "IBM Plex Mono", monospace;
}

.kpi-value {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--accent-strong);
}

/* SEARCH & FILTER */
.admin-search-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0;
}

.search-bar {
  position: relative;
}

.search-bar input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: var(--surface);
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 200ms ease;
}

.search-bar input:focus {
  outline: 0;
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.filter-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-select {
  padding: 10px 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: var(--surface);
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--ink);
  cursor: pointer;
  transition: all 200ms ease;
  flex: 1;
  min-width: 140px;
}

.filter-select:focus {
  outline: 0;
  border-color: rgba(37, 99, 235, 0.3);
}

.filter-select:hover {
  border-color: rgba(37, 99, 235, 0.2);
}

/* ACCORDION SECTIONS */
.admin-accordion {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
  transition: all 200ms ease;
}

.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px 20px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 1px solid var(--line-soft);
  transition: all 200ms ease;
  gap: 12px;
}

.accordion-header:hover {
  background: rgba(37, 99, 235, 0.02);
}

.accordion-toggle {
  display: flex;
  align-items: center;
  font-size: 0.8rem;
  transition: transform 200ms ease;
  color: var(--muted);
}

.admin-accordion.is-closed .accordion-toggle {
  transform: rotate(-90deg);
}

.accordion-content {
  padding: 20px;
  max-height: 2000px;
  overflow: hidden;
  transition: all 300ms ease;
  border-bottom: 1px solid var(--line-soft);
}

.admin-accordion.is-closed .accordion-content {
  max-height: 0;
  padding: 0 20px;
  border-bottom: 0;
}

/* QUICK ACTIONS */
.actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.action-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: rgba(37, 99, 235, 0.05);
  color: var(--accent-strong);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 200ms ease;
}

.action-button:hover {
  background: rgba(37, 99, 235, 0.12);
  border-color: rgba(37, 99, 235, 0.2);
  transform: translateY(-2px);
}

.action-button.danger {
  color: var(--bad);
  background: rgba(185, 56, 21, 0.05);
  border-color: rgba(185, 56, 21, 0.1);
}

.action-button.danger:hover {
  background: rgba(185, 56, 21, 0.12);
  border-color: rgba(185, 56, 21, 0.2);
}

.action-icon {
  font-size: 1.5rem;
}

/* ADMIN PAGE SPECIFIC */
.admin-page .app-shell {
  width: 100%;
  margin: 0;
  padding: 0;
}

.admin-page .workspace {
  display: none;
}

/* ADMIN TABS */
.admin-main {
  width: min(1400px, calc(100% - 48px));
  margin: 0 auto;
  padding: 32px 24px;
}

.admin-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 0;
}

.admin-tab-btn {
  width: auto; /* globale button-Regel setzt 100% -> Tabs stapelten sich senkrecht */
  padding: 12px 20px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 200ms ease;
  font-size: 0.95rem;
}

.admin-tab-btn:hover {
  color: var(--ink);
  background: rgba(37, 99, 235, 0.03);
}

.admin-tab-btn.is-active {
  color: var(--accent-strong);
  border-bottom-color: var(--accent-strong);
}

.admin-tab-content {
  display: none;
  animation: fadeIn 200ms ease;
}

.admin-tab-content.is-active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ADMIN CARDS */
.admin-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.admin-card {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  padding: 24px;
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(17, 24, 39, 0.04);
}

.admin-card h3 {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 1.1rem;
  color: var(--ink);
}

.admin-card p {
  margin: 0 0 16px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* DANGER BUTTON */
.secondary-button.danger {
  color: var(--bad);
  border-color: rgba(185, 56, 21, 0.2);
  background: rgba(185, 56, 21, 0.05);
}

.secondary-button.danger:hover {
  background: rgba(185, 56, 21, 0.12);
  border-color: rgba(185, 56, 21, 0.3);
}

/* ANALYTICS DASHBOARD */
.analytics-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 40px;
}

.kpi-card {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  padding: 16px;
  background: linear-gradient(135deg, rgba(255,255,255,0.8) 0%, rgba(242,244,247,0.5) 100%);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 6px rgba(17, 24, 39, 0.04);
  transition: all 200ms ease;
}

.kpi-card:hover {
  border-color: rgba(37, 99, 235, 0.2);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
}

.kpi-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 8px;
}

.kpi-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: "IBM Plex Mono", monospace;
  line-height: 1.2;
}

.kpi-desc {
  font-size: 0.65rem;
  font-weight: 400;
  color: var(--muted-2);
  text-transform: none;
  letter-spacing: normal;
  font-family: "Space Grotesk", sans-serif;
  line-height: 1.3;
}

.kpi-badge {
  display: none;
}

.kpi-value {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--accent-strong);
  margin-bottom: 0;
}

.kpi-chart {
  height: 4px;
  border-radius: 2px;
  opacity: 0.7;
}

/* CHARTS SECTION */
.analytics-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 28px;
  margin-bottom: 40px;
}

.chart-container {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  padding: 28px;
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(17, 24, 39, 0.04);
}

.chart-header {
  margin-bottom: 24px;
}

.chart-header h3 {
  margin: 0 0 4px 0;
  font-size: 1.1rem;
  color: var(--ink);
}

.chart-header p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.analytics-chart {
  display: block;
  width: 100%;
  max-width: 100%;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .analytics-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .analytics-charts {
    grid-template-columns: 1fr;
  }

  .kpi-value {
    font-size: 2rem;
  }
}

.backpick-filter-controls {
  margin: 16px 0;
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.backpick-filter-controls label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.backpick-filter-controls select {
  min-width: 200px;
}

/* ===== FAQ ACCORDION STYLING ===== */

.faq-section {
  margin: 2rem 0;
  padding: 0;
}

.faq-accordion {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
}

.faq-item {
  border-bottom: 1px solid var(--line-soft);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-toggle {
  width: 100%;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
  text-align: left;
  transition: all 0.2s ease;
  font-family: inherit;
}

.faq-toggle:hover {
  background-color: rgba(37, 99, 235, 0.03);
}

.faq-toggle:focus {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.faq-toggle:active {
  background-color: rgba(37, 99, 235, 0.06);
}

.faq-question {
  flex: 1;
  font-weight: 500;
}

.faq-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}

.faq-toggle[aria-expanded="true"] .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  padding: 0 1.5rem;
}

.faq-answer:not([hidden]) {
  max-height: 500px;
  opacity: 1;
  padding: 0 1.5rem 1rem 1.5rem;
  display: block;
}

.faq-answer p {
  margin: 0.5rem 0;
  line-height: 1.6;
  color: var(--muted);
}

.faq-answer p:first-child {
  margin-top: 0;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .faq-toggle {
    padding: 0.875rem 1rem;
    font-size: 0.95rem;
  }

  .faq-answer {
    padding: 0 1rem;
  }

  .faq-answer:not([hidden]) {
    padding: 0 1rem 0.875rem 1rem;
  }

  .faq-icon {
    width: 18px;
    height: 18px;
  }
}
