.dashboard-category-page {
  background: #ffffff;
}

.dashboard-category-page .boot-mask {
  background:
    radial-gradient(circle at top center, rgba(104, 182, 255, 0.22), transparent 34%),
    radial-gradient(circle at 78% 18%, rgba(142, 129, 255, 0.14), transparent 22%),
    linear-gradient(180deg, #eef5ff 0%, #e4eefb 52%, #d7e4f6 100%);
}

.dashboard-category-page .boot-caption {
  color: #5d6b84;
}

.dashboard-category-page .app-shell {
  width: calc(100% - 10px);
  padding: 5px 0 18px;
}

.dashboard-category-page .screen {
  min-height: calc(100vh - 10px);
}

.dashboard-category-page .dashboard-screen {
  gap: 10px;
  align-content: start;
}

.dashboard-category-page .dashboard-topbar {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 18px;
  background: linear-gradient(90deg, #68b6ff 0%, #8e81ff 56%, #c186ff 100%);
  border: none;
  box-shadow: 0 16px 28px rgba(99, 118, 162, 0.16);
  backdrop-filter: none;
}

.dashboard-category-page .dashboard-topbar__identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}

.dashboard-category-page .topbar-role,
.dashboard-category-page .topbar-username {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-category-page .topbar-role {
  color: #f8fbff;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.dashboard-category-page .topbar-username {
  color: rgba(255, 255, 255, 0.94);
  font-size: 0.94rem;
  font-weight: 700;
}

.dashboard-category-page .toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
}

.dashboard-category-page .toolbar-button {
  min-height: 32px;
  padding: 4px 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
  transition: background 160ms ease, transform 160ms ease, opacity 160ms ease;
}

.dashboard-category-page .toolbar-button:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.dashboard-category-page .toolbar-button:disabled {
  opacity: 0.66;
  cursor: wait;
}

.dashboard-category-page .toolbar-button__icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 24px;
}

.dashboard-category-page .toolbar-button__icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.dashboard-category-page .toolbar-button__label {
  line-height: 1;
}

.dashboard-category-page .categories-panel {
  display: grid;
  gap: 10px;
  padding: 10px 6px 0;
}

.dashboard-category-page .community-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  align-items: stretch;
  justify-items: stretch;
  padding: 0;
}

.dashboard-category-page .community-modal.hidden {
  display: none;
}

.dashboard-category-page .community-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13, 27, 46, 0.46);
}

.dashboard-category-page .community-modal__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100vh;
  max-height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  padding:
    max(14px, var(--safe-top))
    calc(18px + var(--safe-right))
    calc(18px + var(--safe-bottom))
    calc(18px + var(--safe-left));
  border: 0;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
  overflow: hidden;
}

.dashboard-category-page .community-modal__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.dashboard-category-page .community-modal__title {
  margin: 0;
  color: #173150;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}

.dashboard-category-page .community-modal__close {
  background: #edf4ff;
  color: #173150;
  box-shadow: inset 0 0 0 1px #d9e6f7;
}

.dashboard-category-page .community-modal__body {
  min-width: 0;
  overflow: auto;
  padding-right: 2px;
  font-size: 12px;
}

.dashboard-category-page .categories-panel__title {
  margin: 0;
  color: #173150;
  font-size: 1.04rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.dashboard-category-page .info-banner {
  padding: 11px 14px;
  border-radius: 16px;
  background: #f5f8fd;
  border: 1px solid #d8e1ef;
  box-shadow: none;
}

.dashboard-category-page .category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 220px));
  gap: 12px;
  align-items: start;
  justify-content: start;
}

.dashboard-category-page .category-card {
  width: 220px;
  height: 230px;
  padding: 15px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 12px;
  border-radius: 18px;
  border: 1px solid #e1e8f3;
  background: #ffffff;
  box-shadow: 0 14px 24px rgba(155, 169, 196, 0.14);
}

.dashboard-category-page .category-card:hover {
  transform: translateY(-2px);
  border-color: #bbcbf7;
}

.dashboard-category-page .category-card__icon {
  width: 150px;
  height: 150px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 22px;
  overflow: hidden;
}

.dashboard-category-page .category-card__icon img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
  object-fit: cover;
  object-position: center;
}

.dashboard-category-page .category-card__icon.is-missing img {
  display: none;
}

.dashboard-category-page .category-card__placeholder {
  display: none;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  border-radius: inherit;
  background: linear-gradient(135deg, #edf4ff 0%, #f6f0ff 100%);
  color: #60759d;
  font-size: 2rem;
  font-weight: 800;
}

.dashboard-category-page .category-card__icon.is-missing .category-card__placeholder {
  display: inline-flex;
}

.dashboard-category-page .category-card__title {
  margin: 0;
  color: #173150;
  font-size: 0.82rem;
  line-height: 1.35;
  text-align: center;
  letter-spacing: 0.05em;
}

.dashboard-category-page .empty-state {
  width: min(100%, 360px);
  padding: 18px 16px;
  border-radius: 18px;
  background: #f8fbff;
  border: 1px solid #dde6f2;
  box-shadow: none;
}

.dashboard-category-page .empty-state h2 {
  margin: 0 0 6px;
  color: #173150;
  font-size: 1rem;
}

.dashboard-category-page .empty-state p {
  margin: 0;
  color: #607189;
}

@media (max-width: 860px) {
  .dashboard-category-page .dashboard-topbar {
    flex-wrap: wrap;
    row-gap: 8px;
    padding: 8px 12px;
  }

  .dashboard-category-page .toolbar-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .dashboard-category-page .category-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 220px));
  }
}

