:root {
  --vermelho: #d81f26;
  --vermelho-escuro: #b3151c;
  --azul: #0f2a4a;
  --azul-claro: #16406e;
  --cinza-bg: #f1f3f7;
  --cinza-borda: #e2e8f0;
  --cinza-texto: #4a5568;
  --texto: #1f2937;
  --verde: #1a7f37;
  --sombra: 0 8px 30px rgba(15, 42, 74, 0.12);
  --radius: 12px;
  --fonte: 'Inter', Arial, sans-serif;
}

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

body {
  font-family: var(--fonte);
  color: var(--texto);
  background: var(--cinza-bg);
  font-size: 15px;
}

a { color: var(--azul); }

/* ---- Layout admin ---- */
.admin { display: flex; min-height: 100vh; }

.sidebar {
  width: 250px;
  background: var(--azul);
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
}

.sidebar-brand {
  display: block;
  padding: 1.2rem 1.5rem;
  color: #fff;
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-nav { flex: 1; padding: 0.8rem; }

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1rem;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.95rem;
  border-radius: 8px;
  margin-bottom: 0.25rem;
  transition: background 0.2s, color 0.2s;
}

.sidebar-link:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.sidebar-link.ativo { background: var(--vermelho); color: #fff; }

.sidebar-footer { border-top: 1px solid rgba(255, 255, 255, 0.1); padding: 0.6rem 0.8rem; }

.conteudo { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.admin-topbar {
  background: #fff;
  border-bottom: 1px solid var(--cinza-borda);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.admin-topbar h1 { font-size: 1.25rem; }

.admin-usuario-nome { font-weight: 600; font-size: 0.95rem; }

.menu-mobile { display: none; background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--azul); }

.admin-corpo { padding: 2rem; flex: 1; }

/* ---- Cartões de resumo ---- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.2rem; margin-bottom: 2rem; }

.card-mini {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--sombra);
  padding: 1.4rem;
}

.card-mini strong { display: block; font-size: 1.9rem; color: var(--vermelho); }
.card-mini span { color: var(--cinza-texto); font-size: 0.9rem; }

.painel-card { background: #fff; border-radius: var(--radius); box-shadow: var(--sombra); padding: 1.5rem; }

/* ---- Tabelas ---- */
.tabela-wrap { background: #fff; border-radius: var(--radius); box-shadow: var(--sombra); overflow-x: auto; }

table.tabela { width: 100%; border-collapse: collapse; font-size: 0.92rem; }

table.tabela th, table.tabela td { text-align: left; padding: 0.8rem 1rem; border-bottom: 1px solid var(--cinza-borda); vertical-align: middle; }

table.tabela th { background: #f8fafc; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.4px; color: var(--cinza-texto); }

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

.acoes { display: flex; gap: 0.4rem; }

/* ---- Botões ---- */
.btn {
  display: inline-block;
  font-family: var(--fonte);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.7rem 1.4rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn:hover { transform: translateY(-1px); }

.btn-primario { background: var(--vermelho); color: #fff; }
.btn-primario:hover { background: var(--vermelho-escuro); }
.btn-azul { background: var(--azul); color: #fff; }
.btn-azul:hover { background: var(--azul-claro); }
.btn-pequeno { padding: 0.45rem 0.9rem; font-size: 0.82rem; }
.btn-cinza { background: #e2e8f0; color: var(--texto); }
.btn-verde { background: var(--verde); color: #fff; }
.btn-perigo { background: #fee2e2; color: #991b1b; }
.btn-perigo:hover { background: #fecaca; }

/* ---- Formulários ---- */
.form-card { background: #fff; border-radius: var(--radius); box-shadow: var(--sombra); padding: 1.8rem; margin-bottom: 2rem; max-width: 640px; }
.form-card h2 { font-size: 1.1rem; margin-bottom: 1.2rem; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 0.35rem; }

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group input[type="datetime-local"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 2px solid var(--cinza-borda);
  border-radius: 8px;
  font-family: var(--fonte);
  font-size: 0.95rem;
  color: var(--texto);
  background: #fbfcfe;
}

.form-group textarea { resize: vertical; min-height: 90px; }

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--vermelho);
  box-shadow: 0 0 0 3px rgba(216, 31, 38, 0.15);
}

.form-acoes { display: flex; gap: 0.8rem; margin-top: 0.5rem; align-items: center; }

/* ---- Flash ---- */
.flash { margin: 1.5rem 2rem 0; padding: 0.9rem 1.2rem; border-radius: 8px; font-weight: 600; font-size: 0.92rem; }
.flash-sucesso { background: #dcfce7; color: #166534; }
.flash-erro { background: #fee2e2; color: #991b1b; }
.flash-aviso { background: #fef3c7; color: #92400e; }

/* ---- Empty state ---- */
.vazio { text-align: center; padding: 2.5rem; color: var(--cinza-texto); }

/* ---- Login dividido ---- */
.login-split { display: flex; min-height: 100vh; }

.login-form-side {
  flex: 1 1 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--cinza-bg);
}

.login-banner-side {
  flex: 1 1 50%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, var(--vermelho), #8e1218);
}

.login-banner-side::before, .login-banner-side::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  z-index: 0;
}
.login-banner-side::before { width: 340px; height: 340px; top: -90px; right: -90px; }
.login-banner-side::after { width: 240px; height: 240px; bottom: -70px; left: -50px; }

.login-banner-conteudo { position: relative; z-index: 1; max-width: 440px; }
.login-banner-conteudo .destaque { font-size: 3.2rem; line-height: 1; margin-bottom: 1rem; }
.login-banner-conteudo h2 { font-size: 1.9rem; margin-bottom: 0.8rem; }
.login-banner-conteudo p { font-size: 1.02rem; line-height: 1.65; opacity: 0.92; }

.login-banner-lista { list-style: none; margin-top: 1.5rem; display: grid; gap: 0.65rem; }
.login-banner-lista li { display: flex; align-items: center; gap: 0.6rem; font-size: 0.96rem; }
.login-banner-lista li::before {
  content: "\2713";
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.22); font-size: 0.78rem; flex-shrink: 0;
}

.login-card { background: #fff; border-radius: var(--radius); box-shadow: var(--sombra); width: 100%; max-width: 420px; padding: 2.5rem; }

.login-brand { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin-bottom: 1.4rem; }
.login-brand-icone { font-size: 1.9rem; line-height: 1; }
.login-brand-nome { font-weight: 800; font-size: 1.25rem; color: var(--vermelho); letter-spacing: 0.3px; }

.login-card h1 { font-size: 1.5rem; text-align: center; margin-bottom: 0.3rem; }
.login-card .login-sub { text-align: center; color: var(--cinza-texto); font-size: 0.9rem; margin-bottom: 1.6rem; }
.login-card .btn { width: 100%; }

.login-erro { background: #fee2e2; color: #991b1b; border-radius: 8px; padding: 0.8rem 1rem; font-size: 0.87rem; margin-bottom: 1.2rem; }
.login-aviso { background: #fef3c7; color: #92400e; border-radius: 8px; padding: 0.8rem 1rem; font-size: 0.87rem; margin-bottom: 1.2rem; }
.login-rodape { margin-top: 1.2rem; font-size: 0.85rem; color: #64748b; text-align: center; }

/* ---- Responsivo ---- */
@media (max-width: 900px) {
  .sidebar {
    position: fixed; top: 0; left: 0; height: 100vh;
    transform: translateX(-100%); transition: transform 0.3s; z-index: 200; overflow-y: auto;
  }
  .sidebar.aberta { transform: translateX(0); }
  .menu-mobile { display: block; }
  .form-grid { grid-template-columns: 1fr; }
  .login-banner-side { display: none; }
}

/* ---- Topbar da Área do Aluno ---- */
.topbar {
  background: var(--azul);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1.6rem;
}
.topbar-marca { font-weight: 800; font-size: 1.1rem; letter-spacing: 0.3px; }
.topbar-usuario { display: flex; align-items: center; gap: 0.9rem; font-size: 0.92rem; }

/* ---- Painel do aluno ---- */
.lista-aulas { list-style: none; display: flex; flex-direction: column; gap: 0.7rem; }
.lista-aulas li {
  background: var(--cinza-bg);
  border: 1px solid var(--cinza-borda);
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  font-size: 0.92rem;
}
.dados-aluno { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.6rem 1.4rem; }
.dados-aluno p { font-size: 0.93rem; }
.dados-aluno strong { color: var(--azul); }

.tag-agendada, .tag-concluida, .tag-cancelada {
  display: inline-block; font-size: 0.75rem; font-weight: 600;
  padding: 0.15rem 0.55rem; border-radius: 20px; margin-left: 0.4rem;
}
.tag-agendada { background: #dbeafe; color: #1e40af; }
.tag-concluida { background: #dcfce7; color: #166534; }
.tag-cancelada { background: #fee2e2; color: #991b1b; }

.titulo-pagina { font-size: 1.5rem; color: var(--azul); margin: 1.6rem 0 1.2rem; }

.card {
  background: #fff;
  border: 1px solid var(--cinza-borda);
  border-radius: var(--radius);
  box-shadow: var(--sombra);
  padding: 1.5rem 1.6rem;
  margin-bottom: 1.4rem;
}
.card h2 { font-size: 1.1rem; color: var(--azul); margin-bottom: 1rem; }

/* Conteúdo da área do aluno (sem sidebar) */
.aluno-area .conteudo {
  padding: 0 1.6rem 2.5rem;
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
}
