:root {
  color-scheme: dark;
  --bg: #05090f;
  --side: #070d15;
  --card: #0c1520;
  --card-2: #101c2a;
  --line: #172536;
  --line-2: #1f3247;
  --text: #edf2f8;
  --muted: #8899b0;
  --soft: #b9c7d8;
  --green: #22d571;
  --green-2: #16a34a;
  --green-soft: rgba(34, 213, 113, 0.12);
  --wait: #f5b400;
  --wait-soft: rgba(245, 180, 0, 0.12);
  --bad: #f87171;
  --bad-soft: rgba(248, 113, 113, 0.12);
  --info: #60a5fa;
  --radius: 18px;
  font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  font-feature-settings: "tnum" 1, "cv11" 1;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(900px 420px at 12% -10%, rgba(200, 16, 46, 0.12), transparent 55%),
    radial-gradient(1200px 500px at 70% -10%, rgba(34, 213, 113, 0.08), transparent 60%),
    var(--bg);
  color: var(--text);
  scroll-behavior: smooth;
}

button, input { font: inherit; color: inherit; }

.ico { flex: none; display: inline-block; vertical-align: -0.18em; }

.flag {
  width: 22px;
  height: 15px;
  border-radius: 3px;
  flex: none;
  display: inline-block;
  vertical-align: -0.15em;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.green { color: var(--green) !important; }
.red { color: var(--bad) !important; }
.wait { color: var(--wait) !important; }
.muted { color: var(--muted); font-size: 14px; }
.tiny { font-size: 13px; margin: 12px 0 0; line-height: 1.5; }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12px; }
.nowrap { white-space: nowrap; }

/* login */

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

.login form {
  width: min(440px, 100%);
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 34px;
  display: grid;
  gap: 14px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.login-logo { width: min(260px, 100%); height: auto; object-fit: contain; }
.login h1 { margin: 6px 0 0; font-size: 30px; letter-spacing: -0.02em; }
.login p { color: var(--muted); margin: 0; font-size: 16px; }
.login label { display: grid; gap: 8px; font-size: 14px; color: var(--soft); font-weight: 600; }

.login input, .search input, .conv-input input {
  border: 1px solid var(--line-2);
  background: #08111b;
  border-radius: 12px;
  padding: 14px 16px;
  outline: none;
  font-size: 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.login input:focus { border-color: var(--green-2); box-shadow: 0 0 0 4px var(--green-soft); }

.login button {
  margin-top: 4px;
  border: 0;
  background: linear-gradient(180deg, #22c55e, #16a34a);
  color: white;
  border-radius: 12px;
  padding: 15px 18px;
  font-weight: 800;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.15s, box-shadow 0.2s;
}

.login button:hover { transform: translateY(-1px); box-shadow: 0 10px 30px rgba(34, 197, 94, 0.3); }
.login .error { color: var(--bad); min-height: 1.2em; font-size: 14px; }

/* layout */

.shell {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  min-height: 100vh;
}

.side {
  background: var(--side);
  border-right: 1px solid var(--line);
  padding: 20px 0;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  z-index: 5;
}

.side-logo img {
  width: 52px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.5));
  transition: transform 0.3s;
}

.side-logo:hover img { transform: scale(1.06) rotate(-3deg); }

.side nav, .side-bottom { display: grid; gap: 8px; }
.side-bottom { margin-top: auto; }

.side nav a, .side-bottom a, .side-bottom button {
  position: relative;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--muted);
  background: transparent;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}

.side nav a:hover, .side-bottom a:hover, .side-bottom button:hover { color: var(--text); background: #0f1a28; }

.side nav a.is-on {
  color: var(--green);
  background: var(--green-soft);
  box-shadow: inset 0 0 0 1px rgba(34, 213, 113, 0.25);
}

.side nav a.is-on::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 3px;
  background: var(--green);
}

[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translate(-6px, -50%);
  background: #0f1a28;
  border: 1px solid var(--line-2);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s, transform 0.15s;
}

[data-tip]:hover::after { opacity: 1; transform: translate(0, -50%); }

