.dashboard-header {
  position: sticky;
  top: 0;
  z-index: 25;
  display: flex;
  height: var(--app-topbar-height);
  min-height: var(--app-topbar-height);
  flex-shrink: 0;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
  border-bottom: 1px solid var(--app-shell-border);
  background: #ffffff;
}

.dashboard-search {
  position: relative;
  display: flex;
  flex: 0 1 720px;
  width: 100%;
  max-width: 720px;
  min-width: 200px;
  align-items: center;
}

.dashboard-search svg {
  position: absolute;
  left: 14px;
  z-index: 1;
  width: 18px;
  height: 18px;
  fill: #41484c;
  pointer-events: none;
}

.dashboard-search input {
  width: 100%;
  height: 40px;
  box-sizing: border-box;
  border: 1px solid var(--app-shell-border);
  border-radius: 8px;
  background: #ffffff;
  color: #191c1d;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  outline: none;
  padding: 0 14px 0 40px;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.dashboard-search input::placeholder {
  color: #6b7280;
  font-weight: 400;
}

.dashboard-search input:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

.dashboard-search input:focus {
  background: #ffffff;
  border-color: #9ca3af;
}

.dashboard-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}

.dashboard-chip-btn {
  display: inline-flex;
  height: 40px;
  min-width: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid var(--app-shell-border);
  border-radius: 8px;
  background: #ffffff;
  color: #41484c;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.2s ease,
              border-color 0.2s ease,
              box-shadow 0.2s ease,
              transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.dashboard-chip-btn svg,
.dashboard-chip-btn img {
  width: 18px;
  height: 18px;
  fill: currentColor;
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1),
              color 0.2s ease,
              filter 0.2s ease;
  will-change: transform;
}

.dashboard-chip-btn img {
  display: block;
  filter: brightness(0) saturate(100%) invert(28%) sepia(6%) saturate(800%) hue-rotate(169deg) brightness(94%) contrast(88%);
}

.dashboard-chip-btn:hover {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  transform: translateY(-0.5px);
}

.dashboard-chip-btn:hover svg,
.dashboard-chip-btn:hover img {
  transform: translateY(-1.5px) scale(1.03);
  color: #1e293b;
}

.dashboard-chip-btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.dashboard-chip-btn:active svg,
.dashboard-chip-btn:active img {
  transform: translateY(0) scale(0.98);
}

.dashboard-user {
  position: relative;
}

.dashboard-user--pending:not(.dashboard-user--loading) {
  visibility: hidden;
}

.dashboard-user--loading .dashboard-user__trigger {
  display: none;
}

.dashboard-user--loading .dashboard-user__skeleton {
  display: block;
}

.dashboard-user--loading.is-ready .dashboard-user__skeleton {
  display: none;
}

.dashboard-user--loading.is-ready .dashboard-user__trigger {
  display: inline-flex;
}

.dashboard-user__skeleton-chip {
  display: block;
  width: 108px;
  height: 40px;
  border-radius: 8px;
}

.dashboard-user__trigger {
  display: inline-flex;
  height: 40px;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid var(--app-shell-border);
  border-radius: 8px;
  background: #ffffff;
  color: #191c1d;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  transition: background-color 0.2s ease,
              border-color 0.2s ease,
              box-shadow 0.2s ease,
              transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.dashboard-user__trigger img,
.dashboard-user__trigger svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  filter: brightness(0) saturate(100%) invert(28%) sepia(6%) saturate(800%) hue-rotate(169deg) brightness(94%) contrast(88%);
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}

.dashboard-user__trigger:hover {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  transform: translateY(-0.5px);
}

.dashboard-user__trigger:hover img,
.dashboard-user__trigger:hover svg {
  transform: translateY(-1.5px) scale(1.03);
}

.dashboard-user__trigger:focus-visible {
  outline: 2px solid #00658f;
  outline-offset: 2px;
}

.dashboard-user-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 50;
  min-width: 240px;
  overflow: hidden;
  border: 1px solid var(--app-shell-border);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(25, 28, 29, 0.12);
}

.dashboard-user-menu[hidden] {
  display: none !important;
}

.dashboard-user-menu__head {
  padding: 16px 16px 14px;
}

.dashboard-user-menu__head strong {
  display: block;
  color: #191c1d;
  font-size: 15px;
  font-weight: 700;
  line-height: 22px;
}

.dashboard-user-menu__head p {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35em;
  margin: 4px 0 0;
  color: #6b7280;
  font-size: 13px;
  font-weight: 400;
  line-height: 18px;
}

