/*
 * ZEUS Studio — os 18 componentes (Fase 3).
 *
 * Convenção de estado, igual nos 18: foco usa :focus-visible do base.css
 * (nunca reinventado aqui); carregando é `.is-loading`; desabilitado é o
 * atributo nativo `disabled`/`aria-disabled` sempre que o elemento permitir
 * (nunca `pointer-events:none` sozinho, que quebraria o próprio foco);
 * erro é `.is-error`; reduced-motion é resolvido pela regra global de
 * base.css (duração ~0) mais, aqui, um fallback explícito só onde uma
 * animação em loop (pulso, brilho) precisa de um estado final claro em vez
 * de travar a meio ciclo.
 *
 * Nota sobre "foco" em componentes que não recebem foco por natureza
 * (aviso, gráfico, diff): o estado mora no controle interativo que existe
 * dentro deles (botão de fechar, ponto de dado), não no contêiner — forçar
 * :focus num <div> decorativo seria estado que nunca dispara. Registrado
 * aqui, não inventado silenciosamente.
 */

/* ==========================================================================
   1–4 · Botões
   ========================================================================== */
.z-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--z-space-2);
    position: relative;
    overflow: hidden;
    isolation: isolate;
    border: none;
    border-radius: var(--z-radius);
    padding: var(--z-space-3) var(--z-space-5);
    font-family: var(--z-font-sans);
    font-size: var(--z-text-base);
    font-weight: 600;
    cursor: pointer;
    transition: transform var(--z-duration-fast) var(--z-ease-out),
                box-shadow var(--z-duration-base) var(--z-ease-out),
                filter var(--z-duration-base) var(--z-ease-out);
}
.z-btn:active:not(:disabled) {
    transform: translateY(1px);
}
.z-btn:disabled,
.z-btn[aria-disabled="true"] {
    opacity: .5;
    cursor: not-allowed;
    filter: saturate(.6);
}

/* Botão primário — gradiente, glow no hover, brilho varrendo. */
.z-btn--primary {
    background: var(--z-orange-gradient);
    color: var(--z-bg);
}
.z-btn--primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 30%, hsl(0 0% 100% / .35) 45%, transparent 60%);
    transform: translateX(-120%);
    transition: transform var(--z-duration-slow) var(--z-ease-out);
}
.z-btn--primary:hover:not(:disabled) {
    box-shadow: var(--z-orange-glow-strong);
}
.z-btn--primary:hover:not(:disabled)::before {
    transform: translateX(120%);
}

/* Botão secundário — borda acende, fundo preenche de baixo pra cima. */
.z-btn--secondary {
    background: transparent;
    color: var(--z-text);
    border: 1px solid var(--z-border-strong);
}
.z-btn--secondary::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--z-orange-a12);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform var(--z-duration-base) var(--z-ease-out);
}
.z-btn--secondary:hover:not(:disabled) {
    border-color: var(--z-orange);
}
.z-btn--secondary:hover:not(:disabled)::before {
    transform: scaleY(1);
}

/* Botão de perigo — contido, exige segunda confirmação, NUNCA glow. */
.z-btn--danger {
    background: var(--z-danger);
    color: var(--z-bg);
}
.z-btn--danger.is-confirming {
    background: var(--z-bg);
    color: var(--z-danger);
    border: 1px solid var(--z-danger);
}
.z-btn--danger:hover:not(:disabled) {
    filter: brightness(1.08);
    box-shadow: none; /* perigo não seduz — sem glow em nenhum estado */
}

/* Botão de ação do agente — ⚡ pulsa devagar disponível, gira trabalhando. */
.z-btn--agent {
    background: var(--z-orange-gradient);
    color: var(--z-bg);
}
.z-btn--agent .z-btn__icon {
    display: inline-block;
    animation: z-pulse-soft 1.6s ease-in-out infinite;
}
.z-btn--agent.is-working .z-btn__icon {
    animation: z-spin 0.9s linear infinite;
}
.z-btn--agent:disabled .z-btn__icon,
.z-btn--agent[aria-disabled="true"] .z-btn__icon {
    animation: none;
}
@media (prefers-reduced-motion: reduce) {
    .z-btn--agent .z-btn__icon { animation: none; opacity: 1; }
}

