/* ============================================
   Alfalfas del Sur — Design tokens & base
   ============================================ */

:root {
  /* Brand */
  --green-900: #1a3a0e;
  --green-800: #2d5016;
  --green-700: #3d6b1f;
  --green-600: #4f8a2a;
  --green-500: #7cb342;
  --green-400: #9ccc65;
  --green-100: #e8f1da;
  --green-50:  #f3f7e9;

  --gold-700: #a87b3f;
  --gold-600: #c19259;
  --gold-500: #d4a574;
  --gold-300: #e7c8a0;
  --gold-100: #f5e8d4;

  --earth-700: #6d5635;
  --earth-500: #8b6f47;

  /* Neutrals */
  --bg:        #ffffff;
  --bg-cream:  #faf8f3;
  --bg-soft:   #f5f2e9;
  --line:      #e8e3d6;
  --line-soft: #efece3;
  --ink:       #1a1a1a;
  --ink-soft:  #4a4a44;
  --ink-mute:  #7a766c;

  /* Admin (dark) */
  --admin-bg:        #f6f5ef;
  --admin-surface:   #ffffff;
  --admin-sidebar:   #0e1f0a;
  --admin-sidebar-2: #16330e;
  --admin-line:      #e6e2d5;
  --admin-ink:       #131611;
  --admin-mute:      #6b6d63;

  /* Semantic */
  --ok:   #2f8a3e;
  --warn: #c98a0f;
  --bad:  #b53b2f;
  --info: #2563a3;

  /* Effects */
  --shadow-sm: 0 1px 2px rgba(20, 26, 12, 0.04), 0 1px 3px rgba(20, 26, 12, 0.06);
  --shadow-md: 0 4px 14px -2px rgba(20, 26, 12, 0.08), 0 2px 6px rgba(20, 26, 12, 0.05);
  --shadow-lg: 0 18px 40px -10px rgba(20, 26, 12, 0.18), 0 4px 12px rgba(20, 26, 12, 0.06);

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;

  --t-fast: 140ms cubic-bezier(.2,.7,.3,1);
  --t-med:  240ms cubic-bezier(.2,.7,.3,1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 16px;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; padding: 0; color: inherit; }
input, textarea, select { font-family: inherit; font-size: 1rem; color: inherit; }

img { display: block; max-width: 100%; }

.serif { font-family: 'Fraunces', 'Cormorant Garamond', Georgia, serif; font-feature-settings: "ss01"; letter-spacing: -0.01em; }

/* ============================================
   Public site — typography utilities
   ============================================ */

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green-700);
}

