/* ============================================
   PARTE 1 - RESET, BASE, CONTAINER, HEADER, CONTENT, FORMULÁRIO, PRÉVIA
   ============================================ */

/* ===== RESET E BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f0ea !important;
    min-height: 100vh;
    padding: 0 !important;
    color: #4a3728;
}

/* ===== CONTAINER PRINCIPAL ===== */
.container {
    max-width: 1300px;
    margin: 20px auto !important;
    background: #fffcf8;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    overflow: hidden;
    border: 1px solid #f0d5b0;
}

/* ===== HEADER ===== */
.header {
    background: linear-gradient(135deg, #e67e22, #d35400) !important;
    color: white;
    padding: 20px 30px;
    text-align: center;
    border-radius: 15px 15px 0 0 !important;
}

.header h1 {
    font-size: 24px;
    margin-bottom: 5px;
}

.header p {
    opacity: 0.9;
    font-size: 13px;
}

/* ===== CONTEÚDO ===== */
.content {
    padding: 25px 30px;
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

/* ===== COLUNA ESQUERDA (FORMULÁRIO) ===== */
.formulario {
    flex: 1;
    min-width: 380px;
    max-width: 580px;
}

/* ===== COLUNA DIREITA (PRÉVIA + TRILHA) ===== */
.previa {
    flex: 1;
    min-width: 450px;
    background: #fdf8f2 !important;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #f0d5b0 !important;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.previa h3 {
    margin-bottom: 10px;
    color: #e67e22 !important;
    text-align: center;
    font-size: 16px;
}

/* ===== CONTAINER DA PRÉVIA ===== */
.previa-container {
    position: relative;
    width: 100%;
    max-width: 812px;
    margin: 0 auto;
    border: 2px solid #f0d5b0 !important;
    border-radius: 10px;
    overflow: hidden;
    background: #e9ecef;
    flex-shrink: 0;
}

/* ===== ÁREA DA TRILHA NA PRÉVIA ===== */
.previa-trilha {
    background: #fffcf8;
    border-radius: 10px;
    border: 1px solid #f0d5b0;
    padding: 12px 16px;
    margin-top: 0;
    flex-shrink: 0;
}

.previa-trilha .trilha-label {
    font-weight: 600;
    font-size: 13px;
    color: #4a3728;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.previa-trilha .trilha-label i {
    color: #e67e22;
}

/* ===== PLAYER DO YOUTUBE DENTRO DA PRÉVIA ===== */
.previa-trilha .youtube-player {
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    display: none;
    border: 1px solid #e8ddd0;
    margin-top: 8px;
}

.previa-trilha .youtube-player.active {
    display: block;
}

.previa-trilha .youtube-player iframe {
    width: 100%;
    height: 160px;
    border: 0;
    display: block;
}

/* ===== INFO DA MÚSICA NA PRÉVIA ===== */
.previa-trilha .info-musica {
    display: none;
    margin-top: 8px;
}

.previa-trilha .info-musica.active {
    display: block;
}

.previa-trilha .info-musica .box {
    background: #fdf8f2;
    border-radius: 6px;
    padding: 6px 12px;
    border: 1px solid #f0d5b0;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.previa-trilha .info-musica .box .label {
    font-weight: 600;
}

.previa-trilha .info-musica .box .musica-nome {
    color: #e67e22;
    font-weight: 600;
}

.previa-trilha .badge-audio {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    background: #e8f5e9;
    color: #2e7d32;
}

/* ===== SELECT DA TRILHA NA PRÉVIA ===== */
.previa-trilha select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e8ddd0 !important;
    border-radius: 6px;
    font-size: 13px;
    background: #fdfcf9 !important;
    cursor: pointer;
    color: #4a3728;
    font-weight: 500;
}

.previa-trilha select:focus {
    outline: none;
    border-color: #e67e22 !important;
    box-shadow: 0 0 5px rgba(230, 126, 34, 0.3);
}

/* ===== STATUS DA TRILHA NA PRÉVIA ===== */
.previa-trilha .trilha-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    background: #fdf8f2;
    border: 1px solid #f0d5b0;
    border-radius: 6px;
    font-size: 12px;
    color: #4a3728;
    margin-top: 6px;
}

.previa-trilha .trilha-status i {
    color: #e67e22;
    font-size: 14px;
}

.previa-trilha .trilha-status .vazio {
    color: #b0957a;
    font-weight: 400;
}

