/*
 Theme Name:  GeneratePress Child intranet
 Theme URI:   https://example.com
 Description: Child theme para GeneratePress
 Author:      AB Internet
 Template:    generatepress
 Description: GeneratePress child theme for intranet
 Version:     1.1.1
 Text Domain: generatepress-child-intranet
*/

/*Login*/
.abi-login-template .entry-content {
  max-width: 100%;
}
.abi-login-template .abi-login-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
@media (max-width: 900px) {
  .abi-login-template .abi-login-columns {
    grid-template-columns: 1fr;
  }
}
.abi-login-template .abi-card {
  background: #fff;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.abi-login-template .abi-card h2 {
  margin-top: 0;
}

/* Theme My Login */
.abi-login-template .tml form p {
  margin-bottom: 0.75rem;
}
.abi-login-template .tml input[type="text"],
.abi-login-template .tml input[type="password"],
.abi-login-template .tml input[type="email"],
.abi-login-template .tml input[type="url"],
.abi-login-template .tml input[type="number"],
.abi-login-template .tml textarea,
.abi-login-template .tml select {
  width: 100%;
}

.abi-login-template .tml input[type="submit"],
.abi-login-template .tml .button {
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
}
/* Login */
.page-template-page-templatesabi-login-php .inside-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.page-template-page-templatesabi-login-php .site-logo img,
.page-template-page-templatesabi-login-php .custom-logo {
  max-height: 64px;
  height: auto;
  width: auto;
}
.page-template-page-templatesabi-login-php .site-branding {
  margin-right: auto;
}

.page-template-page-templatesabi-login-php .main-navigation {
  margin-left: auto;
}
.page-template-page-templatesabi-login-php .main-navigation .main-nav > ul {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}
.page-template-page-templatesabi-login-php
  .main-navigation
  .main-nav
  > ul
  > li {
  margin: 0;
}

@media (max-width: 768px) {
  .page-template-page-templatesabi-login-php .main-navigation .main-nav > ul {
    gap: 10px;
  }
}
/*  ABi # Facturas */
.page-template-page-templatesabi-facturas-php .site-content {
  margin-top: 2rem;
}
.page-template-page-templatesabi-facturas-php .abi-facturas-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 900px) {
  .page-template-page-templatesabi-facturas-php .abi-facturas-list {
    grid-template-columns: 1fr;
  }
}
.page-template-page-templatesabi-facturas-php .abi-factura {
  background: #fff;
  padding: 16px;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "title precio"
    "fecha estado"
    "button button";
  gap: 6px 12px;
}
.page-template-page-templatesabi-facturas-php .abi-factura .title {
  grid-area: title;
  font-weight: 600;
  text-decoration: none;
}
.page-template-page-templatesabi-facturas-php .abi-factura .fecha {
  grid-area: fecha;
  color: #666;
  margin: 0;
}
.page-template-page-templatesabi-facturas-php .abi-factura .precio {
  grid-area: precio;
  font-weight: 700;
}
.page-template-page-templatesabi-facturas-php .abi-factura .estado {
  grid-area: estado;
  margin: 0;
}
.page-template-page-templatesabi-facturas-php .abi-factura .button {
  grid-area: button;
  width: max-content;
}

.page-template-page-templatesabi-facturas-php .abi-factura.pagada .estado {
  color: #16803c;
}
.page-template-page-templatesabi-facturas-php .abi-factura.impagada .estado {
  color: #a30000;
}

/**tabla ver facturas**/
.abi-facturas-table {
  width: 100%;
  max-width: 900px;
  margin: 1.5rem auto;
  border-collapse: collapse;
  font-size: 14px;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  text-align: center;
}

.abi-facturas-table th {
  background: #f7f7f7;
  font-weight: 600;
  padding: 10px 12px;
  border: 1px solid #e5e5e5;
}

.abi-facturas-table td {
  padding: 8px 10px;
  border: 1px solid #e5e5e5;
}

.abi-facturas-table tr:nth-child(even) {
  background: #fafafa;
}

.abi-facturas-table .estado {
  font-weight: 600;
}
.abi-facturas-table .pagada .estado {
  color: #16803c;
}
.abi-facturas-table .impagada .estado {
  color: #a30000;
}

