/* 2026-08-12 category sidebar + print-only comment workspace. */
body:not(.mobile-mode) #app-shell {
  grid-template-columns: 252px minmax(0, 1fr);
}

/* Status strip and dense comment-list refinement. */
#comments-view .comments-health-strip {
  display: grid;
  grid-template-columns: minmax(240px, 1.25fr) minmax(220px, 1fr) minmax(220px, 1fr);
  gap: 10px;
  margin: 0 0 14px;
}

#comments-view .comments-health-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 66px;
  padding: 10px 13px;
  border: 1px solid rgba(211, 162, 76, .14);
  border-radius: 14px;
  background: linear-gradient(180deg, #171b21, #13171c);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .08);
}

#comments-view .comments-health-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: rgba(211, 162, 76, .11);
  color: #e2b75f;
  font-size: 17px;
}

#comments-view .comments-health-source {
  color: #51d195;
  background: rgba(62, 172, 116, .11);
}

#comments-view .comments-health-bridge {
  color: #67bee8;
  background: rgba(70, 157, 203, .11);
}

#comments-view .comments-health-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

#comments-view .comments-health-copy small {
  color: #909cab;
  font-size: 11px;
  letter-spacing: .05em;
}

#comments-view .comments-health-copy strong {
  overflow: hidden;
  color: #ede5d9;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#comments-view .comments-health-detail {
  max-width: 190px;
  color: #8f9aa8;
  font-size: 10px;
  line-height: 1.35;
  text-align: right;
}

#comments-view .comments-health-card #bridge-control,
#comments-view .comments-health-card #print-status {
  justify-self: end;
  margin: 0;
  white-space: nowrap;
}

#comments-view .comments-health-card #bridge-indicator,
#comments-view .comments-health-card #print-status {
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(211, 162, 76, .16);
  border-radius: 999px;
  background: rgba(211, 162, 76, .07);
  color: #d7bd8d;
  font-size: 11px;
}

#comments-view .status-row {
  min-height: 30px;
  padding-bottom: 8px;
}

#comments-view .platform-filter-row {
  padding: 8px 0 12px;
  border-top: 1px solid rgba(211, 162, 76, .09);
  border-bottom: 1px solid rgba(211, 162, 76, .12);
}

@media (max-width: 980px) {
  #comments-view .comments-health-strip {
    grid-template-columns: 1fr 1fr;
  }

  #comments-view .comments-health-card:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  #comments-view .comments-health-strip {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  #comments-view .comments-health-card {
    grid-template-columns: 32px minmax(0, 1fr);
    min-height: 58px;
    padding: 9px 10px;
  }

  #comments-view .comments-health-card:first-child {
    display: none;
  }

  #comments-view .comments-health-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    font-size: 14px;
  }

  #comments-view .comments-health-card #bridge-control,
  #comments-view .comments-health-card #print-status {
    grid-column: 1 / -1;
    justify-self: stretch;
  }

  #comments-view .comments-health-card #bridge-indicator,
  #comments-view .comments-health-card #print-status {
    display: block;
    overflow: hidden;
    width: 100%;
    padding: 5px 8px;
    text-align: center;
    text-overflow: ellipsis;
  }

}

body:not(.mobile-mode) #app-shell.sidebar-collapsed {
  grid-template-columns: 0 minmax(0, 1fr);
}

body:not(.mobile-mode) #app-shell.sidebar-collapsed .sidebar {
  width: 0 !important;
  min-width: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  overflow: hidden;
  border-right: 0;
}

body:not(.mobile-mode) #app-shell.sidebar-collapsed .sidebar > * {
  visibility: hidden;
  pointer-events: none;
}

.sidebar-reopen-btn {
  position: fixed;
  z-index: 80;
  top: 14px;
  right: 16px;
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(211, 162, 76, .28);
  border-radius: 11px;
  background: #171a1f;
  color: #d9aa50;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .24);
  cursor: pointer;
}

.sidebar-reopen-btn:hover {
  border-color: rgba(232, 187, 99, .5);
  background: #1d2026;
  color: #f0c670;
}

body:not(.mobile-mode) #app-shell.sidebar-collapsed .sidebar-reopen-btn {
  display: inline-flex;
}

.sidebar-brand {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  column-gap: 12px;
  align-items: center;
}

.sidebar-brand-mark {
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 50%;
  filter: drop-shadow(0 5px 14px rgba(190, 137, 40, .18));
}