.previa-trilha .trilha-status .nome-musica {
    font-weight: 600;
}

/* ===== FOTO DO CANDIDATO (PRÉVIA) ===== */
.foto-candidato-previa {
    position: absolute;
    cursor: move;
    width: 137px;
    height: 171px;
    border-radius: 10px;
    overflow: visible;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    border: 2px solid #e67e22 !important;
}

.foto-candidato-previa img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    border-radius: 4px;
}

/* ===== TEXTO SOBREPOSTO NA PRÉVIA ===== */
.previa-textos {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.previa-nome {
    position: absolute;
    left: 19%;
    top: 41%;
    width: 44.723%;
    text-align: center;
    font-family: 'Mazzard H Black', 'Arial Black', sans-serif;
    font-size: clamp(12px, 3vw, 20px);
    color: #31587f;
    text-transform: uppercase;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    letter-spacing: 1px;
    word-wrap: break-word;
}

.previa-numero {
    position: absolute;
    left: 37%;
    top: 45%;
    width: auto;
    text-align: center;
    font-family: 'Bebas Neue', 'Arial Black', sans-serif;
    font-size: clamp(16px, 4vw, 28px);
    font-weight: 900;
    color: #333333;
    text-shadow: none;
    letter-spacing: 2px;
}

/* ===== COORDENADAS INFO ===== */
.coordenadas-info {
    margin-top: 5px;
    padding: 8px 10px;
    background: #fdf8f2 !important;
    border-radius: 6px;
    border: 1px solid #f0d5b0 !important;
    font-size: 11px;
    text-align: center;
    flex-shrink: 0;
}

.coordenadas-info p {
    margin: 2px 0;
}

.coordenadas-info span {
    font-weight: bold;
    color: #e67e22 !important;
}

/* ===== AJUSTE MANUAL DA FOTO ===== */
.previa-ajuste {
    flex-shrink: 0;
    margin-top: 0;
}

.previa-ajuste label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 600;
    color: #4a3728;
    font-size: 13px;
}

.previa-ajuste label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #e67e22;
    flex-shrink: 0;
}

.previa-ajuste .help-text {
    font-size: 11px;
    color: #8a7a6a !important;
    margin-top: 3px;
    padding-left: 28px;
}

/* ===== FORMULÁRIO ===== */
.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #4a3728 !important;
    font-size: 13px;
}

.form-group label .required {
    color: #e74c3c;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="url"],
.form-group input[type="file"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e8ddd0 !important;
    border-radius: 6px;
    font-size: 13px;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: #fdfcf9 !important;
}

.form-group input:focus {
    outline: none;
    border-color: #e67e22 !important;
    box-shadow: 0 0 5px rgba(230, 126, 34, 0.3) !important;
}

.help-text {
    font-size: 11px;
    color: #8a7a6a !important;
    margin-top: 3px;
}

/* ===== GRID 2 COLUNAS ===== */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* ===== PARTIDO ===== */
.partido-container {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.partido-container select {
    flex: 2;
    min-width: 200px;
    padding: 10px 12px;
    border: 1px solid #e8ddd0 !important;
    border-radius: 6px;
    font-size: 13px;
    background: #fdfcf9 !important;
    cursor: pointer;
    font-weight: 500;
    color: #4a3728 !important;
}

.partido-container select:focus {
    outline: none;
    border-color: #e67e22 !important;
    box-shadow: 0 0 5px rgba(230, 126, 34, 0.3);
}

.partido-preview {
    width: 70px;
    height: 70px;
    border: 2px solid #e8ddd0 !important;
    border-radius: 10px;
    background: #fdfcf9 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 8px;
    flex-shrink: 0;
}

.partido-preview:hover {
    border-color: #e67e22 !important;
    transform: scale(1.02);
}

.partido-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.partido-preview span {
    font-size: 10px;
    color: #b0957a !important;
    text-align: center;
}

/* ===== FUNDO DO VÍDEO ===== */
.fundo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.fundo-container select {
    flex: 2;
    min-width: 180px;
    padding: 10px 12px;
    border: 1px solid #e8ddd0;
    border-radius: 6px;
    font-size: 13px;
    background: #fdfcf9;
    cursor: pointer;
    color: #4a3728;
    font-weight: 500;
}

.fundo-container select:focus {
    outline: none;
    border-color: #e67e22;
    box-shadow: 0 0 5px rgba(230, 126, 34, 0.3);
}

.fundo-preview {
    width: 70px;
    height: 52px;
    border: 2px solid #e8ddd0;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: #fdfcf9;
    transition: border-color 0.3s;
}

.fundo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ===== TEXTO ADICIONAL ===== */
.tex-adicional-container input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e8ddd0;
    border-radius: 6px;
    font-size: 13px;
    background: #fdfcf9;
    transition: border-color 0.3s;
}

.tex-adicional-container input:focus {
    outline: none;
    border-color: #e67e22;
    box-shadow: 0 0 5px rgba(230, 126, 34, 0.3);
}

/* ===== SEPARADORES ===== */
.separador-campos {
    border: none;
    border-top: 2px dashed #f0d5b0;
    margin: 16px 0;
}

.titulo-secao {
    font-size: 15px;
    font-weight: 700;
    color: #4a3728;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.titulo-secao i {
    color: #e67e22;
    font-size: 16px;
}

/* ===== SWITCH ===== */
.switch-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.switch-label {
    font-weight: 600;
    color: #4a3728;
    font-size: 13px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #1a73e8;
    transition: 0.4s;
    border-radius: 28px;
}

.slider::before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #ff4a85;
}

