/* ===== CORES (mude aqui e muda no site todo) ===== */
:root {
  --fundo: #0b1220;
  --cartao: #0d1626;
  --linha-clara: #0f1a2d;
  --linha-escura: #14223a;
  --azul: #0a84c9;
  --azul-titulo: #0aa0e6;
  --texto: #e8eef7;
  --texto-suave: #8ea0b8;
  --ciano: #22d3ee;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  padding: 3vh 3vw;
  background: var(--fundo);
  color: var(--texto);
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ===== CABEÇALHO ===== */
header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-bottom: 2vh;
  margin-bottom: 3vh;
  border-bottom: 2px solid;
  border-image: linear-gradient(90deg, var(--azul), transparent) 1;   /* linha que some para a direita */
}

h1 {
  margin: 0;
  font-size: clamp(36px, 4vw, 72px);
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1;
  color: var(--azul-titulo);
}


header p {
  margin: 0.8vh 0 0;
  font-size: clamp(11px, 1.05vw, 20px);
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--texto-suave);
}

#hora {
  font-size: clamp(36px, 4vw, 72px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.04em;
  text-align: right;
  font-variant-numeric: tabular-nums;   /* números com a mesma largura: o relógio não "balança" */
}

#data {
  margin-top: 0.6vh;
  font-size: clamp(13px, 1.2vw, 24px);
  color: var(--texto-suave);
  text-align: right;
}

/* ===== TABELA DO PAINEL ===== */
table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;                  /* larguras das colunas ficam travadas */
}

th, td {
  padding: clamp(12px, 2.2vh, 28px) 1.5vw;
  text-align: left;
  overflow-wrap: anywhere;              /* texto muito longo quebra em vez de vazar */
}

th {
  background: var(--azul);
  font-size: clamp(13px, 1.3vw, 26px);
  font-weight: 800;
  letter-spacing: 0.06em;
}

th:first-child { border-top-left-radius: 14px; }
th:last-child  { border-top-right-radius: 14px; }

th:nth-child(1) { width: 13%; }         /* SALA */
th:nth-child(2) { width: 27%; }         /* CURSO / TURMA */
th:nth-child(3) { width: 24%; }         /* DISCIPLINA */
th:nth-child(4) { width: 17%; }         /* PROFESSOR */
th:nth-child(5) { width: 19%; }         /* HORÁRIO */

td {
  font-size: clamp(16px, 1.7vw, 34px);
  line-height: 1.2;
}

tbody tr:nth-child(odd)  { background: var(--linha-clara); }
tbody tr:nth-child(even) { background: var(--linha-escura); }

th:last-child, td:last-child { text-align: right; }
.turma   { font-weight: 800; }
.horario { font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Etiqueta da sala (o JavaScript troca a cor de acordo com a sala) */
.sala {
  display: inline-block;
  padding: 0.5vh 0.9vw;
  border: 1px solid var(--ciano);
  border-radius: 8px;
  background: rgba(34, 211, 238, 0.15);
  color: var(--ciano);
  font-size: 0.9em;
  font-weight: 800;
  white-space: nowrap;                  /* "Lab 02" não quebra em duas linhas */
}

tbody td.aviso {                        /* "Sem aulas hoje" */
  padding: 8vh 0;
  text-align: center;
  font-size: clamp(20px, 2.4vw, 44px);
  color: var(--texto-suave);
}

/* ===== TELA DE UPLOAD (precisa de class="pagina-upload" no <body>) ===== */
.pagina-upload main {
  max-width: 720px;
  margin: 6vh auto 0;
  padding: 32px;
  background: var(--cartao);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.pagina-upload h2 { margin: 0; font-size: 24px; }

input[type="file"] {
  padding: 14px;
  border: 2px dashed #2a4466;
  border-radius: 10px;
  background: var(--linha-clara);
  color: var(--texto);
  font-size: 16px;
}

input[type="file"]::file-selector-button {
  margin-right: 14px;
  padding: 10px 18px;
  border: 0;
  border-radius: 8px;
  background: var(--azul);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

button {
  padding: 16px 24px;
  border: 0;
  border-radius: 10px;
  background: var(--azul);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}

button:hover:not(:disabled) { filter: brightness(1.15); }
button:disabled { opacity: 0.5; cursor: wait; }
button:focus-visible, input:focus-visible { outline: 3px solid #7dd3fc; outline-offset: 2px; }

#resultado { display: none; padding: 16px; border-radius: 10px; font-size: 18px; }
#resultado.ok   { display: block; background: #0f3d2a; border: 1px solid #22c55e; }
#resultado.erro { display: block; background: #451a1a; border: 1px solid #ef4444; }

/*  estilization do botao SENAI  */

.btn-botaoSenai {
  background: transparent;  /* Sem fundo */
  border: none;             /* Sem borda */
  padding: 0;               /* Sem espaçamento interno extra */
  margin: 0;
  font: inherit;            /* Herda as fontes do pai */
  color: inherit;
  cursor: pointer;          /* Transforma o cursor em mãozinha ao passar o mouse */
  outline: none;            /* Remove contorno ao clicar */
  text-align: left;
}

/* Garante que o H1 dentro do botão não ganhe margens estranhas */
.btn-botaoSenai h1 {
  margin: 0;
}

button.btn-botaoSenai {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

[hidden] { display: none !important; }