.main { padding: 28px 32px 56px; min-width: 0; }

.top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 22px;
}

.top h1 { margin: 0; font-size: 30px; letter-spacing: -0.03em; }
.who { color: var(--muted); font-weight: 500; font-size: 15px; margin-top: 4px; display: flex; align-items: center; gap: 8px; }
.dot-sep { width: 4px; height: 4px; border-radius: 9px; background: var(--line-2); }
.warn { color: var(--wait); margin: 8px 0 0; font-size: 14px; display: flex; gap: 6px; align-items: center; }

.filters, .seg { display: flex; gap: 4px; flex-wrap: wrap; }

.filters {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 5px;
}

.filters button, .seg button {
  background: transparent;
  color: var(--muted);
  border: 0;
  border-radius: 10px;
  padding: 10px 18px;
  font-weight: 700;
  cursor: pointer;
  font-size: 15px;
  transition: background 0.2s, color 0.2s;
}

.filters button:hover, .seg button:hover { color: var(--text); }

.seg { background: #08111b; border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.seg button { padding: 7px 12px; font-size: 13px; }

.filters button.is-on, .seg button.is-on {
  background: linear-gradient(180deg, #22c55e, #16a34a);
  color: white;
  box-shadow: 0 6px 18px rgba(34, 197, 94, 0.25);
}

.export {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--green-2);
  background: var(--green-soft);
  color: var(--green);
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}

.export:hover { background: var(--green-2); color: white; transform: translateY(-1px); }

.mail-card { margin-top: 22px; }
.mail-form, .mail-test { display: grid; gap: 12px; margin-top: 14px; }
.mail-form label, .mail-test label { display: grid; gap: 6px; font-size: 13px; font-weight: 700; }
.mail-form input, .mail-test input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--bg, #fff);
  color: inherit;
  border-radius: 10px;
  min-height: 42px;
  padding: 10px 12px;
  font: inherit;
}
.mail-photo img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 2px solid #d4af37; }
.mail-note { min-height: 1.2em; font-size: 13px; }
.mail-test { grid-template-columns: 1fr auto; align-items: end; }
.dns { margin-top: 18px; font-size: 13px; line-height: 1.5; }
.dns ol { margin: 8px 0 0; padding-left: 18px; }
.dns li { margin: 6px 0; }

/* cards */

.card {
  background: linear-gradient(180deg, var(--card-2), var(--card) 60%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  min-width: 0;
  transition: border-color 0.25s, transform 0.25s;
}

.card:hover { border-color: var(--line-2); }

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

h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.01em;
}

h2 .ico { color: var(--green); }
h3 { font-size: 14px; color: var(--muted); font-weight: 600; margin: 18px 0 10px; text-transform: uppercase; letter-spacing: 0.06em; }

.hero, .kpis, .grid, .split, .lists, .live-grid { margin-bottom: 16px; }

