:root {
  --bg: #eef0f6;
  --card: #ffffff;
  --ink: #16171d;
  --muted: #6d7280;
  --line: #e6e8f0;
  --brand: #4f46e5;
  --tripplo: #ff6a00;
  --cotapool: #16a34a;
  --certiage: #7c3aed;
  --up: #15803d;
  --down: #dc2626;
  --amber: #b45309;
  --amber-bg: #fff6df;
  --shadow: 0 8px 24px rgba(28, 32, 56, 0.06);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, p { margin: 0; }

.app { min-height: 100dvh; padding: 12px 16px 96px; }
.top { display: flex; align-items: center; gap: 12px; }
.logo, .avatar {
  width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center;
  background: var(--brand); color: white; font-weight: 800;
}
.avatar { border-radius: 999px; background: #ece7ff; color: var(--brand); }
.grow { flex: 1; }
.kicker { color: var(--muted); font-size: 13px; margin-top: 2px; }
h1 { font-size: 28px; letter-spacing: -0.04em; }
.banner {
  margin: 14px auto 0; width: fit-content; background: #f6c445; color: #3d2c00;
  font-size: 12px; font-weight: 800; letter-spacing: 0.04em; border-radius: 999px; padding: 4px 10px;
}
.offline { margin-top: 10px; background: var(--amber-bg); color: var(--amber); border-radius: 12px; padding: 10px 12px; font-size: 13px; }
.tabs, .chips { display: flex; gap: 8px; overflow: auto; padding-bottom: 2px; }
.tabs { margin: 16px 0; background: #e7e9f2; border-radius: 14px; padding: 4px; }
.tabs button, .chips button, .ghost {
  border: 0; background: transparent; color: var(--muted); border-radius: 12px; padding: 8px 12px; white-space: nowrap;
}
.tabs button.on { background: white; color: var(--ink); box-shadow: var(--shadow); font-weight: 700; }
.chips { margin: 8px 0 12px; }
.chips button { background: white; border-radius: 999px; }
.chips button.on { background: var(--brand); color: white; font-weight: 700; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.card { background: var(--card); border-radius: 18px; padding: 14px; box-shadow: var(--shadow); }
.card .label { color: var(--muted); font-size: 13px; }
.card .value { font-size: 28px; font-weight: 780; letter-spacing: -0.04em; margin-top: 4px; }
.delta { font-size: 13px; font-weight: 700; margin-top: 4px; }
.delta.up, .up { color: var(--up); }
.delta.down, .down { color: var(--down); }
.alert {
  margin: 12px 0; background: #fff4d8; border-radius: 16px; padding: 12px 14px;
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; color: inherit;
}
.alert strong { display: block; }
.alert .muted { display: block; margin-top: 2px; }
.warn-ico {
  width: 28px; height: 28px; border-radius: 999px; display: grid; place-items: center;
  background: #f6c445; color: #3d2c00; font-weight: 800;
}
.chevron { color: var(--muted); font-size: 22px; line-height: 1; }
.icon-btn {
  width: 40px; height: 40px; border: 0; background: white; border-radius: 999px;
  display: grid; place-items: center; position: relative; color: var(--ink); box-shadow: var(--shadow);
}
.icon-btn svg { width: 20px; height: 20px; }
.ping {
  position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 99px;
  background: #ef4444; border: 1.5px solid white;
}
.desk-head, .desk-tools { display: flex; align-items: center; gap: 12px; }
.desk-head { justify-content: space-between; align-items: flex-start; }
.desk-tools .tabs { margin: 0; }
.title-row { display: flex; align-items: center; gap: 12px; }
.title-row .banner { margin: 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin: 18px 0 10px; }
.section-head span, .muted { color: var(--muted); font-size: 13px; }
.product { display: block; margin-bottom: 10px; }
.product .head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.dot { width: 10px; height: 10px; border-radius: 99px; display: inline-block; margin-right: 6px; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.metrics b { display: block; font-size: 16px; }
.metrics span { color: var(--muted); font-size: 11px; }
.spark { width: 72px; height: 28px; }
.add {
  width: 100%; border: 1.5px dashed #c9cde0; background: transparent; border-radius: 16px; padding: 14px; color: var(--brand); font-weight: 700;
}
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; display: flex; background: white; border-top: 1px solid var(--line);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); z-index: 5;
}
.nav a {
  flex: 1; text-align: center; font-size: 11px; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.nav a.on { color: var(--brand); font-weight: 700; }
.nav-ico { position: relative; width: 26px; height: 26px; display: grid; place-items: center; }
.nav svg { width: 22px; height: 22px; }
.badge {
  position: absolute; top: -4px; right: -8px; background: #ef4444; color: white; border-radius: 99px;
  font-size: 10px; min-width: 16px; padding: 1px 4px; line-height: 1.2; text-align: center;
}
.icon-btn .badge { top: -2px; right: -2px; }
.row { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.contact { margin-bottom: 8px; }
.contact .name { font-weight: 700; }
.tag { display: inline-block; font-size: 11px; border-radius: 99px; padding: 2px 8px; margin-right: 4px; background: #fff1e6; color: var(--tripplo); }
.tag.lead { background: #f3e8ff; color: var(--certiage); }
.tag.pay { background: #fee2e2; color: var(--down); }
.tag.sug { background: #dcfce7; color: var(--cotapool); }
.unread-dot { width: 8px; height: 8px; border-radius: 99px; background: var(--brand); display: inline-block; margin-right: 6px; }
.bar { height: 8px; background: #eceef5; border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; }
.funnel { margin: 8px 0; }
.funnel .track { height: 10px; background: #eceef5; border-radius: 99px; overflow: hidden; }
.funnel .track i { display: block; height: 100%; background: var(--brand); }
.chart { width: 100%; height: 160px; }
.split { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 10px; }
.stack { display: flex; align-items: flex-end; gap: 4px; height: 160px; border-bottom: 1px solid #d5d8e4; }
.stack .col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; }
.stack .seg { display: block; width: 100%; min-height: 0; }
.stack .seg.tripplo { background: #ff6a00; border-radius: 3px 3px 0 0; }
.stack .seg.cotapool { background: #16a34a; }
.stack .seg.certiage { background: #7c3aed; }
.baseline { color: var(--muted); font-size: 11px; margin-top: 4px; }
.legend { display: flex; gap: 12px; color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.toggle { width: 44px; height: 26px; border-radius: 99px; border: 0; background: #d7dbe8; position: relative; }
.toggle.on { background: var(--brand); }
.toggle i { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 99px; background: white; transition: 0.15s; }
.toggle.on i { left: 21px; }
.side { display: none; }
.search { display: flex; gap: 8px; }
.search input { flex: 1; border: 0; background: white; border-radius: 12px; padding: 10px 12px; }
.app.login {
  min-height: 100dvh;
  padding: 24px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-card {
  width: min(100%, 340px);
  background: white;
  border-radius: 24px;
  padding: 28px 22px 22px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}
.login-card .logo { width: 52px; height: 52px; border-radius: 16px; font-size: 18px; }
.login-card h1 { font-size: 24px; }
.google {
  width: 100%;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  padding: 12px 14px;
  font-weight: 700;
}
.google svg { width: 18px; height: 18px; flex: none; }
.primary {
  width: 100%;
  margin-top: 8px;
  border: 0;
  border-radius: 12px;
  background: var(--brand);
  color: white;
  padding: 12px 14px;
  font-weight: 700;
}
.otp { display: flex; gap: 8px; margin: 12px 0; }
.otp input {
  width: 42px; height: 48px; text-align: center; font-size: 20px; border-radius: 12px;
  border: 1px solid var(--line); background: #f7f8fc;
}
.primary:disabled { opacity: 0.45; }
.dash { color: var(--muted); font-weight: 650; }
.caption, .empty { color: var(--muted); font-size: 12px; font-weight: 600; }
.value.dash { font-size: 28px; }
.card.empty, p.empty { font-size: 14px; padding: 8px 0; }
.secret { letter-spacing: 0.08em; }
.secret-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.qr { display: none; margin: 12px 0; }
.qr svg { width: 180px; height: 180px; }
.otpauth { font-weight: 700; }

@media (min-width: 1080px) {
  body { background: #f4f5fb; }
  .nav { display: none; }
  .shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100dvh; }
  .side { display: flex; flex-direction: column; padding: 20px 16px; background: #f7f7fb; border-right: 1px solid var(--line); }
  .side a { display: flex; justify-content: flex-start; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; color: #3c4154; }
  .side a.on { background: #ece9ff; color: var(--brand); font-weight: 700; }
  .side .badge { position: static; margin-left: auto; }
  .side .group { margin: 18px 12px 8px; font-size: 11px; letter-spacing: 0.08em; color: var(--muted); }
  .app { padding: 22px 28px 32px; }
  .desktop-kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
  .product-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .hide-desktop { display: none; }
  h1 { font-size: 32px; }
  .qr { display: block; }
}
@media (max-width: 1079px) {
  .only-desktop { display: none; }
}