.abi-facturas-table .button {
  display: inline-block;
  padding: 4px 8px;
  background: #0073aa;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-size: 13px;
  transition: background 0.2s;
}
.abi-facturas-table .button:hover {
  background: #005177;
}

/* Responsive */
@media (max-width: 768px) {
  .abi-facturas-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}
/* Paginación abajo, centrada */
.abi-pagination {
  clear: both;
  display: flex;
  justify-content: center;
  margin: 16px auto 0;
  max-width: 900px;
}

.abi-pagination ul {
  list-style: none;
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.abi-pagination li a,
.abi-pagination li span {
  display: inline-block;
  padding: 6px 10px;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  text-decoration: none;
  color: inherit;
  background: #fff;
}

.abi-pagination li .current {
  background: #0073aa;
  color: #fff;
  border-color: #0073aa;
}

.abi-facturas-wrap {
  display: flex;
  justify-content: center;
  margin: 0 auto 20px;
}
.abi-facturas-table {
  width: auto;
  min-width: 600px;
  max-width: 900px;
  margin: 0 auto;
}
.abi-pagination {
  display: flex;
  justify-content: center;
  margin: 20px auto 0;
  max-width: 900px;
}

/** Factura **/

.printable-to-pdf {
  background: #fff;
  padding: 20px;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #333;
  line-height: 1.4;
  font-size: 14px;
  max-width: 800px;
  margin: 0 auto;
  border: 1px solid #ddd;
  border-radius: 6px;
}

/* Títulos */
.printable-to-pdf h1,
.printable-to-pdf h2,
.printable-to-pdf h3 {
  color: #222;
  margin-top: 0;
  font-weight: 600;
}

/* Tablas */
.printable-to-pdf table {
  border-collapse: collapse;
  width: 100%;
  margin: 15px 0;
}

.printable-to-pdf table th,
.printable-to-pdf table td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: left;
}

.printable-to-pdf table th {
  background-color: #f5f5f5;
  font-weight: 600;
}

/* Listas */
.printable-to-pdf ul,
.printable-to-pdf ol {
  padding-left: 20px;
  margin: 10px 0;
}

.printable-to-pdf img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 10px auto;
}

.printable-to-pdf * {
  page-break-inside: avoid;
}

#print-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 12px;
  color: #777;
}

/*Spinner*/
.loading {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-left: 0.5rem;
  vertical-align: middle;
}
.loading::after {
  content: "";
  box-sizing: border-box;
  display: block;
  width: 100%;
  height: 100%;
  border: 2px solid #c7c7c7;
  border-top-color: #333;
  border-radius: 50%;
  animation: abi-spin 0.7s linear infinite;
  opacity: 0;
  transition: opacity 0.15s;
}

.loading.is-active::after {
  opacity: 1;
}

@keyframes abi-spin {
  to {
    transform: rotate(360deg);
  }
}

/* TU PERFIL */
/*ocultar titulo*/
.page-template-page-templatesabi-perfil-php h1.entry-title {
  display: none !important;
}

.abi-perfil .entry-content {
  max-width: 100% !important;
  padding: 0 20px;
}

.abi-profile-card {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  margin-bottom: 30px;
  text-align: center;
  border: 1px solid #eaeaea;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.abi-profile-card .avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin: 0 auto 15px;
  overflow: hidden;
  border: 3px solid #f0f0f0;
}

.abi-profile-card strong {
  display: block;
  font-size: 1.4rem;
  margin-bottom: 10px;
  color: #333;
}

.abi-profile-card a {
  color: #007cba;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.abi-profile-card a:hover {
  color: #005a87;
  text-decoration: underline;
}

.abi-perfil-form {
  background: #fff;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid #eaeaea;
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.abi-perfil-form h3 {
  grid-column: 1 / -1;
  margin: 25px 0 15px;
  font-size: 1.3rem;
  font-weight: 600;
  color: #2c3338;
  padding-bottom: 8px;
  border-bottom: 2px solid #f0f0f0;
}

.abi-perfil-form h3:first-of-type {
  margin-top: 0;
}

.abi-perfil-form p {
  margin: 0;
  display: flex;
  flex-direction: column;
}

.abi-perfil-form p:nth-last-child(1),
.abi-perfil-form p:has(select[name="wpcf-forma_de_pago"]) {
  grid-column: 1 / -1;
}

.abi-perfil-form label {
  font-weight: 500;
  margin-bottom: 6px;
  color: #555;
  font-size: 0.95rem;
}

.abi-perfil-form input[type="text"],
.abi-perfil-form input[type="email"],
.abi-perfil-form select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.95rem;
  transition: all 0.2s;
  background: #fff;
  box-sizing: border-box;
}