.sidebar-brand .sidebar-kicker,
.sidebar-brand h2 {
  grid-column: 2;
  min-width: 0;
}

.sidebar-brand .sidebar-kicker {
  align-self: end;
  margin: 0;
  line-height: 1.25;
}

.sidebar-brand h2 {
  align-self: start;
  margin: 2px 0 0;
}

.sidebar-nav {
  display: flex !important;
  flex-direction: column;
  gap: 4px !important;
  overflow-y: auto;
  padding-right: 3px;
}

.sidebar-nav {
  scrollbar-width: thin;
  scrollbar-color: rgba(200, 154, 70, .45) transparent;
}

.sidebar-nav::-webkit-scrollbar {
  width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(200, 154, 70, .34);
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(222, 175, 88, .52);
}

.nav-group-label {
  margin: 16px 10px 5px;
  padding-top: 13px;
  border-top: 1px solid rgba(211, 162, 76, .16);
  color: #c89a46;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
  line-height: 1;
}

.nav-group-label:first-of-type {
  margin-top: 2px;
  padding-top: 0;
  border-top: 0;
}

.sidebar-nav .nav-item {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 9px 12px !important;
  font-size: 15px;
  line-height: 1.25;
}

.sidebar-nav .nav-item .ui-icon {
  width: 19px;
  height: 19px;
}

.nav-group-live { order: 10; }
#nav-comments { order: 11; }
#nav-lottery { order: 12; }
.nav-group-orders { order: 20; }
#nav-products { order: 21; }
#nav-trends { order: 22; }
#open-qr-btn { order: 23; }
#nav-customers { order: 24; }
.nav-group-platforms { order: 30; }
#nav-facebook-pages { order: 31; }
#nav-facebook-message-settings { order: 32; }
#nav-tiktok-settings { order: 33; }
.sidebar-nav .nav-item.disabled { order: 34; }

.sidebar.collapsed .nav-group-label,
.sidebar.collapsed .sidebar-brand-mark {
  display: none;
}

#comments-view {
  width: 100%;
  max-width: none;
}

#comments-view .comments-page-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 6px 0 14px;
}

#comments-view .comments-page-intro h1 {
  margin: 0;
  color: #f5ead6;
  font-size: clamp(28px, 2.2vw, 38px);
  line-height: 1.08;
  letter-spacing: -.02em;
}

#comments-view .comments-page-focus {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 150px;
  padding: 10px 13px;
  border: 1px solid rgba(211, 162, 76, .18);
  border-radius: 12px;
  background: #15191f;
  color: #ead3a3;
}

#comments-view .comments-page-focus-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: rgba(211, 162, 76, .12);
  color: #d7a84f;
}

#comments-view .comments-page-focus span:last-child {
  display: grid;
  gap: 1px;
}

#comments-view .comments-page-focus strong {
  font-size: 13px;
}

#comments-view .comments-page-focus small {
  color: #8e99a8;
  font-size: 11px;
}

#comments-view .content-card {
  width: 100%;
  min-height: 420px;
}

#comments-view .comment-card {
  grid-template-columns: minmax(0, 1fr) minmax(132px, max-content) !important;
  padding: 13px 14px !important;
}

#comments-view .comment-user,
#comments-view .comment-text {
  font-size: 14px !important;
}

#comments-view .order-btn,
#comments-view .comment-badge.status-failed {
  min-height: 36px !important;
  padding: 7px 14px !important;
  font-size: 13px !important;
}

@media (max-width: 980px) {
  #comments-view .comments-page-focus {
    min-width: 0;
  }
}

@media (max-width: 760px) {
  .sidebar-reopen-btn {
    display: none !important;
  }
  #app-shell,
  #app-shell.sidebar-collapsed {
    display: block !important;
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100% !important;
  }

  #app-shell .sidebar {
    display: none !important;
  }

  #app-shell .main-panel {
    display: block;
    width: 100% !important;
    min-width: 0 !important;
  }

  #comments-view .comments-page-intro {
    display: block;
    padding: 4px 0 14px;
  }

  #comments-view .comments-page-focus {
    display: none;
  }

  #comments-view .comments-page-intro h1 {
    font-size: 28px;
  }

  #comments-view .comment-card {
    grid-template-columns: minmax(0, 1fr) max-content !important;
    padding: 11px 8px !important;
  }
}
