/* Passo 365 — Aniversariante do Dia (Automações). Só tokens do style.css,
   sem sombras: a hierarquia vem de linhas de 1px, como o resto do design
   v2. Tema escuro vem de graça pelos tokens. */

.an { color: var(--slate-900); font-size: 14px; line-height: 1.5; }
.an code { font-family: var(--font-mono); font-size: 12px; background: var(--bg-input); padding: 1px 5px; border-radius: 4px; }
.an-muted { color: var(--slate-500); }
.an-small { font-size: 12px; }
.an-ok { color: var(--green-600); font-size: 13px; font-weight: 600; }
.an-erro { color: var(--danger); font-size: 13px; font-weight: 600; }

.an-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.an-head h2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.an-head__acoes { display: flex; gap: 8px; flex: none; }

.an-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-bottom: 18px; }
.an-stat { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.an-stat__k { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--slate-500); }
.an-stat__v { font-size: 13.5px; font-weight: 600; color: var(--slate-900); overflow-wrap: anywhere; }
.an-stat__v.ok { color: var(--green-600); }
.an-stat__v.warn { color: var(--amber-900); }
.an-stat__v.erro { color: var(--danger); }
.an-stat__v.muted { color: var(--slate-500); }

.an-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 18px; align-items: start; }
@media (max-width: 1050px) { .an-grid { grid-template-columns: 1fr; } }
.an-col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

.an-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; min-width: 0; }
.an-card--resultado { border-color: var(--blue-100); background: var(--blue-50); }
.an-card__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.an-card__head h4 { margin: 0; font-size: 14.5px; font-weight: 600; }
.an-card__acoes { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.an-busca { min-height: 36px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--bg-input); color: var(--slate-900); font: inherit; font-size: 13px; width: 180px; }
.an-link { background: none; border: none; color: var(--blue-700); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 0; }
.an-link:hover { text-decoration: underline; }
.an-link:disabled { opacity: .5; cursor: default; }

.an-alerta { background: var(--amber-100); color: var(--amber-900); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 13px; margin-bottom: 12px; line-height: 1.5; }
.an-alerta--erro { background: var(--danger-bg); color: var(--danger); }
.an-alerta .p365-btn, .an-alerta .an-link { margin-left: 10px; color: inherit; }

.an-pill { display: inline-flex; align-items: center; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: var(--radius-sm); background: var(--bg-input); color: var(--slate-500); white-space: nowrap; }
.an-pill--ok { background: var(--green-50); color: var(--green-600); }
.an-chip { display: inline-flex; font-size: 12px; background: var(--bg-input); border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; color: var(--slate-700); margin: 0 6px 6px 0; }
.an-proximos { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border-soft); font-size: 12.5px; }

.an-hoje { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.an-hoje li { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 8px 10px; border: 1px solid var(--border-soft); border-radius: var(--radius-sm); }
.an-hoje li > div { flex: 1 1 160px; display: flex; flex-direction: column; font-size: 13px; min-width: 0; }

.an-thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; display: inline-flex; align-items: center; justify-content: center; background: var(--bg-input); border: 1px solid var(--border); flex: none; cursor: zoom-in; }
.an-thumb--vazia { border-style: dashed; cursor: default; font-size: 18px; color: var(--slate-400); }