.abi-perfil-form input:focus,
.abi-perfil-form select:focus {
  outline: none;
  border-color: #007cba;
  box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

.abi-perfil-form .button-primary {
  justify-self: center;
  margin-top: 20px;
  padding: 12px 30px;
  background: #007cba;
  border: none;
  border-radius: 6px;
  color: white;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
  min-width: 180px;
}

.abi-perfil-form .button-primary:hover {
  background: #005a87;
}

.abi-msg {
  grid-column: 1 / -1;
  padding: 12px 15px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-weight: 500;
}

.abi-msg--ok {
  background: #f0fff4;
  border: 1px solid #22c55e;
  color: #166534;
}

.abi-msg--err {
  background: #fff5f5;
  border: 1px solid #ef4444;
  color: #991b1b;
}

@media (max-width: 768px) {
  .abi-perfil-form {
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 20px;
  }

  .abi-perfil-form p:nth-last-child(1),
  .abi-perfil-form p:has(select[name="wpcf-forma_de_pago"]) {
    grid-column: 1;
  }

  .abi-profile-card,
  .abi-perfil-form {
    margin-left: 10px;
    margin-right: 10px;
  }
}
/*Boton descarga*/
#toPDF {
  display: block;
  margin: 20px auto 0;
  padding: 12px 25px;
  background: #333;
  color: #fff;
  border-radius: 4px;
  text-align: center;
  max-width: 200px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s;
}

#toPDF:hover {
  background: #000;
}

.abi-login-template .tml .tml-nav {
  display: none !important;
}

.abi-login-template .tml .tml-links {
  display: block !important;
  margin-top: 0.5rem;
}
/**Eliminar los enlaces por defecto de GP **/
.abi-login-template .tml .tml-links a[href*="action=register"],
.abi-login-template .tml .tml-links a[href$="/register/"],
.abi-login-template .tml .tml-links a[href*="/register/"],
.abi-login-template .tml .tml-links a[href*="action=login"],
.abi-login-template .tml .tml-links a[href$="/login/"],
.abi-login-template .tml .tml-links a[href*="/login/"],
.abi-login-template .tml .tml-links .tml-register-link,
.abi-login-template .tml .tml-links .tml-login-link {
  display: none !important;
}

.abi-login-template .abi-card--login .tml .tml-links .tml-lostpassword,
.abi-login-template .abi-card--login .tml .tml-links .tml-lostpassword-link,
.abi-login-template .abi-card--login .tml .tml-links a[href*="lostpassword"],
.abi-login-template .abi-card--login .tml .tml-links a[href*="resetpass"] {
  display: inline-block !important;
}

.abi-login-template .abi-card--register .tml .tml-links .tml-lostpassword,
.abi-login-template .abi-card--register .tml .tml-links .tml-lostpassword-link,
.abi-login-template .abi-card--register .tml .tml-links a[href*="lostpassword"],
.abi-login-template .abi-card--register .tml .tml-links a[href*="resetpass"] {
  display: none !important;
}

/* Ver factura*/

#content.site-content > main.abi-facturas,
#content.site-content > main.abi-factura-single {
  max-width: 980px;
  width: 100%;
  margin-left: auto !important;
  margin-right: auto !important;
  float: none !important;
}
.separate-containers main.abi-facturas,
.separate-containers main.abi-factura-single,
main.abi-facturas.site-main,
main.abi-factura-single.site-main {
  margin-left: 0 !important;
  margin-right: 0 !important;
}
#content.site-content:has(> main.abi-facturas),
#content.site-content:has(> main.abi-factura-single) {
  justify-content: center;
}

/* Título centrado */
main.abi-facturas h1,
main.abi-factura-single > h1,
main.abi-factura-single h1.entry-title {
  text-align: center;
  margin-bottom: 20px;
}

/* 
   LISTADO DE FACTURAS 
 */

.page-template-page-templatesabi-facturas-php .site-content {
  margin-top: 2rem;
}

.page-template-page-templatesabi-facturas-php .abi-facturas-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 900px) {
  .page-template-page-templatesabi-facturas-php .abi-facturas-list {
    grid-template-columns: 1fr;
  }
}

