/* Venda na Live — SaaS adaptation of TPU design system
   Mantém: tokens, fontes, paleta, cores de acento, radius
   Adapta: density, layout (sem section-per-viewport), tabelas, sidebar/topbar de produto
*/

:root {
  /* TPU tokens — preservados */
  --bg: #0E0F11;
  --bg-2: #141518;
  --bg-3: #1a1b1e;
  --bg-4: #202126;
  --line: #26272b;
  --line-2: #34363a;
  --text: #ffffff;
  --text-2: #c7c7c7;
  --text-3: #8d8d8d;
  --text-4: #6b6b6b;
  --accent: #E85600;
  --accent-soft: rgba(232, 86, 0, .08);
  --accent-glow: rgba(232, 86, 0, .18);
  --cyan: #36cdff;
  --green: #a2f865;
  --red: #df4a63;
  --copper: #C9B79C;
  --pink: #ff88be;
  --purple: #c599ff;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-sm: 6px;
  --font: 'Geist', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --mono: 'Geist Mono', ui-monospace, Menlo, Consolas, monospace;

  /* Density vars — exposed for tweaks */
  --d-row-h: 36px;       /* table row height */
  --d-pad: 12px;         /* cell padding */
  --d-card-pad: 16px;
  --d-section-gap: 18px;
  --d-font-body: 13px;
  --d-font-label: 10.5px;
}

[data-density="comfortable"] {
  --d-row-h: 44px;
  --d-pad: 16px;
  --d-card-pad: 22px;
  --d-section-gap: 24px;
  --d-font-body: 14px;
  --d-font-label: 11px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--d-font-body);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  height: 100%;
  overflow: hidden;
}

#app, .app-root { height: 100vh; }

/* Scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #4a4c52; }

/* ===== Layout shell ===== */
.app-root {
  display: grid;
  grid-template-columns: 232px 1fr;
  height: 100vh;
}

.sidebar {
  background: var(--bg);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-head {
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: -0.01em;
}

.brand-dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 2px;
  box-shadow: 0 0 12px var(--accent-glow);
}

.brand-mark small {
  display: block;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--text-3);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 1px;
}

.store-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  margin: 10px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .15s ease;
}
.store-pill:hover { border-color: var(--line-2); }
.store-avatar {
  width: 28px; height: 28px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--accent), #b13e00);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 11.5px;
  color: white;
}
.store-info { flex: 1; min-width: 0; }
.store-info .nm { font-size: 12.5px; font-weight: 500; truncate: ellipsis; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.store-info .sub { font-family: var(--mono); font-size: 9.5px; color: var(--text-3); letter-spacing: 0.12em; text-transform: uppercase; }

.nav-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0 16px;
}

.nav-group {
  padding: 14px 16px 4px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-4);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  margin: 1px 8px;
  border-radius: 7px;
  color: var(--text-2);
  font-size: 13px;
  cursor: pointer;
  transition: background .12s ease, color .12s ease;
  border: none;
  background: transparent;
  width: calc(100% - 16px);
  text-align: left;
  font-family: inherit;
}
.nav-item:hover { background: var(--bg-2); color: var(--text); }
.nav-item.active {
  background: var(--accent-soft);
  color: var(--text);
}
.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  width: 2px; height: 16px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
  margin-left: -8px;
}
.nav-item { position: relative; }
.nav-item .icon {
  width: 16px; height: 16px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3);
}
.nav-item.active .icon { color: var(--accent); }
.nav-item .label { flex: 1; }
.nav-item .badge {
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-family: var(--mono);
  padding: 1px 6px;
  border-radius: 999px;
  font-weight: 500;
}
.nav-item .badge.muted {
  background: var(--bg-3);
  color: var(--text-3);
  border: 1px solid var(--line);
}

.sidebar-foot {
  padding: 10px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 12px;
  color: white;
}
.user-info { flex: 1; min-width: 0; }
.user-info .nm { font-size: 12.5px; font-weight: 500; }
.user-info .role { font-family: var(--mono); font-size: 9.5px; color: var(--text-3); letter-spacing: 0.12em; text-transform: uppercase; }