.an-itens { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.an-item { display: grid; grid-template-columns: 22px auto 1fr; gap: 8px; align-items: baseline; font-size: 13px; padding: 6px 10px; border-radius: var(--radius-sm); background: var(--bg-card); border: 1px solid var(--border-soft); }
.an-item--falhou { background: var(--danger-bg); }
.an-item--pulado { color: var(--slate-600); }

.an-tabela td { vertical-align: middle; }
/* Ícones numa linha, "Enviar teste" embaixo — cabe na coluna sem rolagem.
   (Remover a arte fica no modal que abre ao clicar na miniatura.) */
.an-acoes { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-items: center; }
.an-acoes__icones { display: inline-flex; gap: 6px; flex: none; }
.an-acoes__teste { white-space: nowrap; }
.an-acoes .p365-btn { min-height: 30px; font-size: 11px; padding: 0 9px; }
.an-acoes .p365-btn--icon { width: 30px; font-size: 13px; }
.an-acoes label.p365-btn { cursor: pointer; }
.an-inativa td { opacity: .55; }
.an-aviso { font-size: 12px; font-weight: 500; margin-top: 3px; }
.an-aviso.ok { color: var(--green-600); }
.an-aviso.erro { color: var(--danger); }

.an-rodadas { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.an-rodada { width: 100%; display: grid; grid-template-columns: 130px auto 1fr 20px; gap: 10px; align-items: center; text-align: left; background: var(--bg-input); border: 1px solid var(--border-soft); border-radius: var(--radius-sm); padding: 8px 12px; font: inherit; font-size: 13px; color: var(--slate-800); cursor: pointer; }
.an-rodada:hover { border-color: var(--border-strong); }
.an-rodadas .an-itens { margin: 8px 0 4px 10px; }
.an-conf { margin: 0 0 6px 10px; }

.an-form { display: flex; flex-direction: column; gap: 14px; }
.an-form label, .an-modal form > label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--slate-700); }
.an-form input:not([type="checkbox"]), .an-form textarea, .an-form select,
.an-modal form > label input, .an-modal form > label textarea { font: inherit; font-size: 13.5px; font-weight: 400; color: var(--slate-900); background: var(--bg-input); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 8px 10px; min-height: 36px; width: 100%; box-sizing: border-box; }
.an-form textarea, .an-modal textarea { resize: vertical; line-height: 1.5; }
.an-form small, .an-modal small { font-weight: 400; color: var(--slate-500); font-size: 12px; line-height: 1.45; }
.an-check { flex-direction: row !important; align-items: center; flex-wrap: wrap; gap: 8px !important; }
.an-check input[type="time"] { width: 110px !important; }
.an-check small { flex-basis: 100%; }
.an-form__acoes { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 4px; }

.an-whats { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border-soft); border-radius: var(--radius-sm); margin-bottom: 10px; }
.an-whats > div { display: flex; flex-direction: column; font-size: 13px; }
.an-whats__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--slate-400); flex: none; }
.an-whats.ok .an-whats__dot { background: var(--green-600); box-shadow: 0 0 0 4px var(--green-50); }
.an-whats.erro .an-whats__dot { background: var(--danger); box-shadow: 0 0 0 4px var(--danger-bg); }

.an-campo-grupo { display: flex; gap: 8px; align-items: center; }
.an-campo-grupo input { flex: 1; min-width: 0; }
.an-campo-grupo .p365-btn { flex: none; }
.an-busca--larga { width: 100%; margin-bottom: 8px; box-sizing: border-box; }
.an-grupos { max-height: 320px; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.an-grupos > p { margin: 0; padding: 12px; }
.an-grupo { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--border-soft); cursor: pointer; font-size: 13px; font-weight: 400; }
.an-grupo:last-child { border-bottom: none; }
.an-grupo:hover { background: var(--bg-hover); }
.an-grupo input { width: auto; flex: none; }
.an-grupo > span { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }

.an-modal { max-width: 560px; }
.an-modal h3 { margin-top: 0; }
.an-modal form > label { margin-top: 8px; }
.an-abas { display: flex; gap: 6px; margin: 10px 0 14px; border-bottom: 1px solid var(--border); }
.an-aba { background: none; border: none; border-bottom: 2px solid transparent; padding: 8px 10px; font: inherit; font-size: 13px; font-weight: 600; color: var(--slate-500); cursor: pointer; margin-bottom: -1px; }
.an-aba.on { color: var(--slate-900); border-bottom-color: var(--primary); }
.an-import-res p { font-size: 14px; }
.an-import-res ul { max-height: 200px; overflow: auto; padding-left: 18px; }
.an-arte-grande { display: block; max-width: 100%; max-height: 60vh; margin: 10px auto; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.an-qr { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 10px 0; min-height: 120px; justify-content: center; text-align: center; }
.an-qr img { width: 260px; height: 260px; background: #fff; padding: 8px; border-radius: 8px; border: 1px solid var(--border); }
.an-btn-danger { background: var(--danger) !important; border-color: var(--danger) !important; color: #fff !important; }