.h-hero {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: clamp(40px, 6.4vw, 92px);
  line-height: 0.98;
  letter-spacing: -0.025em;
}
.h-section {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: clamp(32px, 4.2vw, 56px);
  line-height: 1.02;
  letter-spacing: -0.02em;
}
.h-card {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.lede {
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.55;
  color: var(--ink-soft);
  text-wrap: pretty;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: -0.005em;
  transition: transform var(--t-fast), background var(--t-fast), color var(--t-fast), box-shadow var(--t-fast);
  white-space: nowrap;
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--green-800); color: #fff; }
.btn-primary:hover { background: var(--green-900); }
.btn-secondary { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn-secondary:hover { background: var(--bg-cream); }
.btn-ghost { color: var(--green-800); }
.btn-ghost:hover { background: var(--green-50); }
.btn-wa { background: #128c4a; color: #fff; }
.btn-wa:hover { background: #0e6b39; }

.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-lg { padding: 14px 26px; font-size: 16px; }

/* ============================================
   Header (public)
   ============================================ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(255,255,255,0.84);
  border-bottom: 1px solid var(--line-soft);
}
.site-header__inner {
  max-width: 1320px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  font-weight: 600; letter-spacing: -0.01em;
}
.brand__mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--green-800);
  display: grid; place-items: center; color: var(--green-400);
  flex-shrink: 0;
  position: relative; overflow: hidden;
}
.brand__name { font-family: 'Fraunces', Georgia, serif; font-size: 19px; font-weight: 500; letter-spacing: -0.01em; }
.brand__name span { color: var(--green-700); }

.nav {
  display: flex; gap: 4px; align-items: center;
}
.nav__link {
  padding: 8px 14px; border-radius: 999px;
  font-size: 14px; font-weight: 500;
  color: var(--ink-soft);
  transition: color var(--t-fast), background var(--t-fast);
}
.nav__link:hover { color: var(--ink); background: var(--bg-cream); }
.nav__link.is-active { color: var(--green-800); background: var(--green-50); }

.header-cta { display: flex; gap: 10px; align-items: center; }

.menu-toggle { display: none; }

@media (max-width: 980px) {
  .nav, .header-cta .btn-secondary { display: none; }
  .menu-toggle { display: inline-flex; padding: 10px; border-radius: 10px; }
  .menu-toggle:hover { background: var(--bg-cream); }
}

/* Mobile drawer */
.mob-drawer {
  position: fixed; inset: 0; z-index: 100;
  background: var(--bg-cream);
  padding: 24px;
  display: flex; flex-direction: column; gap: 6px;
  transform: translateX(100%);
  transition: transform var(--t-med);
}
.mob-drawer.open { transform: translateX(0); }
.mob-drawer__link {
  padding: 14px 4px; border-bottom: 1px solid var(--line-soft);
  font-family: 'Fraunces', Georgia, serif; font-size: 24px;
}

/* ============================================
   Section scaffolding
   ============================================ */
.section { padding: 96px 28px; }
.section--soft { background: var(--bg-cream); }
.section--dark { background: var(--green-900); color: var(--green-100); }
.container { max-width: 1320px; margin: 0 auto; }
.container--narrow { max-width: 980px; margin: 0 auto; }

@media (max-width: 700px) {
  .section { padding: 56px 18px; }
  .testi { padding: 56px 18px; }
  .footer { padding: 48px 18px 24px; }
  .hero__inner { padding: 0 18px 56px; }
  .hero { min-height: 80vh; }
  .site-header__inner { padding: 12px 16px; }
  .section-head { margin-bottom: 32px; }
  .filter-bar { padding: 12px; gap: 8px; }
  .filter-group { gap: 4px; }
  .filter-group__label { width: 100%; margin-bottom: 4px; }
  .chip { font-size: 12px; padding: 6px 11px; }
  .calc { padding: 18px; gap: 18px; }
  .calc__total { font-size: 44px; }
  .calc__breakdown { grid-template-columns: 1fr; gap: 8px; }
  .calc__result { padding: 22px; }
  .footer__top { gap: 28px; padding-bottom: 28px; }
  .testi__quote { font-size: 24px; min-height: 0; }
  .testi__quote { line-height: 1.3; }
}

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 32px; flex-wrap: wrap;
  margin-bottom: 56px;
}
.section-head__title { max-width: 720px; }
.section-head__aside { color: var(--ink-mute); max-width: 360px; font-size: 15px; }

/* ============================================
   Hero
   ============================================ */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex; align-items: flex-end;
  overflow: hidden;
  background: var(--green-900);
}
.hero__bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 80% at 50% 100%, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.15) 60%, transparent 100%),
    linear-gradient(180deg, rgba(26,58,14,0.5) 0%, rgba(26,58,14,0.1) 30%, rgba(26,58,14,0.7) 100%),
    linear-gradient(180deg, #5d8639 0%, #7cb342 35%, #6a9a35 55%, #d4a574 92%, #b07f3d 100%);
}
.hero__bg::before, .hero__bg::after {
  content: ""; position: absolute; left: 0; right: 0;
}
/* horizon */
.hero__bg::before {
  bottom: 22%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
}
/* alfalfa rows texture */
.hero__bg::after {
  inset: 0;
  background:
    repeating-linear-gradient(96deg, rgba(26,58,14,0.10) 0px, rgba(26,58,14,0.10) 2px, transparent 2px, transparent 14px),
    repeating-linear-gradient(86deg, rgba(255,255,255,0.04) 0px, rgba(255,255,255,0.04) 1px, transparent 1px, transparent 22px);
  mix-blend-mode: multiply;
  opacity: 0.6;
}
.hero__sun {
  position: absolute;
  right: 14%; top: 22%;
  width: 240px; height: 240px; border-radius: 50%;
  background: radial-gradient(circle, #fceabb 0%, #f5d186 35%, rgba(245,209,134,0.0) 70%);
  filter: blur(2px);
  opacity: 0.85;
}
.hero__bales {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 28%;
  background:
    radial-gradient(60px 36px at 14% 70%, #c08a4f 0%, #8b6334 70%, transparent 80%),
    radial-gradient(80px 48px at 28% 78%, #c79257 0%, #8b6334 70%, transparent 80%),
    radial-gradient(70px 42px at 42% 72%, #b88247 0%, #7c5828 70%, transparent 80%),
    radial-gradient(90px 54px at 60% 82%, #cf9a5d 0%, #8b6334 70%, transparent 80%),
    radial-gradient(75px 45px at 76% 76%, #b88247 0%, #7c5828 70%, transparent 80%),
    radial-gradient(85px 50px at 90% 80%, #c79257 0%, #8b6334 70%, transparent 80%),
    linear-gradient(180deg, transparent 0%, rgba(26,58,14,0.65) 100%);
}
.hero__inner {
  position: relative;
  width: 100%;
  max-width: 1320px; margin: 0 auto;
  padding: 0 28px 80px;
  color: #fff;
}
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 14px; border-radius: 999px;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.16);
  font-size: 12.5px; font-weight: 500; letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 28px;
}
.hero__eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green-400); box-shadow: 0 0 0 4px rgba(124,179,66,0.25); }

.hero h1 { color: #fff; text-wrap: balance; max-width: 1000px; }
.hero h1 em { font-style: italic; color: var(--gold-300); font-weight: 400; }

.hero__sub {
  margin-top: 22px;
  max-width: 560px;
  font-size: 18px; line-height: 1.5;
  color: rgba(255,255,255,0.86);
}
.hero__cta { margin-top: 36px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero .btn-secondary { background: rgba(255,255,255,0.08); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.22); }
.hero .btn-secondary:hover { background: rgba(255,255,255,0.16); }

/* Counters strip */
.counters {
  background: var(--bg-cream);
  border-bottom: 1px solid var(--line-soft);
}
.counters__grid {
  max-width: 1320px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 0 28px;
}
.counter {
  padding: 44px 28px;
  border-left: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 4px;
}
.counter:first-child { border-left: none; }
.counter__value {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--green-800);
}
.counter__value sup { font-size: 0.5em; color: var(--gold-600); margin-left: 4px; font-weight: 500; }
.counter__label { color: var(--ink-mute); font-size: 14px; }
@media (max-width: 800px) {
  .counters__grid { grid-template-columns: repeat(2, 1fr); }
  .counter { padding: 28px 18px; }
  .counter:nth-child(odd) { border-left: none; }
  .counter:nth-child(3), .counter:nth-child(4) { border-top: 1px solid var(--line); }
}

/* ============================================
   Quiénes Somos — text + image + timeline
   ============================================ */
.about {
  display: grid; grid-template-columns: 1.2fr 1fr;
  gap: 80px; align-items: start;
}
.about__image {
  aspect-ratio: 4/5;
  border-radius: var(--r-lg);
  background:
    linear-gradient(160deg, rgba(26,58,14,0.0), rgba(26,58,14,0.5)),
    repeating-linear-gradient(105deg, #5d8639 0px, #5d8639 8px, #6a9a35 8px, #6a9a35 16px);
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-md);
}
.about__image::after {
  content: "campo de alfalfa, 4° corte"; position: absolute; left: 18px; bottom: 18px;
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px;
  color: rgba(255,255,255,0.7); padding: 6px 10px;
  background: rgba(0,0,0,0.3); border-radius: 6px; backdrop-filter: blur(4px);
}
.about__values {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px;
  margin-top: 36px;
}
.value-tile {
  padding: 18px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.value-tile__icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--green-50); color: var(--green-800);
  margin-bottom: 12px;
}
.value-tile h4 { margin: 0 0 4px; font-size: 15px; }
.value-tile p { margin: 0; font-size: 13.5px; color: var(--ink-mute); }

@media (max-width: 900px) { .about { grid-template-columns: 1fr; gap: 40px; } }

/* Timeline */
.timeline {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 0;
  margin-top: 80px;
  position: relative;
}
.timeline::before {
  content: ""; position: absolute; left: 5%; right: 5%; top: 28px; height: 2px;
  background: var(--line);
}
.t-step {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 0 14px; position: relative;
}
.t-step__dot {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--bg-cream);
  border: 2px solid var(--green-800);
  color: var(--green-800);
  display: grid; place-items: center;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500; font-size: 18px;
  position: relative; z-index: 1;
}
.t-step__year { font-weight: 600; font-size: 13px; color: var(--green-800); margin-top: 14px; }
.t-step__label { font-size: 13.5px; color: var(--ink-soft); margin-top: 4px; text-wrap: balance; }

@media (max-width: 800px) {
  .timeline { grid-template-columns: 1fr; gap: 18px; }
  .timeline::before { display: none; }
  .t-step { flex-direction: row; text-align: left; gap: 16px; align-items: center; padding: 0; }
  .t-step__year { margin-top: 0; }
}

/* ============================================
   Servicios — cards
   ============================================ */
.services-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
}
@media (max-width: 1100px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .services-grid { grid-template-columns: 1fr; } }

