/* =====================================================================
 * COESPA · Sistema de diseño común
 * ---------------------------------------------------------------------
 * Este bloque es IDÉNTICO en todos los plugins. Si cambias un color,
 * radio o sombra, cámbialo igual en todos los styles.css para que la web
 * mantenga el mismo aspecto.
 * ===================================================================== */
:root{
  /* Tipografía */
  --cx-font:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --cx-mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;

  /* Marca */
  --cx-primary:#0f8a4a;
  --cx-primary-600:#0b733d;
  --cx-primary-700:#085c31;
  --cx-primary-rgb:15,138,74;
  --cx-accent:#14b8a6;
  --cx-accent-rgb:20,184,166;
  --cx-primary-soft:rgba(15,138,74,.10);
  --cx-primary-gradient:linear-gradient(135deg,#12a058 0%,#0f8a4a 55%,#0b733d 100%);

  /* Texto */
  --cx-ink:#0f172a;
  --cx-ink-2:#334155;
  --cx-muted:#64748b;
  --cx-on-primary:#ffffff;

  /* Superficies (efecto cristal) */
  --cx-surface:rgba(255,255,255,.72);
  --cx-surface-strong:rgba(255,255,255,.88);
  --cx-surface-soft:rgba(248,250,252,.62);
  --cx-glass-border:rgba(255,255,255,.75);
  --cx-blur:saturate(170%) blur(16px);
  --cx-backdrop:
    radial-gradient(900px 420px at 0% 0%,rgba(var(--cx-accent-rgb),.14),transparent 62%),
    radial-gradient(800px 420px at 100% 0%,rgba(var(--cx-primary-rgb),.13),transparent 60%),
    radial-gradient(700px 380px at 50% 100%,rgba(99,102,241,.07),transparent 65%),
    linear-gradient(180deg,#f7fbf9 0%,#f2f6f5 100%);

  /* Líneas */
  --cx-line:rgba(15,23,42,.08);
  --cx-line-strong:rgba(15,23,42,.14);

  /* Radios */
  --cx-radius-xs:8px;
  --cx-radius-sm:12px;
  --cx-radius:16px;
  --cx-radius-lg:22px;
  --cx-radius-xl:28px;
  --cx-radius-pill:999px;

  /* Sombras */
  --cx-shadow-sm:0 1px 2px rgba(15,23,42,.05);
  --cx-shadow:0 1px 2px rgba(15,23,42,.04),0 10px 28px -8px rgba(15,23,42,.14);
  --cx-shadow-lg:0 2px 6px rgba(15,23,42,.04),0 28px 56px -16px rgba(15,23,42,.22);
  --cx-shadow-primary:0 10px 22px -8px rgba(var(--cx-primary-rgb),.55);
  --cx-shadow-danger:0 10px 22px -8px rgba(220,38,38,.50);
  --cx-ring:0 0 0 4px rgba(var(--cx-primary-rgb),.16);

  /* Estados */
  --cx-success:#0f8a4a;
  --cx-success-bg:rgba(16,185,129,.10);
  --cx-success-line:rgba(16,185,129,.30);
  --cx-danger:#dc2626;
  --cx-danger-700:#b91c1c;
  --cx-danger-ink:#991b1b;
  --cx-danger-bg:rgba(239,68,68,.09);
  --cx-danger-line:rgba(239,68,68,.30);
  --cx-warning-ink:#9a3412;
  --cx-warning-bg:rgba(249,115,22,.10);
  --cx-warning-line:rgba(249,115,22,.32);
  --cx-info-ink:#1e40af;
  --cx-info-bg:rgba(59,130,246,.09);
  --cx-info-line:rgba(59,130,246,.28);

  /* Flecha de los desplegables */
  --cx-select-arrow:url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%230f8a4a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");

  /* Movimiento */
  --cx-ease:cubic-bezier(.2,.8,.2,1);
  --cx-speed:.22s;
}

/* ===================================================================== */

/* ---------- Selector de menús ---------- */

.sm-scope{
  padding:clamp(12px,3vw,24px);
  box-sizing:border-box;
  font-family:var(--cx-font);
  color:var(--cx-ink);
  background:var(--cx-backdrop);
  border-radius:var(--cx-radius-xl);
}

.sm-scope .sm-card{
  padding:clamp(16px,3vw,26px);
  background:var(--cx-surface);
  -webkit-backdrop-filter:var(--cx-blur);
  backdrop-filter:var(--cx-blur);
  border:1px solid var(--cx-glass-border);
  border-radius:var(--cx-radius-lg);
  box-shadow:var(--cx-shadow-lg);
}

.sm-scope .sm-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
}

.sm-scope label.sm-field{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin:0;
  font-size:13px;
  font-weight:600;
  color:var(--cx-ink-2);
}

.sm-scope select{
  -webkit-appearance:none;
  appearance:none;
  width:100%;
  padding:11px 40px 11px 14px;
  font-family:inherit;
  font-size:15px;
  color:var(--cx-ink);
  background:var(--cx-select-arrow) no-repeat right 12px center,var(--cx-surface-strong);
  border:1px solid var(--cx-line-strong);
  border-radius:var(--cx-radius-sm);
  box-shadow:var(--cx-shadow-sm);
  cursor:pointer;
  transition:border-color var(--cx-speed) var(--cx-ease),box-shadow var(--cx-speed) var(--cx-ease);
}

.sm-scope select:hover{
  border-color:rgba(var(--cx-primary-rgb),.35);
}

.sm-scope select:focus{
  outline:none;
  border-color:var(--cx-primary);
  box-shadow:var(--cx-ring);
}

.sm-scope .sm-help{
  margin:12px 0 0;
  font-size:13px;
  color:var(--cx-muted);
}

.sm-scope .sm-result{
  margin-top:18px;
}

.sm-scope .sm-pdf{
  overflow:hidden;
  border-radius:var(--cx-radius);
  box-shadow:var(--cx-shadow);
}

.sm-scope .sm-frame{
  display:block;
  width:100%;
  height:min(80vh,900px);
  border:0;
  border-radius:var(--cx-radius);
  background:#fff;
}

.sm-scope .sm-status{
  padding:18px;
  text-align:center;
  color:var(--cx-muted);
  background:var(--cx-surface-soft);
  border:1px dashed var(--cx-line-strong);
  border-radius:var(--cx-radius);
}

.sm-scope .sm-spinner{
  display:inline-block;
  width:20px;
  height:20px;
  margin-right:8px;
  vertical-align:-4px;
  border:3px solid rgba(var(--cx-primary-rgb),.15);
  border-top-color:var(--cx-primary);
  border-radius:50%;
  animation:smspin .9s linear infinite;
}

@keyframes smspin{
  to{transform:rotate(360deg);}
}

@media (max-width:800px){
  .sm-scope .sm-grid{
    grid-template-columns:1fr;
  }
}

/* ---------- Ajuste anti-tema ----------
 * Muchos temas fijan height/line-height en select e input y, con el relleno
 * de este diseño, el texto quedaba cortado por abajo. Aquí la altura se
 * adapta al contenido. Selectores algo más específicos para ganar al tema.
 * -------------------------------------- */
.sm-scope .sm-field select{
  height:auto;
  line-height:1.4;
  box-sizing:border-box;
  min-height:46px;
  padding-top:11px;
  padding-bottom:11px;
}