input:checked + .slider::before {
    transform: translateX(22px);
}

.switch-text {
    font-size: 13px;
    font-weight: bold;
    transition: color 0.3s;
}

.switch-text.masculino {
    color: #e67e22 !important;
}

.switch-text.feminino {
    color: #e83a1a;
}

/* ===== BOTÕES ===== */
.btn {
    background: linear-gradient(135deg, #e67e22, #d35400) !important;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 6px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(230, 126, 34, 0.4) !important;
}

.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: #8a7a6a !important;
    color: white !important;
    padding: 8px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: #6a5a4a !important;
    transform: scale(1.02);
}

.btn-primary {
    background: linear-gradient(135deg, #e67e22, #d35400) !important;
    color: white !important;
    padding: 8px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-primary:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(230, 126, 34, 0.3) !important;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}
/* ============================================
   PARTE 2 - MODAL, RESIZE HANDLES, AVISO MOBILE, BARRA DE PROGRESSO, RESULTADOS, RESPONSIVIDADE
   ============================================ */

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #fffcf8 !important;
    padding: 20px;
    border-radius: 10px;
    max-width: 600px;
    width: 90%;
    border: 1px solid #f0d5b0 !important;
}

.modal-content h3 {
    color: #4a3728 !important;
    margin-top: 0;
    font-size: 18px;
}

.modal-content p {
    font-size: 13px;
    color: #6a5a4a;
}

/* ===== RESIZE HANDLES ===== */
.resize-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid #e67e22 !important;
    border-radius: 50%;
    z-index: 10;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.foto-candidato-previa:hover .resize-handle {
    background: white;
    border-color: #e67e22 !important;
    box-shadow: 0 1px 5px rgba(0,0,0,0.3);
}

.resize-handle:hover {
    background: #e67e22 !important;
    border-color: #e67e22 !important;
    transform: scale(1.3);
}

.foto-candidato-previa:not(:hover) .resize-handle {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(230, 126, 34, 0.2);
}

.resize-handle.nw { top: -6px; left: -6px; cursor: nw-resize; }
.resize-handle.ne { top: -6px; right: -6px; cursor: ne-resize; }
.resize-handle.sw { bottom: -6px; left: -6px; cursor: sw-resize; }
.resize-handle.se { bottom: -6px; right: -6px; cursor: se-resize; }
.resize-handle.n { top: -6px; left: 50%; transform: translateX(-50%); cursor: n-resize; }
.resize-handle.s { bottom: -6px; left: 50%; transform: translateX(-50%); cursor: s-resize; }
.resize-handle.e { right: -6px; top: 50%; transform: translateY(-50%); cursor: e-resize; }
.resize-handle.w { left: -6px; top: 50%; transform: translateY(-50%); cursor: w-resize; }

.foto-candidato-previa:not(:hover) .resize-handle.n,
.foto-candidato-previa:not(:hover) .resize-handle.s,
.foto-candidato-previa:not(:hover) .resize-handle.e,
.foto-candidato-previa:not(:hover) .resize-handle.w {
    opacity: 0.3;
}

.foto-candidato-previa:hover .resize-handle.n,
.foto-candidato-previa:hover .resize-handle.s,
.foto-candidato-previa:hover .resize-handle.e,
.foto-candidato-previa:hover .resize-handle.w {
    opacity: 1;
}

