/* Dialer 360 shared chrome — all inner portals */
.d360-shell {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1400;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px 0 18px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid #e5e5e0;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  font-family: Inter, "DM Sans", system-ui, sans-serif;
  box-sizing: border-box;
}

.d360-shell *,
.d360-shell *::before,
.d360-shell *::after {
  box-sizing: border-box;
}

body.d360-has-shell {
  padding-top: 52px !important;
}

body.d360-has-shell .sidebar {
  top: 52px !important;
  height: calc(100vh - 52px) !important;
}

body.d360-has-shell .sidebar-mobile-toggle {
  top: calc(1rem + 52px) !important;
}

.d360-shell__left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.d360-shell__brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #171717;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.d360-shell__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f5c400;
  box-shadow: 0 0 0 4px rgba(245, 196, 0, 0.18);
  flex-shrink: 0;
}

.d360-shell__rule {
  width: 1px;
  height: 18px;
  background: #e5e5e0;
  flex-shrink: 0;
}

.d360-shell__portal {
  font-size: 13px;
  font-weight: 700;
  color: #171717;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.d360-shell__right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.d360-shell__clock {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid #e5e5e0;
  background: #f5f5f3;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.d360-shell__clock-day {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #b8860b;
}

.d360-shell__clock-date {
  font-size: 11.5px;
  font-weight: 600;
  color: #6b6b6b;
}

.d360-shell__clock-time {
  font-size: 12.5px;
  font-weight: 800;
  color: #171717;
}

.d360-shell__pkt {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 2px 6px;
  border-radius: 999px;
  background: #f5c400;
  color: #171717;
}

.d360-shell__home,
.d360-shell__theme {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid #e5e5e0;
  background: #ffffff;
  color: #171717;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
}

.d360-shell__home:hover,
.d360-shell__theme:hover {
  border-color: #f5c400;
  color: #171717;
}

html[data-theme="dark"] .d360-shell {
  background: rgba(11, 14, 20, 0.94);
  border-bottom-color: #2a2f3a;
}

html[data-theme="dark"] .d360-shell__brand,
html[data-theme="dark"] .d360-shell__portal,
html[data-theme="dark"] .d360-shell__clock-time,
html[data-theme="dark"] .d360-shell__home,
html[data-theme="dark"] .d360-shell__theme {
  color: #ffffff;
}

html[data-theme="dark"] .d360-shell__rule,
html[data-theme="dark"] .d360-shell__clock,
html[data-theme="dark"] .d360-shell__home,
html[data-theme="dark"] .d360-shell__theme {
  border-color: #2a2f3a;
}

html[data-theme="dark"] .d360-shell__rule {
  background: #2a2f3a;
  border: 0;
}

html[data-theme="dark"] .d360-shell__clock,
html[data-theme="dark"] .d360-shell__home,
html[data-theme="dark"] .d360-shell__theme {
  background: #16181d;
}

html[data-theme="dark"] .d360-shell__clock-day {
  color: #f5c400;
}

html[data-theme="dark"] .d360-shell__clock-date {
  color: #b0b4be;
}

html[data-theme="dark"] .d360-shell__home:hover,
html[data-theme="dark"] .d360-shell__theme:hover {
  border-color: #f5c400;
  background: #2a2400;
  color: #f5c400;
}

@media (max-width: 820px) {
  .d360-shell__clock-day,
  .d360-shell__clock-date,
  .d360-shell__brand span {
    display: none;
  }
  .d360-shell__portal {
    max-width: 42vw;
  }
}

@media (max-width: 560px) {
  .d360-shell__clock {
    display: none;
  }
  .d360-shell__home span {
    display: none;
  }
}

/* Offset inner sticky/fixed chrome so it sits under the shared bar */
body.d360-has-shell .top-nav,
body.d360-has-shell .nav-premium {
  top: 52px !important;
}

body.d360-has-shell .ic-shell aside {
  top: 52px !important;
  height: calc(100vh - 52px) !important;
}

body.d360-has-shell .mobile-menu-button {
  top: calc(1rem + 52px) !important;
}

/* Inner portals already have a Portal selector control — keep one in the shell */
body.d360-has-shell .aup-portal-hub-btn,
body.d360-has-shell .top-nav-link[href="/"],
body.d360-has-shell .pg-plf-nav-btn[href="/"],
body.d360-has-shell .nav-premium a[href="/"],
body.d360-has-shell .ic-shell a[href="/"],
body.d360-has-shell .sidebar-item:has(> a.sidebar-link[href="/"]) {
  display: none !important;
}
