/* ============================================================
   GeoVillages — Design system base
   Tema CLARO: fondo blanco, acentos violeta/rosa/cian
   ============================================================ */

:root {
  --ink: #ffffff;        /* fondo de página */
  --surface: #f8fafc;    /* fondo alterno de secciones */
  --card: #ffffff;       /* tarjetas */
  --card-2: #f1f5f9;
  --line: #e2e8f0;       /* bordes */
  --text: #0f172a;       /* texto principal */
  --muted: #5b6478;      /* texto secundario */
  --faint: #94a3b8;

  --brand: #7c3aed;
  --brand-strong: #6d28d9;
  --pink: #ec4899;
  --cyan: #0e7490;
  --amber: #d97706;
  --green: #059669;
  --red: #dc2626;

  --grad-brand: linear-gradient(120deg, #7c3aed, #ec4899 55%, #f59e0b);
  --grad-cool: linear-gradient(120deg, #06b6d4, #7c3aed);

  --font-display: 'Space Grotesk', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow-card: 0 6px 24px rgba(15, 23, 42, .07);
  --shadow-pop: 0 20px 55px rgba(15, 23, 42, .18);
  --ring: 0 0 0 3px rgba(124, 58, 237, .25);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 .5em; color: var(--text); }
p { margin: 0 0 1em; }
a { color: var(--brand-strong); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

.grad-text {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  font: 600 15px/1 var(--font-body);
  border: 1px solid transparent; cursor: pointer;
  text-decoration: none !important; color: var(--text);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s;
  user-select: none; white-space: nowrap;
  background: transparent;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary {
  background: var(--grad-brand); color: #fff;
  box-shadow: 0 6px 18px rgba(124, 58, 237, .30);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(124, 58, 237, .38); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-strong); background: #faf5ff; }
.btn-danger { background: #fef2f2; border-color: #fecaca; color: var(--red); }
.btn-danger:hover { background: #fee2e2; }
.btn-sm { padding: 8px 16px; font-size: 13.5px; }
.btn-lg { padding: 16px 32px; font-size: 17px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.card-pad { padding: 28px; }

/* ---------- Formularios ---------- */
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 7px; color: var(--text); }
.field .hint { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.input, select.input, textarea.input {
  width: 100%; padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text); font: 400 15px var(--font-body);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--brand); box-shadow: var(--ring); }
.input::placeholder { color: var(--faint); }
.input-error { border-color: var(--red) !important; }
.field-error { color: var(--red); font-size: 13px; margin-top: 5px; }

/* ---------- Nav ---------- */
.gv-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.gv-nav-transparent { position: absolute; width: 100%; background: transparent; border-bottom-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.gv-nav-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.gv-logo { font: 700 21px var(--font-display); color: var(--text); text-decoration: none !important; display: flex; gap: 8px; align-items: center; }
.gv-logo em { font-style: normal; background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.gv-nav-links { display: flex; align-items: center; gap: 22px; }
.gv-nav-links > a { color: var(--muted); font-weight: 500; font-size: 14.5px; text-decoration: none !important; }
.gv-nav-links > a:hover { color: var(--text); }
.gv-nav-user { color: var(--brand-strong); font-weight: 600; font-size: 14px; }

/* ---------- Flashes ---------- */
.gv-flashes { margin-top: 16px; }
.gv-flashes:empty { display: none; }
.flash {
  padding: 13px 18px; border-radius: var(--radius-sm); margin-bottom: 10px;
  font-size: 14.5px; border: 1px solid; animation: flash-in .3s ease;
  overflow-wrap: anywhere;
}
@keyframes flash-in { from { opacity: 0; transform: translateY(-6px); } }
.flash a { font-weight: 600; }
.flash-success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.flash-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.flash-info { background: #ecfeff; border-color: #a5f3fc; color: #155e75; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font: 600 12px var(--font-body);
  padding: 4px 11px; border-radius: 999px;
  background: #f5f3ff; color: #6d28d9; border: 1px solid #ddd6fe;
}
.badge-green { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.badge-gray { background: #f1f5f9; color: var(--muted); border-color: var(--line); }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(15, 23, 42, .45);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: flash-in .18s ease;
}
.modal {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-pop);
  width: 100%; max-width: 460px; padding: 26px;
  animation: modal-in .22s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes modal-in { from { opacity: 0; transform: translateY(14px) scale(.97); } }
.modal h3 { margin-top: 0; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }

/* ---------- Footer ---------- */
.gv-footer { border-top: 1px solid var(--line); margin-top: 90px; background: var(--surface); }
.gv-footer-inner { padding: 34px 24px; display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; }
.gv-footer-brand { color: var(--muted); font-size: 14.5px; }
.gv-footer-links { display: flex; gap: 18px; }
.gv-footer-links a { color: var(--muted); font-size: 14px; }
.gv-footer-links a:hover { color: var(--text); }
.gv-footer-note { color: var(--faint); font-size: 13px; }

/* ---------- Utilidades ---------- */
.text-center { text-align: center; }
.muted { color: var(--muted); }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.hidden { display: none !important; }

@media (max-width: 640px) {
  .gv-nav-links { gap: 12px; }
  .gv-nav-links > a:not(.btn) { display: none; }
  .gv-nav-user { display: none; }
}
