/* =========================================
   WHMCS "IRIS" THEME ENGINE (SAFE CSS ONLY)
   ========================================= */

:root {
    --iris-bg: #f4f6f9;
    --iris-card-bg: #ffffff;
    --iris-border: #e2e8f0;
    --iris-primary: #4f46e5; /* Indigo/Iris */
    --iris-primary-hover: #4338ca;
    --iris-text: #1e293b;
    --iris-text-muted: #64748b;
    --iris-radius: 12px;
    --iris-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

/* Global Body */
/* =========================================
   FIX: Compatibilidad de fuentes en Safari
   ========================================= */
html, body {
    /* Obliga a Safari a NO escalar el texto automáticamente */
    -webkit-text-size-adjust: 100% !important;
    -moz-text-size-adjust: 100% !important;
    text-size-adjust: 100% !important;

    /* Unifica el renderizado de fuentes entre Chrome y Safari */
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    
    /* Tus estilos actuales del body */
    background-color: #f4f6f9 !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1e293b !important;
}

/* Cards & Panels (The Core Iris Look) */
.card, .panel, .mc-promo-login, .mc-promo-manage, .client-home-cards .card {
    background-color: var(--iris-card-bg) !important;
    border: 1px solid var(--iris-border) !important;
    border-radius: var(--iris-radius) !important;
    box-shadow: var(--iris-shadow) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.07) !important;
    transform: translateY(-2px);
}
.card-header, .panel-heading {
    background-color: transparent !important;
    border-bottom: 1px solid var(--iris-border) !important;
    font-weight: 600;
    color: var(--iris-text);
}

/* Buttons Base */
.btn {
    font-weight: 400;
    border-radius: 8px !important;
    transition: all 0.2s ease;
}
.btn-primary, .btn-success, .btn-default {
    background-color: var(--iris-primary) !important;
    border-color: var(--iris-primary) !important;
    color: #fff !important;
}
.btn-primary:hover, .btn-success:hover {
    background-color: var(--iris-primary-hover) !important;
    border-color: var(--iris-primary-hover) !important;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25) !important;
}

/* Forms & Inputs */
.form-control, .field {
    border: 1px solid var(--iris-border) !important;
    border-radius: 8px !important;
    background-color: #fff;
}
.form-control:focus {
    border-color: var(--iris-primary) !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15) !important;
}

/* Dashboard Quick Actions */
.action-icon-btns a {
    background-color: var(--iris-card-bg);
    border: 1px solid var(--iris-border);
    border-radius: var(--iris-radius);
    box-shadow: var(--iris-shadow);
    color: var(--iris-text-muted);
    transition: all 0.3s ease;
}
.action-icon-btns a:hover {
    border-color: var(--iris-primary);
    color: var(--iris-primary);
    transform: translateY(-3px);
}
.action-icon-btns a .ico-container i {
    color: var(--iris-primary);
}

