/* Shared kconsole shell — kgilles-style fixed header + header auth slot */
:root {
  --site-header-h: 4.5rem;
  --console-brand: #4338ca;
}

body.shell-has-header {
  padding-top: var(--site-header-h);
  padding-bottom: 2.75rem;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1100;
  background: #fff;
  border-bottom: 1px solid #d8deea;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-sizing: border-box;
  min-height: var(--site-header-h);
  overflow: visible;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
}

.site-brand img {
  width: 48px;
  height: 48px;
  pointer-events: none;
}

.site-brand .site-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-shrink: 0;
  overflow: visible;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav a {
  color: var(--console-brand);
  text-decoration: none;
  font-size: 0.9rem;
  white-space: nowrap;
}

.site-nav a.active {
  font-weight: 600;
  text-decoration: underline;
}

.header-auth {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
  overflow: visible;
}

.header-auth-slot {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  min-width: 4.5rem;
  min-height: 2.25rem;
  overflow: visible;
  position: relative;
  z-index: 2;
}

.header-auth .status {
  font-size: 0.875rem;
  color: #5c6378;
  white-space: nowrap;
}

.header-auth .logout {
  font-size: 0.875rem;
  color: var(--console-brand);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  white-space: nowrap;
}

.shell-main.shell-locked {
  visibility: hidden;
  pointer-events: none;
  min-height: 40vh;
}

.auth-gate {
  max-width: 36rem;
  margin: 3rem auto;
  padding: 1.5rem;
  text-align: center;
  color: #5c6378;
  font-size: 1rem;
  line-height: 1.5;
}

.auth-gate.hidden {
  display: none;
}

.kdevice-shell-wrap {
  flex-shrink: 0;
}

.kdevice-shell-counters {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem 0.65rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #f8fafc;
  color: #1e293b;
  text-decoration: none;
  font-size: 0.75rem;
  line-height: 1.2;
  white-space: nowrap;
}

.kdevice-shell-counters:hover {
  background: #eff6ff;
  border-color: #93c5fd;
}

.kdevice-shell-tag {
  font-weight: 700;
  font-size: 0.6875rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #4338ca;
}

.kdevice-shell-counter strong {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.kdevice-shell-counter--connected strong {
  color: #4338ca;
}

.kdevice-shell-counter--idle strong {
  color: #16a34a;
}

@media (max-width: 960px) {
  .kdevice-shell-wrap {
    display: none;
  }
}

.site-footer-frame {
  position: fixed;
  z-index: 80;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 40px;
  border: 0;
  background: #fff;
  display: block;
}
