.dashboard-layout {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--dashboard-bg);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.sidebar {
  box-sizing: border-box;
  width: clamp(260px, 23vw, 300px);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: width 0.25s ease;
  overflow: hidden;
}

@media (min-width: 769px) {
  .sidebar {
    position: sticky;
    top: 0;
    align-self: flex-start;
    height: 100vh;
    height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
  }
}

.sidebar-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 40px;
}

.sidebar-logo {
  flex: 0 0 clamp(140px, 17vw, 180px);
  margin: 0 auto;
  min-width: 0;
  text-align: center;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.sidebar-toggle {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--sidebar-text);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease;
}

.sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}

.logo-dark { display: none; }

:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: inline-block; }

:root.sidebar-collapsed .sidebar {
  width: 76px;
}

:root.sidebar-collapsed .sidebar .sidebar-logo {
  opacity: 0;
  visibility: hidden;
}

:root.sidebar-collapsed .sidebar .nav-item {
  padding-left: 8.5px;
}

:root.sidebar-collapsed .sidebar .nav-item span {
  opacity: 0;
  visibility: hidden;
}

.brand-logo-sidebar {
  max-width: 180px;
  width: 100%;
  height: auto;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 18px;
  font-weight: 600;
  line-height: 2;
  transition: opacity 0.2s ease, padding-left 0.25s ease;
}

.nav-item svg {
  flex-shrink: 0;
  width: 1em;
  height: 1em;
}

.nav-item span {
  white-space: nowrap;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.nav-item:hover {
  opacity: 0.8;
}

.logout-btn {
  background: none;
  border: none;
  padding: 0;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.main-content {
  flex: 1;
  min-width: 0;
  padding: clamp(20px, 3.2vw, 40px) clamp(20px, 3.5vw, 50px);
}

.main-header h1 {
  font-size: clamp(26px, 2.5vw, 36px);
  font-weight: 800;
  color: var(--text-strong);
  margin: 0 0 35px 0;
}

.quick-actions {
  display: flex;
  gap: 20px;
  margin-bottom: 40px;
}

.filters-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 24px;
}

.filters-bar .field {
  flex: 1 1 240px;
  margin-bottom: 0;
}

.filters-bar .filter-actions {
  display: flex;
  gap: 8px;
}

.filters-bar.filters-bar-compact {
  justify-content: center;
  gap: 12px;
}

.filters-bar.filters-bar-compact .field {
  flex: 1 1 0;
  min-width: 0;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.filters-bar.filters-bar-compact .field label {
  margin-bottom: 0;
  white-space: nowrap;
}

.filters-bar.filters-bar-compact .field .input-field {
  flex: 1 1 100px;
  min-width: 0;
}

.filters-bar.filters-bar-compact .filter-actions {
  flex: 0 0 auto;
}

.filters-bar .filter-actions .btn-action {
  padding: 12px 20px;
  font-size: 14px;
}
