/* ECOFIL TRACE · Estilos (paleta de marca) */
:root {
  --choco: #322E2C;
  --olive: #71874D;
  --lemon: #ADC064;
  --brown: #B2A88F;
  --bg: #F7F6F2;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Plus Jakarta Sans', 'Montserrat', -apple-system, sans-serif;
  background: var(--bg); color: var(--choco); line-height: 1.5;
}
h1,h2,h3 { font-family: 'Montserrat', sans-serif; }
a { color: var(--olive); }

/* Barra superior */
.topbar {
  background: var(--choco); color: #fff; padding: 12px 20px;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.topbar img { height: 30px; background: #fff; border-radius: 6px; padding: 3px 8px; }
.topbar a { color: #fff; text-decoration: none; font-size: 14px; opacity: .85; }
.topbar a:hover, .topbar a.activo { opacity: 1; color: var(--lemon); }
.topbar .salir { margin-left: auto; }

.contenedor { max-width: 1000px; margin: 0 auto; padding: 24px 16px; }

/* Tarjetas y tablas */
.card {
  background: #fff; border-radius: 12px; padding: 20px;
  box-shadow: 0 2px 8px rgba(50,46,44,.08); margin-bottom: 20px;
}
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; background: var(--olive); color: #fff; padding: 8px 10px; }
td { padding: 8px 10px; border-bottom: 1px solid #eee; }
tr:hover td { background: #F3F5EC; }

/* Formularios */
form.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
label { font-size: 13px; font-weight: 600; display: block; margin-bottom: 3px; }
input, select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid #ccc; border-radius: 8px;
  font-family: inherit; font-size: 14px;
}
.btn {
  background: var(--olive); color: #fff; border: none; border-radius: 8px;
  padding: 10px 18px; font-weight: 700; cursor: pointer; font-size: 14px;
}
.btn:hover { background: #5d7040; }
.btn-sec { background: var(--brown); }
.error { background: #fde8e8; color: #b02a2a; padding: 8px 12px; border-radius: 8px; margin: 10px 0; }
.ok { background: #ecf3dd; color: #4a5c2f; padding: 8px 12px; border-radius: 8px; margin: 10px 0; }

/* Chips y badges */
.badge {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700;
}
.badge-verde { background: var(--lemon); color: var(--choco); }
.badge-gris { background: #e5e2da; color: var(--choco); }

/* Login */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-card {
  background: #fff; padding: 36px; border-radius: 16px; text-align: center;
  box-shadow: 0 4px 20px rgba(50,46,44,.12); width: 320px;
}
.login-card h2 { margin: 14px 0 18px; font-size: 18px; }
.login-card input { margin-bottom: 12px; }
.login-card .btn { width: 100%; }

/* Página pública */
.pub-body { background:
  radial-gradient(1200px 380px at 50% -60px, #eef2e2 0%, rgba(238,242,226,0) 70%),
  var(--bg);
  min-height: 100vh;
}
.pub-top { text-align: center; padding: 40px 16px 8px; }
.eft-logo { display: inline-flex; align-items: center; gap: 8px; }
.eft-eco { height: 46px; display: block; }
.eft-squig { flex-shrink: 0; }
.eft-trace {
  font-family: 'Quicksand', 'Montserrat', sans-serif; font-weight: 700; font-size: 34px;
  color: #2b2724; letter-spacing: .5px; transform-origin: left center;
  animation: eft-trace-loop 5.4s ease-out .5s infinite;
}
@keyframes eft-trace-loop {
  0%   { opacity: 0; transform: translateX(-16px) scale(.7); }
  8%   { opacity: 1; transform: translateX(4px) scale(1.08); }
  14%  { opacity: 1; transform: translateX(0) scale(1); }
  46%  { opacity: 1; transform: translateX(0) scale(1); }
  54%  { opacity: 0; transform: translateX(-10px) scale(.9); }
  100% { opacity: 0; transform: translateX(-10px) scale(.9); }
}
@keyframes eft-foot {
  0%   { offset-distance: 0%; opacity: 0; }
  8%   { opacity: 1; }
  92%  { opacity: 1; }
  100% { offset-distance: 100%; opacity: 0; }
}
.pub-tagline { color: var(--olive); font-weight: 700; font-size: 15px; letter-spacing: .3px; margin-top: 10px; }
@media (prefers-reduced-motion: reduce) {
  .eft-trace { animation: none; opacity: 1; }
  .eft-squig circle[style] { animation: none !important; }
}

/* Landing interactivo */
.pub-wrap { max-width: 760px; margin: 0 auto; padding: 10px 16px 30px; }
.pub-intro { text-align: center; margin: 18px auto 26px; max-width: 620px; }
.pub-intro h2 { font-size: 26px; line-height: 1.25; margin-bottom: 12px; }
.pub-intro p { color: #5a554d; font-size: 16px; }
.stats-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 8px 0 30px;
}
.stat {
  background: #fff; border-radius: 14px; padding: 18px 10px; text-align: center;
  box-shadow: 0 2px 10px rgba(50,46,44,.07);
}
.stat-num { display: block; font-family: 'Montserrat', sans-serif; font-size: 30px; font-weight: 800; color: var(--olive); }
.stat-lbl { display: block; font-size: 12px; color: #7a756d; margin-top: 4px; }
.flow-cards { display: flex; align-items: stretch; justify-content: center; gap: 10px; margin: 6px 0 30px; }
.flow-card {
  flex: 1; background: #fff; border-radius: 16px; padding: 22px 18px; text-align: center;
  box-shadow: 0 2px 10px rgba(50,46,44,.07); transition: transform .18s ease, box-shadow .18s ease;
}
.flow-card:hover { transform: translateY(-4px); box-shadow: 0 10px 26px rgba(50,46,44,.14); }
.flow-badge {
  width: 42px; height: 42px; border-radius: 50%; color: #fff; font-weight: 800;
  font-family: 'Montserrat', sans-serif; font-size: 19px; display: flex; align-items: center;
  justify-content: center; margin: 0 auto 12px;
}
.flow-card h3 { font-size: 17px; margin-bottom: 6px; }
.flow-card p { font-size: 13.5px; color: #6a655d; line-height: 1.45; }
.flow-arrow { align-self: center; color: var(--brown); font-size: 26px; font-weight: 700; }
.buscar-card {
  background: #fff; border-radius: 18px; padding: 26px; text-align: center;
  box-shadow: 0 6px 24px rgba(50,46,44,.12); max-width: 460px; margin: 0 auto;
}
.buscar-card h3 { font-size: 18px; margin-bottom: 14px; }
.buscar-card form { display: flex; gap: 8px; }
.buscar-card input { flex: 1; }
.buscar-hint { font-size: 12.5px; color: #9a948a; margin-top: 12px; }
@media (max-width: 640px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .flow-cards { flex-direction: column; }
  .flow-arrow { transform: rotate(90deg); }
  .pub-intro h2 { font-size: 22px; }
}

.pub-card {
  max-width: 560px; margin: 22px auto 30px; background: #fff; border-radius: 16px;
  box-shadow: 0 6px 24px rgba(50,46,44,.12); padding: 28px;
}
.pct-centro {
  background: #fff; width: 104px; height: 104px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.pub-nota { margin-top: 16px; font-size: 13px; color: #7a756d; text-align: center; }
.pct-circulo {
  width: 130px; height: 130px; border-radius: 50%; margin: 0 auto 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--choco); font-family: 'Montserrat', sans-serif;
}
.pct-circulo .num { font-size: 34px; font-weight: 800; }
.pct-circulo .txt { font-size: 11px; font-weight: 600; letter-spacing: .5px; }
.dato { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid #f0efe9; font-size: 15px; }
.dato span:first-child { color: #7a756d; }
.dato span:last-child { font-weight: 700; }
.color-dot { display:inline-block; width:12px; height:12px; border-radius:50%; border:1px solid #ccc; margin-right:6px; vertical-align:-1px; }
.pub-footer { text-align: center; font-size: 13px; color: #7a756d; padding: 20px; }
.pub-footer a { color: var(--olive); font-weight: 700; }

/* Etiquetas QR para imprimir */
.etiqueta {
  width: 5cm; border: 1px dashed #999; padding: 8px; text-align: center;
  display: inline-block; margin: 4px; vertical-align: top; background: #fff;
}
.etiqueta .cod { font-weight: 800; font-family: monospace; font-size: 13px; }
.etiqueta .info { font-size: 10px; }
@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
  .etiqueta { border: 1px solid #ddd; }
}

/* Barra de usuario en el panel */
.usuario-actual { margin-left: auto; font-size: 13px; opacity: .9; display: flex; align-items: center; gap: 6px; }
.topbar .usuario-actual + .salir { margin-left: 14px; }
.rol-chip { background: var(--lemon); color: var(--choco); border-radius: 999px; padding: 1px 8px; font-size: 11px; font-weight: 700; }

/* Dashboard */
.resumen-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; text-align: center; }
.resumen-grid .big { font-size: 30px; font-weight: 800; color: var(--olive); }
.dos-columnas { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 720px) { .dos-columnas { grid-template-columns: 1fr; } }
.badge + .badge { margin-left: 6px; }

/* Login: separar campos */
.login-card input { margin-bottom: 12px; }

/* Pasos del landing publico */
.pasos-trace { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 10px; }
.pasos-trace > div {
  background: #F3F5EC; border-radius: 10px; padding: 12px; font-size: 13px; color: #4a463f; text-align: center;
}
.pasos-trace strong { color: var(--olive); }
