:root {
  --brand-yellow: #E4D46A;
  --dark: #000000;
  --header-height: 100px;
  --sidebar-width: 224px;
  --header-offset: var(--header-height);
}

@media (max-width: 1199px) {
  :root {
    --header-height: 92px;
    --sidebar-width: 200px;
  }
}

@media (max-width: 991px) {
  :root {
    --header-height: 110px;
    --sidebar-width: 260px;
  }
}

@media (max-width: 575px) {
  :root {
    --header-height: 140px;
  }
}

body, html {
  font-family: 'Inter', sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

/* -------------------- HEADER -------------------- */
.dashboard-header {
  min-height: var(--header-height);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.dashboard-logo {
  height: 70px;
  width: auto;
  flex-shrink: 0;
}

.headers {
  margin-left: 8px;
  min-width: 0;
}

.header-title {
  font-weight: 900;
  font-size: 30px;
  letter-spacing: 3px;
  line-height: 1.2;
}

.header-subtitle {
  font-size: 15px;
  letter-spacing: 1.4px;
  display: block;
  margin-top: 2px;
}

.mobile-menu-btn {
  padding: 0.4rem 0.75rem;
  border-color: var(--brand-yellow);
}

.mobile-menu-icon {
  position: relative;
  display: block;
  width: 20px;
  height: 2px;
  background-color: var(--brand-yellow);
}

.mobile-menu-icon::before,
.mobile-menu-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background-color: var(--brand-yellow);
  transition: transform 0.2s ease;
}

.mobile-menu-icon::before { top: -6px; }
.mobile-menu-icon::after { top: 6px; }

/* -------------------- LAYOUT -------------------- */
.main-content {
  margin-left: var(--sidebar-width);
  margin-top: calc(var(--header-offset) + 8px);
  padding: 24px;
  transition: margin-left 0.3s ease;
}

.sidebar {
  width: var(--sidebar-width);
  height: calc(100vh - var(--header-offset));
  position: fixed;
  top: var(--header-offset);
  left: 0;
  background-color: rgba(99, 99, 97, 0.5);
  padding: 24px 16px;
  z-index: 1050;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  max-height: calc(100vh - var(--header-height));
}

.sidebar .nav {
  width: 100%;
}

.sidebar .nav-link {
  width: 100%;
  display: block;
  padding: 12px 20px;
  font-weight: 900;
  color: #000;
  text-decoration: none;
  margin: 8px 0;
  background-color: var(--brand-yellow);
  border-radius: 6px;
  text-align: center;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08);
}

.sidebar .nav-link:hover {
  background-color: #c7b844;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1040;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

body.sidebar-open .sidebar-backdrop {
  opacity: 1;
  pointer-events: auto;
}

/* -------------------- FILTROS E BOTÕES -------------------- */
.filter-row {
  width: 100%;
}

.filter-box {
  background-color: var(--brand-yellow);
  border-radius: 8px;
  padding: 10px 12px;
}

.filter-box strong {
  white-space: nowrap;
}

.filter-email,
.filter-period,
.filter-collaborator,
.filter-state,
.filter-genre,
.filter-music {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-box .form-control {
  min-width: 0;
  flex: 1 1 180px;
}

.filter-period {
  background-color: var(--dark);
  color: var(--brand-yellow);
  padding: 4px 10px;
  border-radius: 5px;
  font-weight: 900;
  font-size: 12px;
}

.filter-box input[type="date"] {
  font-weight: 900;
  font-size: 12px;
  flex: 1 1 160px;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  cursor: pointer;
}

.btn-black {
  background-color: #000000;
  color: var(--brand-yellow);
  font-weight: 900;
}

.btn-black:hover {
  background-color: #1a1a1a;
  color: #ffeb70 !important;
}

.metric-value {
  color: #ff6543;
  font-weight: bold;
}

.btn-outline-warning {
  background-color: #ffc107;
  color: #000000;
  font-weight: bold;
}

.btn-outline-warning:hover,
.btn-outline-warning:focus {
  background-color: #000000;
  color: #ffc107;
}

.btn-primary {
  background-color: var(--brand-yellow);
  color: #000;
  border: 1px solid var(--brand-yellow);
  font-weight: bold;
  transition: all 0.2s ease-in-out;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: #cdbf4f;
  border-color: #cdbf4f;
  color: #000;
}

/* Cards de métricas padronizados */
.metric-card {
  height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 6px;
}

@media (max-width: 575px) {
  .metric-card {
    height: 130px;
  }
}

/* -------------------- RESPONSIVO -------------------- */
@media (max-width: 1199px) {
  .dashboard-logo { height: 62px; }
  .header-title { font-size: 26px; letter-spacing: 2px; }
  .header-subtitle { font-size: 13px; }
  .sidebar .nav-link { font-size: 14px; }
  .main-content { padding: 20px; }
}

@media (max-width: 991px) {
  body, html { overflow-y: auto; }
  body.sidebar-open { overflow: hidden; }

  .main-content {
    margin-left: 0;
    padding: 20px 16px 28px;
    margin-top: calc(var(--header-offset) + 8px);
  }

  .sidebar {
    transform: translateX(-100%);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
    height: calc(100vh - var(--header-offset));
    align-items: stretch;
    padding: 16px 14px;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar .nav-link {
    font-size: 15px;
  }

  .dashboard-logo { height: 56px; }
  .headers { width: auto; }
  .header-title { font-size: 22px; margin-left: 0; }
  .header-subtitle { font-size: 12px; letter-spacing: 1px; }
  .filter-box {
    width: 100%;
    gap: 10px;
  }
  .filter-box strong, .filter-period {
    width: 100%;
  }
  .filter-period input[type="date"] {
    width: 100%;
  }
  .btn-black {
    width: 100%;
  }
}

@media (max-width: 767px) {
  .dashboard-header {
    align-items: flex-start;
  }

  .headers {
    order: 3;
    width: 100%;
    margin-left: 0;
  }

  .header-title {
    font-size: 20px;
    letter-spacing: 1.2px;
  }

  .header-subtitle {
    font-size: 12px;
    letter-spacing: 0.8px;
  }

  .dashboard-logo {
    margin-left: 4px;
  }

  .sidebar .nav-link {
    font-size: 14px;
    padding: 10px 14px;
  }

  /* Sidebar mais compacta em telas baixas (paisagem) */
  .sidebar {
    padding: 12px 12px;
    gap: 8px;
  }

  .filter-box {
    padding: 12px;
  }

  .filter-row .btn-outline-warning {
    width: 100%;
    margin-left: 0;
    margin-top: 10px;
  }
}

@media (max-width: 540px) {
  .dashboard-logo { height: 52px; }
  .main-content { padding: 16px; }
  .header-title { font-size: 18px; }
  .filter-period {
    font-size: 12px;
  }
  .btn-black { font-size: 14px; padding: 8px 12px; }
}
