/* ===== LAYOUT BASE ===== */
.layout {
  display: flex;
  height: 100vh;
  background: #f9fafb;
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: 250px;
  background: #111827;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1rem;
  transition: transform 0.3s ease;
}

.sidebar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar__header img {
  width: 45px;
  margin-right: 8px;
}

.sidebar__header h2 {
  flex: 1;
  font-size: 1.1rem;
  font-weight: 600;
}

.sidebar__toggle {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  display: none;
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 1rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #cbd5e1;
  text-decoration: none;
  padding: 0.6rem 0.8rem;
  border-radius: 6px;
  transition: 0.2s;
}

.nav-item:hover,
.nav-item.active {
  background: #1e293b;
  color: #fff;
}

.sidebar__footer {
  margin-top: auto;
}

.btn--danger {
  width: 100%;
  background: #ef4444;
  border: none;
  color: #fff;
  padding: 0.7rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
}

.btn--danger:hover {
  background: #dc2626;
}

/* ===== MAIN AREA ===== */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 1rem;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.btn-menu {
  background: transparent;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  margin-right: 10px;
}

.card {
  background: #fff;
  border-radius: 10px;
  margin: 1rem;
  padding: 1.5rem;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

.section-title {
  margin-bottom: 1rem;
  font-size: 1.1rem;
  font-weight: 600;
}

/* ===== FORM E GRID ===== */
.grid-1, .grid-2, .grid-3, .grid-4 {
  display: grid;
  gap: 12px;
}
.grid-1 { grid-template-columns: 1fr; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.92rem;
}

input, select, textarea {
  padding: 8px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.95rem;
  background: #fff;
}

.actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 1rem;
}

/* ===== BOTÕES ===== */
.btn {
  border: none;
  border-radius: 6px;
  padding: 0.6rem 1rem;
  cursor: pointer;
  font-weight: 500;
}

.btn-primary { background: #2563eb; color: #fff; }
.btn-secondary { background: #e5e7eb; color: #111827; }
.btn-success { background: #16a34a; color: #fff; }
.btn--danger { background: #ef4444; color: #fff; }

.btn-sm {
  padding: 0.3rem 0.6rem;
  font-size: 0.85rem;
}

/* ===== TABELAS ===== */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.table th, .table td {
  border-bottom: 1px solid #e5e7eb;
  padding: 0.6rem 0.8rem;
  text-align: center;
}

.table th {
  background: #f3f4f6;
  font-weight: 600;
}

.table-sm th, .table-sm td {
  padding: 0.4rem 0.6rem;
}

/* ===== RESPONSIVO ===== */
@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    height: 100%;
    left: 0;
    top: 0;
    transform: translateX(-100%);
    z-index: 1000;
  }
  .sidebar.active {
    transform: translateX(0);
  }
  .btn-menu {
    display: block;
  }
  .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #111827;
  color: #fff;
  padding: 12px 16px;
  border-radius: 8px;
  opacity: 0;
  transform: translateY(20px);
  transition: 0.3s;
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}
.toast--success { background: #16a34a; }
.toast--error { background: #dc2626; }
.toast--info { background: #2563eb; }
.toast--warning { background: #f59e0b; }

.upload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.upload-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-weight: 500;
}
.upload-grid input[type=file] {
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 6px;
}