/* Tables */
.table-list, table.table {
    background-color: var(--iris-card-bg);
    border-radius: var(--iris-radius);
    overflow: hidden;
    border: 1px solid var(--iris-border);
}
.table-list thead th, table.table thead th {
    background-color: #f8fafc !important;
    color: var(--iris-text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Alerts */
.alert { border-radius: 8px; border: 1px solid var(--iris-border); }
.alert-info { background-color: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.alert-success { background-color: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.alert-warning { background-color: #fffbeb; border-color: #fde68a; color: #92400e; }
.alert-danger { background-color: #fef2f2; border-color: #fecaca; color: #991b1b; }


/* =========================================
   SEPARACIÓN DE BOTONES
   ========================================= */
.btn-group .btn,
.btn-group-sm .btn,
.btn-group-lg .btn {
    margin-right: 4px !important;
}
.btn-group .btn:last-child,
.btn-group-sm .btn:last-child,
.btn-group-lg .btn:last-child {
    margin-right: 0 !important;
}
.d-flex .btn,
.btn-toolbar .btn {
    margin-right: 6px !important;
    margin-bottom: 4px !important;
}
.d-flex .btn:last-child,
.btn-toolbar .btn:last-child {
    margin-right: 0 !important;
}


/* =========================================
   DASHBOARD TILES (Resumen de Cuenta)
   Estilo moderno tipo "Iris" / Caja .com
   ========================================= */

.tiles .tile {
    display: block;
    position: relative;
    padding: 24px 20px !important;
    background-color: #ffffff !important;
    border: 1px solid var(--iris-border) !important;
    border-right: 1px solid var(--iris-border) !important;
    border-radius: var(--iris-radius) !important;
    box-shadow: var(--iris-shadow) !important;
    text-decoration: none;
    transition: all 0.3s ease !important;
    overflow: hidden;
}

.tiles .tile:hover {
    background-color: #f8fafc !important;
    transform: translateY(-4px) !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.07) !important;
    border-color: var(--iris-primary) !important;
}

/* El número grande (1, 0, etc.) */
.tiles .tile .stat {
    margin-top: 10px !important;
    font-size: 38px !important;
    font-weight: 700 !important;
    color: var(--iris-text) !important;
    line-height: 1 !important;
}

/* El texto (SERVICIOS, DOMINIOS, etc.) */
.tiles .tile .title {
    font-weight: 600 !important;
    color: var(--iris-text-muted) !important;
    text-transform: uppercase !important;
    font-size: 11px !important;
    letter-spacing: 0.5px !important;
    margin-top: 8px !important;
}

/* La pequeña barra de color inferior */
.tiles .tile .highlight {
    margin-top: 16px !important;
    height: 4px !important;
    border-radius: 4px !important;
    width: 40px !important;
    transition: width 0.3s ease !important;
}

.tiles .tile:hover .highlight {
    width: 60px !important;
}

/* El icono de fondo (marca de agua) */
.tiles .tile i {
    position: absolute !important;
    top: 10px !important;
    right: 15px !important;
    font-size: 60px !important;
    line-height: 1 !important;
    color: var(--iris-primary) !important;
    opacity: 0.08 !important;
    transition: all 0.3s ease !important;
}

.tiles .tile:hover i {
    font-size: 65px !important;
    opacity: 0.15 !important;
    transform: rotate(10deg);
}

/* Colores de la barra inferior (Highlight) para cada tipo de widget */
.tiles .tile .highlight.bg-color-blue { background-color: #3b82f6 !important; }
.tiles .tile .highlight.bg-color-green { background-color: #10b981 !important; }
.tiles .tile .highlight.bg-color-orange { background-color: #f59e0b !important; }
.tiles .tile .highlight.bg-color-red { background-color: #ef4444 !important; }
.tiles .tile .highlight.bg-color-purple { background-color: #8b5cf6 !important; }
.tiles .tile .highlight.bg-color-yellow { background-color: #eab308 !important; }

/* =========================================
   EXCEPCIÓN: Headers de tarjetas de pricing
   ========================================= */
.card-header[style*="background"],
.card-header[style*="linear-gradient"] {
    background-color: inherit !important;
    color: inherit !important;
    border-bottom: none !important;
}
/* =========================================
   OVERRIDE: Tamaño de texto en productos
   del carrito (conflicto con all.min.css)
   ========================================= */

body #order-standard_cart .products .product div.product-desc {
    font-size: 17px !important;
    width: 100% !important;
    color: #475569 !important;
    padding: 12px 20px !important;
}

body #order-standard_cart .products .product div.product-desc p {
    font-size: 17px !important;
    color: #475569 !important;
    line-height: 1.6 !important;
}

body #order-standard_cart .products .product div.product-desc ul li {
    font-size: 17px !important;
    color: #334155 !important;
    line-height: 1.5 !important;
    margin-bottom: 8px !important;
}

body #order-standard_cart .products .product div.product-desc ul li .feature-value {
    color: #1e293b !important;
    font-weight: 700 !important;
}

body #order-standard_cart .products .product header span {
    color: #1e293b !important;
    font-size: 1.25rem !important;
    font-weight: 600 !important;
}

body #order-standard_cart .products .product footer .product-pricing {
    margin-bottom: 24px !important;
}

body #order-standard_cart .products .product footer .product-pricing .price {
    font-size: 1.75rem !important;
    font-weight: 700 !important;
}

/* Forzar que los iconos de check se mantengan visibles */
body #order-standard_cart .products .product div.product-desc ul li .fas,
body #order-standard_cart .products .product div.product-desc ul li .fa-check {
    display: inline-block !important;
    font-size: 15px !important;
    color: #fefffe !important;
}
/* =========================================
   OVERRIDE: Productos del carrito WHMCS 9.1.0
   Corrige theme.min.css que oculta iconos
   y reduce el tamaño de texto
   ========================================= */

/* Forzar tamaño de texto legible en descripciones */
body #order-standard_cart .products .product div.product-desc {
    font-size: 16px !important;
    color: #475569 !important;
    line-height: 1.6 !important;
    padding: 12px 20px !important;
}

body #order-standard_cart .products .product div.product-desc p {
    font-size: 17px !important;
    color: #475569 !important;
    line-height: 1.6 !important;
    margin-bottom: 12px !important;
}

/* Forzar tamaño de texto en listas de características */
body #order-standard_cart .products .product div.product-desc ul {
    padding-left: 0 !important;
    list-style: none !important;
}

