/* =========================================================
   Seguridad e Higiene - Municipio de Lobos
   Estética unificada con Tramites-On-Line / ctacte.asp
   Diseño exclusivamente para PC (sin adaptación móvil)
   ========================================================= */

:root {
  --primary: #0b5c8f;
  --primary-dark: #083e66;
  --accent: #1c75bc;
  --accent-dark: #0f5f9f;
  --accent-soft: #e9f3fb;
  --bg: #eef3f8;
  --card: #ffffff;
  --text: #1d2939;
  --muted: #667085;
  --border: #d3dfeb;
  --success: #12715b;
  --danger: #b42318;
  --danger-soft: #fff3f2;
  --warning: #b45309;
  --warning-soft: #fff7ed;
  --shadow: 0 12px 30px rgba(11, 92, 143, .10);
  --shadow-strong: 0 18px 40px rgba(10, 53, 89, .18);
  --radius: 18px;
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  padding: 0;
}

html {
  font-family: "Inter", Arial, Helvetica, sans-serif;
  background: var(--bg);
}

body {
  min-width: 1100px;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(15, 76, 129, .09), transparent 28%),
    linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
  color: var(--text);
  font-family: "Inter", Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover,
a:focus {
  color: var(--accent-dark);
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

.clr {
  clear: both;
  float: none;
}

/* =========================================================
   Contenedor principal - equivalente al content-wrap de ctacte
   ========================================================= */
#Contenedor {
  width: 980px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 0 40px;
}

/* =========================================================
   Encabezado
   ========================================================= */
.header {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) 270px;
  align-items: center;
  gap: 18px;
  width: 980px;
  margin: 0 auto 18px;
}

#ContLogo {
  width: 210px;
  margin: 0;
  float: none;
}

#ContLogo img {
  display: block;
  width: 210px;
  height: auto;
}

.brand-copy {
  min-width: 0;
}

.brand-kicker {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.brand-title {
  display: block;
  margin: 0;
  color: var(--primary-dark);
  font-size: 34px;
  font-weight: 800;
  line-height: 1.12;
}

.Empresa {
  width: 270px;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #f9fbfd;
  color: var(--text);
  text-align: right;
  float: none;
}

.Empresa p.Textos {
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
  text-align: right;
}

.Empresa a {
  font-weight: 700;
}

/* =========================================================
   Navegación - mismo lenguaje de botones de ctacte.asp
   ========================================================= */
.Nav {
  grid-column: 1 / -1;
  width: 980px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  float: none;
}

.mi-menu {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  height: auto;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mi-menu br { display: none; }

.mi-menu > li {
  display: block;
  height: auto;
  margin: 0;
  padding: 0;
  list-style: none;
  position: relative;
  float: none;
}

.mi-menu > li > a,
.back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  height: 50px;
  padding: 0 18px;
  margin: 0;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  box-shadow: 0 10px 22px rgba(28, 117, 188, .22);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .15s ease, box-shadow .2s ease;
}

.mi-menu > li > a:hover,
.mi-menu > li > a:focus,
.back:hover,
.back:focus {
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(28, 117, 188, .28);
}

.mi-menu ul {
  display: none;
  position: absolute;
  z-index: 1000;
  top: 56px;
  left: 0;
  width: 240px;
  margin: 0;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-strong);
  opacity: 1;
  list-style: none;
}

.mi-menu li:hover > ul { display: block; }

.mi-menu ul li {
  width: 100%;
  height: auto;
  margin: 0;
  padding: 0;
  float: none;
  overflow: visible;
}

.mi-menu ul li a {
  display: block;
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--primary-dark);
  font-weight: 700;
  line-height: 1.3;
}

.mi-menu ul li a:hover {
  background: #f7fbff;
  text-decoration: none;
}

/* =========================================================
   Títulos y textos
   ========================================================= */
h1, h2, h3,
h2.Titulos,
p.Titulos {
  color: var(--primary-dark);
  font-family: inherit;
}

h2.Titulos,
p.Titulos {
  display: block;
  width: 100%;
  margin: 24px 0 12px;
  padding: 0;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.25;
  float: none;
}

