/* ============================================================
   SkillUp – Estilos Globais
   assets/css/skillup.css
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&family=Poppins:wght@400;500;600;700&display=swap');

:root {
  --cor-principal:  #00B4D8;   /* ciano SkillUp */
  --cor-secundaria: #8BC34A;   /* verde-lima SkillUp */
  --cor-roxo:       #6A3DB8;   /* roxo SkillUp */
  --cor-amarelo:    #FFC107;   /* amarelo SkillUp */
  --cor-escuro:     #1A2B3C;   /* azul escuro SkillUp */
  --cor-sucesso:    #8BC34A;
  --cor-erro:       #E74C3C;
  --cor-aviso:      #FFC107;
  --cor-fundo:      #F0F9FC;
  --cor-cartao:     #FFFFFF;
  --cor-texto:      #1A2B3C;
  --cor-texto-leve: #6B8A9A;
  --cor-borda:      #D0EAF2;
  --sombra-suave:   0 2px 12px rgba(0,180,216,0.10);
  --sombra-media:   0 4px 24px rgba(0,180,216,0.18);
  --raio:           14px;
  --raio-pequeno:   8px;
  --fonte-titulo:   'Nunito', sans-serif;
  --fonte-corpo:    'Poppins', sans-serif;
  --transi:         0.22s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--fonte-corpo);
  background: var(--cor-fundo);
  color: var(--cor-texto);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.6;
}

h1, h2, h3, h4 { font-family: var(--fonte-titulo); font-weight: 800; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }

/* ── Auth ───────────────────────────────────────────────── */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--cor-escuro) 0%, #0d1f2d 100%);
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

/* pontos decorativos de fundo inspirados no logo */
.auth-wrap::before {
  content: '';
  position: absolute;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,180,216,0.12) 0%, transparent 70%);
  top: -80px; right: -80px;
}
.auth-wrap::after {
  content: '';
  position: absolute;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139,195,74,0.10) 0%, transparent 70%);
  bottom: -60px; left: -60px;
}