.hero {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.hero .label { color: var(--soft); font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.hero .label .ico { color: var(--green); }
.hero small { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; margin-top: 6px; }

.count { display: block; font-weight: 800; letter-spacing: -0.03em; }
.count.big { font-size: 34px; margin-top: 12px; line-height: 1.1; }

.hero .profit {
  border-color: rgba(34, 213, 113, 0.4);
  background:
    radial-gradient(400px 160px at 0% 0%, rgba(34, 213, 113, 0.25), transparent 70%),
    linear-gradient(180deg, var(--card-2), var(--card));
  position: relative;
  overflow: hidden;
}

.hero .profit .count.big { font-size: 38px; }

.delta { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 13px; font-weight: 700; }
.delta.up { color: var(--green); }
.delta.down { color: var(--bad); }
.delta.flat { color: var(--muted); }

.kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.kpis article {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
  display: grid;
  gap: 4px;
  min-width: 0;
  transition: border-color 0.25s;
}

.kpis article:hover { border-color: var(--line-2); }
.kpis span { color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 7px; font-weight: 600; }
.kpis .count { font-size: 26px; }
.kpis small { color: var(--muted); font-size: 13px; }
.kpis .delta { margin-top: 0; font-size: 12px; }

/* live */

.live-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 16px;
}

.live-main { position: relative; overflow: hidden; }

.live-main::after {
  content: "";
  position: absolute;
  inset: -40% -20% auto auto;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(34, 213, 113, 0.14), transparent 65%);
  animation: glow 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes glow {
  50% { transform: translate(-30px, 20px) scale(1.15); opacity: 0.6; }
}

.pulse {
  width: 10px;
  height: 10px;
  border-radius: 99px;
  background: var(--green);
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(34, 213, 113, 0.6);
  animation: pulse 1.6s infinite;
}

@keyframes pulse {
  70% { box-shadow: 0 0 0 10px rgba(34, 213, 113, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 213, 113, 0); }
}

.live-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.live-num {
  background: #08111b;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
}

.live-num span { color: var(--muted); font-size: 14px; display: flex; gap: 8px; align-items: center; font-weight: 600; }
.live-num b { display: block; font-size: 46px; font-weight: 800; letter-spacing: -0.04em; margin-top: 6px; color: var(--green); }
.live-num.hot b { color: #facc15; }

.bump { animation: bump 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.4); }

@keyframes bump {
  0% { transform: scale(1); }
  35% { transform: scale(1.18); text-shadow: 0 0 24px currentColor; }
  100% { transform: scale(1); }
}

.live-pages {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.live-page {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 10px;
  opacity: 0.55;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: opacity 0.3s, border-color 0.3s;
}

.live-page.on { opacity: 1; border-color: rgba(34, 213, 113, 0.35); }
.live-page span { font-size: 13px; color: var(--muted); display: flex; gap: 6px; align-items: center; justify-content: center; white-space: nowrap; }
.live-page span .ico { flex: none; display: block; }
.live-page b { display: block; font-size: 20px; margin-top: 4px; }
.live-page .bar { align-self: stretch; }

.live-sessions { display: grid; gap: 8px; max-height: 260px; overflow-y: auto; overflow-x: hidden; }

.session {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #08111b;
  border: 1px solid var(--line);
}

.session.new { animation: slideIn 0.45s ease both, flash 2.4s ease; }

.session { min-width: 0; }
.session small { flex: none; }
.session.hot { border-color: rgba(250, 204, 21, 0.4); background: rgba(250, 204, 21, 0.05); }
.session div { flex: 1; min-width: 0; }
.session b { display: block; font-size: 14px; }
.session div span { display: block; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.session .where { color: var(--green); font-weight: 700; }
.session .path { display: block; color: #6f829c; font-size: 11px; font-family: "JetBrains Mono", ui-monospace, monospace; }
.session small { color: var(--muted); font-size: 12px; display: flex; gap: 4px; align-items: center; white-space: nowrap; }

.feed {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  max-height: 520px;
  overflow: auto;
}

.feed li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 14px;
  transition: background 0.3s;
}

.feed li:hover { background: #0f1a28; }
.feed li p { margin: 0; flex: 1; color: var(--soft); line-height: 1.4; }
.feed li p b { color: var(--text); }
.feed li time { color: var(--muted); font-size: 12px; white-space: nowrap; }

.feed-ico, .toast-ico, .reason-ico, .issue-ico {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex: none;
  background: #0f1a28;
  color: var(--muted);
}

.feed .ok .feed-ico, .toast.ok .toast-ico { background: var(--green-soft); color: var(--green); }
.feed .bad .feed-ico, .toast.bad .toast-ico { background: var(--bad-soft); color: var(--bad); }
.feed .hot .feed-ico, .toast.hot .toast-ico { background: rgba(250, 204, 21, 0.12); color: #facc15; }
.feed .wait .feed-ico, .toast.wait .toast-ico { background: var(--wait-soft); color: var(--wait); }
.feed .info .feed-ico, .toast.info .toast-ico { background: rgba(96, 165, 250, 0.12); color: var(--info); }

.feed li.fresh { animation: feedIn 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both, flash 2.4s ease; }

@keyframes feedIn {
  from { opacity: 0; transform: translateY(-14px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@keyframes flash {
  0% { background: rgba(34, 213, 113, 0.16); border-color: rgba(34, 213, 113, 0.35); }
  100% { background: transparent; border-color: transparent; }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: none; }
}

.empty-feed { color: var(--muted); justify-content: center; padding: 30px 12px !important; }

#toasts {
  position: fixed;
  top: 20px;
  right: 20px;
  display: grid;
  gap: 10px;
  z-index: 50;
  width: min(380px, calc(100vw - 40px));
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(12, 21, 32, 0.92);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line-2);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  animation: toastIn 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
  font-size: 14px;
}

.toast p { margin: 0; color: var(--soft); line-height: 1.4; }
.toast p b { color: var(--text); }
.toast.ok { border-color: rgba(34, 213, 113, 0.5); }
.toast.bad { border-color: rgba(248, 113, 113, 0.5); }
.toast.hot { border-color: rgba(250, 204, 21, 0.5); }
.toast.out { animation: toastOut 0.4s ease forwards; }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateX(40px); }
}

/* chart + side */

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.8fr);
  gap: 16px;
}

.stack { display: grid; gap: 16px; align-content: start; }

.chart-wrap { position: relative; height: 320px; }
.chart-wrap > svg { width: 100%; height: 100%; display: block; overflow: visible; }

.is-first .chart-line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.4s ease forwards 0.2s; }
.is-first .chart-area { opacity: 0; animation: fade 1s ease forwards 0.8s; }

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }

.tip {
  position: absolute;
  pointer-events: none;
  background: rgba(4, 16, 10, 0.95);
  backdrop-filter: blur(8px);
  border: 1px solid var(--green);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 13px;
  display: none;
  min-width: 210px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.tip span { display: flex; align-items: center; gap: 6px; color: var(--soft); margin-top: 3px; white-space: nowrap; }
.tip .flag { width: 20px; height: 14px; }
.tip .ico { width: 14px; height: 14px; }
.tip b .ico { width: 18px; height: 18px; }
.tip .tip-day { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 4px; }
.tip b { display: flex; align-items: center; gap: 8px; font-size: 19px; }

.conv-input {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line-2);
  background: #08111b;
  border-radius: 14px;
  padding: 0 14px;
  margin-bottom: 10px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.conv-input:focus-within { border-color: var(--green-2); box-shadow: 0 0 0 4px var(--green-soft); }
.conv-input input { border: 0; background: transparent; padding: 14px 0; flex: 1; min-width: 0; font-size: 22px; font-weight: 800; box-shadow: none; }
.conv-input em { color: var(--muted); font-style: normal; font-weight: 700; }

.conv-row, .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}

.conv-row span, .row span { color: var(--muted); display: flex; align-items: center; gap: 8px; }
.conv-row b { font-size: 17px; }

.meter, .bar {
  height: 7px;
  background: #08111b;
  border-radius: 99px;
  overflow: hidden;
  margin: 8px 0 4px;
}