.svc-card {
  position: relative;
  padding: 28px;
  border-radius: var(--r-lg);
  background: var(--bg);
  border: 1px solid var(--line);
  transition: transform var(--t-med), border-color var(--t-med), box-shadow var(--t-med);
  display: flex; flex-direction: column; gap: 14px;
  min-height: 280px;
}
.svc-card:hover {
  transform: translateY(-4px);
  border-color: var(--green-700);
  box-shadow: var(--shadow-lg);
}
.svc-card__icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--green-800); color: var(--green-400);
  display: grid; place-items: center;
}
.svc-card__title { font-family: 'Fraunces', Georgia, serif; font-size: 22px; line-height: 1.2; letter-spacing: -0.01em; }
.svc-card__desc { font-size: 14px; color: var(--ink-mute); margin-top: -6px; }
.svc-card__tags { margin-top: auto; display: flex; flex-wrap: wrap; gap: 6px; }
.svc-card__tag {
  font-size: 12px; color: var(--green-800);
  padding: 4px 10px; border-radius: 999px;
  background: var(--green-50);
}

/* Maquinaria strip */
.maq-grid { margin-top: 56px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 900px) { .maq-grid { grid-template-columns: repeat(2, 1fr); } }
.maq-card {
  background: var(--bg-cream);
  padding: 20px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  display: flex; gap: 14px; align-items: flex-start;
}
.maq-card__icon { width: 40px; height: 40px; flex-shrink: 0; border-radius: 10px; background: #fff; display: grid; place-items: center; color: var(--green-800); }
.maq-card h5 { margin: 0; font-size: 14.5px; }
.maq-card p { margin: 4px 0 0; font-size: 12.5px; color: var(--ink-mute); }

/* ============================================
   Catálogo de fardos
   ============================================ */
.filter-bar {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 16px;
  display: flex; gap: 12px; flex-wrap: wrap;
  align-items: center;
  margin-bottom: 28px;
}
.filter-group { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.filter-group__label { font-size: 12px; color: var(--ink-mute); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; margin-right: 6px; }
.chip {
  padding: 7px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 500;
  background: var(--bg-cream); color: var(--ink-soft);
  transition: background var(--t-fast), color var(--t-fast);
  cursor: pointer;
}
.chip:hover { background: var(--green-50); color: var(--green-800); }
.chip.is-active { background: var(--green-800); color: #fff; }
.chip.is-active:hover { background: var(--green-900); }

.products-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 1000px) { .products-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .products-grid { grid-template-columns: 1fr; } }

.product-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform var(--t-med), box-shadow var(--t-med);
}
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.product-card__media {
  height: 180px; position: relative;
  background: linear-gradient(180deg, #f5e8d4 0%, #d4a574 100%);
  display: grid; place-items: center;
  overflow: hidden;
}
.product-card__media--small {
  background: repeating-linear-gradient(0deg, #c19259 0px, #c19259 6px, #b07f3d 6px, #b07f3d 12px);
}
.product-card__media--round {
  background: radial-gradient(circle at 50% 60%, #d4a574 0%, #b07f3d 60%, #8b6334 100%);
}
.product-card__media--mega {
  background:
    linear-gradient(180deg, transparent 60%, rgba(26,58,14,0.2) 100%),
    repeating-linear-gradient(90deg, #c79257 0px, #c79257 14px, #a87b3f 14px, #a87b3f 28px);
}
.product-card__shape {
  width: 90px; height: 70px;
  background: rgba(255,255,255,0.18);
  border-radius: 14px;
  display: grid; place-items: center;
  color: rgba(255,255,255,0.92);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  backdrop-filter: blur(4px);
}
.product-card__media--round .product-card__shape { border-radius: 50%; }
.product-card__badges {
  position: absolute; top: 12px; left: 12px;
  display: flex; gap: 6px; flex-wrap: wrap;
}
.p-badge {
  background: rgba(26, 58, 14, 0.85);
  color: #fff;
  font-size: 11px; font-weight: 600;
  padding: 4px 10px; border-radius: 999px;
  backdrop-filter: blur(4px);
}
.p-badge--gold { background: rgba(168, 123, 63, 0.92); }

.product-card__body { padding: 18px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.product-card__title { font-family: 'Fraunces', Georgia, serif; font-size: 19px; line-height: 1.2; letter-spacing: -0.01em; }
.product-card__specs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 12px 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.spec__label { font-size: 11px; color: var(--ink-mute); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.spec__value { font-size: 14px; font-weight: 600; color: var(--ink); margin-top: 2px; }
.product-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; }
.product-card__price { font-family: 'Fraunces', Georgia, serif; font-size: 22px; font-weight: 500; color: var(--green-800); letter-spacing: -0.01em; }
.product-card__price small { font-size: 11px; color: var(--ink-mute); font-family: 'Inter', sans-serif; font-weight: 500; display: block; }
.product-card__stock { font-size: 12px; color: var(--ink-mute); display: flex; align-items: center; gap: 6px; }
.product-card__stock .stock-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.product-card__stock.low .stock-dot { background: var(--warn); }
.product-card__stock.out .stock-dot { background: var(--bad); }

/* ============================================
   Calculadora
   ============================================ */
.calc {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 40px;
  box-shadow: var(--shadow-md);
}
@media (max-width: 900px) { .calc { grid-template-columns: 1fr; padding: 24px; } }
.calc__field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.calc__field label { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.calc__select, .calc__input {
  padding: 12px 14px; border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--bg-cream);
  font-size: 15px;
  transition: border var(--t-fast), background var(--t-fast);
}
.calc__select:focus, .calc__input:focus { outline: none; border-color: var(--green-700); background: var(--bg); }
.animal-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.animal-tile {
  padding: 14px; border-radius: var(--r-sm);
  background: var(--bg-cream);
  border: 1px solid var(--line);
  text-align: left;
  display: flex; gap: 10px; align-items: center;
  font-size: 13.5px; font-weight: 500;
  transition: border var(--t-fast), background var(--t-fast);
}
.animal-tile:hover { background: var(--green-50); border-color: var(--green-600); }
.animal-tile.is-active { background: var(--green-800); color: #fff; border-color: var(--green-800); }
.animal-tile.is-active .animal-tile__rate { color: var(--gold-300); }
.animal-tile__icon { width: 28px; height: 28px; flex-shrink: 0; }
.animal-tile__main { display: flex; flex-direction: column; }
.animal-tile__rate { font-size: 11px; color: var(--ink-mute); font-weight: 500; }

.calc__result {
  background: var(--green-900);
  color: var(--green-100);
  border-radius: var(--r-lg);
  padding: 32px;
  display: flex; flex-direction: column; gap: 20px;
}
.calc__result-headline { font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-300); }
.calc__total {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 64px; font-weight: 500; line-height: 1; letter-spacing: -0.025em;
  color: #fff;
}
.calc__total small { display: block; font-size: 14px; color: var(--green-400); font-family: 'Inter', sans-serif; font-weight: 500; letter-spacing: 0; margin-top: 8px; }

.calc__breakdown { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.12); }
.calc__break-row { display: flex; flex-direction: column; gap: 4px; }
.calc__break-row strong { font-family: 'Fraunces', Georgia, serif; font-size: 22px; color: #fff; font-weight: 500; }
.calc__break-row span { font-size: 12px; color: rgba(255,255,255,0.6); }

/* ============================================
   Galería
   ============================================ */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 160px;
  gap: 12px;
}
.gal-tile {
  border-radius: var(--r-md);
  overflow: hidden;
  position: relative;
  background: var(--green-700);
  cursor: pointer;
  transition: transform var(--t-med);
}
.gal-tile:hover { transform: scale(1.015); }
.gal-tile__caption {
  position: absolute; left: 12px; bottom: 10px;
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px;
  color: rgba(255,255,255,0.78);
  padding: 4px 8px; background: rgba(0,0,0,0.35); border-radius: 6px;
}
.gal-tile--w2 { grid-column: span 2; }
.gal-tile--h2 { grid-row: span 2; }
.gal-1 { background: linear-gradient(135deg, #5d8639 0%, #7cb342 100%); }
.gal-2 { background: linear-gradient(135deg, #2d5016 0%, #6a9a35 100%); }
.gal-3 { background: linear-gradient(160deg, #d4a574 0%, #8b6334 100%); }
.gal-4 { background: linear-gradient(135deg, #6d5635 0%, #b07f3d 100%); }
.gal-5 { background: repeating-linear-gradient(95deg, #7cb342 0px, #7cb342 8px, #5d8639 8px, #5d8639 16px); }
.gal-6 { background: linear-gradient(180deg, #f5e8d4 0%, #c19259 100%); }
.gal-7 { background: linear-gradient(135deg, #1a3a0e 0%, #5d8639 100%); }
@media (max-width: 800px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .gal-tile--w2 { grid-column: span 1; }
}

/* ============================================
   Testimonios
   ============================================ */
.testi {
  background: var(--green-900);
  color: #fff;
  padding: 96px 28px;
}
.testi__inner { max-width: 1100px; margin: 0 auto; }
.testi__quote {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.25; letter-spacing: -0.015em;
  font-weight: 400;
  text-wrap: balance;
  min-height: 200px;
}
.testi__quote::before { content: "“"; color: var(--gold-500); font-size: 1.4em; line-height: 0.6; vertical-align: -0.05em; margin-right: 4px; }
.testi__author { margin-top: 28px; display: flex; align-items: center; gap: 16px; }
.testi__avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--gold-500); color: var(--green-900); display: grid; place-items: center; font-weight: 600; font-family: 'Fraunces', Georgia, serif; }
.testi__author-name { font-weight: 600; }
.testi__author-meta { font-size: 13px; color: rgba(255,255,255,0.6); }
.testi__dots { display: flex; gap: 6px; margin-top: 32px; }
.testi__dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.25); cursor: pointer; transition: background var(--t-fast), transform var(--t-fast); }
.testi__dot.is-active { background: var(--gold-500); transform: scale(1.6); }

.testi__nav { display: flex; gap: 8px; margin-top: 28px; }
.testi__nav-btn {
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.06);
  display: grid; place-items: center; color: #fff;
  transition: background var(--t-fast);
}
.testi__nav-btn:hover { background: rgba(255,255,255,0.14); }

/* ============================================
   Contacto
   ============================================ */
.contact-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

.form { display: flex; flex-direction: column; gap: 14px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .form__row { grid-template-columns: 1fr; } }
.form__field { display: flex; flex-direction: column; gap: 6px; }
.form__field label { font-size: 12px; font-weight: 600; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.06em; }
.form__input, .form__select, .form__textarea {
  padding: 14px 16px; border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--bg);
  font-size: 15px;
  transition: border var(--t-fast);
}
.form__input:focus, .form__select:focus, .form__textarea:focus { outline: none; border-color: var(--green-700); box-shadow: 0 0 0 4px var(--green-50); }
.form__textarea { resize: vertical; min-height: 110px; font-family: inherit; }

.form-toast {
  background: var(--green-50); color: var(--green-800);
  padding: 14px 16px; border-radius: var(--r-sm);
  border: 1px solid var(--green-400);
  font-size: 14px; font-weight: 500;
  display: flex; align-items: center; gap: 10px;
}

.contact-info { display: flex; flex-direction: column; gap: 18px; }
.contact-info__item { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: var(--r-md); background: var(--bg-cream); border: 1px solid var(--line-soft); }
.contact-info__icon { width: 40px; height: 40px; flex-shrink: 0; border-radius: 10px; background: var(--green-800); color: var(--green-400); display: grid; place-items: center; }
.contact-info__label { font-size: 12px; color: var(--ink-mute); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.contact-info__value { font-size: 15.5px; font-weight: 500; margin-top: 2px; }
.contact-info__value small { display: block; font-weight: 400; color: var(--ink-mute); margin-top: 2px; font-size: 13px; }

.map {
  margin-top: 14px;
  height: 220px; border-radius: var(--r-md);
  background:
    radial-gradient(circle at 40% 50%, rgba(255,255,255,0.4) 0%, transparent 30%),
    repeating-linear-gradient(45deg, #e8f1da 0px, #e8f1da 30px, #dce8c8 30px, #dce8c8 60px);
  position: relative; overflow: hidden;
  border: 1px solid var(--line);
}
.map__pin {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -100%);
  width: 32px; height: 32px; border-radius: 50% 50% 50% 0;
  background: var(--bad);
  transform-origin: bottom left;
  transform: translate(-50%, -100%) rotate(-45deg);
  box-shadow: var(--shadow-md);
}
.map__pin::after { content: ""; position: absolute; inset: 8px; background: #fff; border-radius: 50%; }
.map__label { position: absolute; bottom: 16px; left: 16px; background: #fff; padding: 8px 12px; border-radius: 8px; font-size: 12px; font-weight: 600; box-shadow: var(--shadow-sm); }

/* ============================================
   Footer
   ============================================ */
.footer {
  background: var(--green-900);
  color: rgba(255,255,255,0.7);
  padding: 64px 28px 28px;
}
.footer__inner { max-width: 1320px; margin: 0 auto; }
.footer__top { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.1); }
@media (max-width: 800px) { .footer__top { grid-template-columns: 1fr 1fr; } }
.footer h5 { color: #fff; font-size: 14px; margin: 0 0 14px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; }
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.footer ul a:hover { color: #fff; }
.footer__brand { color: #fff; }
.footer__brand .brand__mark { background: rgba(255,255,255,0.1); }
.footer__brand p { font-size: 14px; margin: 14px 0 0; max-width: 280px; }
.footer__bottom { padding-top: 24px; display: flex; justify-content: space-between; font-size: 13px; flex-wrap: wrap; gap: 12px; }
.footer__socials { display: flex; gap: 8px; margin-top: 16px; }
.footer__socials a { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.08); display: grid; place-items: center; transition: background var(--t-fast); }
.footer__socials a:hover { background: rgba(255,255,255,0.16); color: #fff; }

/* ============================================
   Floating WhatsApp
   ============================================ */
.wa-fab {
  position: fixed;
  right: 22px; bottom: 22px;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: #128c4a;
  color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 10px 26px -6px rgba(18, 140, 74, 0.65), 0 4px 10px rgba(0,0,0,0.15);
  z-index: 60;
  transition: transform var(--t-fast);
}
.wa-fab:hover { transform: scale(1.08); }
.wa-fab::before {
  content: ""; position: absolute; inset: -6px; border-radius: 50%;
  background: rgba(18, 140, 74, 0.45);
  animation: pulse 2s ease-out infinite;
  z-index: -1;
}
@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* ============================================
   Admin
   ============================================ */
.admin {
  display: grid; grid-template-columns: 248px 1fr;
  min-height: 100vh;
  background: var(--admin-bg);
}
@media (max-width: 900px) { .admin { grid-template-columns: 1fr; } }

.sidebar-backdrop { display: none; }
.topbar__menu { display: none; }

@media (max-width: 900px) {
  .sidebar {
    position: fixed !important;
    top: 0; left: 0;
    width: 100%; max-width: 100%;
    height: 100vh !important;
    z-index: 110;
    transform: translateX(-100%);
    transition: transform 240ms cubic-bezier(.2,.7,.3,1);
    overflow-y: auto;
  }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar-backdrop { display: none !important; }
  .sidebar__close { display: flex; }

  .topbar__menu { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; color: var(--admin-ink); }
  .topbar__menu:hover, .topbar__menu:active { background: var(--admin-bg); }
  .topbar { padding: 10px 14px; gap: 8px; }
  .topbar__search { display: none; }
  .user-chip__name, .user-chip__role { display: none; }
  .user-chip { padding: 3px; }

  .page { padding: 18px 14px; }
  .page__title { font-size: 24px; }
  .page__header { gap: 10px; }
  .page__actions { flex-wrap: wrap; }

  .kpi-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
  .kpi { padding: 14px; }
  .kpi__value { font-size: 22px; }

  .grid-2, .grid-3 { grid-template-columns: 1fr; }

  .panel { padding: 16px; }
  .panel__head { flex-wrap: wrap; gap: 10px; }
  .panel__head > div:last-child { flex-wrap: wrap; }

  .bignum { font-size: 32px; }

  .modal { padding: 20px; }
}

.sidebar {
  background: var(--admin-sidebar);
  color: rgba(255,255,255,0.7);
  padding: 22px 14px;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
@media (max-width: 900px) { .sidebar { position: static; height: auto; } }

.sidebar__close {
  display: none;
  margin-left: auto;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px; flex-shrink: 0;
  border-radius: 8px;
  color: rgba(255,255,255,0.6);
}
.sidebar__close:hover { background: rgba(255,255,255,0.1); color: #fff; }

.sidebar__brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 22px; border-bottom: 1px solid rgba(255,255,255,0.08); margin-bottom: 18px; color: #fff; }
.sidebar__brand .brand__mark { background: var(--green-700); color: var(--green-100); width: 34px; height: 34px; }
.sidebar__brand-name { font-family: 'Fraunces', Georgia, serif; font-size: 17px; font-weight: 500; letter-spacing: -0.01em; line-height: 1; }
.sidebar__brand-meta { font-size: 11px; color: rgba(255,255,255,0.5); margin-top: 3px; }

.sidebar__section { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.12em; color: rgba(255,255,255,0.4); padding: 12px 10px 6px; }
.sidebar__link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 8px;
  font-size: 13.5px; font-weight: 500;
  color: rgba(255,255,255,0.72);
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
  width: 100%; text-align: left;
}
.sidebar__link:hover { background: rgba(255,255,255,0.06); color: #fff; }
.sidebar__link.is-active { background: var(--green-700); color: #fff; }
.sidebar__link.is-active .sidebar__badge { background: var(--green-900); color: #fff; }
.sidebar__badge { margin-left: auto; font-size: 10.5px; padding: 1px 7px; border-radius: 999px; background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.8); }

.sidebar__footer { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.08); }
.sidebar__exit { display: flex; gap: 10px; padding: 10px; border-radius: 8px; font-size: 13px; color: rgba(255,255,255,0.6); width: 100%; text-align: left; }
.sidebar__exit:hover { background: rgba(255,255,255,0.06); color: #fff; }

.admin__main { display: flex; flex-direction: column; min-width: 0; }

.topbar {
  background: var(--admin-surface);
  border-bottom: 1px solid var(--admin-line);
  padding: 14px 28px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  position: sticky; top: 0; z-index: 30;
}
.topbar__search {
  flex: 1; max-width: 420px;
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px; border-radius: 999px;
  background: var(--admin-bg);
  border: 1px solid var(--admin-line);
  color: var(--admin-mute);
}
.topbar__search input { flex: 1; border: none; background: none; outline: none; font-size: 14px; }
.topbar__actions { display: flex; align-items: center; gap: 12px; }
.icon-btn { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: var(--admin-mute); transition: background var(--t-fast), color var(--t-fast); position: relative; }
.icon-btn:hover { background: var(--admin-bg); color: var(--admin-ink); }
.icon-btn .badge { position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); border: 2px solid var(--admin-surface); }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 4px 12px 4px 4px; border-radius: 999px; background: var(--admin-bg); border: 1px solid var(--admin-line); }
.user-chip__avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--green-800); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 600; }
.user-chip__name { font-size: 13px; font-weight: 600; }
.user-chip__role { font-size: 11px; color: var(--admin-mute); }

.page { padding: 28px; max-width: 1480px; width: 100%; margin: 0 auto; }
.page__header { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 24px; flex-wrap: wrap; }
.page__title { font-family: 'Fraunces', Georgia, serif; font-size: 32px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; }
.page__sub { color: var(--admin-mute); font-size: 14px; margin-top: 4px; }
.page__actions { display: flex; gap: 10px; }

/* KPIs */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 22px; }
.kpi {
  background: var(--admin-surface);
  border: 1px solid var(--admin-line);
  border-radius: var(--r-md);
  padding: 16px;
  display: flex; flex-direction: column; gap: 8px;
  position: relative; overflow: hidden;
}
.kpi__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.kpi__icon { width: 32px; height: 32px; border-radius: 9px; background: var(--green-50); color: var(--green-800); display: grid; place-items: center; }
.kpi__delta { font-size: 11.5px; font-weight: 600; padding: 3px 8px; border-radius: 999px; display: flex; align-items: center; gap: 3px; }
.kpi__delta.up { background: #e8f3e0; color: var(--ok); }
.kpi__delta.down { background: #fae5e2; color: var(--bad); }
.kpi__delta.flat { background: var(--admin-bg); color: var(--admin-mute); }
.kpi__label { font-size: 13px; color: var(--admin-mute); }
.kpi__value { font-family: 'Fraunces', Georgia, serif; font-size: 26px; font-weight: 500; letter-spacing: -0.02em; line-height: 1; white-space: nowrap; }
.kpi__hint { font-size: 11.5px; color: var(--admin-mute); }

/* Cards / panels */
.panel {
  background: var(--admin-surface);
  border: 1px solid var(--admin-line);
  border-radius: var(--r-md);
  padding: 20px;
}
.panel__head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 14px; }
.panel__title { font-size: 15px; font-weight: 600; }
.panel__sub { font-size: 12px; color: var(--admin-mute); }

.grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 1100px) { .grid-2 { grid-template-columns: 1fr; } }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 1100px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 700px) { .grid-3 { grid-template-columns: 1fr; } }

/* Table */
.table-wrap { width: 100%; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--admin-mute); padding: 12px 14px; border-bottom: 1px solid var(--admin-line); white-space: nowrap; }
.table td { padding: 14px; border-bottom: 1px solid var(--admin-line); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background var(--t-fast); }
.table tbody tr:hover { background: var(--admin-bg); }
.table .num { font-variant-numeric: tabular-nums; }
.table .money { font-variant-numeric: tabular-nums; font-weight: 600; }

/* Badges */
.b {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600;
}
.b-ok   { background: #e8f3e0; color: var(--ok); }
.b-warn  { background: #fbecc7; color: var(--warn); }
.b-warn2 { background: #fff3e0; color: #e65100; }
.b-bad  { background: #fae5e2; color: var(--bad); }
.b-info { background: #e1edf8; color: var(--info); }
.b-mute { background: var(--admin-bg); color: var(--admin-mute); }
.b-gold { background: var(--gold-100); color: var(--gold-700); }
.b-green { background: var(--green-50); color: var(--green-800); }

.dot { width: 7px; height: 7px; border-radius: 50%; }
.dot-ok { background: var(--ok); }
.dot-warn { background: var(--warn); }
.dot-bad { background: var(--bad); }

/* Alerts list */
.alert {
  display: flex; gap: 12px; padding: 12px 0;
  border-bottom: 1px solid var(--admin-line);
  font-size: 13.5px;
}
.alert:last-child { border-bottom: none; }
.alert__icon { width: 32px; height: 32px; flex-shrink: 0; border-radius: 9px; display: grid; place-items: center; }
.alert__icon.warn { background: #fbecc7; color: var(--warn); }
.alert__icon.info { background: #e1edf8; color: var(--info); }
.alert__icon.bad  { background: #fae5e2; color: var(--bad); }
.alert__title { font-weight: 600; font-size: 13.5px; }
.alert__meta { font-size: 12px; color: var(--admin-mute); margin-top: 2px; }

/* Login */
.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg-cream);
}
@media (max-width: 900px) { .login { grid-template-columns: 1fr; } }
.login__left {
  background: var(--green-900);
  color: #fff;
  padding: 56px;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.login__left::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(60% 50% at 20% 100%, rgba(124,179,66,0.35), transparent),
    radial-gradient(40% 30% at 90% 0%, rgba(212,165,116,0.18), transparent);
  pointer-events: none;
}
.login__quote { font-family: 'Fraunces', Georgia, serif; font-size: 36px; font-weight: 400; letter-spacing: -0.01em; line-height: 1.15; max-width: 480px; }
.login__quote::before { content: "“"; color: var(--gold-300); font-size: 1.4em; line-height: 0.4; vertical-align: -0.2em; margin-right: 4px; }
.login__brand-row { display: flex; align-items: center; gap: 12px; color: #fff; position: relative; z-index: 1; }
.login__foot { font-size: 12.5px; color: rgba(255,255,255,0.6); position: relative; z-index: 1; }

.login__right { display: grid; place-items: center; padding: 32px; }
.login-card { width: 100%; max-width: 420px; }
.login-card__eyebrow { font-size: 12px; color: var(--green-700); font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; }
.login-card h2 { font-family: 'Fraunces', Georgia, serif; font-size: 36px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; margin: 8px 0 6px; }
.login-card__sub { color: var(--ink-mute); margin-bottom: 28px; }
.login-card .form__input { padding: 14px 16px; }
.login-card__hint {
  margin-top: 14px; padding: 12px 14px; background: var(--bg-cream);
  border: 1px dashed var(--line); border-radius: var(--r-sm);
  font-size: 12.5px; color: var(--ink-mute);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}

/* Modal */
.modal-back { position: fixed; inset: 0; background: rgba(14,31,10,0.45); backdrop-filter: blur(4px); z-index: 200; display: grid; place-items: center; padding: 20px; }
.modal { background: var(--admin-surface); border-radius: var(--r-lg); padding: 28px; width: 100%; max-width: 540px; box-shadow: var(--shadow-lg); }
.modal__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.modal__title { font-family: 'Fraunces', Georgia, serif; font-size: 22px; font-weight: 500; letter-spacing: -0.01em; }
.modal__close { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: var(--admin-mute); }
.modal__close:hover { background: var(--admin-bg); color: var(--admin-ink); }

/* Machinery cards in admin */
.machine-card {
  background: var(--admin-surface);
  border: 1px solid var(--admin-line);
  border-radius: var(--r-md);
  padding: 18px;
  display: flex; flex-direction: column; gap: 12px;
}
.machine-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.machine-card__icon { width: 44px; height: 44px; border-radius: 11px; background: var(--green-50); color: var(--green-800); display: grid; place-items: center; }
.machine-card__name { font-weight: 600; font-size: 15px; }
.machine-card__model { font-size: 12.5px; color: var(--admin-mute); margin-top: 2px; }
.machine-card__bar { height: 6px; background: var(--admin-bg); border-radius: 999px; overflow: hidden; }
.machine-card__bar > span { display: block; height: 100%; background: var(--green-600); }
.machine-card__bar.warn > span { background: var(--warn); }
.machine-card__bar.bad > span { background: var(--bad); }
.machine-card__rows { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.machine-card__rows > div span { display: block; font-size: 11px; color: var(--admin-mute); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.machine-card__rows > div strong { font-weight: 600; font-size: 13.5px; }

/* Big number */
.bignum { font-family: 'Fraunces', Georgia, serif; font-size: 44px; font-weight: 500; letter-spacing: -0.02em; line-height: 1; }
.bignum small { font-size: 14px; color: var(--admin-mute); font-family: 'Inter', sans-serif; font-weight: 500; letter-spacing: 0; display: block; margin-top: 8px; }

/* Misc */
.spacer-lg { height: 96px; }
.toast-stack {
  position: fixed;
  right: 18px; bottom: 18px;
  display: flex; flex-direction: column; gap: 10px;
  z-index: 300;
  max-width: calc(100vw - 36px);
}
.toast {
  background: var(--admin-sidebar);
  color: #fff;
  padding: 12px 16px;
  border-radius: 12px;
  box-shadow: 0 12px 28px -8px rgba(14,31,10,0.35);
  font-size: 13.5px;
  font-weight: 500;
  display: flex; align-items: center; gap: 10px;
  max-width: 380px;
  animation: toastIn 220ms cubic-bezier(.2,.7,.3,1);
  border-left: 3px solid var(--green-500);
}
.toast--success { border-left-color: var(--green-500); }
.toast--warn    { border-left-color: var(--warn); }
.toast--info    { border-left-color: #5ba3e8; }
@keyframes toastIn {
  from { transform: translateY(8px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.divider { height: 1px; background: var(--admin-line); margin: 14px 0; }

/* ============================================
   Responsive — extra mobile polish
   ============================================ */

/* Section head: tighter gap + left-align when stacked */
@media (max-width: 700px) {
  .section-head { gap: 14px; align-items: flex-start; }
  .filter-group { width: 100%; }
  .about__image { aspect-ratio: 3/2; }
}

/* Hero CTA: stack buttons vertically on phones */
@media (max-width: 560px) {
  .hero__cta { flex-direction: column; gap: 10px; }
  .hero__cta .btn { width: 100%; justify-content: center; }
  .hero__sub { font-size: 16px; }
  .hero__eyebrow { font-size: 11px; padding: 6px 11px; }
}

/* About values: single column on very small phones */
@media (max-width: 480px) {
  .about__values { grid-template-columns: 1fr; }
}

/* Gallery: quitar spans en pantallas muy pequeñas */
@media (max-width: 480px) {
  .gallery { grid-template-columns: 1fr; grid-auto-rows: 130px; }
  .gal-tile--w2 { grid-column: span 1; }
  .gal-tile--h2 { grid-row: span 1; }
}

/* Footer: una sola columna en celulares */
@media (max-width: 600px) {
  .footer__top { grid-template-columns: 1fr; gap: 24px; }
  .footer__bottom { flex-direction: column; gap: 6px; }
}

/* Evitar overflow de emails/texto largo */
.contact-info__value { word-break: break-word; }

/* Login: ocultar panel decorativo izquierdo en mobile */
@media (max-width: 900px) {
  .login__left { display: none; }
  .login__right { min-height: 100vh; }
}

/* ============================================
   Admin panel — mejoras mobile (≤ 600px)
   ============================================ */

@media (max-width: 600px) {
  /* Page: padding más ajustado */
  .page { padding: 14px 12px; }
  .page__title { font-size: 20px; }
  .page__sub { font-size: 12px; }

  /* Page header: título arriba, botones abajo */
  .page__header { flex-direction: column; align-items: flex-start; }

  /* Botones de acción: fila con scroll horizontal para que no se apilen */
  .page__actions {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
    gap: 8px;
  }
  .page__actions .btn { flex-shrink: 0; }

  /* Panel: menos padding */
  .panel { padding: 12px; }

  /* Panel head: título arriba, chips/filtros abajo */
  .panel__head { flex-direction: column; align-items: flex-start; }

  /* KPI: más compacto en teléfonos */
  .kpi { padding: 12px 10px; }
  .kpi__value { font-size: 19px; }
  .kpi__label { font-size: 12px; }
  .kpi__hint { font-size: 10.5px; }
  .kpi__delta { font-size: 10.5px; }

  /* Números grandes: más chicos en teléfonos */
  .bignum { font-size: 24px; }

  /* Modal: bottom-sheet — sube desde abajo */
  .modal-back {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0;
  }
  .modal {
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    max-width: 100% !important;
    width: 100% !important;
    padding: 22px 16px 32px;
    max-height: 88vh;
    overflow-y: auto;
  }
  .modal__head { margin-bottom: 14px; }

  /* Topbar: más compacto */
  .topbar { padding: 8px 12px; gap: 6px; }
  .icon-btn { width: 34px; height: 34px; }
}