body #order-standard_cart .products .product div.product-desc ul li {
    font-size: 16px !important;
    color: #334155 !important;
    line-height: 1.5 !important;
    margin-bottom: 8px !important;
}

body #order-standard_cart .products .product div.product-desc ul li .feature-value {
    color: #1e293b !important;
    font-weight: 700 !important;
    font-size: 16px !important;
}

/* ⚠️ CRÍTICO: Mostrar iconos FontAwesome que WHMCS oculta por defecto */
body #order-standard_cart .products .product .fas,
body #order-standard_cart .products .product div.product-desc ul li .fas,
body #order-standard_cart .products .product div.product-desc ul li .fa-check {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-size: 15px !important;
    color: #fefffe !important;
    margin-right: 8px !important;
}

/* Nombre del producto */
body #order-standard_cart .products .product header span {
    color: #1e293b !important;
    font-size: 1.25rem !important;
    font-weight: 600 !important;
}

/* Precio del producto */
body #order-standard_cart .products .product footer .product-pricing {
    margin-bottom: 24px !important;
}

body #order-standard_cart .products .product footer .product-pricing .price {
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    color: var(--iris-primary, #4f46e5) !important;
}

/* Botón "Ordenar ahora" */
body #order-standard_cart .products .product footer .btn-order-now {
    background: var(--iris-primary, #4f46e5) !important;
    border-color: var(--iris-primary, #4f46e5) !important;
    color: #fff !important;
    padding: 10px 24px !important;
    font-size: 15px !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
}

body #order-standard_cart .products .product footer .btn-order-now:hover {
    background: var(--iris-primary-hover, #4338ca) !important;
    border-color: var(--iris-primary-hover, #4338ca) !important;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25) !important;
    color: #fff !important;
}
/* =========================================
   Aumentar tamaño del texto del periodo
   de facturación (mensual, anual, etc.)
   ========================================= */

body #order-standard_cart .products .product footer .product-pricing {
    font-size: 16px !important;
    line-height: 1.6 !important;
}

body #order-standard_cart .products .product footer .product-pricing small {
    font-size: 15px !important;
    color: #475569 !important;
}

/* Si el texto del ciclo está directamente en el div (no en small) */
body #order-standard_cart .products .product footer .product-pricing br + *,
body #order-standard_cart .products .product footer .product-pricing {
    font-size: 16px !important;
}
/* =========================================
   FIX: Alinear botones de acción (Pagar todo,
   Añadir fondos, etc.) en facturas y dashboard
   ========================================= */

/* Contenedor de botones de acción en facturas */
.invoice-actions .btn,
.invoice-summary .btn,
div[menuitemname="My Invoices"] .btn,
.invoices .btn,
#invoices .btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 4px 6px 4px 0 !important;
    vertical-align: middle !important;
}

/* Si los botones están sueltos sin contenedor, forzar alineación */
.btn-success + .btn,
.btn-primary + .btn,
.btn-default + .btn {
    margin-left: 6px !important;
}

/* Contenedor flex para grupos de botones de acción */
.invoice-actions,
.invoice-summary,
div[menuitemname="My Invoices"],
.invoices,
#invoices {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 8px !important;
}

/* Botones específicos de "Pagar todo" y "Añadir fondos" */
.btn-success,
.btn-primary {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    vertical-align: middle !important;
    margin: 4px 6px 4px 0 !important;
}

/* Iconos dentro de los botones alineados correctamente */
.btn-success i,
.btn-primary i,
.btn-default i {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-right: 6px !important;
    font-size: 14px !important;
}

