.brain-status {
    width: fit-content;
    margin: 30px 0 28px;
    padding: 10px 13px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    border: 1px solid var(--mia-pink-100);
    border-radius: 999px;
    color: var(--mia-pink-700);
    background: rgba(255, 255, 255, 0.78);
    font-size: 0.75rem;
    font-weight: 800;
    box-shadow: var(--shadow-soft);
}

.status-light {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--mia-pink-500);
    animation: brainStatus 1.6s ease-in-out infinite;
}

.brain-steps {
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
    list-style: none;
}

.brain-steps li {
    padding: 13px 14px;
    display: grid;
    grid-template-columns: 34px 1fr;
    align-items: center;
    gap: 12px;
    border: 1px solid transparent;
    border-radius: 14px;
    transition: border-color 300ms ease, background 300ms ease, transform 300ms ease;
}

.brain-steps li > span {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    color: var(--mia-pink-700);
    background: var(--mia-pink-50);
    font-size: 0.76rem;
    font-weight: 900;
}

.brain-steps li div {
    display: grid;
}

.brain-steps strong {
    color: var(--ink-900);
    font-size: 0.88rem;
}

.brain-steps small {
    color: var(--ink-500);
    font-size: 0.76rem;
}

.brain-steps li.is-active {
    transform: translateX(4px);
    border-color: var(--mia-pink-100);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow-soft);
}

.brain-steps li.is-active > span {
    color: var(--white);
    background: var(--mia-pink-600);
    box-shadow: 0 8px 18px rgba(224, 0, 104, 0.24);
}

.brain-stage {
    position: relative;
    width: min(100%, 650px);
    aspect-ratio: 1.15;
    margin-inline: auto;
    border: 1px solid rgba(224, 0, 104, 0.12);
    border-radius: 42px;
    background:
        radial-gradient(circle at center, rgba(224, 0, 104, 0.12), transparent 35%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 244, 249, 0.88));
    box-shadow: var(--shadow-card);
    overflow: hidden;
    isolation: isolate;
}

.brain-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0.48;
    background-image:
        linear-gradient(rgba(224, 0, 104, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(224, 0, 104, 0.06) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: radial-gradient(circle, #000 30%, transparent 80%);
}

.brain-orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 1px solid rgba(224, 0, 104, 0.16);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.brain-orbit::before,
.brain-orbit::after {
    content: "";
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--mia-pink-500);
    box-shadow: 0 0 18px var(--mia-pink-400);
}

.brain-orbit-one {
    width: 62%;
    height: 74%;
    animation: orbitSpin 18s linear infinite;
}

.brain-orbit-one::before {
    top: 10%;
    left: 10%;
}

.brain-orbit-one::after {
    right: 6%;
    bottom: 18%;
}

.brain-orbit-two {
    width: 78%;
    height: 54%;
    animation: orbitSpinReverse 22s linear infinite;
}

.brain-orbit-two::before {
    top: 2%;
    right: 20%;
}

.brain-orbit-two::after {
    left: 4%;
    bottom: 23%;
}

.brain-orbit-three {
    width: 88%;
    height: 86%;
    border-style: dashed;
    opacity: 0.7;
    animation: orbitSpin 34s linear infinite;
}

.brain-orbit-three::before {
    top: 50%;
    left: -4px;
}

.brain-orbit-three::after {
    top: 50%;
    right: -4px;
}

.brain-core {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 4;
    width: 46%;
    aspect-ratio: 0.95;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.58);
    border-radius: 34px;
    color: var(--white);
    background:
        radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.19), transparent 24%),
        linear-gradient(145deg, #8c003f 0%, #d60061 48%, #f01978 100%);
    box-shadow: 0 32px 70px rgba(131, 0, 61, 0.34), inset 0 0 40px rgba(255, 255, 255, 0.12);
    transform: translate(-50%, -50%);
}

.core-halo {
    position: absolute;
    inset: -16px;
    z-index: -1;
    border: 1px solid rgba(224, 0, 104, 0.2);
    border-radius: 42px;
    animation: coreHalo 2.4s ease-in-out infinite;
}

