@charset "utf-8";

/* Pagina de statistici. Aceleași fonturi și aceeași paletă ca site-ul, dar
   pe fundal închis: e un panou de lucru, se citește des și la orice oră. */

:root {
  --fund: #0e1712;
  --fund-2: #16211b;
  --fund-3: #1d2b23;
  --linie: rgb(244 239 228 / 0.1);
  --text: #f2ede2;
  --text-bland: #b9c3b6;
  --text-sters: #7f8c80;
  --aur: #e8b562;
  --verde: #2dd476;
  --display: "Cormorant Garamond", Georgia, serif;
  --corp: "Manrope", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --usor: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--fund);
  color: var(--text);
  font: 400 0.9375rem/1.6 var(--corp);
  -webkit-font-smoothing: antialiased;
}
h1, h2 { margin: 0; font-weight: 400; font-family: var(--display); letter-spacing: -0.01em; }
dl, dd, dt, ol, ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--aur); outline-offset: 3px; border-radius: 3px; }
[hidden] { display: none !important; }

/* ---------- autentificare ---------- */
.poarta {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}
.poarta__cutie {
  width: min(23rem, 100%);
  display: grid;
  gap: 0.875rem;
  padding: 2rem;
  background: var(--fund-2);
  border: 1px solid var(--linie);
  border-radius: 8px;
}
.poarta__cutie h1 { font-size: 1.875rem; }
.poarta__sub { margin: -0.75rem 0 0.75rem; color: var(--text-sters); font-size: 0.875rem; }
.poarta label { display: grid; gap: 0.375rem; font-size: 0.8125rem; color: var(--text-bland); }
.poarta input {
  padding: 0.75rem 0.875rem;
  background: var(--fund);
  border: 1px solid var(--linie);
  border-radius: 5px;
  color: var(--text);
  font: 400 0.9375rem var(--corp);
}
.poarta input:focus { border-color: var(--aur); outline: none; }
.poarta button {
  margin-top: 0.5rem;
  padding: 0.8125rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(170deg, #f0c069, #c8912f);
  color: #1a1206;
  font-weight: 600;
}
.poarta__eroare {
  margin: 0;
  color: #ff9a8a;
  font-size: 0.8125rem;
  text-align: center;
}

/* ---------- tablou ---------- */
.tablou {
  width: min(78rem, 100% - 2rem);
  margin-inline: auto;
  padding: 2rem 0 4rem;
  display: grid;
  gap: 1.25rem;
}
.cap { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.cap h1 { font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem); }
.cap__sub { margin: 0.25rem 0 0; color: var(--text-sters); font-size: 0.8125rem; }
.inapoi {
  display: inline-block;
  margin-bottom: 0.625rem;
  color: var(--text-sters);
  font-size: 0.8125rem;
  text-decoration: none;
}
.inapoi:hover { color: var(--aur); }
.iesire {
  padding: 0.5rem 0.9375rem;
  background: none;
  border: 1px solid var(--linie);
  border-radius: 999px;
  color: var(--text-bland);
  font-size: 0.8125rem;
}
.iesire:hover { border-color: var(--aur); color: var(--aur); }

/* ---------- live ---------- */
.live {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding: 1.125rem 1.375rem;
  background: var(--fund-2);
  border: 1px solid var(--linie);
  border-radius: 8px;
}
.live__acum { display: flex; align-items: baseline; gap: 0.5rem; }
.live__acum strong { font-size: 1.75rem; font-family: var(--display); font-variant-numeric: lining-nums tabular-nums; color: var(--verde); }
.live__acum span:last-child { color: var(--text-bland); font-size: 0.875rem; }
.punct {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--verde);
  align-self: center;
  box-shadow: 0 0 0 0 rgb(45 212 118 / 0.6);
  animation: puls 2.4s ease-out infinite;
}
@keyframes puls {
  0% { box-shadow: 0 0 0 0 rgb(45 212 118 / 0.55); }
  70%, 100% { box-shadow: 0 0 0 10px rgb(45 212 118 / 0); }
}
.live__azi { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.live__azi dt { font-size: 0.75rem; color: var(--text-sters); text-transform: uppercase; letter-spacing: 0.08em; }
.live__azi dd { font-size: 1.125rem; font-weight: 600; }

/* ---------- perioade ---------- */
.perioade {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.perioade button {
  padding: 0.5rem 0.875rem;
  background: var(--fund-2);
  border: 1px solid var(--linie);
  border-radius: 999px;
  color: var(--text-bland);
  font-size: 0.8125rem;
  transition: background 0.2s var(--usor), color 0.2s var(--usor), border-color 0.2s var(--usor);
}
.perioade button:hover { border-color: var(--aur); color: var(--aur); }
.perioade button.e-activ {
  background: var(--aur);
  border-color: var(--aur);
  color: #1a1206;
  font-weight: 600;
}
.perioade__sau { color: var(--text-sters); font-size: 0.8125rem; margin-inline: 0.375rem; }
.perioade label { display: inline-flex; align-items: center; gap: 0.375rem; color: var(--text-sters); font-size: 0.8125rem; }
.perioade input[type="date"] {
  padding: 0.4375rem 0.625rem;
  background: var(--fund-2);
  border: 1px solid var(--linie);
  border-radius: 5px;
  color: var(--text);
  font: 400 0.8125rem var(--corp);
  color-scheme: dark;
}
.perioade select {
  padding: 0.4375rem 0.625rem;
  background: var(--fund-2);
  border: 1px solid var(--linie);
  border-radius: 999px;
  color: var(--text-bland);
  font: 400 0.8125rem var(--corp);
  color-scheme: dark;
}

/* ---------- cifre ---------- */
.cifre {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.875rem;
}
.cifra {
  padding: 1.125rem 1.25rem;
  background: var(--fund-2);
  border: 1px solid var(--linie);
  border-radius: 8px;
}
.cifra dt { font-size: 0.75rem; color: var(--text-sters); text-transform: uppercase; letter-spacing: 0.08em; }
.cifra dd {
  margin-top: 0.25rem;
  font-family: var(--display);
  font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.375rem);
  line-height: 1.1;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--aur);
}