/* ===== Main area ===== */
.main-area {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(14, 15, 17, 0.85);
  backdrop-filter: blur(12px);
  position: relative;
  z-index: 10;
}

.crumb {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
}
.crumb .sep { color: var(--line-2); }
.crumb .here { color: var(--text); }

.search-global {
  flex: 1;
  max-width: 520px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text-3);
  cursor: pointer;
  transition: border-color .12s;
  margin-left: auto;
}
.search-global:hover { border-color: var(--line-2); }
.search-global input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--text);
}
.search-global input::placeholder { color: var(--text-3); }
.search-global .kbd {
  font-family: var(--mono);
  font-size: 10px;
  padding: 2px 5px;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  color: var(--text-3);
}

.icon-btn {
  position: relative;
  width: 32px; height: 32px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text-2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: border-color .12s, color .12s;
}
.icon-btn:hover { border-color: var(--line-2); color: var(--text); }
.icon-btn .dot {
  position: absolute;
  top: 5px; right: 5px;
  width: 7px; height: 7px;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid var(--bg);
  box-sizing: content-box;
}

.go-live-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 13px;
  background: var(--red);
  color: white;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, .08);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(223, 74, 99, .25);
}
.go-live-btn::before {
  content: "";
  width: 8px; height: 8px;
  background: white;
  border-radius: 50%;
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.content-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

.page {
  padding: 22px 28px 60px;
  max-width: 1400px;
  margin: 0 auto;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.page-head h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.page-head .lead {
  color: var(--text-3);
  font-size: 13px;
  margin: 4px 0 0;
}
.page-head .actions { display: flex; gap: 8px; }

/* Eyebrow — TPU signature, dimmed for product chrome */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  background:
    linear-gradient(var(--bg), var(--bg)) padding-box,
    linear-gradient(90deg, var(--accent) 0%, var(--cyan) 50%, var(--accent) 100%) border-box;
  background-size: auto, 200% 100%;
  animation: eyebrow-flow 5s linear infinite;
}
.eyebrow .play {
  width: 5px; height: 5px;
  background: var(--accent);
  border-radius: 1px;
  transform: rotate(45deg);
}
.eyebrow.green .play { background: var(--green); }
.eyebrow.cyan .play { background: var(--cyan); }
@keyframes eyebrow-flow { to { background-position: 0 0, 200% 0; } }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 7px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .15s ease;
  white-space: nowrap;
  background: var(--bg-2);
  color: var(--text);
  border-color: var(--line);
}
.btn:hover { border-color: var(--line-2); background: var(--bg-3); }
.btn.primary {
  background: var(--green);
  color: #0a1a02;
  border-color: #b4ff7a;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(162, 248, 101, .22), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.btn.primary:hover { box-shadow: 0 8px 22px rgba(162, 248, 101, .32); transform: translateY(-1px); }
.btn.accent {
  background: var(--accent);
  color: white;
  border-color: rgba(255, 255, 255, .1);
  font-weight: 600;
  box-shadow: 0 4px 14px var(--accent-glow);
}
.btn.accent:hover { box-shadow: 0 8px 22px rgba(232, 86, 0, .3); transform: translateY(-1px); }
.btn.ghost { background: transparent; border-color: var(--line-2); color: var(--text-2); }
.btn.danger {
  background: rgba(223, 74, 99, .1);
  color: var(--red);
  border-color: rgba(223, 74, 99, .3);
}
.btn.sm { padding: 4px 9px; font-size: 11.5px; }
.btn.lg { padding: 10px 18px; font-size: 13.5px; }
.btn.icon-only { padding: 6px; width: 30px; height: 30px; }

/* ===== Cards ===== */
.card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--d-card-pad);
}
.card.tight { padding: 12px 14px; }
.card.flat { background: transparent; border-color: var(--line); }
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.card-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.card-head .meta {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* Stat / KPI cards */
.stat-grid {
  display: grid;
  gap: 12px;
}
.stat-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.stat-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.stat-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }

