/* Gestão Mentora Audi Vida: identidade Audi Vida (petróleo escuro + verde-limão só em detalhes) */
:root {
  --petroleo: #012A33;
  --petroleo-2: #003C48;
  --petroleo-3: #0B5563;
  --limao: #7ED957;
  --fundo: #EEF3F4;
  --cartao: #FFFFFF;
  --texto: #10262C;
  --suave: #5B7177;
  --linha: #DCE5E7;
  --verde: #1E8E4E;
  --laranja: #C96A00;
  --vermelho: #C0392B;
  --azul: #0B6E99;
  --raio: 16px;
  --sombra: 0 1px 2px rgba(1, 42, 51, .06), 0 4px 16px rgba(1, 42, 51, .06);
  --fonte: "Segoe UI", Inter, system-ui, -apple-system, Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--fonte); color: var(--texto); background: var(--fundo); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--azul); }
.num, td.num, .grande { font-variant-numeric: tabular-nums; }
.muted { color: var(--suave); }
.erro { color: var(--vermelho); min-height: 1.2em; margin: 6px 0; font-size: 14px; }

/* ---------------------------------------------------------- entrar */
.entrar { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: radial-gradient(circle at 30% 20%, var(--petroleo-2), var(--petroleo) 70%); }
.entrar-card { background: var(--cartao); border-radius: var(--raio); padding: 32px 28px; width: min(380px, 100%); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.entrar-marca { background: var(--petroleo); border-radius: 12px; padding: 14px; display: grid; place-items: center; margin-bottom: 18px; }
.entrar-logo { height: 92px; display: block; }
.entrar-card h1 { margin: 0 0 4px; font-size: 22px; }
.entrar-card .campo { margin-top: 18px; }

/* ---------------------------------------------------------- layout */
.sistema { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.menu { background: var(--petroleo); color: #D7E6E9; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 18px 12px; overflow-y: auto; }
.menu-topo { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; }
.menu-logo { height: 54px; }
.menu-nome { font-weight: 600; color: #fff; font-size: 13px; letter-spacing: .3px; border-left: 2px solid var(--limao); padding-left: 10px; }
nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: #C9DADD; text-decoration: none; font-size: 14.5px; margin-bottom: 2px; position: relative; }
nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
nav a.ativo { background: var(--petroleo-2); color: #fff; font-weight: 600; }
nav a.ativo::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--limao); }
nav .ic { width: 20px; text-align: center; opacity: .9; }
nav .contador { margin-left: auto; background: var(--limao); color: var(--petroleo); border-radius: 999px; font-size: 11.5px; font-weight: 700; padding: 1px 7px; font-variant-numeric: tabular-nums; }
.menu-sair { margin-top: auto; background: transparent; border: 1px solid rgba(255,255,255,.15); color: #C9DADD; padding: 9px; border-radius: 10px; cursor: pointer; }
.menu-sair:hover { color: #fff; border-color: rgba(255,255,255,.35); }
.fundo-menu { display: none; }

.conteudo { min-width: 0; padding: 22px 28px 60px; }
.topo { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; min-height: 44px; }
.topo h1 { font-size: 24px; margin: 0; color: var(--petroleo); }
.topo-acao { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.btn-ajuda { width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--petroleo-3); background: transparent; color: var(--petroleo-3); font-weight: 700; cursor: pointer; flex: none; }
.btn-ajuda[aria-expanded="true"] { background: var(--petroleo-3); color: #fff; }
.ajuda-texto { background: #E5F4EC; border: 1px solid #BFE3CD; border-left: 4px solid var(--limao); border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; font-size: 14.5px; }
.ajuda-texto p { margin: 4px 0; }
.so-celular { display: none; }

/* ---------------------------------------------------------- botões e campos */
.btn { border: 1px solid var(--linha); background: #fff; color: var(--petroleo); border-radius: 10px; padding: 9px 16px; cursor: pointer; font-weight: 600; font-size: 14px; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn:hover { border-color: var(--petroleo-3); }
.btn.primario { background: var(--petroleo); color: #fff; border-color: var(--petroleo); }
.btn.primario:hover { background: var(--petroleo-2); }
.btn.perigo { color: var(--vermelho); border-color: #F0C7C2; }
.btn.perigo.armado { background: var(--vermelho); color: #fff; border-color: var(--vermelho); }
.btn.pequeno { padding: 6px 12px; font-size: 13px; }
.btn.largo { width: 100%; padding: 12px; }
.btn:disabled { opacity: .55; cursor: wait; }
.btn-icone { border: 0; background: transparent; font-size: 20px; cursor: pointer; padding: 6px 10px; border-radius: 8px; color: var(--petroleo); }
.btn-icone:hover { background: var(--fundo); }
.link { background: none; border: 0; padding: 0; color: var(--petroleo-2); font-weight: 600; cursor: pointer; text-align: left; text-decoration: underline; text-decoration-color: rgba(0,60,72,.25); text-underline-offset: 3px; }
.link:hover { text-decoration-color: var(--petroleo-2); }

.campo { display: flex; flex-direction: column; gap: 5px; font-size: 13.5px; color: var(--suave); font-weight: 600; }
.campo input, .campo select, .campo textarea, .filtros input, .filtros select {
  border: 1px solid var(--linha); border-radius: 10px; padding: 10px 12px; background: #fff; color: var(--texto); font-weight: 400; font-size: 15px; min-width: 0; width: 100%;
}
.campo textarea { min-height: 110px; resize: vertical; }
.campo input:focus, .campo select:focus, .campo textarea:focus, .filtros input:focus, .filtros select:focus { outline: 2px solid rgba(126,217,87,.6); border-color: var(--petroleo-3); }
.campo small { font-weight: 400; }
.form { display: grid; gap: 14px; }
.form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14.5px; color: var(--texto); font-weight: 400; }

.filtros { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.filtros input { width: 360px; max-width: 100%; }
.filtros select { width: auto; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--linha); background: #fff; border-radius: 999px; padding: 6px 14px; cursor: pointer; font-size: 13.5px; color: var(--suave); }
.chip.ativo { background: var(--petroleo); color: #fff; border-color: var(--petroleo); }

/* ---------------------------------------------------------- cartões */
.cartao { background: var(--cartao); border-radius: var(--raio); box-shadow: var(--sombra); padding: 18px 20px; min-width: 0; }
.cartao h2 { font-size: 15.5px; margin: 0 0 12px; color: var(--petroleo); }
.cartao h2 small { font-weight: 400; color: var(--suave); font-size: 13px; margin-left: 6px; }
.grade { display: grid; gap: 16px; }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mt { margin-top: 16px; }

.numero { padding: 16px 18px; }
.numero .rotulo { font-size: 13px; color: var(--suave); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.numero .grande { font-size: 30px; font-weight: 700; color: var(--petroleo); line-height: 1.15; margin-top: 4px; letter-spacing: -.5px; }
.numero .sub { font-size: 12.5px; color: var(--suave); margin-top: 2px; }
.numero.destaque { background: var(--petroleo); }
.numero.destaque .rotulo, .numero.destaque .sub { color: #A9C6CC; }
.numero.destaque .grande { color: #fff; }
.pontinho { width: 8px; height: 8px; border-radius: 50%; background: var(--limao); display: inline-block; box-shadow: 0 0 0 3px rgba(126,217,87,.25); }
.negativo { color: var(--vermelho) !important; }

/* ---------------------------------------------------------- tabelas */
.tabela-caixa { background: var(--cartao); border-radius: var(--raio); box-shadow: var(--sombra); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12.5px; color: var(--suave); font-weight: 600; padding: 12px 14px; border-bottom: 1px solid var(--linha); background: #F8FAFB; white-space: nowrap; }
td { padding: 11px 14px; border-bottom: 1px solid #EEF2F3; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #FAFCFC; }
td.num, th.num { text-align: right; white-space: nowrap; }
td.acao, th.acao { text-align: right; white-space: nowrap; width: 1%; }
td .sub { display: block; font-size: 12.5px; color: var(--suave); }
.status { white-space: nowrap; font-size: 13.5px; }
.cartao table td, .cartao table th { padding-left: 6px; padding-right: 6px; }
.cartao table th { background: transparent; }

/* ---------------------------------------------------------- vazio */
.vazio { text-align: center; padding: 34px 16px; color: var(--suave); }
.vazio .ic { font-size: 30px; display: block; margin-bottom: 6px; opacity: .75; }
.vazio strong { display: block; color: var(--texto); font-size: 15px; margin-bottom: 2px; }

/* ---------------------------------------------------------- gráficos (SVG) */
.grafico svg { width: 100%; height: auto; display: block; overflow: visible; }
.grafico text { font-family: var(--fonte); font-size: 11px; fill: var(--suave); font-variant-numeric: tabular-nums; }
.legenda { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--suave); margin-top: 8px; }
.legenda i { display: inline-block; width: 12px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 5px; }
.barras-h { display: grid; gap: 9px; }
.barra-h { display: grid; grid-template-columns: 130px 1fr auto; gap: 10px; align-items: center; font-size: 13.5px; }
.barra-h .trilho { display: block; background: #EEF3F4; border-radius: 6px; height: 12px; overflow: hidden; }
.barra-h .cheio { display: block; background: var(--petroleo-3); height: 100%; border-radius: 6px; }
.barra-h:first-child .cheio { background: var(--petroleo); }
.barra-h .val { font-variant-numeric: tabular-nums; color: var(--suave); font-size: 12.5px; min-width: 64px; text-align: right; }
.barra-h .nome { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dica-grafico { position: fixed; pointer-events: none; background: var(--petroleo); color: #fff; font-size: 12.5px; padding: 6px 10px; border-radius: 8px; z-index: 60; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------------------------------------------------------- listas "precisa de você" */
.lista { list-style: none; margin: 0; padding: 0; }
.lista li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #EEF2F3; font-size: 14px; }
.lista li:last-child { border-bottom: 0; }
.lista .dir { margin-left: auto; white-space: nowrap; color: var(--suave); font-size: 13px; }
.lista .info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.lista .info .sub { font-size: 12.5px; color: var(--suave); }
.lista li.alto { align-items: flex-start; }

/* ---------------------------------------------------------- painel lateral */
.lateral-fundo { position: fixed; inset: 0; background: rgba(1,42,51,.35); z-index: 40; }
.lateral { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: var(--fundo); z-index: 50; transform: translateX(100%); transition: transform .22s ease, visibility .22s; display: flex; flex-direction: column; visibility: hidden; }
.lateral.aberta { transform: none; visibility: visible; box-shadow: -10px 0 40px rgba(0,0,0,.15); }
.lateral-topo { display: flex; align-items: center; gap: 10px; padding: 16px 18px; background: #fff; border-bottom: 1px solid var(--linha); }
.lateral-topo h2 { margin: 0; font-size: 18px; color: var(--petroleo); flex: 1; min-width: 0; overflow-wrap: anywhere; }
.lateral-corpo { padding: 16px 18px 40px; overflow-y: auto; display: grid; gap: 14px; align-content: start; }
.ficha { display: grid; grid-template-columns: 140px 1fr; gap: 8px 12px; font-size: 14px; }
.ficha dt { color: var(--suave); }
.ficha dd { margin: 0; overflow-wrap: anywhere; }
.botoes { display: flex; gap: 8px; flex-wrap: wrap; }
.senha-gerada { background: #FFF8E1; border: 1px dashed #E0B44A; border-radius: 12px; padding: 12px; font-size: 14px; }
.senha-gerada code { font-size: 20px; font-weight: 700; letter-spacing: 1px; display: block; margin: 6px 0; user-select: all; }

/* conversa do suporte */
.conversa { display: grid; gap: 10px; }
.msg { padding: 10px 14px; border-radius: 14px; max-width: 88%; font-size: 14.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg small { display: block; font-size: 12px; color: var(--suave); margin-top: 4px; white-space: normal; }
.msg.usuaria { background: #fff; border: 1px solid var(--linha); justify-self: start; border-bottom-left-radius: 4px; }
.msg.suporte { background: var(--petroleo-2); color: #fff; justify-self: end; border-bottom-right-radius: 4px; }
.msg.suporte small { color: #A9C6CC; }
.msg img { max-width: 100%; border-radius: 10px; margin-top: 8px; display: block; }

/* interruptor (funcionalidades) */
.interruptor { position: relative; width: 50px; height: 28px; flex: none; border: 0; padding: 0; background: #C8D3D6; border-radius: 999px; cursor: pointer; transition: background .15s; }
.interruptor::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.interruptor[aria-checked="true"] { background: var(--verde); }
.interruptor[aria-checked="true"]::after { transform: translateX(22px); }

/* novidades */
.novidade { border-left: 4px solid var(--petroleo-3); }
.novidade h3 { margin: 4px 0; font-size: 16px; }
.novidade p { margin: 4px 0; white-space: pre-wrap; }
.etiqueta { display: inline-block; font-size: 11.5px; font-weight: 700; background: #E5F4EC; color: #1E6B3E; padding: 2px 8px; border-radius: 999px; }

/* aviso (toast) */
.aviso { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); opacity: 0; background: var(--petroleo); color: #fff; padding: 12px 18px; border-radius: 12px; z-index: 70; transition: all .2s; pointer-events: none; max-width: calc(100% - 32px); font-size: 14.5px; box-shadow: 0 8px 30px rgba(0,0,0,.25); }
.aviso.mostrar { opacity: 1; transform: translate(-50%, 0); }
.aviso.erro-aviso { background: var(--vermelho); }

.carregando { padding: 40px; text-align: center; color: var(--suave); }

/* ---------------------------------------------------------- responsivo */
@media (max-width: 1180px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .sistema { grid-template-columns: 1fr; }
  .menu { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; z-index: 45; transform: translateX(-100%); transition: transform .2s, visibility .2s; visibility: hidden; }
  .menu.aberto { transform: none; visibility: visible; }
  .fundo-menu.aberto { display: block; position: fixed; inset: 0; background: rgba(1,42,51,.35); z-index: 44; }
  .so-celular { display: inline-block; }
  .conteudo { padding: 12px 16px 60px; }
  .topo { flex-wrap: wrap; }
  .topo h1 { font-size: 20px; }
  .g3, .g2 { grid-template-columns: 1fr; }
  .form-2 { grid-template-columns: 1fr; }
  .esconde-celular { display: none; }
  .filtros input { width: 100%; }
}
@media (max-width: 520px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .numero { padding: 12px 14px; }
  .numero .grande { font-size: 22px; }
  .topo-acao { margin-left: 0; width: 100%; }
  .topo-acao .btn { flex: 1; }
  .barra-h { grid-template-columns: 96px 1fr auto; }
  .ficha { grid-template-columns: 1fr; gap: 2px; }
  .ficha dd { margin-bottom: 8px; }
  td, th { padding: 10px 10px; }
  .grafico text { font-size: 16px; }
  .lista li { flex-wrap: wrap; }
  .lista .dir { margin-left: 26px; width: 100%; white-space: normal; }
  .lista li.alto .dir { margin-left: 0; }
}