.page-template-page-templatesabi-facturas-php .abi-factura {
  background: #fff;
  padding: 16px;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "title precio"
    "fecha estado"
    "button button";
  gap: 6px 12px;
}
.page-template-page-templatesabi-facturas-php .abi-factura .title {
  grid-area: title;
  font-weight: 600;
  text-decoration: none;
}
.page-template-page-templatesabi-facturas-php .abi-factura .fecha {
  grid-area: fecha;
  color: #666;
  margin: 0;
}
.page-template-page-templatesabi-facturas-php .abi-factura .precio {
  grid-area: precio;
  font-weight: 700;
}
.page-template-page-templatesabi-facturas-php .abi-factura .estado {
  grid-area: estado;
  margin: 0;
}
.page-template-page-templatesabi-facturas-php .abi-factura .button {
  grid-area: button;
  width: max-content;
}
.page-template-page-templatesabi-facturas-php .abi-factura.pagada .estado {
  color: #16803c;
}
.page-template-page-templatesabi-facturas-php .abi-factura.impagada .estado {
  color: #a30000;
}

/** Tabla modo lista **/
.abi-facturas-wrap {
  display: flex;
  justify-content: center;
  margin: 20px auto;
  max-width: 900px;
}
.abi-facturas-table {
  width: auto;
  min-width: 600px;
  max-width: 900px;
  margin: 0 auto;
  border-collapse: collapse;
  font-size: 14px;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  text-align: center;
}
.abi-facturas-table th {
  background: #f7f7f7;
  font-weight: 600;
  padding: 10px 12px;
  border: 1px solid #e5e5e5;
}
.abi-facturas-table td {
  padding: 8px 10px;
  border: 1px solid #e5e5e5;
}
.abi-facturas-table tr:nth-child(even) {
  background: #fafafa;
}
.abi-facturas-table .estado {
  font-weight: 600;
}
.abi-facturas-table .pagada .estado {
  color: #16803c;
}
.abi-facturas-table .impagada .estado {
  color: #a30000;
}
.abi-facturas-table .button {
  display: inline-block;
  padding: 4px 8px;
  background: #0073aa;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-size: 13px;
  transition: background 0.2s;
}
.abi-facturas-table .button:hover {
  background: #005177;
}

/* Responsive tabla */
@media (max-width: 768px) {
  .abi-facturas-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

/* Paginación */
.abi-pagination {
  clear: both;
  display: flex;
  justify-content: center;
  margin: 20px auto 0;
  max-width: 900px;
}
.abi-pagination ul {
  list-style: none;
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
}
.abi-pagination li a,
.abi-pagination li span {
  display: inline-block;
  padding: 6px 10px;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  text-decoration: none;
  color: inherit;
  background: #fff;
}
.abi-pagination li .current {
  background: #0073aa;
  color: #fff;
  border-color: #0073aa;
}

/* 
   VISTA INDIVIDUAL DE FACTURA
   */

/* Contenedor limpio */
.abi-factura-single .printable-to-pdf {
  --abi-text: #23262b;
  --abi-muted: #6b7280;
  --abi-border: #e5e7eb;
  --abi-soft: #f7f8fa;
  --abi-accent: #111827;
  --abi-radius: 12px;

  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--abi-text);
  line-height: 1.55;
  font-size: 15px;
  background: #fff;
  padding: 28px;
  border: 1px solid var(--abi-border);
  border-radius: var(--abi-radius);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  max-width: 800px;
  margin: 20px auto;
}

.abi-factura-single .printable-to-pdf h1,
.abi-factura-single .printable-to-pdf h2,
.abi-factura-single .printable-to-pdf h3 {
  color: #222;
  margin-top: 0;
  font-weight: 600;
}

/* Cabecera  */
.abi-factura-single #wraptura {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: linear-gradient(180deg, #fff, #fff 65%, var(--abi-soft) 65%);
  border: 1px solid var(--abi-border);
  border-radius: var(--abi-radius);
  overflow: hidden;
  margin: 12px 0 22px;
}
.abi-factura-single #wraptura > tbody > tr:first-child > td {
  width: 50%;
  vertical-align: top;
  padding: 18px 22px;
}