/* Trêmulo compartilhado de erro (login e qualquer .z-btn/.z-field). */
.is-error {
    animation: z-shake 320ms ease-in-out;
}
@media (prefers-reduced-motion: reduce) {
    .is-error { animation: none; }
}

/* Spinner de carregando, compartilhado entre botão, campo e interruptor. */
.z-spinner {
    width: 1em;
    height: 1em;
    border-radius: 50%;
    border: 2px solid currentColor;
    border-top-color: transparent;
    opacity: .8;
    animation: z-spin 0.7s linear infinite;
}
.z-btn.is-loading {
    cursor: wait;
    pointer-events: none;
}

/* ==========================================================================
   5 · Campo de texto
   ========================================================================== */
.z-field {
    position: relative;
    display: flex;
    flex-direction: column;
}
.z-field__control {
    background: var(--z-bg-elevated);
    border: 1px solid var(--z-border);
    border-radius: var(--z-radius-sm);
    color: var(--z-text);
    padding: var(--z-space-4) var(--z-space-3) var(--z-space-2);
    font-size: var(--z-text-base);
    transition: border-color var(--z-duration-base) var(--z-ease-out),
                box-shadow var(--z-duration-base) var(--z-ease-out);
}
.z-field__label {
    position: absolute;
    left: var(--z-space-3);
    top: var(--z-space-3);
    color: var(--z-text-secondary);
    font-size: var(--z-text-base);
    pointer-events: none;
    transform-origin: left top;
    transition: transform var(--z-duration-base) var(--z-ease-out),
                color var(--z-duration-base) var(--z-ease-out);
}
.z-field__control:focus,
.z-field__control:not(:placeholder-shown) {
    padding-top: var(--z-space-5);
    padding-bottom: var(--z-space-1);
}
.z-field__control:focus ~ .z-field__label,
.z-field__control:not(:placeholder-shown) ~ .z-field__label {
    transform: translateY(-0.6rem) scale(.75);
}
.z-field__control:focus {
    border-color: var(--z-orange);
    box-shadow: var(--z-orange-glow);
    outline: none;
}
.z-field__control:focus ~ .z-field__label {
    color: var(--z-orange);
}
.z-field__control:disabled {
    background: var(--z-bg-elevated-2);
    color: var(--z-text-secondary);
    cursor: not-allowed;
}
.z-field.is-error .z-field__control {
    border-color: var(--z-danger);
}
.z-field.is-error .z-field__label {
    color: var(--z-danger);
}
.z-field__counter {
    align-self: flex-end;
    font-size: var(--z-text-xs);
    color: var(--z-text-secondary);
    margin-top: var(--z-space-1);
}
.z-field__spinner {
    position: absolute;
    right: var(--z-space-3);
    top: 50%;
    transform: translateY(-50%);
}

/* ==========================================================================
   6 · Card
   ========================================================================== */
.z-card {
    --mx: 50%;
    --my: 50%;
    position: relative;
    background: var(--z-bg-elevated);
    border: 1px solid var(--z-border);
    border-radius: var(--z-radius);
    padding: var(--z-space-5);
    overflow: hidden;
    transition: transform var(--z-duration-base) var(--z-ease-spring),
                box-shadow var(--z-duration-base) var(--z-ease-out);
}
.z-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(220px circle at var(--mx) var(--my), var(--z-orange-a14), transparent 70%);
    opacity: 0;
    transition: opacity var(--z-duration-base) var(--z-ease-out);
    pointer-events: none;
}
.z-card:hover::before,
.z-card:focus-within::before {
    opacity: 1;
}
.z-card:hover,
.z-card:focus-within {
    transform: translateY(-2px);
    box-shadow: var(--z-shadow-md);
}
.z-card--clickable {
    cursor: pointer;
    /* Card clicável é um <button> real (teclado/Enter/Espaço de graça) —
       estas três desfazem o padrão de <button> (inline-block, centrado,
       largura pelo conteúdo) para continuar parecendo o card estático. */
    display: block;
    width: 100%;
    text-align: left;
}
.z-card.is-active {
    border-color: transparent;
    background:
        linear-gradient(var(--z-bg-elevated), var(--z-bg-elevated)) padding-box,
        conic-gradient(from var(--z-spin-angle, 0deg), var(--z-orange), var(--z-orange-dark), var(--z-orange)) border-box;
    border: 2px solid transparent;
    animation: z-card-spin 3s linear infinite;
}
.z-card.is-loading .z-card__body > * {
    visibility: hidden;
}
.z-card.is-disabled {
    opacity: .55;
    pointer-events: none;
}
.z-card.is-error {
    border-left: 4px solid var(--z-danger);
}
@media (prefers-reduced-motion: reduce) {
    .z-card.is-active { animation: none; border-color: var(--z-orange); }
}