/* Asegurar que los botones no se rompan en líneas diferentes */
.btn-success,
.btn-primary,
.btn-default {
    white-space: nowrap !important;
}

/* Si los botones están dentro de un card-footer o panel-footer */
.card-footer .btn,
.panel-footer .btn,
.footer .btn {
    margin: 4px !important;
}

/* Alineación responsive para móviles */
@media (max-width: 576px) {
    .invoice-actions,
    .invoice-summary,
    div[menuitemname="My Invoices"],
    .invoices,
    #invoices {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    
    .invoice-actions .btn,
    .invoice-summary .btn,
    div[menuitemname="My Invoices"] .btn,
    .invoices .btn,
    #invoices .btn {
        width: 100% !important;
        margin: 4px 0 !important;
    }
}

/* =========================================
   OVERRIDE: Tipografía de Encabezados (Iris)
   Reduce el tamaño por defecto de Bootstrap 
   para un look más moderno, limpio y compacto.
   ========================================= */

h1, .h1 {
    font-size: 1.5rem !important;       /* Antes: 2.5rem (40px) -> Ahora: 32px */
    font-weight: 400 !important;
    line-height: 1.0 !important;
    margin-bottom: 0.75rem !important;
    color: #1e293b !important;
}

h2, .h2 {
    font-size: 1.5rem !important;     /* Antes: 2rem (32px) -> Ahora: 24px */
    font-weight: 600 !important;
    line-height: 1.3 !important;
    margin-bottom: 0.75rem !important;
    color: #1e293b !important;
}

h3, .h3 {
    font-size: 1.25rem !important;    /* Antes: 1.75rem (28px) -> Ahora: 20px */
    font-weight: 600 !important;
    line-height: 1.4 !important;
    margin-bottom: 0.5rem !important;
    color: #1e293b !important;
}

h4, .h4 {
    font-size: 1.125rem !important;   /* Antes: 1.5rem (24px) -> Ahora: 18px */
    font-weight: 600 !important;
    line-height: 1.4 !important;
    margin-bottom: 0.5rem !important;
    color: #334155 !important;
}

h5, .h5 {
    font-size: 1rem !important;       /* Antes: 1.25rem (20px) -> Ahora: 16px */
    font-weight: 600 !important;
    line-height: 1.5 !important;
    margin-bottom: 0.5rem !important;
    color: #334155 !important;
}

h6, .h6 {
    font-size: 0.875rem !important;   /* Antes: 1rem (16px) -> Ahora: 14px */
    font-weight: 600 !important;
    line-height: 1.5 !important;
    margin-bottom: 0.5rem !important;
    color: #475569 !important;
}

/* Ajuste específico para los títulos de las tarjetas del carrito para que no compitan */
body #order-standard_cart .products .product header span {
    font-size: 1.25rem !important; /* Equivale a un h3 limpio */
}
/* =========================================
   FOOTER: Iconos de Redes Sociales
   Colores distintivos para cada red social
   ========================================= */

/* Iconos de redes sociales en el footer */
footer .social-icon,
footer .social-icons a i,
footer .social-icons a .fab,
footer .social-icons a .fas,
footer .social-icons a .fa,
footer a i.fa-whatsapp,
footer a i.fab.fa-whatsapp,
footer .footer-social a i,
footer .footer-links a i,
footer [class*="social"] a i {
    font-size: 18px !important;
    transition: all 0.3s ease !important;
    display: inline-block !important;
}

/* WhatsApp - Verde característico */
footer a i.fa-whatsapp,
footer a i.fab.fa-whatsapp,
footer .social-icons a[href*="whatsapp"] i,
footer .social-icons a[href*="wa.me"] i,
footer [class*="whatsapp"] i {
    color: #25D366 !important;
}

footer a i.fa-whatsapp:hover,
footer a i.fab.fa-whatsapp:hover,
footer .social-icons a[href*="whatsapp"]:hover i,
footer .social-icons a[href*="wa.me"]:hover i {
    color: #128C7E !important;
    transform: scale(1.2) !important;
}

/* Facebook - Azul */
footer a i.fa-facebook,
footer a i.fab.fa-facebook,
footer a i.fa-facebook-f,
footer .social-icons a[href*="facebook"] i {
    color: #1877F2 !important;
}

footer a i.fa-facebook:hover,
footer a i.fab.fa-facebook:hover,
footer .social-icons a[href*="facebook"]:hover i {
    color: #0d5bbd !important;
    transform: scale(1.2) !important;
}

