/**
 * juri.css
 * Estilos específicos para o Portal de Avaliação do Júri Técnico.
 * Reaproveita as variáveis globais de style.css.
 */

/* Hero Banner da Avaliação */
.hero-juri {
    background: linear-gradient(rgba(44, 62, 80, 0.85), rgba(0, 0, 0, 0.7)), url('fundo-horizontal.jpg');
    background-size: cover;
    background-position: center;
    color: var(--white);
    padding: 5rem 2rem;
    text-align: center;
    position: relative;
    border-bottom: 8px solid var(--primary-color);
}

.hero-juri-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-juri h1 {
    font-size: 2.8rem;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    font-family: var(--font-heading);
}

.hero-juri p.subtitle-hero {
    font-size: 1.15rem;
    opacity: 0.95;
    margin-top: 0.5rem;
}

/* Painel do Jurado Conectado (Barra de Progresso e Sessão) */
.jurado-panel-section {
    background: var(--white);
    padding: 1.5rem 2rem;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid #eaeaea;
    position: sticky;
    top: 77px; /* Abaixo do cabeçalho */
    z-index: 90;
}

.jurado-panel-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.jurado-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.jurado-avatar {
    width: 48px;
    height: 48px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.3rem;
    box-shadow: var(--shadow-sm);
}

.jurado-meta {
    display: flex;
    flex-direction: column;
}

.jurado-label {
    font-size: 0.8rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.jurado-nome {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--text-dark);
}

/* Progresso Geral */
.progress-panel {
    flex-grow: 1;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.88rem;
    font-weight: bold;
    color: var(--text-dark);
}

.progress-track {
    width: 100%;
    height: 12px;
    background-color: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    width: 0%;
    border-radius: 10px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-sair-jurado {
    background: var(--off-white);
    color: var(--primary-color);
    border: 1px solid var(--primary-light);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.btn-sair-jurado:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* Filtros e Busca */
.category-filters-section {
    padding: 1.5rem 2rem;
    background-color: var(--white);
    border-bottom: 1px solid #eaeaea;
    text-align: center;
}

/* Status Badges no Card da Obra */
.card-status-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 15;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

.card-status-badge.pending {
    background-color: rgba(255, 193, 7, 0.95);
    color: #4f3400;
}

.card-status-badge.saved {
    background-color: rgba(40, 167, 69, 0.95);
    color: var(--white);
}

/* Widgets de Nota no Card */
.evaluation-widget {
    background-color: var(--off-white);
    border-radius: var(--radius);
    padding: 1.2rem;
    margin-top: auto;
    border-top: 1px solid #eaeaea;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.criteria-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.criteria-title {
    font-size: 0.82rem;
    font-weight: bold;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
}

.criteria-title span {
    color: var(--primary-color);
    float: right;
    font-weight: 800;
    font-size: 0.9rem;
}

/* Container de Entrada das Notas */
.grade-input-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 5px;
}

/* Slider Customizado */
.grade-slider {
    flex-grow: 1;
    height: 8px;
    border-radius: 5px;
    background: #e0e0e0;
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: background 0.3s;
}

.grade-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 8px;
    cursor: pointer;
    background: #e0e0e0;
    border-radius: 4px;
}

.grade-slider::-webkit-slider-thumb {
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    -webkit-appearance: none;
    margin-top: -6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    transition: transform 0.1s, background-color 0.2s;
}

.grade-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    background: var(--primary-light);
}

/* Entrada Numérica de Nota */
.grade-number-input {
    width: 70px;
    padding: 6px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-weight: bold;
    font-size: 1.05rem;
    text-align: center;
    font-family: var(--font-body);
    color: var(--text-dark);
    background-color: var(--white);
    transition: border-color 0.2s, box-shadow 0.2s;
    -moz-appearance: textfield;
}

.grade-number-input::-webkit-outer-spin-button,
.grade-number-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.grade-number-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(138, 21, 56, 0.15);
}

/* Área de Texto para Observações */
.grade-obs-textarea {
    width: 100%;
    height: 65px;
    padding: 8px 10px;
    border: 2px solid #ddd;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-family: var(--font-body);
    color: var(--text-dark);
    background-color: var(--white);
    resize: vertical;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.grade-obs-textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(138, 21, 56, 0.15);
}

/* Botão de Gravação de Notas no Card */
.btn-save-evaluation {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0.85rem;
    border-radius: var(--radius);
    font-weight: bold;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-save-evaluation:hover:not(:disabled) {
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-save-evaluation:disabled {
    background-color: #cccccc;
    color: #666666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Indicador de Status Salvo */
.save-status-indicator {
    font-size: 0.8rem;
    color: #28a745;
    text-align: center;
    margin-top: 5px;
    font-weight: bold;
    min-height: 18px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.save-status-indicator.visible {
    opacity: 1;
}

/* Carregamento de Notas local ou spinner */
.card-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.card-loading-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(138, 21, 56, 0.1);
    border-left-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Overlay de Login do Jurado (Design Premium Glassmorphism) */
.jurado-login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    animation: fadeIn 0.4s ease;
}

.jurado-login-content {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    padding: 3rem 2.5rem;
    max-width: 480px;
    width: 100%;
    text-align: center;
    position: relative;
    animation: scaleUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.login-logo {
    width: 80px;
    height: auto;
    margin-bottom: 1.2rem;
}

.jurado-login-content h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
}

.jurado-login-content p {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.form-group-login {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group-login label {
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group-login select, 
.form-group-login input {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 2px solid #ddd;
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: var(--font-body);
    transition: all 0.3s ease;
    background-color: var(--white);
    color: var(--text-dark);
}

.form-group-login select:focus, 
.form-group-login input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(138, 21, 56, 0.15);
}

.login-error {
    color: #dc3545;
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    min-height: 18px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleUp {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Responsividade Mobile */
@media screen and (max-width: 768px) {
    .hero-juri h1 {
        font-size: 2rem;
    }
    
    .jurado-panel-section {
        position: static;
        padding: 1.2rem 1.5rem;
    }
    
    .jurado-panel-container {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .progress-panel {
        max-width: 100%;
    }
    
    .btn-sair-jurado {
        width: 100%;
        text-align: center;
        padding: 0.7rem;
    }
    
    .btn-grade {
        font-size: 0.85rem;
    }
}
