/* Variante Premium para portales cliente.
   Fuente visual: zenti_demo_premium.html. Se activa solo mientras el portal
   agrega body.zenti-client-active; Admin conserva la paleta azul/cian. */

body.zenti-client-active,
body.zenti-client-active .adm-theme-light {
    color-scheme: light;
    --bg: #f4f6f8;
    --bg-deep: #edf1f4;
    --bg2: #f8fafb;
    --panel: #ffffff;
    --panel-soft: #f8fafb;
    --overlay: #ffffff;
    --chip: #edf1f4;
    --line: #dde3e7;
    --line-strong: #cbd3d9;
    --text: #182026;
    --muted: #69757e;
    --faint: #8b969e;

    --blue: #147d6c;
    --cyan: #2f8f80;
    --green: #1f7a4d;
    --red: #b13f3f;
    --yellow: #a76312;
    --orange: #a95f2f;
    --purple: #6555a5;

    --surface: #ffffff;
    --surface-2: #f8fafb;
    --surface-3: #edf1f4;
    --accent: #147d6c;
    --accent-2: #0f6558;
    --accent-soft: #e2f2ee;
    --accent-strong: #0b4f46;
    --cyan-bright: #54b6a2;
    --violet: #6555a5;

    --success: #1f7a4d;
    --success-soft: #e4f3ea;
    --warning: #a76312;
    --warning-soft: #fbefdc;
    --danger: #b13f3f;
    --danger-soft: #f9e7e7;
    --info: #42688f;
    --info-soft: #e8f0f7;
    --purple-soft: #eeeafa;

    --card-bg: #ffffff;
    --text-muted: #69757e;
    --bg-mid: #f8fafb;
    --sidebar: #0e1718;
    --sidebar-2: #142021;
    --sidebar-text: #f1f5f4;
    --sidebar-muted: #91a09d;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, .04);
    --shadow-md: 0 12px 34px rgba(23, 37, 42, .08);
    --shadow-lg: 0 24px 60px rgba(15, 28, 32, .18);
    --shadow-card: 0 1px 2px rgba(16, 24, 40, .04);
}

html[data-theme="negro"] body.zenti-client-active {
    color-scheme: dark;
    --bg: #0f1517;
    --bg-deep: #0b1113;
    --bg2: #192326;
    --panel: #151d20;
    --panel-soft: #192326;
    --overlay: #182225;
    --chip: #202c30;
    --line: #28363a;
    --line-strong: #3a4a4e;
    --text: #edf2f1;
    --muted: #a3afad;
    --faint: #768582;

    --blue: #49ab98;
    --cyan: #63b9a8;
    --green: #5fbd88;
    --red: #e07878;
    --yellow: #d9a34d;
    --orange: #dc9460;
    --purple: #9d8cd6;

    --surface: #151d20;
    --surface-2: #192326;
    --surface-3: #202c30;
    --accent: #49ab98;
    --accent-2: #63b9a8;
    --accent-soft: #193c35;
    --accent-strong: #b7e7dd;
    --cyan-bright: #63c2ab;
    --violet: #9d8cd6;

    --success: #5fbd88;
    --success-soft: #183729;
    --warning: #d9a34d;
    --warning-soft: #3a2a17;
    --danger: #e07878;
    --danger-soft: #3e2020;
    --info: #7ea6ce;
    --info-soft: #1e3142;
    --purple-soft: #2a2541;

    --card-bg: #151d20;
    --text-muted: #a3afad;
    --bg-mid: #192326;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .24);
    --shadow-md: 0 12px 34px rgba(0, 0, 0, .22);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, .38);
    --shadow-card: 0 1px 2px rgba(0, 0, 0, .24);
}

