/* ============================================
   EccoHost WHMCS Theme - Integración con eccohost.net
   ============================================ */

:root {
    --eh-bg-dark: #0a0e14;
    --eh-bg-card: #151b24;
    --eh-bg-elevated: #1c2430;
    --eh-accent: #00d4aa;
    --eh-accent-hover: #00f5c4;
    --eh-accent-dim: rgba(0, 212, 170, 0.15);
    --eh-text: #e6edf3;
    --eh-text-muted: #8b949e;
    --eh-border: #30363d;
    --eh-radius: 12px;
    --eh-radius-lg: 16px;
    --eh-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

/* Body & Base - Sobrescribir estilos blancos del template Six */
/* Base 16px para que rem coincida con eccohost.net (Bootstrap usa 14px) */
html.eccohost-theme {
    font-size: 16px;
}
.eccohost-theme body,
body.eccohost-theme {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif !important;
    background: var(--eh-bg-dark) !important;
    background-color: var(--eh-bg-dark) !important;
    color: var(--eh-text) !important;
    line-height: 1.6;
    font-size: 16px;
}

/* section#main-body tiene background:#fff en Six - forzar oscuro */
.eccohost-theme section#main-body,
section#main-body.eccohost-main-body,
.eccohost-theme #main-body {
    background: var(--eh-bg-dark) !important;
    background-color: var(--eh-bg-dark) !important;
}

.eccohost-theme .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ========== HEADER - Idéntico a eccohost.net ========== */
.eccohost-theme .site-header.eccohost-header {
    padding: 1rem 0;
    border-bottom: 1px solid var(--eh-border);
    position: sticky;
    top: 0;
    background: rgba(10, 14, 20, 0.9);
    backdrop-filter: blur(16px);
    z-index: 100;
}

.eccohost-theme .header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Logo: igual que eccohost.net - "Ecco" en blanco, "Host.net" en verde */
.eccohost-theme .eccohost-header .logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--eh-accent);
    text-decoration: none;
}
.eccohost-theme .eccohost-header .logo span { color: var(--eh-text) !important; }
.eccohost-theme .eccohost-header .logo:hover { color: var(--eh-accent-hover); }
.eccohost-theme .eccohost-header .logo:hover span { color: var(--eh-text) !important; }
.eccohost-theme .eccohost-header .logo img {
    max-height: 50px;
    vertical-align: middle;
}

/* Nav: mismo gap y colores que eccohost.net */
.eccohost-theme .nav-main.eccohost-nav {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

.eccohost-theme .nav-main.eccohost-nav > a:not(.btn-primary) {
    color: var(--eh-text-muted) !important;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}
.eccohost-theme .nav-main.eccohost-nav > a:not(.btn-primary):hover,
.eccohost-theme .nav-main.eccohost-nav > a:not(.btn-primary).active {
    color: var(--eh-accent) !important;
}

/* Botón primario: mismo estilo que eccohost.net */
.eccohost-theme .nav-main .btn-primary {
    background: var(--eh-accent) !important;
    color: var(--eh-bg-dark) !important;
    padding: 0.6rem 1.35rem;
    font-size: 0.95rem;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    text-decoration: none;
}
.eccohost-theme .nav-main .btn-primary:hover {
    background: var(--eh-accent-hover) !important;
    color: var(--eh-bg-dark) !important;
}

/* Dropdown Servicios - mismo estilo que los demás enlaces */
.eccohost-theme .eccohost-dropdown .dropdown-toggle {
    cursor: pointer;
    color: var(--eh-text-muted) !important;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
    background: none !important;
    border: none !important;
}
.eccohost-theme .eccohost-dropdown .dropdown-toggle:hover,
.eccohost-theme .eccohost-dropdown.open .dropdown-toggle {
    color: var(--eh-accent) !important;
}
.eccohost-theme .eccohost-dropdown .caret {
    margin-left: 0.25rem;
}
.eccohost-theme .eccohost-dropdown .dropdown-menu {
    background: var(--eh-bg-card);
    border: 1px solid var(--eh-border);
    border-radius: var(--eh-radius);
    padding: 0.5rem 0;
    margin-top: 0.5rem;
}
.eccohost-theme .eccohost-dropdown .dropdown-menu li a {
    color: var(--eh-text-muted) !important;
    padding: 0.5rem 1.25rem;
    display: block;
}
.eccohost-theme .eccohost-dropdown .dropdown-menu li a:hover {
    background: var(--eh-accent-dim);
    color: var(--eh-accent) !important;
}

/* Icono carrito - mismo estilo que notificaciones */
.eccohost-theme .eccohost-cart-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    font-size: 0.95rem;
    padding: 0;
    border-radius: 8px;
    color: var(--eh-text-muted) !important;
    text-decoration: none;
}
.eccohost-theme .eccohost-cart-icon:hover {
    background: var(--eh-accent-dim);
    color: var(--eh-accent) !important;
}