/* ---------- grafic ---------- */
.grafic-cutie, .lista-cutie {
  padding: 1.25rem 1.375rem;
  background: var(--fund-2);
  border: 1px solid var(--linie);
  border-radius: 8px;
}
.grafic-cutie h2, .lista-cutie h2 {
  margin-bottom: 1rem;
  font-size: 1.125rem;
  color: var(--text-bland);
}
.grafic {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 170px;
}
.bara {
  position: relative;
  flex: 1 1 0;
  min-width: 2px;
  background: linear-gradient(180deg, var(--aur), rgb(232 181 98 / 0.28));
  border-radius: 2px 2px 0 0;
  transition: filter 0.2s var(--usor);
}
.bara:hover { filter: brightness(1.35); }
.bara.e-goala { background: var(--linie); }
.bara::after {
  content: attr(data-info);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  translate: -50% 0;
  padding: 0.375rem 0.625rem;
  background: #05100b;
  border: 1px solid var(--linie);
  border-radius: 5px;
  color: var(--text);
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--usor);
  z-index: 3;
}
.bara:hover::after { opacity: 1; }

/* ---------- liste ---------- */
.grile {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 0.875rem;
}
.lista { display: grid; gap: 0.5rem; }
.lista li {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.4375rem 0.625rem;
  border-radius: 4px;
  font-size: 0.875rem;
  overflow: hidden;
}
/* Bara din spate arată proporția fără să ceară un al doilea rând de cifre. */
.lista li::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--cota, 0%);
  background: rgb(232 181 98 / 0.14);
  border-radius: 4px;
}
.lista span, .lista strong { position: relative; }
.lista span { color: var(--text-bland); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lista strong { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.lista__gol { color: var(--text-sters); font-size: 0.875rem; padding: 0.25rem; }

/* Ușa spre coada lungă. Discretă: e o unealtă, nu o invitație. */
.vezi-tot {
  margin-top: 0.75rem;
  padding: 0.4375rem 0.75rem;
  width: 100%;
  background: none;
  border: 1px dashed var(--linie);
  border-radius: 5px;
  color: var(--text-sters);
  font-size: 0.8125rem;
  transition: border-color 0.2s var(--usor), color 0.2s var(--usor);
}
.vezi-tot:hover { border-color: var(--aur); color: var(--aur); border-style: solid; }

/* ---------- lista întreagă ---------- */
.tot {
  width: min(30rem, calc(100vw - 2rem));
  max-height: min(38rem, calc(100svh - 3rem));
  padding: 1.25rem 1.375rem 1.375rem;
  /* Mai deschisă decât cutiile de dedesubt, altfel plutește fără să se vadă că
     e deasupra lor. Umbra face restul. */
  background: var(--fund-3);
  border: 1px solid rgb(244 239 228 / 0.18);
  border-radius: 10px;
  box-shadow: 0 24px 60px rgb(0 0 0 / 0.6);
  color: var(--text);
  overflow: auto;
  overscroll-behavior: contain;
}
.tot::backdrop { background: rgb(3 7 5 / 0.82); }
.tot header {
  position: sticky;
  top: -1.25rem;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: -1.25rem -1.375rem 1rem;
  padding: 1.25rem 1.375rem 0.75rem;
  background: var(--fund-3);
  border-bottom: 1px solid var(--linie);
}
.tot h2 { font-size: 1.25rem; }
.tot header button {
  flex: none;
  width: 2rem; height: 2rem;
  background: none;
  border: 1px solid var(--linie);
  border-radius: 50%;
  color: var(--text-bland);
  line-height: 1;
}
.tot header button:hover { border-color: var(--aur); color: var(--aur); }
.tot__nota { margin: 0.875rem 0 0; color: var(--text-sters); font-size: 0.75rem; }

/* ---------- flux ---------- */
.flux { display: grid; gap: 0.375rem; }
.flux li {
  display: flex;
  gap: 0.75rem;
  padding: 0.4375rem 0;
  border-bottom: 1px solid var(--linie);
  font-size: 0.8125rem;
  color: var(--text-bland);
}
.flux li:last-child { border-bottom: 0; }
.flux time { color: var(--text-sters); font-variant-numeric: tabular-nums; flex: none; }
.flux .eticheta { color: var(--aur); }

/* Lipită de cifrele la care se referă, nu plutind sub ele. */
.nota--cifre { margin: -0.5rem 0 0; }

.nota {
  margin: 0.5rem 0 0;
  color: var(--text-sters);
  font-size: 0.75rem;
  line-height: 1.7;
  max-width: 70ch;
}

@media (prefers-reduced-motion: reduce) {
  .punct { animation: none; }
  * { transition-duration: 0.01ms !important; }
}
