/* Tokens e componentes compartilhados — copiado de Gsincroniza/painel/estilos.css pra
   manter consistência visual entre os produtos GConsult (ver gconsult-design-spec.md
   no repo Gsincroniza). Mudanças de design system devem ser replicadas nos dois
   lugares até existir um pacote de design compartilhado de verdade. */

:root {
  --bg-page-from: #eef2fb;
  --bg-page-to: #e3e9f7;
  --bg-card: #ffffff;
  --bg-subtle: #f6f8fc;
  --bg-header-cell: #f1f4fa;

  --brand-teal: #2dd4bf;
  --brand-blue: #2563eb;

  --primary: #1c2b4a;
  --primary-hover: #16223b;
  --primary-active: #0f1a2e;
  --accent-blue: #2f5aad;
  --accent-blue-soft: #eef2fb;

  --text-strong: #0f172a;
  --text-body: #1f2937;
  --text-muted: #475467;
  --text-subtle: #98a2b3;
  --text-on-primary: #ffffff;

  --border: #e4e8f0;
  --border-strong: #cbd3e1;
  --border-focus: #2f5aad;

  --danger: #b3261e;
  --danger-soft: #fdecec;
  --success: #1f7a4d;
  --success-soft: #e6f4ec;
  --warning: #8a5a00;
  --warning-soft: #fdf2d8;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  --font-sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-page-from: #0b1220;
    --bg-page-to: #0f172a;
    --bg-card: #131b2e;
    --bg-subtle: #182238;
    --bg-header-cell: #1b2540;
    --accent-blue-soft: #16203a;
    --text-strong: #f1f5f9;
    --text-body: #e2e8f0;
    --text-muted: #94a3b8;
    --text-subtle: #64748b;
    --border: #223051;
    --border-strong: #2c3d68;
    --danger-soft: #2a1414;
    --success-soft: #123023;
    --warning-soft: #2e2408;
  }
}

* { box-sizing: border-box; }

body {
  font-family: var(--font-sans);
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--bg-page-from) 0%, var(--bg-page-to) 100%);
  color: var(--text-body);
  line-height: 1.5;
}

button { font-family: inherit; }

.btn-primario {
  height: 40px;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--primary);
  color: var(--text-on-primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.btn-primario:hover { background: var(--primary-hover); box-shadow: var(--shadow-sm); }
.btn-primario:active { background: var(--primary-active); }
.btn-primario:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-ghost {
  height: 36px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.btn-ghost:hover { background: var(--bg-subtle); }

label.campo { display: block; margin-top: 16px; }
label.campo .rotulo { font-size: 13px; font-weight: 500; color: var(--text-body); display: block; margin-bottom: 6px; }
label.campo input {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--text-body);
  background: var(--bg-card);
}
label.campo input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(47, 90, 173, 0.18);
}

.marca { display: flex; align-items: center; gap: 10px; }
.marca svg { flex-shrink: 0; }
.marca-nome { font-weight: 600; font-size: 16px; color: var(--text-strong); line-height: 1.2; }
.marca-sub { font-size: 12px; color: var(--text-muted); }
.marca--central { flex-direction: column; text-align: center; }

.cartao {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.tag { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 600; }
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag--sucesso { background: var(--success-soft); color: var(--success); }
.tag--erro { background: var(--danger-soft); color: var(--danger); }
