/* Regente demo page: scenarios, phone (lock screen, WhatsApp) and the integrations panel. */

/* ---------------------------------------------------------------- landing (presenter page) */
.demo {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(280px, 340px) auto minmax(320px, 1fr);
  gap: 32px;
  max-width: 1640px;
  margin: 0 auto;
  padding: 28px 24px;
  align-items: start;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 40px; height: auto; }
.brand .name { font-weight: 800; font-size: 22px; letter-spacing: 0.02em; color: var(--primary-600); }
.brand .sub { font-size: 12px; color: var(--n-500); letter-spacing: 0.08em; text-transform: uppercase; }
.intro h1 {
  font-size: 26px;
  line-height: 1.2;
  margin: 28px 0 10px;
  color: var(--n-900);
  text-wrap: balance;
}
.intro p.lead { font-size: 15px; line-height: 1.55; color: var(--n-600); max-width: 60ch; margin: 0 0 18px; }

.scenarios { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-bottom: 16px; }
.scenario {
  text-align: left;
  border: 1px solid var(--n-200);
  background: var(--surface);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  display: grid;
  gap: 6px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.scenario:hover { border-color: var(--primary-200); }
.scenario[aria-pressed="true"] { border-color: var(--primary-600); box-shadow: 0 0 0 3px var(--primary-100); }
.scenario .ico {
  width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center;
  background: var(--primary-50); color: var(--primary-600); font-size: 18px;
}
.scenario strong { font-size: 15px; color: var(--n-900); }
.scenario span { font-size: 13px; color: var(--n-600); line-height: 1.45; }

.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 8px 0 8px; }
.status-line { font-size: 13px; color: var(--n-600); min-height: 20px; margin: 0 0 18px; line-height: 1.45; }
.status-line.erro { color: var(--error); }

