:root {
  --primary: #003366;
  --primary-light: #0055a5;
  --secondary: #006f3c;
  --accent: #ffd600;
  --background: #f5f7fa;
  --surface: #ffffff;
  --text: #212121;
  --text-muted: #616161;
  --danger: #d32f2f;
  --success: #388e3c;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--background);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

h1, h2 {
  margin-bottom: 16px;
  color: var(--primary);
}

.centered {
  max-width: 900px;
  margin: 80px auto;
  text-align: center;
  padding: 24px;
}

.form-container {
  max-width: 520px;
  margin: 60px auto;
  padding: 32px;
  background: var(--surface);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  animation: fadeIn 0.5s ease;
}

/* ===== Botões ===== */

.btn,
.btn-outline,
.btn-small,
.btn-pdf,
.btn-excel {
  display: inline-block;
  visibility: visible;
  opacity: 1;
}

.btn {
  background: var(--primary);
  color: white;
  padding: 12px 20px;
  border: none;
  border-radius: 6px;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
  transition: background 0.25s, box-shadow 0.25s, transform 0.15s;
}
.btn:hover {
  background: var(--primary-light);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transform: translateY(-2px);
}
.btn:active {
  transform: scale(0.97);
}
.btn-outline {
  border: 1.5px solid var(--primary);
  background: transparent;
  color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary-light);
  color: #fff;
}
.btn-small {
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 5px;
}
.btn-pdf {
  background: var(--danger);
  color: #fff;
}
.btn-excel {
  background: var(--secondary);
  color: #fff;
}
.btn-pdf:hover { background: #b71c1c; }
.btn-excel:hover { background: #2e7d32; }
.logout-btn {
  background: var(--danger);
  background-color: white;
}

/* ===== Topbar ===== */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--primary);
  color: white;
  padding: 16px 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.topbar h1 {
  font-size: 22px;
}

/* Torna botões do topo sempre visíveis */
.topbar .btn,
.topbar .btn-outline,
.topbar .btn-small {
  color: var(--primary) !important;
  background: #fff !important;
  border-color: var(--primary) !important;
  box-shadow: none !important;
}
.topbar .btn-outline:hover {
  background: var(--primary-light) !important;
  color: #fff !important;
}


/* ===== Formulários ===== */
label {
  display: block;
  margin-bottom: 14px;
  font-size: 15px;
  font-weight: 500;
}
input[type="text"],
input[type="password"],
input[type="number"],
select {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-top: 6px;
  transition: border 0.2s, box-shadow 0.2s;
}
input:focus, select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,85,165,0.2);
  outline: none;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 18px;
}

/* ===== Mensagens ===== */
.msg {
  margin-top: 16px;
  padding: 12px;
  border-radius: 6px;
  font-size: 14px;
}
.msg.success {
  background: #e8f5e9;
  color: var(--success);
  border: 1px solid #a5d6a7;
}
.msg.error {
  background: #ffebee;
  color: var(--danger);
  border: 1px solid #ef9a9a;
}

/* ===== Dashboard ===== */
.container {
  max-width: 1100px;
  margin: 24px auto;
  padding: 16px;
}

#caixinha {
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 10px;
  width: 100%;
  box-sizing: border-box;
  margin-top: 6px;
  border-radius: 10px;
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.45);
  z-index: 1000;
  overflow-y: auto;
  padding: 1rem;
}
.modal-content {
  background: var(--surface);
  padding: 24px;
  width: 100%;
  max-width: 480px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  animation: fadeIn 0.3s ease;
  max-height: 90vh; 
  overflow-y: auto;
}

.dashboard-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}
.card {
  flex: 1;
  min-width: 180px;
  padding: 16px;
  background: var(--surface);
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
  font-weight: 500;
  transition: transform 0.2s;
}
.card:hover {
  transform: translateY(-3px);
}

/* ===== Filtros ===== */
.controls {
  margin: 20px 0;
  flex-direction: row;
}
.filters {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.filters label {
  font-weight: 500;
}
#Pesquisar {
  font-size: 15px;
  flex-direction: column;
}

/* ===== Tabelas ===== */
.table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.table th, .table td {
  padding: 12px;
  border-bottom: 1px solid #eee;
}
.table th {
  background: var(--primary);
  color: white;
  text-align: left;
}
.table tr:nth-child(even) {
  background: #f9f9f9;
}
.table tr:hover {
  background: #f1f7ff;
}

/* ===== Links de aluno ===== */
.aluno-link {
  color: var(--secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}
.aluno-link:hover {
  color: var(--accent);
}

/* ===== Pequenos detalhes ===== */
.small {
  color: var(--text-muted);
  margin-top: 12px;
  font-size: 14px;
}

/* ===== Responsividade ===== */
@media(max-width: 600px) {
  .btn-row, .filters, .actions {
    flex-direction: column;
    align-items: stretch;
  }
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

/* ===== Animações ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}