:root {
    --ink: #17142f;
    --muted: #6f6b82;
    --line: #e9e7f0;
    --surface: #ffffff;
    --canvas: #f6f6fb;
    --navy: #0b0826;
    --navy-soft: #17123d;
    --violet: #6d48e5;
    --violet-dark: #5534c6;
    --orange: #ff7a45;
    --green: #1fa879;
    --blue: #3387e8;
    --shadow: 0 18px 50px rgba(22, 16, 61, .08);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--canvas); font: 14px/1.55 Inter, system-ui, sans-serif; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.site-ribbon { min-height: 34px; padding: 7px clamp(20px, 5vw, 72px); display: flex; justify-content: space-between; gap: 24px; color: #ddd8ff; background: #050414; font-size: 12px; }
.site-ribbon a { color: #fff; font-weight: 700; }
.panel-header { height: 76px; padding: 0 clamp(20px, 4vw, 58px); display: flex; align-items: center; justify-content: space-between; color: white; background: var(--navy); border-bottom: 1px solid rgba(255,255,255,.08); }
.brand img, .login-brand img { display: block; width: 184px; height: auto; }
.brand-text { color: white; font: 800 22px "Plus Jakarta Sans", sans-serif; }
.header-actions, .user-chip { display: flex; align-items: center; }
.header-actions { gap: 24px; }
.view-site { color: #d9d4fa; font-size: 13px; font-weight: 600; }
.user-chip { gap: 10px; }
.avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: white; background: linear-gradient(135deg, var(--violet), var(--orange)); font-weight: 800; }
.user-copy { display: grid; }
.user-copy strong { font-size: 13px; }
.user-copy small { color: #a9a3c7; font-size: 11px; }
.menu-toggle { display: none; padding: 8px 12px; color: #fff; background: transparent; border: 1px solid rgba(255,255,255,.25); border-radius: 9px; }

.panel-shell { min-height: calc(100svh - 248px); display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.portal-toolbar { min-height: 64px; padding: 10px clamp(20px,4vw,58px); position: relative; z-index: 30; display: flex; justify-content: flex-end; align-items: center; gap: 18px; color: white; background: var(--navy); border-top: 1px solid rgba(255,255,255,.08); box-shadow: 0 8px 24px rgba(7,5,29,.12); }
.toolbar-actions { display: flex; align-items: center; gap: 18px; }
.notification-center { position: relative; }
.notification-button { width: 38px; height: 38px; position: relative; color: white; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: 11px; }
.notification-button span { min-width: 18px; height: 18px; padding: 0 4px; position: absolute; right: -7px; top: -7px; display: grid; place-items: center; color: white; background: #e84d4d; border-radius: 9px; font-size: 9px; font-weight: 800; }
.notification-menu { width: min(360px,calc(100vw - 30px)); position: absolute; z-index: 50; right: 0; top: 48px; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.notification-heading { padding: 13px 15px; display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); }.notification-heading button { color: var(--violet); background: none; border: 0; font-size: 10px; font-weight: 700; }
.notification-item { padding: 12px 15px; display: grid; border-bottom: 1px solid var(--line); }.notification-item.unread { background: #f7f4ff; }.notification-item span,.notification-item small,.notification-empty { color: var(--muted); font-size: 11px; }.notification-empty { padding: 18px; text-align: center; }
.wp-status { margin: 10px 0 22px; padding: 14px; color: #554d70; background: #f6f4fc; border: 1px solid var(--line); border-radius: 10px; }.wp-status p { margin: 5px 0 0; font-size: 11px; }

/* Aísla el portal de los contenedores globales del tema Hostie. */
body .main-contain:has(.panel-shell) { width: 100% !important; max-width: none !important; margin: 0 !important; padding: 0 !important; overflow: visible !important; }
body .main-contain:has(.panel-shell) > div { width: 100%; max-width: none; }
body .panel-shell { width: 100% !important; max-width: none !important; margin: 0 !important; }
body.portal-wp-shell #page { width: 100% !important; max-width: none !important; margin: 0 !important; padding: 0 !important; overflow: visible !important; }

/* El header de WP es transparente y en la portada descansa sobre el hero azul. */
body.portal-wp-shell #reactheme-header,
body.portal-wp-shell #reactheme-header .header-inner,
body.portal-wp-shell #reactheme-header .menu-area,
body.portal-wp-shell .elementor-location-header,
body:has(.panel-shell) #reactheme-header,
body:has(.panel-shell) #reactheme-header .header-inner,
body:has(.panel-shell) .elementor-location-header {
    background-color: #126cf7 !important;
    background-image: linear-gradient(259deg, rgba(0,88,201,.94) 0%, rgba(36,102,202,.94) 77%), url("https://themewant.com/products/wordpress/hostie/demo-two/wp-content/uploads/sites/2/2024/01/shape__two.svg") !important;
    background-repeat: no-repeat !important;
    background-position: center top !important;
    background-size: cover !important;
}
body.portal-wp-shell #reactheme-header { position: relative; z-index: 40; }
body.portal-wp-shell .main-contain {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
}
body.portal-wp-shell .main-contain > .container {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
body.portal-wp-shell #content {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}
body.portal-wp-shell footer { margin-top: 0 !important; }
.panel-sidebar { padding: 28px 18px 22px; display: flex; flex-direction: column; background: var(--navy-soft); color: #d8d4ed; }
.sidebar-heading { padding: 0 12px 18px; display: flex; align-items: center; justify-content: space-between; color: #8f88b2; font-size: 11px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.sidebar-heading button { color: white; background: none; border: 0; font-size: 24px; }
.mobile-close { display: none; }
.desktop-collapse { width: 28px; height: 28px; padding: 0; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.14) !important; border-radius: 8px; }
.sidebar-nav { display: grid; gap: 5px; }
.sidebar-nav a { min-height: 44px; padding: 10px 12px; display: flex; align-items: center; gap: 12px; border-radius: 10px; font-size: 13px; font-weight: 600; transition: .2s ease; }
.sidebar-nav a:hover { color: white; background: rgba(255,255,255,.06); transform: translateX(2px); }
.sidebar-nav a.active { color: white; background: linear-gradient(100deg, rgba(109,72,229,.42), rgba(109,72,229,.12)); box-shadow: inset 3px 0 0 #8c70f2; }
.nav-icon { width: 24px; height: 24px; display: grid; place-items: center; color: #a89af3; font-weight: 800; }
.sidebar-account { margin-top: auto; padding: 22px 12px 0; display: grid; gap: 8px; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar-account a, .sidebar-account button { padding: 5px 0; display: flex; align-items: center; gap: 10px; color: #aca6c9; background: none; border: 0; text-align: left; font-size: 12px; }
.account-icon { width: 24px; text-align: center; }
.sidebar-account a:hover, .sidebar-account button:hover { color: white; }

.panel-main { min-width: 0; padding: clamp(26px, 4vw, 52px); }
.page-heading { margin-bottom: 30px; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.eyebrow { display: block; margin-bottom: 7px; color: var(--violet); font-size: 11px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.page-heading h1 { margin: 0; font: 800 clamp(27px, 3vw, 38px)/1.15 "Plus Jakarta Sans", sans-serif; letter-spacing: -.035em; }
.page-heading p { margin: 8px 0 0; color: var(--muted); }
.page-heading time { color: var(--muted); font-size: 12px; text-transform: capitalize; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.metric-card { min-height: 148px; padding: 22px; position: relative; overflow: hidden; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); box-shadow: 0 8px 25px rgba(22,16,61,.04); }
.metric-card::after { content: ""; width: 74px; height: 74px; position: absolute; right: -22px; top: -24px; border-radius: 50%; opacity: .12; background: currentColor; }
.metric-card > span { color: var(--muted); font-size: 12px; font-weight: 600; }
.metric-card strong { margin: 10px 0 5px; color: var(--ink); font: 800 29px/1 "Plus Jakarta Sans", sans-serif; }
.metric-card small { margin-top: auto; color: var(--muted); font-size: 11px; }
.metric-card.violet { color: var(--violet); border-top: 3px solid var(--violet); }
.metric-card.orange { color: var(--orange); border-top: 3px solid var(--orange); }
.metric-card.green { color: var(--green); border-top: 3px solid var(--green); }
.metric-card.blue { color: var(--blue); border-top: 3px solid var(--blue); }

.dashboard-grid { margin-top: 18px; display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, .8fr); gap: 18px; }
.content-card { padding: 25px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.card-heading h2 { margin: 0; font: 700 19px/1.25 "Plus Jakarta Sans", sans-serif; }
.card-heading a { color: var(--violet); font-size: 12px; font-weight: 700; }
.empty-state { min-height: 240px; padding: 30px 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.empty-icon { width: 48px; height: 48px; margin-bottom: 13px; display: grid; place-items: center; color: var(--violet); background: #f0ecff; border-radius: 15px; font-size: 21px; }
.empty-state h2, .empty-state h3 { margin: 0 0 6px; font: 700 16px/1.3 "Plus Jakarta Sans", sans-serif; }
.empty-state p { max-width: 430px; margin: 0; color: var(--muted); font-size: 12px; }
.quick-links { margin-top: 20px; display: grid; gap: 9px; }
.quick-links a { padding: 13px 14px; display: flex; align-items: center; gap: 11px; border: 1px solid var(--line); border-radius: 11px; font-size: 12px; font-weight: 700; transition: .2s ease; }
.quick-links a:hover { color: var(--violet); border-color: #cfc4f9; background: #faf9ff; transform: translateY(-1px); }
.quick-links span { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 8px; color: var(--violet); background: #f0ecff; }
.module-preview .empty-state { min-height: 360px; }
.status-pill { margin-top: 18px; padding: 6px 11px; border-radius: 999px; color: #6f51dc; background: #f0ecff; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

.primary-button { width: 100%; min-height: 48px; padding: 12px 18px; color: white; background: linear-gradient(135deg, var(--violet), var(--violet-dark)); border: 0; border-radius: 11px; box-shadow: 0 10px 24px rgba(109,72,229,.22); font-weight: 800; }
.primary-button.compact { width: auto; min-height: 42px; }
.primary-button:disabled { cursor: default; opacity: .7; }
.panel-footer { min-height: 84px; padding: 20px clamp(24px, 5vw, 72px); display: flex; justify-content: space-between; align-items: center; gap: 24px; color: #a8a2c2; background: #07051d; font-size: 11px; }
.panel-footer > div { display: flex; gap: 16px; }
.panel-footer strong, .panel-footer a { color: white; }
.sidebar-backdrop { display: none; }

.panel-shell, .panel-sidebar, .nav-label, .sidebar-title { transition: .22s ease; }
.sidebar-collapsed .panel-shell { grid-template-columns: 78px minmax(0, 1fr); }
.sidebar-collapsed .panel-sidebar { padding-left: 14px; padding-right: 14px; }
.sidebar-collapsed .sidebar-title, .sidebar-collapsed .nav-label { width: 0; overflow: hidden; opacity: 0; }
.sidebar-collapsed .sidebar-heading { justify-content: center; padding-inline: 0; }
.sidebar-collapsed .sidebar-nav a { justify-content: center; padding-inline: 0; }
.sidebar-collapsed .sidebar-nav a:hover { transform: none; }
.sidebar-collapsed .sidebar-account { padding-inline: 0; }
.sidebar-collapsed .sidebar-account a, .sidebar-collapsed .sidebar-account button { justify-content: center; width: 100%; }

.success-alert { margin-bottom: 18px; padding: 12px 14px; color: #17684e; background: #eafaf4; border: 1px solid #bdebdc; border-radius: 10px; font-size: 12px; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.span-all { grid-column: 1 / -1; }
.form-section .card-heading p, .country-card .card-heading p, .password-card .card-heading p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.form-grid { margin: 22px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid label, .profile-field label { display: grid; gap: 7px; color: #38334b; font-size: 12px; font-weight: 700; }
.form-grid label small, .profile-field label small { color: var(--muted); font-size: 10px; font-weight: 500; }
.form-grid input, .form-grid select, .form-grid textarea, .profile-field input, .profile-field select, .profile-field textarea, .inline-country-form input { width: 100%; min-height: 44px; padding: 10px 12px; color: var(--ink); background: #faf9fc; border: 1px solid #ddd9e8; border-radius: 9px; outline: none; }
.form-grid textarea, .profile-field textarea { min-height: 78px; resize: vertical; }
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus, .profile-field input:focus, .profile-field select:focus, .profile-field textarea:focus { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(109,72,229,.1); }
.form-grid .span-2 { grid-column: 1 / -1; }
.subsection { margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--line); }
.country-card, .password-card { margin-top: 18px; }
.country-list { margin: 20px 0; display: grid; grid-template-columns: repeat(auto-fit,minmax(190px,1fr)); gap: 10px; }
.country-list > div { padding: 12px; display: flex; justify-content: space-between; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; }
.country-list span { display: grid; }.country-list small { color: var(--muted); }
.mini-button { min-height: 30px; padding: 5px 9px; color: var(--violet); background: #f1edff; border: 1px solid #ddd3ff; border-radius: 7px; font-size: 10px; font-weight: 800; }
.inline-country-form { display: grid; grid-template-columns: 110px 1fr auto; gap: 10px; }
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; }
.profile-field { min-width: 0; }
.field-edit-row { display: flex; align-items: flex-start; gap: 8px; }
.field-edit-row input:disabled, .field-edit-row select:disabled, .field-edit-row textarea:disabled { color: #5e596e; background: #f5f4f8; opacity: 1; }
.save-field { color: white; background: var(--violet); }
.form-action { display: flex; align-items: end; }
.login-shell.single-card { grid-template-columns: minmax(320px,440px); justify-content: center; }
.login-card .success-alert { margin-bottom: 17px; }
.label-row a { color: var(--violet); font-size: 10px; font-weight: 700; }

.login-body { padding: 30px clamp(22px, 6vw, 88px); display: flex; flex-direction: column; color: white; background: radial-gradient(circle at 76% 22%, rgba(109,72,229,.32), transparent 29%), radial-gradient(circle at 18% 85%, rgba(255,122,69,.16), transparent 26%), var(--navy); }
.login-brand { width: max-content; }
.login-shell { width: min(1100px, 100%); margin: auto; padding: 50px 0; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(340px, 440px); align-items: center; gap: clamp(50px, 8vw, 110px); }
.login-intro h1 { max-width: 620px; margin: 0; font: 800 clamp(38px, 5vw, 62px)/1.05 "Plus Jakarta Sans", sans-serif; letter-spacing: -.045em; }
.login-intro p { max-width: 560px; margin: 22px 0; color: #b8b2d3; font-size: 16px; }
.login-intro ul { margin: 28px 0 0; padding: 0; display: grid; gap: 12px; list-style: none; color: #e8e5f7; }
.login-intro li::before { content: "✓"; margin-right: 11px; color: #b39cff; font-weight: 800; }
.login-card { padding: clamp(28px, 4vw, 42px); color: var(--ink); background: white; border: 1px solid rgba(255,255,255,.15); border-radius: 24px; box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.login-mark { width: 46px; height: 46px; display: grid; place-items: center; color: white; background: linear-gradient(135deg, var(--violet), var(--orange)); border-radius: 14px; font: 800 14px "Plus Jakarta Sans", sans-serif; }
.login-card h2 { margin: 23px 0 4px; font: 800 27px "Plus Jakarta Sans", sans-serif; letter-spacing: -.03em; }
.login-card > p { margin: 0 0 25px; color: var(--muted); font-size: 12px; }
.login-card form { display: grid; gap: 9px; }
.login-card label { color: #38334b; font-size: 12px; font-weight: 700; }
.login-card input[type="email"], .login-card input[type="password"] { width: 100%; height: 47px; padding: 0 14px; color: var(--ink); background: #faf9fc; border: 1px solid #ddd9e8; border-radius: 10px; outline: none; }
.login-card input:focus { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(109,72,229,.12); }
.label-row { margin-top: 7px; display: flex; justify-content: space-between; }
.label-row span { color: var(--muted); font-size: 10px; }
.remember { margin: 7px 0 9px; display: flex; gap: 8px; align-items: center; }
.remember input { accent-color: var(--violet); }
.login-help { margin-top: 20px; display: block; color: var(--violet); text-align: center; font-size: 11px; font-weight: 700; }
.form-alert { margin-bottom: 17px; padding: 11px 13px; color: #9b2c2c; background: #fff1f1; border: 1px solid #ffd5d5; border-radius: 9px; font-size: 11px; }
.login-footer { display: flex; justify-content: space-between; gap: 20px; color: #827ca3; font-size: 10px; }

@media (max-width: 1050px) {
    .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .panel-shell { grid-template-columns: 220px minmax(0, 1fr); }
    .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .site-ribbon { justify-content: center; text-align: center; }
    .site-ribbon span { display: none; }
    .panel-header { height: 68px; }
    .portal-toolbar { min-height: 58px; padding: 8px 18px; position: sticky; top: 0; z-index: 45; justify-content: space-between; }
    .brand img { width: 145px; }
    .view-site, .user-copy { display: none; }
    .menu-toggle { display: block; }
    .panel-shell { display: block; }
    .panel-sidebar { width: min(300px, 86vw); position: fixed; z-index: 30; inset: 0 auto 0 0; transform: translateX(-105%); transition: transform .25s ease; box-shadow: 20px 0 50px rgba(0,0,0,.3); }
    .sidebar-open .panel-sidebar { transform: translateX(0); }
    .sidebar-heading .mobile-close { display: block; }
    .sidebar-heading .desktop-collapse { display: none; }
    .sidebar-collapsed .panel-shell { display: block; }
    .sidebar-collapsed .panel-sidebar { padding: 28px 18px 22px; }
    .sidebar-collapsed .sidebar-title, .sidebar-collapsed .nav-label { width: auto; opacity: 1; }
    .sidebar-collapsed .sidebar-heading { justify-content: space-between; padding: 0 12px 18px; }
    .sidebar-collapsed .sidebar-nav a { justify-content: flex-start; padding: 10px 12px; }
    .sidebar-backdrop { position: fixed; z-index: 20; inset: 0; background: rgba(5,4,20,.58); }
    .sidebar-open .sidebar-backdrop { display: block; }
    .panel-main { padding: 27px 18px 40px; }
    .page-heading { align-items: flex-start; }
    .page-heading time { display: none; }
    .metric-grid { grid-template-columns: 1fr 1fr; gap: 11px; }
    .metric-card { min-height: 135px; padding: 17px; }
    .panel-footer, .panel-footer > div { flex-direction: column; align-items: center; text-align: center; }
    .login-body { padding: 24px 20px; }
    .login-shell { padding: 50px 0 30px; grid-template-columns: 1fr; gap: 38px; }
    .login-intro h1 { font-size: clamp(34px, 11vw, 48px); }
    .login-intro ul { display: none; }
    .settings-grid, .profile-grid, .form-grid { grid-template-columns: 1fr; }
    .span-all, .form-grid .span-2 { grid-column: auto; }
    .inline-country-form { grid-template-columns: 1fr; }
    body.portal-wp-shell #reactheme-header { z-index: 50; }
}

@media (max-width: 480px) {
    .metric-grid { grid-template-columns: 1fr; }
    .module-heading { align-items: flex-start; flex-direction: column; }
    .login-footer { flex-direction: column; text-align: center; }
}
