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

body {
  font-family: 'Poppins', sans-serif;
  background-color: #f7f9fb;
  color: #333;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* === HEADER === */
.header {
  background-color: #ffffff;
  color: #2c3e50;
  padding: 12px 24px;
  height: 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  margin-left: 240px;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logout-link {
  color: #e74c3c;
  text-decoration: none;
}

/* === SIDEBAR === */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 240px;
  height: 100vh;
  background-color: #1e293b;
  color: white;
  padding-top: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar .logo-area {
  text-align: center;
  margin-bottom: 20px;
}

.sidebar .logo {
  width: 50px;
}

.sidebar .brand {
  font-size: 14px;
  font-weight: bold;
}

.sidebar .nav {
  list-style: none;
  padding: 0 10px;
}

.sidebar .nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  text-decoration: none;
  color: #fff;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.sidebar .nav a:hover {
  background-color: #334155;
}

/* === MAIN STRUCTURE === */
.main-content {
  margin-left: 240px;
  padding: 20px;
}

.dashboard-container {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

/* Cards centrais (4 quadrantes) */
.dashboard-main,
.dashboard-cards {
  flex: 3;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

/* Cards laterais (MEI) */
.dashboard-side,
.mei-sidebar {
  flex: 1;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* === CARD PADRÃO === */
.card,
.dashboard-card,
.info-card {
  background: #ffffff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.card h3,
.dashboard-card h3,
.info-card h3 {
  font-size: 1.1em;
  color: #2f80ed;
  margin-bottom: 10px;
}

.card p,
.card ul li,
.info-card p,
.info-card small {
  font-size: 14px;
}

/* === RESPONSIVO === */
@media (max-width: 768px) {
  .sidebar {
    left: -240px;
    position: absolute;
    transition: left 0.3s ease;
  }

  .sidebar.collapsed {
    left: 0;
  }

  .main-content {
    margin-left: 0;
    padding: 10px;
  }

  .dashboard-container {
    flex-direction: column;
  }

  .dashboard-cards,
  .dashboard-main,
  .dashboard-side {
    width: 100%;
  }
}

/* === FOOTER === */
.main-footer {
  background-color: #2c3e50;
  color: white;
  text-align: center;
  padding: 14px;
  font-size: 14px;
  margin-top: auto;
}
