/* =========================================
   SALA DO COLABORADOR (Cores e Layout)
========================================= */

.brand-area {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
    text-align: center;
}

.brand-area h2 {
    color: #fff;
    margin: 0;
    font-size: 20px;
}

.brand-badge {
    font-size: 11px;
    color: #f59e0b;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
}

.nav-item.logout {
    color: #ef4444;
}

.nav-item.logout:hover {
    background: rgba(239, 68, 68, 0.1);
}

.card-blue {
    border-color: rgba(59, 130, 246, 0.4);
}

.card-blue strong {
    color: #3b82f6;
}

.card-green {
    border-color: rgba(16, 185, 129, 0.4);
}

.card-green strong {
    color: #10b981;
}

.header-blue-tint {
    background: rgba(59, 130, 246, 0.05);
    border-bottom: 1px solid rgba(59, 130, 246, 0.1) !important;
}

/* =========================================
   FICHA TÉCNICA (Modal Integrado)
========================================= */

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    width: 100%;
    max-width: 650px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    position: relative;
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close-btn:hover { color: #ef4444; }

.modal-header-title {
    margin-top: 0;
    color: #fff;
    border-bottom: 1px solid var(--border);
    padding-bottom: 15px;
}

.modal-section-title {
    color: var(--primary);
    margin: 20px 0 10px 0;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
}

.modal-label {
    color: var(--text-muted);
    font-size: 12px;
    display: block;
    margin-bottom: 4px;
}

.modal-value { color: #fff; font-weight: 600; }
.modal-value.large { font-size: 18px; display: block; margin-bottom: 15px; }

.modal-inner-box {
    background: var(--bg-dark);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.modal-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.modal-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 15px; }

.modal-footer-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(245, 158, 11, 0.05);
    border: 1px solid rgba(245, 158, 11, 0.2);
    padding: 15px;
    border-radius: 8px;
}

.modal-footer-box .modal-label { color: #f59e0b; }
.val-prazo { color: #f59e0b; font-size: 18px; font-weight: bold; }
.val-preco { color: #10b981; font-size: 18px; font-weight: bold; }


/* =========================================
   CARTÕES DA FILA DE TRABALHO (Tarefas)
========================================= */
.tarefa-card {
    padding: 25px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    background: transparent;
    transition: background 0.3s ease;
}

.tarefa-card:hover {
    background: rgba(255, 255, 255, 0.02);
}

.tarefa-card:last-child {
    border-bottom: none;
}

.tarefa-ativa { border-left: 4px solid #3b82f6; }
.tarefa-concluida { border-left: 4px solid #10b981; opacity: 0.8; }

.tarefa-titulo {
    margin: 0 0 12px 0;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
}

/* Etiquetas de Informação (Tags) */
.tarefa-detalhes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.tarefa-detalhes span {
    color: var(--text-muted);
    font-size: 12px;
    background: rgba(255, 255, 255, 0.05);
    padding: 5px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.tarefa-detalhes span.prazo {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.2);
}

/* Botões do Colaborador */
.btn-link-ficha {
    background: transparent;
    border: none;
    color: var(--primary);
    font-size: 13px;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.btn-link-ficha:hover { text-decoration: underline; }

.btn-concluir {
    background: #10b981;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s, transform 0.1s;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.2);
}

.btn-concluir:hover {
    background: #059669;
    transform: translateY(-2px);
}

.badge-entregue {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 10px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Modo Telemóvel: Empilha tudo verticalmente */
@media (max-width: 768px) {
    .tarefa-card {
        flex-direction: column;
        align-items: flex-start;
    }
    .tarefa-acao {
        width: 100%;
        margin-top: 5px;
        padding-top: 20px;
        border-top: 1px dashed rgba(255,255,255,0.1);
    }
    .btn-concluir { width: 100%; justify-content: center; }
}


/* =========================================
   BOTÕES DE FICHEIROS E RECURSOS
========================================= */
.box-recurso {
    padding: 15px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.box-aluno { background: rgba(59, 130, 246, 0.05); border: 1px solid rgba(59, 130, 246, 0.2); }
.box-modelo { background: rgba(16, 185, 129, 0.05); border: 1px solid rgba(16, 185, 129, 0.2); }

.btn-file {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-dark);
    color: #fff;
    padding: 12px 15px;
    border-radius: 6px;
    text-decoration: none;
    margin-top: 10px;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
    font-size: 13px;
    font-weight: 500;
}

.btn-file:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.btn-file.disabled {
    opacity: 0.5;
    pointer-events: none;
    border-style: dashed;
}

/* Ocultar input de ficheiro padrão (vamos usar um botão customizado no futuro) */
.input-file-hidden { display: none; }