/* Sidebar verde petróleo: conserva la composición premium actual de Zenti. */
body.zenti-client-active .zsidebar {
    background:
        radial-gradient(circle at 12% 8%, rgba(84, 182, 162, .16), transparent 24%),
        radial-gradient(circle at 88% 52%, rgba(73, 171, 152, .10), transparent 33%),
        linear-gradient(180deg, #0e1718 0%, #0d1b1b 58%, #091112 100%);
    border-right-color: rgba(145, 160, 157, .22);
    box-shadow: 12px 0 40px rgba(15, 28, 32, .17);
}

body.zenti-client-active .brand-mark {
    background: #0e1718;
    border-color: rgba(84, 182, 162, .24);
    box-shadow: 0 0 0 1px rgba(20, 125, 108, .10),
        0 10px 28px rgba(20, 125, 108, .24), inset 0 1px 0 rgba(255, 255, 255, .08);
}

body.zenti-client-active .brand-z {
    background-image: linear-gradient(135deg, #63c2ab, #147d6c);
}

body.zenti-client-active .brand-copy span,
body.zenti-client-active .workspace-copy small,
body.zenti-client-active .profile-copy span,
body.zenti-client-active .profile-logout,
body.zenti-client-active .snav-caret { color: #91a09d; }

body.zenti-client-active .workspace-switcher {
    border-color: rgba(84, 182, 162, .16);
    background: linear-gradient(135deg, rgba(84, 182, 162, .07), rgba(20, 125, 108, .08)),
        rgba(255, 255, 255, .028);
}

body.zenti-client-active .workspace-switcher:not(:disabled):hover {
    border-color: rgba(84, 182, 162, .34);
    background: linear-gradient(135deg, rgba(84, 182, 162, .12), rgba(20, 125, 108, .13)),
        rgba(255, 255, 255, .035);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .045), 0 10px 28px rgba(20, 125, 108, .13);
}

body.zenti-client-active .workspace-logo,
body.zenti-client-active .profile .avatar {
    color: #0d211e;
    background: linear-gradient(135deg, #63c2ab, #147d6c);
    box-shadow: 0 8px 18px rgba(20, 125, 108, .24);
}

body.zenti-client-active .nav-label { color: #667875; }
body.zenti-client-active .snav-item,
body.zenti-client-active .snav-subitem,
body.zenti-client-active .sidebar-back,
body.zenti-client-active .security-card { color: #a3b2af; }

body.zenti-client-active .snav-item:hover {
    background: linear-gradient(90deg, rgba(84, 182, 162, .07), rgba(20, 125, 108, .10));
    box-shadow: inset 0 0 0 1px rgba(84, 182, 162, .06);
}

body.zenti-client-active .snav-item.active {
    background: linear-gradient(90deg, rgba(84, 182, 162, .16), rgba(20, 125, 108, .23) 72%, rgba(101, 85, 165, .09));
    box-shadow: inset 0 0 0 1px rgba(84, 182, 162, .15), 0 9px 24px rgba(20, 125, 108, .15);
}

body.zenti-client-active .snav-item.active::before {
    background: linear-gradient(180deg, #63c2ab, #147d6c);
    box-shadow: 0 0 12px rgba(99, 194, 171, .70);
}

body.zenti-client-active .snav-item.active .snav-icon {
    color: #63c2ab;
    filter: drop-shadow(0 0 5px rgba(99, 194, 171, .20));
}

body.zenti-client-active .snav-badge {
    color: #c7ece4;
    background: linear-gradient(135deg, rgba(84, 182, 162, .18), rgba(20, 125, 108, .27));
    border-color: rgba(84, 182, 162, .15);
}

body.zenti-client-active .snav-subitem.on {
    background: linear-gradient(90deg, rgba(84, 182, 162, .12), rgba(20, 125, 108, .16));
}

body.zenti-client-active .sidebar-back:hover {
    border-color: rgba(84, 182, 162, .34);
    background: rgba(84, 182, 162, .08);
}

body.zenti-client-active .security-card {
    border-color: rgba(84, 182, 162, .13);
    background: linear-gradient(135deg, rgba(84, 182, 162, .05), rgba(20, 125, 108, .07)),
        rgba(255, 255, 255, .025);
}

body.zenti-client-active .security-dot {
    background: #63c2ab;
    box-shadow: 0 0 0 4px rgba(99, 194, 171, .11), 0 0 14px rgba(99, 194, 171, .58);
}

body.zenti-client-active .profile:hover {
    border-color: rgba(84, 182, 162, .10);
}

/* Componentes del área derecha que todavía tienen decoración azul fija. */
body.zenti-client-active .hero {
    background: radial-gradient(circle at 87% 9%, rgba(84, 182, 162, .12), transparent 25%),
        radial-gradient(circle at 73% 95%, rgba(101, 85, 165, .055), transparent 27%),
        linear-gradient(120deg, var(--surface) 0%, var(--surface) 58%, #f0f7f5 100%);
}

/* El halo decorativo de .hero se pinta después del contenido en el CSS base.
   Este plano evita que tape la tarjeta de estado en el verde oscuro. */
body.zenti-client-active .hero > * { position: relative; z-index: 1; }

html[data-theme="negro"] body.zenti-client-active .hero {
    background: radial-gradient(circle at 87% 9%, rgba(99, 194, 171, .10), transparent 25%),
        radial-gradient(circle at 73% 95%, rgba(157, 140, 214, .08), transparent 27%),
        linear-gradient(120deg, #151d20 0%, #172326 58%, #12201f 100%);
}

html[data-theme="negro"] body.zenti-client-active .zeyebrow { color: #63b9a8; }

body.zenti-client-active .eyebrow-dot {
    background: var(--accent);
    box-shadow: 0 0 0 4px rgba(84, 182, 162, .14), 0 0 12px rgba(20, 125, 108, .34);
}

body.zenti-client-active .hero-status {
    color: #eef7f5;
    background: radial-gradient(circle at 84% 10%, rgba(99, 194, 171, .16), transparent 25%),
        radial-gradient(circle at 10% 95%, rgba(73, 171, 152, .11), transparent 29%),
        linear-gradient(145deg, #102321, #142d29);
    border-color: rgba(84, 182, 162, .15);
}

body.zenti-client-active .hero-status small { color: #91aaa5; }
body.zenti-client-active .health-chip { color: #bde8de; }
body.zenti-client-active .health-chip::before {
    background: #63c2ab;
    box-shadow: 0 0 0 4px rgba(99, 194, 171, .11), 0 0 12px rgba(99, 194, 171, .58);
}
body.zenti-client-active .hero-meta { color: #a6bbb7; }
body.zenti-client-active .hero-meta strong { color: #edf7f4; }

body.zenti-client-active .client-logo {
    color: #0b4f46;
    background: linear-gradient(135deg, #e1f3ef, #d6ebe6);
}

html[data-theme="negro"] body.zenti-client-active .client-logo {
    color: #c7ece4;
    background: linear-gradient(135deg, #173a34, #193c35);
}

body.zenti-client-active .day.active {
    background: linear-gradient(145deg, var(--accent), color-mix(in srgb, var(--accent) 78%, #000));
    box-shadow: 0 8px 18px rgba(20, 125, 108, .25);
}

body.zenti-client-active .schedule-line { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 82%, #fff), var(--accent)); }
body.zenti-client-active .zenia-logo,
body.zenti-client-active .mini-send { background: linear-gradient(145deg, #7f6ac5, #5f4e9e); }

body.zenti-client-active .zenti-logo .ti {
    background-image: linear-gradient(90deg, #63c2ab, #147d6c);
}
body.zenti-client-active .zenti-logo .dot { background: #63c2ab; }

/* Los módulos legacy y MIA declaran tokens propios: se reencaminan al Premium. */
body.zenti-client-active [data-mia-finance] {
    --bg: #f4f6f8;
    --surface: #ffffff;
    --surface-2: #f8fafb;
    --surface-3: #edf1f4;
    --border: #dde3e7;
    --border-strong: #cbd3d9;
    --text: #182026;
    --text-2: #69757e;
    --text-3: #8b969e;
    --accent: #147d6c;
    --accent-soft: #e2f2ee;
    --c-fact: #147d6c;
    --c-cobr: #1f7a4d;
    --c-pend: #a76312;
    --c-gd: #b13f3f;
    --c-gi: #6555a5;
    --c-imp: #69757e;
    --c-sue: #2f8f80;
    --c-pos: #1f7a4d;
    --c-neg: #b13f3f;
    --shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

body.zenti-client-active [data-mia-finance] .mf-btn.primary {
    background: linear-gradient(100deg, var(--accent), color-mix(in srgb, var(--accent) 78%, #000));
    box-shadow: 0 8px 20px rgba(20, 125, 108, .22);
}

html[data-theme="negro"] body.zenti-client-active [data-mia-finance] {
    --bg: #0f1517;
    --surface: #151d20;
    --surface-2: #192326;
    --surface-3: #202c30;
    --border: #28363a;
    --border-strong: #3a4a4e;
    --text: #edf2f1;
    --text-2: #a3afad;
    --text-3: #768582;
    --accent: #49ab98;
    --accent-soft: #193c35;
    --c-fact: #49ab98;
    --c-cobr: #5fbd88;
    --c-pend: #d9a34d;
    --c-gd: #e07878;
    --c-gi: #9d8cd6;
    --c-imp: #a3afad;
    --c-sue: #63b9a8;
    --c-pos: #5fbd88;
    --c-neg: #e07878;
    --shadow: 0 1px 2px rgba(0, 0, 0, .24);
}

/* Ciclos de vida conserva sus colores semánticos, pero usa superficies Premium. */
body.zenti-client-active .cv {
    --cv-surface: var(--surface);
    --cv-surface2: var(--surface-2);
    --cv-line: var(--line);
    --cv-line2: var(--line-strong);
    --cv-ink: var(--text);
    --cv-dim: var(--muted);
    --cv-faint: var(--faint);
    --cv-chip: var(--surface-3);
    --cv-violet: var(--purple);
    --cv-cyan: var(--accent);
    --cv-emerald: var(--success);
    --cv-amber: var(--warning);
}

@media (max-width: 900px) {
    body.zenti-client-active .hero {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
        padding: 22px;
    }
    body.zenti-client-active .hero-status { min-height: 150px; }
}

@media (max-width: 560px) {
    body.zenti-client-active .hero { padding: 18px; }
    body.zenti-client-active .hero h1 { font-size: clamp(27px, 10vw, 35px); }
    body.zenti-client-active .hero-actions > * { flex: 1 1 150px; }
}