/* ==========================================================================
   7 · Item de lista
   ========================================================================== */
.z-list {
    display: flex;
    flex-direction: column;
    list-style: none;
    margin: 0;
    padding: 0;
}
.z-list-item {
    display: flex;
    align-items: center;
    gap: var(--z-space-3);
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    border-left: 3px solid transparent;
    padding: var(--z-space-3) var(--z-space-4);
    color: var(--z-text);
    cursor: pointer;
    transition: background var(--z-duration-fast) var(--z-ease-out);
}
.z-list-item:hover {
    background: var(--z-bg-elevated);
}
.z-list-item.is-selected {
    border-left-color: var(--z-orange);
    background: var(--z-bg-elevated);
}
.z-list-item:disabled {
    color: var(--z-text-secondary);
    cursor: not-allowed;
}
.z-list-item.is-error {
    color: var(--z-danger);
}
.z-list--enter .z-list-item {
    animation: z-list-in var(--z-duration-base) var(--z-ease-out) both;
    animation-delay: calc(var(--i, 0) * var(--z-stagger-step));
}
@media (prefers-reduced-motion: reduce) {
    .z-list--enter .z-list-item { animation: none; }
}

/* ==========================================================================
   8 · Interruptor
   ========================================================================== */
.z-switch {
    display: inline-flex;
    align-items: center;
    gap: var(--z-space-2);
    cursor: pointer;
}
.z-switch__input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}
.z-switch__track {
    position: relative;
    width: 40px;
    height: 22px;
    background: var(--z-border);
    border-radius: var(--z-radius-full);
    transition: background var(--z-duration-base) var(--z-ease-out);
    flex-shrink: 0;
}
.z-switch__thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--z-text);
    transition: transform var(--z-duration-base) var(--z-ease-spring);
}
.z-switch__input:checked ~ .z-switch__track {
    background: var(--z-orange);
}
.z-switch__input:checked ~ .z-switch__track .z-switch__thumb {
    transform: translateX(18px);
}
.z-switch__input:focus-visible ~ .z-switch__track {
    outline: 2px solid var(--z-orange);
    outline-offset: 2px;
}
.z-switch__input:disabled ~ .z-switch__track {
    opacity: .5;
    cursor: not-allowed;
}
.z-switch.is-loading .z-switch__track {
    opacity: .7;
}
.z-switch.is-error .z-switch__track {
    outline: 2px solid var(--z-danger);
}

/* ==========================================================================
   9 · Selo de estado
   ========================================================================== */
.z-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--z-space-2);
    padding: var(--z-space-1) var(--z-space-3);
    border-radius: var(--z-radius-full);
    font-size: var(--z-text-xs);
    font-weight: 600;
}
.z-badge__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}
.z-badge--active {
    background: var(--z-success-bg);
    color: var(--z-success);
}
.z-badge--active .z-badge__dot {
    animation: z-pulse-soft 1.6s ease-in-out infinite;
}
.z-badge--resolved {
    background: var(--z-bg-elevated-2);
    color: var(--z-text-secondary);
}
.z-badge--warning {
    background: var(--z-warning-bg);
    color: var(--z-warning);
}
.z-badge--error {
    background: var(--z-danger-bg);
    color: var(--z-danger);
}
.z-badge.is-loading .z-badge__dot {
    animation: z-spin 0.7s linear infinite;
    border: 2px solid currentColor;
    border-top-color: transparent;
    background: transparent;
}
.z-badge.is-disabled {
    filter: grayscale(1);
    opacity: .6;
}
@media (prefers-reduced-motion: reduce) {
    .z-badge__dot { animation: none; }
}

/* ==========================================================================
   10 · Carregador (esqueleto)
   ========================================================================== */
