/* =====================================================
   RESET GLOBAL
===================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Arial, sans-serif;
  background: #f3f4f6;
  color: #374151;
  line-height: 1.5;
}

/* =====================================================
   HEADER / TOPO
===================================================== */
header {
  background: linear-gradient(90deg, #1e3a8a, #2563eb);
  color: #fff;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

header img {
  height: 52px;
}

header h1 {
  color: #fff;  
  font-size: 18px;
  font-weight: 600;
}

/* =====================================================
   CONTAINER
===================================================== */
.container {
  max-width: 1200px;
  margin: 25px auto;
  padding: 24px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

/* =====================================================
   TÍTULOS
===================================================== */
h2 {
  color: #1e3a8a;
  margin-bottom: 16px;
  border-bottom: 3px solid #f59e0b;
  padding-bottom: 6px;
}

h3 {
  color: #2563eb;
  margin-bottom: 10px;
}

/* =====================================================
   FORMULÁRIOS
===================================================== */
form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

input,
select {
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid #9ca3af;
  font-size: 14px;
  width: 260px;
}

input:focus,
select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37,99,235,0.2);
}

input[readonly] {
  background: #e5e7eb;
}

/* =====================================================
   BOTÕES
===================================================== */
button {
  border: none;
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-salvar {
  background: #2563eb;
  color: #ffffff;
  font-weight: 600;
}

.btn-salvar:hover {
  background: #1e3a8a;
}

.btn-cancelar {
  background: #9ca3af;
  color: #ffffff;
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: 600;
  display: inline-block;
}

.btn-cancelar:hover {
  background: #374151;
}

.btn-excluir {
  background: #dc2626;
  color: #ffffff;
}

.btn-excluir:hover {
  opacity: 0.9;
}

/* =====================================================
   TABELAS
===================================================== */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 14px;
}

th {
  background: #1e3a8a;
  color: #fff;
  padding: 10px;
}

td {
  padding: 10px;
  border-bottom: 1px solid #e5e7eb;
  text-align: center;
}

tr:hover {
  background: #f9fafb;
}

/* =====================================================
   AÇÕES
===================================================== */
.acoes a {
  margin: 0 6px;
  text-decoration: none;
  font-weight: 600;
}

.acoes a.edit {
  color: #2563eb;
}

.acoes a.delete {
  color: #dc2626;
}

/* =====================================================
   BADGES (CATEGORIA)
===================================================== */
.badge {
  padding: 4px 10px;
  border-radius: 12px;
  color: #fff;
  font-size: 12px;
  font-weight: bold;
}

.badge.MIRIM {
  background: #16a34a;
}

.badge.LIVRE {
  background: #2563eb;
}

/* =====================================================
   ALERTAS
===================================================== */
.alert-erro {
  color: #dc2626;
  font-weight: bold;
  margin-top: 10px;
}

.alert-sucesso {
  color: #16a34a;
  font-weight: bold;
  margin-top: 10px;
}

/* =====================================================
   RESPONSIVO
===================================================== */
@media (max-width: 768px) {
  .container {
    margin: 10px;
    padding: 16px;
  }

  form {
    flex-direction: column;
  }

  input,
  select {
    width: 100%;
  }

  table {
    font-size: 13px;
  }
}
/* =====================================================
   BOTÃO VOLTAR
===================================================== */
.btn-voltar {
  display: inline-block;
  margin-bottom: 14px;
  background: #e5e7eb;
  color: #1e3a8a;
  padding: 8px 14px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-voltar:hover {
  background: #d1d5db;
}
/* ================= SIDEBAR MENU ================= */
.sidebar {
  width: 260px;
  background: #1e3a8a;
  color: #fff;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  padding-top: 20px;
  transition: width 0.3s ease;
  z-index: 1000;
}

.sidebar-closed {
  width: 70px;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px 20px;
}

.sidebar-logo {
  height: 40px;
}

.sidebar-header h3 {
  font-size: 18px;
  margin: 0;
  white-space: nowrap;
}

.toggle-btn {
  margin-left: auto;
  cursor: pointer;
  font-size: 24px;
}

.sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-menu li a {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.2s ease;
}

.sidebar-menu li a:hover {
  background: #2563eb;
}

.sidebar-menu .has-submenu > a .arrow {
  margin-left: auto;
}

.submenu {
  list-style: none;
  padding-left: 0;
  display: none;
}

.submenu.open {
  display: block;
}

.submenu li a {
  padding: 10px 36px;
  background: #274182;
  font-size: 14px;
}

.icon-home::before { content: "🏠"; margin-right: 8px; }
.icon-list::before { content: "📋"; margin-right: 8px; }
.icon-calendar::before { content: "📅"; margin-right: 8px; }
.icon-award::before { content: "🏆"; margin-right: 8px; }
.icon-file-text::before { content: "📄"; margin-right: 8px; }
.icon-tv::before { content: "📺"; margin-right: 8px; }
.icon-chevron-down::before { content: "▼"; font-size: 10px; }

/* Ajuste do conteúdo principal quando a sidebar estiver aberta/fechada */
body:not(.sidebar-closed) .container {
  margin-left: 260px !important;
}
body.sidebar-closed .container {
  margin-left: 70px !important;
}

