/* ======================================================================
   --- VENTANAS MODALES, FORMULARIOS Y TABLAS DE EVALUACIÓN ---
   ====================================================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 200;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s, visibility 0.3s;
}

.modal-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.modal-glass-container {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 20px;
    padding: 2.5rem;
    width: 90%;
    max-width: 600px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-glass-container.report-container {
    max-width: 700px;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
}

.close-btn:hover {
    color: var(--accent-yellow);
}

.modal-title {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.employee-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--accent-yellow);
}

.employee-dept {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* --- Panel de Evaluación --- */
.eval-group {
    margin-bottom: 1.8rem;
}

.readonly-group {
    background: rgba(252, 210, 37, 0.05);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid rgba(252, 210, 37, 0.3);
}

.readonly-group label {
    color: var(--accent-yellow);
    font-weight: bold;
}

.eval-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.8rem;
}

.eval-header label {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 500;
}

.small-btn {
    padding: 6px 14px;
    font-size: 0.8rem;
    margin-right: 15px;
}

.eval-val {
    font-weight: bold;
    color: var(--accent-yellow);
    min-width: 50px;
    text-align: right;
    font-size: 1.1rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #333;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent-yellow);
    box-shadow: 0 0 10px var(--accent-yellow-glow);
    transition: width 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Sub-panel de Evaluadores */
.eval-subpanel {
    background: rgba(0, 0, 0, 0.4);
    padding: 1.2rem;
    border-radius: 8px;
    margin-top: 12px;
    border: 1px dashed rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
}

.evaluator-inputs {
    display: flex;
    gap: 8px;
    justify-content: space-between;
}

.evaluator-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 24%;
    gap: 8px;
}

.evaluator-box label {
    font-size: 0.75rem;
    color: #ccc;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    text-align: center;
}

.ev-input {
    width: 100%;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #444;
    background: #111;
    color: #fff;
    text-align: center;
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: border-color 0.3s, opacity 0.3s;
}

.ev-input:focus {
    border-color: var(--accent-yellow);
    outline: none;
}

.ev-input:disabled {
    background-color: #050505;
    color: #555;
    border-color: #222;
    cursor: not-allowed;
}

.ev-input::-webkit-outer-spin-button,
.ev-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.confirm-eval-btn {
    background-color: transparent;
    color: var(--text-muted);
    border: 1px solid var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.7rem;
    padding: 5px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.confirm-eval-btn:hover {
    color: var(--accent-yellow);
    border-color: var(--accent-yellow);
}

.confirm-eval-btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.confirm-eval-btn.confirmed {
    background-color: rgba(57, 255, 20, 0.1);
    color: #39ff14;
    border-color: rgba(57, 255, 20, 0.4);
    opacity: 1; 
}

.divider {
    border: none;
    border-top: 1px solid #444;
    margin-bottom: 2rem;
}

.modal-actions {
    margin-top: 2rem;
}

/* --- Reportes --- */
.chart-wrapper {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 2rem;
}

.feedback-box {
    background: #1a1a1a;
    border-left: 4px solid var(--accent-yellow);
    padding: 1rem;
    border-radius: 4px;
}

.feedback-box h4 {
    margin-bottom: 0.5rem;
    color: var(--accent-yellow);
}

.report-controls-container {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    border-radius: 12px;
}

.toggle-all-btn {
    font-size: 0.85rem;
    padding: 8px 20px;
    border-radius: 20px;
}

.report-emp-toggles {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
}

.emp-toggle-btn {
    padding: 6px 14px;
    border-radius: 20px;
    border: 2px solid;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
    text-decoration: none !important;
    outline: none;
}

.emp-toggle-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.emp-toggle-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #555 !important;
    background-color: transparent !important;
}

/* --- Badges de Estado --- */
.badge-pendiente,
.badge-incompleto,
.badge-auto {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 20px;
    font-size: 0.75rem;
    white-space: nowrap;
}

.badge-pendiente,
.badge-incompleto {
    padding: 4px 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-auto {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    color: #ccc;
    font-weight: normal;
}

.badge-pendiente {
    background: rgba(252, 210, 37, 0.08); 
    color: rgba(252, 210, 37, 0.9);
    border: 1px solid rgba(252, 210, 37, 0.3);
    animation: pulse-badge 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

.badge-incompleto {
    background: rgba(255, 123, 84, 0.08); 
    color: rgba(255, 123, 84, 0.9);
    border: 1px solid rgba(255, 123, 84, 0.3);
}

@keyframes pulse-badge {
    0% { box-shadow: 0 0 0 0 rgba(252, 210, 37, 0.4); }
    50% { box-shadow: 0 0 0 4px rgba(252, 210, 37, 0); opacity: 0.8; }
    100% { box-shadow: 0 0 0 0 rgba(252, 210, 37, 0); }
}

/* --- Vista de Tabla Rápida --- */
.eval-table-wrapper {
    width: 100%;
    overflow-x: auto;
    background: rgba(15, 15, 15, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    margin-top: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.4s ease-in-out;
}

.eval-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 12px;
    color: #fff;
    font-family: var(--font-body);
}

.eval-table th {
    color: var(--accent-yellow);
    font-weight: 800;
    font-family: var(--font-heading);
    padding: 10px 15px;
    font-size: 0.95rem;
    background: transparent;
    border-bottom: 2px solid rgba(252, 210, 37, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.eval-table td {
    padding: 15px;
    text-align: center;
    background: rgba(0, 0, 0, 0.5);
    transition: background 0.3s ease;
}

.eval-table tr:hover td {
    background: rgba(255, 255, 255, 0.05);
}

.eval-table td:first-child { 
    border-top-left-radius: 10px; 
    border-bottom-left-radius: 10px; 
}
.eval-table td:last-child { 
    border-top-right-radius: 10px; 
    border-bottom-right-radius: 10px; 
}

.eval-table td.emp-name-cell {
    text-align: left;
    font-size: 1.05rem;
    font-weight: 700;
    border-left: 4px solid var(--accent-yellow);
}

.quick-input {
    width: 80px;
    padding: 12px;
    font-size: 1.1rem;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    border-radius: 8px;
    text-align: center;
    font-family: var(--font-body);
    font-weight: bold;
    transition: all 0.3s ease;
}

.quick-input:focus {
    outline: none;
    border-color: var(--accent-yellow);
    box-shadow: 0 0 15px rgba(252, 210, 37, 0.3);
    background: #000;
    transform: scale(1.05);
}

.quick-input.saved-flash {
    background: rgba(57, 255, 20, 0.15) !important;
    border-color: #39ff14 !important;
    color: #39ff14;
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.4);
}

.quick-input::-webkit-outer-spin-button,
.quick-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}