.brain-svg {
    position: absolute;
    top: 10%;
    width: 86%;
    height: 62%;
    overflow: visible;
    filter: url(#brain-glow);
}

.brain-outline,
.brain-circuit {
    fill: none;
    stroke: rgba(255, 255, 255, 0.92);
    stroke-width: 2;
}

.brain-outline {
    stroke-width: 3;
    stroke-dasharray: 700;
    stroke-dashoffset: 700;
    animation: drawBrain 4.6s ease-in-out infinite alternate;
}

.brain-circuit {
    stroke: rgba(255, 255, 255, 0.76);
    stroke-dasharray: 7 8;
    animation: circuitFlow 1.4s linear infinite;
}

.brain-points circle {
    fill: var(--white);
    stroke: rgba(255, 255, 255, 0.3);
    stroke-width: 5;
    animation: pointPulse 1.8s ease-in-out infinite;
}

.brain-points circle:nth-child(2n) {
    animation-delay: -0.7s;
}

.core-label {
    position: absolute;
    right: 8%;
    bottom: 9%;
    left: 8%;
    display: grid;
    text-align: center;
}

.core-label small {
    margin-bottom: 3px;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.core-label strong {
    font-size: clamp(0.78rem, 1.5vw, 1.1rem);
    letter-spacing: -0.02em;
}

.core-label span {
    color: rgba(255, 255, 255, 0.7);
    font-size: clamp(0.48rem, 1vw, 0.65rem);
}

.brain-node {
    position: absolute;
    z-index: 6;
    min-width: 98px;
    padding: 10px 11px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(224, 0, 104, 0.16);
    border-radius: 13px;
    color: var(--ink-700);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 12px 28px rgba(87, 0, 40, 0.09);
    font-size: 0.7rem;
    font-weight: 850;
    animation: nodeFloat 5s ease-in-out infinite;
}

.brain-node::after {
    content: "";
    position: absolute;
    z-index: -1;
    width: 52px;
    height: 1px;
    background: linear-gradient(90deg, rgba(224, 0, 104, 0.45), transparent);
    transform-origin: left center;
}

.brain-node svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    fill: none;
    stroke: var(--mia-pink-600);
    stroke-width: 1.8;
}

.node-agenda {
    top: 9%;
    left: 11%;
}

.node-agenda::after {
    right: -46px;
    bottom: -14px;
    transform: rotate(32deg);
}

.node-reminders {
    top: 8%;
    right: 10%;
    animation-delay: -1.5s;
}

.node-reminders::after {
    bottom: -14px;
    left: -42px;
    transform: rotate(148deg);
}

.node-documents {
    top: 44%;
    left: 2%;
    animation-delay: -2.4s;
}

.node-documents::after {
    top: 50%;
    right: -52px;
}

.node-finance {
    top: 44%;
    right: 2%;
    animation-delay: -0.8s;
}

.node-finance::after {
    top: 50%;
    left: -52px;
    transform: rotate(180deg);
}

.node-pix {
    bottom: 8%;
    left: 12%;
    animation-delay: -3.1s;
}

.node-pix::after {
    top: -14px;
    right: -45px;
    transform: rotate(-32deg);
}

.node-reports {
    right: 10%;
    bottom: 8%;
    animation-delay: -1.9s;
}

.node-reports::after {
    top: -14px;
    left: -42px;
    transform: rotate(212deg);
}

.brain-input,
.brain-output {
    position: absolute;
    z-index: 8;
    padding: 9px 12px;
    display: flex;
    align-items: center;
    gap: 7px;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 850;
}

.brain-input {
    top: 50%;
    left: 50%;
    color: var(--white);
    background: var(--success);
    box-shadow: 0 10px 25px rgba(19, 167, 107, 0.22);
    transform: translate(-50%, calc(-50% - 156px));
}

.brain-input svg,
.brain-output svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.brain-output {
    right: 50%;
    bottom: 50%;
    color: var(--mia-pink-700);
    border: 1px solid var(--mia-pink-100);
    background: var(--white);
    box-shadow: var(--shadow-soft);
    transform: translate(50%, calc(50% + 159px));
}

.brain-stage:not([data-running="true"]) *,
.brain-stage:not([data-running="true"]) *::before,
.brain-stage:not([data-running="true"]) *::after {
    animation-play-state: paused !important;
}

@keyframes brainStatus {
    0%, 100% { box-shadow: 0 0 0 0 rgba(224, 0, 104, 0.3); }
    50% { box-shadow: 0 0 0 7px rgba(224, 0, 104, 0); }
}

@keyframes orbitSpin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes orbitSpinReverse {
    to { transform: translate(-50%, -50%) rotate(-360deg); }
}

@keyframes coreHalo {
    0%, 100% { transform: scale(0.98); opacity: 0.45; }
    50% { transform: scale(1.05); opacity: 1; }
}

@keyframes drawBrain {
    0% { stroke-dashoffset: 700; opacity: 0.45; }
    55%, 100% { stroke-dashoffset: 0; opacity: 1; }
}

@keyframes circuitFlow {
    to { stroke-dashoffset: -30; }
}

@keyframes pointPulse {
    0%, 100% { opacity: 0.45; transform: scale(0.8); transform-origin: center; }
    50% { opacity: 1; transform: scale(1.25); transform-origin: center; }
}

@keyframes nodeFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}
