/* ============================================================
   AgroSale · Demo interactiva (GitHub Pages)
   Identidad de marca oficial. Corre 100% en el navegador.
   ============================================================ */
:root {
  --brand: #1B5E3A;
  --brand-dark: #0F3D2E;
  --brand-light: #E6F2EA;
  --accent: #D97706;
  --accent-soft: #E08A2C;
  --surface: #F7F5EF;
  --ink: #23281F;
  --muted: #5B6058;
  --card: #FFFFFF;
  --line: rgba(15, 61, 46, 0.08);
  --danger: #B91C1C;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Poppins", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-head); margin: 0; text-wrap: balance; }
a { color: inherit; text-decoration: none; cursor: pointer; }
img, svg { max-width: 100%; display: block; }
button { font-family: var(--font-body); cursor: pointer; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 10px; padding: 11px 18px; font-size: 14px; font-weight: 600;
  border: 1px solid transparent; transition: all .15s ease; white-space: nowrap;
}
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--brand-dark); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover:not(:disabled) { background: var(--accent-soft); }
.btn-outline { background: #fff; color: var(--brand); border-color: rgba(27,94,58,.28); }
.btn-outline:hover:not(:disabled) { background: var(--brand-light); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover:not(:disabled) { background: rgba(0,0,0,.05); }
.btn-sm { padding: 7px 13px; font-size: 13px; border-radius: 8px; }
.btn-danger { background: transparent; color: var(--danger); }
.btn-danger:hover:not(:disabled) { background: #FEF2F2; }

/* Demo strip */
.demo-strip {
  background: var(--accent); color: #fff; text-align: center;
  font-size: 12px; font-weight: 500; padding: 7px 16px; letter-spacing: .01em;
}
.demo-strip button {
  background: rgba(255,255,255,.2); border: 0; color: #fff; font-size: 11px;
  font-weight: 600; padding: 3px 9px; border-radius: 999px; margin-left: 8px;
}
.demo-strip button:hover { background: rgba(255,255,255,.32); }

/* Header */
header.site {
  position: sticky; top: 0; z-index: 40;
  background: rgba(247,245,239,.94); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 9px; }
.logo-word { font-family: var(--font-head); font-weight: 700; font-size: 21px; letter-spacing: -.01em; }
.logo-word .a { color: var(--brand); }
.logo-word .s { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-menu { display: flex; align-items: center; gap: 6px; }
.nav-burger { display: none; align-items: center; justify-content: center; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
@media (max-width: 720px) {
  .nav-links .hide-sm { display: none; }
  .nav-burger { display: inline-flex; }
  .nav-menu {
    position: absolute; top: 64px; right: 0; left: 0;
    flex-direction: column; align-items: stretch; gap: 8px;
    background: var(--surface); border-bottom: 1px solid var(--line);
    padding: 14px 20px; box-shadow: 0 12px 24px rgba(0,0,0,.08);
    display: none;
  }
  .nav-menu.open { display: flex; }
  .nav-menu .btn { width: 100%; }
}

/* Etiqueta de IVA junto al precio */
.tax-tag { font-size: .62em; font-weight: 600; color: var(--muted); white-space: nowrap; }

/* Hero */
.hero { background: linear-gradient(180deg, var(--brand-light), var(--surface)); }
.hero-inner { padding: 68px 0 62px; max-width: 640px; }
.eyebrow {
  display: inline-block; background: #fff; color: var(--brand); font-size: 12px;
  font-weight: 600; padding: 5px 12px; border-radius: 999px; box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
.hero h1 { font-size: clamp(32px, 5vw, 48px); font-weight: 700; line-height: 1.09; margin-top: 18px; }
.hero h1 em { color: var(--brand); font-style: normal; }
.hero p { font-size: 18px; color: var(--muted); margin-top: 16px; }
.hero-cta { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.hero-cta .btn { font-size: 15px; padding: 13px 22px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 20px; font-size: 14px; color: var(--brand-dark); font-weight: 500; }

/* Banda de estadísticas (prueba social) */
.stats-band { background: var(--brand); color: #fff; }
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 22px 20px; }
@media (max-width: 700px) { .stats-row { grid-template-columns: repeat(2, 1fr); } }
.stat { text-align: center; }
.stat-num { display: block; font-family: var(--font-head); font-weight: 700; font-size: 26px; line-height: 1.1; }
.stat-lbl { display: block; font-size: 13px; color: rgba(255,255,255,.85); margin-top: 2px; }

/* Testimonios */
.testis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 24px; }
@media (max-width: 800px) { .testis { grid-template-columns: 1fr; } }
.testi { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.testi > p { font-size: 15px; line-height: 1.5; margin: 0; }
.testi-who { display: flex; align-items: center; gap: 10px; }
.testi-av { width: 38px; height: 38px; border-radius: 999px; background: var(--brand-light); color: var(--brand-dark); font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.testi-who strong { display: block; font-size: 14px; }
.testi-who span { font-size: 12px; color: var(--muted); }

/* Banda CTA final */
.cta-band { background: var(--brand-dark); color: #fff; border-radius: 16px; padding: 28px 30px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.cta-band h2 { font-size: 24px; }
.cta-band p { margin: 6px 0 0; color: rgba(255,255,255,.8); font-size: 15px; }

/* Prueba social en el detalle */
.proof-row { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 12px; align-items: center; }
.proof-badge { background: var(--brand-light); color: var(--brand-dark); font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.proof-item { font-size: 13px; color: var(--muted); }

/* Perks en publicar */
.pub-perks { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 18px; font-size: 14px; color: var(--brand-dark); font-weight: 500; }

/* Sections */
section.block { padding: 50px 0; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
h2.sec-title { font-size: 25px; font-weight: 700; }
.sec-sub { color: var(--muted); font-size: 14px; margin-top: 4px; }
.link-more { color: var(--brand); font-weight: 600; font-size: 14px; }
.link-more:hover { text-decoration: underline; }
.section-label { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); font-weight: 700; }
.divider { height: 1px; background: var(--line); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 24px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.step { padding: 22px; }
.step .num { width: 36px; height: 36px; border-radius: 999px; background: var(--brand); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; font-family: var(--font-head); }
.step h3 { font-size: 18px; margin-top: 14px; }
.step p { font-size: 14px; color: var(--muted); margin-top: 6px; }

/* Tarjetas de categoría (recuadro con imagen) */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 22px; }
.cat-grid.big { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .cat-grid, .cat-grid.big { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .cat-grid, .cat-grid.big { grid-template-columns: 1fr; } }
.cat-card { display: flex; flex-direction: column; overflow: hidden; border-radius: 14px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(0,0,0,.04); transition: box-shadow .2s ease, transform .2s ease; }
.cat-card:hover { box-shadow: 0 10px 26px rgba(15,61,46,.14); transform: translateY(-3px); }
.cat-img { position: relative; aspect-ratio: 16/10; overflow: hidden; }
.cat-fallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--brand-light), #d3e7d8); }
.cat-fallback span { font-size: 44px; }
.cat-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cat-card:hover .cat-img img { transform: scale(1.05); transition: transform .3s ease; }
.cat-count { position: absolute; left: 10px; top: 10px; background: rgba(15,61,46,.82); color: #fff; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; }
.cat-info { padding: 14px 16px; }
.cat-info h3 { font-size: 17px; }
.cat-go { font-size: 13px; color: var(--accent); font-weight: 600; }

/* Editor de categorías (admin) */
.cat-row { display: flex; gap: 14px; padding: 14px; align-items: center; }
.cat-row-thumb { position: relative; width: 84px; height: 60px; flex: 0 0 auto; border-radius: 10px; overflow: hidden; background: var(--brand-light); display: flex; align-items: center; justify-content: center; }
.cat-row-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cat-row-emoji { font-size: 26px; }
.cat-row-fields { flex: 1; }
.cat-rm-img { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border: 0; border-radius: 999px; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.cat-rm-img:hover { background: var(--danger); }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.chip-soon { border: 1px dashed rgba(0,0,0,.16); color: var(--muted); border-radius: 10px; padding: 11px 18px; font-size: 14px; font-weight: 500; }

/* Grid + listing card */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 24px; }
@media (max-width: 900px) { .grid, .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid, .steps { grid-template-columns: 1fr; } }
.listing { display: flex; flex-direction: column; overflow: hidden; border-radius: 14px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(0,0,0,.04); transition: box-shadow .2s ease, transform .2s ease; }
.listing:hover { box-shadow: 0 8px 24px rgba(15,61,46,.12); transform: translateY(-2px); }
.listing .photo { position: relative; aspect-ratio: 4/3; background: var(--brand-light); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.listing .photo img { width: 100%; height: 100%; object-fit: cover; }
.listing .photo .ph { width: 55%; opacity: .8; }
.badge-deliv { position: absolute; left: 12px; top: 12px; background: rgba(255,255,255,.92); color: var(--brand-dark); font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.badge-status { position: absolute; right: 12px; top: 12px; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.st-active { background: var(--brand-light); color: var(--brand-dark); }
.st-pending_review { background: #FEF3C7; color: #92400E; }
.st-needs_confirmation { background: #FFEDD5; color: #9A3412; }
.st-sold { background: rgba(0,0,0,.8); color: #fff; }
.st-paused { background: rgba(0,0,0,.1); color: var(--muted); }
.st-rejected { background: #FEE2E2; color: #991B1B; }
.st-draft { background: rgba(0,0,0,.1); color: var(--ink); }
.listing .body { padding: 16px; display: flex; flex-direction: column; flex: 1; }
.listing h3 { font-size: 16px; }
.listing .place { font-size: 14px; color: var(--muted); margin-top: 2px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag { background: var(--surface); color: var(--muted); font-size: 12px; padding: 2px 8px; border-radius: 6px; }
.price { font-family: var(--font-head); font-weight: 700; font-size: 19px; color: var(--brand); margin-top: 14px; }
.posted { font-size: 12px; color: var(--muted); margin-top: 2px; }
.urgency { font-size: 12px; color: var(--accent); font-weight: 600; margin-top: 3px; }
.badge-hot { position: absolute; right: 12px; top: 12px; background: #B91C1C; color: #fff; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.badge-new { position: absolute; left: 12px; top: 40px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; box-shadow: 0 0 0 0 rgba(217,119,6,.55); animation: pulseNew 1.8s ease-out infinite; }
@keyframes pulseNew {
  0% { box-shadow: 0 0 0 0 rgba(217,119,6,.5); }
  70% { box-shadow: 0 0 0 10px rgba(217,119,6,0); }
  100% { box-shadow: 0 0 0 0 rgba(217,119,6,0); }
}
@media (prefers-reduced-motion: reduce) { .badge-new { animation: none; } }
.live-now { margin: 10px 0 0; font-size: 13px; font-weight: 600; color: #15803d; display: flex; align-items: center; gap: 4px; }
.sort-ctrl { display: flex; align-items: center; gap: 8px; }
.sort-ctrl label { font-size: 13px; color: var(--muted); white-space: nowrap; }
.sort-ctrl select { width: auto; min-width: 150px; }
.listing .actions { border-top: 1px solid var(--line); padding: 12px 16px; display: flex; flex-wrap: wrap; gap: 8px; }

/* Search layout */
.search-layout { display: grid; grid-template-columns: 280px 1fr; gap: 24px; margin-top: 24px; align-items: start; }
@media (max-width: 900px) { .search-layout { grid-template-columns: 1fr; } }
.filters { position: sticky; top: 84px; padding: 18px; }
.filters .field { margin-bottom: 14px; }

/* Forms */
.label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.input, select.input, textarea.input {
  width: 100%; border-radius: 10px; border: 1px solid rgba(0,0,0,.15); background: #fff;
  padding: 10px 13px; font-size: 14px; color: var(--ink); font-family: var(--font-body);
}
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
textarea.input { min-height: 96px; resize: vertical; }
fieldset.card { border: 1px solid var(--line); padding: 20px; margin: 0 0 22px; }
fieldset.card.dashed { border-style: dashed; }
legend { font-family: var(--font-head); font-weight: 600; font-size: 17px; padding: 0 6px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; margin-top: 6px; }
.check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--brand); }

/* Delivery selector */
.deliv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .deliv-grid { grid-template-columns: 1fr; } }
.deliv-opt { text-align: left; border: 2px solid rgba(0,0,0,.1); background: #fff; border-radius: 10px; padding: 14px; transition: all .15s; }
.deliv-opt:hover { border-color: rgba(27,94,58,.4); }
.deliv-opt.sel { border-color: var(--brand); background: var(--brand-light); }
.deliv-opt strong { display: block; font-family: var(--font-head); font-size: 14px; }
.deliv-opt span { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }

/* Photos */
.photo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 6px; }
@media (max-width: 560px) { .photo-grid { grid-template-columns: repeat(3, 1fr); } }
.photo-thumb { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--brand-light); }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo-thumb .rm { position: absolute; top: 5px; right: 5px; width: 24px; height: 24px; border-radius: 999px; background: rgba(0,0,0,.6); color: #fff; border: 0; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.photo-thumb .cover { position: absolute; bottom: 5px; left: 5px; background: var(--brand); color: #fff; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 5px; }
.photo-add { aspect-ratio: 1; border: 2px dashed rgba(0,0,0,.15); border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; background: #fff; }
.photo-add:hover { border-color: var(--brand); color: var(--brand); }
.photo-add span { font-size: 24px; line-height: 1; }

/* Detail */
.detail { display: grid; grid-template-columns: 1fr 360px; gap: 28px; margin-top: 8px; align-items: start; }
@media (max-width: 820px) { .detail { grid-template-columns: 1fr; } }
.gallery-main { aspect-ratio: 4/3; border-radius: 14px; overflow: hidden; background: var(--brand-light); display: flex; align-items: center; justify-content: center; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-main .ph { width: 45%; opacity: .8; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.thumbs button { width: 80px; height: 60px; flex: 0 0 auto; border-radius: 8px; overflow: hidden; border: 2px solid transparent; background: var(--brand-light); }
.thumbs button.sel { border-color: var(--accent); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.spec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 20px; margin-top: 16px; }
@media (max-width: 560px) { .spec-grid { grid-template-columns: repeat(2, 1fr); } }
.spec dt { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.spec dd { margin: 0; font-size: 14px; font-weight: 500; }
.doc-row { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-top: 8px; }
.doc-ok, .doc-no { width: 20px; height: 20px; border-radius: 999px; color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.doc-ok { background: var(--brand); }
.doc-no { background: rgba(0,0,0,.2); }
.contact-card { padding: 20px; position: sticky; top: 84px; }
.contact-card .plabel { font-size: 14px; color: var(--muted); }
.contact-card .pbig { font-family: var(--font-head); font-weight: 700; font-size: 30px; color: var(--brand); margin: 2px 0 14px; }
.contact-card .btn { width: 100%; margin-bottom: 8px; }
.contact-note { font-size: 12px; color: var(--muted); text-align: center; margin-top: 6px; }
.crumb { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.crumb a:hover { color: var(--brand); }

/* Auth */
.auth-wrap { max-width: 430px; margin: 0 auto; padding: 40px 20px; }
.auth-wrap .card { padding: 26px; }
.auth-wrap .field { margin-bottom: 16px; }

/* Empty / notice */
.empty { text-align: center; padding: 56px 24px; }
.empty .ic { width: 52px; height: 52px; border-radius: 999px; background: var(--brand-light); display: flex; align-items: center; justify-content: center; font-size: 26px; margin: 0 auto 12px; }
.notice { border-radius: 10px; padding: 14px 16px; font-size: 14px; margin-bottom: 22px; }
.notice-ok { background: var(--brand-light); color: var(--brand-dark); border: 1px solid rgba(27,94,58,.2); }
.notice-info { background: #FEF3C7; color: #92400E; border: 1px solid #FDE68A; }
.error-text { color: var(--danger); font-size: 14px; margin-top: 8px; }
.page-head { margin: 26px 0 18px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.page-head h1 { font-size: 30px; font-weight: 700; }

/* Admin */
.mod { display: flex; gap: 16px; padding: 16px; }
@media (max-width: 560px) { .mod { flex-direction: column; } }
.mod .thumb { width: 170px; flex: 0 0 auto; aspect-ratio: 4/3; border-radius: 10px; overflow: hidden; background: var(--brand-light); }
@media (max-width: 560px) { .mod .thumb { width: 100%; } }
.mod .thumb img { width: 100%; height: 100%; object-fit: cover; }
.mod .info { flex: 1; display: flex; flex-direction: column; }

/* Footer */
footer.site { margin-top: 44px; background: var(--brand-dark); color: rgba(255,255,255,.8); }
.foot { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; padding: 40px 0; }
.foot .logo-word .a, .foot .logo-word .s { color: #fff; }
.foot p { font-size: 14px; color: rgba(255,255,255,.7); max-width: 320px; margin: 12px 0 0; }
.foot nav { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.foot a:hover { color: #fff; }
.copy { font-size: 12px; color: rgba(255,255,255,.5); padding-bottom: 30px; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 26px; }
.pagination .pg { font-size: 14px; color: var(--muted); }

/* ── Panel de administración ── */
.adm-tabs { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.adm-tab { padding: 10px 16px; font-size: 14px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.adm-tab:hover { color: var(--ink); }
.adm-tab.sel { color: var(--brand); border-bottom-color: var(--brand); }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 800px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 2px; }
.kpi-num { font-family: var(--font-head); font-weight: 700; font-size: 26px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-lbl { font-size: 13px; color: var(--muted); }

.rank-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
@media (max-width: 700px) { .rank-grid { grid-template-columns: 1fr; } }
.rank-list { margin-top: 10px; display: flex; flex-direction: column; }
.rank-row { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.rank-row:first-child { border-top: 0; }
.rank-row:hover .rank-eq { color: var(--brand); }
.rank-val { font-weight: 700; color: var(--brand); font-variant-numeric: tabular-nums; }

/* Gráficos del dashboard */
.chart-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
@media (max-width: 760px) { .chart-grid2 { grid-template-columns: 1fr; } }
.chart-card { padding: 16px; }
.chart-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.chart-title { font-size: 14px; font-weight: 600; color: var(--ink); }
.chart-legend { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); }
.chart-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.hbars { display: flex; flex-direction: column; gap: 8px; }
.hbar-row { display: grid; grid-template-columns: 96px 1fr auto; align-items: center; gap: 10px; }
.hbar-label { font-size: 13px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-track { background: var(--surface); border-radius: 999px; height: 12px; overflow: hidden; }
.hbar-fill { height: 100%; border-radius: 999px; min-width: 3px; }
.hbar-val { font-size: 13px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }

.adm-table-wrap { overflow-x: auto; }
.adm-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.adm-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.adm-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.adm-table tbody tr:hover td { background: var(--surface); }
.adm-table tr.row-stale td { background: #FEF6EC; }
.adm-table tr.row-stale:hover td { background: #FDECD3; }
.stale-badge { display: inline-block; background: #FDE68A; color: #92400E; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 999px; }

/* Ficha de cliente */
.cli-ficha { padding: 18px; }
.cli-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.cli-contact { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: 14px; }
.cli-contact a { color: var(--brand); font-weight: 500; }
.cli-contact a:hover { text-decoration: underline; }
.cli-contact span { color: var(--muted); }
.cli-eqs { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.cli-eq { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.cli-eq-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: center; }
.cli-slots { margin-top: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cli-slots-lbl { font-size: 13px; font-weight: 600; color: var(--ink); margin-right: 2px; }
.slot-chip { background: var(--brand-light); color: var(--brand-dark); font-size: 13px; padding: 4px 10px; border-radius: 999px; }

/* Agenda / calendario */
.cal-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.cal-toolbar h3 { text-align: center; flex: 1; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-head { margin-bottom: 6px; }
.cal-dow { text-align: center; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 4px 0; }
.cal-cell { position: relative; min-height: 92px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 6px; overflow: hidden; }
.cal-empty { background: transparent; border: 0; }
.cal-today { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.cal-daynum { font-size: 13px; font-weight: 600; color: var(--muted); }
.cal-today .cal-daynum { color: var(--brand); }
.cal-visit { display: flex; align-items: center; justify-content: space-between; gap: 4px; background: var(--brand-light); color: var(--brand-dark); font-size: 11px; line-height: 1.2; border-radius: 6px; padding: 3px 5px; margin-top: 4px; }
.cal-visit span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-visit button { border: 0; background: transparent; color: var(--brand-dark); cursor: pointer; font-size: 11px; line-height: 1; padding: 0; }
.cal-add { position: absolute; bottom: 5px; right: 6px; width: 20px; height: 20px; border-radius: 999px; background: var(--surface); color: var(--muted); display: flex; align-items: center; justify-content: center; font-size: 14px; opacity: 0; transition: opacity .12s; }
.cal-cell:hover .cal-add { opacity: 1; }
.cal-add:hover { background: var(--accent); color: #fff; }
@media (max-width: 640px) {
  .cal-cell { min-height: 70px; }
  .cal-visit { font-size: 10px; }
  .cal-add { opacity: 1; }
}
.agenda-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px; }
@media (max-width: 760px) { .agenda-cols { grid-template-columns: 1fr; } }
.upv { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; border-top: 1px solid var(--line); padding-top: 10px; }
.upv:first-child { border-top: 0; padding-top: 0; }

/* Editor de contenido */
.ct-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
@media (max-width: 640px) { .ct-grid { grid-template-columns: 1fr; } }
.ct-field .label { margin-bottom: 4px; }
.ct-field textarea.input { resize: vertical; }
.ct-field:has(textarea) { grid-column: 1 / -1; }