p.Textos {
  width: 100%;
  margin: 18px 0;
  padding: 18px 20px;
  border: 1px solid #d5e5f5;
  border-radius: 16px;
  background: linear-gradient(180deg, #f6faff 0%, #eef5fc 100%);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  float: none;
}

p.Textos i {
  color: var(--primary-dark) !important;
  font-style: normal;
  font-weight: 700;
}

/* =========================================================
   Aviso principal de la pantalla de ingreso
   ========================================================= */
.aviso-principal {
  width: 980px;
  margin: 0 auto 22px;
  padding: 24px 26px;
  border: 1px solid #f0d9bd;
  border-radius: 18px;
  background: linear-gradient(180deg, #fffaf4 0%, var(--warning-soft) 100%);
  box-shadow: 0 10px 26px rgba(180, 83, 9, .08);
  color: var(--text);
}

.aviso-principal > b:first-child font,
.aviso-principal font[color="#FF0000"] {
  color: var(--warning) !important;
  font-family: inherit !important;
  font-size: 24px !important;
}

.aviso-principal .moz-signature {
  margin: 5px 0;
  color: var(--text);
}

.aviso-principal .moz-signature b i {
  color: var(--primary-dark);
  font-style: normal;
}

/* =========================================================
   Formularios - mismos bordes, alturas y sombras de ctacte.asp
   ========================================================= */
#ContForms {
  width: 100%;
  margin: 18px 0 22px;
  padding: 22px 24px;
  border: 1px solid rgba(211, 223, 235, .95);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  float: none;
}

#ContForms form {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
  width: 100%;
  margin: 0;
}

#Cont-Casillero,
[id="Cont-Casillero noborder"] {
  width: 250px;
  max-width: none;
  margin: 0;
  float: none;
}

[id="Cont-Casillero noborder"] {
  width: auto;
}

label {
  display: block;
  margin: 0 0 8px;
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 700;
}

#Cont-Casillero > input[type="text"],
#Cont-Casillero > input[type="password"],
#Cont-Casillero > input[type="email"],
#Cont-Casillero > input[type="number"],
#Cont-Casillero > select,
#Cont-Casillero > textarea,
#ContForms input[type="file"] {
  width: 250px;
  max-width: none;
  min-height: 50px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  float: none;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

#Cont-Casillero > input:focus,
#Cont-Casillero > select:focus,
#Cont-Casillero > textarea:focus,
#ContForms input[type="file"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(15, 76, 129, .12);
}

input.Enviar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 150px;
  max-width: none;
  height: 50px;
  margin: 0;
  padding: 0 22px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  box-shadow: 0 10px 22px rgba(28, 117, 188, .22);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  opacity: 1;
  cursor: pointer;
  float: none;
  transition: transform .15s ease, box-shadow .2s ease;
}

input.Enviar:hover,
input.Enviar:focus {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  opacity: 1;
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(28, 117, 188, .28);
}

/* Campos internos de formularios de cálculo */
.TextBox,
.TextBoxCM {
  min-height: 34px;
  height: 34px;
  margin: 0;
  padding: 6px 8px;
  border: 1px solid var(--border) !important;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
}

.TextBox { width: 100%; text-align: right; }
.TextBoxCM { width: 100% !important; text-align: left; }

/* =========================================================
   Botones secundarios / accesos
   ========================================================= */
.TramiteBtn,
a.two,
.guia {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 190px;
  min-height: 50px;
  margin: 0 10px 14px 0;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  color: var(--primary-dark);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  opacity: 1;
  float: none;
  transition: transform .15s ease, background-color .2s ease, box-shadow .2s ease;
}

.TramiteBtn:hover,
a.two:hover,
.guia:hover {
  border-color: var(--border);
  background: #f7fbff;
  color: var(--primary-dark);
  text-decoration: none;
  opacity: 1;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(11, 92, 143, .10);
}

.guia {
  justify-content: flex-start;
  width: 100%;
  text-align: left;
}

.actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 12px 0;
  float: none;
}

/* =========================================================
   Listados / tarjetas
   ========================================================= */
ul#resultados {
  width: 100%;
  margin: 10px 0 20px;
  padding: 0;
  float: none;
  list-style: none;
}

ul#resultados li {
  width: 100%;
  margin: 0 0 8px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  list-style: none;
  float: none;
}

ul#CajaUno,
ul#ItemsResultados {
  width: 100%;
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  list-style: none;
  float: none;
}

ul#CajaUno li,
ul#ItemsResultados li {
  display: inline-block;
  margin: 4px 10px 4px 0;
  color: #fff;
  float: none;
}

ul#Resultados {
  width: 100%;
  margin: 0 0 10px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-top: 0;
  background: #fff;
  list-style: none;
  float: none;
}

