/* App shell: sidebar groups, header controls, view-mode banner */

.sidebar--skydns {
  background: var(--color-surface-sidebar);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--color-text-on-brand);
}

.sidebar--skydns .sidebar-logo {
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar--skydns .nav-section-label {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  padding: 14px 16px 6px;
}

.sidebar--skydns .nav-item {
  color: rgba(255, 255, 255, 0.82);
  border-radius: var(--radius-sm);
  margin: 2px 10px;
  font-family: var(--font-body);
  font-size: 0.92rem;
}

.sidebar--skydns .nav-item svg {
  opacity: 0.85;
}

.sidebar--skydns .nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.sidebar--skydns .nav-item.active {
  background: rgba(70, 157, 241, 0.22);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--color-brand-accent);
}

.sidebar--skydns .sidebar-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
}

.sidebar--skydns .sidebar-footer a {
  color: rgba(255, 255, 255, 0.65);
}

.top-header--skydns {
  background: var(--color-surface-header);
  border-bottom: 1px solid var(--color-border);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.header-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.header-icon-btn:hover {
  background: var(--color-surface-muted);
  color: var(--color-text-primary);
}

.header-eball-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 10px 0 8px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-primary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.header-eball-chip:hover {
  background: var(--color-surface-muted);
  border-color: #c9a227;
}

.header-eball-icon {
  flex-shrink: 0;
}

.header-eball-value {
  min-width: 1.5rem;
  text-align: right;
}

.portal-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
  background: var(--color-surface-muted);
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--color-text-secondary);
}

.portal-toggle-label {
  padding: 0 6px 0 8px;
  white-space: nowrap;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portal-switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.portal-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.portal-switch-track {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-pill);
  background: var(--color-border-strong);
  cursor: pointer;
  transition: background 0.2s ease;
}

.portal-switch-track::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease;
}

.portal-switch input:checked + .portal-switch-track {
  background: var(--color-brand-primary);
}

.portal-switch input:checked + .portal-switch-track::after {
  transform: translateX(20px);
}

.portal-switch input:focus-visible + .portal-switch-track {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.employee-view-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  background: var(--color-surface-muted);
  border-bottom: 1px solid var(--color-border);
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--color-text-secondary);
}

.employee-view-banner strong {
  color: var(--color-text-primary);
  font-weight: 500;
}

.employee-view-banner .btn-link {
  font-size: 0.85rem;
  font-weight: 500;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--color-brand-primary);
  font-family: inherit;
}

.page-title,
.feed-page-title {
  font-family: var(--font-heading);
  font-weight: var(--font-weight-heading);
  letter-spacing: -0.01em;
}

.feed-form-shell .rich-editor-mount .ql-editor {
  min-height: 260px;
}

.feed-form-shell .ql-container.ql-snow {
  border-color: var(--color-border);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  background: var(--color-surface);
}

.feed-form-shell .ql-toolbar.ql-snow {
  border-color: var(--color-border);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  background: var(--color-surface-muted);
}

.feed-author--iris {
  align-items: center;
  gap: 14px;
}

.feed-author--iris .feed-author-name {
  font-family: var(--font-heading, "Play", serif);
}

.feed-author-avatar--iris {
  width: 72px;
  height: 72px;
  min-width: 72px;
  min-height: 72px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  flex-shrink: 0;
  display: block;
  border: 1px solid var(--border);
  background: var(--surface);
}

@media (max-width: 640px) {
  .feed-author-avatar--iris {
    width: 56px;
    height: 56px;
    min-width: 56px;
    min-height: 56px;
  }
}

.header-notifications-wrap {
  position: relative;
}

.header-notifications-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--brand-primary, #204ab2);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  line-height: 16px;
  text-align: center;
}

.notifications-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(360px, 92vw);
  max-height: 420px;
  overflow: auto;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 12px);
  box-shadow: var(--shadow-md, 0 8px 24px rgb(0 0 0 / 12%));
  z-index: 200;
  padding: 0.75rem 0;
}

.notifications-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem 0.5rem;
  border-bottom: 1px solid var(--border);
}

.notifications-panel__title {
  font-weight: 600;
  color: var(--text-primary);
}

.notifications-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.notifications-item__link {
  display: block;
  padding: 0.65rem 1rem;
  text-decoration: none;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
}

.notifications-item--unread .notifications-item__link {
  background: color-mix(in srgb, var(--brand-primary) 6%, transparent);
}

.notifications-item__title {
  display: block;
  font-weight: 500;
  font-size: 0.875rem;
}

.notifications-item__body {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.15rem;
}

.notifications-item__time {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.notifications-panel__all {
  display: block;
  padding: 0.65rem 1rem;
  font-size: 0.85rem;
  text-align: center;
}

@media (max-width: 960px) {
  .portal-toggle-label--hide-mobile {
    display: none;
  }
  .header-actions {
    gap: 6px;
  }
}