.auth-card {
  background: var(--cor-cartao);
  border-radius: var(--raio);
  box-shadow: var(--sombra-media);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 420px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.auth-logo {
  margin-bottom: 0.3rem;
}

.auth-logo img {
  max-height: 70px;
  width: auto;
}

.auth-logo-texto {
  font-family: var(--fonte-titulo);
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1;
}

.auth-logo-texto .skill { color: var(--cor-escuro); }
.auth-logo-texto .up    { color: var(--cor-secundaria); }

.auth-subtitulo {
  font-size: 0.82rem;
  color: var(--cor-texto-leve);
  margin-bottom: 0.8rem;
}

.auth-subtitulo span { color: var(--cor-principal); font-weight: 600; }

.zona-badge {
  display: inline-block;
  border-radius: 99px;
  padding: 0.25rem 1rem;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 1.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.zona-badge-admin    { background:#e8f7fb; color: var(--cor-principal); }
.zona-badge-professor{ background:#f4faed; color: #5a8a1a; }
.zona-badge-aluno    { background:#edf6ff; color: var(--cor-roxo); }

/* ── Formulários ────────────────────────────────────────── */
.campo { margin-bottom: 1rem; text-align: left; }

.campo label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--cor-texto-leve);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.campo input,
.campo select,
.campo textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--cor-borda);
  border-radius: var(--raio-pequeno);
  font-family: var(--fonte-corpo);
  font-size: 0.95rem;
  color: var(--cor-texto);
  background: #fff;
  transition: border-color var(--transi), box-shadow var(--transi);
  outline: none;
}

.campo input:focus,
.campo select:focus,
.campo textarea:focus {
  border-color: var(--cor-principal);
  box-shadow: 0 0 0 3px rgba(0,180,216,0.15);
}

/* ── Botões ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--raio-pequeno);
  font-family: var(--fonte-corpo);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transi);
  text-decoration: none;
}

.btn-principal {
  background: var(--cor-principal);
  color: #fff;
  width: 100%;
  justify-content: center;
  font-size: 1rem;
  padding: 0.85rem;
}
.btn-principal:hover { background: #0096b7; transform: translateY(-1px); box-shadow: var(--sombra-suave); }

.btn-verde {
  background: var(--cor-secundaria);
  color: #fff;
  width: 100%;
  justify-content: center;
  font-size: 1rem;
  padding: 0.85rem;
}
.btn-verde:hover { background: #6ea832; transform: translateY(-1px); }

.btn-roxo {
  background: var(--cor-roxo);
  color: #fff;
  width: 100%;
  justify-content: center;
  font-size: 1rem;
  padding: 0.85rem;
}
.btn-roxo:hover { background: #532fa0; transform: translateY(-1px); }

.btn-secundario {
  background: var(--cor-fundo);
  color: var(--cor-principal);
  border: 2px solid var(--cor-principal);
}
.btn-secundario:hover { background: var(--cor-principal); color: #fff; }

.btn-perigo  { background: var(--cor-erro);    color: #fff; }
.btn-perigo:hover  { background: #c0392b; }
.btn-sucesso { background: var(--cor-sucesso);  color: #fff; }
.btn-sucesso:hover { background: #6ea832; }

.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.82rem; width: auto !important; }
.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; }

/* ── Alertas ────────────────────────────────────────────── */
.alerta {
  border-radius: var(--raio-pequeno);
  padding: 0.85rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.alerta-erro    { background: #fdecea; color: var(--cor-erro);    border-left: 4px solid var(--cor-erro); }
.alerta-sucesso { background: #f2faeb; color: #4a7c1f;            border-left: 4px solid var(--cor-secundaria); }
.alerta-aviso   { background: #fff8e1; color: #8a6000;            border-left: 4px solid var(--cor-amarelo); }

/* ── Sidebar ────────────────────────────────────────────── */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 240px;
  background: linear-gradient(180deg, var(--cor-escuro) 0%, #0d1f2d 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
}

.sidebar-logo {
  padding: 1.5rem 1.5rem 1.2rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-logo img { max-height: 48px; width: auto; }

.sidebar-logo-texto {
  font-family: var(--fonte-titulo);
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  line-height: 1;
}
.sidebar-logo-texto .skill { color: #fff; }
.sidebar-logo-texto .up    { color: var(--cor-secundaria); }

.sidebar-logo .sub {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.45);
  margin-top: 0.2rem;
}

.sidebar-zona {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  padding: 1.2rem 1.5rem 0.5rem;
}

.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1.5rem;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: all var(--transi);
}

.sidebar nav a:hover,
.sidebar nav a.ativo {
  color: #fff;
  background: rgba(255,255,255,0.07);
  border-left-color: var(--cor-secundaria);
}

.sidebar nav a .icone { font-size: 1.1rem; width: 20px; text-align: center; }

.sidebar-rodape {
  margin-top: auto;
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.sidebar-rodape .utilizador { font-size: 0.8rem; color: rgba(255,255,255,0.5); margin-bottom: 0.5rem; }
.sidebar-rodape .utilizador strong { display: block; color: #fff; font-size: 0.88rem; }

/* ── Conteúdo ───────────────────────────────────────────── */
.conteudo { margin-left: 240px; flex: 1; padding: 2rem; }

.conteudo-topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}
.conteudo-topo h1 { font-size: 1.6rem; }

/* ── Stats ──────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1.2rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--cor-cartao);
  border-radius: var(--raio);
  padding: 1.4rem;
  box-shadow: var(--sombra-suave);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  border-top: 3px solid var(--cor-principal);
}

.stat-card:nth-child(2) { border-top-color: var(--cor-secundaria); }
.stat-card:nth-child(3) { border-top-color: var(--cor-roxo); }
.stat-card:nth-child(4) { border-top-color: var(--cor-amarelo); }
.stat-card:nth-child(5) { border-top-color: var(--cor-principal); }

.stat-card .stat-icone  { font-size: 1.8rem; margin-bottom: 0.2rem; }
.stat-card .stat-valor  { font-family: var(--fonte-titulo); font-size: 2rem; font-weight: 900; color: var(--cor-escuro); line-height: 1; }
.stat-card .stat-label  { font-size: 0.78rem; color: var(--cor-texto-leve); font-weight: 600; }

/* ── Tabelas ────────────────────────────────────────────── */
.tabela-card {
  background: var(--cor-cartao);
  border-radius: var(--raio);
  box-shadow: var(--sombra-suave);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.tabela-header {
  padding: 1.2rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--cor-borda);
}
.tabela-header h2 { font-size: 1.05rem; }

table { width: 100%; border-collapse: collapse; }

table th {
  background: var(--cor-fundo);
  padding: 0.75rem 1.2rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--cor-texto-leve);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

table td {
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid var(--cor-borda);
  font-size: 0.88rem;
}

table tr:last-child td { border-bottom: none; }
table tr:hover td { background: #f5fbfd; }

/* ── Badges ─────────────────────────────────────────────── */
.badge { display: inline-block; padding: 0.25rem 0.7rem; border-radius: 99px; font-size: 0.73rem; font-weight: 700; }
.badge-ativo   { background: #f2faeb; color: #4a7c1f; }
.badge-inativo { background: #fdecea; color: var(--cor-erro); }
.badge-aviso   { background: #fff8e1; color: #8a6000; }

/* ── Modal ──────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(26,43,60,0.6);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 1rem;
  opacity: 0; pointer-events: none;
  transition: opacity var(--transi);
}
.modal-overlay.aberto { opacity: 1; pointer-events: all; }

.modal {
  background: var(--cor-cartao);
  border-radius: var(--raio);
  padding: 2rem;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.25);
  transform: translateY(20px);
  transition: transform var(--transi);
}
.modal-overlay.aberto .modal { transform: translateY(0); }

.modal h3 {
  font-size: 1.15rem;
  margin-bottom: 1.2rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--cor-borda);
}

.modal-acoes {
  display: flex; gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

/* ── Responsivo ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar { width: 100%; height: auto; position: relative; }
  .conteudo { margin-left: 0; padding: 1rem; }
  .layout { flex-direction: column; }
}