.stat {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
}
.stat.glow {
  background: linear-gradient(135deg, var(--bg-2) 0%, var(--bg-2) 50%, rgba(232, 86, 0, .08) 100%);
}
.stat.glow.green { background: linear-gradient(135deg, var(--bg-2) 0%, var(--bg-2) 60%, rgba(162, 248, 101, .07) 100%); }
.stat.glow.cyan { background: linear-gradient(135deg, var(--bg-2) 0%, var(--bg-2) 60%, rgba(54, 205, 255, .06) 100%); }

.stat .sk {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 6px;
}
.stat .sv {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  font-feature-settings: "tnum";
  line-height: 1.1;
}
.stat .sv small {
  font-size: 13px;
  color: var(--text-3);
  font-weight: 400;
  margin-left: 2px;
}
.stat .delta {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  margin-top: 6px;
  display: inline-flex; align-items: center; gap: 5px;
}
.delta.up { color: var(--green); }
.delta.down { color: var(--red); }
.delta::before { content: ""; width: 0; height: 0; }
.delta.up::before { border: 4px solid transparent; border-bottom-color: var(--green); margin-bottom: 2px; }
.delta.down::before { border: 4px solid transparent; border-top-color: var(--red); margin-top: 2px; }

/* ===== Tables ===== */
.tbl {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12.5px;
}
.tbl th {
  text-align: left;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 400;
  padding: 8px var(--d-pad);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 2;
}
.tbl td {
  padding: 0 var(--d-pad);
  height: var(--d-row-h);
  border-bottom: 1px solid var(--line);
  color: var(--text-2);
  vertical-align: middle;
}
.tbl tr:hover td { background: var(--bg-2); color: var(--text); }
.tbl td.num { font-family: var(--mono); font-feature-settings: "tnum"; text-align: right; color: var(--text); }
.tbl td.mono { font-family: var(--mono); }
.tbl td.strong { color: var(--text); font-weight: 500; }
.tbl .row-action {
  opacity: 0;
  transition: opacity .12s;
}
.tbl tr:hover .row-action { opacity: 1; }
.tbl-wrap { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); background: var(--bg-2); }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--bg-3);
  color: var(--text-2);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.badge.green { background: rgba(162, 248, 101, .08); color: var(--green); border-color: rgba(162, 248, 101, .25); }