/* Instagram - Gradiente (usamos color principal) */
footer a i.fa-instagram,
footer a i.fab.fa-instagram,
footer .social-icons a[href*="instagram"] i {
    color: #E4405F !important;
}

footer a i.fa-instagram:hover,
footer .social-icons a[href*="instagram"]:hover i {
    color: #c13584 !important;
    transform: scale(1.2) !important;
}

/* Twitter / X - Negro */
footer a i.fa-twitter,
footer a i.fab.fa-twitter,
footer a i.fa-x-twitter,
footer .social-icons a[href*="twitter"] i,
footer .social-icons a[href*="x.com"] i {
    color: #1DA1F2 !important;
}

footer a i.fa-twitter:hover,
footer .social-icons a[href*="twitter"]:hover i {
    color: #0d8bd9 !important;
    transform: scale(1.2) !important;
}

/* Telegram - Azul */
footer a i.fa-telegram,
footer a i.fab.fa-telegram,
footer .social-icons a[href*="telegram"] i {
    color: #0088cc !important;
}

footer a i.fa-telegram:hover,
footer .social-icons a[href*="telegram"]:hover i {
    color: #006699 !important;
    transform: scale(1.2) !important;
}

/* YouTube - Rojo */
footer a i.fa-youtube,
footer a i.fab.fa-youtube,
footer .social-icons a[href*="youtube"] i {
    color: #FF0000 !important;
}

footer a i.fa-youtube:hover,
footer .social-icons a[href*="youtube"]:hover i {
    color: #cc0000 !important;
    transform: scale(1.2) !important;
}

/* LinkedIn - Azul corporativo */
footer a i.fa-linkedin,
footer a i.fab.fa-linkedin,
footer .social-icons a[href*="linkedin"] i {
    color: #0A66C2 !important;
}

footer a i.fa-linkedin:hover,
footer .social-icons a[href*="linkedin"]:hover i {
    color: #084a8f !important;
    transform: scale(1.2) !important;
}

/* TikTok - Negro */
footer a i.fa-tiktok,
footer a i.fab.fa-tiktok,
footer .social-icons a[href*="tiktok"] i {
    color: #000000 !important;
}

footer a i.fa-tiktok:hover,
footer .social-icons a[href*="tiktok"]:hover i {
    color: #333333 !important;
    transform: scale(1.2) !important;
}

/* Color genérico para cualquier otro icono de red social */
footer .social-icons a i:not([class*="whatsapp"]):not([class*="facebook"]):not([class*="instagram"]):not([class*="twitter"]):not([class*="telegram"]):not([class*="youtube"]):not([class*="linkedin"]):not([class*="tiktok"]) {
    color: var(--iris-primary, #4f46e5) !important;
}

/* Contenedor de iconos sociales - Espaciado */
footer .social-icons,
footer [class*="social-icons"],
footer .footer-social {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    justify-content: center !important;
    align-items: center !important;
}

footer .social-icons a,
footer .footer-social a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
    transition: all 0.3s ease !important;
}

footer .social-icons a:hover,
footer .footer-social a:hover {
    background-color: rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-3px) !important;
}
/* =========================================
   TABLAS RESPONSIVAS - ÁREA DE CLIENTE
   Transformación a tarjetas en móviles
   ========================================= */

/* Contenedor de tablas en área de cliente */
.primary-content .table-responsive,
.primary-content .dataTables_wrapper,
div[menuitemname="Active Products/Services"] .table-responsive,
div[menuitemname="My Domains"] .table-responsive,
div[menuitemname="My Invoices"] .table-responsive,
div[menuitemname="My Quotes"] .table-responsive {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    margin-bottom: 20px !important;
}

/* Tablas base *//* =========================================
   TABLAS RESPONSIVAS - ÁREA DE CLIENTE
   Versión corregida para mostrar todo el contenido
   ========================================= */

/* Contenedor de tablas */
.primary-content .table-responsive,
.primary-content .dataTables_wrapper,
div[menuitemname="Active Products/Services"] .table-responsive,
div[menuitemname="My Domains"] .table-responsive,
div[menuitemname="My Invoices"] .table-responsive,
div[menuitemname="My Quotes"] .table-responsive {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    margin-bottom: 20px !important;
}