ul#Resultados li {
  display: inline-block;
  margin: 4px 10px 4px 0;
  color: var(--text);
  border: 0;
  float: none;
}

/* =========================================================
   Tablas y bloques de datos
   ========================================================= */
#table6 {
  width: 100% !important;
  margin: 18px 0;
  padding: 0;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  border-collapse: separate;
  border-spacing: 0;
}

#table6 > tbody > tr > td,
#table6 > tr > td {
  padding: 18px;
  color: var(--text);
}

#table7 {
  width: 100% !important;
  border-collapse: separate;
  border-spacing: 0;
}

#table7 td,
.CeldaIG {
  border-color: var(--border) !important;
}

.CeldaIG {
  padding: 8px 10px;
  background: #fff;
  color: var(--text);
}

/* Encabezados heredados: todos pasan a la paleta de ctacte */
td[bgcolor="#2A3D51"],
td[bgcolor="#2a3d51"],
td[bgcolor="#5A595A"],
td[bgcolor="#5a595a"],
td[bgcolor="#80B539"],
td[bgcolor="#80b539"],
td[bgcolor="#82B63A"],
td[bgcolor="#82b63a"],
td[bgcolor="#000000"] {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%) !important;
  color: #fff !important;
}

td[bgcolor="#ECF8E0"],
td[bgcolor="#ecf8e0"],
td[bgcolor="#DEFFCE"],
td[bgcolor="#deffce"],
td[bgcolor="#DCFECB"],
td[bgcolor="#dcfecb"] {
  background: #f2f8fd !important;
  color: var(--text) !important;
}

td[bgcolor="#FBEFEF"],
td[bgcolor="#fbefef"],
td[bgcolor="#FFDDE2"],
td[bgcolor="#ffdde2"] {
  background: #fff3f2 !important;
  color: var(--text) !important;
}

td[bgcolor="#FFFFCC"],
td[bgcolor="#ffffcc"] {
  background: var(--warning-soft) !important;
  color: var(--text) !important;
}

font[face="Verdana"],
font[face="Arial"],
font[face="Arial, Helvetica, sans-serif"],
font[face="Verdana, Arial, Helvetica, sans-serif"] {
  font-family: "Inter", Arial, Helvetica, sans-serif !important;
}

font[color="#FF0000"],
font[color="#ff0000"] {
  color: var(--danger) !important;
}

font[color="#3366CC"],
font[color="#3366cc"],
font[color="#82B63A"],
font[color="#82b63a"] {
  color: var(--primary-dark) !important;
}

/* =========================================================
   Cuenta corriente / Retenciones dentro del iframe
   ========================================================= */
#contenido {
  display: block;
  width: 100% !important;
  height: 600px;
  margin: 4px 0 0;
  padding: 0 !important;
  border: 1px solid rgba(211, 223, 235, .95) !important;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

body.iframe-page {
  min-width: 0;
  min-height: 0;
  padding: 22px;
  background: #fff;
  color: var(--text);
  font-family: "Inter", Arial, Helvetica, sans-serif;
}

body.iframe-page > p:first-of-type {
  margin: 0 0 18px;
  color: var(--primary-dark);
  font-size: 18px;
  font-weight: 800;
}

body.iframe-page > div[align="center"] {
  width: 100%;
}

body.iframe-page table#table1 {
  width: 94% !important;
  margin: 0 auto;
  border: 1px solid var(--border) !important;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

body.iframe-page table#table1 td {
  padding: 9px 10px;
  border-color: var(--border) !important;
  color: var(--text);
  font-family: "Inter", Arial, Helvetica, sans-serif;
}

body.iframe-page table#table1 tr:first-child td {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%) !important;
  color: #fff !important;
  font-weight: 800;
}

body.iframe-page table#table1 tr:first-child td font,
body.iframe-page table#table1 td[bgcolor="#2A3D51"] font {
  color: #fff !important;
}

body.iframe-page table#table1 tr:not(:first-child):hover td:not([bgcolor="#2A3D51"]) {
  background: #fbfdff;
}

body.iframe-page font[size="1"] {
  font-size: 12px !important;
}

body.iframe-page font[size="2"] {
  font-size: 13px !important;
}

/* =========================================================
   Popups de detalle y ayuda
   ========================================================= */
body.popup-page {
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 20px;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", Arial, Helvetica, sans-serif;
}

