/* Adaptação incremental do guia appchat-frontend; preserva os componentes e IDs atuais. */
:root {
  --page: #f9fafc;
  --surface: #fff;
  --soft: #f9fafc;
  --ink: #334256;
  --muted: #64748b;
  --border: #e2e8f0;
  --navy: #192d3e;
  --teal: #0e7490;
  --green: #15803d;
  --amber: #b45309;
  --red: #b91c1c;
  --radius: 4px;
  --shadow: 0 1px 5px rgb(25 45 62 / 8%);
  --font: Roboto, Arial, sans-serif;
}
body { font-family: var(--font); background: var(--page); }
body::before {
  content: ''; position: absolute; inset: 0 0 auto; height: 149px;
  background: linear-gradient(90deg, #122130, #192d3e); z-index: -1;
}
.shell {
  width: auto; margin: 0 32px; display: flex; flex-direction: column;
  min-height: 100vh; padding-bottom: 24px;
}
.top {
  height: 99px; min-height: 99px; margin: 0; color: #fff;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
}
.top .brand { grid-column: 2; text-align: center; }
.top .mark, .top .eyebrow { display: none; }
.top h1 { font-size: 20px; font-weight: 700; letter-spacing: 0; margin: 0; }
.top-meta { grid-column: 3; justify-content: flex-end; }
.top-meta .pill { background: #ffffff12; border-color: #ffffff40; color: white; font-size: 12px; box-shadow: none; }
.top-meta .pill span { color: inherit; }
.top-help { grid-column: 1; grid-row: 1; justify-self: start; color: #fff; font-size: 14px; }
.tabs {
  order: 1; width: 100%; min-height: 49px; flex-wrap: nowrap; overflow-x: auto;
  gap: 0; padding: 0; margin: 0; border-radius: 8px 8px 0 0;
  border: 0; border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
}
.tab {
  min-width: 160px; min-height: 49px; border-radius: 0; padding: 12px 20px;
  white-space: nowrap; font-size: 16px; font-weight: 700; border-bottom: 2px solid transparent;
}
.tab.is-on { color: var(--navy); background: white; border-bottom-color: var(--navy); }
.tab:hover { background: #192d3e08; }
.shell > .alerta { order: 2; margin: 16px 0 0; }
.shell > .kpis {
  order: 3; margin: 0; padding: 24px; background: white;
  border-bottom: 1px solid var(--border); gap: 16px;
}
.kpi { box-shadow: none; border-radius: 4px; padding: 16px; }
.kpi span { text-transform: none; letter-spacing: 0; font-size: 13px; }
.kpi strong { font-size: 24px; color: var(--navy); }
.shell > .panel { order: 4; padding: 24px; background: white; flex: 1; min-width: 0; }
.shell > footer { order: 5; }
.panel h2, .card-form h2 { font-size: 17px; font-weight: 500; letter-spacing: 0; }
.panel-head { padding-bottom: 16px; margin-bottom: 24px; border-bottom: 1px solid var(--border); }
.grupo, .card-form, .top-card, .tabela-wrap { box-shadow: none; border-radius: 4px; }
.card-form { padding: 24px; }
.card-form h2 { padding-bottom: 14px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.btn { min-height: 38px; padding: 8px 16px; border-radius: 4px; font-weight: 700; color: var(--navy); border: 1px solid #192d3e80; }
.btn.primary { background: var(--navy); color: white; border-color: var(--navy); }
.btn:hover { box-shadow: none; background: #192d3e0a; }
.btn.primary:hover { background: #122130; }
.btn:disabled { opacity: .5; cursor: wait; }
.acoes { flex-wrap: wrap; }
#ativacao-cliente { max-width: min(460px, calc(100% - 32px)); padding: 28px; border: 1px solid var(--border); border-radius: 8px; color: var(--ink); }
#ativacao-cliente::backdrop { background: #122130b0; }
#ativacao-cliente input { width: 100%; }
body.acesso-bloqueado .shell > :not(#ativacao-cliente) { visibility: hidden; }
body.modo-extensao.extensao-admin .tab[data-admin] { display: block !important; }
body.modo-extensao.extensao-admin .panel[data-admin] { display: none !important; }
body.modo-extensao.extensao-admin .panel[data-admin].is-on { display: block !important; }
body.modo-extensao.extensao-admin footer[data-admin] { display: block !important; }
input, select, textarea { font: inherit; border-radius: 4px; border: 1px solid #c4c4c4; }
.campo, .campo input, .campo select, .campo textarea { min-width: 0; max-width: 100%; }
.campo { position: relative; margin: 18px 0 24px; }
.campo > span { position: absolute; z-index: 1; left: 12px; top: -7px; padding: 0 4px; background: white; color: #64748b; font-size: 12px; }
.campo input, .campo select { height: 56px; padding: 14px; }
.campo input:focus, .campo select:focus { outline: 2px solid var(--navy); outline-offset: -2px; }
.filtros input, .filtros select { min-height: 38px; }
.filtros { align-items: center; }
.filtros .campo { margin: 18px 0; }
.filtros-acoes { margin: 0; align-items: center; }
:focus-visible { outline: 2px solid #0e7490; outline-offset: 3px; }
.texto { white-space: pre-wrap; overflow-wrap: anywhere; }
details.grupo { margin-bottom: 12px; }
details.grupo > summary { color: var(--navy); cursor: pointer; padding: 8px 0; }
.tabela-wrap { max-width: 100%; overflow: auto; }
.panel .split { gap: 24px; }
.landing-page {
  --lp-background: #f9fafc; --lp-ink: #334256; --lp-muted: #64748b;
  --lp-navy: #192d3e; --lp-border: #e2e8f0; --lp-teal: #0e7490;
  font-family: var(--font) !important;
}
.landing-page .landing-card { margin-top: 99px; border-radius: 8px 8px 0 0; box-shadow: var(--shadow); }
.landing-page .brand-mark { background: var(--navy); border-radius: 4px; }
.landing-page .feature-card, .landing-page .landing-cta-block { border-radius: 4px; }
@media (max-width: 900px) {
  .top { grid-template-columns: 1fr auto; }
  .top .brand { grid-column: 1; text-align: left; }
  .top-meta { grid-column: 2; }
  .top-help { display: none; }
  .top-meta .pill:last-child { display: none; }
  .panel .split { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .shell { margin: 0 12px; }
  .shell > .panel, .shell > .kpis { padding: 16px; }
  .top h1 { font-size: 18px; }
  .top-meta { max-width: 145px; }
  .card-form { padding: 16px; }
  .tab { min-width: 140px; font-size: 14px; padding: 12px; }
  .filtros, .busca-form { grid-template-columns: minmax(0, 1fr); }
}
