/* Donación de Planta – SMA Coahuila · Micrositio público
   Estilos encapsulados bajo .smadp para no depender del tema visual. */

.smadp {
	--g-900: #053f2c;
	--g-800: #04704f;
	--g-700: #04865f;   /* verde SMA */
	--g-600: #0a9a6c;
	--g-500: #00ae3e;   /* verde claro del logotipo SMA */
	--g-100: #e6f3ed;
	--g-50:  #f3f9f6;
	--ink:   #1c2621;
	--ink-2: #4f5e56;
	--ink-3: #7a8780;
	--line:  #dfe6e2;
	--line-2:#eef2f0;
	--bg:    #f5f7f6;
	--card:  #ffffff;
	--accent:#e07a12;
	--danger:#b42318;
	--radius: 14px;
	--shadow: 0 1px 2px rgba(16, 40, 30, .06), 0 4px 16px rgba(16, 40, 30, .05);
	--font: "Montserrat", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
	--s1: #2D6A4F; --s2: #D08C2C; --s3: #74A12E; --s4: #8C5A2B; --s5: #2A9D8F; --s6: #A3B18A; --s-other: #8a948f;

	font-family: var(--font);
	color: var(--ink);
	background: var(--bg);
	font-size: 15px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	overflow-x: clip;
	border-radius: var(--radius);
	position: relative;
}
.smadp *, .smadp *::before, .smadp *::after { box-sizing: border-box; }
.smadp img { max-width: 100%; height: auto; display: block; }
.smadp button, .smadp input, .smadp select, .smadp textarea { font: inherit; color: inherit; }
.smadp h1, .smadp h2, .smadp h3, .smadp h4 { font-family: var(--font); color: var(--ink); margin: 0; line-height: 1.2; letter-spacing: 0; }
.smadp p { margin: 0; }
.smadp a { color: var(--g-700); }
.smadp :focus-visible { outline: 3px solid rgba(0, 174, 62, .45); outline-offset: 2px; border-radius: 6px; }
.smadp .sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ---------- Encabezado institucional ---------- */
.smadp-hdr {
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	padding: 14px 28px; background: #fff; border-bottom: 1px solid var(--line);
	border-radius: var(--radius) var(--radius) 0 0;
}
.smadp-hdr__logos { display: flex; align-items: center; gap: 22px; min-width: 0; }
.smadp-hdr__logos img { height: 46px; width: auto; }
.smadp-hdr__logos .sep { width: 1px; height: 38px; background: var(--line); }
.smadp-hdr__actions { display: flex; gap: 10px; align-items: center; }