.z-skeleton {
    position: relative;
    overflow: hidden;
    background: var(--z-bg-elevated-2);
    border-radius: var(--z-radius-sm);
}
.z-skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, transparent 30%, hsl(0 0% 100% / .06) 50%, transparent 70%);
    transform: translateX(-100%);
    animation: z-shimmer 1.4s ease-in-out infinite;
}
.z-skeleton--text { height: .85em; width: 100%; }
.z-skeleton--title { height: 1.4em; width: 60%; }
.z-skeleton--avatar { width: 40px; height: 40px; border-radius: 50%; }
.z-skeleton--block { width: 100%; height: 80px; }
@media (prefers-reduced-motion: reduce) {
    .z-skeleton::after { animation: none; display: none; }
}

/* ==========================================================================
   11 · Número
   ========================================================================== */
.z-number {
    display: inline-flex;
    font-family: var(--z-font-mono);
    font-weight: 700; /* 600 não está vendorizado para JetBrains Mono (só 400/500/700) */
}
.z-number__digit {
    position: relative;
    height: 1.2em;
    width: .62em;
    overflow: hidden;
}
.z-number__strip {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    transition: transform var(--z-duration-slow) var(--z-ease-spring);
}
.z-number__strip span {
    height: 1.2em;
    line-height: 1.2em;
}
.z-number.is-loading { color: var(--z-text-secondary); }
.z-number.is-error { color: var(--z-danger); }

/* ==========================================================================
   12 · Abas
   ========================================================================== */
.z-tabs {
    display: flex;
    gap: var(--z-space-1);
    position: relative;
    border-bottom: 1px solid var(--z-border);
}
.z-tabs__indicator {
    position: absolute;
    bottom: -1px;
    height: 2px;
    background: var(--z-orange);
    left: var(--tab-x, 0px);
    width: var(--tab-w, 0px);
    transition: transform var(--z-duration-base) var(--z-ease-out),
                width var(--z-duration-base) var(--z-ease-out);
}
.z-tab {
    background: transparent;
    border: none;
    color: var(--z-text-secondary);
    padding: var(--z-space-3) var(--z-space-4);
    font-weight: 600;
    cursor: pointer;
}
.z-tab[aria-selected="true"] {
    color: var(--z-text);
}
.z-tab[aria-disabled="true"] {
    opacity: .5;
    cursor: not-allowed;
}
.z-tab.is-error::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-left: var(--z-space-2);
    border-radius: 50%;
    background: var(--z-danger);
}
.z-tabpanel.is-loading { padding: var(--z-space-4) 0; }

/* ==========================================================================
   13 · Painel lateral
   ========================================================================== */
.z-panel__backdrop {
    position: fixed;
    inset: 0;
    background: hsl(0 0% 0% / .5);
    backdrop-filter: blur(8px);
    z-index: var(--z-index-panel);
    opacity: 0;
    transition: opacity var(--z-duration-base) var(--z-ease-out);
}
.z-panel {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: min(420px, 100vw);
    background: var(--z-bg-elevated);
    border-left: 1px solid var(--z-border);
    box-shadow: var(--z-shadow-lg);
    z-index: calc(var(--z-index-panel) + 1);
    transform: translateX(100%);
    transition: transform var(--z-duration-slow) var(--z-ease-spring);
    display: flex;
    flex-direction: column;
}
.z-panel[data-open="true"],
.z-panel-host[data-open="true"] .z-panel {
    transform: translateX(0);
}
.z-panel-host[data-open="true"] .z-panel__backdrop {
    opacity: 1;
}
.z-panel-host:not([data-open="true"]) {
    pointer-events: none;
    visibility: hidden;
}
.z-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--z-space-4) var(--z-space-5);
    border-bottom: 1px solid var(--z-border);
}
.z-panel__body {
    flex: 1;
    overflow-y: auto;
    padding: var(--z-space-5);
}

/* ==========================================================================
   14 · Aviso
   ========================================================================== */