/* Icono de notificaciones */
.eccohost-theme .eccohost-notif-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    font-size: 0.95rem;
    padding: 0;
    border-radius: 8px;
    position: relative;
}
.eccohost-theme .eccohost-notif-icon:hover {
    background: var(--eh-accent-dim);
}
.eccohost-theme .eccohost-notif-icon .badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 1.1rem;
    height: 1.1rem;
    padding: 0 0.35rem;
    font-size: 0.7rem;
    line-height: 1.1rem;
}

/* Popover de notificaciones - tema oscuro */
.eccohost-theme .popover-user-notifications {
    background-color: var(--eh-bg-card) !important;
    border-color: var(--eh-border) !important;
    color: var(--eh-text);
}
.eccohost-theme .popover-user-notifications .popover-inner,
.eccohost-theme .popover-user-notifications .popover-content {
    background-color: var(--eh-bg-card) !important;
    color: var(--eh-text);
}
.eccohost-theme .popover-user-notifications .popover-title {
    background-color: var(--eh-bg-elevated) !important;
    border-bottom-color: var(--eh-border) !important;
    color: var(--eh-text) !important;
}
.eccohost-theme .popover-user-notifications ul li {
    border-bottom-color: var(--eh-border) !important;
}
.eccohost-theme .popover-user-notifications ul li a {
    color: var(--eh-text) !important;
}
.eccohost-theme .popover-user-notifications ul li a:hover {
    background-color: var(--eh-accent-dim) !important;
    color: var(--eh-accent) !important;
}
.eccohost-theme .popover-user-notifications ul li.none {
    color: var(--eh-text-muted) !important;
}
.eccohost-theme .popover-user-notifications ul li i.fas.fa-check-circle,
.eccohost-theme .popover-user-notifications ul li i.far.fa-check-circle {
    color: var(--eh-accent) !important;
}
.eccohost-theme .popover-user-notifications ul li i.fas.fa-warning,
.eccohost-theme .popover-user-notifications ul li i.far.fa-warning {
    color: #d29922 !important;
}
.eccohost-theme .popover-user-notifications ul li i.fas.fa-exclamation-circle,
.eccohost-theme .popover-user-notifications ul li i.far.fa-exclamation-circle {
    color: #f85149 !important;
}
/* Flecha del popover (placement bottom) */
.eccohost-theme .popover-user-notifications.popover.bottom > .arrow {
    border-bottom-color: var(--eh-border) !important;
}
.eccohost-theme .popover-user-notifications.popover.bottom > .arrow:after {
    border-bottom-color: var(--eh-bg-card) !important;
}

/* Mobile toggle - ocultar en desktop */
.eccohost-theme .eccohost-mobile-toggle {
    display: none;
    background: var(--eh-bg-card);
    border: 1px solid var(--eh-border);
    padding: 8px 12px;
    border-radius: 8px;
}
.eccohost-theme .eccohost-mobile-toggle .icon-bar {
    background: var(--eh-text);
    display: block;
    width: 22px;
    height: 2px;
    margin: 4px 0;
    border-radius: 1px;
}

/* Mobile nav */
.eccohost-theme .eccohost-mobile-nav .nav-mobile {
    flex-direction: column;
    padding: 1rem 0;
}
.eccohost-theme .eccohost-mobile-nav .nav-mobile a {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--eh-border);
}

@media (max-width: 991px) {
    .eccohost-theme .nav-main.eccohost-nav { display: none; }
    .eccohost-theme .eccohost-mobile-toggle { display: block; }
}