/* Tablas base */
.primary-content table.table-list,
.primary-content .dataTables_wrapper table,
div[menuitemname="Active Products/Services"] table,
div[menuitemname="My Domains"] table,
div[menuitemname="My Invoices"] table,
div[menuitemname="My Quotes"] table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important;
}

/* Headers de tablas */
.primary-content table.table-list thead th,
.primary-content .dataTables_wrapper table thead th,
div[menuitemname="Active Products/Services"] table thead th,
div[menuitemname="My Domains"] table thead th,
div[menuitemname="My Invoices"] table thead th,
div[menuitemname="My Quotes"] table thead th {
    background-color: #f8fafc !important;
    color: #64748b !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    padding: 12px 16px !important;
    border-bottom: 2px solid #e2e8f0 !important;
    white-space: nowrap !important;
}

/* Celdas del cuerpo */
.primary-content table.table-list tbody td,
.primary-content .dataTables_wrapper table tbody td,
div[menuitemname="Active Products/Services"] table tbody td,
div[menuitemname="My Domains"] table tbody td,
div[menuitemname="My Invoices"] table tbody td,
div[menuitemname="My Quotes"] table tbody td {
    padding: 12px 7px !important;
    font-size: 14px !important;
    color: #334155 !important;
    border-bottom: 1px solid #f1f5f9 !important;
    vertical-align: middle !important;
}

/* Última fila sin borde */
.primary-content table.table-list tbody tr:last-child td,
.primary-content .dataTables_wrapper table tbody tr:last-child td {
    border-bottom: none !important;
}

/* Hover en filas */
.primary-content table.table-list tbody tr:hover td,
.primary-content .dataTables_wrapper table tbody tr:hover td {
    background-color: #f8fafc !important;
}

/* Badges y estados */
.primary-content table.table-list .label,
.primary-content table.table-list .badge,
.primary-content table.table-list .status {
    border-radius: 20px !important;
    padding: 4px 10px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    display: inline-block !important;
}

/* Botones dentro de tablas */
.primary-content table.table-list .btn,
.primary-content table.table-list .btn-group .btn,
.primary-content .dataTables_wrapper .btn {
    padding: 6px 12px !important;
    font-size: 13px !important;
    margin: 2px !important;
    border-radius: 6px !important;
    white-space: nowrap !important;
}

/* =========================================
   MÓVILES (< 768px) - Transformación a tarjetas
   ========================================= */