.z-alert {
    display: flex;
    gap: var(--z-space-3);
    align-items: flex-start;
    padding: var(--z-space-4);
    border-radius: var(--z-radius);
    animation: z-alert-in var(--z-duration-base) var(--z-ease-out) both;
    /* entra e PARA — nenhuma animação em loop aqui, de propósito. */
}
.z-alert--warning { background: var(--z-warning-bg); color: var(--z-text); border: 1px solid color-mix(in srgb, var(--z-warning) 35%, transparent); }
.z-alert--warning .z-alert__icon { color: var(--z-warning); }
.z-alert--danger { background: var(--z-danger-bg); border: 1px solid color-mix(in srgb, var(--z-danger) 35%, transparent); }
.z-alert--danger .z-alert__icon { color: var(--z-danger); }
.z-alert--success { background: var(--z-success-bg); border: 1px solid color-mix(in srgb, var(--z-success) 35%, transparent); }
.z-alert--success .z-alert__icon { color: var(--z-success); }
.z-alert--info { background: var(--z-bg-elevated-2); border: 1px solid var(--z-border); }
.z-alert--info .z-alert__icon { color: var(--z-orange); }
.z-alert.is-read { opacity: .6; }
.z-alert__close {
    background: transparent;
    border: none;
    color: inherit;
    opacity: .7;
    cursor: pointer;
    padding: var(--z-space-1);
}
.z-alert__close:hover { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
    .z-alert { animation: none; }
}

/* ==========================================================================
   15 · Gráfico
   ========================================================================== */
.z-chart {
    display: block;
    width: 100%;
}
.z-chart__line {
    fill: none;
    stroke: var(--z-orange);
    stroke-width: 2;
    stroke-dasharray: var(--z-chart-len, 1000);
    stroke-dashoffset: var(--z-chart-len, 1000);
    animation: z-chart-draw var(--z-duration-slow) var(--z-ease-out) forwards;
}
.z-chart__bar {
    fill: var(--z-orange);
    transform-box: fill-box;
    transform-origin: bottom;
    animation: z-chart-grow var(--z-duration-slow) var(--z-ease-spring) both;
}
.z-chart.is-loading .z-chart__series { display: none; }
@media (prefers-reduced-motion: reduce) {
    .z-chart__line, .z-chart__bar { animation: none; stroke-dashoffset: 0; transform: none; }
}

/* ==========================================================================
   16 · Árvore de arquivo
   ========================================================================== */
.z-tree, .z-tree ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.z-tree ul {
    padding-left: var(--z-space-5);
}
.z-tree__toggle {
    display: flex;
    align-items: center;
    gap: var(--z-space-2);
    width: 100%;
    background: transparent;
    border: none;
    color: var(--z-text);
    text-align: left;
    padding: var(--z-space-1) var(--z-space-2);
    border-radius: var(--z-radius-sm);
    cursor: pointer;
}
.z-tree__toggle:hover { background: var(--z-bg-elevated); }
.z-tree__toggle:disabled,
.z-tree__item--locked .z-tree__toggle {
    color: var(--z-text-secondary);
    cursor: not-allowed;
}
.z-tree__caret {
    transition: transform var(--z-duration-fast) var(--z-ease-out);
}
.z-tree__item.is-open > .z-tree__toggle .z-tree__caret {
    transform: rotate(90deg);
}
.z-tree__children {
    display: grid;
    grid-template-rows: 0fr;
    overflow: hidden;
    transition: grid-template-rows var(--z-duration-base) var(--z-ease-spring);
}
.z-tree__children > * { min-height: 0; }
.z-tree__item.is-open > .z-tree__children {
    grid-template-rows: 1fr;
}
.z-tree__label.is-new {
    animation: z-flash-orange 1s ease-out 1;
}
.z-tree__label.is-error { color: var(--z-danger); }

/* Estado por arquivo na "sala de máquinas" (Fase 7) — extensão aditiva,
 * mesmas cores semânticas do resto da biblioteca (nunca uma cor nova). */
.z-tree__status {
    display: inline-flex;
    flex-shrink: 0;
    width: 1em;
    justify-content: center;
}
.z-tree__label.is-done .z-tree__status { color: var(--z-success); }
.z-tree__label.is-building .z-tree__status {
    color: var(--z-orange);
    animation: z-pulse-soft 1.6s ease-in-out infinite;
}
.z-tree__label.is-pending .z-tree__status { color: var(--z-text-secondary); }
@media (prefers-reduced-motion: reduce) {
    .z-tree__label.is-new { animation: none; }
    .z-tree__label.is-building .z-tree__status { animation: none; }
}

