/* ══════════════════════════════════════════════════════════════════
   Controles Tempo Real (demo) — feedback instantâneo de comando
   (classes com prefixo ctl- ; inofensivas para o dashboard original)
   ══════════════════════════════════════════════════════════════════ */

.ctl-btn {
    transition: transform .08s ease, box-shadow .18s ease, filter .18s ease;
}
.ctl-btn:hover {
    box-shadow: 0 2px 10px rgba(26, 86, 219, 0.28);
    filter: brightness(1.04);
}
.ctl-btn:active {
    transform: scale(0.93);
}

.ctl-status {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    min-width: 150px;
}

/* aplicando… — anel girando */
.ctl-status--busy { color: #D97706; }
.ctl-status--busy::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 7px;
    border: 2px solid #FDE68A;
    border-top-color: #D97706;
    border-radius: 50%;
    animation: ctl-spin 0.55s linear infinite;
}

/* ✓ aplicado — some suavemente */
.ctl-status--ok {
    color: #16A34A;
    animation: ctl-fade 2.4s ease forwards;
}

@keyframes ctl-spin {
    to { transform: rotate(360deg); }
}
@keyframes ctl-fade {
    0%   { opacity: 1; }
    65%  { opacity: 1; }
    100% { opacity: 0.25; }
}

/* valor do setpoint dá um "pulso" quando muda */
.ctl-val {
    transition: color .2s ease;
}

/* campo de setpoint editável — parece display, funciona como input */
.ctl-input {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 800;
    font-size: 20px;
    color: #1E293B;
    width: 92px;
    text-align: center;
    border: 1px solid transparent;
    border-radius: 8px;
    background: #F8FAFC;
    padding: 6px 4px;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.ctl-input:hover {
    border-color: #E2E8F0;
    background: white;
}
.ctl-input:focus {
    border-color: #1A56DB;
    background: white;
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.15);
}
/* esconde as setinhas nativas do type=number (temos os botões − +) */
.ctl-input::-webkit-inner-spin-button,
.ctl-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.ctl-input[type='number'] {
    -moz-appearance: textfield;
    appearance: textfield;
}
.ctl-val--fresh {
    animation: ctl-pop 0.35s ease;
}
/* classe gêmea — alternada a cada clique p/ a animação sempre replay */
.ctl-val--fresh2 {
    animation: ctl-pop2 0.35s ease;
}
@keyframes ctl-pop {
    0%   { transform: scale(1); }
    45%  { transform: scale(1.12); color: #1A56DB; }
    100% { transform: scale(1); }
}
@keyframes ctl-pop2 {
    0%   { transform: scale(1); }
    45%  { transform: scale(1.12); color: #1A56DB; }
    100% { transform: scale(1); }
}