body.popup-page > p:first-of-type {
  margin: 0 0 16px;
  color: var(--primary-dark);
  font-size: 17px;
  font-weight: 800;
}

body.popup-page table#table1 {
  width: 100% !important;
  border: 1px solid var(--border) !important;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

body.popup-page table#table1 td {
  padding: 9px 10px;
  border-color: var(--border) !important;
  color: var(--text);
}

body.popup-page table#table1 tr:first-child td {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%) !important;
  color: #fff !important;
  font-weight: 800;
}

body.popup-page table#table1 tr:first-child td font {
  color: #fff !important;
}

body.help-page {
  width: 520px;
  min-height: 240px;
  padding: 24px;
  border: 0;
  background: #fff;
}

/* =========================================================
   Mensajes y estados
   ========================================================= */
.Error {
  width: 100%;
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid #ffd4cd;
  border-radius: 14px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 14px;
  font-weight: 700;
  text-align: left;
}

.Error:empty { display: none; }

.Footer {
  width: 980px;
  margin: 34px auto 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  float: none;
}

#ContLogoFooter {
  display: none;
}

.Footer p.Textos,
.Footer .Foot {
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  float: none;
}

/* El Mensaje.asp incluido en Pagos usa .Footer como caja de aviso. */
#ContForms + .Footer,
.Footer:not(:last-child) {
  border-top: 1px solid var(--border);
}

.Numeros {
  color: var(--primary-dark);
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

/* =========================================================
   Régimen Simplificado - tablas heredadas
   ========================================================= */
#table7[border="1"] {
  width: 100% !important;
  margin: 14px 0 22px;
  border: 1px solid var(--border) !important;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

#table7[border="1"] td {
  padding: 10px 12px;
  border-color: var(--border) !important;
}

#table7[border="1"] tr:first-child td {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%) !important;
  color: #fff !important;
  font-weight: 800;
}

#table7[border="1"] tr:first-child td font {
  color: #fff !important;
}

/* Formulario de tarjeta de pago del Régimen Simplificado */
#table12 {
  width: 520px !important;
  margin-top: 14px;
  border: 0;
}

#table12 td {
  padding: 8px;
  color: var(--text);
}

#table12 input[type="text"] {
  width: 260px;
  height: 50px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  font-family: inherit;
  font-size: 15px;
}

/* =========================================================
   Solo impresión: no altera el formato fiscal de comprobantes
   ========================================================= */
@media print {
  html,
  body {
    min-width: 0;
    background: #fff !important;
  }

  #Contenedor {
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .header,
  .Nav,
  .Footer,
  .TramiteBtn,
  input.Enviar {
    display: none !important;
  }

  #ContForms,
  #table6,
  #contenido {
    border: 0 !important;
    box-shadow: none !important;
  }
}

/* Los clear heredados no participan del grid del encabezado. */
.header > .clr { display: none; }


/* =========================================================
   Factura de Seguridad e Higiene - estilo facturas ctacte
   Documento compacto para pantalla PC e impresión A4
   ========================================================= */
body.factura-sh {
  min-width: 0;
  margin: 0;
  padding: 28px 0 36px;
  background:
    radial-gradient(circle at top left, rgba(15, 76, 129, .08), transparent 30%),
    linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
  color: var(--text);
  font-family: "Inter", Arial, Helvetica, sans-serif;
  font-size: 12px;
  line-height: 1.35;
}

.factura-page {
  width: 780px;
  margin: 0 auto;
}

.factura-documento {
  width: 780px !important;
  margin: 0 auto;
  border: 1px solid var(--border) !important;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(10, 53, 89, .15);
  overflow: hidden;
}

.factura-documento > tbody > tr > td,
.factura-documento > tr > td {
  padding: 0;
  border: 0 !important;
  background: #fff;
  color: var(--text);
}

.factura-encabezado {
  padding: 0 !important;
}

.factura-brand {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) 155px;
  align-items: center;
  gap: 18px;
  min-height: 112px;
  padding: 16px 20px;
  border-bottom: 4px solid var(--primary);
  background: #fff;
}

.factura-brand-logo {
  display: flex;
  align-items: center;
  height: 78px;
}

.factura-brand-logo img {
  display: block;
  width: 185px;
  max-height: 78px;
  object-fit: contain;
  object-position: left center;
}

.factura-brand-copy {
  min-width: 0;
}

.factura-kicker {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
}