.steps { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 10px; }
.steps li {
  display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; align-items: start;
  color: var(--n-600);
}
.steps .num {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--n-300); font-weight: 700; font-size: 12px; background: var(--surface);
}
.steps li strong { display: block; color: var(--n-800); font-size: 15px; }
.steps li small { font-size: 12.5px; line-height: 1.45; }
.steps li.ativo .num { border-color: var(--primary-600); color: var(--primary-600); box-shadow: 0 0 0 3px var(--primary-100); }
.steps li.ativo strong { color: var(--n-900); }
.steps li.feito .num { background: var(--primary-600); border-color: var(--primary-600); color: #fff; }
.steps li.feito strong { color: var(--n-800); }

.backstage {
  border: 1px solid var(--n-200); background: var(--surface); border-radius: 12px; padding: 16px;
}
.backstage h2 { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--n-500); margin: 0 0 12px; }
.backstage .vazio { color: var(--n-500); font-size: 13px; margin: 0; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 14px; font-size: 13px; margin: 0 0 12px; }
.kv dt { color: var(--n-500); }
.kv dd { margin: 0; color: var(--n-900); font-variant-numeric: tabular-nums; }
.badge {
  display: inline-block; border-radius: 999px; padding: 2px 9px; font-size: 12px; font-weight: 600;
  background: var(--n-100); color: var(--n-600);
}
.badge.ok { background: var(--success-50); color: var(--success); }
.badge.and { background: var(--warning-50); color: var(--warning-700); }
.lista-acoes { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.lista-acoes li { display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid var(--n-100); padding-top: 6px; }
.respostas { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.respostas span { font-size: 12px; background: var(--n-100); border-radius: 6px; padding: 3px 8px; color: var(--n-600); }
.nota { font-size: 12px; color: var(--n-500); margin-top: 18px; line-height: 1.5; }

/* ---------------------------------------------------------------- simulated conversations */
.conversas { border: 1px solid var(--n-200); background: var(--surface); border-radius: 12px; margin: 18px 0 0; position: relative; }
.conversas > summary {
  list-style: none; cursor: pointer; display: grid; grid-template-columns: auto auto 1fr auto; gap: 8px; align-items: center;
  padding: 10px 14px; border-radius: 12px;
}
.conversas > summary::-webkit-details-marker { display: none; }
.conversas > summary::after { content: "▾"; color: var(--n-500); font-size: 12px; transition: transform 0.15s; }
.conversas[open] > summary::after { transform: rotate(180deg); }
.conversas > summary:hover { background: var(--n-50); }
.conv-titulo { font-size: 14px; font-weight: 700; color: var(--n-900); }
.conv-total { font-size: 12px; font-weight: 700; color: var(--primary-700); background: var(--primary-50); border-radius: 999px; padding: 2px 9px; }
.conv-total:empty { display: none; }
.conv-atual { font-size: 12px; color: var(--n-600); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }
.conv-corpo {
  position: absolute; left: -1px; right: -1px; top: calc(100% + 6px); z-index: 20; padding: 0 14px 14px;
  background: var(--surface); border: 1px solid var(--n-200); border-radius: 12px;
  box-shadow: 0 18px 40px -12px rgba(21, 28, 33, 0.25); animation: subir 0.15s ease-out;
}
.conv-dica { font-size: 12.5px; color: var(--n-600); margin: 10px 0; line-height: 1.45; }
.conv-busca {
  width: 100%; font-family: inherit; font-size: 13.5px; border: 1px solid var(--n-300); border-radius: 8px; padding: 8px 10px;
  margin-bottom: 8px; background: var(--n-50);
}
.conv-busca:focus { outline: none; border-color: var(--primary-600); box-shadow: 0 0 0 3px var(--primary-100); background: #fff; }
.lista-conversas { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 320px; overflow-y: auto; }
.lista-conversas .vazio { font-size: 13px; color: var(--n-500); }
.conversa {
  width: 100%; text-align: left; border: 1px solid var(--n-200); background: var(--n-50); border-radius: var(--radius);
  padding: 8px 10px; cursor: pointer; display: grid; gap: 4px; font-family: inherit;
}
.conversa:hover { border-color: var(--primary-200); background: var(--surface); }
.conversa.atual { border-color: var(--primary-600); background: var(--primary-50); }
.conversa .l1 { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.conversa .l1 b { font-size: 13.5px; color: var(--n-900); font-variant-numeric: tabular-nums; }
.conversa .fluxo { font-size: 11.5px; font-weight: 700; color: var(--n-600); }
.conversa .l2 { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--n-600); flex-wrap: wrap; }

/* ---------------------------------------------------------------- integrations panel */
.painel { display: grid; gap: 12px; min-width: 0; position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow-y: auto; padding-right: 4px; }
.painel h2 { font-size: 14px; font-weight: 700; color: var(--n-900); margin: 0; }
.sistemas { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.sistema {
  border: 1px solid var(--n-200); background: var(--surface); border-radius: var(--radius); padding: 10px 12px;
  display: grid; gap: 3px; transition: border-color 0.3s, box-shadow 0.3s;
}
.sistema .topo { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.sistema b { font-size: 14px; color: var(--n-900); }
.sistema .qtd { font-size: 12px; font-weight: 700; color: var(--n-500); font-variant-numeric: tabular-nums; }
.sistema small { font-size: 11.5px; color: var(--n-600); line-height: 1.35; }
.sistema .modo { font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--n-600); }
.sistema .pendente { font-size: 11px; color: var(--n-600); }
.sistema .modo.real { color: var(--success); }
.sistema.ativo { border-color: var(--primary-600); box-shadow: 0 0 0 3px var(--primary-100); }
.sistema.ativo .qtd { color: var(--primary-600); }
.feed-head { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.ao-vivo { font-size: 11.5px; color: var(--n-500); display: flex; align-items: center; gap: 6px; }
.ao-vivo i { width: 7px; height: 7px; border-radius: 50%; background: var(--success); animation: pulso 1.6s infinite; }
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 300px; overflow-y: auto; }
.feed .vazio, .aba-corpo .vazio { color: var(--n-500); font-size: 13px; margin: 0; }
.evento {
  display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; gap: 8px; align-items: start;
  background: var(--surface); border: 1px solid var(--n-200); border-radius: var(--radius); padding: 8px 10px; font-size: 13.5px;
  animation: subir 0.3s ease-out;
}
.evento .sis { font-weight: 800; font-size: 11px; letter-spacing: 0.04em; border-radius: 5px; padding: 3px 6px; text-align: center; background: var(--n-100); color: var(--n-600); }
.evento .sis.modelo { background: #f1ebff; color: #6d28d9; }
.evento .sis.copel { background: var(--primary-50); color: var(--primary-700); }
.evento .sis.canal { background: #e7f8ef; color: #0f7a46; }
.evento .txt b { display: block; color: var(--n-900); font-weight: 600; font-size: 14px; }
.evento .txt span { color: var(--n-600); }
.evento time { color: var(--n-500); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.abas { display: flex; gap: 4px; background: var(--n-100); border-radius: 8px; padding: 3px; margin-top: 6px; }
.aba { flex: 1; border: 0; background: none; border-radius: 6px; padding: 7px; font-size: 13px; font-weight: 600; color: var(--n-600); cursor: pointer; }
.aba[aria-selected="true"] { background: var(--surface); color: var(--n-900); box-shadow: 0 1px 2px rgba(0,0,0,0.06); }
.aba-corpo { background: var(--surface); border: 1px solid var(--n-200); border-radius: 12px; padding: 14px; overflow-x: auto; }
.tabela { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.tabela th { text-align: left; color: var(--n-500); font-weight: 600; padding: 4px 6px; border-bottom: 1px solid var(--n-200); white-space: nowrap; }
.tabela td { padding: 5px 6px; border-bottom: 1px solid var(--n-100); vertical-align: top; }
.tabela td.det { color: var(--n-500); max-width: 260px; overflow-wrap: anywhere; }
.erro-txt { color: var(--error); }

.evento details.registro { margin-top: 6px; }
.evento details.registro summary { cursor: pointer; font-size: 12px; font-weight: 600; color: var(--primary-700); }
.evento details.registro p {
  margin: 4px 0 0; padding: 8px 10px; background: var(--n-50); border-left: 3px solid var(--primary-500);
  border-radius: 0 6px 6px 0; color: var(--n-800); font-size: 12.5px; line-height: 1.5; white-space: pre-wrap;
}
.entendidas { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.entendida {
  border: 1px solid var(--n-200); border-radius: 10px; padding: 10px 12px; background: var(--surface);
  display: grid; gap: 6px; align-content: start; animation: subir 0.3s ease-out;
}
.entendida .topo { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.entendida .rotulo { font-size: 12.5px; color: var(--n-600); font-weight: 600; line-height: 1.35; }
.entendida .cod { font-size: 10.5px; color: var(--n-500); font-weight: 700; letter-spacing: 0.04em; }
.entendida .resposta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.entendida .valor { font-size: 14px; font-weight: 700; color: var(--n-900); background: var(--n-100); border-radius: 6px; padding: 3px 9px; }
.entendida .valor.sim { background: var(--primary-50); color: var(--primary-700); }
.entendida .valor.nao { background: var(--n-100); color: var(--n-800); }
.entendida .origem { font-size: 11.5px; color: var(--n-600); background: var(--warning-50); border-radius: 999px; padding: 2px 8px; }
.entendida .nota-modelo { border-left: 3px solid var(--primary-500); background: var(--n-50); border-radius: 0 6px 6px 0; padding: 6px 8px; display: grid; gap: 2px; }
.entendida .nota-modelo .rot { font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--primary-700); }
.entendida .nota-modelo q { font-size: 12.5px; color: var(--n-800); line-height: 1.45; quotes: "“" "”"; }

/* ---------------------------------------------------------------- phone frame */
.phone-wrap { position: sticky; top: 24px; display: grid; gap: 10px; justify-items: center; }
.phone {
  width: 380px; max-width: 100%;
  height: min(780px, calc(100vh - 80px));
  min-height: 560px;
  border-radius: 44px;
  background: #111;
  padding: 12px;
  box-shadow: 0 30px 60px -20px rgba(21, 28, 33, 0.35), 0 0 0 1px #2a2a2a inset;
}
.screen {
  position: relative; width: 100%; height: 100%; border-radius: 34px; overflow: hidden; background: #fff;
  display: flex; flex-direction: column;
}
.statusbar {
  height: 34px; flex: none; display: flex; justify-content: space-between; align-items: center;
  padding: 0 26px; font-size: 13px; font-weight: 600; color: #fff; background: var(--wa-head);
}
.statusbar.light { color: var(--n-900); background: var(--surface); }
.abrir-aba { font-size: 12.5px; color: var(--n-600); }
.abrir-aba a { color: var(--primary-700); }

/* idle screen */
.idle {
  flex: 1; display: grid; place-items: center; text-align: center; padding: 32px;
  background: radial-gradient(120% 80% at 20% 0%, #ff8427 0%, #ec6500 38%, #7a3200 100%); color: #fff;
}
.idle .relogio { font-size: 64px; font-weight: 300; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.idle .data { font-size: 14px; opacity: 0.8; margin-bottom: 40px; }
.idle .espera { font-size: 13px; opacity: 0.7; max-width: 24ch; margin: 0 auto; line-height: 1.5; }
.notif {
  margin-top: 28px; text-align: left; background: rgba(255, 255, 255, 0.14); backdrop-filter: blur(6px);
  border-radius: 16px; padding: 12px 14px; display: grid; grid-template-columns: 34px 1fr; gap: 10px; cursor: pointer;
  animation: subir 0.35s ease-out;
}
.notif img { width: 34px; height: 34px; border-radius: 8px; background: #fff; padding: 4px; }
.notif b { font-size: 13px; display: block; }
.notif span { font-size: 12.5px; opacity: 0.9; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* WhatsApp screen */
.wa { flex: 1; display: flex; flex-direction: column; min-height: 0; background: var(--wa-bg); }
.wa-head {
  flex: none; background: var(--wa-head); color: #fff; display: flex; align-items: center; gap: 10px; padding: 8px 12px 10px;
}
.wa-head .voltar { font-size: 20px; opacity: 0.9; }
.wa-head .av { width: 38px; height: 38px; border-radius: 50%; background: #fff; display: grid; place-items: center; }
.wa-head .av img { width: 24px; }
.wa-head .nm { font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 5px; }
.wa-head .ok { width: 15px; height: 15px; border-radius: 50%; background: #25d366; display: inline-grid; place-items: center; font-size: 9px; color: #fff; }
.wa-head small { display: block; font-size: 12px; opacity: 0.85; }
.wa-body { flex: 1; overflow-y: auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 6px; }
.wa-dia { align-self: center; background: #fff; color: var(--n-600); font-size: 11.5px; padding: 4px 10px; border-radius: 8px; margin-bottom: 6px; box-shadow: 0 1px 0.5px rgba(0,0,0,0.08); }
.wa-cripto { align-self: center; background: #fff7d6; color: #54656f; font-size: 11.5px; padding: 6px 10px; border-radius: 8px; text-align: center; max-width: 88%; line-height: 1.4; }
.wa-msg {
  align-self: flex-start; max-width: 86%; background: var(--wa-bubble); border-radius: 0 8px 8px 8px; box-shadow: 0 1px 0.5px rgba(0,0,0,0.13);
  font-size: 14px; line-height: 1.42; color: #111b21; overflow: hidden; animation: subir 0.3s ease-out;
}
.wa-msg .tx { padding: 7px 9px 4px; white-space: pre-wrap; }
.wa-msg .hora { text-align: right; font-size: 11px; color: #667781; padding: 0 9px 5px; }
.wa-msg .wa-btn {
  display: block; width: 100%; border: 0; border-top: 1px solid #e9edef; background: #fff; color: #027eb5;
  padding: 10px; font-size: 14px; font-weight: 500; cursor: pointer;
}
.wa-msg .wa-btn:hover { background: #f5f6f6; }
.wa-msg .wa-btn.cta { font-weight: 600; }
.wa-out { align-self: flex-end; background: #d9fdd3; border-radius: 8px 0 8px 8px; }
.wa-foot { flex: none; display: flex; gap: 8px; padding: 8px; align-items: center; }
.wa-foot .fake { flex: 1; background: #fff; border-radius: 22px; padding: 10px 14px; color: #8696a0; font-size: 14px; }
.wa-foot .mic { width: 42px; height: 42px; border-radius: 50%; background: var(--wa-head); color: #fff; display: grid; place-items: center; }
.wa-espera { align-self: center; font-size: 12px; color: #54656f; background: #fff; padding: 5px 10px; border-radius: 8px; }

/* PWA inside the phone */
.pwa-frame { flex: 1; border: 0; width: 100%; background: var(--n-50); }

/* ---------------------------------------------------------------- narrow screens */
@media (min-width: 1600px) {
  .intro h1 { font-size: 36px; line-height: 1.12; }
}
@media (max-width: 1240px) {
  .demo { grid-template-columns: minmax(0, 1fr) auto; }
  .painel { grid-column: 1 / -1; position: static; max-height: none; }
}
@media (max-width: 900px) {
  .demo { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 20px 16px; }
  .phone-wrap { position: static; }
}
@media (max-width: 440px) {
  .phone { width: 100%; border-radius: 0; padding: 0; height: 100dvh; min-height: 0; box-shadow: none; background: none; }
  .screen { border-radius: 0; }
  .intro h1 { font-size: 24px; }
}
