/*
  ASEMTUR UI (drop-in) — solo presentación.
  - No depende de librerías.
  - Diseñado para convivir con HTML viejo (tablas, Dreamweaver, etc.).
  - Se activa únicamente cuando el <body> tiene class="asemtur-app".
*/

body.asemtur-app{
  --asemtur-orange:#E88030; /* del logo */
  --asemtur-orange-2:#F0C840; /* acento dorado */
  --asemtur-green:#204838; /* del logo */
  --asemtur-ink:#0f172a;
  --asemtur-muted:#64748b;
  --asemtur-bg:#f6f7fb;
  --asemtur-card:#ffffff;
  --asemtur-border:#e5e7eb;
  --asemtur-shadow:0 10px 30px rgba(15,23,42,.10);

  margin:0;
  padding:0;
  background: linear-gradient(180deg, #ffffff 0%, var(--asemtur-bg) 70%);
  color:var(--asemtur-ink);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, Helvetica, sans-serif;
  font-size:14px;
  line-height:1.45;
}

/* Contenedor central (las plantillas usan tabla centrada) */
body.asemtur-app > table{
  margin:28px auto !important;
  border-radius:16px;
  overflow:hidden;
  box-shadow: var(--asemtur-shadow);
  background: var(--asemtur-card);
}

/* Si la plantilla usa celdas laterales con background imagen (der.gif), mantenemos limpio */
body.asemtur-app td[background]{
  background-repeat: repeat-y;
}

/* Tipografía */
body.asemtur-app h1,
body.asemtur-app h2,
body.asemtur-app h3{
  margin: 0 0 10px 0;
  line-height: 1.2;
}
body.asemtur-app a{ color: var(--asemtur-green); text-decoration: none; }
body.asemtur-app a:hover{ text-decoration: underline; }

/* Inputs & botones (incluye el login) */
body.asemtur-app input[type="text"],
body.asemtur-app input[type="password"],
body.asemtur-app input[type="number"],
body.asemtur-app input[type="date"],
body.asemtur-app select,
body.asemtur-app textarea{
  width: 100%;
  max-width: 320px;
  padding: 10px 12px;
  border: 1px solid var(--asemtur-border);
  border-radius: 10px;
  background: #fff;
  color: var(--asemtur-ink);
  outline: none;
  box-sizing: border-box;
}

body.asemtur-app textarea{ max-width: 520px; min-height: 90px; }

body.asemtur-app input[type="text"]:focus,
body.asemtur-app input[type="password"]:focus,
body.asemtur-app input[type="number"]:focus,
body.asemtur-app input[type="date"]:focus,
body.asemtur-app select:focus,
body.asemtur-app textarea:focus{
  border-color: rgba(232,128,48,.65);
  box-shadow: 0 0 0 4px rgba(232,128,48,.15);
}

body.asemtur-app input[type="submit"],
body.asemtur-app input[type="button"],
body.asemtur-app button{
  appearance:none;
  border: 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--asemtur-orange);
  color:#fff;
  font-weight: 700;
  cursor:pointer;
  box-shadow: 0 8px 18px rgba(232,128,48,.25);
}
body.asemtur-app input[type="submit"]:hover,
body.asemtur-app input[type="button"]:hover,
body.asemtur-app button:hover{
  filter: brightness(0.97);
}
body.asemtur-app input[type="submit"]:active,
body.asemtur-app input[type="button"]:active,
body.asemtur-app button:active{
  transform: translateY(1px);
}

/* Tablas de datos */
body.asemtur-app table{
  border-collapse: collapse;
}

/* Estilizar tablas “de contenido” sin romper las de layout: aplicamos solo cuando tienen borde/celdas visibles o width 100% */
body.asemtur-app table[width="100%"],
body.asemtur-app table[border="1"],
body.asemtur-app table[border="0"][cellpadding]{
  color: var(--asemtur-ink);
}

body.asemtur-app td, body.asemtur-app th{
  font-size: 14px;
}

body.asemtur-app th{
  text-align:left;
  font-weight: 800;
  color: var(--asemtur-green);
}

/* “Card” simple para cajas con background (login fond_usuario.jpg). No elimina la imagen; solo mejora legibilidad */
body.asemtur-app td[background*="fond_usuario"],
body.asemtur-app table[background*="fond_usuario"]{
  background-color: rgba(255,255,255,.85);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(229,231,235,.8);
  border-radius: 14px;
}

/* Separadores */
body.asemtur-app hr{
  border:0;
  height:1px;
  background: var(--asemtur-border);
  margin: 14px 0;
}

/* Utilidades (por si las añadimos en pantallas puntuales) */
.as-card{ background: var(--asemtur-card); border:1px solid var(--asemtur-border); border-radius:16px; box-shadow: var(--asemtur-shadow); }
.as-pill{ display:inline-block; padding:4px 10px; border-radius:999px; background: rgba(32,72,56,.10); color: var(--asemtur-green); font-weight:700; }
.as-muted{ color: var(--asemtur-muted); }

/* Responsive básico: si la tabla principal se sale, permitir scroll horizontal sin romper */
@media (max-width: 820px){
  body.asemtur-app > table{ width: calc(100% - 24px) !important; }
  body.asemtur-app{ padding: 12px; }
}