/* Columna izquierda */
.abi-factura-single #wraptura td#usuario p {
  margin: 6px 0;
}
.abi-factura-single #wraptura td#usuario p span {
  display: inline-block;
  min-width: 145px;
  color: var(--abi-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-size: 12px;
}

/* Columna derecha */
.abi-factura-single #wraptura td#cliente {
  text-align: right;
}
.abi-factura-single #wraptura td#cliente img {
  max-height: 56px;
  width: auto;
  height: auto;
  display: inline-block;
  margin: 2px 0 8px;
  filter: saturate(0.9) contrast(1.05);
}
.abi-factura-single #wraptura td#cliente p {
  margin: 2px 0;
  line-height: 1.35;
}
.abi-factura-single #wraptura td#cliente p strong {
  font-weight: 700;
  color: var(--abi-accent);
}

/* Franja de forma de pago / periodo */
.abi-factura-single #wraptura #moar {
  padding: 14px 18px;
  background: #fff;
  border-top: 1px solid var(--abi-border);
}
.abi-factura-single #wraptura #moar p {
  margin: 8px 14px 8px 0;
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
}
.abi-factura-single #wraptura #moar p span {
  display: inline-block;
  min-width: 160px;
  color: var(--abi-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-size: 12px;
}

/* Tablas de contenido (the_content) */
.abi-factura-single .printable-to-pdf table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 18px 0 8px;
  border: 1px solid var(--abi-border);
  border-radius: 10px;
  overflow: hidden;
}
.abi-factura-single .printable-to-pdf table thead th {
  background: var(--abi-soft);
  color: var(--abi-accent);
  font-weight: 700;
  padding: 12px 14px;
  border-bottom: 1px solid var(--abi-border);
  font-size: 14px;
}
.abi-factura-single .printable-to-pdf table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--abi-border);
}
.abi-factura-single .printable-to-pdf table tbody tr:last-child td {
  border-bottom: 0;
}
.abi-factura-single .printable-to-pdf table tbody tr:nth-child(even) {
  background: #fafbfc;
}

/* Totales alineados a la derecha */
.abi-factura-single .printable-to-pdf table.abi-totales,
.abi-factura-single .printable-to-pdf table[aria-label="totales"] {
  width: auto;
  margin-left: auto;
}
.abi-factura-single .printable-to-pdf table.abi-totales td:first-child,
.abi-factura-single
  .printable-to-pdf
  table[aria-label="totales"]
  td:first-child {
  color: var(--abi-muted);
  min-width: 160px;
  text-align: right;
}
.abi-factura-single .printable-to-pdf table.abi-totales tr:last-child td,
.abi-factura-single
  .printable-to-pdf
  table[aria-label="totales"]
  tr:last-child
  td {
  font-size: 16px;
  font-weight: 800;
  color: var(--abi-accent);
  border-top: 2px solid var(--abi-border);
}

.abi-factura-single .printable-to-pdf img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 10px auto;
  border-radius: 6px;
}

.abi-factura-single .printable-to-pdf * {
  page-break-inside: avoid;
}

.abi-factura-single #print-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 12px;
  color: #777;
}

/* Botón Descargar PDF*/
#toPDF {
  display: block;
  margin: 22px auto 0;
  padding: 12px 18px;
  background: #111827;
  color: #fff;
  border-radius: 10px;
  text-align: center;
  max-width: 220px;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.2px;
  transition: background 0.3s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
#toPDF:hover {
  background: #000;
}

@media (max-width: 720px) {
  .abi-factura-single .printable-to-pdf {
    padding: 18px;
    box-shadow: none;
    border-radius: 10px;
  }
  .abi-factura-single #wraptura > tbody > tr:first-child > td {
    display: block;
    width: 100%;
    padding: 14px 16px;
  }
  .abi-factura-single #wraptura td#cliente {
    text-align: left;
  }
  .abi-factura-single #wraptura td#cliente img {
    max-height: 48px;
  }
  .abi-factura-single #wraptura #moar p {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 6px 10px;
    margin-right: 0;
  }
}

@media print {
  @page {
    size: A4;
    margin: 14mm 12mm;
  }

  header,
  footer,
  #toPDF,
  .site-header,
  .site-footer,
  .main-navigation,
  .widget-area,
  .abi-pagination {
    display: none !important;
  }

  .abi-factura-single .printable-to-pdf {
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    max-width: initial !important;
    margin: 0 !important;
  }
  body,
  html {
    background: #fff !important;
  }
  a {
    color: #000 !important;
    text-decoration: none !important;
  }
  .abi-factura-single #wraptura {
    background: #fff !important;
  }
}

