.shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  background: var(--surface-sunken);
  border-right: 1px solid var(--border);
  padding: 14px 10px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 8px 16px;
}

.sidebar-brand-mark {
  width: 26px;
  height: 26px;
  display: flex;
  flex: none;
}

.sidebar-brand-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 32px;
  padding: 0 9px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.nav-link .icon {
  color: var(--text-tertiary);
}

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

.nav-link.active {
  background: var(--accent-soft);
  color: var(--text-on-accent-soft);
}

.nav-link.active .icon {
  color: var(--text-on-accent-soft);
}

.sidebar-spacer {
  flex: 1;
}

.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 8px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

.sidebar-user {
  flex: 1;
  min-width: 0;
}

.sidebar-user-name {
  font-size: var(--text-sm);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-tertiary);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-tertiary);
  flex: none;
}

.status-dot-ok {
  background: var(--success);
}

.status-dot-bad {
  background: var(--danger);
}

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  flex: none;
}

.view-title {
  font-size: var(--text-lg);
  font-weight: 600;
}

.view-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.view-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px;
}

@media (max-width: 860px) {
  .shell {
    grid-template-columns: 1fr;
    height: auto;
  }

  .page {
    padding: 16px;
  }

  .sidebar {
    flex-direction: row;
    align-items: center;
    border-right: none;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
  }

  .sidebar-brand {
    padding: 6px 8px 6px 4px;
  }

  .sidebar-brand-name {
    display: none;
  }

  .sidebar-nav {
    flex-direction: row;
    flex: 1;
    justify-content: center;
  }

  .nav-link span {
    display: none;
  }

  .nav-link {
    width: 34px;
    justify-content: center;
    padding: 0;
  }

  .sidebar-footer {
    border-top: none;
    margin-top: 0;
  }

  .sidebar-user,
  .sidebar-footer .avatar {
    display: none;
  }

  .main {
    height: auto;
  }

  .view-body {
    overflow: visible;
  }
}

/* --- shell content wrapper (used when a trial note sits above the outlet) --- */

.shell-content {
  min-width: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.shell-content .main {
  flex: 1;
  height: auto;
  min-height: 0;
}


@media (max-width: 720px) {
  .shell-content { height: auto; }
}

/* --- slim trial strip above the outlet --- */

.trial-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-secondary);
}
.trial-strip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f59e0b;
  flex-shrink: 0;
}
.trial-strip-text {
  flex: 1;
  min-width: 0;
}
.trial-strip .btn {
  flex-shrink: 0;
}
@media (max-width: 640px) {
  .trial-strip { flex-wrap: wrap; }
  .trial-strip-text { flex-basis: 100%; }
}