.badge.red { background: rgba(223, 74, 99, .1); color: var(--red); border-color: rgba(223, 74, 99, .3); }
.badge.accent { background: var(--accent-soft); color: var(--accent); border-color: rgba(232, 86, 0, .3); }
.badge.cyan { background: rgba(54, 205, 255, .08); color: var(--cyan); border-color: rgba(54, 205, 255, .3); }
.badge.amber { background: rgba(232, 165, 0, .1); color: #e8a500; border-color: rgba(232, 165, 0, .3); }
.badge.purple { background: rgba(197, 153, 255, .08); color: var(--purple); border-color: rgba(197, 153, 255, .3); }
.badge.pink { background: rgba(255, 136, 190, .08); color: var(--pink); border-color: rgba(255, 136, 190, .3); }
.badge.muted { color: var(--text-3); }
.badge .dotx {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.tab {
  padding: 8px 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  background: none;
  border: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .12s;
}
.tab:hover { color: var(--text-2); }
.tab.active { color: var(--text); border-bottom-color: var(--accent); }

/* Filter row */
.filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.input {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 12px;
  color: var(--text);
  height: 32px;
}
.input input, .input select {
  background: transparent;
  border: none;
  outline: none;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  min-width: 0;
}
.input input::placeholder { color: var(--text-3); }
.input.search { min-width: 220px; }

select.input {
  appearance: none;
  padding-right: 26px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%238d8d8d' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

/* ===== Skeletons / Empty ===== */
.skel {
  background: linear-gradient(90deg, var(--bg-2) 0%, var(--bg-3) 50%, var(--bg-2) 100%);
  background-size: 200% 100%;
  animation: skel 1.4s ease-in-out infinite;
  border-radius: 4px;
}
@keyframes skel {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-3);
}
.empty h4 { margin: 12px 0 4px; color: var(--text-2); font-size: 14px; font-weight: 500; }
.empty p { font-size: 12.5px; margin: 0; }

/* ===== Live mobile mockup ===== */
.phone-frame {
  width: 360px;
  height: 740px;
  background: #0a0a0a;
  border: 8px solid #1a1a1a;
  border-radius: 36px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, .6), 0 0 0 1px var(--line);
  overflow: hidden;
  position: relative;
  display: flex; flex-direction: column;
  flex-shrink: 0;
}
.phone-frame::before {
  content: "";
  position: absolute;
  top: 8px; left: 50%;
  transform: translateX(-50%);
  width: 90px; height: 26px;
  background: #0a0a0a;
  border-radius: 0 0 14px 14px;
  z-index: 10;
}
.phone-screen {
  flex: 1;
  background: var(--bg);
  overflow-y: auto;
  padding-top: 42px;
}

/* ===== Chart ===== */
.spark {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 60px;
  padding: 0;
}
.spark .bar {
  flex: 1;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
  min-height: 4px;
  opacity: 0.7;
  transition: opacity .15s;
  position: relative;
}
.spark .bar:hover { opacity: 1; }
.spark .bar.live { background: var(--green); opacity: 0.85; }

.chart-line {
  width: 100%;
  height: 180px;
  position: relative;
}
.chart-line svg { width: 100%; height: 100%; display: block; }

/* Donut */
.donut {
  width: 140px; height: 140px;
  position: relative;
}
.donut svg { transform: rotate(-90deg); }
.donut .center {
  position: absolute;
  inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.donut .center .big {
  font-size: 22px; font-weight: 500;
  font-feature-settings: "tnum";
}
.donut .center .lbl {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* Misc utility */
.row { display: flex; align-items: center; gap: 10px; }
.col { display: flex; flex-direction: column; gap: 10px; }
.grow { flex: 1; }
.mono { font-family: var(--mono); }
.t-mono-label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); }
.t-num { font-family: var(--mono); font-feature-settings: "tnum"; }
.t-green { color: var(--green); }
.t-red { color: var(--red); }
.t-accent { color: var(--accent); }
.t-3 { color: var(--text-3); }
.t-2 { color: var(--text-2); }
.gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-20 { gap: 20px; }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.flex-1 { flex: 1; }
.text-right { text-align: right; }

/* Product thumbnail */
.product-thumb {
  width: 36px; height: 36px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.product-thumb.lg { width: 56px; height: 56px; font-size: 24px; border-radius: 8px; }
.product-thumb.xl { width: 80px; height: 80px; font-size: 32px; border-radius: 10px; }

/* Avatar circle for clients */
.client-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple) 0%, var(--pink) 100%);
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 11px;
  flex-shrink: 0;
}
.client-avatar.lg { width: 48px; height: 48px; font-size: 16px; }
.client-avatar.xl { width: 72px; height: 72px; font-size: 24px; }

/* level badge */
.level {
  display: inline-flex; align-items: center;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--bg-3);
  color: var(--text-2);
  border: 1px solid var(--line);
  min-width: 26px;
  justify-content: center;
}
.level.l-high { background: rgba(162, 248, 101, .08); color: var(--green); border-color: rgba(162, 248, 101, .25); }
.level.l-mid { background: rgba(54, 205, 255, .08); color: var(--cyan); border-color: rgba(54, 205, 255, .25); }
.level.l-low { background: rgba(255, 255, 255, .03); color: var(--text-3); }

/* Toggle */
.toggle {
  position: relative;
  width: 32px; height: 18px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s;
}
.toggle::after {
  content: "";
  position: absolute;
  top: 1px; left: 1px;
  width: 14px; height: 14px;
  background: var(--text-3);
  border-radius: 50%;
  transition: all .15s;
}
.toggle.on { background: var(--accent); border-color: var(--accent); }
.toggle.on::after { left: 15px; background: white; }

/* Section gap */
.stack { display: flex; flex-direction: column; gap: var(--d-section-gap); }
.stack-tight { display: flex; flex-direction: column; gap: 10px; }

