:root {
  --trh-bg: rgba(7, 17, 31, .97);
  --trh-panel: #0e1a2a;
  --trh-panel-2: #132236;
  --trh-border: rgba(148, 163, 184, .24);
  --trh-text: #f8fafc;
  --trh-muted: #aab8ca;
  --trh-accent: #60a5fa;
  --trh-danger: #fb7185;
  --trh-height: 64px;
}
body.has-treatretreat-header { padding-top: var(--trh-height) !important; }
.treatretreat-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100000;
  min-height: var(--trh-height);
  display: grid;
  grid-template-columns: minmax(210px, auto) minmax(220px, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 8px 16px;
  color: var(--trh-text);
  background: var(--trh-bg);
  border-bottom: 1px solid var(--trh-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .24);
  backdrop-filter: blur(18px);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.treatretreat-header *, .treatretreat-header *::before, .treatretreat-header *::after { box-sizing: border-box; }
.treatretreat-header a { color: inherit; text-decoration: none; }
.trh-brand { display: flex; align-items: center; min-width: 0; gap: 10px; }
.trh-brand img { width: 38px; height: 38px; flex: 0 0 auto; }
.trh-brand-copy { min-width: 0; display: grid; line-height: 1.12; }
.trh-brand-name { font-size: .98rem; letter-spacing: .01em; }
.trh-crumbs { display: flex; min-width: 0; gap: 5px; align-items: center; color: var(--trh-muted); font-size: .73rem; white-space: nowrap; overflow: hidden; }
.trh-crumbs > span { overflow: hidden; text-overflow: ellipsis; }
.trh-crumb-current { color: #dbeafe; }
.trh-crumb-separator { opacity: .55; }
.trh-search { height: 42px; min-width: 180px; max-width: 620px; justify-self: stretch; display: flex; align-items: center; gap: 9px; padding: 0 12px; border: 1px solid var(--trh-border); border-radius: 13px; background: rgba(255,255,255,.055); }
.trh-search:focus-within { border-color: rgba(96,165,250,.7); box-shadow: 0 0 0 3px rgba(96,165,250,.13); }
.trh-search-input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--trh-text); background: transparent; font: inherit; font-size: .88rem; }
.trh-search-input::placeholder { color: #8291a6; }
.trh-search-icon, .trh-control-icon, .trh-icon { width: 19px; height: 19px; flex: 0 0 auto; }
.trh-actions { display: flex; align-items: center; gap: 7px; }
.trh-control {
  position: relative;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 11px;
  color: var(--trh-text);
  border: 1px solid var(--trh-border);
  border-radius: 12px;
  background: rgba(255,255,255,.055);
  cursor: pointer;
  font: inherit;
  font-size: .82rem;
  white-space: nowrap;
}
.trh-control:hover, .trh-control:focus-visible, .trh-menu[open] > .trh-control, .trh-mobile-menu[open] > .trh-control {
  border-color: rgba(96,165,250,.65);
  background: rgba(96,165,250,.12);
  outline: none;
}
.trh-menu, .trh-mobile-menu { position: relative; }
.trh-menu > summary, .trh-mobile-menu > summary { list-style: none; }
.trh-menu > summary::-webkit-details-marker, .trh-mobile-menu > summary::-webkit-details-marker { display: none; }
.trh-apps-panel, .trh-more-panel, .trh-mobile-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(760px, calc(100vw - 24px));
  max-height: min(76vh, 720px);
  overflow: auto;
  color: var(--trh-text);
  background: linear-gradient(180deg, var(--trh-panel-2), var(--trh-panel));
  border: 1px solid var(--trh-border);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0,0,0,.46);
  padding: 15px;
}
.trh-panel-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 3px 10px; font-weight: 700; }
.trh-panel-top small { color: var(--trh-muted); font-weight: 500; }
.trh-app-section + .trh-app-section { margin-top: 14px; }
.trh-app-section h3 { margin: 0 0 7px; color: #c8d5e6; font-size: .72rem; text-transform: uppercase; letter-spacing: .09em; }
.trh-app-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.trh-app-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 36px minmax(0,1fr) 10px;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(148,163,184,.15);
  border-radius: 13px;
  background: rgba(255,255,255,.035);
}
.trh-app-card:hover, .trh-app-card:focus-visible { background: rgba(96,165,250,.11); border-color: rgba(96,165,250,.42); outline: none; }
.trh-app-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: rgba(96,165,250,.13); color: #93c5fd; }
.trh-app-copy { min-width: 0; display: grid; gap: 2px; }
.trh-app-name, .trh-app-description { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trh-app-name { font-size: .84rem; }
.trh-app-description { color: var(--trh-muted); font-size: .7rem; }
.trh-dot { width: 9px; height: 9px; border-radius: 999px; background: #64748b; box-shadow: 0 0 0 3px rgba(100,116,139,.13); }
.trh-dot.up { background: #34d399; box-shadow: 0 0 0 3px rgba(52,211,153,.14); }
.trh-dot.warn { background: #fbbf24; box-shadow: 0 0 0 3px rgba(251,191,36,.14); }
.trh-dot.down { background: #fb7185; box-shadow: 0 0 0 3px rgba(251,113,133,.14); }
.trh-count-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  border: 2px solid #07111f;
  border-radius: 999px;
  background: #f59e0b;
  color: #101827;
  font-size: .65rem;
  font-weight: 800;
}
.trh-count-badge.is-critical { background: var(--trh-danger); color: white; }
.trh-notification-control.has-critical { border-color: rgba(251,113,133,.6); }
.trh-more-panel { width: 270px; display: grid; gap: 7px; }
.trh-menu-link {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  color: var(--trh-text);
  border: 1px solid rgba(148,163,184,.15);
  border-radius: 11px;
  background: rgba(255,255,255,.035);
  text-align: left;
  font: inherit;
  font-size: .83rem;
  cursor: pointer;
}
.trh-menu-link:hover, .trh-menu-link:focus-visible { background: rgba(96,165,250,.12); border-color: rgba(96,165,250,.42); outline: none; }
.trh-empty { padding: 18px; color: var(--trh-muted); text-align: center; }
.trh-mobile-actions { display: none; align-items: center; gap: 7px; }
.trh-icon-only .trh-control-label { display: none; }
.trh-icon-only { width: 42px; padding: 0; }
.trh-mobile-panel { right: -8px; width: min(430px, calc(100vw - 16px)); }
.trh-mobile-panel > .trh-search { margin: 10px 0 14px; max-width: none; }
.trh-mobile-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.trh-mobile-panel .trh-app-grid { grid-template-columns: 1fr; }
@media (max-width: 1180px) {
  .treatretreat-header { grid-template-columns: minmax(180px, auto) minmax(180px,1fr) auto; }
  .trh-control-label { display: none; }
  .trh-control { width: 42px; padding: 0; }
}
@media (max-width: 800px) {
  :root { --trh-height: 58px; }
  .treatretreat-header { grid-template-columns: minmax(0,1fr) auto; gap: 8px; padding: 7px 10px; }
  .treatretreat-header > .trh-search, .trh-desktop-actions { display: none; }
  .trh-mobile-actions { display: flex; }
  .trh-brand img { width: 34px; height: 34px; }
  .trh-brand-name { font-size: .9rem; }
  .trh-crumbs { font-size: .67rem; }
  .trh-apps-panel { position: static; width: 100%; max-height: none; border: 0; box-shadow: none; padding: 0; background: transparent; }
}
@media (max-width: 430px) {
  .trh-mode-control { display: none; }
  .trh-brand-copy { max-width: 180px; }
  .trh-mobile-panel { max-height: calc(100vh - 72px); }
}