@media (max-width: 767.98px) {
    
    /* Ocultar headers de tabla en móviles */
    .primary-content table.table-list thead,
    .primary-content .dataTables_wrapper table thead,
    div[menuitemname="Active Products/Services"] table thead,
    div[menuitemname="My Domains"] table thead,
    div[menuitemname="My Invoices"] table thead,
    div[menuitemname="My Quotes"] table thead {
        display: none !important;
    }
    
    /* Convertir tabla en bloque */
    .primary-content table.table-list,
    .primary-content .dataTables_wrapper table,
    div[menuitemname="Active Products/Services"] table,
    div[menuitemname="My Domains"] table,
    div[menuitemname="My Invoices"] table,
    div[menuitemname="My Quotes"] table {
        display: block !important;
    }
    
    /* Convertir tbody en bloque */
    .primary-content table.table-list tbody,
    .primary-content .dataTables_wrapper table tbody,
    div[menuitemname="Active Products/Services"] table tbody,
    div[menuitemname="My Domains"] table tbody,
    div[menuitemname="My Invoices"] table tbody,
    div[menuitemname="My Quotes"] table tbody {
        display: block !important;
        width: 100% !important;
    }
    
    /* Cada fila se convierte en una tarjeta */
    .primary-content table.table-list tbody tr,
    .primary-content .dataTables_wrapper table tbody tr,
    div[menuitemname="Active Products/Services"] table tbody tr,
    div[menuitemname="My Domains"] table tbody tr,
    div[menuitemname="My Invoices"] table tbody tr,
    div[menuitemname="My Quotes"] table tbody tr {
        display: block !important;
        margin-bottom: 16px !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 12px !important;
        background-color: #ffffff !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
        padding: 12px !important;
    }
    
    /* Celdas como filas dentro de la tarjeta */
    .primary-content table.table-list tbody td,
    .primary-content .dataTables_wrapper table tbody td,
    div[menuitemname="Active Products/Services"] table tbody td,
    div[menuitemname="My Domains"] table tbody td,
    div[menuitemname="My Invoices"] table tbody td,
    div[menuitemname="My Quotes"] table tbody td {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 10px 0 !important;
        border: none !important;
        border-bottom: 1px solid #f1f5f9 !important;
        font-size: 14px !important;
        text-align: right !important;
        width: 100% !important;
    }
    
    /* Última celda sin borde */
    .primary-content table.table-list tbody td:last-child,
    .primary-content .dataTables_wrapper table tbody td:last-child {
        border-bottom: none !important;
    }
    
    /* Labels para cada celda (usando data-label) */
    .primary-content table.table-list tbody td:before,
    .primary-content .dataTables_wrapper table tbody td:before,
    div[menuitemname="Active Products/Services"] table tbody td:before,
    div[menuitemname="My Domains"] table tbody td:before,
    div[menuitemname="My Invoices"] table tbody td:before,
    div[menuitemname="My Quotes"] table tbody td:before {
        content: attr(data-label) !important;
        font-weight: 600 !important;
        color: #64748b !important;
        font-size: 13px !important;
        text-align: left !important;
        margin-right: 12px !important;
        flex-shrink: 0 !important;
    }
    
    /* Filas de totales */
    .primary-content table.table-list .total-row td,
    .primary-content .dataTables_wrapper table .total-row td {
        background-color: #f1f5f9 !important;
        font-weight: 700 !important;
        font-size: 15px !important;
    }
    
    .primary-content table.table-list .total-row td:before,
    .primary-content .dataTables_wrapper table .total-row td:before {
        color: #1e293b !important;
    }
    
    /* Botones más pequeños en móviles */
    .primary-content table.table-list .btn,
    .primary-content table.table-list .btn-group .btn,
    .primary-content .dataTables_wrapper .btn {
        padding: 6px 10px !important;
        font-size: 12px !important;
        margin: 4px 2px !important;
    }
    
    /* Badges más pequeños */
    .primary-content table.table-list .label,
    .primary-content table.table-list .badge {
        font-size: 10px !important;
        padding: 3px 8px !important;
    }
}
/* =========================================
   RESTAURAR TABLAS EN ESCRITORIO
   (Corrige el problema al redimensionar)
   ========================================= */

/* Cuando la pantalla es grande, restaurar formato de tabla normal */
@media (min-width: 768px) {
    
    /* Restaurar display de tabla */
    .primary-content table.table-list,
    .primary-content .dataTables_wrapper table,
    div[menuitemname="Active Products/Services"] table,
    div[menuitemname="My Domains"] table,
    div[menuitemname="My Invoices"] table,
    div[menuitemname="My Quotes"] table {
        display: table !important;
    }
    
    .primary-content table.table-list tbody,
    .primary-content .dataTables_wrapper table tbody,
    div[menuitemname="Active Products/Services"] table tbody,
    div[menuitemname="My Domains"] table tbody,
    div[menuitemname="My Invoices"] table tbody,
    div[menuitemname="My Quotes"] table tbody {
        display: table-row-group !important;
    }
    
    .primary-content table.table-list tbody tr,
    .primary-content .dataTables_wrapper table tbody tr,
    div[menuitemname="Active Products/Services"] table tbody tr,
    div[menuitemname="My Domains"] table tbody tr,
    div[menuitemname="My Invoices"] table tbody tr,
    div[menuitemname="My Quotes"] table tbody tr {
        display: table-row !important;
    }
    
    .primary-content table.table-list tbody td,
    .primary-content .dataTables_wrapper table tbody td,
    div[menuitemname="Active Products/Services"] table tbody td,
    div[menuitemname="My Domains"] table tbody td,
    div[menuitemname="My Invoices"] table tbody td,
    div[menuitemname="My Quotes"] table tbody td {
        display: table-cell !important;
        text-align: left !important;
        padding: 12px 9px !important;
        width: auto !important;
    }
    
    /* Ocultar labels en escritorio */
    .primary-content table.table-list tbody td:before,
    .primary-content .dataTables_wrapper table tbody td:before,
    div[menuitemname="Active Products/Services"] table tbody td:before,
    div[menuitemname="My Domains"] table tbody td:before,
    div[menuitemname="My Invoices"] table tbody td:before,
    div[menuitemname="My Quotes"] table tbody td:before {
        display: none !important;
    }
    
    /* Mostrar headers en escritorio */
    .primary-content table.table-list thead,
    .primary-content .dataTables_wrapper table thead,
    div[menuitemname="Active Products/Services"] table thead,
    div[menuitemname="My Domains"] table thead,
    div[menuitemname="My Invoices"] table thead,
    div[menuitemname="My Quotes"] table thead {
        display: table-header-group !important;
    }
}
/* =========================================
   BOTONES DE ACCIONES DE DOMINIO - RESPONSIVE
   (Gestionar servidores, Editar contacto, etc.)
   ========================================= */

