/* =============================================================
   INDEX4 — Header
   Top trust strip + main bar with mega-dropdowns.
   Loaded from /public/css/ (bypasses Astro scoping).
   ============================================================= */

/* =============================================================
   HERO STAGE — rotating product views
   ============================================================= */
.rh4-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 5 / 4;
    max-height: 460px;
}
.rh4-stage-panel {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateY(8px) scale(0.985);
    transition: opacity 380ms ease, transform 480ms cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}
.rh4-stage-panel.is-active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}
.rh4-stage-panel > * { width: 100%; height: 100%; }

/* Tabs / indicators below the stage */
.rh4-stage-tabs {
    margin-top: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}
.rh4-stage-tab {
    padding: 7px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.6);
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 200ms ease;
}
.rh4-stage-tab:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.18);
}
.rh4-stage-tab.is-active {
    background: rgba(138, 43, 214, 0.2);
    color: #fff;
    border-color: rgba(138, 43, 214, 0.5);
}
html[data-theme="light"] .rh4-stage-tab {
    background: rgba(13, 10, 31, 0.04);
    border-color: rgba(13, 10, 31, 0.08);
    color: rgba(13, 10, 31, 0.6);
}
html[data-theme="light"] .rh4-stage-tab:hover {
    color: #0d0a1f;
    background: rgba(13, 10, 31, 0.07);
}
html[data-theme="light"] .rh4-stage-tab.is-active {
    background: rgba(138, 43, 214, 0.12);
    color: #4a0e80;
    border-color: rgba(138, 43, 214, 0.3);
}

/* Panel 1 — WhatsApp chat */
.rh4-chat {
    background: rgba(15, 4, 30, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    backdrop-filter: blur(20px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4), 0 0 80px rgba(138, 43, 214, 0.15);
    display: flex;
    flex-direction: column;
}
.rh4-chat-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #6a1cb0, #4a0e80);
    color: #fff;
}
.rh4-chat-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}
.rh4-chat-meta { display: flex; flex-direction: column; line-height: 1.2; gap: 2px; }
.rh4-chat-meta strong { font-size: 13px; font-weight: 600; }
.rh4-chat-meta em {
    font-style: normal;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.rh4-chat-online {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #28c840;
    box-shadow: 0 0 6px #28c840;
}
.rh4-chat-body {
    flex: 1;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: hidden;
}
.rh4-msg {
    max-width: 78%;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.45;
    position: relative;
    color: #fff;
}
.rh4-msg time {
    display: block;
    margin-top: 4px;
    font-size: 10px;
    opacity: 0.55;
}
.rh4-msg--in {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.06);
    border-bottom-left-radius: 4px;
}
.rh4-msg--out {
    align-self: flex-end;
    background: linear-gradient(135deg, #6a1cb0, #4a0e80);
    border-bottom-right-radius: 4px;
}
.rh4-msg--typing {
    align-self: flex-end;
    background: linear-gradient(135deg, #6a1cb0, #4a0e80);
    border-bottom-right-radius: 4px;
    padding: 12px 14px;
    display: inline-flex;
    gap: 4px;
}
.rh4-msg--typing span {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    animation: rh4-typing 1.4s ease-in-out infinite;
}
.rh4-msg--typing span:nth-child(2) { animation-delay: 0.2s; }
.rh4-msg--typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes rh4-typing {
    0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
    30%           { opacity: 1;   transform: translateY(-3px); }
}

/* Audio message bubble (inside chat) */
.rh4-msg--audio {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
}
.rh4-audio-play {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    border: none;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}
.rh4-audio-wave {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    height: 18px;
}
.rh4-audio-wave span {
    display: inline-block;
    width: 2px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 2px;
}
.rh4-audio-wave span:nth-child(1)  { height: 30%; }
.rh4-audio-wave span:nth-child(2)  { height: 55%; }
.rh4-audio-wave span:nth-child(3)  { height: 75%; }
.rh4-audio-wave span:nth-child(4)  { height: 45%; }
.rh4-audio-wave span:nth-child(5)  { height: 65%; }
.rh4-audio-wave span:nth-child(6)  { height: 90%; }
.rh4-audio-wave span:nth-child(7)  { height: 50%; }
.rh4-audio-wave span:nth-child(8)  { height: 70%; }
.rh4-audio-wave span:nth-child(9)  { height: 85%; }
.rh4-audio-wave span:nth-child(10) { height: 40%; }
.rh4-audio-wave span:nth-child(11) { height: 60%; }
.rh4-audio-wave span:nth-child(12) { height: 75%; }
.rh4-audio-wave span:nth-child(13) { height: 95%; }
.rh4-audio-wave span:nth-child(14) { height: 55%; }
.rh4-audio-wave span:nth-child(15) { height: 35%; }
.rh4-audio-wave span:nth-child(16) { height: 70%; }
.rh4-audio-wave span:nth-child(17) { height: 50%; }
.rh4-audio-wave span:nth-child(18) { height: 80%; }
.rh4-audio-wave span:nth-child(19) { height: 60%; }
.rh4-audio-wave span:nth-child(20) { height: 35%; }
.rh4-audio-wave span:nth-child(21) { height: 70%; }
.rh4-audio-wave span:nth-child(22) { height: 90%; }
.rh4-audio-wave span:nth-child(23) { height: 45%; }
.rh4-audio-wave span:nth-child(24) { height: 25%; }
.rh4-audio-wave span:nth-child(25) { height: 60%; }
.rh4-audio-wave span:nth-child(26) { height: 40%; }
.rh4-audio-wave span:nth-child(27) { height: 50%; }
.rh4-audio-wave span:nth-child(28) { height: 30%; }
.rh4-audio-time {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    flex-shrink: 0;
}
.rh4-msg--audio.rh4-msg--in .rh4-audio-play {
    background: rgba(184, 85, 255, 0.2);
    color: #c39bff;
}
.rh4-msg--audio.rh4-msg--in .rh4-audio-wave span { background: rgba(184, 85, 255, 0.7); }
.rh4-msg--audio.rh4-msg--in .rh4-audio-time { color: rgba(255, 255, 255, 0.7); }

/* Panel 2 — CRM Hunter */
.rh4-crm {
    background: rgba(15, 4, 30, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    backdrop-filter: blur(20px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4), 0 0 80px rgba(138, 43, 214, 0.15);
    display: flex;
    flex-direction: column;
}
.rh4-crm-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(138, 43, 214, 0.2), rgba(74, 14, 128, 0.15));
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
}
.rh4-crm-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}
.rh4-crm-logo {
    width: 22px; height: 22px;
    border-radius: 6px;
    background: linear-gradient(135deg, #8a2bd6, #6a1cb0);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.rh4-crm-title strong { font-size: 13px; font-weight: 700; }
.rh4-crm-title em {
    font-style: normal;
    color: rgba(255, 255, 255, 0.55);
    margin-left: 4px;
}
.rh4-crm-stat {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.15;
}
.rh4-crm-stat strong {
    font-size: 14px;
    font-weight: 800;
    color: #fff;
}
.rh4-crm-stat em {
    font-style: normal;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.55);
}
.rh4-crm-board {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 12px;
    overflow: hidden;
}
.rh4-crm-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: rgba(255, 255, 255, 0.025);
    border-radius: 10px;
    padding: 8px 6px;
    min-width: 0;
}
.rh4-crm-coltitle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0 4px 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
}
.rh4-crm-coldot {
    width: 6px; height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}
