/* shell.css — sidebar + page-header + log-line layout primitives.
   Depends on tokens.css. */

/* ────────── Sidebar ────────── */
.ot-sidebar {
  width: 232px;
  flex-shrink: 0;
  background: var(--ot-sidebar-bg);
  border-right: 1px solid var(--ot-sidebar-border);
  color: var(--ot-sidebar-text);
  font-family: var(--ot-font-sans);
  font-size: 13px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ot-sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  padding: 0 16px;
  border-bottom: 1px solid var(--ot-divider);
  font-weight: 700;
  font-size: 15px;
  color: var(--ot-text);
  letter-spacing: -0.01em;
}
.ot-sidebar-logo-mark {
  width: 24px;
  height: 24px;
  border-radius: var(--ot-radius-sm);
  background: var(--ot-primary);
  color: var(--ot-text-inverse);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
}

.ot-sidebar-nav {
  flex: 1;
  padding: 8px 0;
  overflow-y: auto;
}

.ot-sidebar-section + .ot-sidebar-section { margin-top: 4px; }

.ot-sidebar-section-header {
  all: unset;
  box-sizing: border-box;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 6px;
  color: var(--ot-sidebar-text-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
}
.ot-sidebar-section-header:hover { color: var(--ot-text-3); }
.ot-sidebar-section-header:focus-visible {
  outline: none;
  box-shadow: var(--ot-shadow-focus);
  border-radius: var(--ot-radius-sm);
}
.ot-sidebar-section-chevron {
  width: 12px;
  height: 12px;
  transition: transform 0.14s ease;
  flex-shrink: 0;
}
.ot-sidebar-section-header[aria-expanded="false"] .ot-sidebar-section-chevron {
  transform: rotate(-90deg);
}

.ot-sidebar-section-links[hidden] { display: none; }

.ot-sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  margin: 1px 8px;
  border-radius: var(--ot-radius-md);
  color: var(--ot-sidebar-text);
  text-decoration: none;
  font-size: 13px;
  transition: background 0.1s, color 0.1s;
}
.ot-sidebar-link:hover {
  background: var(--ot-sidebar-hover-bg);
  color: var(--ot-text);
}
.ot-sidebar-link.active {
  background: var(--ot-sidebar-active-bg);
  color: var(--ot-sidebar-active-text);
  font-weight: 500;
}
.ot-sidebar-link-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.75;
}
.ot-sidebar-link.active .ot-sidebar-link-icon { opacity: 1; }

.ot-sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--ot-divider);
}
.ot-sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ot-sidebar-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--ot-primary-soft);
  color: var(--ot-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  flex-shrink: 0;
}
.ot-sidebar-user-meta { min-width: 0; flex: 1; }
.ot-sidebar-user-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--ot-text);
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ot-sidebar-user-logout {
  font-size: 11px;
  color: var(--ot-text-3);
  text-decoration: none;
}
.ot-sidebar-user-logout:hover { color: var(--ot-text); text-decoration: underline; }

/* ────────── Page header ────────── */
.ot-page-header {
  padding: 20px 24px 16px;
  background: var(--ot-bg);
}
.ot-page-crumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ot-text-3);
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.ot-page-crumb { font-family: var(--ot-font-sans); }
.ot-page-crumb:not(:last-child)::after {
  content: "/";
  margin-left: 6px;
  color: var(--ot-text-4);
}
.ot-page-crumb:last-child { color: var(--ot-text-2); font-weight: 500; }
.ot-page-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.ot-page-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ot-text);
  margin: 0;
}
.ot-page-title-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
  font-weight: 400;
  font-size: 14px;
  color: var(--ot-text-2);
}
.ot-page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ────────── Realtime indicator (static, non-SSE) ────────── */
.ot-realtime-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ot-text-3);
}
.ot-realtime-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--ot-text-4);
}

/* ────────── Log line (used by inspector detail) ────────── */
.ot-log-line {
  display: flex;
  gap: 8px;
  padding: 2px 0;
  font-family: var(--ot-font-mono);
  font-size: 12px;
  line-height: 1.45;
  color: var(--ot-text-2);
}
.ot-log-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  flex-shrink: 0;
  margin-top: 7px;
  background: var(--ot-text-4);
}
.ot-log-ts    { color: var(--ot-text-4); white-space: nowrap; flex-shrink: 0; }
.ot-log-level { width: 48px; font-weight: 700; flex-shrink: 0; }
.ot-log-logger {
  width: 220px;
  color: var(--ot-text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}
.ot-log-msg { word-break: break-word; }

.ot-log-line-info   .ot-log-dot   { background: var(--ot-info); }
.ot-log-line-info   .ot-log-level { color: var(--ot-info); }
.ot-log-line-warn   .ot-log-dot   { background: var(--ot-warning); }
.ot-log-line-warn   .ot-log-level { color: var(--ot-warning); }
.ot-log-line-warn   .ot-log-msg   { color: var(--ot-warning); }
.ot-log-line-error  .ot-log-dot   { background: var(--ot-danger); }
.ot-log-line-error  .ot-log-level { color: var(--ot-danger); }
.ot-log-line-error  .ot-log-msg   { color: var(--ot-danger); }
.ot-log-line-debug  .ot-log-dot   { background: var(--ot-text-4); }
.ot-log-line-debug  .ot-log-level { color: var(--ot-text-4); }