/* ===== AVISO MOBILE ===== */
.aviso-mobile {
    display: none !important;
    background: #ffc107 !important;
    color: #333;
    padding: 10px;
    text-align: center;
    border-radius: 6px;
    margin-bottom: 14px;
    font-size: 13px;
}

@media (max-width: 768px) {
    .aviso-mobile {
        display: block !important;
    }
}

@media (min-width: 769px) {
    .aviso-mobile {
        display: none !important;
    }
}

/* ===== BARRA DE PROGRESSO ===== */
.progress-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.progress-overlay.active { display: flex; }

.progress-card {
    background: #fffcf8 !important;
    padding: 30px;
    border-radius: 15px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.progress-title {
    text-align: center;
    font-size: 17px;
    font-weight: bold;
    color: #4a3728 !important;
    margin-bottom: 4px;
}

.progress-subtitle {
    text-align: center;
    font-size: 13px;
    color: #8a7a6a !important;
    margin-bottom: 16px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.progress-label {
    font-size: 12px;
    color: #8a7a6a !important;
}

.progress-percentage {
    font-weight: bold;
    color: #e67e22 !important;
    font-size: 16px;
}

.progress-bar-bg {
    width: 100%;
    height: 20px;
    background: #f0ece6 !important;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #e67e22, #f39c12) !important;
    border-radius: 10px;
    transition: width 0.4s ease;
    position: relative;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    margin: 12px 0 8px 0;
    font-size: 10px;
    color: #c4b5a5 !important;
}

.progress-steps span {
    transition: all 0.3s;
    text-align: center;
    flex: 1;
}

.progress-steps span.done {
    color: #2e7d32 !important;
    font-weight: bold;
}

.progress-steps span.active {
    color: #e67e22 !important;
    font-weight: bold;
}

.progress-status {
    text-align: center;
    margin-top: 10px;
    font-size: 13px;
    color: #4a3728 !important;
}

.progress-status .emoji { font-size: 18px; }

/* ===== RESULTADOS ===== */
.resultado {
    margin-top: 20px;
    padding: 16px;
    border-radius: 10px;
    background: #f8f9fa;
    border-left: 4px solid #e67e22;
}

.resultado h3 {
    color: #e67e22;
    margin-bottom: 12px;
    font-size: 15px;
}

.resultado pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 12px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 11px;
    font-family: 'Courier New', monospace;
}

.sucesso {
    background: #d4edda;
    border-left-color: #28a745;
    color: #155724;
}

.erro {
    background: #f8d7da;
    border-left-color: #dc3545;
    color: #721c24;
}

.info {
    background: #e7f3ff;
    border-left-color: #2196f3;
    color: #0c5460;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 1024px) {
    .content {
        flex-direction: column;
        padding: 20px;
    }
    
    .formulario {
        max-width: 100%;
        min-width: auto;
    }
    
    .previa {
        min-width: auto;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
    
    .header h1 {
        font-size: 20px;
    }
    
    .container {
        margin: 10px !important;
        border-radius: 10px;
    }
    
    .previa {
        display: none !important;
    }
    
    .formulario {
        min-width: auto;
        width: 100%;
        max-width: 100%;
    }
}
/* ============================================
   PARTE 3 - TOP BAR, SISTEMA DE ABAS, ABA ATIVA PULSANTE, COLUNA DIREITA
   ============================================ */

/* ===== HEADER DO SITE (TOP BAR) ===== */
.top-bar {
    background: rgba(255, 248, 240, 0.95);
    backdrop-filter: blur(16px);
    padding: 8px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #f0d5b0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 30px rgba(0,0,0,0.04);
    border-radius: 0 0 12px 12px;
    margin-bottom: 0;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-area a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-area img {
    height: 40px;
    width: auto;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.06));
    transition: transform 0.3s ease;
}

.logo-area img:hover {
    transform: scale(1.05) rotate(-2deg);
}

.logo-area h1 {
    font-size: 20px;
    color: #4a3728;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin: 0;
    line-height: 1.2;
    transition: color 0.3s ease;
}

.logo-area a:hover h1 {
    color: #e67e22;
}

.logo-area h1 .destaque {
    color: #e67e22;
    position: relative;
}

.logo-area h1 .destaque::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #e67e22, #f39c12);
    border-radius: 2px;
}

.logo-area .sub {
    font-size: 9px;
    color: #b0957a;
    font-weight: 600;
    display: block;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 1px;
}

.menu {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-wrap: wrap;
}