.rh4-crm-coldot[data-s="new"]  { background: #94a3b8; }
.rh4-crm-coldot[data-s="qual"] { background: #b855ff; }
.rh4-crm-coldot[data-s="neg"]  { background: #f59e0b; }
.rh4-crm-coldot[data-s="won"]  { background: #28c840; }

.rh4-crm-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.rh4-crm-card strong {
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rh4-crm-meta {
    font-size: 10px;
    font-weight: 700;
    color: #b855ff;
}
.rh4-crm-meta em {
    font-style: normal;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 500;
    margin-left: 2px;
}
.rh4-crm-card--hot {
    border-color: rgba(245, 158, 11, 0.4);
    background: rgba(245, 158, 11, 0.06);
}
.rh4-crm-card--hot .rh4-crm-meta { color: #fbbf24; }
.rh4-crm-card--won {
    border-color: rgba(40, 200, 64, 0.4);
    background: rgba(40, 200, 64, 0.06);
}
.rh4-crm-card--won .rh4-crm-meta { color: #28c840; }

/* Panel 3 — Resultados */
.rh4-res {
    background: rgba(15, 4, 30, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    backdrop-filter: blur(20px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4), 0 0 80px rgba(138, 43, 214, 0.15);
    display: flex;
    flex-direction: column;
}
.rh4-res-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 13px;
}
.rh4-res-period {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.55);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.rh4-res-grid {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 14px;
}
.rh4-res-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.rh4-res-card--wide { grid-column: span 2; }
.rh4-res-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 700;
}
.rh4-res-rows { display: flex; flex-direction: column; gap: 4px; }
.rh4-res-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.rh4-res-tag {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.rh4-res-tag--now {
    background: rgba(184, 85, 255, 0.18);
    color: #c39bff;
}
.rh4-res-val {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
    line-height: 1;
}
.rh4-res-val small {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.55);
}
.rh4-res-val--mute { color: rgba(255, 255, 255, 0.4); }
.rh4-res-delta {
    font-size: 12px;
    font-weight: 700;
    margin-top: auto;
}
.rh4-res-delta--up   { color: #28c840; }
.rh4-res-delta--down { color: #b855ff; }

.rh4-res-prog {
    position: relative;
    height: 12px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    overflow: hidden;
}
.rh4-res-prog-before {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    z-index: 1;
}
.rh4-res-prog-after {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    background: linear-gradient(90deg, #6a1cb0, #b855ff);
    border-radius: 999px;
    z-index: 2;
    box-shadow: 0 0 12px rgba(184, 85, 255, 0.5);
}
.rh4-res-barkeys {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
}
.rh4-res-barkeys span:last-child { margin-left: auto; }
.rh4-res-key {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #b855ff;
    margin-right: 5px;
    vertical-align: middle;
}
.rh4-res-key--mute { background: rgba(255, 255, 255, 0.25); }

/* Light theme overrides for stage panels */
html[data-theme="light"] .rh4-chat,
html[data-theme="light"] .rh4-crm,
html[data-theme="light"] .rh4-res {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(13, 10, 31, 0.08);
    box-shadow: 0 24px 60px rgba(13, 10, 31, 0.1), 0 0 60px rgba(138, 43, 214, 0.08);
}
html[data-theme="light"] .rh4-crm-bar {
    background: linear-gradient(135deg, rgba(138, 43, 214, 0.08), rgba(74, 14, 128, 0.04));
    border-bottom-color: rgba(13, 10, 31, 0.06);
    color: #0d0a1f;
}
html[data-theme="light"] .rh4-crm-title em { color: rgba(13, 10, 31, 0.55); }
html[data-theme="light"] .rh4-crm-stat strong { color: #0d0a1f; }
html[data-theme="light"] .rh4-crm-stat em { color: rgba(13, 10, 31, 0.55); }
html[data-theme="light"] .rh4-crm-col {
    background: rgba(13, 10, 31, 0.03);
}
html[data-theme="light"] .rh4-crm-coltitle { color: rgba(13, 10, 31, 0.55); }
html[data-theme="light"] .rh4-crm-card {
    background: #fff;
    border-color: rgba(13, 10, 31, 0.08);
}
html[data-theme="light"] .rh4-crm-card strong { color: #0d0a1f; }
html[data-theme="light"] .rh4-crm-meta { color: #6a1cb0; }
html[data-theme="light"] .rh4-crm-meta em { color: rgba(13, 10, 31, 0.5); }

html[data-theme="light"] .rh4-res-bar {
    background: rgba(13, 10, 31, 0.02);
    border-bottom-color: rgba(13, 10, 31, 0.06);
    color: #0d0a1f;
}
html[data-theme="light"] .rh4-res-period { color: rgba(13, 10, 31, 0.5); }
html[data-theme="light"] .rh4-res-card {
    background: rgba(13, 10, 31, 0.025);
    border-color: rgba(13, 10, 31, 0.06);
}
html[data-theme="light"] .rh4-res-label { color: rgba(13, 10, 31, 0.55); }
html[data-theme="light"] .rh4-res-tag {
    background: rgba(13, 10, 31, 0.06);
    color: rgba(13, 10, 31, 0.55);
}
html[data-theme="light"] .rh4-res-tag--now {
    background: rgba(138, 43, 214, 0.12);
    color: #6a1cb0;
}
html[data-theme="light"] .rh4-res-val { color: #0d0a1f; }
html[data-theme="light"] .rh4-res-val small { color: rgba(13, 10, 31, 0.55); }
html[data-theme="light"] .rh4-res-val--mute { color: rgba(13, 10, 31, 0.4); }
html[data-theme="light"] .rh4-res-delta--down { color: #6a1cb0; }
html[data-theme="light"] .rh4-res-prog {
    background: rgba(13, 10, 31, 0.06);
}
html[data-theme="light"] .rh4-res-barkeys { color: rgba(13, 10, 31, 0.65); }
html[data-theme="light"] .rh4-res-key--mute { background: rgba(13, 10, 31, 0.2); }

html[data-theme="light"] .rh4-msg--in {
    background: rgba(13, 10, 31, 0.06);
    color: #0d0a1f;
}
html[data-theme="light"] .rh4-msg--audio.rh4-msg--in .rh4-audio-play {
    background: rgba(138, 43, 214, 0.12);
    color: #6a1cb0;
}
html[data-theme="light"] .rh4-msg--audio.rh4-msg--in .rh4-audio-wave span {
    background: rgba(138, 43, 214, 0.65);
}
html[data-theme="light"] .rh4-msg--audio.rh4-msg--in .rh4-audio-time {
    color: rgba(13, 10, 31, 0.7);
}

/* Responsive — keep 4:3 stage on small screens */
@media (max-width: 600px) {
    .rh4-stage { aspect-ratio: 4 / 3; }
    .rh4-stage-tabs { gap: 4px; }
    .rh4-stage-tab { padding: 6px 10px; font-size: 11px; }
}



/* =============================================================
   BENTO — datacenter racks visual
   ============================================================= */
.rh4-racks {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 8px 0 4px;
}
.rh4-rack {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px 10px;
    transition: all 200ms ease;
}
.rh4-rack:hover {
    background: rgba(138, 43, 214, 0.08);
    border-color: rgba(138, 43, 214, 0.3);
}
.rh4-rack-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.rh4-rack-name {
    font-size: 11px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.04em;
}
.rh4-rack-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #28c840;
    box-shadow: 0 0 6px rgba(40, 200, 64, 0.6);
    animation: rh4-pulse-dot 2.4s ease-in-out infinite;
}
.rh4-rack-units {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 6px 0;
}
.rh4-rack-units span {
    height: 6px;
    background: linear-gradient(90deg, rgba(184, 85, 255, 0.4), rgba(138, 43, 214, 0.2));
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}
.rh4-rack-units span::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 4px;
    width: 3px; height: 3px;
    border-radius: 50%;
    background: #28c840;
    box-shadow: 0 0 4px #28c840;
    transform: translateY(-50%);
}
.rh4-rack-units span:nth-child(2)::after { background: #fbbf24; box-shadow: 0 0 4px #fbbf24; }
.rh4-rack-units span:nth-child(5)::after { background: #fbbf24; box-shadow: 0 0 4px #fbbf24; }
.rh4-rack-foot {
    font-size: 10px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    text-align: center;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

html[data-theme="light"] .rh4-rack {
    background: rgba(13, 10, 31, 0.04);
    border-color: rgba(13, 10, 31, 0.08);
}
html[data-theme="light"] .rh4-rack:hover {
    background: rgba(138, 43, 214, 0.06);
    border-color: rgba(138, 43, 214, 0.25);
}
html[data-theme="light"] .rh4-rack-name { color: #0d0a1f; }
html[data-theme="light"] .rh4-rack-foot {
    color: rgba(13, 10, 31, 0.55);
    border-top-color: rgba(13, 10, 31, 0.06);
}
html[data-theme="light"] .rh4-rack-units span {
    background: linear-gradient(90deg, rgba(138, 43, 214, 0.3), rgba(138, 43, 214, 0.1));
}

/* =============================================================
   BENTO — Agent promo banners
   ============================================================= */
.rh4-agent {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
}
.rh4-agent::before {
    content: "";
    position: absolute;
    inset: -1px;
    background: linear-gradient(135deg, rgba(138, 43, 214, 0.12), transparent 60%);
    opacity: 0;
    transition: opacity 250ms ease;
    pointer-events: none;
    border-radius: inherit;
}
.rh4-agent:hover {
    text-decoration: none;
    color: inherit;
    border-color: rgba(138, 43, 214, 0.4) !important;
    transform: translateY(-2px);
}
.rh4-agent:hover::before { opacity: 1; }

.rh4-agent-tag {
    align-self: flex-start;
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
    position: relative;
    z-index: 1;
}
.rh4-agent-ico {
    width: 40px; height: 40px;
    border-radius: 10px;
    background: rgba(138, 43, 214, 0.15);
    border: 1px solid rgba(138, 43, 214, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #c39bff;
    transition: all 250ms ease;
    position: relative;
    z-index: 1;
}
.rh4-agent-ico svg { width: 22px; height: 22px; }
.rh4-agent:hover .rh4-agent-ico {
    background: rgba(138, 43, 214, 0.25);
    border-color: rgba(184, 85, 255, 0.55);
    color: #fff;
}
.rh4-agent h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    position: relative;
    z-index: 1;
}
.rh4-agent p {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.62);
    position: relative;
    z-index: 1;
}
.rh4-agent-cta {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 700;
    color: #c39bff;
    transition: all 200ms ease;
    position: relative;
    z-index: 1;
}
.rh4-agent-cta svg { transition: transform 200ms ease; }
.rh4-agent:hover .rh4-agent-cta { color: #fff; }
.rh4-agent:hover .rh4-agent-cta svg { transform: translateX(3px); }

/* Featured agent (SDR) — slightly bolder visual */
.rh4-agent--feature {
    background: linear-gradient(135deg, rgba(138, 43, 214, 0.15) 0%, rgba(255, 255, 255, 0.03) 100%) !important;
    border-color: rgba(138, 43, 214, 0.35) !important;
}

html[data-theme="light"] .rh4-agent::before {
    background: linear-gradient(135deg, rgba(138, 43, 214, 0.07), transparent 60%);
}
html[data-theme="light"] .rh4-agent-tag {
    background: rgba(13, 10, 31, 0.04);
    border-color: rgba(13, 10, 31, 0.08);
    color: rgba(13, 10, 31, 0.6);
}
html[data-theme="light"] .rh4-agent-ico {
    background: rgba(138, 43, 214, 0.08);
    border-color: rgba(138, 43, 214, 0.2);
    color: #6a1cb0;
}
html[data-theme="light"] .rh4-agent:hover .rh4-agent-ico {
    background: rgba(138, 43, 214, 0.15);
    color: #4a0e80;
}
html[data-theme="light"] .rh4-agent h3 { color: #0d0a1f; }
html[data-theme="light"] .rh4-agent p { color: rgba(13, 10, 31, 0.62); }
html[data-theme="light"] .rh4-agent-cta { color: #6a1cb0; }
html[data-theme="light"] .rh4-agent:hover .rh4-agent-cta { color: #4a0e80; }
html[data-theme="light"] .rh4-agent--feature {
    background: linear-gradient(135deg, rgba(138, 43, 214, 0.08) 0%, rgba(13, 10, 31, 0.02) 100%) !important;
    border-color: rgba(138, 43, 214, 0.25) !important;
}

/* =============================================================
   ROTATING BANNER — top of page
   ============================================================= */
.rh4-banner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 56px;
    background: linear-gradient(90deg, #4a0e80 0%, #8a2bd6 50%, #4a0e80 100%);
    background-size: 200% 100%;
    color: #fff;
    font-size: 13px;
    overflow: hidden;
    animation: rh4-banner-shimmer 14s linear infinite;
}
@keyframes rh4-banner-shimmer {
    0%   { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}
.rh4-banner.is-hidden { display: none; }

.rh4-banner-track {
    flex: 1;
    position: relative;
    height: 22px;
    max-width: 880px;
    overflow: hidden;
}
.rh4-banner-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 360ms ease, transform 480ms cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    white-space: nowrap;
}
.rh4-banner-slide.is-active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}
.rh4-banner-slide.is-leaving {
    opacity: 0;
    transform: translateX(-20px);
}

.rh4-banner-tag {
    flex-shrink: 0;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.rh4-banner-tag--alt {
    background: rgba(255, 255, 255, 0.95);
    color: #4a0e80;
    border-color: transparent;
}
.rh4-banner-text {
    color: rgba(255, 255, 255, 0.94);
    overflow: hidden;
    text-overflow: ellipsis;
}
.rh4-banner-text strong { color: #fff; font-weight: 700; }

.rh4-banner-cta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    transition: all 180ms ease;
    flex-shrink: 0;
}
.rh4-banner-cta:hover {
    background: rgba(255, 255, 255, 0.95);
    color: #4a0e80;
    text-decoration: none;
}

.rh4-banner-arrow {
    flex-shrink: 0;
    width: 24px; height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    border-radius: 999px;
    transition: all 180ms ease;
}
.rh4-banner-arrow:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.rh4-banner-dots {
    position: absolute;
    right: 56px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 5px;
}
.rh4-banner-dot {
    width: 5px; height: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 180ms ease;
}
.rh4-banner-dot:hover { background: rgba(255, 255, 255, 0.6); }
.rh4-banner-dot.is-active {
    width: 16px;
    background: #fff;
}

.rh4-banner-close {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px; height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    border-radius: 999px;
    transition: all 180ms ease;
}
.rh4-banner-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

@media (max-width: 900px) {
    .rh4-banner { padding: 10px 44px; gap: 8px; font-size: 12px; }
    .rh4-banner-arrow { display: none; }
    .rh4-banner-dots { display: none; }
}
@media (max-width: 600px) {
    .rh4-banner-tag { display: none; }
    .rh4-banner-cta { display: none; }
    .rh4-banner-text { white-space: normal; text-align: center; line-height: 1.3; }
    .rh4-banner-track { height: auto; }
}

/* Hero highlighted phrase — solid brand purple, no gradient
   (Wins over inline <style> via specificity + !important to bypass caching) */
html .rh4-gradient-text,
html[data-theme="light"] .rh4-gradient-text,
html[data-theme="dark"] .rh4-gradient-text {
    background: none !important;
    background-clip: initial !important;
    -webkit-background-clip: initial !important;
    -webkit-text-fill-color: currentColor !important;
}
html .rh4-gradient-text { color: #b855ff !important; }
html[data-theme="light"] .rh4-gradient-text { color: #6a1cb0 !important; }

/* Light theme — bento card text legibility fixes */
html[data-theme="light"] .rh4-stat-big {
    background: none !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
    -webkit-text-fill-color: #0d0a1f !important;
    color: #0d0a1f !important;
}
html[data-theme="light"] .rh4-card-foot {
    color: rgba(13, 10, 31, 0.7) !important;
}
html[data-theme="light"] .rh4-rack-foot {
    color: rgba(13, 10, 31, 0.7) !important;
    border-top-color: rgba(13, 10, 31, 0.08) !important;
}
html[data-theme="light"] .rh4-rack-name {
    color: #0d0a1f !important;
}
html[data-theme="light"] .rh4-card-head h3 {
    color: #0d0a1f !important;
}
html[data-theme="light"] .rh4-pill {
    background: rgba(13, 10, 31, 0.05) !important;
    border-color: rgba(13, 10, 31, 0.12) !important;
    color: rgba(13, 10, 31, 0.8) !important;
}
html[data-theme="light"] .rh4-check-list li {
    color: rgba(13, 10, 31, 0.8) !important;
}

/* Light theme — kill ALL cyan tag/check accents (illegible on white) */
html[data-theme="light"] .rh4-tag--cyan,
html[data-theme="light"] .rh4-tag--green,
html[data-theme="light"] .rh4-tag--purple,
html[data-theme="light"] .rh4-tag--pink {
    background: rgba(138, 43, 214, 0.1) !important;
    border: 1px solid rgba(138, 43, 214, 0.2) !important;
    color: #6a1cb0 !important;
}
html[data-theme="light"] .rh4-check {
    background: rgba(138, 43, 214, 0.12) !important;
    color: #6a1cb0 !important;
}
html[data-theme="light"] .rh4-kicker {
    color: #6a1cb0 !important;
}

/* =============================================================
   COMPARISON TABLE — refined styling (override scoped Astro CSS)
   ============================================================= */
.rh4-compare {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 20px !important;
    overflow: hidden !important;
    backdrop-filter: blur(16px);
}
.rh4-compare-table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    font-size: 14px !important;
}
.rh4-compare-table thead tr { background: rgba(255, 255, 255, 0.02); }
.rh4-compare-table thead th {
    padding: 22px 18px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    vertical-align: middle;
}
.rh4-compare-table thead th:first-child {
    text-align: left !important;
    width: 36%;
}
.rh4-compare-rh {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.45);
}
.rh4-compare-h {
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
}
.rh4-compare-mark {
    display: block;
    font-weight: 800;
    font-size: 16px;
    letter-spacing: -0.01em;
    color: #fff;
    margin-bottom: 4px;
}
.rh4-compare-tag {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.rh4-compare-table thead th.is-us {
    position: relative;
    background: linear-gradient(180deg, rgba(138, 43, 214, 0.35) 0%, rgba(138, 43, 214, 0.18) 100%) !important;
}
.rh4-compare-table thead th.is-us::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #b855ff, #8a2bd6);
}
.rh4-compare-table tbody td {
    padding: 18px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    color: rgba(255, 255, 255, 0.75) !important;
    text-align: center;
    vertical-align: middle;
}
.rh4-compare-table tbody td:first-child {
    text-align: left !important;
    color: #fff !important;
    font-weight: 600 !important;
    font-size: 14px;
}
.rh4-compare-table tbody tr:last-child td { border-bottom: none !important; }
.rh4-compare-table tbody tr:hover td { background: rgba(255, 255, 255, 0.02); }
.rh4-compare-table tbody td.is-us {
    background: linear-gradient(180deg, rgba(138, 43, 214, 0.1), rgba(138, 43, 214, 0.04)) !important;
    color: #fff !important;
    font-weight: 700 !important;
}
.rh4-compare-table tbody tr:last-child td.is-us {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

/* Check / dash markers */
.rh4-yes {
    display: inline-flex !important;
    width: 28px !important;
    height: 28px !important;
    align-items: center;
    justify-content: center;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #34d399, #1ea035) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(40, 200, 64, 0.3);
}
.rh4-yes svg { width: 14px; height: 14px; }
.is-us .rh4-yes {
    background: linear-gradient(135deg, #b855ff, #8a2bd6) !important;
    box-shadow: 0 4px 12px rgba(138, 43, 214, 0.4);
}
.rh4-no {
    display: inline-block !important;
    color: rgba(255, 255, 255, 0.25) !important;
    font-size: 22px !important;
    font-weight: 600 !important;
    line-height: 1;
}

/* Light theme — comparison table */
html[data-theme="light"] .rh4-compare {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(13, 10, 31, 0.08) !important;
    box-shadow: 0 8px 32px rgba(13, 10, 31, 0.05);
}
html[data-theme="light"] .rh4-compare-table thead tr {
    background: rgba(13, 10, 31, 0.025);
}
html[data-theme="light"] .rh4-compare-table thead th {
    border-bottom-color: rgba(13, 10, 31, 0.1) !important;
}
html[data-theme="light"] .rh4-compare-rh { color: rgba(13, 10, 31, 0.5); }
html[data-theme="light"] .rh4-compare-h { color: rgba(13, 10, 31, 0.7); }
html[data-theme="light"] .rh4-compare-mark { color: #fff; }
html[data-theme="light"] .rh4-compare-table thead th.is-us {
    background: linear-gradient(180deg, #8a2bd6, #6a1cb0) !important;
}
html[data-theme="light"] .rh4-compare-table tbody td {
    border-bottom-color: rgba(13, 10, 31, 0.06) !important;
    color: rgba(13, 10, 31, 0.7) !important;
}
html[data-theme="light"] .rh4-compare-table tbody td:first-child {
    color: #0d0a1f !important;
}
html[data-theme="light"] .rh4-compare-table tbody tr:hover td { background: rgba(138, 43, 214, 0.025); }
html[data-theme="light"] .rh4-compare-table tbody td.is-us {
    background: linear-gradient(180deg, rgba(138, 43, 214, 0.1), rgba(138, 43, 214, 0.04)) !important;
    color: #0d0a1f !important;
}
html[data-theme="light"] .rh4-no { color: rgba(13, 10, 31, 0.25) !important; }

@media (max-width: 720px) {
    .rh4-compare { overflow-x: auto !important; }
    .rh4-compare-table { min-width: 640px; }
    .rh4-compare-table thead th,
    .rh4-compare-table tbody td { padding: 14px 10px !important; }
}

/* =============================================================
   STACK BUILDER — refined (override scoped Astro CSS)
   ============================================================= */
.rh4-builder {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    border-radius: 24px !important;
    overflow: hidden;
    backdrop-filter: blur(16px);
}
.rh4-builder-tabs {
    display: flex !important;
    gap: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}
.rh4-tab {
    flex: 1 !important;
    padding: 18px 16px !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: rgba(255, 255, 255, 0.55) !important;
    font: inherit !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 200ms ease !important;
    position: relative;
    text-align: center;
}
.rh4-tab:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.04) !important;
}
.rh4-tab.is-active {
    color: #fff !important;
    background: transparent !important;
    box-shadow: none !important;
}
.rh4-tab.is-active::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 2px;
    background: linear-gradient(90deg, #b855ff, #8a2bd6);
    border-radius: 2px 2px 0 0;
}

/* Slider value — was cyan (illegible) → solid white/dark */
.rh4-control-label strong {
    color: #fff !important;
    font-weight: 800 !important;
    font-size: 15px !important;
}
.rh4-control input[type="range"]::-webkit-slider-thumb {
    background: #b855ff !important;
}
.rh4-control input[type="range"]::-moz-range-thumb {
    background: #b855ff !important;
}

/* Output card */
.rh4-builder-out {
    background: linear-gradient(180deg, rgba(138,43,214,0.18), rgba(138,43,214,0.06)) !important;
    border: 1px solid rgba(138,43,214,0.35) !important;
}
.rh4-out-label {
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 11px !important;
    font-weight: 700 !important;
}
.rh4-out-foot {
    color: rgba(255, 255, 255, 0.65) !important;
    font-size: 12px !important;
}

/* Light theme — Builder */
html[data-theme="light"] .rh4-builder {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(13, 10, 31, 0.1) !important;
    box-shadow: 0 8px 32px rgba(13, 10, 31, 0.05);
}
html[data-theme="light"] .rh4-builder-tabs {
    border-bottom-color: rgba(13, 10, 31, 0.08) !important;
}
html[data-theme="light"] .rh4-tab {
    color: rgba(13, 10, 31, 0.55) !important;
}
html[data-theme="light"] .rh4-tab:hover {
    color: #0d0a1f !important;
    background: rgba(13, 10, 31, 0.03) !important;
}
html[data-theme="light"] .rh4-tab.is-active {
    color: #0d0a1f !important;
    background: transparent !important;
}
html[data-theme="light"] .rh4-control-label {
    color: rgba(13, 10, 31, 0.7) !important;
}
html[data-theme="light"] .rh4-control-label strong {
    color: #0d0a1f !important;
}
html[data-theme="light"] .rh4-control input[type="range"] {
    background: rgba(13, 10, 31, 0.1) !important;
}
html[data-theme="light"] .rh4-control--check span {
    color: #0d0a1f !important;
    font-weight: 600 !important;
}
html[data-theme="light"] .rh4-builder-out {
    background: linear-gradient(180deg, rgba(138,43,214,0.1), rgba(138,43,214,0.02)) !important;
    border-color: rgba(138, 43, 214, 0.25) !important;
}
html[data-theme="light"] .rh4-out-label {
    color: rgba(13, 10, 31, 0.6) !important;
}
html[data-theme="light"] .rh4-out-price {
    color: #0d0a1f !important;
}
html[data-theme="light"] .rh4-out-price small {
    color: rgba(13, 10, 31, 0.55) !important;
}
html[data-theme="light"] .rh4-out-foot {
    color: rgba(13, 10, 31, 0.65) !important;
}

/* Light theme — keep terminal dark with brand-tinted background */
html[data-theme="light"] .rh4-terminal {
    background: #180025 !important;
    border-color: rgba(184, 85, 255, 0.2) !important;
    box-shadow:
        0 24px 60px rgba(13, 10, 31, 0.18),
        0 0 80px rgba(138, 43, 214, 0.15) !important;
}

/* Eyebrow — neutral white pill (no cyan) */
html .rh4-eyebrow {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    color: #fff !important;
}
html .rh4-eyebrow .rh4-pulse-dot {
    background: #fff !important;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.6) !important;
}
html[data-theme="light"] .rh4-eyebrow {
    background: rgba(13, 10, 31, 0.04) !important;
    border-color: rgba(13, 10, 31, 0.15) !important;
    color: #0d0a1f !important;
}
html[data-theme="light"] .rh4-eyebrow .rh4-pulse-dot {
    background: #0d0a1f !important;
    box-shadow: 0 0 8px rgba(13, 10, 31, 0.4) !important;
}

/* Trust line: kill cyan/illegible fallback in light mode */
html[data-theme="light"] .rh4-hero-trust {
    color: rgba(13, 10, 31, 0.65) !important;
}
html[data-theme="light"] .rh4-hero-trust strong {
    color: #0d0a1f !important;
}

.rh4-hd {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    background: rgba(7, 0, 18, 0.92);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-family: inherit;
}
.rh4-hd.is-scrolled {
    background: rgba(7, 0, 18, 0.96);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* ============= TOP STRIP ============= */
.rh4-hd-top {
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 12px;
}
.rh4-hd-top-inner {
    max-width: 1360px;
    margin: 0 auto;
    padding: 8px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.rh4-hd-top-left,
.rh4-hd-top-right {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.55);
}
.rh4-hd-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    text-decoration: none;
    transition: color 200ms ease;
}
.rh4-hd-status:hover { color: #fff; text-decoration: none; }
.rh4-hd-status-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #28c840;
    box-shadow: 0 0 4px rgba(40, 200, 64, 0.5);
    animation: rh4-hd-pulse 2.4s ease-in-out infinite;
}
@keyframes rh4-hd-pulse {
    0%, 100% { opacity: 0.85; }
    50% { opacity: 0.45; }
}
.rh4-hd-trust { color: rgba(255, 255, 255, 0.5); }
.rh4-hd-sep { color: rgba(255, 255, 255, 0.2); }

.rh4-hd-tlink {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    font-weight: 500;
    transition: color 200ms ease;
}
.rh4-hd-tlink:hover { color: #fff; text-decoration: none; }

/* Top-strip lang */
.rh4-hd-lang { position: relative; }
.rh4-hd-lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.65);
    font: inherit;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 180ms ease;
}
.rh4-hd-lang-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}
.rh4-hd-lang-pop {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 200px;
    background: rgba(20, 5, 40, 0.97);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 6px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 110;
}
.rh4-hd-lang.is-open .rh4-hd-lang-pop { display: block; }
.rh4-hd-lang-pop a {
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-size: 13px;
    transition: all 150ms ease;
}
.rh4-hd-lang-pop a:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.rh4-hd-lang-pop a.is-active { background: rgba(138, 43, 214, 0.18); color: #fff; font-weight: 600; }

/* Carrinho mini no top strip — chip clicável com badge contador
   Atualizado pelo standard_cart/scripts.min.js via #cartItemCount */
.rh4-hd-cart-mini {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.65);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-decoration: none;
    transition: background 160ms ease, color 160ms ease, transform 120ms ease;
}
.rh4-hd-cart-mini:hover {
    color: #fff;
    background: rgba(184, 85, 255, 0.14);
    border-color: rgba(184, 85, 255, 0.30);
    text-decoration: none;
    transform: translateY(-1px);
}
.rh4-hd-cart-mini i { opacity: 0.85; }
.rh4-hd-cart-label {
    letter-spacing: 0.02em;
}
.rh4-hd-cart-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    border-radius: 999px;
    background: linear-gradient(135deg, #8a2bd6, #b855ff);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(138, 43, 214, 0.40);
}
/* Quando carrinho vazio, badge mais discreto */
.rh4-hd-cart-badge.is-empty {
    background: rgba(255, 255, 255, 0.10);
    color: rgba(255, 255, 255, 0.55);
    box-shadow: none;
}

/* Light theme: contraste ajustado pra fundo claro */
html[data-theme="light"] .rh4-hd-cart-mini {
    color: rgba(13, 10, 31, 0.65);
    background: rgba(13, 10, 31, 0.04);
    border-color: rgba(13, 10, 31, 0.08);
}
html[data-theme="light"] .rh4-hd-cart-mini:hover {
    color: #6a1ab0;
    background: rgba(106, 26, 176, 0.06);
    border-color: rgba(106, 26, 176, 0.22);
}
html[data-theme="light"] .rh4-hd-cart-badge {
    background: linear-gradient(135deg, #6a1ab0, #8a2bd6);
    box-shadow: 0 2px 6px rgba(106, 26, 176, 0.35);
}
html[data-theme="light"] .rh4-hd-cart-badge.is-empty {
    background: rgba(13, 10, 31, 0.08);
    color: rgba(13, 10, 31, 0.50);
    box-shadow: none;
}

/* Mobile: esconde label "Carrinho", mantém só ícone + badge */
@media (max-width: 640px) {
    .rh4-hd-cart-label { display: none; }
}

/* ============= MAIN BAR ============= */
.rh4-hd-main-inner {
    max-width: 1360px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 32px;
}

/* Brand — real logo with theme-aware variants */
.rh4-hd-brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}
.rh4-hd-logo {
    height: 34px;
    width: auto;
    max-width: 160px;
    display: block;
}
.rh4-hd-logo--light { display: none; }
html[data-theme="light"] .rh4-hd-logo--dark  { display: none; }
html[data-theme="light"] .rh4-hd-logo--light { display: block; }

/* Primary nav */
.rh4-hd-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
}
/* position: relative pra ancorar o mega menu no botão de trigger.
   Resultado: dropdown abre ALINHADO À ESQUERDA do label ("Produtos" /
   "Soluções"), não centralizado na navbar inteira. */
.rh4-hd-nav-item { position: relative; }

.rh4-hd-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 9px 14px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.75);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 180ms ease;
    white-space: nowrap;
}
.rh4-hd-nav-link:hover { color: #fff; background: rgba(255, 255, 255, 0.05); text-decoration: none; }
.rh4-hd-nav-link svg { transition: transform 200ms ease; opacity: 0.65; }
.rh4-hd-nav-item:hover .rh4-hd-nav-link svg { transform: rotate(180deg); }

/* MEGA dropdown */
/* MEGA dropdown — ancorado abaixo do trigger ("Produtos" / "Soluções").
   left: -16px desloca pra fora do padding do nav-link, alinhando visualmente
   a borda esquerda do mega ao texto do label. */
.rh4-hd-mega {
    position: absolute;
    top: calc(100% + 8px);
    left: -16px;
    min-width: 1140px;
    background: rgba(15, 4, 30, 0.98);
    backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 180ms ease, transform 180ms ease, visibility 0s linear 180ms;
    z-index: 95;
}
.rh4-hd-nav-item:hover .rh4-hd-mega,
.rh4-hd-nav-item:focus-within .rh4-hd-mega {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 180ms ease, transform 180ms ease, visibility 0s linear 0s;
}
.rh4-hd-mega--sm { min-width: 520px; }

.rh4-hd-mega-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.1fr);
    gap: 28px;
}
.rh4-hd-mega-grid--2 { grid-template-columns: 1fr 1fr; }

.rh4-hd-mega-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.rh4-hd-mega-h {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 8px;
    padding: 0 10px;
}
.rh4-hd-mega-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px;
    border-radius: 10px;
    color: #fff;
    text-decoration: none;
    transition: background 150ms ease;
}
.rh4-hd-mega-item:hover {
    background: rgba(255, 255, 255, 0.05);
    text-decoration: none;
}
.rh4-hd-mega-item span:last-child {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.rh4-hd-mega-item strong {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}
.rh4-hd-mega-item em {
    font-size: 12px;
    font-style: normal;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.4;
}
.rh4-hd-mega-ico {
    width: 36px; height: 36px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.85);
    flex-shrink: 0;
    transition: all 180ms ease;
}
.rh4-hd-mega-ico svg { width: 18px; height: 18px; display: block; }
.rh4-hd-mega-item:hover .rh4-hd-mega-ico {
    background: rgba(138, 43, 214, 0.15);
    border-color: rgba(138, 43, 214, 0.3);
    color: #fff;
}

/* Featured tile in mega */
.rh4-hd-mega-feature {
    background: linear-gradient(135deg, rgba(138, 43, 214, 0.15) 0%, rgba(1, 250, 213, 0.06) 100%);
    border: 1px solid rgba(138, 43, 214, 0.25);
    border-radius: 12px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.rh4-hd-mega-tag {
    align-self: flex-start;
    padding: 3px 8px;
    background: rgba(1, 250, 213, 0.15);
    color: #01fad5;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.rh4-hd-mega-feature strong {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
}
.rh4-hd-mega-feature p {
    margin: 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    line-height: 1.5;
}
.rh4-hd-mega-cta {
    margin-top: auto;
    color: #01fad5;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}
.rh4-hd-mega-cta:hover { color: #fff; text-decoration: none; }

/* Right actions */
.rh4-hd-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
/* Inline expandable search ----------------------- */
.rh4-hd-search {
    position: relative;
    display: flex;
    align-items: center;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    overflow: hidden;
    transition:
        width 360ms cubic-bezier(0.16, 1, 0.3, 1),
        background 200ms ease,
        border-color 200ms ease,
        box-shadow 200ms ease;
}
.rh4-hd-search:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.18);
}
.rh4-hd-search.is-open {
    width: 320px;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(138, 43, 214, 0.5);
    box-shadow:
        0 0 0 4px rgba(138, 43, 214, 0.12),
        0 8px 24px rgba(0, 0, 0, 0.3);
    overflow: visible;
}
.rh4-hd-search-trigger {
    width: 36px;
    height: 34px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: color 180ms ease;
}
.rh4-hd-search-trigger:hover { color: #fff; }
.rh4-hd-search.is-open .rh4-hd-search-trigger { color: #c39bff; pointer-events: none; }

/* Override global input[type=text] styling from rollin-theme.css */
.rh4-hd-search input.rh4-hd-search-input,
.rh4-hd-search input.rh4-hd-search-input:focus,
.rh4-hd-search input.rh4-hd-search-input:hover {
    flex: 1 !important;
    height: 34px !important;
    min-width: 0 !important;
    width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    color: #fff !important;
    font: inherit !important;
    font-size: 14px !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease 100ms, padding 280ms cubic-bezier(0.16, 1, 0.3, 1);
}
.rh4-hd-search.is-open input.rh4-hd-search-input {
    opacity: 1;
    pointer-events: auto;
    padding: 0 8px !important;
}
.rh4-hd-search-input::placeholder { color: rgba(255, 255, 255, 0.4) !important; }
/* Kill webkit native search adornments */
.rh4-hd-search-input::-webkit-search-decoration,
.rh4-hd-search-input::-webkit-search-cancel-button,
.rh4-hd-search-input::-webkit-search-results-button,
.rh4-hd-search-input::-webkit-search-results-decoration { -webkit-appearance: none; display: none; }

.rh4-hd-search-close {
    width: 0;
    height: 34px;
    margin-right: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    overflow: hidden;
    opacity: 0;
    transition: width 220ms ease, opacity 180ms ease, color 180ms ease, margin-right 220ms ease;
}
.rh4-hd-search-close:hover { color: #fff; }
.rh4-hd-search.is-open.has-query .rh4-hd-search-close {
    width: 28px;
    opacity: 1;
    margin-right: 4px;
}

/* Suggestions popover */
.rh4-hd-search-pop {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    background: rgba(15, 4, 30, 0.98);
    backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 180ms ease, transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 105;
}
.rh4-hd-search.is-open .rh4-hd-search-pop {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.rh4-hd-search-poph {
    display: block;
    padding: 6px 10px 4px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.4);
}
.rh4-hd-search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 10px;
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
    transition: background 150ms ease;
}
.rh4-hd-search-item:hover {
    background: rgba(138, 43, 214, 0.12);
    text-decoration: none;
}
.rh4-hd-search-item span:last-child {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.rh4-hd-search-item strong {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}
.rh4-hd-search-item em {
    font-size: 11px;
    font-style: normal;
    color: rgba(255, 255, 255, 0.5);
}
.rh4-hd-search-ico {
    width: 32px; height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.85);
    border-radius: 8px;
    flex-shrink: 0;
    transition: all 180ms ease;
}
.rh4-hd-search-ico svg { width: 16px; height: 16px; display: block; }
.rh4-hd-search-item:hover .rh4-hd-search-ico {
    background: rgba(138, 43, 214, 0.15);
    border-color: rgba(138, 43, 214, 0.3);
    color: #fff;
}

/* Light mode for search */
html[data-theme="light"] .rh4-hd-search {
    background: rgba(13, 10, 31, 0.04);
    border-color: rgba(13, 10, 31, 0.08);
}
html[data-theme="light"] .rh4-hd-search:hover {
    background: rgba(13, 10, 31, 0.07);
    border-color: rgba(13, 10, 31, 0.18);
}
html[data-theme="light"] .rh4-hd-search.is-open {
    background: #fff;
    border-color: rgba(138, 43, 214, 0.5);
    box-shadow:
        0 0 0 4px rgba(138, 43, 214, 0.1),
        0 8px 24px rgba(13, 10, 31, 0.08);
}
html[data-theme="light"] .rh4-hd-search-trigger { color: rgba(13, 10, 31, 0.65); }
html[data-theme="light"] .rh4-hd-search-trigger:hover { color: #0d0a1f; }
html[data-theme="light"] .rh4-hd-search.is-open .rh4-hd-search-trigger { color: #6a1cb0; }
html[data-theme="light"] .rh4-hd-search input.rh4-hd-search-input,
html[data-theme="light"] .rh4-hd-search input.rh4-hd-search-input:focus,
html[data-theme="light"] .rh4-hd-search input.rh4-hd-search-input:hover {
    color: #0d0a1f !important;
}
html[data-theme="light"] .rh4-hd-search-input::placeholder { color: rgba(13, 10, 31, 0.45) !important; }
html[data-theme="light"] .rh4-hd-search-kbd {
    color: rgba(13, 10, 31, 0.55);
    background: rgba(13, 10, 31, 0.05);
    border-color: rgba(13, 10, 31, 0.08);
}
html[data-theme="light"] .rh4-hd-search-close { color: rgba(13, 10, 31, 0.5); }
html[data-theme="light"] .rh4-hd-search-close:hover { color: #0d0a1f; }
html[data-theme="light"] .rh4-hd-search-pop {
    background: #fff;
    border-color: rgba(13, 10, 31, 0.08);
    box-shadow: 0 24px 60px rgba(13, 10, 31, 0.12);
}
html[data-theme="light"] .rh4-hd-search-poph { color: rgba(13, 10, 31, 0.5); }
html[data-theme="light"] .rh4-hd-search-item { color: #0d0a1f; }
html[data-theme="light"] .rh4-hd-search-item:hover { background: rgba(138, 43, 214, 0.06); }
html[data-theme="light"] .rh4-hd-search-item strong { color: #0d0a1f; }
html[data-theme="light"] .rh4-hd-search-item em { color: rgba(13, 10, 31, 0.55); }
html[data-theme="light"] .rh4-hd-search-ico {
    background: rgba(13, 10, 31, 0.04);
    border-color: rgba(13, 10, 31, 0.08);
    color: rgba(13, 10, 31, 0.7);
}
html[data-theme="light"] .rh4-hd-search-item:hover .rh4-hd-search-ico {
    background: rgba(138, 43, 214, 0.1);
    border-color: rgba(138, 43, 214, 0.25);
    color: #6a1cb0;
}

/* === Item virtual "Perguntar para o Nikko" — destaque roxo brand === */
.rh4-hd-search-item--nikko {
    margin-bottom: 6px;
    border: 1px solid;
    border-radius: 12px;
}
html[data-theme="dark"] .rh4-hd-search-item--nikko {
    background: rgba(184, 85, 255, 0.10);
    border-color: rgba(184, 85, 255, 0.28);
}
html[data-theme="dark"] .rh4-hd-search-item--nikko:hover {
    background: rgba(184, 85, 255, 0.16);
    border-color: rgba(184, 85, 255, 0.44);
}
html[data-theme="light"] .rh4-hd-search-item--nikko {
    background: rgba(106, 26, 176, 0.05);
    border-color: rgba(106, 26, 176, 0.20);
}
html[data-theme="light"] .rh4-hd-search-item--nikko:hover {
    background: rgba(106, 26, 176, 0.10);
    border-color: rgba(106, 26, 176, 0.34);
}
.rh4-hd-search-item--nikko .rh4-hd-search-ico {
    background: rgba(184, 85, 255, 0.18) !important;
    border-color: rgba(184, 85, 255, 0.40) !important;
    color: #b855ff !important;
}
html[data-theme="light"] .rh4-hd-search-item--nikko .rh4-hd-search-ico {
    background: rgba(106, 26, 176, 0.10) !important;
    border-color: rgba(106, 26, 176, 0.28) !important;
    color: #6a1ab0 !important;
}
.rh4-hd-search-item--nikko em {
    font-style: normal !important;
    font-weight: 500 !important;
    opacity: 0.85;
}

/* === Empty state ("Nada encontrado, pressione Enter…") === */
.rh4-hd-search-empty {
    padding: 14px 12px;
    font-size: 12.5px;
    text-align: center;
    border-top: 1px dashed;
    margin-top: 6px;
}
html[data-theme="dark"] .rh4-hd-search-empty {
    color: rgba(255, 255, 255, 0.55);
    border-top-color: rgba(255, 255, 255, 0.08);
}
html[data-theme="light"] .rh4-hd-search-empty {
    color: rgba(13, 10, 31, 0.55);
    border-top-color: rgba(13, 10, 31, 0.08);
}
.rh4-hd-search-empty kbd {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 5px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 11px;
    border: 1px solid;
    margin: 0 2px;
}
html[data-theme="dark"] .rh4-hd-search-empty kbd {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.85);
}
html[data-theme="light"] .rh4-hd-search-empty kbd {
    background: rgba(13, 10, 31, 0.04);
    border-color: rgba(13, 10, 31, 0.14);
    color: rgba(13, 10, 31, 0.75);
}
.rh4-hd-actions .rollin-theme-toggle {
    width: 36px; height: 36px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.rh4-hd-actions .rollin-theme-toggle:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.18);
}
.rh4-hd-login {
    padding: 9px 14px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 180ms ease;
}
.rh4-hd-login:hover { color: #fff; background: rgba(255, 255, 255, 0.05); text-decoration: none; }
.rh4-hd-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    background: linear-gradient(135deg, #8a2bd6 0%, #6a1cb0 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(138, 43, 214, 0.35);
    transition: transform 200ms ease, box-shadow 200ms ease, background 200ms ease;
    outline: none;
    border: none;
}
.rh4-hd-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(138, 43, 214, 0.55);
    color: #fff;
    text-decoration: none;
}
.rh4-hd-cta:focus {
    outline: none;
    box-shadow: 0 6px 20px rgba(138, 43, 214, 0.35);
}
.rh4-hd-cta:focus-visible {
    outline: none;
    box-shadow: 0 6px 20px rgba(138, 43, 214, 0.35), 0 0 0 3px rgba(184, 85, 255, 0.30);
}
.rh4-hd-cta:active {
    transform: translateY(0);
    box-shadow: 0 4px 14px rgba(138, 43, 214, 0.40);
}

/* === Reset agressivo de outline preto em TODOS os elementos clicáveis do header.
   Browser default + Bootstrap default colocam outline: 1px solid #000 ou shadow
   escuro em :focus de buttons/links/inputs. Substituímos por nada (mouse) ou
   focus ring brand sutil (keyboard via :focus-visible). === */
.rh4-hd a,
.rh4-hd button,
.rh4-hd input,
.rh4-hd select,
.rh4-hd .rh4-hd-cta,
.rh4-hd .rh4-hd-login,
.rh4-hd .rh4-hd-search-trigger,
.rh4-hd .rh4-hd-search-close,
.rh4-hd .rh4-hd-search-input,
.rh4-hd .rh4-hd-lang-btn,
.rh4-hd .rh4-hd-profile-btn,
.rh4-hd .rh4-hd-tlink,
.rh4-hd .rh4-hd-status,
.rh4-hd .rh4-hd-cart-mini,
.rh4-hd .rh4-hd-nav-link,
.rh4-hd .rh4-hd-mega-item,
.rh4-hd .rh4-hd-mega-cta,
.rh4-hd .rh4-hd-search-item,
.rh4-hd .rh4-hd-lang-pop a,
.rh4-hd .rh4-hd-profile-pop a,
.rh4-hd .rh4-hd-profile-pop button,
.rollin-theme-toggle {
    outline: none !important;
}
.rh4-hd a:focus,
.rh4-hd button:focus,
.rh4-hd input:focus,
.rh4-hd select:focus,
.rollin-theme-toggle:focus {
    outline: none !important;
    -webkit-tap-highlight-color: transparent;
}
/* Keyboard focus ring acessível — só aparece em navegação por TAB,
   nunca em click de mouse. Cor brand sutil. */
.rh4-hd a:focus-visible,
.rh4-hd button:focus-visible,
.rh4-hd input:focus-visible,
.rh4-hd select:focus-visible,
.rollin-theme-toggle:focus-visible {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(184, 85, 255, 0.35) !important;
    border-radius: 8px;
}

/* ============= LIGHT THEME ============= */
html[data-theme="light"] .rh4-hd {
    background: rgba(255, 255, 255, 0.95);
    border-bottom-color: rgba(13, 10, 31, 0.08);
}
html[data-theme="light"] .rh4-hd.is-scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 8px 32px rgba(13, 10, 31, 0.06);
}
html[data-theme="light"] .rh4-hd-top {
    background: rgba(13, 10, 31, 0.03);
    border-bottom-color: rgba(13, 10, 31, 0.05);
}
html[data-theme="light"] .rh4-hd-top-left,
html[data-theme="light"] .rh4-hd-top-right { color: rgba(13, 10, 31, 0.6); }
html[data-theme="light"] .rh4-hd-trust { color: rgba(13, 10, 31, 0.55); }
html[data-theme="light"] .rh4-hd-sep { color: rgba(13, 10, 31, 0.2); }
html[data-theme="light"] .rh4-hd-tlink { color: rgba(13, 10, 31, 0.65); }
html[data-theme="light"] .rh4-hd-tlink:hover { color: #0d0a1f; }
html[data-theme="light"] .rh4-hd-lang-btn { color: rgba(13, 10, 31, 0.65); }
html[data-theme="light"] .rh4-hd-lang-btn:hover { color: #0d0a1f; background: rgba(13, 10, 31, 0.04); }
html[data-theme="light"] .rh4-hd-lang-pop {
    background: #fff;
    border-color: rgba(13, 10, 31, 0.08);
    box-shadow: 0 12px 40px rgba(13, 10, 31, 0.12);
}
html[data-theme="light"] .rh4-hd-lang-pop a { color: rgba(13, 10, 31, 0.75); }
html[data-theme="light"] .rh4-hd-lang-pop a:hover { background: rgba(13, 10, 31, 0.04); color: #0d0a1f; }
html[data-theme="light"] .rh4-hd-brand-1 { color: #0d0a1f; }
html[data-theme="light"] .rh4-hd-brand-2 { color: rgba(13, 10, 31, 0.5); }
html[data-theme="light"] .rh4-hd-nav-link { color: rgba(13, 10, 31, 0.7); }
html[data-theme="light"] .rh4-hd-nav-link:hover { color: #0d0a1f; background: rgba(13, 10, 31, 0.05); }
html[data-theme="light"] .rh4-hd-mega {
    background: #fff;
    border-color: rgba(13, 10, 31, 0.08);
    box-shadow: 0 24px 60px rgba(13, 10, 31, 0.12);
}
html[data-theme="light"] .rh4-hd-mega-h { color: rgba(13, 10, 31, 0.5); }
html[data-theme="light"] .rh4-hd-mega-item { color: #0d0a1f; }
html[data-theme="light"] .rh4-hd-mega-item:hover { background: rgba(13, 10, 31, 0.04); }
html[data-theme="light"] .rh4-hd-mega-item strong { color: #0d0a1f; }
html[data-theme="light"] .rh4-hd-mega-item em { color: rgba(13, 10, 31, 0.55); }
html[data-theme="light"] .rh4-hd-mega-feature {
    background: linear-gradient(135deg, rgba(138, 43, 214, 0.08) 0%, rgba(138, 43, 214, 0.02) 100%);
    border-color: rgba(138, 43, 214, 0.18);
}
html[data-theme="light"] .rh4-hd-mega-feature strong { color: #0d0a1f; }
html[data-theme="light"] .rh4-hd-mega-feature p { color: rgba(13, 10, 31, 0.6); }
html[data-theme="light"] .rh4-hd-mega-tag {
    background: rgba(138, 43, 214, 0.12);
    color: #6a1cb0;
}
html[data-theme="light"] .rh4-hd-mega-cta { color: #6a1cb0; }
html[data-theme="light"] .rh4-hd-mega-cta:hover { color: #4a0e80; }
html[data-theme="light"] .rh4-hd-mega-ico {
    background: rgba(13, 10, 31, 0.04);
    border-color: rgba(13, 10, 31, 0.08);
    color: rgba(13, 10, 31, 0.7);
}
html[data-theme="light"] .rh4-hd-mega-item:hover .rh4-hd-mega-ico {
    background: rgba(138, 43, 214, 0.1);
    border-color: rgba(138, 43, 214, 0.25);
    color: #6a1cb0;
}
html[data-theme="light"] .rh4-hd-status-dot {
    box-shadow: 0 0 4px rgba(40, 160, 64, 0.4);
}
html[data-theme="light"] .rh4-hd-status { color: rgba(13, 10, 31, 0.65); }
html[data-theme="light"] .rh4-hd-status:hover { color: #0d0a1f; }
html[data-theme="light"] .rh4-hd-search {
    background: rgba(13, 10, 31, 0.04);
    border-color: rgba(13, 10, 31, 0.08);
    color: rgba(13, 10, 31, 0.65);
}
html[data-theme="light"] .rh4-hd-search:hover { color: #0d0a1f; background: rgba(13, 10, 31, 0.07); }
html[data-theme="light"] .rh4-hd-actions .rollin-theme-toggle {
    background: rgba(13, 10, 31, 0.04);
    border-color: rgba(13, 10, 31, 0.08);
}
html[data-theme="light"] .rh4-hd-login { color: #0d0a1f; }
html[data-theme="light"] .rh4-hd-login:hover { background: rgba(13, 10, 31, 0.05); }

/* ============= RESPONSIVE ============= */
@media (max-width: 1180px) {
    .rh4-hd-trust { display: none; }
    /* Mantém ancorado no trigger (left: -16px) — só reduz min-width e
       reorganiza pra 2 colunas pra caber no viewport. */
    .rh4-hd-mega { min-width: min(720px, calc(100vw - 32px)); }
    .rh4-hd-mega-grid { grid-template-columns: repeat(2, 1fr); }
    .rh4-hd-mega-feature { grid-column: span 2; }
}
/* Below 991px we hand off to MobileHeader/Drawer.
   Reforço: alguns descendants (cart-mini, profile-btn) tinham
   position:fixed/absolute que vazava acima do mobile-header sticky.
   Force visibility:hidden + position:absolute em qualquer descendant pra
   matar qualquer renderização residual. */
@media (max-width: 991px) {
    .rh4-hd,
    .rh4-hd * {
        display: none !important;
        visibility: hidden !important;
    }
}

/* =============================================================
   WHMCS-only additions — profile dropdown, nav active state, badges
   ============================================================= */

/* Active nav link */
.rh4-hd-nav-link.is-active {
    color: #fff !important;
    background: rgba(138, 43, 214, 0.18);
    border-radius: 8px;
}
html[data-theme="light"] .rh4-hd-nav-link.is-active {
    color: #4a0e80 !important;
    background: rgba(138, 43, 214, 0.1);
}

/* Nav count badge (unpaid invoices, active tickets) */
.rh4-hd-nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    margin-left: 6px;
    background: #b855ff;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    border-radius: 999px;
    line-height: 1;
}

/* CTA with icon (Loja) */
.rh4-hd-cta i[data-lucide] {
    width: 13px;
    height: 13px;
}

/* === USER PROFILE DROPDOWN === */
.rh4-hd-profile { position: relative; }

.rh4-hd-profile-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 5px 12px 5px 5px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    color: #fff;
    font: inherit;
    cursor: pointer;
    transition: all 200ms ease;
}
.rh4-hd-profile-btn:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(184, 85, 255, 0.5);
}
.rh4-hd-profile.is-open .rh4-hd-profile-btn {
    border-color: rgba(184, 85, 255, 0.6);
    background: rgba(138, 43, 214, 0.12);
}

.rh4-hd-avatar {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8a2bd6, #4a0e80);
    color: #fff !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(138, 43, 214, 0.35);
}
.rh4-hd-avatar--lg { width: 40px; height: 40px; font-size: 16px; }

.rh4-hd-profile-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    gap: 1px;
    text-align: left;
}
.rh4-hd-profile-meta strong {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
}
.rh4-hd-profile-meta em {
    font-style: normal;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.55);
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rh4-hd-profile-chev {
    color: rgba(255, 255, 255, 0.5);
    transition: transform 200ms ease;
    flex-shrink: 0;
}
.rh4-hd-profile.is-open .rh4-hd-profile-chev {
    transform: rotate(180deg);
}

.rh4-hd-profile-pop {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 280px;
    background: rgba(15, 4, 30, 0.98);
    backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 8px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 180ms ease, transform 220ms cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 180ms;
    z-index: 95;
}
.rh4-hd-profile.is-open .rh4-hd-profile-pop {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 180ms ease, transform 220ms cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0s;
}

.rh4-hd-profile-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 10px 12px;
}
.rh4-hd-profile-head div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}
.rh4-hd-profile-head strong {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rh4-hd-profile-head em {
    font-style: normal;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rh4-hd-profile-sep {
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin: 4px 0;
}

.rh4-hd-profile-pop a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 8px;
    transition: background 150ms ease, color 150ms ease;
}
.rh4-hd-profile-pop a:hover {
    background: rgba(138, 43, 214, 0.12);
    color: #fff;
    text-decoration: none;
}
.rh4-hd-profile-pop a i[data-lucide] {
    color: rgba(255, 255, 255, 0.45);
}
.rh4-hd-profile-pop a:hover i[data-lucide] {
    color: #c39bff;
}
.rh4-hd-profile-danger {
    color: #ff8aa0 !important;
}
.rh4-hd-profile-danger:hover {
    background: rgba(255, 92, 124, 0.08) !important;
    color: #ff8aa0 !important;
}
.rh4-hd-profile-danger i[data-lucide] {
    color: #ff8aa0 !important;
}

/* Light mode for profile */
html[data-theme="light"] .rh4-hd-profile-btn {
    background: rgba(13, 10, 31, 0.04);
    border-color: rgba(13, 10, 31, 0.1);
    color: #0d0a1f;
}
html[data-theme="light"] .rh4-hd-profile-btn:hover {
    background: rgba(13, 10, 31, 0.07);
    border-color: rgba(184, 85, 255, 0.4);
}
html[data-theme="light"] .rh4-hd-profile.is-open .rh4-hd-profile-btn {
    background: rgba(138, 43, 214, 0.08);
    border-color: rgba(184, 85, 255, 0.5);
}
html[data-theme="light"] .rh4-hd-profile-meta strong { color: #0d0a1f; }
html[data-theme="light"] .rh4-hd-profile-meta em { color: rgba(13, 10, 31, 0.55); }
html[data-theme="light"] .rh4-hd-profile-chev { color: rgba(13, 10, 31, 0.45); }
html[data-theme="light"] .rh4-hd-profile-pop {
    background: #fff;
    border-color: rgba(13, 10, 31, 0.08);
    box-shadow: 0 24px 60px rgba(13, 10, 31, 0.12);
}
html[data-theme="light"] .rh4-hd-profile-head strong { color: #0d0a1f; }
html[data-theme="light"] .rh4-hd-profile-head em { color: rgba(13, 10, 31, 0.55); }
html[data-theme="light"] .rh4-hd-profile-sep {
    border-top-color: rgba(13, 10, 31, 0.06);
}
html[data-theme="light"] .rh4-hd-profile-pop a {
    color: rgba(13, 10, 31, 0.78);
}
html[data-theme="light"] .rh4-hd-profile-pop a:hover {
    background: rgba(138, 43, 214, 0.06);
    color: #0d0a1f;
}
html[data-theme="light"] .rh4-hd-profile-pop a i[data-lucide] {
    color: rgba(13, 10, 31, 0.45);
}
html[data-theme="light"] .rh4-hd-profile-pop a:hover i[data-lucide] {
    color: #6a1cb0;
}

/* Hide profile meta on smaller screens (logged-in space saver) */
@media (max-width: 1180px) {
    .rh4-hd-profile-meta { display: none; }
    .rh4-hd-profile-btn { padding: 5px; }
}

/* Force header logo size — beat any other img rule from old WHMCS CSS */
.rh4-hd .rh4-hd-brand .rh4-hd-logo {
    height: 34px !important;
    width: auto !important;
    max-width: 160px !important;
    display: block !important;
}
.rh4-hd .rh4-hd-brand .rh4-hd-logo--light { display: none !important; }
html[data-theme="light"] .rh4-hd .rh4-hd-brand .rh4-hd-logo--dark  { display: none !important; }
html[data-theme="light"] .rh4-hd .rh4-hd-brand .rh4-hd-logo--light { display: block !important; }

/* ============================================================
   FORCE identical sizing with index4 — beat WHMCS all.min.css resets
   ============================================================ */
header.rh4-hd,
.rh4-hd {
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 !important;
}
.rh4-hd * { box-sizing: border-box; }

.rh4-hd .rh4-hd-top-inner {
    max-width: 1360px !important;
    margin: 0 auto !important;
    padding: 8px 24px !important;
}
.rh4-hd .rh4-hd-main-inner {
    max-width: 1360px !important;
    margin: 0 auto !important;
    padding: 14px 24px !important;
    gap: 32px !important;
}
.rh4-hd .rh4-hd-brand {
    flex-shrink: 0 !important;
    text-decoration: none !important;
}
.rh4-hd .rh4-hd-nav-link {
    font-size: 14px !important;
    font-weight: 500 !important;
    padding: 9px 14px !important;
}
.rh4-hd .rh4-hd-cta {
    padding: 9px 18px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
}
.rh4-hd .rh4-hd-login {
    padding: 9px 14px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
}

/* Lucide icons inside header — match inline SVG sizing from Astro */
.rh4-hd i[data-lucide] svg,
.rh4-hd i[data-lucide] { vertical-align: middle; }

/* ============================================================
   Beat the 48px svg/img cap from rollin-auth.css :has(.rh-auth-page)
   Force header logo size, but DO NOT force display:block here
   (the theme rules below decide which variant is visible).
   ============================================================ */
body header.rh4-hd .rh4-hd-brand img.rh4-hd-logo,
body:has(.rh-auth-page) header.rh4-hd .rh4-hd-brand img.rh4-hd-logo {
    height: 34px !important;
    max-height: 34px !important;
    max-width: 160px !important;
    width: auto !important;
}
body header.rh4-hd img,
body header.rh4-hd svg,
body:has(.rh-auth-page) header.rh4-hd img,
body:has(.rh-auth-page) header.rh4-hd svg {
    max-width: none !important;
    max-height: none !important;
}

/* Theme-aware logo visibility — must beat the previous display:block rule */
body header.rh4-hd .rh4-hd-brand img.rh4-hd-logo--dark  { display: block !important; }
body header.rh4-hd .rh4-hd-brand img.rh4-hd-logo--light { display: none  !important; }
html[data-theme="light"] body header.rh4-hd .rh4-hd-brand img.rh4-hd-logo--dark  { display: none  !important; }
html[data-theme="light"] body header.rh4-hd .rh4-hd-brand img.rh4-hd-logo--light { display: block !important; }
