/* Portal RH v3.0 — estilo de rhmediacon.com/neweb. Todo vive bajo .rh-app para no chocar con el tema */
.rh-app {
	--navy: #1c0a40; --navy2: #2b1857; --navy3: #12062b; --magenta: #cc29a3; --magenta-d: #a31f82; --pink: #fcb8fc; --sky: #e5f6ff; --yellow: #d8d257;
	--bg: #f6f3fc; --surface: #fff; --surface2: #faf8fe; --text: #1c0a40; --muted: #6a5f88; --line: #ece8f3; --field-line: #d6cfe6; --hover: #e5f6ff;
	--ok: #147a4a; --warn: #8a6a00; --bad: #b3271b;
	--c-blue-bg: #d6ecff; --c-blue: #12579c; --c-green-bg: #d9f7e6; --c-green: #147a4a; --c-red-bg: #fde0dc; --c-red: #b3271b;
	--c-amber-bg: #fff4d6; --c-amber: #8a6a00; --c-purple-bg: #f3e1f4; --c-purple: #8a1d78; --c-gray-bg: #eeeaf4; --c-gray: #6a5f88;
	--ease: cubic-bezier(.2, .7, .2, 1); --r: 32px; --r2: 22px;
	font-family: 'Raleway', system-ui, -apple-system, 'Segoe UI', sans-serif;
	color: var(--text); background: var(--bg); font-size: 15px; line-height: 1.5; box-sizing: border-box;
}
body.rh-dark .rh-app {
	--bg: #12062b; --surface: #2b1857; --surface2: #231049; --text: #fff; --muted: #b9aed6; --line: rgba(255,255,255,.12); --field-line: rgba(255,255,255,.24); --hover: rgba(255,255,255,.1);
	--ok: #7fe0ae; --warn: #f2d36b; --bad: #ffb0a8;
	--c-blue-bg: rgba(100,170,255,.2); --c-blue: #a9d3ff; --c-green-bg: rgba(60,200,120,.2); --c-green: #7fe0ae; --c-red-bg: rgba(255,100,90,.22); --c-red: #ffb0a8;
	--c-amber-bg: rgba(255,200,60,.2); --c-amber: #f2d36b; --c-purple-bg: rgba(252,184,252,.2); --c-purple: #fcb8fc; --c-gray-bg: rgba(255,255,255,.12); --c-gray: #cfc6e6;
}
/* Pantalla completa, aunque el tema meta el contenido en una columna (los temas imponen anchos con !important) */
#rh-app.rh-app { width: 100vw; max-width: none !important; margin-left: calc(50% - 50vw) !important; margin-right: 0 !important; border-radius: 0; padding: 14px clamp(14px, 3vw, 36px) 30px; min-height: 80vh; }
.rh-app.rh-modal { width: 100%; left: auto; transform: none; position: static; }
.rh-app *, .rh-app *::before, .rh-app *::after { box-sizing: border-box; }
.rh-app h1, .rh-app h2, .rh-app h3, .rh-app h4 { font-family: inherit; color: var(--text); margin: 0; line-height: 1.08; letter-spacing: -0.03em; font-weight: 900; }
.rh-app p { margin: 0 0 8px; }
.rh-app a { color: var(--magenta); }
body.rh-dark .rh-app a { color: var(--pink); }
.rh-app button { font-family: inherit; }
.rh-muted { color: var(--muted); }
.rh-top, .rh-main, .rh-foot { max-width: 1240px; margin-left: auto; margin-right: auto; }
body.rh-portal-page { overflow-x: hidden; }
body.rh-portal-page .rhm-header, body.rh-portal-page .rhm-page-hero, body.rh-portal-page .entry-header, body.rh-portal-page .wp-block-post-title, body.rh-portal-page .rhm-footer { display: none !important; }
body.rh-portal-page .rhm-main { padding-top: 0 !important; padding-bottom: 0 !important; }
body.rh-portal-page .rhm-main > .rhm-section, body.rh-portal-page .rhm-main .rhm-wrap { padding-top: 0 !important; padding-bottom: 0 !important; }
body.rh-portal-page, body.rh-portal-page .rhm-main { background: #f6f3fc; }
body.rh-portal-page.rh-dark, body.rh-portal-page.rh-dark .rhm-main { background: #12062b; }

/* ---------- encabezado flotante (como el de rhmediacon.com) ---------- */
.rh-top { position: sticky; top: calc(12px + var(--wp-admin--admin-bar--height, 0px)); z-index: 50; display: flex; align-items: center; gap: 14px; background: rgba(28,10,64,.96); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,.08); border-radius: 999px; padding: 8px 10px 8px 24px; box-shadow: 0 14px 40px rgba(18,6,43,.28); }
.rh-app .rh-top-logo { height: 34px !important; width: auto !important; max-width: none !important; display: block; }
.rh-nav { display: flex; gap: 4px; flex: 1; justify-content: center; }
.rh-nav-btn { appearance: none; border: 0; background: transparent; color: rgba(255,255,255,.88); font-weight: 700; font-size: 14px; padding: 10px 18px; border-radius: 999px; cursor: pointer; position: relative; transition: background .2s var(--ease), color .2s; white-space: nowrap; }
.rh-nav-btn:hover { background: rgba(255,255,255,.12); color: #fff; }
.rh-nav-btn.on { background: #fff; color: var(--navy); }
/* legacy */ .rh-nav-btn .dot-old { position: absolute; top: -4px; right: -2px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--magenta); color: #fff; font-size: 11px; font-weight: 800; line-height: 19px; text-align: center; }
body.rh-dark .rh-app 
.rh-main { padding: 26px 0 8px; min-height: 360px; transition: opacity .15s; }
.rh-main.is-loading { opacity: .45; pointer-events: none; }
.rh-main > * { animation: rhIn .5s var(--ease) both; }
@keyframes rhIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes rhShim { to { background-position: -200% 0; } }
.rh-skel { display: grid; gap: 14px; }
.rh-skel i { display: block; height: 110px; border-radius: 28px; background: linear-gradient(90deg, var(--surface) 25%, var(--line) 50%, var(--surface) 75%); background-size: 200% 100%; animation: rhShim 1.3s linear infinite; }
.rh-skel i:first-child { height: 230px; border-radius: var(--r); }
.rh-skel.sm i, .rh-skel.sm i:first-child { height: 64px; border-radius: 18px; }
@media (prefers-reduced-motion: reduce) { .rh-main > *, .rh-skel i { animation: none; } }
.rh-foot { text-align: center; font-size: 11px; color: var(--muted); padding: 14px 0 6px; letter-spacing: .06em; }

/* ---------- elementos comunes ---------- */
.rh-card { background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 26px; margin-bottom: 16px; }
.rh-card > h3, .rh-section-title { font-size: 20px; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.rh-count { background: var(--magenta); color: #fff; font-size: 12px; border-radius: 999px; padding: 2px 10px; font-weight: 800; letter-spacing: 0; }
.rh-page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.rh-page-head h2 { font-size: clamp(32px, 4.4vw, 52px); letter-spacing: -0.045em; line-height: 1; }
.rh-back { background: none; border: 0; color: var(--muted); font-weight: 800; cursor: pointer; padding: 0; margin-bottom: 12px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.rh-back:hover { color: var(--magenta); }
.rh-empty { text-align: center; color: var(--muted); padding: 30px 10px; }
.rh-empty strong { display: block; color: var(--text); font-size: 17px; font-weight: 900; margin-bottom: 4px; }
.rh-error { color: var(--bad); font-weight: 700; }

.rh-btn { appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1.5px solid var(--text); background: transparent; color: var(--text); border-radius: 999px; padding: 11px 24px; font-weight: 800; font-size: 14px; cursor: pointer; text-decoration: none !important; line-height: 1.2; transition: transform .15s var(--ease), background .2s, color .2s; }
.rh-btn:hover { background: var(--text); color: var(--bg); }
.rh-btn:active { transform: translateY(1px); }
.rh-btn:disabled { opacity: .55; cursor: wait; }
.rh-btn-primary { background: var(--magenta); border-color: var(--magenta); color: #fff; }
.rh-btn-primary:hover { background: var(--magenta-d); border-color: var(--magenta-d); color: #fff; }
.rh-btn-ok { background: #147a4a; border-color: #147a4a; color: #fff; }
.rh-btn-ok:hover { background: #0f6038; border-color: #0f6038; color: #fff; }
.rh-btn-danger { background: #b3271b; border-color: #b3271b; color: #fff; }
.rh-btn-danger:hover { background: #8f1e14; border-color: #8f1e14; color: #fff; }
.rh-btn-sm { padding: 7px 16px; font-size: 13px; }
.rh-btn-big { padding: 16px 32px; font-size: 17px; }
.rh-btn-ghost-light { background: transparent; border-color: rgba(255,255,255,.7); color: #fff; }
.rh-btn-ghost-light:hover { background: rgba(255,255,255,.16); color: #fff; }
.rh-btn-link, .rh-btn-link2 { appearance: none; background: none; border: 0; padding: 0; cursor: pointer; font-weight: 800; font-size: 13px; text-decoration: underline; }
.rh-btn-link { color: var(--bad); }
.rh-btn-link2 { color: var(--magenta); }
body.rh-dark .rh-btn-link2 { color: var(--pink); }

.rh-chip { display: inline-block; padding: 4px 13px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; background: var(--c-gray-bg); color: var(--c-gray); }
.rh-chip.s-pendiente, .rh-chip.s-enviada { background: var(--c-blue-bg); color: var(--c-blue); }
.rh-chip.s-aprobado, .rh-chip.s-pagada, .rh-chip.s-completado { background: var(--c-green-bg); color: var(--c-green); }
.rh-chip.s-rechazado, .rh-chip.s-devuelta, .rh-chip.s-vencido { background: var(--c-red-bg); color: var(--c-red); }
.rh-chip.s-pausado, .rh-chip.s-parcial { background: var(--c-amber-bg); color: var(--c-amber); }
.rh-chip.s-en_curso { background: var(--c-purple-bg); color: var(--c-purple); }
.rh-chip.s-borrador, .rh-chip.s-anulada { background: var(--c-gray-bg); color: var(--c-gray); }

.rh-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.rh-pill { appearance: none; border: 1.5px solid var(--field-line); background: transparent; color: var(--text); border-radius: 999px; padding: 8px 18px; font-weight: 800; font-size: 13px; cursor: pointer; transition: background .2s, color .2s; }
.rh-pill:hover { background: var(--hover); }
.rh-pill.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.rh-seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px; margin-bottom: 18px; }
.rh-seg button { appearance: none; border: 0; background: transparent; padding: 9px 22px; border-radius: 999px; font-weight: 800; font-size: 14px; cursor: pointer; color: var(--text); transition: background .2s; }
.rh-seg button.on { background: var(--magenta); color: #fff; }

/* ---------- formularios ---------- */
.rh-app label { display: block; font-size: 13px; font-weight: 800; color: var(--text); margin-bottom: 14px; }
.rh-app input[type=text], .rh-app input[type=email], .rh-app input[type=url], .rh-app input[type=number], .rh-app input[type=date], .rh-app input[type=search], .rh-app input[type=password], .rh-app select, .rh-app textarea {
	display: block; width: 100%; margin-top: 6px; font-family: inherit; font-size: 15px; font-weight: 600; color: var(--text); padding: 12px 16px; border: 1.5px solid var(--field-line); border-radius: 16px; background: var(--surface); box-shadow: none; height: auto; }
.rh-app input:focus, .rh-app select:focus, .rh-app textarea:focus { outline: 0; border-color: var(--magenta); box-shadow: 0 0 0 4px rgba(204,41,163,.18); }
.rh-app ::placeholder { color: var(--muted); opacity: .8; }
.rh-app textarea { resize: vertical; min-height: 76px; }
.rh-app input[type=file] { margin-top: 6px; font-size: 14px; }
.rh-hint { font-size: 12px; font-weight: 600; color: var(--muted); margin-top: 4px; }
.rh-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0 14px; }

/* ---------- inicio ---------- */
.rh-hero { background: radial-gradient(120% 140% at 100% 0%, #3a1a78 0%, var(--navy) 55%, var(--navy3) 100%); color: #fff; border-radius: var(--r); padding: clamp(28px, 5vw, 56px) clamp(24px, 4.5vw, 52px); margin-bottom: 18px; position: relative; overflow: hidden; }
.rh-hero::after { content: ''; position: absolute; right: -70px; top: -90px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, var(--magenta), rgba(204,41,163,0) 68%); opacity: .6; pointer-events: none; }
.rh-hero-date { display: inline-flex; align-items: center; gap: 10px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; padding: 9px 18px; border-radius: 999px; margin-bottom: 20px; position: relative; z-index: 1; }
.rh-hero-date::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--magenta); }
.rh-hero h2 { color: #fff; font-size: clamp(38px, 6.4vw, 78px); font-weight: 900; letter-spacing: -0.05em; line-height: .96; position: relative; z-index: 1; }
.rh-hero h2 em { font-style: italic; font-weight: 900; background: var(--magenta); color: #fff; padding: 0 .2em .04em; border-radius: .22em; display: inline-block; letter-spacing: -0.04em; margin-left: .04em; }
.rh-hero p { color: #d6cfe8; margin-top: 16px; font-size: 17px; font-weight: 500; max-width: 560px; position: relative; z-index: 1; }
.rh-hero-actions { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; position: relative; z-index: 1; }
.rh-hero .rh-btn-primary { background: #fff; border-color: #fff; color: var(--navy); }
.rh-hero .rh-btn-primary:hover { background: var(--pink); border-color: var(--pink); color: var(--navy); }
.rh-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 18px; }
.rh-tile { appearance: none; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 26px; padding: 22px 24px; cursor: pointer; transition: transform .25s var(--ease), border-color .2s; color: var(--text); }
.rh-tile:hover { transform: translateY(-3px); border-color: var(--magenta); }
.rh-tile span { display: block; font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--magenta); }
body.rh-dark .rh-tile span { color: var(--pink); }
.rh-tile strong { display: block; font-size: clamp(30px, 3.4vw, 40px); font-weight: 900; letter-spacing: -0.04em; margin-top: 6px; line-height: 1.05; }
.rh-tile small { font-size: 12px; font-weight: 700; color: var(--muted); }
.rh-tile.hot { background: var(--yellow); border-color: var(--yellow); color: var(--navy); } .rh-tile.hot span, .rh-tile.hot small { color: #55531a; } .rh-tile.hot strong { color: var(--navy); }
.rh-tile.alert strong { color: var(--bad); }
.rh-cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; align-items: start; }
.rh-attn { border-left: 6px solid var(--magenta); }
.rh-attn.bad { border-left-color: var(--bad); }

.rh-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.rh-row:last-child { border-bottom: 0; }
.rh-row .main { flex: 1; min-width: 200px; }
.rh-row .main strong { display: block; font-weight: 800; }
.rh-meta { font-size: 13px; color: var(--muted); font-weight: 600; }
.rh-row .acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.rh-money { font-weight: 900; font-size: 18px; letter-spacing: -0.02em; white-space: nowrap; }

.rh-progress { height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; }
.rh-progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--magenta), var(--pink)); border-radius: 999px; transition: width .6s var(--ease); }
.rh-event { display: flex; gap: 14px; padding: 10px 0; align-items: center; }
.rh-event .d { flex: none; width: 50px; text-align: center; background: var(--surface2); border: 1px solid var(--line); border-radius: 14px; padding: 6px 0; line-height: 1.1; }
.rh-event .d b { display: block; font-size: 19px; font-weight: 900; } .rh-event .d small { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--magenta); }
body.rh-dark .rh-event .d small { color: var(--pink); }

/* ---------- proyectos ---------- */
.rh-pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.rh-pcard { appearance: none; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 26px; padding: 24px; cursor: pointer; transition: transform .25s var(--ease), border-color .2s; color: var(--text); width: 100%; }
.rh-pcard:hover { transform: translateY(-3px); border-color: var(--magenta); }
.rh-pcard h4 { font-size: 20px; margin-bottom: 6px; letter-spacing: -0.03em; }
.rh-pcard .top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.rh-pcard .meta { font-size: 13px; color: var(--muted); font-weight: 600; margin: 8px 0 14px; }
.rh-pcard .foot { display: flex; justify-content: space-between; font-size: 12px; font-weight: 800; margin-top: 8px; color: var(--muted); }
.rh-prog-ctl { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.rh-prog-ctl input[type=range] { flex: 1; min-width: 160px; width: auto; margin: 0; padding: 0; border: 0; background: transparent; accent-color: var(--magenta); }
.rh-entrega { border: 1px solid var(--line); border-radius: 22px; padding: 20px 22px; margin-bottom: 12px; background: var(--surface2); }
.rh-entrega.s-rechazado { border-color: var(--c-red); }
.rh-entrega-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.rh-entrega-top strong { font-size: 17px; font-weight: 900; letter-spacing: -0.02em; }
.rh-note { margin: 8px 0; white-space: pre-wrap; }
.rh-links { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.rh-thread { margin-top: 12px; border-top: 1px dashed var(--field-line); padding-top: 10px; }
.rh-comment { font-size: 14px; padding: 6px 0; white-space: pre-wrap; }
.rh-comment b { font-weight: 800; } .rh-comment small { color: var(--muted); font-weight: 600; margin-left: 6px; }
.rh-comment.mgr { background: var(--c-purple-bg); border-left: 4px solid var(--magenta); padding: 8px 12px; border-radius: 8px; }
.rh-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; align-items: center; }
.rh-inline { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px; margin-top: 12px; }
.rh-inline textarea { margin-top: 0; }
.rh-inline .rh-actions { margin-top: 8px; }

/* ---------- ventana emergente ---------- */
.rh-overlay { position: fixed; inset: 0; background: rgba(18,6,43,.66); backdrop-filter: blur(4px); z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 16px; }
.rh-modal, .rh-app.rh-modal { background: var(--surface); border: 1px solid var(--line); border-radius: 30px; width: 100%; max-width: 560px; padding: 30px; max-height: 92vh; overflow-y: auto; font-family: 'Raleway', system-ui, sans-serif; color: var(--text); box-shadow: 0 30px 80px rgba(0,0,0,.45); animation: rhIn .3s var(--ease) both; }
.rh-modal h3 { font-size: 26px; letter-spacing: -0.04em; margin: 0 0 4px; }
.rh-modal .sub { color: var(--muted); font-size: 14px; font-weight: 500; margin-bottom: 18px; }
.rh-modal .rh-actions { margin-top: 20px; }

/* ---------- chat ---------- */
.rh-chat { display: flex; flex-direction: column; height: min(68vh, 640px); padding: 0; overflow: hidden; }
.rh-chat-list { flex: 1; overflow-y: auto; padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.rh-msg { max-width: 76%; background: var(--surface2); border: 1px solid var(--line); border-radius: 20px 20px 20px 6px; padding: 10px 16px; align-self: flex-start; }
.rh-msg.me { background: var(--magenta); border-color: var(--magenta); color: #fff; border-radius: 20px 20px 6px 20px; align-self: flex-end; }
.rh-msg .who { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--magenta); display: block; }
body.rh-dark .rh-msg .who { color: var(--pink); }
.rh-msg.me .who { color: #ffe3f7; }
.rh-msg .t { white-space: pre-wrap; word-wrap: break-word; font-weight: 500; }
.rh-msg time { display: block; font-size: 10px; opacity: .65; text-align: right; margin-top: 2px; }
.rh-chat-form { display: flex; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--line); background: var(--surface); align-items: flex-end; }
.rh-chat-form textarea { margin: 0; min-height: 46px; height: 46px; resize: none; }

/* ---------- calendario ---------- */
.rh-cal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.rh-cal-head h3 { font-size: clamp(26px, 3.2vw, 36px); letter-spacing: -0.045em; flex: 1; min-width: 160px; text-transform: capitalize; }
.rh-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.rh-cal .dow { text-align: center; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .14em; color: var(--magenta); padding: 6px 0; }
body.rh-dark .rh-cal .dow { color: var(--pink); }
.rh-day { appearance: none; border: 1px solid var(--line); background: var(--surface2); border-radius: 16px; min-height: 70px; padding: 8px 10px; text-align: left; cursor: pointer; color: var(--text); position: relative; font-weight: 800; font-size: 13px; transition: border-color .2s, background .2s; }
.rh-day:hover { border-color: var(--magenta); }
.rh-day.out { opacity: .35; }
.rh-day.today { box-shadow: inset 0 0 0 2px var(--magenta); }
.rh-day.sel { background: var(--navy); border-color: var(--navy); color: #fff; }
body.rh-dark .rh-day.sel { background: var(--magenta); border-color: var(--magenta); }
.rh-day .ev { display: block; font-size: 10px; font-weight: 800; background: var(--magenta); color: #fff; border-radius: 6px; padding: 1px 6px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rh-day.sel .ev { background: var(--yellow); color: var(--navy); }

/* ---------- facturas ---------- */
.rh-inv-nav { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.rh-inv-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 20px; }
.rh-inv-card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 18px 20px; }
.rh-inv-card span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--magenta); margin-bottom: 4px; font-weight: 800; }
body.rh-dark .rh-inv-card span { color: var(--pink); }
.rh-inv-card strong { font-size: 26px; font-weight: 900; letter-spacing: -0.03em; }
.rh-inv-card.warn { border-color: var(--c-red); } .rh-inv-card.warn strong { color: var(--bad); }
.rh-inv-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.rh-inv-filters { display: flex; gap: 8px; flex-wrap: wrap; flex: 1 1 100%; }
.rh-inv-chip { appearance: none; border: 1.5px solid var(--field-line); background: transparent; color: var(--text); border-radius: 999px; padding: 8px 18px; font-size: 13px; font-weight: 800; cursor: pointer; transition: background .2s; }
.rh-inv-chip:hover { background: var(--hover); }
.rh-inv-chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.rh-inv-toolbar input[type=search] { flex: 1; min-width: 180px; margin-top: 0; }
.rh-inv-tablewrap { overflow-x: auto; margin-bottom: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; }
.rh-inv-table { width: 100%; border-collapse: collapse; }
.rh-inv-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--magenta); padding: 14px 16px; border-bottom: 1px solid var(--line); font-weight: 800; background: transparent; }
body.rh-dark .rh-inv-table th { color: var(--pink); }
.rh-inv-table td { padding: 15px 16px; border-bottom: 1px solid var(--line); vertical-align: top; background: transparent; border-left: 0; border-right: 0; border-top: 0; color: var(--text); }
.rh-inv-table tr:last-child td { border-bottom: 0; }
.rh-inv-table .r { text-align: right; }
.rh-inv-table tr[data-open] { cursor: pointer; } .rh-inv-table tr[data-open]:hover td { background: var(--surface2); }
.rh-inv-badge { display: inline-block; padding: 4px 13px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.b-borrador, .b-anulada { background: var(--c-gray-bg); color: var(--c-gray); } .b-enviada { background: var(--c-blue-bg); color: var(--c-blue); } .b-parcial { background: var(--c-amber-bg); color: var(--c-amber); }
.b-pagada { background: var(--c-green-bg); color: var(--c-green); } .b-vencida { background: var(--c-red-bg); color: var(--c-red); }
.rh-inv-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.rh-inv-head h3 { margin: 0 0 4px; font-size: 28px; letter-spacing: -0.04em; }
.rh-inv-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; }
.rh-inv-muted { color: var(--muted); margin: 6px 0; }
.rh-inv-err { color: var(--bad); font-weight: 700; }
.rh-inv-box { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 22px; margin: 16px 0; }
.rh-inv-box h4 { margin: 0 0 12px; font-size: 18px; }
.rh-inv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0 14px; }
.rh-inv-linehead, .rh-inv-line { display: grid; grid-template-columns: 1fr 80px 110px 110px 28px; gap: 8px; align-items: start; }
.rh-inv-linehead { font-size: 11px; text-transform: uppercase; color: var(--muted); letter-spacing: .12em; margin: 14px 0 6px; font-weight: 800; }
.rh-inv-line { margin-bottom: 8px; }
.rh-inv-line textarea, .rh-inv-line input { margin-top: 0 !important; }
.rh-inv-line textarea { min-height: 44px; }
.rh-inv-line .l-amt { padding-top: 11px; text-align: right; font-weight: 800; }
.rh-inv-line .l-del { color: var(--bad); text-decoration: none; font-size: 16px; padding-top: 9px; }
.rh-inv-calc { margin-top: 16px; align-items: start; }
.rh-inv-totals { margin: 0 0 0 auto; width: 100%; max-width: 300px; }
.rh-inv-totals div { display: flex; justify-content: space-between; padding: 5px 0; }
.rh-inv-totals .grand { border-top: 2px solid var(--text); margin-top: 6px; padding-top: 10px; font-weight: 900; font-size: 17px; }
.rh-inv-danger { display: flex; gap: 10px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.rh-inv-toast, .rh-toast { background: var(--c-green-bg); color: var(--c-green); border-radius: 999px; padding: 11px 20px; margin-bottom: 12px; font-weight: 800; }
.rh-inv-toast.err, .rh-toast.err { background: var(--c-red-bg); color: var(--c-red); }
.rh-toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 100000; box-shadow: 0 10px 34px rgba(0,0,0,.3); margin: 0; background: var(--navy); color: #fff; }
.rh-toast.err { background: #b3271b; color: #fff; }
.rh-fixedtoast { font-family: 'Raleway', sans-serif; }

/* ---------- entrar ---------- */
.rh-login.rh-app { background: radial-gradient(120% 140% at 100% 0%, #3a1a78 0%, var(--navy) 55%, var(--navy3) 100%); border-radius: var(--r); padding: clamp(40px, 8vw, 90px) 16px; width: auto; max-width: 1240px; margin: 0 auto; }
.rh-login-card { max-width: 440px; margin: 0 auto; background: #fff; color: #1c0a40; border-radius: 32px; padding: 40px 34px; box-shadow: 0 30px 80px rgba(0,0,0,.4); text-align: center; }
.rh-login-card h2, .rh-login-card label { color: #1c0a40; }
.rh-login-logo { height: 46px; margin-bottom: 18px; }
.rh-login-card h2 { font-size: 34px; letter-spacing: -0.045em; margin-bottom: 6px; }
.rh-login-card form { text-align: left; margin-top: 16px; }
.rh-login-card input[type=text], .rh-login-card input[type=password] { background: #fff; color: #1c0a40; border-color: #d6cfe6; }
.rh-login-card .login-submit input { width: 100%; background: var(--magenta); color: #fff; border: 0; border-radius: 999px; padding: 15px; font-weight: 800; font-size: 16px; cursor: pointer; font-family: inherit; transition: background .2s; }
.rh-login-card .login-submit input:hover { background: var(--magenta-d); }
.rh-login-card .login-remember label { font-weight: 600; }
.rh-login-help { margin-top: 14px; font-size: 14px; }
.rh-login-card a { color: var(--magenta); font-weight: 700; }

@media (max-width: 820px) {
	.rh-cols { grid-template-columns: 1fr; }
	.rh-top { flex-wrap: wrap; border-radius: 28px; padding: 10px 12px 10px 18px; gap: 10px; }
	.rh-nav { order: 3; flex: 1 1 100%; justify-content: flex-start; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
	.rh-nav::-webkit-scrollbar { display: none; }
	.rh-top-logo { margin-right: auto; }
	.rh-hero { padding: 30px 22px; }
	.rh-card { padding: 20px; }
	.rh-inv-linehead { display: none; }
	.rh-inv-line { grid-template-columns: 1fr 1fr; } .rh-inv-line .l-desc { grid-column: 1 / 3; }
	.rh-day { min-height: 54px; padding: 5px; } .rh-day .ev { font-size: 9px; }
	.rh-msg { max-width: 90%; }
}


/* =====================================================================
 * v3.0 — encabezado con campana / idioma, roles, recursos, chat, admin
 * ===================================================================== */
.rh-top-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.rh-icon-btn { appearance: none; position: relative; width: 40px; height: 40px; flex: none; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.3); background: transparent; color: #fff; cursor: pointer; display: grid; place-items: center; padding: 0; font-weight: 800; font-size: 12px; letter-spacing: .04em; transition: background .2s; }
.rh-icon-btn:hover { background: rgba(255,255,255,.16); }
.rh-badge { background: var(--magenta); color: #fff; font-size: 11px; font-weight: 800; line-height: 19px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; text-align: center; font-style: normal; display: inline-block; }
.rh-icon-btn .rh-badge { position: absolute; top: -5px; right: -5px; border: 2px solid var(--navy); }
.rh-badge[hidden], .rh-dot[hidden] { display: none; }
.rh-dot { position: absolute; top: -4px; right: -2px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--magenta); color: #fff; font-size: 11px; font-weight: 800; line-height: 19px; text-align: center; }
.rh-user-btn { appearance: none; display: flex; align-items: center; gap: 8px; border: 0; background: rgba(255,255,255,.08); color: #fff; border-radius: 999px; padding: 4px 14px 4px 4px; cursor: pointer; font-weight: 700; font-size: 13px; transition: background .2s; }
.rh-user-btn:hover { background: rgba(255,255,255,.18); }
.rh-avatar { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--magenta); color: #fff; font-weight: 900; font-size: 14px; flex: none; }
.rh-avatar.sm { width: 24px; height: 24px; font-size: 11px; vertical-align: middle; margin-right: 2px; }
.rh-avatar.lg { width: 64px; height: 64px; font-size: 26px; }
.rh-app .rh-out { color: #fff; font-weight: 800; font-size: 13px; text-decoration: none; border: 1.5px solid rgba(255,255,255,.4); border-radius: 999px; padding: 9px 18px; transition: background .2s, color .2s; }
.rh-app .rh-out:hover { background: #fff; color: var(--navy); }
body.rh-dark .rh-app .rh-out { color: #fff; } body.rh-dark .rh-app .rh-out:hover { color: var(--navy); }
.rh-notif-panel { position: absolute; top: calc(100% + 10px); right: 8px; width: min(380px, 94vw); max-height: 70vh; overflow-y: auto; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 24px 60px rgba(18,6,43,.35); z-index: 60; padding: 8px; }
.rh-notif-panel[hidden] { display: none; }
.rh-np-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px 6px; }
.rh-np-empty { padding: 22px; text-align: center; color: var(--muted); font-weight: 600; }
.rh-np-item { appearance: none; display: block; width: 100%; text-align: left; border: 0; background: transparent; color: var(--text); padding: 12px 14px; border-radius: 16px; cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1.35; }
.rh-np-item small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; font-weight: 600; }
.rh-np-item:hover { background: var(--hover); }
.rh-np-item.unread { background: rgba(204,41,163,.09); font-weight: 800; }
.rh-np-item.unread::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--magenta); margin-right: 8px; }

/* hero con adornos de la marca */
.rh-deco { position: absolute; pointer-events: none; z-index: 0; max-width: none; }
.rh-hero .d1 { width: clamp(90px, 14vw, 190px); right: 4%; bottom: -30px; opacity: .95; }
.rh-hero .d2 { width: clamp(90px, 12vw, 150px); right: 22%; top: 18px; transform: rotate(6deg); }
.rh-hero h2, .rh-hero p, .rh-hero-actions, .rh-hero-date { position: relative; z-index: 1; }

/* roles, etiquetas, avisos */
.rh-role { display: inline-block; padding: 4px 13px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; background: var(--c-gray-bg); color: var(--c-gray); }
.rh-role.r-supervisor { background: var(--navy); color: #fff; } body.rh-dark .rh-role.r-supervisor { background: var(--magenta); }
.rh-role.r-empleado { background: var(--c-blue-bg); color: var(--c-blue); }
.rh-role.r-freelancer { background: var(--c-amber-bg); color: var(--c-amber); }
.rh-role.r-cliente { background: var(--c-purple-bg); color: var(--c-purple); }
.rh-tag { display: inline-block; font-size: 11px; font-weight: 800; padding: 2px 10px; border-radius: 999px; background: var(--c-purple-bg); color: var(--c-purple); white-space: nowrap; }
.rh-banner { background: var(--c-blue-bg); color: var(--c-blue); border-radius: 18px; padding: 14px 18px; margin-bottom: 16px; font-weight: 600; }
.rh-banner.bad { background: var(--c-red-bg); color: var(--c-red); }
.rh-banner a { color: inherit; font-weight: 800; }
.rh-block { display: block; color: var(--muted); font-weight: 600; font-size: 12px; }
.rh-lead { max-width: 720px; margin-bottom: 18px; }
.rh-subhead { font-size: 18px; margin: 22px 0 8px; }
.rh-click { cursor: pointer; } .rh-click:hover { background: var(--surface2); }
tr.rh-click:hover td { background: var(--surface2); }
tr.off td, .rh-pcard.off { opacity: .55; }
.rh-who { display: flex; align-items: center; gap: 10px; } .rh-who strong { display: block; } .rh-who small { color: var(--muted); font-weight: 600; font-size: 12px; }
.rh-who.big h2 { font-size: clamp(26px, 3vw, 36px); }
.rh-due { display: inline-block; font-size: 12px; font-weight: 800; color: var(--muted); margin-left: 6px; }
.rh-due.soon { color: var(--warn); } .rh-due.late { color: var(--bad); }
.rh-check { display: flex !important; align-items: center; gap: 10px; font-weight: 600 !important; margin-bottom: 8px !important; cursor: pointer; }
.rh-check input { width: 18px; height: 18px; margin: 0 !important; accent-color: var(--magenta); flex: none; }
.rh-check small { color: var(--muted); font-weight: 600; }
.rh-people, .rh-perms { background: var(--surface2); border: 1px solid var(--line); border-radius: 20px; padding: 16px 18px; margin-bottom: 14px; max-height: 260px; overflow-y: auto; }
.rh-people > b, .rh-perms > b { display: block; margin-bottom: 10px; font-size: 13px; }
.rh-modal.wide { max-width: 700px; }
.rh-mini-select { width: auto !important; margin: 0 !important; padding: 7px 14px !important; border-radius: 999px !important; font-size: 13px !important; font-weight: 800 !important; }
.rh-tile.static { cursor: default; } .rh-tile.static:hover { transform: none; border-color: var(--line); }
.rh-inv-card.hot { background: var(--yellow); border-color: var(--yellow); color: var(--navy); } .rh-inv-card.hot span { color: #55531a; }
.rh-cstats { display: flex; gap: 16px; font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 10px; } .rh-cstats b { color: var(--text); }
.rh-owe { color: var(--bad); }
.rh-card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; } .rh-card-head h3 { margin: 0 !important; }
strong.done { text-decoration: line-through; opacity: .6; }

/* encabezado de proyecto */
.rh-phead { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(20px, 3vw, 32px); margin-bottom: 18px; }
.rh-phead-top { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.rh-phead h2 { font-size: clamp(28px, 4vw, 44px); letter-spacing: -0.045em; margin-bottom: 6px; }
.rh-phead .acts { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.rh-pdesc { margin: 14px 0 0; max-width: 780px; white-space: pre-wrap; font-weight: 500; }
.rh-phead-prog { display: flex; align-items: center; gap: 14px; margin-top: 16px; } .rh-phead-prog .rh-progress { flex: 1; } .rh-phead-prog b { font-weight: 900; }

/* recursos */
.rh-resgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; margin-top: 14px; }
.rh-res { display: flex; gap: 14px; background: var(--surface2); border: 1px solid var(--line); border-radius: 22px; padding: 18px; transition: border-color .2s, transform .2s var(--ease); }
.rh-res:hover { border-color: var(--magenta); transform: translateY(-2px); }
.rh-res-ico { flex: none; width: 46px; height: 46px; border-radius: 16px; background: var(--navy); display: grid; place-items: center; font-size: 20px; }
.rh-res-body { min-width: 0; flex: 1; } .rh-res-body strong { display: block; font-weight: 900; overflow-wrap: anywhere; } .rh-res-body p { margin: 4px 0; font-size: 14px; color: var(--muted); font-weight: 500; }

/* chat */
.rh-chatwrap { display: grid; grid-template-columns: 300px 1fr; gap: 14px; height: min(72vh, 700px); }
.rh-chat-side { background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 14px; overflow-y: auto; }
.rh-chat-side h5 { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--magenta); margin: 12px 8px 6px; } body.rh-dark .rh-chat-side h5 { color: var(--pink); }
.rh-chan { appearance: none; display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: transparent; color: var(--text); border-radius: 16px; padding: 9px 10px; cursor: pointer; font-family: inherit; }
.rh-chan:hover { background: var(--hover); } .rh-chan.on { background: var(--navy); color: #fff; } body.rh-dark .rh-chan.on { background: var(--magenta); }
.rh-chan .ico { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--c-purple-bg); color: var(--c-purple); display: grid; place-items: center; font-weight: 900; font-size: 14px; }
.rh-chan.on .ico { background: rgba(255,255,255,.2); color: #fff; }
.rh-chan .nm { flex: 1; min-width: 0; } .rh-chan .nm b { display: block; font-size: 14px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .rh-chan .nm small { display: block; font-size: 12px; opacity: .7; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rh-newdm { margin-top: 12px !important; border-radius: 999px !important; }
.rh-chat-pane { background: var(--surface); border: 1px solid var(--line); border-radius: 28px; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.rh-chat-top { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); } .rh-chat-top strong { flex: 1; font-size: 17px; font-weight: 900; }
.rh-back-sm { display: none; appearance: none; border: 0; background: transparent; color: var(--text); font-size: 20px; cursor: pointer; padding: 0 6px; }
.rh-chat-list { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.rh-msg time a { color: inherit; opacity: .8; }

/* calendario */
.rh-day .ev.k-project { background: var(--navy); } body.rh-dark .rh-day .ev.k-project { background: #6a4fb3; }
.rh-day .ev.k-assign { background: var(--yellow); color: var(--navy); } .rh-day .ev.more { background: transparent; color: var(--muted); padding-left: 0; }
.rh-kind { display: inline-block; font-size: 11px; font-weight: 800; padding: 2px 10px; border-radius: 999px; background: var(--c-purple-bg); color: var(--c-purple); }
.rh-kind.k-project { background: var(--navy); color: #fff; } .rh-kind.k-assign { background: var(--yellow); color: var(--navy); }

@media (max-width: 820px) {
	.rh-top-tools { margin-left: auto; gap: 6px; }
	.rh-user-name { display: none; } .rh-user-btn { padding: 4px; }
	.rh-app .rh-out { padding: 8px 12px; }
	.rh-top-logo { margin-right: 0; }
	.rh-chatwrap { grid-template-columns: 1fr; height: auto; }
	.rh-chatwrap .rh-chat-pane { display: none; height: 72vh; }
	.rh-chatwrap.open .rh-chat-side { display: none; } .rh-chatwrap.open .rh-chat-pane { display: flex; }
	.rh-back-sm { display: block; }
	.rh-hero .d2 { display: none; }
}

.rh-app .rh-logo-fallback { filter: brightness(0) invert(1); }

/* =====================================================================
 * v3.1 — Evaluaciones
 * ===================================================================== */
.rh-app { --star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l2.9 6.6 7.1.6-5.4 4.7 1.7 7-6.3-3.8-6.3 3.8 1.7-7L2 9.2l7.1-.6z'/%3E%3C/svg%3E"); }
.rh-monthbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.rh-monthbar strong { font-size: 22px; font-weight: 900; letter-spacing: -0.03em; min-width: 190px; text-align: center; }
.rh-monthbar .rh-count { margin-left: auto; }
.rh-evgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.rh-evcard { background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 22px; display: flex; flex-direction: column; gap: 14px; transition: transform .3s var(--ease), border-color .2s, box-shadow .3s; }
.rh-evcard:hover { transform: translateY(-4px); border-color: var(--magenta); box-shadow: 0 18px 40px rgba(204,41,163,.14); }
.rh-evcard.done { border-color: rgba(204,41,163,.35); }
.rh-evstats { display: flex; gap: 8px; flex-wrap: wrap; }
.rh-evstats span { flex: 1 1 70px; background: var(--surface2); border: 1px solid var(--line); border-radius: 16px; padding: 8px 10px; font-size: 11px; font-weight: 700; color: var(--muted); line-height: 1.2; }
.rh-evstats b { display: block; font-size: 22px; font-weight: 900; color: var(--text); letter-spacing: -0.03em; }
.rh-evstats.wide { margin-bottom: 14px; }
.rh-evscore { display: flex; align-items: center; gap: 10px; min-height: 28px; }
.rh-evscore > b { font-size: 20px; font-weight: 900; }
.rh-stars { display: inline-flex; gap: 2px; }
.rh-stars i { width: 18px; height: 18px; background: var(--field-line); -webkit-mask: var(--star) center/contain no-repeat; mask: var(--star) center/contain no-repeat; }
.rh-stars i.on { background: var(--yellow); } .rh-stars i.half { background: linear-gradient(90deg, var(--yellow) 50%, var(--field-line) 50%); }
.rh-stars.big i { width: 28px; height: 28px; }
.rh-evcrit { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); flex-wrap: wrap; }
.rh-evcrit label { margin: 0; font-weight: 800; }
.rh-starpick { display: flex; align-items: center; gap: 4px; }
.rh-starpick button { appearance: none; border: 0; width: 32px; height: 32px; padding: 0; cursor: pointer; background: var(--field-line); -webkit-mask: var(--star) center/contain no-repeat; mask: var(--star) center/contain no-repeat; transition: transform .2s var(--ease), background .15s; }
.rh-starpick button:hover { transform: scale(1.2) rotate(-8deg); }
.rh-starpick button.on { background: var(--yellow); animation: rhStar .35s var(--ease); }
.rh-starpick:hover button { background: var(--field-line); }
.rh-starpick:hover button.on { background: var(--yellow); }
.rh-starword { font-size: 12px; font-weight: 800; color: var(--muted); min-width: 130px; margin-left: 6px; }
.rh-evtotal { text-align: right; font-weight: 800; margin: 10px 0 6px; } .rh-evtotal b { font-size: 26px; color: var(--magenta); margin-left: 6px; }
body.rh-dark .rh-evtotal b { color: var(--pink); }
.rh-evhist { display: flex; align-items: flex-end; gap: 8px; height: 74px; margin-bottom: 8px; padding: 8px 12px; background: var(--surface2); border-radius: 18px; }
.rh-evhist > span { align-self: center; font-size: 11px; font-weight: 800; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; margin-right: 6px; }
.rh-evhist i { flex: 0 0 34px; background: linear-gradient(180deg, var(--magenta), var(--pink)); border-radius: 8px 8px 3px 3px; position: relative; transform-origin: bottom; animation: rhGrow .6s var(--ease) both; }
.rh-evhist i b { position: absolute; top: -17px; left: 0; right: 0; text-align: center; font-size: 10px; color: var(--muted); }
.rh-evbig { position: relative; overflow: hidden; }
.rh-evbig .ev1 { width: 150px; right: -34px; top: -34px; opacity: .9; }
.rh-evhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; position: relative; z-index: 1; margin-bottom: 16px; }
.rh-evhead h3 { font-size: clamp(24px, 3vw, 34px); margin: 8px 0 4px; }
.rh-bigscore { text-align: right; margin-right: 70px; } .rh-bigscore b { font-size: clamp(44px, 6vw, 70px); font-weight: 900; letter-spacing: -0.05em; color: var(--magenta); line-height: 1; } .rh-bigscore small { font-weight: 800; color: var(--muted); }
body.rh-dark .rh-bigscore b { color: var(--pink); }
.rh-evbars > div { display: grid; grid-template-columns: minmax(150px, 220px) 1fr 24px; align-items: center; gap: 14px; margin: 9px 0; font-weight: 700; font-size: 14px; }
.rh-quote { position: relative; margin: 14px 0 0; padding: 18px 20px 18px 64px; background: var(--surface2); border-radius: 22px; font-weight: 500; white-space: pre-wrap; }
.rh-quote strong { display: block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--magenta); margin-bottom: 4px; }
body.rh-dark .rh-quote strong { color: var(--pink); }
.rh-quote::before { content: ''; position: absolute; left: 18px; top: 20px; width: 32px; height: 30px; background: var(--img-comillas) center/contain no-repeat; }

/* =====================================================================
 * v3.1 — Movimiento
 * ===================================================================== */
@keyframes rhFloat { 0%,100% { transform: translateY(0) rotate(var(--rot, 0deg)); } 50% { transform: translateY(-16px) rotate(calc(var(--rot, 0deg) + 4deg)); } }
@keyframes rhSpin { to { transform: rotate(360deg); } }
@keyframes rhSpinR { to { transform: rotate(-360deg); } }
@keyframes rhPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.07); } }
@keyframes rhBob { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-7px) scale(1.04); } }
@keyframes rhStar { 0% { transform: scale(.4) rotate(-40deg); } 60% { transform: scale(1.3) rotate(10deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes rhGrow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes rhRing { 0%,100% { transform: rotate(0); } 15% { transform: rotate(16deg); } 30% { transform: rotate(-14deg); } 45% { transform: rotate(10deg); } 60% { transform: rotate(-8deg); } 75% { transform: rotate(4deg); } }
@keyframes rhPop { 0% { opacity: 0; transform: translateY(10px) scale(.94); } 100% { opacity: 1; transform: none; } }
@keyframes rhFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rhShine { 0% { transform: translateX(-120%) skewX(-18deg); } 60%,100% { transform: translateX(260%) skewX(-18deg); } }

/* gráficos de la marca: flotan, giran lento y siguen el mouse (parallax suave) */
.rh-deco { translate: calc(var(--mx, 0) * var(--dx, 0px)) calc(var(--my, 0) * var(--dy, 0px)); will-change: transform; }
.rh-hero .d1 { --dx: -26px; --dy: -18px; animation: rhFloat 7s ease-in-out infinite; }
.rh-hero .d2 { --dx: 20px; --dy: 14px; width: clamp(110px, 15vw, 210px); right: 20%; top: -34px; animation: rhSpin 46s linear infinite; opacity: .95; }
.rh-hero .d3 { --dx: -36px; --dy: 24px; width: clamp(60px, 8vw, 110px); right: 38%; bottom: -26px; animation: rhSpinR 34s linear infinite; opacity: .9; }
.rh-hero { overflow: hidden; }
.rh-hero h2 em { display: inline-block; animation: rhPulse 3.6s ease-in-out infinite; }

/* ambiente: salpicaduras muy suaves detrás de todo el portal */
.rh-ambient { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.rh-ambient img { position: absolute; max-width: none; opacity: .09; will-change: transform; translate: calc(var(--mx, 0) * var(--dx, 0px)) calc(var(--my, 0) * var(--dy, 0px)); }
body.rh-dark .rh-ambient img { opacity: .16; }
.rh-ambient .a1 { width: 360px; left: -90px; top: 18vh; --dx: 30px; --dy: 22px; animation: rhSpin 120s linear infinite; }
.rh-ambient .a2 { width: 300px; right: -70px; top: 52vh; --dx: -26px; --dy: -18px; animation: rhFloat 12s ease-in-out infinite; }
.rh-ambient .a3 { width: 230px; left: 12vw; bottom: -70px; --dx: 18px; --dy: -24px; animation: rhSpinR 90s linear infinite; }
.rh-main, .rh-foot { position: relative; z-index: 1; }

/* aparecer al hacer scroll (escalonado) */
.rh-app .rh-reveal { opacity: 0; transform: translateY(18px) scale(.985); transition: opacity .6s var(--ease), transform .6s var(--ease); transition-delay: calc(var(--i, 0) * 55ms); }
.rh-app .rh-reveal.rh-in { opacity: 1; transform: none; }

/* tarjetas, botones y navegación con vida */
.rh-card, .rh-row { transition: transform .3s var(--ease), box-shadow .3s, border-color .2s; }
.rh-pcard:hover, .rh-tile:hover { box-shadow: 0 18px 40px rgba(204,41,163,.15); }
.rh-btn:hover { transform: translateY(-2px); } .rh-btn:active { transform: translateY(0) scale(.97); }
.rh-btn-primary { position: relative; overflow: hidden; }
.rh-btn-primary::after { content: ''; position: absolute; top: 0; bottom: 0; width: 38%; left: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); transform: translateX(-120%) skewX(-18deg); }
.rh-btn-primary:hover::after { animation: rhShine .9s var(--ease); }
.rh-top-logo { transition: transform .4s var(--ease); } .rh-top-logo:hover { transform: rotate(-3deg) scale(1.05); }
.rh-nav-btn:hover { transform: translateY(-1px); }
.rh-icon-btn { transition: transform .25s var(--ease), background .2s; } .rh-icon-btn:hover { transform: scale(1.1); }
#rh-bell.rh-ring svg { animation: rhRing 1s ease-in-out; transform-origin: 50% 0; }
.rh-badge, .rh-dot { animation: rhPulse 2.2s ease-in-out infinite; }
.rh-msg { animation: rhPop .35s var(--ease) both; }
.rh-overlay { animation: rhFade .2s ease both; }
.rh-chip { transition: transform .2s var(--ease); } .rh-chip:hover { transform: scale(1.06); }
.rh-progress > i { transform-origin: left; }
.rh-empty::before { content: ''; display: block; width: 84px; height: 94px; margin: 0 auto 10px; background: var(--img-burbuja-magenta) center/contain no-repeat; animation: rhBob 4s ease-in-out infinite; opacity: .9; }

/* pantalla de entrada */
.rh-login { position: relative; overflow: hidden; }
.rh-login .rh-deco.l1 { width: clamp(150px, 22vw, 300px); left: 3%; top: 8%; animation: rhSpin 60s linear infinite; opacity: .95; }
.rh-login .rh-deco.l2 { width: clamp(110px, 15vw, 210px); right: 5%; bottom: 6%; animation: rhFloat 8s ease-in-out infinite; }
.rh-login .rh-deco.l3 { width: clamp(80px, 11vw, 150px); right: 14%; top: 8%; animation: rhSpinR 40s linear infinite; }
.rh-login .rh-deco.l4 { width: clamp(70px, 9vw, 120px); left: 12%; bottom: 8%; animation: rhBob 5s ease-in-out infinite; }
.rh-login-card { position: relative; z-index: 1; animation: rhPop .7s var(--ease) both; }

@media (max-width: 760px) {
	.rh-ambient .a1, .rh-ambient .a3 { display: none; }
	.rh-hero .d3 { display: none; }
	.rh-bigscore { margin-right: 0; } .rh-evbig .ev1 { width: 90px; right: -22px; top: -22px; }
	.rh-evbars > div { grid-template-columns: 1fr 24px; } .rh-evbars > div > span { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
	.rh-deco, .rh-ambient img, .rh-empty::before, .rh-badge, .rh-dot, .rh-hero h2 em, .rh-login-card, .rh-msg, .rh-evhist i { animation: none !important; }
	.rh-reveal { opacity: 1; transform: none; transition: none; }
}

.rh-login-card .rh-eyebrow { display: inline-flex; justify-content: center; margin: 4px auto 10px; }
.rh-login-card .rh-login-logo { display: block; margin: 0 auto 14px; }

body.rh-dark .rh-tile.hot span, body.rh-dark .rh-tile.hot small { color: var(--navy); }
body.rh-dark .rh-tile.hot strong { color: var(--navy); }
@media (max-width: 1520px) { .rh-nav-btn { padding: 10px 13px; } .rh-top { gap: 10px; } .rh-user-name { display: none; } }
.rh-monthbar .rh-icon-btn { width: 40px; height: 40px; border-radius: 50%; color: var(--text); background: var(--surface); border: 1.5px solid var(--field-line); font-size: 22px; font-weight: 900; line-height: 1; cursor: pointer; }
.rh-monthbar .rh-icon-btn:hover { border-color: var(--magenta); color: var(--magenta); }

/* v3.3 Estado de cuenta */
.rh-stmt-total td { border-top: 2px solid var(--line); font-weight: 800; font-size: 16px; }
.rh-inv-table tr.rh-click { cursor: pointer; }
.rh-aging { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.rh-stmt .rh-card { margin-bottom: 16px; }
@media print {
	.rh-top, .rh-noprint, .rh-back, .rh-toast, #rh-bell, .rh-deco, .rh-fab { display: none !important; }
	body.rh-dark { background: #fff !important; color: #1c0a40 !important; }
	.rh-app, .rh-app * { animation: none !important; transition: none !important; opacity: 1 !important; }
	.rh-inv-card, .rh-card { break-inside: avoid; box-shadow: none !important; }
}
.rh-bad { color: var(--bad); font-weight: 700; }

/* v3.3 Inicio de sesión a pantalla completa */
.rh-login.rh-app { width: 100vw !important; max-width: none !important; margin-left: calc(50% - 50vw) !important; margin-right: 0 !important; border-radius: 0 !important; min-height: 100vh; display: flex; align-items: center; justify-content: center; box-sizing: border-box; }
.rh-login.rh-app .rh-login-card { width: 100%; }
body:has(.rh-login.rh-app) { overflow-x: hidden; }
body:has(.rh-login.rh-app) .wp-site-blocks > header, body:has(.rh-login.rh-app) .wp-site-blocks > footer, body:has(.rh-login.rh-app) .wp-block-post-title { display: none !important; }
body:has(.rh-login.rh-app) .wp-site-blocks, body:has(.rh-login.rh-app) main, body:has(.rh-login.rh-app) .entry-content { padding-top: 0 !important; padding-bottom: 0 !important; margin-top: 0 !important; margin-bottom: 0 !important; }