.dashboard-user-menu__divider {
  height: 1px;
  margin: 0;
  background: var(--app-shell-border);
}

.dashboard-user-menu__logout {
  margin: 0;
}

.dashboard-user-menu__item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 0;
  background: transparent;
  color: #374151;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  text-align: left;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.dashboard-user-menu__item img {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  filter: brightness(0) saturate(100%) invert(28%) sepia(6%) saturate(800%) hue-rotate(169deg) brightness(94%) contrast(88%);
}

.dashboard-user-menu__item:hover {
  background: #f3f4f6;
}

.dashboard-user-menu__item--logout {
  color: #41484c;
  font-weight: 600;
}

.dashboard-user-menu__item--logout:hover {
  background: rgba(186, 26, 26, 0.08);
  color: #ba1a1a;
}

.dashboard-header__menu {
  display: none;
}

@media (max-width: 1100px) {
  .dashboard-header {
    display: flex;
    height: auto;
    min-height: 52px;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    overflow: visible;
  }

  .dashboard-actions,
  .dashboard-user {
    overflow: visible;
  }

  .dashboard-header__menu {
    display: inline-flex;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--app-shell-border);
    border-radius: 10px;
    background: #ffffff;
    color: #33647a;
    box-shadow: none;
  }

  .dashboard-header__menu svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
  }

  .dashboard-search {
    flex: 1 1 auto;
    width: auto;
    max-width: none;
    min-width: 0;
    margin-left: 0;
  }

  .dashboard-search svg {
    left: 10px;
    width: 15px;
    height: 15px;
  }

  .dashboard-search input {
    height: 34px;
    border-color: transparent;
    border-radius: 10px;
    background: #f3f5f7;
    font-size: 13px;
    line-height: 18px;
    padding: 0 10px 0 32px;
  }

  .dashboard-search input:hover {
    background: #eef1f4;
    border-color: transparent;
  }

  .dashboard-search input:focus {
    background: #ffffff;
    border-color: #c5cdd3;
    box-shadow: 0 0 0 3px rgba(48, 97, 119, 0.1);
  }

  .dashboard-actions {
    flex: 0 0 auto;
    width: auto;
    margin-left: 0;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 4px;
  }

  .dashboard-chip-btn {
    flex-shrink: 0;
    height: 34px;
    min-width: 34px;
    padding: 0;
    border-color: transparent;
    border-radius: 10px;
    background: transparent;
  }

  .dashboard-chip-btn:hover {
    background: #f3f5f7;
    border-color: transparent;
  }

  .dashboard-user__trigger {
    height: 34px;
    min-width: 34px;
    padding: 0 8px;
    border-color: transparent;
    border-radius: 10px;
    background: transparent;
    font-size: 13px;
  }

  .dashboard-user__trigger:hover {
    background: #f3f5f7;
    border-color: transparent;
  }

  .dashboard-user__trigger [data-app-header-trigger-label] {
    display: none;
  }

  .dashboard-user__skeleton-chip {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .dashboard-user.is-menu-open {
    z-index: 80;
  }

  .dashboard-user-menu {
    z-index: 90;
    min-width: min(280px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
  }
}

@media (max-width: 560px) {
  .dashboard-header {
    gap: 6px;
    padding: 8px 10px;
  }

  .dashboard-header__menu,
  .dashboard-chip-btn,
  .dashboard-user__trigger {
    width: 32px;
    min-width: 32px;
    height: 32px;
  }

  .dashboard-search input {
    height: 32px;
    font-size: 12px;
    padding-left: 30px;
  }

  .dashboard-actions {
    gap: 2px;
  }
}

.dashboard-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 1000;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  max-height: 380px;
  overflow-y: auto;
  padding: 8px;
  box-sizing: border-box;
}

.dashboard-search-results[hidden] {
  display: none !important;
}

.dashboard-search-group {
  margin-bottom: 8px;
}

.dashboard-search-group:last-child {
  margin-bottom: 0;
}

.dashboard-search-group__title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6b7280;
  padding: 6px 10px 4px 10px;
}

.dashboard-search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  color: #1f2937;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: background-color 0.15s ease;
}

.dashboard-search-item:hover,
.dashboard-search-item:focus {
  background: #f3f4f6;
  outline: none;
}

.dashboard-search-item__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dashboard-search-item__sub {
  font-size: 11px;
  color: #6b7280;
  font-weight: 400;
}

.dashboard-search-item__badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: #e0e7ff;
  color: #3730a3;
  margin-left: auto;
}

.dashboard-search-empty {
  padding: 16px 12px;
  text-align: center;
  color: #6b7280;
  font-size: 13px;
}
