/* components.css — cartões, tabelas, badges, botões, formulários, chips */

/* Cartões de resumo */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 13px; margin-bottom: 22px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 17px; }
.card.alert { border-color: #f0d6d6; }
.card .label { font-size: 12px; color: var(--muted); font-weight: 500; }
.card .value { font-size: 23px; margin-top: 4px; }
.card .sub { font-size: 11.5px; color: var(--faint); margin-top: 3px; }

/* Painel com tabela */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.panel .head { padding: 15px 18px; border-bottom: 1px solid var(--line); }
.panel .head h2 { font-size: 16px; }
.panel .body { padding: 6px 18px 12px; }

table { width: 100%; border-collapse: collapse; }
thead th { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--faint); text-align: left; font-weight: 600; padding: 12px 8px 10px; }
tbody td { padding: 12px 8px; border-top: 1px solid #f0eee8; font-size: 13.5px; vertical-align: top; }
td a.desc { font-weight: 500; color: var(--ink); }
td .meta { color: var(--muted); font-size: 12.5px; margin-top: 2px; }

/* Badges de situação */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge.pago, .badge.recebido { background: var(--success-soft); color: var(--success); }
.badge.a-vencer { background: var(--info-soft); color: var(--info); }
.badge.vencido { background: var(--danger-soft); color: var(--danger); }
.badge.agendado { background: var(--warn-soft); color: var(--warn); }
.badge.cancelado { background: #eee; color: #777; }
.badge.pagar { background: #eef0ed; color: #3b3f39; }
.badge.receber { background: var(--primary-soft); color: var(--primary-ink); }
.badge.on { background: var(--success-soft); color: var(--success); }
.badge.off { background: #eee; color: #777; }

/* Botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; transition: .12s; }
.btn:hover { text-decoration: none; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-primary { background: var(--primary); color: var(--ink); border-color: var(--primary); }
.btn-primary:hover { filter: brightness(.94); }
.btn-ghost:hover { background: var(--bg); }
.btn-link { background: none; border: none; color: var(--primary-ink); font-size: 13px; cursor: pointer; padding: 2px 6px; font-weight: 500; }
.btn-link:hover { text-decoration: underline; }
.btn-link.danger { color: var(--danger); }

/* Barra de ações / filtros */
.bar { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; flex-wrap: wrap; }
.bar .spacer { flex: 1; }
.chip { padding: 6px 13px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--muted); background: var(--surface); border: 1px solid var(--line); }
.chip:hover { text-decoration: none; background: var(--bg); }
.chip.active { background: var(--primary-soft); color: var(--primary-ink); border-color: var(--primary-soft); }

/* Formulários */
.form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; max-width: 720px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.field input, .field select, .field textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 14px; font-family: inherit; background: var(--surface); color: var(--ink); }
.field textarea { min-height: 80px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.field input:disabled { background: var(--bg); color: var(--muted); }
.field .hint { font-size: 12px; color: var(--faint); margin-top: 5px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.actions { display: flex; gap: 10px; margin-top: 20px; }
.empty { padding: 28px 6px; text-align: center; color: var(--muted); font-size: 14px; }
.notice { background: var(--warn-soft); color: var(--warn); border-radius: var(--radius-sm); padding: 12px 15px; margin-bottom: 18px; font-size: 13.5px; }
.notice ul { margin: 6px 0 0; padding-left: 18px; }

/* Login */
.login-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 30px; width: 100%; max-width: 380px; box-shadow: var(--shadow); }
.login-card .brand { justify-content: center; font-size: 17px; margin-bottom: 6px; }
.login-card .sub { text-align: center; color: var(--muted); font-size: 13.5px; margin: 0 0 22px; }
@media (max-width: 620px) { .row2 { grid-template-columns: 1fr; } }

/* ===== Tela de autenticação (split) ===== */
.auth-body { margin: 0; background: var(--bg); }
.auth-split { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 100vh; }
.auth-aside {
  position: relative; overflow: hidden; color: #fff; padding: 52px 56px;
  display: flex; flex-direction: column; justify-content: space-between;
  background-color: #0b1b30;
  background-image:
    radial-gradient(circle at 88% 12%, rgba(16,195,219,.20), transparent 42%),
    radial-gradient(circle at 10% 90%, rgba(255,181,71,.10), transparent 40%),
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: auto, auto, 30px 30px, 30px 30px;
}
.auth-aside .a-brand { display: flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.auth-aside .a-headline { font-size: 30px; line-height: 1.2; font-weight: 600; letter-spacing: -.02em; margin: 0 0 14px; max-width: 15ch; }
.auth-aside .a-lead { font-size: 14.5px; line-height: 1.6; color: #b8c2d4; max-width: 42ch; margin: 0 0 30px; }
.auth-feats { display: flex; flex-direction: column; gap: 16px; }
.auth-feat { display: flex; gap: 13px; align-items: flex-start; }
.auth-feat .ic { flex: none; width: 34px; height: 34px; border-radius: 10px; background: rgba(16,195,219,.14); display: flex; align-items: center; justify-content: center; }
.auth-feat .ic.ia { background: rgba(255,181,71,.16); }
.auth-feat .ic svg { width: 17px; height: 17px; }
.auth-feat h4 { margin: 0; font-size: 14.5px; font-weight: 600; color: #fff; }
.auth-feat p { margin: 2px 0 0; font-size: 13px; line-height: 1.45; color: #93a0b5; }
.auth-aside .a-foot { font-size: 12.5px; color: #7c889c; }
.auth-aside .a-foot b { color: #b8c2d4; font-weight: 500; }

.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 28px; }
.auth-form { width: 100%; max-width: 360px; }
.auth-form .a-mark-mobile { display: none; }
.auth-form h1 { font-size: 22px; margin: 0 0 4px; }
.auth-form .a-sub { color: var(--muted); font-size: 14px; margin: 0 0 26px; }
.auth-form .ftr { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 12px; color: var(--faint); line-height: 1.7; }
.auth-form .ftr a { color: var(--muted); }
.auth-badge { display: inline-flex; gap: 6px; align-items: center; background: var(--warn-soft); color: var(--warn); font-size: 12px; font-weight: 500; padding: 4px 11px; border-radius: 999px; margin-bottom: 18px; }

@media (max-width: 860px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-form .a-mark-mobile { display: flex; justify-content: center; margin-bottom: 18px; }
}
