:root {
    --bg-color: #ffffff;
    --surface-color: #f8f9fa;
    --primary-color: #8B0000;
    /* Vinho escuro (Dark Red) */
    --secondary-color: #A52A2A;
    /* Marrom/Vinho secundário */
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --spacing-unit: 1rem;
    --header-height: 80px;
    /* Aumentado para caber o logo */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    min-height: 100%;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-family);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}

/* Header */
.main-header {
    background-color: #ffffff;
    /* Fundo branco no header */
    height: var(--header-height);
    display: flex;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    /* Sombra mais sutil */
    position: sticky;
    top: 0;
    z-index: 100;
    flex-shrink: 0;
    border-bottom: 3px solid var(--primary-color);
    /* Detalhe colorido no header */
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    /* Texto na ponta esquerda, Logo na ponta direita */
    align-items: center;
}

.logo-oer {
    height: 50px;
    /* Altura controlada do logo */
    width: auto;
    object-fit: contain;
}

.header-text {
    display: flex;
    flex-direction: column;
}

.main-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.main-header p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Main Content */
/* Main Content */
.viewer-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--spacing-unit);
    justify-content: center;
    width: 100%;
    min-height: calc(100vh - var(--header-height) - 100px);
}

/* PDF Grid - Dois visualizadores lado a lado */
.pdf-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    width: 100%;
    max-width: 1400px;
    height: 85vh;
}

/* PDF Wrapper */
.pdf-wrapper {
    width: 100%;
    height: 100%;
    background-color: #2a2a2a;
    border-radius: 8px;
    overflow: visible;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* Título do PDF */
.pdf-title {
    background-color: var(--primary-color);
    color: #ffffff;
    padding: 0.75rem 1rem;
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    border-radius: 8px 8px 0 0;
}

object,
iframe {
    width: 100%;
    flex: 1;
    border: none;
    display: block;
    border-radius: 0 0 8px 8px;
    /* Mantém bordas inferiores arredondadas */
}

/* Fallback & Mobile Controls */
.pdf-fallback {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.mobile-controls {
    display: none;
    margin-bottom: 2rem;
    text-align: center;
    flex-direction: column;
    align-items: center;
}

.mobile-controls p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.mobile-buttons {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    /* Espaçamento entre botões */
    width: 100%;
    max-width: 400px;
}

/* Buttons */
.btn-download {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background-color: var(--surface-color);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    border: 1px solid var(--primary-color);
    transition: all 0.2s ease;
}

.btn-download:hover {
    background-color: var(--primary-color);
    color: var(--bg-color);
}

.btn-download.primary {
    background-color: var(--primary-color);
    color: var(--bg-color);
    border: none;
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.3);
}

.btn-download.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
    background-color: #FFD700;
    color: var(--primary-color);
}

/* Form Actions Button */
.form-actions {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    width: 100%;
    z-index: 10;
}

.form-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.form-label {
    text-align: left;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.1rem;
    max-width: 300px;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.form-item:hover .form-label {
    color: var(--primary-color);
}

.btn-form {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    color: #ffffff;
    border-radius: 50%;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    border: 2px solid transparent;
}

.btn-form:hover {
    transform: scale(1.15) rotate(5deg);
    background-color: #FFD700;
    color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.6);
    border-color: var(--primary-color);
}

.btn-form i,
.btn-form svg {
    width: 28px;
    height: 28px;
}

.btn-form svg {
    width: 28px;
    height: 28px;
}

/* Floating Feedback Button */
.btn-feedback {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 65px;
    height: 65px;
    background-color: var(--primary-color);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.4);
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 3px solid transparent;
}

.btn-feedback svg {
    width: 32px;
    height: 32px;
}

.btn-feedback:hover {
    transform: scale(1.15);
    background-color: #FFD700;
    color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.6);
    border-color: var(--primary-color);
}

@media (max-width: 768px) {
    .btn-feedback {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 55px;
        height: 55px;
    }
    
    .btn-feedback svg {
        width: 28px;
        height: 28px;
    }
}

/* Footer */
.main-footer {
    text-align: center;
    padding: 1rem;
    background-color: var(--surface-color);
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: auto;
}

/* Responsividade Mobile */
@media (max-width: 768px) {
    .viewer-container {
        height: auto;
        display: flex;
        padding: 2rem 1rem;
    }

    .pdf-grid {
        display: none !important;
        /* Oculta visualizadores em mobile */
    }

    .mobile-controls {
        display: flex !important;
        /* Exibe botões em mobile */
        width: 100%;
    }

    .btn-download.primary {
        padding: 1.2rem 2rem;
        font-size: 1rem;
        width: 100%;
    }

    .form-actions {
        flex-direction: column;
        gap: 1.5rem;
        order: 1;
    }

    .mobile-controls {
        display: flex !important;
        width: 100%;
        order: -1;
    }

    .form-item {
        width: 100%;
        justify-content: center;
    }
}

/* Forçar Layout Mobile (Samsung Browser) */
body.force-mobile .viewer-container {
    height: auto;
    display: flex;
    padding: 2rem 1rem;
}

body.force-mobile .pdf-grid {
    display: none !important;
}

body.force-mobile .mobile-controls {
    display: flex !important;
    width: 100%;
    order: -1;
}

body.force-mobile .btn-download.primary {
    padding: 1.2rem 2rem;
    font-size: 1rem;
    width: 100%;
}

body.force-mobile .form-actions {
    flex-direction: column;
    gap: 1.5rem;
    order: 1;
}

body.force-mobile .form-item {
    width: 100%;
    justify-content: center;
}

/* ============================================
   BADGES DE VERSÃO
   ============================================ */

.version-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    pointer-events: none;
    transform: rotate(25deg);
    transition: transform 0.3s ease;
}

/* Estrela do Badge */
.badge-star {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    clip-path: polygon(50% 0%,
            61% 35%,
            98% 35%,
            68% 57%,
            79% 91%,
            50% 70%,
            21% 91%,
            32% 57%,
            2% 35%,
            39% 35%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    position: relative;
    transition: transform 0.3s ease;
}

.version-badge:hover {
    transform: rotate(20deg) scale(1.05);
}

/* Número da Versão */
.badge-version {
    color: #1a1a1a;
    font-size: 0.8rem;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
    margin-top: 1px;
}

/* Label "NOVO" */
.badge-new-label {
    background: linear-gradient(135deg, #1a1a1a 0%, #333333 100%);
    color: #FFD700;
    font-size: 0.55rem;
    font-weight: bold;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    width: max-content;
    display: block;
    text-align: center;
}

/* Animação de Pulso para Novos */
.version-badge.new .badge-star {
    animation: pulse 2s ease-in-out infinite;
    border: 2px solid #FFD700;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(255, 215, 0, 0.5);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(255, 215, 0, 0.8);
    }
}

/* Responsividade Mobile */
@media (max-width: 768px) {
    .version-badge {
        top: -8px;
        right: -12px;
        transform: rotate(20deg);
    }

    .badge-star {
        width: 65px;
        height: 65px;
    }

    .badge-version {
        font-size: 0.6rem;
    }

    .badge-new-label {
        font-size: 0.55rem;
        padding: 0.15rem 0.4rem;
    }
}

/* Badge em Botões Mobile */
.btn-download {
    position: relative;
    /* Para posicionar badge */
}

