@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
  --tc-bg: #07111f;
  --tc-surface: rgba(255,255,255,.88);
  --tc-line: rgba(148,163,184,.28);
  --tc-ink: #102033;
  --tc-muted: #64748b;
  --tc-brand: #0f766e;
  --tc-brand-2: #14b8a6;
  --tc-gold: #f4c95d;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  color: var(--tc-ink);
  background:
    radial-gradient(circle at top left, rgba(20,184,166,.22), transparent 34rem),
    radial-gradient(circle at top right, rgba(244,201,93,.18), transparent 34rem),
    linear-gradient(135deg, #eefcf8 0%, #f7fafc 38%, #eff6ff 100%);
}

.card {
  @apply rounded-[2rem] border p-5 md:p-6;
  background: var(--tc-surface);
  border-color: var(--tc-line);
  box-shadow: 0 18px 50px rgba(15, 23, 42, .08);
  backdrop-filter: blur(18px);
}
.card:hover { box-shadow: 0 24px 70px rgba(15,23,42,.11); }

.btn {
  @apply inline-flex items-center justify-center gap-2 rounded-2xl px-4 py-3 font-bold transition active:scale-95 disabled:opacity-50;
  min-height: 44px;
}
.btn svg { @apply shrink-0; width: 19px; height: 19px; stroke-width: 2.15; }
.btn.bg-emerald-600, .btn.bg-slate-900 {
  background: linear-gradient(135deg, #0f766e, #0b1220) !important;
  color: white !important;
  box-shadow: 0 14px 28px rgba(15,118,110,.24);
}
.btn.bg-slate-50 { background: rgba(255,255,255,.72) !important; border: 1px solid rgba(148,163,184,.26); color:#334155; }
.btn.bg-rose-50 { background:#fff1f2 !important; color:#be123c !important; border:1px solid #fecdd3; }

.input {
  @apply w-full rounded-2xl border px-4 py-3 outline-none transition;
  min-height: 46px;
  background: rgba(255,255,255,.92);
  border-color: rgba(148,163,184,.34);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}
.input:focus { border-color: #14b8a6; box-shadow: 0 0 0 4px rgba(20,184,166,.16); }
.label { @apply text-sm font-black text-slate-700 mb-1 block; letter-spacing: -.01em; }
.help { @apply text-xs text-slate-500 mt-1 block leading-relaxed; }

.alert { @apply flex gap-2 items-start rounded-2xl p-3 text-sm leading-relaxed; background:#fffbeb; color:#92400e; border:1px solid #fde68a; }
.ok { @apply flex gap-2 items-start rounded-2xl p-3 text-sm leading-relaxed; background:#ecfdf5; color:#065f46; border:1px solid #a7f3d0; }
.bar { @apply mt-2 h-3 bg-slate-200 rounded-full overflow-hidden; }
.bar > div { @apply h-full rounded-full; background: linear-gradient(90deg,#10b981,#14b8a6); }

header { box-shadow: 0 12px 36px rgba(15,23,42,.06); }
nav.card { background: rgba(255,255,255,.72); }
table thead { color:#64748b; }
table td, table th { padding-top:.65rem; padding-bottom:.65rem; }

.guidance {
  @apply rounded-3xl border p-4 text-sm leading-relaxed;
  background: linear-gradient(135deg, rgba(15,118,110,.10), rgba(244,201,93,.14));
  border-color: rgba(20,184,166,.25);
}

/* V1.6 - Correção de contraste: evita texto branco em fundo branco sem alterar funcionalidades. */
.card:not([class*="from-slate-950"]):not([class*="from-emerald-900"]) {
  color: #102033 !important;
}
.card:not([class*="from-slate-950"]):not([class*="from-emerald-900"]) p,
.card:not([class*="from-slate-950"]):not([class*="from-emerald-900"]) span,
.card:not([class*="from-slate-950"]):not([class*="from-emerald-900"]) td,
.card:not([class*="from-slate-950"]):not([class*="from-emerald-900"]) th,
.card:not([class*="from-slate-950"]):not([class*="from-emerald-900"]) small,
.card:not([class*="from-slate-950"]):not([class*="from-emerald-900"]) label {
  color: inherit;
}
.card:not([class*="from-slate-950"]):not([class*="from-emerald-900"]) .text-white:not(.btn):not(button),
.card:not([class*="from-slate-950"]):not([class*="from-emerald-900"]) [class*="text-white/"]:not(.btn):not(button) {
  color: #102033 !important;
}
button.btn.text-white,
.btn.text-white,
.bg-emerald-600.text-white,
.bg-slate-900.text-white {
  color: #ffffff !important;
}
.input,
.input[type="file"],
select.input,
textarea.input,
option {
  color: #102033 !important;
  background-color: rgba(255,255,255,.96) !important;
}
.input::placeholder { color: #94a3b8 !important; }
table { color: #102033; }
svg { color: currentColor; }
