* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }

body { background-color: #f0f2f5; color: #333; display: flex; justify-content: center; align-items: center; min-height: 100vh; padding: 20px; }

/* TELA DE LOGIN */
.container-login { width: 100%; max-width: 400px; background: #fff; border-radius: 10px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); padding: 40px 30px; text-align: center; }
.logo-senai { max-width: 350px; margin-bottom: 20px; }
.login-box h2 { color: #005594; margin-bottom: 20px; }
.titulo-sessao { color: #6c757d; font-size: 14px; margin-bottom: 10px; text-align: left; font-weight: bold; }
.divisor { margin: 25px 0 15px 0; border: 0; border-top: 1px solid #e9ecef; }
#btn-entrar { width: 100%; background-color: #005594; color: white; border: none; padding: 12px; border-radius: 5px; font-size: 16px; font-weight: bold; cursor: pointer; margin-top: 10px; transition: background 0.3s; }
#btn-entrar:hover { background-color: #003d6b; }
.btn-aluno { width: 100%; background-color: #28a745; color: white; border: none; padding: 12px; border-radius: 5px; font-size: 16px; font-weight: bold; cursor: pointer; transition: background 0.3s; }
.btn-aluno:hover { background-color: #218838; }
.erro-escondido { display: none; color: #dc3545 !important; margin-top: 15px; font-weight: bold; font-size: 14px; }

/* SISTEMA DSS - CABEÇALHO */
.container { background: #fff; width: 100%; max-width: 800px; border-radius: 10px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); padding: 30px; }
header { display: flex; flex-direction: column; align-items: center; margin-bottom: 30px; border-bottom: 2px solid #e9ecef; padding-bottom: 15px; position: relative; }
.info-cabecalho { display: flex; gap: 20px; margin-top: 10px; margin-bottom: 10px; color: #495057; font-size: 14px;}
.tema-box { background: #fff3cd; color: #856404; padding: 10px; border-radius: 5px; width: 100%; text-align: center; font-size: 16px; border: 1px solid #ffeeba; margin-bottom: 10px; font-weight: bold;}
.status-global { margin-top: 10px; font-size: 15px; font-weight: bold; }
.status-bloqueado { color: #dc3545; }
.status-liberado { color: #28a745; }
.responsavel-box { background: #e3f2fd; border: 1px solid #b6d4fe; color: #004085; padding: 10px 15px; border-radius: 8px; margin-top: 15px; font-size: 16px; width: 100%; text-align: center; }
.btn-deslogar { position: absolute; right: 0; top: 0; background: transparent; color: #dc3545; border: 1px solid #dc3545; padding: 5px 10px; border-radius: 4px; cursor: pointer; font-size: 12px; }
.btn-deslogar:hover { background: #dc3545; color: white; }

/* PAINEL PROFESSOR */
.controle-professor { background: #f8f9fa; padding: 15px 20px; border-radius: 8px; margin-bottom: 20px; border: 1px solid #dee2e6; display: flex; flex-direction: column; gap: 10px; }
.controle-professor h3 { font-size: 16px; color: #495057; text-align: center; margin-bottom: 5px;}
.config-tema { display: flex; width: 100%; gap: 10px; }
.config-tema input { flex: 1; padding: 8px; border: 1px solid #ced4da; border-radius: 4px; outline: none;}
#btn-salvar-tema { background: #005594; color: white; border: none; padding: 8px 15px; border-radius: 4px; cursor: pointer; font-weight: bold;}
.controle-acoes { display: flex; gap: 10px; justify-content: center; margin-top: 10px;}
#btn-trava { background-color: #28a745; color: white; border: none; padding: 10px 15px; font-weight: bold; border-radius: 5px; cursor: pointer; transition: background 0.2s; }
#btn-trava:hover { background-color: #218838; }
#btn-trava.modo-bloquear { background-color: #dc3545; }
#btn-trava.modo-bloquear:hover { background-color: #c82333; }
#btn-pular { background-color: #ffc107; color: #333; border: none; padding: 10px 15px; font-weight: bold; border-radius: 5px; cursor: pointer; transition: background 0.2s; }
#btn-pular:hover { background-color: #e0a800; }

/* FORMULÁRIO DE ASSINATURA */
.registro-box { display: flex; gap: 15px; align-items: flex-end; background: #f8f9fa; padding: 20px; border-radius: 8px; margin-bottom: 30px; border: 1px solid #e9ecef; flex-wrap: wrap; }
.input-group { display: flex; flex-direction: column; flex: 1; min-width: 150px; text-align: left; }
.input-group label { font-size: 13px; font-weight: 600; color: #495057; margin-bottom: 5px; }
.input-group input { padding: 10px; border: 1px solid #ced4da; border-radius: 5px; font-size: 15px; outline: none; }
.input-group input:disabled, .input-group input[readonly] { background-color: #e9ecef; color: #6c757d; cursor: not-allowed; }
#btn-assinar { background-color: #005594; color: #fff; border: none; padding: 12px 24px; border-radius: 5px; font-weight: bold; cursor: pointer; height: 42px; }
#btn-assinar:disabled { background-color: #6c757d; cursor: not-allowed; opacity: 0.6; }

/* MODAL DE ASSINATURA */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); z-index: 9999; display: flex; align-items: center; justify-content: center; }
.modal-content { background: white; padding: 25px; border-radius: 10px; text-align: center; max-width: 95%; box-shadow: 0 5px 15px rgba(0,0,0,0.3); }
#canvas-assinatura { border: 2px dashed #005594; border-radius: 8px; touch-action: none; background: #f8f9fa; cursor: crosshair; margin-bottom: 15px; }
.modal-botoes { display: flex; justify-content: space-between; gap: 10px; }
.btn-cancelar { padding: 10px 15px; background: #6c757d; color: white; border: none; border-radius: 5px; cursor: pointer; font-weight: bold; }
.btn-limpar { padding: 10px 15px; background: #dc3545; color: white; border: none; border-radius: 5px; cursor: pointer; font-weight: bold; }
.btn-salvar { padding: 10px 15px; background: #28a745; color: white; border: none; border-radius: 5px; cursor: pointer; font-weight: bold; flex: 1; }

/* TABELA DA TELA */
.tabela-container { overflow-x: auto; margin-bottom: 20px; max-height: 400px; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 12px 15px; border-bottom: 1px solid #dee2e6; }
th { background-color: #f8f9fa; }
td img { max-height: 40px; display: block; }
.badge { background: #d4edda; color: #155724; padding: 4px 8px; border-radius: 12px; font-size: 12px; font-weight: bold; display: inline-block; }
.acoes-finais { text-align: right; margin-top: 20px; border-top: 2px solid #e9ecef; padding-top: 15px; }
#btn-finalizar { background-color: #17a2b8; color: #fff; border: none; padding: 12px 24px; border-radius: 5px; font-weight: bold; cursor: pointer; }

/* --- ESTILOS DO TEMPLATE DE PDF (SENAI - 40 LINHAS) --- */
#container-pdf {
    position: absolute; 
    left: -9999px;      
    top: 0;
    width: 210mm;       
    background: white;
    padding: 8mm 10mm; 
    color: black;
    font-family: Arial, sans-serif;
    font-size: 11px; 
}
.tabela-pdf { width: 100%; border-collapse: collapse; margin-bottom: 0; }
.tabela-pdf th, .tabela-pdf td { border: 1px solid black; padding: 3px 5px; text-transform: uppercase; }
.infos-senai { margin-top: -1px; }
.tabela-body { margin-top: -1px; }
.rodape-senai { margin-top: -1px; }
.tabela-body th { background-color: #f2f2f2; font-weight: bold; text-align: center; }
.tabela-body td { height: 18.5px; vertical-align: middle; }
.tabela-body td:nth-child(1) { text-align: center; }