/*  Login (centrado)*/
#content.site-content > main.abi-login-template {
  max-width: 900px;
  width: 100%;
  margin-left: auto !important;
  margin-right: auto !important;
  float: none !important;
}

.separate-containers main.abi-login-template,
main.abi-login-template.site-main {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

#content.site-content:has(> main.abi-login-template) {
  justify-content: center;
}

main.abi-login-template .entry-content {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

main.abi-factura-single > h1,
main.abi-factura-single h1.entry-title {
  text-align: center;
  margin-bottom: 20px;
}

/*Tabla "Solicitar Pago" */
#user-blog-posts {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-size: 14px;
}

/* Cabecera */
#user-blog-posts thead th {
  background: #f7f7f7;
  font-weight: 600;
  padding: 10px 12px;
  border-bottom: 1px solid #e5e5e5;
  text-align: left;
}

/* Filas */
#user-blog-posts tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid #eee;
  vertical-align: middle;
}

#user-blog-posts tbody tr:nth-child(even) {
  background: #fafafa;
}
#user-blog-posts tbody tr:hover {
  background: #f2f7ff;
}

#user-blog-posts th.col1 {
  width: 180px;
}
#user-blog-posts th.col4 {
  width: 120px;
}
#user-blog-posts th.col5 {
  width: 140px;
}

#user-blog-posts td:nth-child(2) {
  position: relative;
  padding-right: 280px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

#user-blog-posts td:nth-child(2) select {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 260px;
  max-width: 260px;
  box-sizing: border-box;
}

#user-blog-posts td:nth-child(2) select + select {
  margin-top: 6px;
  transform: translateY(-50%);
}

#user-blog-posts td:nth-child(2) select {
  height: 32px;
  padding: 4px 8px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
}

#user-blog-posts td:nth-child(4),
#user-blog-posts td:nth-child(5) {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

#user-blog-posts td:nth-child(1) img {
  display: inline-block;
  vertical-align: middle;
}
/* Ocultar el H1 del “Escritorio” de TML */
body.tml-action-dashboard .entry-header {
  display: none;
}

/* Foto centrada + estilo */
.tml-dashboard-avatar {
  display: flex;
  justify-content: center;
  margin: 8px 0 10px;
}
.tml-dashboard-avatar img {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}
/*Links de tml */
.tml-dashboard-links {
  display: flex;
  justify-content: center;
  gap: 15px;
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
}

.tml-dashboard-links li a {
  color: #0a66c2;
  text-decoration: none;
  transition: color 0.2s;
}

.tml-dashboard-links li a:hover {
  color: #004080;
  text-decoration: underline;
}
/* Nombre centrado */
.tml-dashboard-greeting {
  text-align: center;
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 14px;
}

.abi-quick-actions {
  margin: 28px auto 0;
  max-width: 980px;
  padding: 18px 20px;
  background: #f6f8fa;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  text-align: center;
}

.abi-qa-title {
  margin: 0 0 14px;
  font-size: 1.1rem;
  font-weight: 700;
}
/* Botones */
.abi-qa-buttons {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.abi-quick-actions .abi-qa-btn {
  background: #1e6cd7;
  border-color: #1e6cd7;
  color: #fff;
  transition: transform 0.05s ease, box-shadow 0.15s ease, background 0.2s ease;
  text-decoration: none;
  border-radius: 12px;
  padding: 3px 24px 4px;
  min-width: 140px;
  text-align: center;
  box-sizing: border-box;
}

.abi-quick-actions a.abi-qa-btn:visited {
  color: #fff;
}

.abi-quick-actions .abi-qa-btn:hover,
.abi-quick-actions .abi-qa-btn:focus {
  background: #4da3ff;
  border-color: #4da3ff;
  box-shadow: 0 6px 18px rgba(14, 98, 158, 0.07);
  transform: translateY(-1px);
  border-radius: 12px;
}

.widget-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: #222;
  margin-bottom: 12px;
  border-bottom: 2px solid #e5e5e5;
  padding-bottom: 4px;
}
.widget a {
  color: #0a66c2;
  text-decoration: none;
  transition: color 0.2s;
}