.meter i, .bar i {
  display: block;
  height: 100%;
  width: var(--w, 0%);
  border-radius: 99px;
  background: linear-gradient(90deg, #16a34a, var(--green));
  transition: width 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.is-first .meter i, .is-first .bar i { animation: grow 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) both 0.3s; }

@keyframes grow { from { width: 0; } }

.meter i.wait { background: var(--wait); }
.meter i.bad, .bar.red i { background: linear-gradient(90deg, #dc2626, var(--bad)); }

.dot { width: 9px; height: 9px; border-radius: 99px; display: inline-block; }
.dot.ok { background: var(--green); }
.dot.wait { background: var(--wait); }
.dot.bad { background: var(--bad); }

/* approval */

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

.versus { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.vs {
  border-radius: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  background: #08111b;
}

.vs span { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.vs .count { font-size: 42px; margin: 8px 0 4px; }
.vs small { color: var(--muted); font-size: 14px; }
.vs.ok { border-color: rgba(34, 213, 113, 0.3); }
.vs.ok span, .vs.ok .count { color: var(--green); }
.vs.bad { border-color: rgba(248, 113, 113, 0.3); }
.vs.bad span, .vs.bad .count { color: var(--bad); }

.dual { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: #08111b; margin: 16px 0; gap: 2px; }
.dual i { display: block; width: var(--w); transition: width 0.8s; }
.dual i.ok { background: linear-gradient(90deg, #16a34a, var(--green)); }
.dual i.bad { background: linear-gradient(90deg, #dc2626, var(--bad)); }
.is-first .dual i { animation: grow 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) both 0.3s; }

.mini-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mini-kpis div { border-top: 1px solid var(--line); padding-top: 12px; }
.mini-kpis span { display: block; color: var(--muted); font-size: 13px; }
.mini-kpis b { display: block; font-size: 20px; margin-top: 4px; }

.reason { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.reason.zero { opacity: 0.45; }
.reason-ico { background: var(--bad-soft); color: var(--bad); }
.reason.zero .reason-ico { background: #0f1a28; color: var(--muted); }
.reason-info { flex: 1; min-width: 0; }
.reason-head { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; }
.reason-head span { color: var(--muted); font-size: 14px; }
.reason .bar { margin: 6px 0 0; }

.chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); gap: 12px; }

.chip {
  border: 1px solid var(--line);
  background: #08111b;
  border-radius: 14px;
  padding: 14px;
  transition: transform 0.2s, border-color 0.2s;
}

.chip:hover { transform: translateY(-2px); border-color: var(--line-2); }
.chip.zero { opacity: 0.5; }
.chip span { color: var(--soft); font-size: 14px; font-weight: 700; }
.chip { min-width: 0; overflow: hidden; }
.chip-name { display: flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip-name .brand { width: 34px; height: 21px; }
.chip b { font-size: 26px; }
.chip small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.brand {
  width: 40px;
  height: 25px;
  flex: none;
  display: inline-block;
  border-radius: 5px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 4px 10px rgba(0, 0, 0, 0.3);
}

.brand-cell { display: inline-flex; align-items: center; gap: 10px; }
table.compact th, table.compact td { padding-left: 8px; padding-right: 8px; }
table.compact th:first-child, table.compact td:first-child { padding-left: 0; }
.brand-cell .brand { width: 34px; height: 21px; }
.detail-grid small .brand { width: 30px; height: 19px; }
tr.zero { opacity: 0.45; }
.chip b { display: block; font-size: 28px; font-weight: 800; margin: 4px 0 2px; }
.chip small { color: var(--muted); font-size: 12px; }

.rate { display: inline-block; padding: 3px 10px; border-radius: 99px; font-weight: 800; font-size: 13px; }
.rate.ok { background: var(--green-soft); color: var(--green); }
.rate.bad { background: var(--bad-soft); color: var(--bad); }

/* lists */

.lists { display: grid; gap: 16px; }
.lists.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.step { margin-bottom: 14px; }
.step-head { display: flex; justify-content: space-between; font-size: 15px; }
.step-head span { color: var(--muted); display: flex; gap: 8px; align-items: center; }
.step-head b { font-size: 17px; }
.step-head small { color: var(--green); margin-left: 8px; font-size: 13px; }

.product {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.rank {
  width: 26px;
  font-weight: 800;
  font-size: 14px;
  color: var(--muted);
  text-align: center;
  flex: none;
}

.product:nth-of-type(1) .rank { color: var(--green); }

.thumb {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  overflow: hidden;
  flex: none;
  background: #f4f4f4;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
}

.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.35s; }
.thumb.empty { background: #0f1a28; color: var(--muted); }
.product:hover .thumb img { transform: scale(1.08); }
.feed-ico .thumb, .toast-ico .thumb { width: 34px; height: 34px; border-radius: 10px; }
.session .thumb { width: 40px; height: 40px; border-radius: 10px; flex: none; display: grid; place-items: center; }
.session .thumb svg { display: block; }

.product-info { flex: 1; min-width: 0; }
.product b { display: block; font-size: 15px; }
.product span { color: var(--muted); font-size: 13px; }
.product strong { font-size: 18px; white-space: nowrap; }

.empty { color: var(--muted); padding: 24px 0; text-align: center; font-size: 15px; }

/* issues */

#erros { margin-bottom: 16px; }

.issue-kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 14px; }

.issue-kind {
  border: 1px solid rgba(245, 180, 0, 0.25);
  background: var(--wait-soft);
  border-radius: 14px;
  padding: 12px 14px;
}

.issue-kind span { display: flex; align-items: center; gap: 8px; color: var(--wait); font-weight: 700; font-size: 14px; }
.issue-kind b { display: block; font-size: 26px; margin-top: 4px; }
.issue-kind small { color: var(--muted); font-size: 12px; }

.issue-ok { display: flex; align-items: center; gap: 10px; color: var(--green); font-weight: 600; padding: 10px 0; }

.issue-list { display: grid; gap: 6px; max-height: 420px; overflow: auto; }

.issue {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #08111b;
}

.issue-ico { background: var(--wait-soft); color: var(--wait); }
.issue b { display: block; font-size: 14px; }
.issue div span { display: block; color: var(--soft); font-size: 14px; overflow-wrap: anywhere; }
.issue small, .issue time { color: var(--muted); font-size: 12px; white-space: nowrap; }

/* orders */

.orders-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line-2);
  background: #08111b;
  border-radius: 12px;
  padding: 0 12px;
  color: var(--muted);
  transition: border-color 0.2s;
}

.search:focus-within { border-color: var(--green-2); }
.search input { border: 0; background: transparent; padding: 10px 0; width: 240px; max-width: 100%; font-size: 15px; }

.table-wrap { overflow-x: auto; margin-top: 4px; }

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

th {
  text-align: left;
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

th .flag { width: 18px; height: 12px; }

td { padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
td small { display: block; color: var(--muted); font-size: 13px; margin-top: 3px; }
td.prod { min-width: 240px; }
.num { text-align: right; white-space: nowrap; }

table.compact { font-size: 14px; }
table.compact td { padding: 11px 12px; }

.mini { display: flex; align-items: center; gap: 10px; }
.mini + .mini { margin-top: 6px; }
.mini .thumb { width: 40px; height: 40px; border-radius: 10px; }
.mini span { font-size: 14px; }

tr.order { cursor: pointer; transition: background 0.2s; }
tr.order:hover, tr.order.is-open { background: #0f1a28; }

tr.detail td { background: #08111b; animation: fade 0.3s ease both; }

.detail-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; padding: 6px 0; }
.detail-grid span { display: block; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; font-weight: 700; }
.detail-grid b { display: block; font-size: 15px; }
.detail-grid small { color: var(--soft); font-size: 14px; margin-top: 4px; overflow-wrap: anywhere; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.pill { display: inline-block; padding: 4px 12px; border-radius: 99px; font-size: 13px; font-weight: 800; }
.pill.paid { background: var(--green-soft); color: var(--green); }
.pill.pending { background: var(--wait-soft); color: var(--wait); }
.pill.failed { background: var(--bad-soft); color: var(--bad); }

.tag { font-style: normal; font-size: 11px; background: var(--green-soft); color: var(--green); border-radius: 6px; padding: 1px 6px; }

/* entrance */

.is-first .hero > *, .is-first .kpis > *, .is-first .main > section, .rise {
  animation: rise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.is-first .hero > :nth-child(2), .is-first .kpis > :nth-child(2) { animation-delay: 0.06s; }
.is-first .hero > :nth-child(3), .is-first .kpis > :nth-child(3) { animation-delay: 0.12s; }
.is-first .hero > :nth-child(4), .is-first .kpis > :nth-child(4) { animation-delay: 0.18s; }
.is-first .kpis > :nth-child(5) { animation-delay: 0.24s; }
.is-first .kpis > :nth-child(6) { animation-delay: 0.3s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (max-width: 1380px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .detail-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .live-pages { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
  .hero { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid, .split, .live-grid, .lists.two { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .side {
    position: sticky;
    top: 0;
    height: auto;
    flex-direction: row;
    padding: 10px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    background: rgba(7, 13, 21, 0.92);
    backdrop-filter: blur(10px);
  }
  .side::-webkit-scrollbar { display: none; }
  .side-logo img { width: 34px; height: 34px; }
  .side nav, .side-bottom { grid-auto-flow: column; margin-top: 0; gap: 2px; }
  .side-bottom { margin-left: auto; }
  .side nav a, .side-bottom a, .side-bottom button { width: 38px; height: 38px; border-radius: 11px; }
  .side nav a.is-on::before { display: none; }
  [data-tip]::after { display: none; }
  .main { padding: 20px 14px 48px; overflow-x: clip; }
  .top { flex-direction: column; align-items: stretch; }
  .top h1 { font-size: 26px; }
  .filters { display: grid; grid-template-columns: repeat(4, 1fr); }
  .filters button { padding: 10px 4px; font-size: 14px; }
  .hero { grid-template-columns: 1fr; }
  .kpis, .versus, .mini-kpis, .live-nums { grid-template-columns: 1fr 1fr; }
  .hero .count.big, .hero .profit .count.big { font-size: 32px; }
  .vs .count { font-size: 32px; }
  .live-num b { font-size: 38px; }
  .live-pages { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .chart-wrap { height: 240px; }
  .card { padding: 16px; }
  .main > section, .main > header { scroll-margin-top: 70px; }
  .orders-tools { width: 100%; }
  .orders-tools .search { flex: 1; }
  .detail-grid { grid-template-columns: 1fr 1fr; }
  .issue { grid-template-columns: auto minmax(0, 1fr); }
  .search input { width: 100%; }
  #toasts { top: auto; bottom: 16px; right: 12px; }
}

.switch-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  margin-bottom: 18px;
  border-radius: 16px;
  border: 1px solid rgba(34, 213, 113, 0.35);
  background: var(--green-soft);
  transition: background 0.3s, border-color 0.3s;
}
.switch-row.off { border-color: rgba(248, 113, 113, 0.35); background: var(--bad-soft); }
.switch-row > div { flex: 1; min-width: 0; }
.switch-row b { display: block; font-size: 15px; }
.switch-row span { display: block; color: var(--muted); font-size: 13px; }
.switch-row .brand { flex: none; }
.switch {
  flex: none;
  position: relative;
  width: 52px;
  height: 30px;
  border-radius: 999px;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: var(--green);
  transition: background 0.25s;
}
.switch i {
  position: absolute;
  top: 3px;
  left: 25px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  transition: left 0.25s cubic-bezier(0.3, 1.4, 0.5, 1);
}
.switch[aria-checked="false"] { background: #3a4656; }
.switch[aria-checked="false"] i { left: 3px; }
.switch:disabled { opacity: 0.6; cursor: wait; }

.row.sub { padding-left: 14px; font-size: 13px; color: var(--muted); }
.row.sub b { font-weight: 600; }
.fee-table { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); display: grid; gap: 6px; }
.fee-table div { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }

.rec-kpis { margin-top: 14px; }
.rec-metrics { width: 100%; border-collapse: collapse; margin-top: 12px; }
.rec-metrics th, .rec-metrics td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: top; }
.rec-metrics small, .rec-recent small { display: block; color: var(--muted); font-weight: 600; }
.rec-step { margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 14px; display: grid; gap: 8px; }
.rec-step legend { padding: 0 6px; font-size: 13px; font-weight: 800; }
.rec-step textarea {
  width: 100%;
  min-height: 64px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: var(--card-2);
  resize: vertical;
}
.rec-recent { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.rec-recent li { font-size: 13px; }
.mail-test select {
  width: 100%;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: var(--card-2);
}
.fee-table span { color: var(--muted); }
.fee-table small { font-family: "JetBrains Mono", monospace; font-size: 12px; text-align: right; }
.profit small + small { display: flex; align-items: center; gap: 6px; margin-top: 4px; color: var(--muted); }