/* Two-column page layout (e.g. for cliente perfil) */
.split-2 {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 18px;
}
.split-2-wide {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 18px;
}

/* Helpers visible only on hover row */
.menu-dot {
  font-size: 16px;
  line-height: 0;
  letter-spacing: 0.05em;
  color: var(--text-3);
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
}
.menu-dot:hover { background: var(--bg-3); color: var(--text); }

/* ============== Module-specific ============== */

/* Apresentar — produto destaque */
.live-product-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 12px;
  display: flex;
  gap: 12px;
  align-items: center;
  transition: all .15s;
  cursor: pointer;
}
.live-product-card:hover { border-color: var(--line-2); }
.live-product-card.presenting {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--bg-2) 0%, rgba(232, 86, 0, .06) 100%);
  box-shadow: 0 0 0 1px var(--accent-glow), 0 8px 30px rgba(232, 86, 0, .2);
}
.live-product-card.presenting::before {
  content: "AO VIVO";
  position: absolute;
  top: -8px; left: 12px;
  background: var(--red);
  color: white;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  padding: 2px 7px;
  border-radius: 4px;
}
.live-product-card { position: relative; }

/* Size grid (PDV + Apresentar) */
.size-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.size-chip {
  min-width: 38px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--line);
  background: var(--bg-3);
  color: var(--text);
  border-radius: 6px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  font-family: var(--mono);
  font-size: 11px;
  cursor: pointer;
  transition: all .12s;
}
.size-chip .qty {
  font-size: 8.5px;
  color: var(--text-3);
  margin-top: -2px;
}
.size-chip:hover:not(.empty) { border-color: var(--accent); }
.size-chip.empty { opacity: 0.35; cursor: not-allowed; }
.size-chip.selected { background: var(--accent); border-color: var(--accent); color: white; }
.size-chip.selected .qty { color: rgba(255, 255, 255, .7); }
.size-chip.low { border-color: var(--amber, #e8a500); }

/* Generic key-value list */
.kv {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 8px 14px;
  font-size: 12.5px;
}
.kv dt {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  padding-top: 2px;
}
.kv dd { margin: 0; color: var(--text); }

/* Tweaks panel z-fix */
[data-tweaks-panel] { z-index: 999; }

/* TPU panel mock for landing-style sections */
.panel-mock {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 14px;
}

/* Sortear (sortear) */
.sortear-stage {
  height: 320px;
  background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg-3) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}

/* Mini chart helpers */
.bar-h {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
  font-size: 12px;
}
.bar-h .lbl { width: 110px; color: var(--text-2); font-size: 12px; }
.bar-h .bar-track {
  flex: 1;
  height: 6px;
  background: var(--bg-3);
  border-radius: 3px;
  overflow: hidden;
}
.bar-h .bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
}
.bar-h .val {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
  width: 64px;
  text-align: right;
  font-feature-settings: "tnum";
}

/* Mode (desktop / mobile toggle) */
.mode-switch {
  display: inline-flex;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 2px;
  gap: 1px;
}
.mode-switch button {
  padding: 4px 10px;
  background: transparent;
  border: none;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 5px;
}
.mode-switch button.active {
  background: var(--bg-3);
  color: var(--text);
}

/* Tooltip-y kbd */
kbd, .kbd {
  font-family: var(--mono);
  font-size: 10px;
  padding: 1px 5px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--text-3);
}

/* Sidebar collapsed (mobile-ish) */
@media (max-width: 1100px) {
  .app-root { grid-template-columns: 60px 1fr; }
  .sidebar .nav-item .label,
  .sidebar .nav-item .badge,
  .sidebar .store-info,
  .sidebar .user-info,
  .sidebar .nav-group,
  .sidebar .brand-mark small,
  .sidebar-head .icon-btn { display: none; }
  .sidebar-head { padding: 14px 6px; justify-content: center; }
  .store-pill { padding: 6px; justify-content: center; }
  .nav-item { justify-content: center; padding: 8px; }
  .nav-item.active::before { display: none; }
  .sidebar-foot { justify-content: center; padding: 10px 6px; }
}

/* Modal */
.modal-back {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, .65);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 22px;
}
