.operator-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100dvh;
  background: var(--canvas);
}

.operator-sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  padding: 10px 10px 16px;
  border-right: 1px solid var(--border);
  background: var(--sidebar);
}

.operator-brand {
  display: flex;
  align-items: center;
  height: 46px;
  gap: 10px;
  padding: 0 8px;
  color: var(--text);
  text-decoration: none;
}

.operator-brand > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  background: var(--surface-raised);
  color: var(--text);
  font-size: 11px;
  font-weight: 750;
}

.operator-brand > strong {
  font-size: 14px;
  font-weight: 650;
}

.operator-sidebar nav {
  display: grid;
  gap: 3px;
  margin-top: 12px;
}

.operator-nav {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  min-width: 0;
  height: 44px;
  gap: 8px;
  padding: 0 10px;
  border-radius: var(--radius);
  color: var(--text-secondary);
  text-decoration: none;
}

.operator-nav:hover {
  background: var(--surface);
  color: var(--text);
}

.operator-nav.active {
  background: var(--surface-selected);
  color: var(--text);
}

.operator-nav:active,
.icon-button:active {
  transform: translateY(1px);
}

.operator-nav span {
  overflow: hidden;
  font-size: 14px;
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operator-icon {
  display: block;
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.operator-main {
  min-width: 0;
}

.operator-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--topbar-height);
  padding: 0 20px 0 24px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--canvas) 92%, transparent);
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
}

.operator-topbar > strong {
  font-size: 14px;
  font-weight: 650;
}

.operator-utilities {
  display: flex;
  align-items: center;
  gap: 4px;
}

.operator-shortcuts {
  display: flex;
  align-items: center;
  gap: 2px;
}

.operator-shortcuts a {
  min-height: 32px;
  padding: 0 8px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 12px;
  text-decoration: none;
}

.operator-shortcuts a:hover {
  background: var(--surface-raised);
  color: var(--text);
}

.icon-button {
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  list-style: none;
}

.icon-button:hover {
  background: var(--surface-raised);
  color: var(--text);
}

.operator-menu {
  position: relative;
}

.operator-menu summary::-webkit-details-marker {
  display: none;
}

.operator-menu[open] > summary {
  background: var(--surface-raised);
  color: var(--text);
}

.operator-menu > div {
  position: absolute;
  top: 42px;
  right: 0;
  width: 152px;
  padding: 5px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.24);
}

.operator-account-email {
  display: block;
  overflow: hidden;
  padding: 7px 10px;
  color: var(--text-tertiary);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operator-menu a {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 6px;
  color: var(--text);
  font-size: 13px;
  text-decoration: none;
}

.operator-menu button {
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  text-align: left;
}

.operator-menu button:hover {
  background: var(--surface-raised);
}

.operator-menu a:hover {
  background: var(--surface-raised);
}

#operatorView {
  min-width: 0;
  min-height: calc(100dvh - var(--topbar-height));
}

.operator-loading {
  display: grid;
  min-height: calc(100dvh - var(--topbar-height));
  place-items: center;
  color: var(--text-secondary);
  font-size: 13px;
}

#operatorToast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 30;
  pointer-events: none;
}

.operator-auth {
  display: grid;
  min-height: 100dvh;
  padding: 24px;
  place-items: center;
  background: var(--canvas);
}

.operator-auth-card {
  width: min(100%, 380px);
  padding: 28px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
}

.operator-auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 14px;
  text-decoration: none;
}

.operator-auth-brand > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  background: var(--surface-raised);
  font-size: 11px;
  font-weight: 750;
}

.operator-auth h1 {
  margin: 24px 0 6px;
  color: var(--text);
  font-size: 22px;
  line-height: 1.2;
}

.operator-auth p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
}

.operator-auth form {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.operator-auth label {
  display: grid;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 12px;
}

.operator-auth input {
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--canvas);
  color: var(--text);
  font: inherit;
}

.operator-auth button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-contrast);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
}

.operator-auth button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.operator-auth-error {
  margin-top: 16px;
  padding: 10px;
  border: 1px solid var(--danger-border, var(--border-strong));
  border-radius: 6px;
  background: var(--danger-surface, var(--surface-raised));
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
}

@media (prefers-reduced-transparency: reduce) {
  .operator-topbar {
    background: var(--canvas);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
