/* ============================================ */
/* ANIMAÇÃO DA LINHA DE PRODUÇÃO - HERO SECTION */
/* ============================================ */

.production-line-animation {
    width: 100%;
    max-width: 650px;
    background: linear-gradient(180deg, #0A1628 0%, #0D2137 100%);
    border-radius: 16px;
    border: 1px solid rgba(0, 212, 170, 0.3);
    padding: 15px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* Header da Animação */
.pla-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 212, 170, 0.2);
}

.pla-logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pla-logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #001C71 0%, #0A1F8F 60%, #1226AA 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 4px;
}


.pla-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.pla-logo-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: #00D4AA;
}

.pla-logo-subtitle {
    font-size: 0.55rem;
    color: #B0B0B0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pla-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pla-live-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(220, 53, 69, 0.2);
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid #DC3545;
}

.pla-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #DC3545;
    animation: plaLivePulse 1s ease-in-out infinite;
}

@keyframes plaLivePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.pla-live-text {
    color: #DC3545;
    font-size: 0.65rem;
    font-weight: 600;
}

.pla-clock {
    color: #fff;
    font-size: 0.75rem;
    font-family: monospace;
}

/* Dashboard OEE Compacto */
.pla-dashboard {
    background: linear-gradient(180deg, #0a1628, #0d1a30);
    border-radius: 12px;
    border: 1px solid rgba(0, 212, 170, 0.3);
    padding: 12px;
    margin-bottom: 12px;
}

.pla-dashboard-title {
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pla-dashboard-title i {
    color: #00D4AA;
    font-size: 0.65rem;
}

.pla-oee-gauges {
    display: flex;
    justify-content: space-around;
}

.pla-oee-gauge {
    text-align: center;
    flex: 1;
}

.pla-gauge-title {
    color: #00D4AA;
    font-size: 0.6rem;
    font-weight: 600;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.pla-gauge-circle {
    position: relative;
    width: 60px;
    height: 60px;
    margin: 0 auto 6px;
}

.pla-gauge-svg {
    transform: rotate(-90deg);
}

.pla-gauge-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 5;
}

.pla-gauge-progress {
    fill: none;
    stroke-width: 5;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease, stroke 0.5s ease;
}

.pla-gauge-progress.green { stroke: #22C55E; }
.pla-gauge-progress.yellow { stroke: #FFC107; }
.pla-gauge-progress.red { stroke: #DC3545; }

.pla-gauge-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.pla-gauge-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
}

.pla-gauge-label {
    font-size: 0.45rem;
    color: #B0B0B0;
}

.pla-gauge-pieces {
    color: #00D4AA;
    font-size: 0.65rem;
    font-weight: 600;
}

.pla-gauge-pieces-label {
    color: #B0B0B0;
    font-size: 0.45rem;
}

/* Esteira com Processos Separados */
.pla-conveyor {
    background: linear-gradient(180deg, #0a1628, #0d1a30);
    border-radius: 10px;
    border: 1px solid rgba(0, 212, 170, 0.3);
    padding: 10px;
    margin-bottom: 12px;
}

.pla-conveyor-title {
    color: #fff;
    font-size: 0.65rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pla-conveyor-title i {
    color: #00D4AA;
    font-size: 0.6rem;
}

.pla-conveyor-stages {
    display: flex;
    align-items: stretch;
    gap: 0;
}

.pla-conveyor-stage {
    flex: 1;
    position: relative;
}

.pla-stage-header {
    text-align: center;
    margin-bottom: 6px;
}

.pla-stage-name {
    color: #00D4AA;
    font-size: 0.55rem;
    font-weight: 600;
    text-transform: uppercase;
}

.pla-stage-icon {
    font-size: 0.6rem;
    margin-right: 3px;
}

/* Esteira individual */
.pla-stage-belt {
    height: 40px;
    background: linear-gradient(180deg, #1a2a4a 0%, #0d1a30 100%);
    border-radius: 5px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 196, 179, 0.2);
}

.pla-stage-belt::before {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 0;
    right: 0;
    height: 2px;
    background: repeating-linear-gradient(90deg, 
        rgba(0, 196, 179, 0.4) 0px, 
        rgba(0, 196, 179, 0.4) 8px, 
        transparent 8px, 
        transparent 16px);
    animation: plaBeltMove 0.8s linear infinite;
}

@keyframes plaBeltMove {
    0% { transform: translateX(0); }
    100% { transform: translateX(16px); }
}

/* Seta entre estágios */
.pla-stage-arrow {
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 20px;
    height: 20px;
    background: #00D4AA;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #001C71;
    font-size: 0.55rem;
}

.pla-conveyor-stage:last-child .pla-stage-arrow {
    display: none;
}

/* Peças na Esteira */
.pla-fabric-piece {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 16px;
    border-radius: 2px;
    animation: plaPieceMove 4s linear infinite;
}

.pla-fabric-piece::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    border: 1px dashed rgba(255,255,255,0.3);
    border-radius: 1px;
}

.pla-fabric-red { background: linear-gradient(135deg, #e74c3c, #c0392b); }
.pla-fabric-blue { background: linear-gradient(135deg, #3498db, #2980b9); }
.pla-fabric-green { background: linear-gradient(135deg, #2ecc71, #27ae60); }

/* Camisetas */
.pla-tshirt-piece {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 26px;
    animation: plaPieceMove 4s linear infinite;
}

.pla-tshirt-body {
    width: 100%;
    height: 100%;
    position: relative;
}

.pla-tshirt-svg {
    width: 100%;
    height: 100%;
}

.pla-tshirt-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.4rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 2px rgba(0,0,0,0.5);
}

/* Caixas */
.pla-package-piece {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 22px;
    animation: plaPieceMove 4s linear infinite;
}

.pla-package-box {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #8B4513 0%, #654321 100%);
    border-radius: 2px;
    position: relative;
    border: 1px solid #5D3A1A;
    box-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

.pla-package-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 100%;
    background: linear-gradient(180deg, #D4A574, #C4956A);
}

.pla-package-box::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #D4A574, #C4956A);
}

.pla-package-label {
    position: absolute;
    bottom: 1px;
    right: 1px;
    background: #00D4AA;
    color: #001C71;
    font-size: 0.25rem;
    font-weight: 700;
    padding: 1px 2px;
    border-radius: 1px;
    z-index: 2;
}

@keyframes plaPieceMove {
    0% { left: -25px; opacity: 0; }
    5% { opacity: 1; }
    90% { opacity: 1; }
    100% { left: calc(100% + 5px); opacity: 0; }
}

.pla-piece-delay-1 { animation-delay: 0s; }
.pla-piece-delay-2 { animation-delay: 1.3s; }
.pla-piece-delay-3 { animation-delay: 2.6s; }

/* Indicadores OEE nos Estágios */
.pla-stage-oee {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 6px;
    padding: 4px 6px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    border: 1px solid rgba(0, 196, 179, 0.2);
}

.pla-stage-oee-gauge {
    position: relative;
    width: 28px;
    height: 28px;
}

.pla-stage-oee-gauge svg {
    transform: rotate(-90deg);
}

.pla-stage-oee-bg {
    fill: none;
    stroke: #1a2a4a;
    stroke-width: 3;
}

.pla-stage-oee-progress {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease, stroke 0.5s ease;
}

.pla-stage-oee-progress.green { stroke: #28A745; }
.pla-stage-oee-progress.yellow { stroke: #FFC107; }
.pla-stage-oee-progress.red { stroke: #DC3545; }

.pla-stage-oee-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.45rem;
    font-weight: 700;
    color: #fff;
}

.pla-stage-oee-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.pla-stage-oee-label {
    font-size: 0.4rem;
    color: #B0B0B0;
    text-transform: uppercase;
}

.pla-stage-oee-status {
    font-size: 0.45rem;
    font-weight: 600;
    padding: 1px 4px;
    border-radius: 3px;
    margin-top: 1px;
}

.pla-stage-oee-status.optimal {
    background: rgba(40, 167, 69, 0.2);
    color: #28A745;
}

.pla-stage-oee-status.warning {
    background: rgba(255, 193, 7, 0.2);
    color: #FFC107;
}

.pla-stage-oee-status.critical {
    background: rgba(220, 53, 69, 0.2);
    color: #DC3545;
}

/* Equipe de Resposta Compacta */
.pla-team {
    background: linear-gradient(180deg, #0a1628, #0d1a30);
    border-radius: 10px;
    border: 1px solid rgba(0, 212, 170, 0.3);
    padding: 10px;
}

.pla-team-title {
    color: #fff;
    font-size: 0.65rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pla-team-title i {
    color: #00D4AA;
    font-size: 0.6rem;
}

.pla-team-members {
    display: flex;
    justify-content: space-around;
}

.pla-team-member {
    text-align: center;
}

.pla-member-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(180deg, #1a3a5c, #0d2240);
    border: 2px solid rgba(0, 196, 179, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 3px;
    position: relative;
    transition: all 0.3s ease;
}

.pla-member-avatar i {
    font-size: 0.8rem;
    color: #B0B0B0;
}

.pla-member-avatar.notified {
    border-color: #00D4AA;
    box-shadow: 0 0 10px rgba(0, 212, 170, 0.5);
}

.pla-member-avatar.notified i {
    color: #00D4AA;
}

.pla-member-avatar.alert {
    border-color: #DC3545;
    box-shadow: 0 0 10px rgba(220, 53, 69, 0.5);
    animation: plaAvatarPulse 1s ease-in-out infinite;
}

.pla-member-avatar.alert i {
    color: #DC3545;
}

@keyframes plaAvatarPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.pla-notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    background: #DC3545;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.4rem;
    color: #fff;
    font-weight: 700;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
}

.pla-notification-badge.visible {
    opacity: 1;
    transform: scale(1);
}

.pla-member-name {
    color: #B0B0B0;
    font-size: 0.5rem;
}

.pla-member-device {
    font-size: 0.45rem;
    color: #00D4AA;
    opacity: 0;
    transition: all 0.3s ease;
}

.pla-member-device.visible {
    opacity: 1;
}

/* Timer de Resposta */
.pla-response-timer {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 6px;
    padding: 8px;
    margin-top: 8px;
    display: none;
}

.pla-response-timer.visible {
    display: block;
}

.pla-timer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.pla-timer-label {
    color: #DC3545;
    font-size: 0.55rem;
    font-weight: 600;
}

.pla-timer-value {
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    font-family: monospace;
}

.pla-timer-bar {
    height: 3px;
    background: rgba(220, 53, 69, 0.3);
    border-radius: 2px;
    overflow: hidden;
}

.pla-timer-progress {
    height: 100%;
    background: #DC3545;
    width: 100%;
    transition: width 1s linear;
}

/* Responsivo */
@media (max-width: 768px) {
    .production-line-animation {
        max-width: 100%;
        padding: 12px;
    }
    
    .pla-gauge-circle {
        width: 50px;
        height: 50px;
    }
    
    .pla-gauge-value {
        font-size: 0.75rem;
    }
    
    .pla-conveyor-stages {
        flex-direction: column;
        gap: 10px;
    }
    
    .pla-stage-arrow {
        display: none;
    }
    
    .pla-stage-belt {
        height: 35px;
    }
}

@media (max-width: 480px) {
    .pla-oee-gauges {
        flex-wrap: wrap;
    }
    
    .pla-oee-gauge {
        flex: 1 1 33%;
        margin-bottom: 8px;
    }
    
    .pla-team-members {
        flex-wrap: wrap;
        gap: 10px;
    }
}

/* Estados de alerta nos estágios */
.pla-conveyor-stage.pla-stage-warning {
    border: 1px solid #FFC107;
    box-shadow: 0 0 10px rgba(255, 193, 7, 0.3);
}

.pla-conveyor-stage.pla-stage-alert {
    border: 1px solid #DC3545;
    box-shadow: 0 0 15px rgba(220, 53, 69, 0.5);
    animation: plaStageAlertPulse 1s ease-in-out infinite;
}

@keyframes plaStageAlertPulse {
    0%, 100% { box-shadow: 0 0 15px rgba(220, 53, 69, 0.5); }
    50% { box-shadow: 0 0 25px rgba(220, 53, 69, 0.8); }
}

.pla-stage-belt.stopped::before {
    animation-play-state: paused;
}

/* DARK MODE PREMIUM - Cores fixas para a animação */
/* A animação sempre usa o tema escuro independente do tema do site */
.production-line-animation {
    background: linear-gradient(180deg, #0A1628 0%, #0D2137 100%) !important;
    border-color: rgba(0, 212, 170, 0.3) !important;
}

.pla-dashboard,
.pla-conveyor,
.pla-team {
    background: linear-gradient(180deg, #0a1628, #0d1a30) !important;
    border-color: rgba(0, 212, 170, 0.3) !important;
}

.pla-dashboard-title,
.pla-conveyor-title,
.pla-team-title {
    color: #fff !important;
}

.pla-gauge-value,
.pla-stage-oee-value,
.pla-timer-value {
    color: #fff !important;
}

.pla-gauge-bg,
.pla-stage-oee-bg {
    stroke: rgba(255, 255, 255, 0.1) !important;
}

.pla-stage-belt {
    background: linear-gradient(180deg, #1a2a4a 0%, #0d1a30 100%) !important;
}

.pla-member-avatar {
    background: linear-gradient(180deg, #1a3a5c, #0d2240) !important;
}

.pla-member-name {
    color: #B0B0B0 !important;
}

.pla-stage-oee {
    background: rgba(0, 0, 0, 0.3) !important;
}

.pla-clock {
    color: #fff !important;
}

.pla-logo-subtitle,
.pla-gauge-label,
.pla-gauge-pieces-label,
.pla-stage-oee-label {
    color: #B0B0B0 !important;
}