.factura-brand-copy strong {
  display: block;
  color: var(--primary-dark);
  font-size: 21px;
  font-weight: 800;
  line-height: 1.15;
}

.factura-periodo {
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f7fbff;
  text-align: right;
}

.factura-periodo span {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
}

.factura-periodo strong {
  display: block;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
}

.factura-documento > tbody > tr:nth-child(2) > td,
.factura-documento > tr:nth-child(2) > td {
  padding: 12px 18px 8px;
}

.factura-datos,
.factura-cupon-datos {
  width: 100% !important;
  border-collapse: collapse;
  font-size: 11.5px;
}

.factura-datos td,
.factura-cupon-datos td {
  padding: 3px 5px;
  border: 0 !important;
  color: var(--text);
  vertical-align: middle;
}

.factura-datos tr:first-child td {
  color: var(--primary-dark);
  font-weight: 800;
}

.factura-documento > tbody > tr:nth-child(3) > td,
.factura-documento > tr:nth-child(3) > td {
  padding: 8px 18px 14px;
}

.factura-documento > tbody > tr:nth-child(3) > td > div[align="center"],
.factura-documento > tr:nth-child(3) > td > div[align="center"] {
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
}

.factura-detalle {
  width: 100% !important;
  margin: 8px 0 6px;
  border: 1px solid var(--border) !important;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 10px;
  overflow: hidden;
  font-size: 11px;
}

.factura-detalle td {
  padding: 4px 8px;
  border: 0 !important;
  border-bottom: 1px solid #e4ebf2 !important;
  background: #fff !important;
  color: var(--text) !important;
}

.factura-detalle tr:first-child td {
  padding: 6px 8px;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%) !important;
  color: #fff !important;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.factura-detalle tr:first-child td font {
  color: #fff !important;
  font-family: inherit !important;
  font-size: 10px !important;
}

.factura-detalle tr:last-child td {
  border-bottom: 0 !important;
}

.factura-detalle td[bgcolor="#FFFFCC"],
.factura-detalle td[bgcolor="#ffffcc"] {
  background: #fbfdff !important;
}

.factura-detalle td[bgcolor="#DCFECB"],
.factura-detalle td[bgcolor="#dcfecb"],
.factura-detalle td[bgcolor="#DEFFCE"],
.factura-detalle td[bgcolor="#deffce"] {
  background: #f2f8fd !important;
}

.factura-detalle td[bgcolor="#FFDDE2"],
.factura-detalle td[bgcolor="#ffdde2"] {
  background: #fff1f0 !important;
  color: var(--danger) !important;
}

.factura-detalle font[size="2"] {
  font-family: inherit !important;
  font-size: 11px !important;
}

.factura-sh font[color="#FF0000"],
.factura-sh font[color="#ff0000"] {
  color: var(--danger) !important;
  font-family: inherit !important;
}

.factura-sh font[size="6"] {
  font-family: inherit !important;
  font-size: 24px !important;
  line-height: 1.1;
}

.factura-documento p[align="center"] {
  margin: 7px 0;
}

.factura-documento > tbody > tr:last-child > td,
.factura-documento > tr:last-child > td {
  padding: 12px 18px 16px;
  border-top: 2px dashed #b8c9d8 !important;
  background: #fbfdff;
}

.factura-cupon-datos td {
  padding: 2px 4px;
}

.factura-cupon-datos img {
  max-width: 100%;
  height: auto;
}

.factura-print {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 780px;
  margin: 14px auto 0;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
}

.factura-print a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary-dark);
  text-decoration: none;
}

.factura-print a:hover {
  text-decoration: underline;
}

.factura-print img {
  width: 24px;
  height: auto;
}

@media print {
  body.factura-sh {
    min-width: 0;
    padding: 0;
    background: #fff !important;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 10.5px;
  }

  .factura-page,
  .factura-documento {
    width: 190mm !important;
    margin: 0 auto;
  }

  .factura-documento {
    border: 1px solid #aebdca !important;
    border-radius: 0;
    box-shadow: none;
  }

  .factura-brand {
    min-height: 26mm;
    padding: 3mm 4mm;
  }

  .factura-brand-logo img {
    width: 44mm;
  }

  .factura-brand-copy strong {
    font-size: 17px;
  }

  .factura-print {
    display: none !important;
  }

  .factura-documento,
  .factura-documento tr,
  .factura-documento td,
  .factura-detalle {
    break-inside: avoid;
  }
}