@media (max-width: 560px) {
  .dashboard-category-page .app-shell {
    width: calc(100% - 10px);
  }

  .dashboard-category-page .dashboard-topbar {
    padding: 8px 10px;
    border-radius: 16px;
  }

  .dashboard-category-page .dashboard-topbar__identity {
    width: 100%;
    gap: 8px;
  }

  .dashboard-category-page .topbar-role {
    font-size: 0.84rem;
  }

  .dashboard-category-page .topbar-username {
    font-size: 0.88rem;
  }

  .dashboard-category-page .toolbar-actions {
    justify-content: stretch;
  }

  .dashboard-category-page .toolbar-button {
    flex: 1 1 0;
    justify-content: center;
    padding: 4px 8px;
  }

  .dashboard-category-page .toolbar-button__label {
    font-size: 0.78rem;
  }

  .dashboard-category-page .category-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 220px));
    gap: 10px;
  }

  .dashboard-category-page .category-card {
    width: 220px;
    height: 230px;
    padding: 15px;
  }
}

@media (max-width: 768px) {
  .dashboard-category-page,
  .dashboard-category-page .app-shell,
  .dashboard-category-page #homeScreen.dashboard-screen,
  .dashboard-category-page #homeScreen .dashboard-topbar,
  .dashboard-category-page #homeScreen .categories-panel,
  .dashboard-category-page #homeScreen .category-grid {
    width: 100%;
    max-width: 100%;
  }

  .dashboard-category-page .app-shell {
    width: 100%;
    padding:
      max(8px, var(--safe-top))
      calc(12px + var(--safe-right))
      calc(18px + var(--safe-bottom))
      calc(12px + var(--safe-left));
  }

  .dashboard-category-page #homeScreen .dashboard-topbar {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
    border-radius: 18px;
  }

  .dashboard-category-page #homeScreen .dashboard-topbar__identity {
    width: 100%;
    display: grid;
    gap: 4px;
    justify-items: center;
    text-align: center;
  }

  .dashboard-category-page #homeScreen .topbar-role,
  .dashboard-category-page #homeScreen .topbar-username {
    width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .dashboard-category-page #homeScreen .toolbar-actions {
    width: 100%;
    margin-left: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .dashboard-category-page #homeScreen .toolbar-button {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    justify-content: center;
    padding: 7px 8px;
    gap: 6px;
    position: relative;
    z-index: 1;
  }

  .dashboard-category-page #homeScreen .toolbar-button__icon {
    width: 18px;
    height: 18px;
    flex-basis: 18px;
  }

  .dashboard-category-page #homeScreen .toolbar-button__icon svg {
    width: 18px;
    height: 18px;
  }

  .dashboard-category-page #homeScreen .toolbar-button__label {
    font-size: 0.72rem;
    white-space: nowrap;
  }

  .dashboard-category-page #homeScreen .categories-panel {
    gap: 10px;
    padding: 8px 0 0;
  }

  .dashboard-category-page #homeScreen .categories-panel__title {
    width: 100%;
    padding-inline: 4px;
    text-align: center;
  }

  .dashboard-category-page #homeScreen .info-banner,
  .dashboard-category-page #homeScreen .empty-state {
    width: 100%;
  }

  .dashboard-category-page #homeScreen .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    justify-content: center;
  }

  .dashboard-category-page #homeScreen .category-card {
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 208px;
    padding: 14px 12px;
  }

  .dashboard-category-page #homeScreen .category-card__icon {
    width: min(100%, 132px);
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .dashboard-category-page #homeScreen .category-card__icon img {
    object-fit: contain;
    padding: 6px;
  }
}

@media (max-width: 480px) {
  .dashboard-category-page .app-shell {
    padding:
      max(6px, var(--safe-top))
      calc(10px + var(--safe-right))
      calc(16px + var(--safe-bottom))
      calc(10px + var(--safe-left));
  }

  .dashboard-category-page #homeScreen .dashboard-topbar {
    gap: 8px;
    padding: 10px;
    border-radius: 16px;
  }

  .dashboard-category-page #homeScreen .topbar-role {
    font-size: 0.82rem;
  }

  .dashboard-category-page #homeScreen .topbar-username {
    font-size: 0.88rem;
  }

  .dashboard-category-page #homeScreen .toolbar-actions {
    gap: 6px;
  }

  .dashboard-category-page #homeScreen .toolbar-button {
    min-height: 36px;
    padding: 6px;
    border-radius: 10px;
  }

  .dashboard-category-page #homeScreen .toolbar-button__icon {
    width: 16px;
    height: 16px;
    flex-basis: 16px;
  }

  .dashboard-category-page #homeScreen .toolbar-button__icon svg {
    width: 16px;
    height: 16px;
  }

  .dashboard-category-page #homeScreen .toolbar-button__label {
    font-size: 0.68rem;
  }

  .dashboard-category-page .community-modal {
    align-items: stretch;
    padding:
      max(8px, var(--safe-top))
      calc(8px + var(--safe-right))
      calc(8px + var(--safe-bottom))
      calc(8px + var(--safe-left));
  }

  .dashboard-category-page .community-modal__panel {
    max-height: calc(100vh - 16px);
    padding: 10px;
    border-radius: 16px;
  }

  .dashboard-category-page .community-modal__bar {
    align-items: flex-start;
  }

  .dashboard-category-page #homeScreen .category-grid {
    gap: 10px;
  }

  .dashboard-category-page #homeScreen .category-card {
    min-height: 192px;
    padding: 12px 10px;
    border-radius: 16px;
  }

  .dashboard-category-page #homeScreen .category-card__icon {
    width: min(100%, 120px);
  }

  .dashboard-category-page #homeScreen .category-card__title {
    font-size: 0.78rem;
  }
}

@media (max-width: 359px) {
  .dashboard-category-page #homeScreen .toolbar-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-category-page #homeScreen .category-grid {
    grid-template-columns: 1fr;
  }
}