/* ==========================================================================
   17 · Diff
   ========================================================================== */
.z-diff {
    font-family: var(--z-font-mono);
    font-size: var(--z-text-sm);
    border-radius: var(--z-radius);
    overflow: hidden;
    border: 1px solid var(--z-border);
}
.z-diff__line {
    display: flex;
    gap: var(--z-space-3);
    padding: var(--z-space-1) var(--z-space-3);
    border-left: 3px solid transparent;
    white-space: pre;
    animation: z-diff-in var(--z-duration-base) var(--z-ease-out) both;
}
.z-diff__line--add {
    background: var(--z-success-bg);
    border-left-color: var(--z-success);
}
.z-diff__line--remove {
    background: var(--z-danger-bg);
    border-left-color: var(--z-danger);
}
.z-diff__line--context {
    color: var(--z-text-secondary);
}
.z-diff__gutter {
    color: var(--z-text-secondary);
    user-select: none;
    width: 2.5em;
    text-align: right;
    flex-shrink: 0;
}
@media (prefers-reduced-motion: reduce) {
    .z-diff__line { animation: none; }
}

/* ==========================================================================
   18 · Ponto do pipeline
   ========================================================================== */
.z-pipeline {
    display: flex;
    align-items: center;
}
.z-pipeline__step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--z-space-2);
    position: relative;
    flex: 1;
    text-align: center;
}
.z-pipeline__dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--z-border);
    border: 2px solid var(--z-border-strong);
    z-index: 1;
}
.z-pipeline__step.is-active .z-pipeline__dot {
    background: var(--z-orange);
    border-color: var(--z-orange);
    animation: z-pulse-soft 1.6s ease-in-out infinite;
}
.z-pipeline__step.is-done .z-pipeline__dot {
    background: var(--z-success);
    border-color: var(--z-success);
    animation: z-flash-orange 500ms ease-out 1;
}
.z-pipeline__step.is-error .z-pipeline__dot {
    background: var(--z-danger);
    border-color: var(--z-danger);
}
.z-pipeline__step.is-skipped {
    opacity: .55;
}
.z-pipeline__step.is-skipped .z-pipeline__dot {
    background: transparent;
}
.z-pipeline__connector {
    position: absolute;
    top: 6px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: var(--z-border);
    z-index: 0;
}
.z-pipeline__connector::after {
    content: '';
    position: absolute;
    inset: 0;
    width: 40%;
    background: var(--z-orange-gradient);
    opacity: 0;
}
.z-pipeline__connector.is-traveling::after {
    opacity: 1;
    animation: z-pipeline-travel var(--z-duration-slow) var(--z-ease-out) 1;
}
.z-pipeline__label { font-size: var(--z-text-xs); color: var(--z-text-secondary); }
.z-pipeline__step.is-skipped .z-pipeline__reason {
    display: block;
    font-size: var(--z-text-xs);
    color: var(--z-text-secondary);
}
@media (prefers-reduced-motion: reduce) {
    .z-pipeline__step.is-active .z-pipeline__dot,
    .z-pipeline__step.is-done .z-pipeline__dot { animation: none; }
    .z-pipeline__connector.is-traveling::after { animation: none; opacity: 0; }
}

/* ==========================================================================
   Keyframes — cada um usado por mais de um componente, de propósito
   (vocabulário compartilhado em vez de reinventado por peça).
   ========================================================================== */
@keyframes z-spin { to { transform: rotate(360deg); } }
@keyframes z-card-spin { to { --z-spin-angle: 360deg; } }
@keyframes z-pulse-soft {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .55; transform: scale(.85); }
}
@keyframes z-shimmer { to { transform: translateX(100%); } }
@keyframes z-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}
@keyframes z-list-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes z-alert-in {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes z-chart-draw { to { stroke-dashoffset: 0; } }
@keyframes z-chart-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes z-flash-orange {
    0% { box-shadow: 0 0 0 0 var(--z-orange-a60); }
    100% { box-shadow: 0 0 0 8px transparent; }
}
@keyframes z-diff-in {
    from { opacity: 0; transform: translateX(-8px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes z-pipeline-travel {
    from { left: 0%; }
    to { left: 60%; }
}