.smadp-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	border: 1px solid transparent; border-radius: 999px; padding: 10px 20px;
	font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none; line-height: 1.1;
	transition: background .15s, box-shadow .15s, transform .05s; white-space: nowrap;
}
.smadp-btn:active { transform: translateY(1px); }
.smadp-btn--primary { background: var(--g-700); color: #fff !important; box-shadow: 0 2px 8px rgba(4, 134, 95, .25); }
.smadp-btn--primary:hover { background: var(--g-800); }
.smadp-btn--light { background: #fff; color: var(--g-800) !important; border-color: rgba(255,255,255,.6); }
.smadp-btn--light:hover { background: var(--g-50); }
.smadp-btn--outline-light { background: rgba(255,255,255,.08); color: #fff !important; border-color: rgba(255,255,255,.75); }
.smadp-btn--outline-light:hover { background: rgba(255,255,255,.18); }
.smadp-btn--ghost { background: transparent; color: var(--g-700) !important; border-color: var(--line); }
.smadp-btn--ghost:hover { background: var(--g-50); border-color: var(--g-700); }
.smadp-btn--sm { padding: 6px 12px; font-size: 13px; }
.smadp-btn svg { width: 18px; height: 18px; flex: none; }

/* ---------- Título de la página del tema (v1.18: se oculta en el micrositio) ---------- */
body.smadp-sin-titulo .entry-title, body.smadp-sin-titulo .page-title, body.smadp-sin-titulo h1.wp-block-post-title,
body.smadp-sin-titulo .wp-block-post-title, body.smadp-sin-titulo .page-header, body.smadp-sin-titulo .entry-header:not(:has(img)) { display: none !important; }

/* ---------- Banda de título ---------- */
.smadp-hero {
	position: relative; overflow: hidden;
	background: linear-gradient(100deg, var(--g-800) 0%, var(--g-700) 55%, #079468 100%);
	color: #fff; padding: 30px 28px 34px;
}
.smadp-hero::after {
	content: ""; position: absolute; right: -40px; top: -30px; width: 360px; height: 260px; opacity: .14;
	background:
		radial-gradient(circle at 50% 50%, #fff 0 18px, transparent 19px) 0 0 / 90px 90px,
		conic-gradient(from 45deg at 50% 100%, transparent 0 25%, #fff 0 75%, transparent 0) 45px 10px / 90px 60px;
	pointer-events: none;
}
.smadp-hero__inner { position: relative; z-index: 1; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.smadp-hero .eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #c9f0dc; margin-bottom: 8px; display: block; }
.smadp-hero h1 { color: #fff; font-size: clamp(26px, 4vw, 40px); font-weight: 800; letter-spacing: .01em; }
.smadp-hero h1 span { color: #9ff0c0; }
.smadp-hero p { color: #e2f5eb; margin-top: 8px; max-width: 640px; font-size: 15px; }
.smadp-hero__meta { font-size: 13px; color: #d4efe1; text-align: right; }
.smadp-hero__btns { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; flex-wrap: wrap; }
.smadp-hero__btns:empty { display: none; }
.smadp.no-hdr .smadp-hero { border-radius: var(--radius) var(--radius) 0 0; }
.smadp.no-hdr.alignfull .smadp-hero { border-radius: 0; }
.smadp-hero__meta strong { color: #fff; display: block; font-size: 20px; font-weight: 800; letter-spacing: .02em; }
/* v1.18: foto de reforestación de fondo (sitio público) */
.smadp-hero--foto { background-color: var(--g-800); background-image: linear-gradient(95deg, rgba(2,58,41,.93) 0%, rgba(3,84,60,.84) 38%, rgba(4,112,79,.45) 70%, rgba(4,134,95,.18) 100%), var(--hero-img); background-size: cover; background-position: center 55%; padding-top: 44px; padding-bottom: 44px; }
.smadp-hero--foto::after { display: none; }
.smadp-hero--foto h1, .smadp-hero--foto .eyebrow { text-shadow: 0 1px 12px rgba(0,0,0,.35); }
.smadp-hero--foto .smadp-hero__inner { align-items: center; }
@media (max-width: 640px) { .smadp-hero--foto { background-image: linear-gradient(180deg, rgba(2,58,41,.88) 0%, rgba(3,84,60,.78) 60%, rgba(4,112,79,.55) 100%), var(--hero-img); padding-top: 30px; padding-bottom: 28px; } }

/* ---------- Cuerpo ---------- */
.smadp-body { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 24px; padding: 24px 28px 28px; align-items: start; }
.smadp-main { min-width: 0; display: flex; flex-direction: column; gap: 20px; }

/* Filtros */
.smadp-filters {
	background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
	padding: 16px; position: sticky; top: 16px; display: flex; flex-direction: column; gap: 11px;
	max-height: calc(100vh - 32px); overflow: auto;
}
.smadp-filters__head { display: flex; align-items: center; justify-content: space-between; }
.smadp-filters__head h2 { font-size: 15px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.smadp-filters__head h2 svg { width: 18px; height: 18px; color: var(--g-700); }
.smadp-filters__close { display: none; background: none; border: 0; cursor: pointer; padding: 6px; }
.smadp-field { display: flex; flex-direction: column; gap: 5px; }
.smadp-field > span, .smadp-field > label { font-size: 12px; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; }
.smadp-field select, .smadp-field input[type="date"], .smadp-field input[type="text"], .smadp-field input[type="email"], .smadp-field input[type="tel"], .smadp-field input[type="number"], .smadp-field textarea {
	width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; background: #fff; font-size: 14px; min-height: 40px;
}
.smadp-field select:focus, .smadp-field input:focus, .smadp-field textarea:focus { border-color: var(--g-700); outline: none; box-shadow: 0 0 0 3px rgba(4,134,95,.15); }
.smadp-months { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.smadp-months button {
	border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 6px 0; font-size: 12px; font-weight: 600; cursor: pointer; color: var(--ink-2);
}
.smadp-months button[aria-pressed="true"] { background: var(--g-700); border-color: var(--g-700); color: #fff; }
.smadp-months button:disabled { opacity: .35; cursor: default; }
.smadp-dates { display: grid; grid-template-columns: 1fr; gap: 6px; }
.smadp-dates input { min-width: 0; }
.smadp-seg { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.smadp-seg button { border: 0; background: #fff; padding: 8px 4px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--ink-2); }
.smadp-seg button + button { border-left: 1px solid var(--line); }
.smadp-seg button[aria-pressed="true"] { background: var(--g-100); color: var(--g-800); }
.smadp-filters__foot { display: flex; gap: 8px; padding-top: 4px; }
.smadp-filters__foot .smadp-btn { flex: 1; }
.smadp-filters-toggle { display: none; }

/* Chips de filtros activos */
.smadp-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-height: 0; }
.smadp-chips:empty { display: none; }
.smadp-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--g-100); color: var(--g-900); border-radius: 999px; padding: 5px 6px 5px 12px; font-size: 13px; font-weight: 600; }
.smadp-chip button { border: 0; background: rgba(4,112,79,.12); width: 20px; height: 20px; border-radius: 50%; cursor: pointer; line-height: 1; font-size: 14px; color: var(--g-900); }
.smadp-chips .clear { background: none; border: 0; color: var(--g-700); font-weight: 700; cursor: pointer; font-size: 13px; text-decoration: underline; }

/* Tarjetas KPI */
.smadp-kpis { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.smadp-kpi {
	background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
	padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 4px; position: relative; overflow: hidden; min-width: 0;
}
.smadp-kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--g-700); }
.smadp-kpi.is-plants::before { background: var(--g-500); }
.smadp-kpi.is-terr::before { background: #74A12E; }
.smadp-kpi.is-sp::before { background: #9A8A00; }
.smadp-kpi.is-gen::before { background: #C0782F; }
.smadp-kpi__top { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.smadp-kpi__top svg { width: 18px; height: 18px; color: var(--g-700); flex: none; }
.smadp-kpi__val { font-size: 28px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.15; }
.smadp-kpi__sub { font-size: 12.5px; color: var(--ink-3); }
.smadp-kpi__sub b { color: var(--g-800); }
.smadp-kpi__bar { height: 6px; background: var(--line-2); border-radius: 99px; overflow: hidden; margin-top: 6px; }
.smadp-kpi__bar i { display: block; height: 100%; background: var(--g-700); border-radius: 99px; }

/* Pestañas */
.smadp-tabs { display: flex; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 4px; overflow-x: auto; scrollbar-width: none; box-shadow: var(--shadow); }
.smadp-tabs::-webkit-scrollbar { display: none; }
.smadp-tabs button { border: 0; background: transparent; padding: 9px 18px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.smadp-tabs button[aria-selected="true"] { background: var(--g-700); color: #fff; }
.smadp-tabs button:hover:not([aria-selected="true"]) { background: var(--g-50); color: var(--g-800); }
.smadp-panel[hidden] { display: none !important; }
.smadp-panel { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }

/* Tarjetas de contenido */
.smadp-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; min-width: 0; grid-column: span 12; display: flex; flex-direction: column; gap: 12px; }
.smadp-card.w6 { grid-column: span 6; }
.smadp-card.w4 { grid-column: span 4; }
.smadp-card.w8 { grid-column: span 8; }
.smadp-card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.smadp-card__head h3 { font-size: 15.5px; font-weight: 800; }
.smadp-card__head p { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }
.smadp-card__tools { display: flex; gap: 6px; flex-wrap: wrap; }
.smadp-chart { width: 100%; height: 300px; min-width: 0; }
.smadp-chart.tall { height: 380px; }
.smadp-chart.xl { height: 460px; }

/* Mapa de ubicación de entregas */
.smadp-map.smadp-umap { height: 640px; background: #e3ebf0; }
.smadp-map { background: #e3ebf0; }
.smadp-gm-hover { margin-top: 10px; background: rgba(28,38,33,.85); color: #fff; font: 700 13px Montserrat, 'Segoe UI', sans-serif; padding: 6px 12px; border-radius: 99px; pointer-events: none; }
.smadp .smadp-umap-tip { font-weight: 700; font-size: 12.5px; color: #1c2621; border-radius: 8px; }
.smadp-chart.umap-side { height: 460px; }
.smadp-umap-legend { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.smadp-umap-sizes { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.smadp-umap-sizes span { display: inline-flex; align-items: center; gap: 6px; }
.smadp-umap-sizes i { display: inline-block; border-radius: 50%; background: rgba(82,183,136,.75); border: 1.5px solid #fff; box-shadow: 0 0 0 1px #c9d3ce; }
.smadp-umap-sizes .lbl { color: var(--ink-3); }
.smadp-umap-note { color: var(--ink-3); }

/* Mapa */
.smadp-map-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 16px; }
.smadp-map { height: 520px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #eef3f1; z-index: 0; }
.smadp-map-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.smadp-map-side .box { border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.smadp-map-side h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); margin-bottom: 8px; }
.smadp-layer { display: flex; align-items: center; gap: 8px; font-size: 13.5px; padding: 4px 0; cursor: pointer; }
.smadp-layer input { accent-color: var(--g-700); width: 16px; height: 16px; }
.smadp-legend { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--ink-2); }
.smadp-legend div { display: flex; align-items: center; gap: 8px; }
.smadp-legend i { width: 22px; height: 12px; border-radius: 3px; border: 1px solid rgba(0,0,0,.08); flex: none; }
.smadp-map-info { font-size: 13px; color: var(--ink-2); }
.smadp-map-info strong { color: var(--ink); font-size: 15px; display: block; margin-bottom: 4px; }
.smadp .leaflet-container { font-family: var(--font); }
.smadp .leaflet-popup-content-wrapper { border-radius: 12px; box-shadow: var(--shadow); }
.smadp .leaflet-popup-content { margin: 12px 14px; font-size: 13px; line-height: 1.45; }
.smadp-pop h4 { font-size: 15px; margin-bottom: 2px; }
.smadp-pop .reg { color: var(--ink-3); font-size: 12px; margin-bottom: 8px; }
.smadp-pop table { border-collapse: collapse; width: 100%; }
.smadp-pop td { padding: 2px 0; }
.smadp-pop td:last-child { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; padding-left: 12px; }
.smadp-maplabel { background: transparent; border: 0; box-shadow: none; font-size: 10.5px; font-weight: 700; color: #22312a; text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 2px #fff; white-space: nowrap; }
.smadp-maplabel::before { display: none; }

/* Tablas */
.smadp-table-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.smadp-search { position: relative; flex: 1 1 220px; max-width: 320px; }
.smadp-search input { width: 100%; border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px 8px 34px; font-size: 13.5px; }
.smadp-search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--ink-3); }
.smadp-table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.smadp-table { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.smadp-table th { background: var(--g-50); text-align: left; font-weight: 700; color: var(--ink-2); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; font-size: 12.5px; }
.smadp-table th button { background: none; border: 0; font-weight: 700; color: inherit; cursor: pointer; padding: 0; display: inline-flex; gap: 4px; align-items: center; font-size: inherit; text-transform: none; }
.smadp-table th[aria-sort="ascending"] button::after { content: "▲"; font-size: 9px; color: var(--g-700); }
.smadp-table th[aria-sort="descending"] button::after { content: "▼"; font-size: 9px; color: var(--g-700); }
.smadp-table td { padding: 9px 12px; border-bottom: 1px solid var(--line-2); }
.smadp-table td.num, .smadp-table th.num { text-align: right; }
.smadp-table tbody tr:hover { background: #fafcfb; }
.smadp-table tfoot td { font-weight: 800; background: var(--g-50); border-top: 2px solid var(--line); border-bottom: 0; }
.smadp-table .muted { color: var(--ink-3); font-size: 12px; }
.smadp-table .pctbar { display: inline-block; width: 60px; height: 6px; background: var(--line-2); border-radius: 99px; vertical-align: middle; margin-left: 8px; overflow: hidden; }
.smadp-table .pctbar i { display: block; height: 100%; background: var(--g-700); }
.smadp-tag { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 700; background: var(--line-2); color: var(--ink-2); }
.smadp-tag.t-Templada { background: #e7effa; color: #23548c; }
.smadp-tag.t-Urbana { background: #f2eefc; color: #4f3fa8; }
.smadp-tag.t-Árida { background: #fbf0e3; color: #8a4a06; }
.smadp-pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-3); flex-wrap: wrap; }
.smadp-pager .btns { display: flex; gap: 4px; }
.smadp-pager button { border: 1px solid var(--line); background: #fff; border-radius: 8px; min-width: 32px; height: 32px; cursor: pointer; font-weight: 600; }
.smadp-pager button[aria-current="true"] { background: var(--g-700); color: #fff; border-color: var(--g-700); }
.smadp-pager button:disabled { opacity: .4; cursor: default; }

/* Descargas */
.smadp-downloads { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.smadp-dl { border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; justify-content: space-between; }
.smadp-dl strong { font-size: 14px; }
.smadp-dl .btns { display: flex; gap: 6px; }

/* Avisos */
.smadp-notice { border-radius: 12px; padding: 14px 16px; background: #fff8eb; border: 1px solid #f3d9a9; color: #6b4a0e; font-size: 14px; display: flex; gap: 10px; align-items: flex-start; }
.smadp-notice svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.smadp-empty { text-align: center; color: var(--ink-3); padding: 40px 10px; font-size: 14px; }
.smadp-loading { position: absolute; inset: 0; background: rgba(245, 247, 246, .55); display: none; align-items: flex-start; justify-content: center; padding-top: 220px; z-index: 30; border-radius: var(--radius); }
.smadp.is-loading .smadp-loading { display: flex; }
.smadp-spinner { width: 38px; height: 38px; border: 4px solid var(--g-100); border-top-color: var(--g-700); border-radius: 50%; animation: smadp-spin .8s linear infinite; }
@keyframes smadp-spin { to { transform: rotate(360deg); } }

/* Pie */
.smadp-foot { padding: 18px 28px 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-3); background: #fff; border-radius: 0 0 var(--radius) var(--radius); }
.smadp-foot a { color: var(--ink-2); }
.smadp-foot .access { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; }
.smadp-foot .access svg { width: 14px; height: 14px; }

/* ---------- Formulario de solicitud ---------- */
.smadp-modal { position: fixed; inset: 0; z-index: 100000; display: none; align-items: flex-start; justify-content: center; padding: 4vh 16px; background: rgba(10, 30, 22, .55); overflow-y: auto; }
.smadp-modal.is-open { display: flex; }
.smadp-modal__box { background: #fff; border-radius: 18px; width: 100%; max-width: 720px; box-shadow: 0 20px 60px rgba(0,0,0,.25); overflow: hidden; font-family: var(--font); color: var(--ink); }
.smadp-modal__head { background: var(--g-700); color: #fff; padding: 18px 22px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.smadp-modal__head h2 { color: #fff; font-size: 19px; }
.smadp-modal__head p { color: #d8f1e5; font-size: 13px; margin-top: 2px; }
.smadp-modal__close { background: rgba(255,255,255,.15); border: 0; color: #fff; width: 36px; height: 36px; border-radius: 50%; font-size: 22px; cursor: pointer; line-height: 1; flex: none; }
.smadp-form { padding: 20px 22px 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.smadp-form .full { grid-column: 1 / -1; }
.smadp-form .smadp-field > label { text-transform: none; font-size: 13px; letter-spacing: 0; color: var(--ink); }
.smadp-form .req { color: var(--danger); }
.smadp-form .err { color: var(--danger); font-size: 12px; min-height: 0; }
.smadp-form .has-error input, .smadp-form .has-error select { border-color: var(--danger); }
.smadp-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.smadp-check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; }
.smadp-check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--g-700); flex: none; }
.smadp-species-pick { display: flex; flex-wrap: wrap; gap: 6px; max-height: 150px; overflow: auto; padding: 8px; border: 1px solid var(--line); border-radius: 10px; }
.smadp-species-pick label { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 99px; padding: 4px 10px; font-size: 12.5px; cursor: pointer; }
.smadp-species-pick input { accent-color: var(--g-700); }
.smadp-species-pick label:has(input:checked) { background: var(--g-100); border-color: var(--g-700); }
.smadp-form__actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 10px; padding-top: 6px; }
.smadp-form-ok { padding: 40px 26px; text-align: center; }
.smadp-form-ok .ico { width: 64px; height: 64px; border-radius: 50%; background: var(--g-100); color: var(--g-700); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.smadp-form-ok .ico svg { width: 34px; height: 34px; }
.smadp-form-ok h3 { font-size: 20px; margin-bottom: 8px; }
.smadp-form-ok .folio { font-size: 22px; font-weight: 800; color: var(--g-800); letter-spacing: .03em; margin: 8px 0 14px; }
.smadp-form-alert { grid-column: 1 / -1; background: #fdecea; color: #8c1d18; border-radius: 10px; padding: 10px 12px; font-size: 13.5px; }
.smadp-standalone-form { max-width: 760px; margin: 0 auto; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: #fff; }

/* Acceso */
.smadp-access-box { max-width: 420px; margin: 0 auto; border: 1px solid var(--line); border-radius: 16px; padding: 24px; background: #fff; }
.smadp-access-box h2 { font-size: 18px; margin-bottom: 4px; }
.smadp-access-box p { color: var(--ink-3); font-size: 13.5px; margin-bottom: 14px; }
.smadp-access-box input[type="text"], .smadp-access-box input[type="password"] { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.smadp-access-box .button-primary, .smadp-access-box input[type="submit"] { background: var(--g-700); color: #fff; border: 0; border-radius: 999px; padding: 10px 20px; font-weight: 700; cursor: pointer; }

/* ---------- Responsivo (consultas de contenedor: se adapta al ancho real donde el tema inserte el micrositio) ---------- */
.smadp-app { container-type: inline-size; container-name: smadp; }
.smadp.alignfull { border-radius: 0; width: auto; max-width: none; }
.smadp.alignfull .smadp-hdr, .smadp.alignfull .smadp-foot { border-radius: 0; }
@container smadp (max-width: 1180px) {
	.smadp-kpis { grid-template-columns: 1fr 1fr 1fr; }
	.smadp-kpi:nth-child(4), .smadp-kpi:nth-child(5) { grid-column: span 1; }
	.smadp-card.w8 { grid-column: span 12; }
	.smadp-card.w4:has(.umap-side) { grid-column: span 12; }
	.smadp-chart.umap-side { height: 320px; }
	.smadp-card.w4 { grid-column: span 6; }
	.smadp-map-wrap { grid-template-columns: 1fr; }
	.smadp-map-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
}
@container smadp (max-width: 960px) {
	.smadp-body { grid-template-columns: 1fr; padding: 16px; }
	.smadp-filters { display: none; position: static; max-height: none; }
	.smadp.filters-open .smadp-filters { display: flex; }
	.smadp-filters__close { display: block; }
	.smadp-filters-toggle { display: inline-flex; }
	.smadp-card.w6, .smadp-card.w4, .smadp-card.w8 { grid-column: span 12; }
	.smadp-hdr { padding: 12px 16px; }
	.smadp-hero { padding: 22px 16px 26px; }
	.smadp-foot { padding: 16px; }
}
@container smadp (min-width: 700px) and (max-width: 960px) {
	.smadp-kpis { grid-template-columns: 1fr 1fr; }
	.smadp-kpi--pair:last-child { grid-column: 1 / -1; }
	.smadp-card.w4 { grid-column: span 4; }
	.smadp-card.w6 { grid-column: span 6; }
}
@container smadp (max-width: 700px) {
	.smadp-kpis { grid-template-columns: 1fr; }
}
@container smadp (max-width: 600px) {
	.smadp-map.smadp-umap { height: 380px; }
	.smadp-hdr { flex-wrap: wrap; }
	.smadp-hdr__logos { gap: 12px; }
	.smadp-hdr__logos img { height: 34px; }
	.smadp-hdr__logos .sep { height: 28px; }
	.smadp-hdr__actions { width: 100%; }
	.smadp-hdr__actions .smadp-btn { flex: 1; }
	.smadp-kpi { padding: 12px; }
	.smadp-kpi__val { font-size: 22px; }
	.smadp-kpis { gap: 10px; }
	.smadp-hero__meta { text-align: left; }
	.smadp:not(.no-hdr) .smadp-hero__meta .smadp-btn { display: none; }
	.smadp-hero__btns { justify-content: flex-start; }
	.smadp.no-hdr .smadp-hero__btns .smadp-btn { flex: 1; }
	.smadp-map { height: 400px; }
	.smadp-chart { height: 280px; }
	.smadp-chart.tall, .smadp-chart.xl { height: 360px; }
	.smadp-card { padding: 14px; }
}
@media (max-width: 600px) {
	.smadp { font-size: 14px; border-radius: 0; }
	.smadp-form { grid-template-columns: 1fr; padding: 16px; }
	.smadp-modal { padding: 0; }
	.smadp-modal__box { border-radius: 0; min-height: 100%; }
}

/* ---------- Impresión / PDF ---------- */
@media print {
	body * { visibility: hidden; }
	.smadp, .smadp * { visibility: visible; }
	.smadp { position: absolute; left: 0; top: 0; width: 100%; background: #fff; font-size: 11px; }
	.smadp-filters, .smadp-tabs, .smadp-hdr__actions, .smadp-card__tools, .smadp-table-tools, .smadp-pager, .smadp-map-side, .smadp-foot .access, .smadp-modal, .smadp-filters-toggle, .smadp-downloads, .smadp-loading { display: none !important; }
	.smadp-body { display: block; padding: 0 10px; }
	.smadp-panel[hidden] { display: grid !important; }
	.smadp-panel { break-inside: auto; margin-bottom: 12px; }
	.smadp-card, .smadp-kpi { box-shadow: none; break-inside: avoid; }
	.smadp-hero { -webkit-print-color-adjust: exact; print-color-adjust: exact; padding: 14px 16px; }
	.smadp-table-scroll { overflow: visible; }
	.smadp-print-only { display: block !important; }
}
.smadp-print-only { display: none; }

/* ---------- Galería fotográfica ---------- */
.smadp-gal-grid { display: grid; grid-template-columns: repeat(var(--gal-n, 4), minmax(0, 1fr)); gap: 12px; }
.smadp-gal-grid--mosaic { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-flow: dense; }
.smadp-gal-grid--mosaic .smadp-gal-item--big { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; height: 100%; }
.smadp-gal-grid--mosaic .smadp-gal-item--big .cap { font-size: 15px; padding: 40px 16px 14px; }
@media (max-width: 760px) {
	.smadp-gal-grid, .smadp-gal-grid--mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
	.smadp-gal-grid--mosaic .smadp-gal-item--big { grid-row: span 1; aspect-ratio: 16 / 10; height: auto; }
	.smadp-gal-grid:not(.smadp-gal-grid--mosaic) .smadp-gal-item:only-child { grid-column: 1 / -1; }
}
.smadp-gal-item { position: relative; border: 0; padding: 0; margin: 0; border-radius: 12px; overflow: hidden; cursor: zoom-in; background: var(--line-2); aspect-ratio: 4 / 3; display: block; width: 100%; }
.smadp-gal-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.smadp-gal-item:hover img { transform: scale(1.04); }
.smadp-gal-item .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 12px 10px; background: linear-gradient(transparent, rgba(0,0,0,.72)); color: #fff; text-align: left; font-size: 12.5px; line-height: 1.3; display: flex; flex-direction: column; gap: 2px; }
.smadp-gal-item .cap em { font-style: normal; opacity: .85; font-size: 11.5px; }
.smadp .smadp-empty svg { width: 34px; height: 34px; color: var(--g-700); margin-bottom: 6px; }
.smadp-lightbox { position: fixed; inset: 0; z-index: 100001; background: rgba(8,16,12,.94); display: flex; align-items: center; justify-content: center; padding: 20px 64px; border-radius: 0; }
.smadp-lightbox figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.smadp-lightbox img { max-width: 100%; max-height: calc(100vh - 110px); object-fit: contain; border-radius: 8px; }
.smadp-lightbox figcaption { color: #e9f3ee; font-size: 14px; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.smadp-lightbox figcaption span { opacity: .8; font-size: 12.5px; }
.smadp-lightbox button { position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0; width: 46px; height: 46px; border-radius: 50%; font-size: 28px; line-height: 1; cursor: pointer; }
.smadp-lightbox button:hover { background: rgba(255,255,255,.25); }
.smadp-lightbox .lb-close { top: 16px; right: 16px; }
.smadp-lightbox .lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.smadp-lightbox .lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) { .smadp-lightbox { padding: 60px 8px; } .smadp-lightbox .lb-prev, .smadp-lightbox .lb-next { top: auto; bottom: 14px; transform: none; } }

/* ---------- Formulario oficial ---------- */
.smadp-form-dest { color: var(--g-800); font-weight: 800; font-size: 13.5px; line-height: 1.4; text-transform: uppercase; letter-spacing: .01em; }
.smadp-form-sec { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 14.5px; color: var(--ink); border-bottom: 1px solid var(--line); padding: 10px 0 6px; margin-top: 4px; }
.smadp-form-sec span { width: 24px; height: 24px; border-radius: 50%; background: var(--g-700); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 12.5px; flex: none; }
.smadp-form .muted { font-weight: 400; color: var(--ink-3); }
.smadp-form .hint { color: var(--ink-3); font-size: 12px; }
.smadp-static { border: 1px dashed var(--line); border-radius: 10px; padding: 9px 11px; background: var(--g-50); min-height: 40px; font-size: 14px; }
.smadp-form-trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.smadp-geo { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; }
.smadp-form input[name="lat"], .smadp-form input[name="lon"], .smadp-form input[name="ubicacion_enlace"] { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; font-size: 14px; min-height: 40px; }
.smadp-radios { display: flex; gap: 22px; padding: 6px 0; }
.smadp-radios label { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; cursor: pointer; }
.smadp-radios input { width: 18px; height: 18px; accent-color: var(--g-700); }
.smadp-file { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.smadp-file-list { font-size: 13px; color: var(--ink-2); word-break: break-all; }
.smadp-sign { position: relative; border: 1.5px dashed #9fb3a9; border-radius: 12px; background: #fff; }
.smadp-sign canvas { width: 100%; height: 160px; display: block; touch-action: none; cursor: crosshair; border-radius: 12px; }
.smadp-sign .ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #a8b5ae; font-size: 14px; pointer-events: none; }
.smadp-sign__tools { display: flex; justify-content: flex-end; margin-top: 8px; } /* v1.19: botón debajo del recuadro de firma */
.smadp-sign::after { content: ""; position: absolute; left: 24px; right: 24px; bottom: 34px; border-bottom: 1px solid #c9d3ce; pointer-events: none; }
.smadp-privacy { margin-bottom: 8px; }
.smadp-aviso { z-index: 100002; }
.smadp-aviso__body { padding: 18px 22px; font-size: 14px; line-height: 1.55; max-height: 60vh; overflow: auto; }
.smadp-aviso__body h3 { font-size: 16px; margin-bottom: 8px; color: var(--g-800); }
.smadp-aviso__body p { margin: 0 0 10px; }
.smadp-form .has-error .smadp-sign, .smadp-form .has-error .smadp-radios, .smadp-form .has-error .smadp-species-pick { outline: 2px solid var(--danger); outline-offset: 2px; border-radius: 10px; }
@media (max-width: 600px) { .smadp-form-trio { grid-template-columns: 1fr; } .smadp-geo { grid-template-columns: 1fr 1fr; } .smadp-geo button { grid-column: 1 / -1; } }

/* Tarjetas dobles (Solicitudes y plantas / Género) */
.smadp-kpi__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 2px; }
.smadp-kpi__cell { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.smadp-kpi__cell + .smadp-kpi__cell { border-left: 1px solid var(--line); padding-left: 12px; }
.smadp-kpi__lbl { font-size: 12.5px; color: var(--ink-2); font-weight: 600; margin-top: -2px; }
.smadp-kpi__ico { width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; flex: none; margin-top: 2px; }
.smadp-kpi__ico svg { width: 20px; height: 20px; }
.smadp-kpi__cell:first-child .smadp-kpi__ico { background: #f8eddf; color: #A8641F; }
.smadp-kpi__cell:last-child .smadp-kpi__ico { background: #e3efe8; color: #2D6A4F; }
.smadp-kpi__gico { display: none; }
.smadp-kpi__split { display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: var(--line-2); margin-top: 8px; gap: 2px; }
.smadp-kpi__split i { display: block; height: 100%; }
.smadp-kpi__split .f { background: #C0782F; } .smadp-kpi__split .m { background: #2D6A4F; }
.smadp-kpi.is-gen::before { background: linear-gradient(#C0782F, #2D6A4F); }

/* Descargas a Excel */
.smadp-btn--excel { background: #1d6f42; color: #fff !important; border-color: #1d6f42; }
.smadp-btn--excel:hover { background: #155a35; }
.smadp-dlbar { grid-column: span 12; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; background: #eef7f1; border: 1px solid #cfe5d7; border-radius: var(--radius); padding: 12px 16px; }
.smadp-dlbar__txt { display: flex; gap: 12px; align-items: center; min-width: 0; }
.smadp-dlbar__txt > svg { width: 26px; height: 26px; color: #1d6f42; flex: none; }
.smadp-dlbar__txt strong { display: block; font-size: 14.5px; color: var(--ink); }
.smadp-dlbar__txt span { display: block; font-size: 12.5px; color: var(--ink-2); }
.smadp-note--internal { grid-column: span 12; display: flex; align-items: center; gap: 10px; background: #fff8e6; border: 1px solid #f0dca8; border-radius: var(--radius); padding: 10px 14px; font-size: 13.5px; color: var(--ink); }
.smadp-note--internal > svg { width: 18px; height: 18px; color: #9a6b00; flex: none; }
@container smadp (max-width: 600px) { .smadp-dlbar .smadp-btn { width: 100%; } }
@media print { .smadp-dlbar { display: none !important; } }

/* ---------- v1.18: formulario en dos recuadros y comprobante ---------- */
.smadp-box { border: 1.5px solid #cfe3d8; border-radius: 14px; padding: 4px 16px 16px; margin: 4px 0 0; background: #fbfdfc; min-width: 0; }
.smadp-box > legend { display: flex; align-items: center; gap: 10px; padding: 0 8px; margin-left: -6px; }
.smadp-box > legend .ico { width: 34px; height: 34px; border-radius: 10px; background: var(--g-700); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.smadp-box > legend .ico svg { width: 19px; height: 19px; }
.smadp-box > legend b { display: block; font-size: 15.5px; font-weight: 800; color: var(--ink); }
.smadp-box > legend small { display: block; font-size: 12px; color: var(--ink-3); font-weight: 400; }
.smadp-box__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 10px; }
.smadp-box__grid .full { grid-column: 1 / -1; }
.smadp-box__sub { font-weight: 800; font-size: 13.5px; color: var(--g-800); border-top: 1px dashed #cfe3d8; padding-top: 12px; margin-top: 2px; }
@media (max-width: 640px) { .smadp-box { padding: 2px 12px 14px; } .smadp-box__grid { grid-template-columns: 1fr; } }
.smadp-form-ok__btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 6px 0 18px; }
.smadp-rec-preview { text-align: left; max-width: 640px; margin: 0 auto; border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #fff; }
.smadp-rec__hdr { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: #03543c; color: #fff; padding: 12px 14px; border-radius: 10px; }
.smadp-rec__hdr small { display: block; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.smadp-rec__hdr b { font-size: 15px; }
.smadp-rec__folio { text-align: right; } .smadp-rec__folio b { font-size: 18px; letter-spacing: .03em; }
.smadp-rec h4 { font-size: 16px; margin: 14px 0 2px; }
.smadp-rec__date { color: var(--ink-3); font-size: 12px; margin: 0 0 10px; }
.smadp-rec__box { border: 1.5px solid #cfe3d8; border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.smadp-rec__box h5 { margin: 0 0 6px; font-size: 12px; color: var(--g-800); text-transform: uppercase; letter-spacing: .04em; }
.smadp-rec__box table { width: 100%; border-collapse: collapse; font-size: 13px; }
.smadp-rec__box th { text-align: left; color: var(--ink-3); font-weight: 400; width: 40%; padding: 3px 8px 3px 0; vertical-align: top; }
.smadp-rec__box td { padding: 3px 0; font-weight: 700; word-break: break-word; }
.smadp-rec__sign { margin-top: 8px; display: inline-flex; flex-direction: column; align-items: center; }
.smadp-rec__sign img { height: 54px; border-bottom: 1px solid var(--ink); }
.smadp-rec__sign span { font-size: 11px; color: var(--ink-3); margin-top: 3px; }
.smadp-rec__note { font-size: 12px; color: var(--ink-3); line-height: 1.45; margin: 4px 0 0; }
.smadp-sign .ph[hidden] { display: none; }

/* ---------- v1.19 ---------- */
.smadp-hero__btns { flex-wrap: wrap; justify-content: flex-end; }
.js-cnt { font-variant-numeric: tabular-nums; }
.smadp-sublabel { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; text-transform: none; letter-spacing: 0; }
.smadp-geo-ok { margin-top: 6px; font-size: 12.5px; font-weight: 600; color: var(--g-800); background: var(--g-50, #eef7f2); border-radius: 8px; padding: 6px 10px; }
.smadp-form .has-error input[name="lat"], .smadp-form .has-error input[name="lon"] { border-color: var(--danger); }
/* Consulta de estatus */
.smadp-st { max-width: 620px; }
.smadp-st__form { padding: 20px 22px 22px; display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 12px; align-items: end; }
.smadp-st__form .full, .smadp-st__form .smadp-form-alert { grid-column: 1 / -1; }
.smadp-st__form[hidden] { display: none; }
.smadp-st__go .smadp-btn { height: 42px; }
.smadp-st__res:empty { display: none; }
.smadp-st__card { padding: 8px 22px 22px; }
.smadp-st__meter { text-align: center; }
.smadp-st__gauge { width: 100%; max-width: 330px; height: auto; display: block; margin: 0 auto; }
.smadp-st__lbl { font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; margin-top: -4px; }
.smadp-st__state { font-size: 24px; font-weight: 800; color: var(--ink); margin-top: 2px; }
.smadp-st__desc { text-align: center; color: var(--ink-2); margin: 8px auto 12px; max-width: 460px; }
.smadp-st__nota { background: #fff8e6; border: 1px solid #f0dca8; border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-bottom: 12px; }
.smadp-st__nota b { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: #8a5a00; margin-bottom: 2px; }
.smadp-st__dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 14px; margin: 0 0 14px; padding: 12px 14px; background: #f6f9f7; border-radius: 10px; }
.smadp-st__dl dt { font-size: 11.5px; color: var(--ink-3); } .smadp-st__dl dd { margin: 0; font-weight: 700; }
.smadp-st__steps { list-style: none; margin: 0 0 6px; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; counter-reset: s; }
.smadp-st__steps li { position: relative; text-align: center; font-size: 12px; color: var(--ink-3); }
.smadp-st__steps li::before { content: ""; position: absolute; top: 14px; left: -50%; width: 100%; height: 3px; background: #e3e8e5; z-index: 0; }
.smadp-st__steps li:first-child::before { display: none; }
.smadp-st__steps li.is-done::before { background: var(--c); }
.smadp-st__steps .dot { position: relative; z-index: 1; width: 30px; height: 30px; border-radius: 50%; background: #e3e8e5; color: #7a8780; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; }
.smadp-st__steps .dot svg { width: 16px; height: 16px; }
.smadp-st__steps li.is-done .dot { background: var(--c); color: #fff; }
.smadp-st__steps li.is-cur .dot { box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 30%, transparent); }
.smadp-st__steps .t { display: block; margin-top: 4px; line-height: 1.25; }
.smadp-st__steps .t b { display: block; color: var(--ink); font-size: 12px; }
.smadp-st__steps li:not(.is-done) .t b { color: var(--ink-3); font-weight: 600; }
.smadp-st__steps small { display: block; font-size: 11px; }
@media (max-width: 560px) {
	.smadp-st__form { grid-template-columns: 1fr; }
	.smadp-st__steps { grid-template-columns: 1fr; text-align: left; }
	.smadp-st__steps li { display: flex; align-items: center; gap: 10px; text-align: left; }
	.smadp-st__steps li::before { display: none; }
	.smadp-st__steps .t { margin: 0; }
}