.menu a {
    text-decoration: none;
    color: #4a3728;
    font-weight: 600;
    font-size: 13px;
    padding: 8px 16px;
    border-radius: 25px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
}

.menu a:not(.btn-sair)::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #e67e22, #f39c12);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.menu a:not(.btn-sair):hover::after {
    width: 40%;
}

.menu a:not(.btn-sair):hover {
    color: #e67e22;
    background: rgba(230, 126, 34, 0.06);
}

.menu a.ativo {
    color: #e67e22;
}

.menu a.ativo::after {
    width: 40%;
}

.menu a i {
    margin-right: 5px;
    font-size: 12px;
}

.menu .btn-sair {
    background: rgba(198, 40, 40, 0.08);
    color: #c62828 !important;
    padding: 8px 16px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 12px;
    transition: all 0.3s ease;
    border: 1px solid rgba(198, 40, 40, 0.15);
}

.menu .btn-sair::after {
    display: none;
}

.menu .btn-sair:hover {
    background: #c62828;
    color: white !important;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 4px 20px rgba(198, 40, 40, 0.25);
}

.menu .btn-sair i {
    margin-right: 5px;
}

/* ===== RESPONSIVIDADE TOP BAR ===== */
@media (max-width: 768px) {
    .top-bar {
        flex-direction: column;
        gap: 10px;
        padding: 10px 16px;
        border-radius: 0 0 8px 8px;
    }
    
    .menu {
        justify-content: center;
        gap: 3px;
    }
    
    .menu a {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .menu .btn-sair {
        padding: 6px 12px;
        font-size: 11px;
    }
    
    .logo-area h1 {
        font-size: 17px;
    }
    
    .logo-area img {
        height: 32px;
    }
    
    .logo-area .sub {
        font-size: 8px;
    }
}

@media (max-width: 480px) {
    .top-bar {
        padding: 8px 12px;
    }
    
    .logo-area h1 {
        font-size: 14px;
    }
    
    .logo-area img {
        height: 28px;
    }
    
    .menu a {
        font-size: 11px;
        padding: 5px 10px;
    }
    
    .menu .btn-sair {
        padding: 5px 10px;
        font-size: 10px;
    }
    
    .menu a i {
        margin-right: 3px;
        font-size: 10px;
    }
}

/* ============================================
   SISTEMA DE ABAS
   ============================================ */

.tabs-container {
    width: 100%;
    margin-bottom: 20px;
}

.tabs-nav {
    display: flex;
    gap: 6px;
    border-bottom: 2px solid #f0d5b0;
    padding-bottom: 0;
    flex-wrap: wrap;
    background: #fdf8f2;
    border-radius: 10px 10px 0 0;
    padding: 8px 8px 0 8px;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    color: #8a7a6a;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.tab-btn i {
    font-size: 16px;
}

.tab-btn:hover {
    color: #4a3728;
    background: rgba(230, 126, 34, 0.06);
}

.tab-btn .badge {
    background: #e67e22;
    color: white;
    font-size: 10px;
    padding: 1px 8px;
    border-radius: 10px;
    font-weight: 700;
}

.tab-btn .badge.required {
    background: #e74c3c;
}

/* ============================================
   ABA ATIVA COM COR DESTACADA E PULSANTE
   ============================================ */

.tab-btn.active {
    color: #ffffff !important;
    background: linear-gradient(135deg, #9b59b6, #8e44ad) !important;
    box-shadow: 0 4px 20px rgba(230, 126, 34, 0.4) !important;
    position: relative;
    transform: scale(1.06);
    animation: pulsar-cor 2s ease-in-out infinite;
    border: 2px solid rgba(255, 255, 255, 0.3);
}
}

.tab-btn.active i {
    color: #ffffff !important;
}

.tab-btn.active .badge {
    background: #ffffff !important;
    color: #e67e22 !important;
}

.tab-btn.active::after {
    display: none;
}

/* ===== ANIMAÇÃO DE PULSAÇÃO NA COR ===== */
@keyframes pulsar-cor {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(230, 126, 34, 0.4);
        background: linear-gradient(135deg, #e67e22, #d35400);
    }
    50% {
        box-shadow: 0 4px 35px rgba(230, 126, 34, 0.7);
        background: linear-gradient(135deg, #f39c12, #e67e22);
    }
}

/* ===== ÍCONE DA ABA ATIVA ===== */
.tab-btn.active i {
    animation: pulsar-icone-cor 2s ease-in-out infinite;
}

@keyframes pulsar-icone-cor {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
    padding-top: 16px;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== CONTADOR DE PASSOS (OCULTO) ===== */
.tab-counter {
    display: none !important;
}

/* ===== BOTÕES DE NAVEGAÇÃO ===== */
.tab-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #f0d5b0;
}

.tab-actions .btn-tab {
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-actions .btn-tab.prev {
    background: #f0ece6;
    color: #4a3728;
}

.tab-actions .btn-tab.prev:hover {
    background: #e8ddd0;
}

.tab-actions .btn-tab.next {
    background: linear-gradient(135deg, #e67e22, #d35400);
    color: white;
    margin-left: auto;
}

.tab-actions .btn-tab.next:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(230, 126, 34, 0.3);
}

.tab-actions .btn-tab.submit {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    margin-left: auto;
}

.tab-actions .btn-tab.submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

/* ===== RESPONSIVIDADE ABAS ===== */
@media (max-width: 768px) {
    .tab-btn {
        font-size: 12px;
        padding: 8px 14px;
    }
    
    .tab-btn i {
        font-size: 14px;
    }
    
    .tab-btn .badge {
        font-size: 9px;
        padding: 1px 6px;
    }
    
    .tab-actions {
        flex-wrap: wrap;
    }
    
    .tab-actions .btn-tab {
        flex: 1;
        justify-content: center;
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .tab-actions .btn-tab.next,
    .tab-actions .btn-tab.submit {
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .tab-btn {
        font-size: 11px;
        padding: 6px 10px;
        gap: 4px;
    }
    
    .tab-btn i {
        font-size: 12px;
    }
    
    .tab-btn .badge {
        font-size: 8px;
        padding: 0 5px;
    }
}

/* ============================================
   PRÉVIA - OCULTA POR PADRÃO
   ============================================ */

.previa {
    display: none !important;
}

.previa.visible {
    display: flex !important;
}

/* ===== MENSAGEM QUANDO PRÉVIA ESTÁ OCULTA ===== */
.previa-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    background: #fdf8f2;
    border-radius: 10px;
    border: 2px dashed #f0d5b0;
    padding: 40px 20px;
    text-align: center;
    color: #b0957a;
}

.previa-placeholder i {
    font-size: 48px;
    color: #f0d5b0;
    margin-bottom: 16px;
}

.previa-placeholder h4 {
    font-size: 18px;
    color: #4a3728;
    margin-bottom: 8px;
}

.previa-placeholder p {
    font-size: 14px;
    max-width: 300px;
}

/* ============================================
   COLUNA DIREITA
   ============================================ */

.coluna-direita {
    flex: 1;
    min-width: 450px;
    background: #fdf8f2 !important;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #f0d5b0 !important;
    display: flex;
    flex-direction: column;
}

/* ===== PAINEL DE INFORMAÇÕES ===== */
.painel-info {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.painel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0d5b0;
    margin-bottom: 16px;
}

.painel-header i {
    font-size: 24px;
    color: #e67e22;
}

.painel-header h3 {
    font-size: 16px;
    color: #4a3728;
    margin: 0;
}

.painel-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.info-item {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    background: #fffcf8;
    border-radius: 6px;
    border: 1px solid #f0ece6;
}

.info-item .label {
    font-weight: 600;
    font-size: 13px;
    color: #4a3728;
    min-width: 80px;
}

.info-item .valor {
    font-size: 13px;
    color: #4a3728;
    font-weight: 500;
}

.painel-ajuda {
    margin-top: 12px;
    padding: 10px 14px;
    background: #f0ece6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #6a5a4a;
}

.painel-ajuda i {
    color: #e67e22;
    font-size: 16px;
}

.fundo-mini-preview {
    width: 100%;
    height: 50px;
    border-radius: 6px;
    border: 2px solid #e8ddd0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #b0957a;
    background: #fdfcf9;
    margin-bottom: 4px;
    overflow: hidden;
}

.fundo-mini-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== RESPONSIVIDADE COLUNA DIREITA ===== */
@media (max-width: 1024px) {
    .coluna-direita {
        min-width: auto;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .coluna-direita {
        display: none !important;
    }
    
    .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .info-item .label {
        min-width: auto;
    }
}

/* ============================================
   PRÉVIA SÓ APARECE NA ABA 3
   ============================================ */

.previa {
    display: none !important;
}

.previa.visible {
    display: flex !important;
}