/* ========== HERO / HOMEPAGE ========== */
.eccohost-theme .page-hero.eccohost-hero {
    padding: 3rem 0;
    text-align: center;
}
.eccohost-theme .page-hero.eccohost-hero h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--eh-text) 0%, var(--eh-text-muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.eccohost-theme .page-hero.eccohost-hero p {
    font-size: 1.1rem;
    color: var(--eh-text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Domain search */
.eccohost-theme .domain-search.eccohost-domain-search {
    background: var(--eh-bg-card);
    border-radius: var(--eh-radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--eh-border);
}
.eccohost-theme .domain-search h3 {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    color: var(--eh-text);
}
.eccohost-theme .domain-form {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    max-width: 600px;
    margin: 0 auto;
}
.eccohost-theme .domain-form input[type="text"] {
    flex: 1;
    min-width: 200px;
    padding: 0.875rem 1rem;
    border: 1px solid var(--eh-border);
    border-radius: 8px;
    background: var(--eh-bg-dark);
    color: var(--eh-text);
    font-family: inherit;
}
.eccohost-theme .domain-form input[type="submit"],
.eccohost-theme .domain-form button {
    padding: 0.875rem 1.5rem;
    background: var(--eh-accent);
    color: var(--eh-bg-dark);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}
.eccohost-theme .domain-form input[type="submit"]:hover,
.eccohost-theme .domain-form button:hover {
    background: var(--eh-accent-hover);
}
.eccohost-theme .domain-form-buttons { display: flex; gap: 0.5rem; }
.eccohost-theme .domainchecker-homepage-captcha { margin-top: 1rem; }

/* Shortcuts */
.eccohost-theme .home-shortcuts.eccohost-shortcuts {
    margin-bottom: 2rem;
}
.eccohost-theme .eccohost-shortcuts ul {
    list-style: none;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0;
    margin: 0;
}
.eccohost-theme .eccohost-shortcuts a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: var(--eh-bg-card);
    border: 1px solid var(--eh-border);
    border-radius: var(--eh-radius);
    color: var(--eh-text-muted);
    text-decoration: none;
    transition: all 0.2s;
}
.eccohost-theme .eccohost-shortcuts a:hover {
    border-color: var(--eh-accent);
    color: var(--eh-accent);
}
.eccohost-theme .eccohost-shortcuts a i { color: var(--eh-accent); }

/* ========== MAIN BODY ========== */
.eccohost-theme #main-body.eccohost-main-body,
.eccohost-theme section#main-body {
    padding: 2rem 0 4rem;
    min-height: 400px;
    background: var(--eh-bg-dark) !important;
    background-color: var(--eh-bg-dark) !important;
}

/* Contenedores que Six pinta de blanco */
.eccohost-theme .row,
.eccohost-theme .main-content,
.eccohost-theme .container {
    background-color: transparent !important;
}

.eccohost-theme .main-content {
    color: var(--eh-text);
}

/* Page header / titles */
.eccohost-theme .header-lined h1,
.eccohost-theme h1, .eccohost-theme h2, .eccohost-theme h3 {
    color: var(--eh-text) !important;
}
.eccohost-theme .header-lined h1 small { color: var(--eh-text-muted) !important; }

/* Panels / Cards */
.eccohost-theme .panel {
    background: var(--eh-bg-card) !important;
    border: 1px solid var(--eh-border) !important;
    border-radius: var(--eh-radius) !important;
}
.eccohost-theme .panel-heading,
.eccohost-theme .panel-default > .panel-heading {
    background: var(--eh-bg-elevated) !important;
    border-color: var(--eh-border) !important;
    color: var(--eh-text) !important;
}
.eccohost-theme .panel-title { color: var(--eh-text) !important; }
.eccohost-theme .panel-body {
    background: var(--eh-bg-card) !important;
    color: var(--eh-text) !important;
    border-color: var(--eh-border) !important;
}
.eccohost-theme .panel-footer {
    background: var(--eh-bg-elevated) !important;
    border-color: var(--eh-border) !important;
    color: var(--eh-text-muted) !important;
}

/* List group */
.eccohost-theme .list-group-item {
    background: transparent !important;
    border-color: var(--eh-border) !important;
    color: var(--eh-text) !important;
}
.eccohost-theme .list-group-item:hover,
.eccohost-theme .list-group-item:focus {
    background: var(--eh-accent-dim) !important;
}
.eccohost-theme .list-group-item.active {
    background: var(--eh-accent-dim) !important;
    border-color: var(--eh-accent) !important;
    color: var(--eh-accent) !important;
}

/* Sidebar */
.eccohost-theme .sidebar .panel-sidebar .panel-heading {
    background: var(--eh-bg-elevated) !important;
    color: var(--eh-accent) !important;
}

/* Forms */
.eccohost-theme .form-control {
    background: var(--eh-bg-dark) !important;
    border: 1px solid var(--eh-border) !important;
    color: var(--eh-text) !important;
}
.eccohost-theme .form-control:focus {
    border-color: var(--eh-accent) !important;
    box-shadow: 0 0 0 2px var(--eh-accent-dim) !important;
}
.eccohost-theme label { color: var(--eh-text-muted) !important; }

/* Markdown Editor (tickets, mensajes) - tema oscuro */
.eccohost-theme .md-editor {
    border-color: var(--eh-border) !important;
    background: var(--eh-bg-card) !important;
}
.eccohost-theme .md-editor > .btn-toolbar,
.eccohost-theme .md-editor > .md-header,
.eccohost-theme .md-editor .md-footer {
    background: var(--eh-bg-elevated) !important;
    border-color: var(--eh-border) !important;
}
.eccohost-theme .md-editor > textarea,
.eccohost-theme .md-editor > textarea.markdown-editor,
.eccohost-theme .md-editor > .md-preview {
    background: var(--eh-bg-dark) !important;
    border-color: var(--eh-border) !important;
    color: var(--eh-text) !important;
}
.eccohost-theme .md-editor > textarea:focus {
    background: var(--eh-bg-dark) !important;
    color: var(--eh-text) !important;
}
.eccohost-theme .md-editor > textarea::placeholder {
    color: var(--eh-text-muted);
}
.eccohost-theme .md-editor.active {
    border-color: var(--eh-accent) !important;
    box-shadow: 0 0 0 2px var(--eh-accent-dim) !important;
}
.eccohost-theme .md-editor .md-controls .md-control {
    color: var(--eh-text-muted) !important;
}
.eccohost-theme .md-editor .md-controls .md-control:hover {
    color: var(--eh-accent) !important;
}
.eccohost-theme .markdown-editor-status {
    color: var(--eh-text-muted) !important;
    background: var(--eh-bg-elevated) !important;
}
/* Input file (adjuntos) */
.eccohost-theme input[type="file"].form-control {
    color: var(--eh-text-muted);
}
.eccohost-theme input[type="file"]::-webkit-file-upload-button,
.eccohost-theme input[type="file"]::file-selector-button {
    background: var(--eh-bg-elevated) !important;
    border: 1px solid var(--eh-border) !important;
    color: var(--eh-text) !important;
}

/* Buttons */
.eccohost-theme .btn-primary {
    background: var(--eh-accent) !important;
    border-color: var(--eh-accent) !important;
    color: var(--eh-bg-dark) !important;
}
.eccohost-theme .btn-primary:hover {
    background: var(--eh-accent-hover) !important;
    border-color: var(--eh-accent-hover) !important;
    color: var(--eh-bg-dark) !important;
}
.eccohost-theme .btn-default {
    background: var(--eh-bg-card) !important;
    border-color: var(--eh-border) !important;
    color: var(--eh-text) !important;
}
.eccohost-theme .btn-default:hover {
    background: var(--eh-bg-elevated) !important;
    border-color: var(--eh-accent) !important;
    color: var(--eh-accent) !important;
}

/* Tables */
.eccohost-theme .table {
    color: var(--eh-text) !important;
}
.eccohost-theme .table > thead > tr > th,
.eccohost-theme .table > tbody > tr > td {
    border-color: var(--eh-border) !important;
}
.eccohost-theme .table-striped > tbody > tr:nth-of-type(odd) {
    background: var(--eh-accent-dim) !important;
}

/* Tiles (homepage client area) */
.eccohost-theme .tile {
    background: var(--eh-bg-card) !important;
    border: 1px solid var(--eh-border) !important;
    border-radius: var(--eh-radius) !important;
}
.eccohost-theme .tile:hover {
    border-color: var(--eh-accent) !important;
}
.eccohost-theme .tile .icon { color: var(--eh-accent) !important; }
.eccohost-theme .tile .stat { color: var(--eh-accent) !important; }
.eccohost-theme .tile .title { color: var(--eh-text-muted) !important; }
.eccohost-theme .tile .highlight.bg-color-blue { background: var(--eh-accent) !important; }
.eccohost-theme .tile .highlight.bg-color-green { background: var(--eh-accent) !important; }
.eccohost-theme .tile .highlight.bg-color-red { background: #f85149 !important; }
.eccohost-theme .tile .highlight.bg-color-gold { background: #d29922 !important; }

/* Alerts */
.eccohost-theme .alert-success {
    background: var(--eh-accent-dim) !important;
    border-color: var(--eh-accent) !important;
    color: var(--eh-accent) !important;
}
.eccohost-theme .alert-danger {
    background: rgba(248, 81, 73, 0.15) !important;
    border-color: #f85149 !important;
    color: #f85149 !important;
}
.eccohost-theme .alert-info {
    background: var(--eh-accent-dim) !important;
    border-color: var(--eh-accent) !important;
    color: var(--eh-text) !important;
}
.eccohost-theme .alert-warning {
    background: rgba(210, 153, 34, 0.15) !important;
    border-color: #d29922 !important;
    color: #d29922 !important;
}

/* Breadcrumb */
.eccohost-theme .breadcrumb {
    background: transparent !important;
    color: var(--eh-text-muted) !important;
}
.eccohost-theme .breadcrumb a { color: var(--eh-accent) !important; }
.eccohost-theme .breadcrumb > .active { color: var(--eh-text-muted) !important; }

/* Links - no aplicar a enlaces del header (tienen su propio estilo) */
.eccohost-theme a:not(.eccohost-header a):not(.eccohost-footer a) { color: var(--eh-accent) !important; }
.eccohost-theme a:not(.eccohost-header a):not(.eccohost-footer a):hover { color: var(--eh-accent-hover) !important; }

/* ========== FOOTER ========== */
.eccohost-theme .site-footer.eccohost-footer {
    border-top: 1px solid var(--eh-border);
    padding: 3rem 0 2rem;
    background: var(--eh-bg-card);
}
.eccohost-theme .footer-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 3rem;
    margin-bottom: 2rem;
}
.eccohost-theme .footer-about h4,
.eccohost-theme .footer-links h4 {
    color: var(--eh-text) !important;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}
.eccohost-theme .footer-about p {
    color: var(--eh-text-muted) !important;
    max-width: 400px;
}
.eccohost-theme .footer-links ul { list-style: none; padding: 0; margin: 0; }
.eccohost-theme .footer-links a {
    color: var(--eh-text-muted) !important;
    text-decoration: none;
    display: block;
    padding: 0.25rem 0;
}
.eccohost-theme .footer-links a:hover { color: var(--eh-accent) !important; }
.eccohost-theme .footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--eh-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}
.eccohost-theme .footer-bottom p {
    color: var(--eh-text-muted) !important;
    font-size: 0.9rem;
    margin: 0;
}
.eccohost-theme .footer-bottom a { color: var(--eh-accent) !important; }
.eccohost-theme .back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: var(--eh-accent);
    color: var(--eh-bg-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background 0.2s;
    z-index: 999;
}
.eccohost-theme .back-to-top:hover {
    background: var(--eh-accent-hover);
    color: var(--eh-bg-dark);
}

@media (max-width: 768px) {
    .eccohost-theme .footer-grid { grid-template-columns: 1fr; }
    .eccohost-theme .footer-bottom { flex-direction: column; text-align: center; }
}

/* ========== LOGIN / REGISTER ========== */
.eccohost-theme .logincontainer {
    max-width: 500px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--eh-bg-card);
    border: 1px solid var(--eh-border);
    border-radius: var(--eh-radius-lg);
}

/* ========== SHOPPING CART ========== */
.eccohost-theme .product-group {
    background: var(--eh-bg-card) !important;
    border: 1px solid var(--eh-border) !important;
    border-radius: var(--eh-radius) !important;
}

/* ========== UTILITIES ========== */
.eccohost-theme .text-muted { color: var(--eh-text-muted) !important; }
.eccohost-theme .badge { background: var(--eh-accent) !important; color: var(--eh-bg-dark) !important; }