/* Contenedor de botones de acciones de dominio */
.domain-actions,
div[menuitemname="My Domains"] .btn-group,
div[menuitemname="My Domains"] .btn-toolbar,
.domain-management .btn-group,
.domain-management .btn-toolbar {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    justify-content: flex-start !important;
    align-items: center !important;
}

/* Botones individuales */
.domain-actions .btn,
div[menuitemname="My Domains"] .btn-group .btn,
div[menuitemname="My Domains"] .btn-toolbar .btn,
.domain-management .btn-group .btn,
.domain-management .btn-toolbar .btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 10px 20px !important;
    font-size: 14px !important;
    border-radius: 8px !important;
    background-color: #4f46e5 !important;
    border-color: #4f46e5 !important;
    color: #ffffff !important;
    white-space: nowrap !important;
    transition: all 0.3s ease !important;
    margin: 0 !important;
}

.domain-actions .btn:hover,
div[menuitemname="My Domains"] .btn-group .btn:hover,
.domain-management .btn-group .btn:hover {
    background-color: #4338ca !important;
    border-color: #4338ca !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3) !important;
}

/* Iconos dentro de los botones */
.domain-actions .btn i,
div[menuitemname="My Domains"] .btn-group .btn i,
.domain-management .btn-group .btn i {
    margin-right: 8px !important;
    font-size: 14px !important;
}

/* Dropdown "Más..." */
.domain-actions .dropdown-toggle,
div[menuitemname="My Domains"] .btn-group .dropdown-toggle {
    padding-right: 12px !important;
}

.domain-actions .dropdown-menu,
div[menuitemname="My Domains"] .btn-group .dropdown-menu {
    border-radius: 8px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
    margin-top: 8px !important;
}

.domain-actions .dropdown-menu .dropdown-item,
div[menuitemname="My Domains"] .btn-group .dropdown-menu .dropdown-item {
    padding: 10px 16px !important;
    font-size: 14px !important;
    color: #334155 !important;
    transition: all 0.2s ease !important;
}

.domain-actions .dropdown-menu .dropdown-item:hover,
div[menuitemname="My Domains"] .btn-group .dropdown-menu .dropdown-item:hover {
    background-color: #f8fafc !important;
    color: #4f46e5 !important;
}

/* =========================================
   MÓVILES (< 768px) - Botones apilados
   ========================================= */
@media (max-width: 767.98px) {
    
    .domain-actions,
    div[menuitemname="My Domains"] .btn-group,
    div[menuitemname="My Domains"] .btn-toolbar,
    .domain-management .btn-group,
    .domain-management .btn-toolbar {
        flex-direction: column !important;
        width: 100% !important;
        gap: 10px !important;
    }
    
    .domain-actions .btn,
    div[menuitemname="My Domains"] .btn-group .btn,
    div[menuitemname="My Domains"] .btn-toolbar .btn,
    .domain-management .btn-group .btn,
    .domain-management .btn-toolbar .btn {
        width: 100% !important;
        padding: 12px 20px !important;
        font-size: 15px !important;
        justify-content: center !important;
    }
    
    /* Dropdown en móviles */
    .domain-actions .dropdown,
    div[menuitemname="My Domains"] .btn-group .dropdown {
        width: 100% !important;
    }
    
    .domain-actions .dropdown-toggle,
    div[menuitemname="My Domains"] .btn-group .dropdown-toggle {
        width: 100% !important;
    }
    
    .domain-actions .dropdown-menu,
    div[menuitemname="My Domains"] .btn-group .dropdown-menu {
        width: 100% !important;
        position: static !important;
        margin-top: 4px !important;
        box-shadow: none !important;
        border: 1px solid #e2e8f0 !important;
    }
}