:root {
  color-scheme: light;
  font-family: Inter, "SF Pro Text", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-subtle: #f8f9fa;
  --sidebar: #171a1f;
  --sidebar-hover: #242931;
  --sidebar-active: #303741;
  --text: #20242a;
  --text-muted: #6a717b;
  --text-faint: #9298a1;
  --border: #dfe2e6;
  --border-strong: #cbd0d6;
  --accent: #176b5b;
  --accent-hover: #10594c;
  --accent-soft: #e8f3f0;
  --blue: #2769a7;
  --blue-soft: #eaf2f8;
  --warning: #a35f0b;
  --warning-soft: #fff3df;
  --danger: #b4232d;
  --danger-soft: #fcebed;
  --success: #18794e;
  --success-soft: #e8f5ee;
  --shadow-modal: 0 24px 70px rgba(14, 18, 22, 0.24);
  --sidebar-width: 272px;
  --topbar-height: 76px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button,
select {
  cursor: pointer;
}

button:disabled,
select:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(23, 107, 91, 0.2);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

.sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-width);
  height: 100vh;
  overflow: hidden;
  background: var(--sidebar);
  color: #f6f7f8;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--topbar-height);
  padding: 0 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-logo {
  display: block;
  width: 34px;
  height: 34px;
  border-radius: 6px;
}

.brand div {
  display: grid;
  gap: 2px;
}

.brand strong {
  font-size: 16px;
  line-height: 1.2;
}

.brand span:last-child {
  color: #99a1ab;
  font-size: 11px;
}

.sidebar-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 18px 10px;
  color: #929ba6;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.sidebar-heading-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sidebar-manage-button {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #929ba6;
}

.sidebar-manage-button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  color: #e4e7ea;
}

.sidebar-manage-button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.sidebar-manage-button svg {
  width: 15px;
  height: 15px;
}

.count-badge {
  display: inline-flex;
  min-width: 22px;
  height: 20px;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #c4c9cf;
  font-size: 11px;
}

.project-list {
  display: grid;
  gap: 3px;
  padding: 0 10px;
  overflow-y: auto;
}

.project-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 28px;
  align-items: center;
  width: 100%;
  min-height: 58px;
  padding: 7px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #e8eaed;
  text-align: left;
}

.project-item:hover {
  background: var(--sidebar-hover);
}

.project-item.active {
  background: var(--sidebar-active);
}

.project-avatar {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 5px;
  background: #374047;
  color: #f5f7f8;
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.project-item.active .project-avatar {
  background: #dcebe7;
  color: #145c4e;
}

.project-copy {
  min-width: 0;
  padding: 0 9px;
}

.project-copy strong,
.project-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-copy strong {
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 650;
}

.project-copy span {
  color: #929ba6;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 10px;
}

.project-chevron {
  color: #737d88;
}

.sidebar-empty {
  display: grid;
  gap: 4px;
  padding: 14px 18px;
  color: #8f98a3;
  text-align: center;
}

.sidebar-empty p {
  margin: 0;
  color: #c6cbd1;
  font-size: 13px;
}

.sidebar-empty span {
  font-size: 11px;
}

.sidebar-footer {
  margin-top: auto;
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-footer p {
  margin: 10px 0 0;
  color: #78818c;
  font-size: 10px;
  text-align: center;
}

.sidebar .button-primary {
  border-color: #f1f4f3;
  background: #f1f4f3;
  color: #171a1f;
}

.sidebar .button-primary:hover {
  background: #ffffff;
}

.sidebar-close,
.mobile-menu,
.sidebar-scrim {
  display: none;
}

.workspace {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  min-height: var(--topbar-height);
  align-items: center;
  gap: 16px;
  padding: 12px 28px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.96);
}

.project-title {
  min-width: 0;
}

.title-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.project-title h1 {
  overflow: hidden;
  margin: 0;
  color: #1b1f24;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-title p {
  overflow: hidden;
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-actions {
  display: flex;
  gap: 7px;
  margin-left: auto;
}

.status-pill {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-subtle);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 650;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #98a0aa;
}

.status-online {
  border-color: #bfe0cf;
  background: var(--success-soft);
  color: var(--success);
}

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

.status-loading {
  border-color: #c7d8e8;
  background: var(--blue-soft);
  color: var(--blue);
}

.status-loading .status-dot {
  background: var(--blue);
}

.status-error {
  border-color: #f0c5ca;
  background: var(--danger-soft);
  color: var(--danger);
}

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

.content {
  width: 100%;
  max-width: 1540px;
  margin: 0 auto;
  padding: 24px 28px 40px;
}

.welcome-state {
  display: flex;
  min-height: calc(100vh - var(--topbar-height) - 64px);
  max-width: 560px;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  margin: 0 auto;
}

.welcome-visual {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  margin-bottom: 24px;
  border: 1px solid #cbd8d4;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
}

.welcome-visual svg {
  width: 30px;
  height: 30px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.welcome-state h2 {
  margin: 0;
  font-size: 30px;
  font-weight: 720;
  line-height: 1.25;
}

.welcome-state > p:not(.eyebrow) {
  max-width: 520px;
  margin: 13px 0 24px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
}

.filter-bar {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 16px;
}

.field {
  display: grid;
  gap: 7px;
}

.field > span:first-child {
  color: #4d545d;
  font-size: 12px;
  font-weight: 650;
}

.field em {
  color: var(--danger);
  font-size: 10px;
  font-style: normal;
}

.field small {
  color: var(--text-faint);
  font-size: 11px;
  line-height: 1.45;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  background: var(--surface);
  color: var(--text);
  outline: 0;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: #aeb5bd;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
}

.field textarea {
  min-height: 78px;
  resize: vertical;
}

.compact-field {
  min-width: 172px;
}

.compact-field select {
  min-height: 38px;
  padding-right: 30px;
}

.page-size-field {
  min-width: 126px;
}

.query-button {
  min-width: 108px;
  flex: 0 0 auto;
}

.filter-meta {
  margin: 0 0 10px auto;
  color: var(--text-faint);
  font-size: 11px;
}

.metrics {
  display: grid;
  grid-template-columns: 180px 180px minmax(260px, 1fr);
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
}

.metric {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 17px 20px;
  border-right: 1px solid var(--border);
}

.metric:last-child {
  border-right: 0;
}

.metric span {
  color: var(--text-muted);
  font-size: 11px;
}

.metric strong {
  overflow: hidden;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-wide strong {
  font-size: 14px;
}

.log-panel {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
}

.panel-heading {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.panel-heading h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.panel-heading p {
  margin: 5px 0 0;
  color: var(--text-muted);
  font-size: 11px;
}

.request-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 650;
}

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid #c6d7e7;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner-large {
  width: 24px;
  height: 24px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.log-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.log-table th {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-subtle);
  color: #717882;
  font-size: 10px;
  font-weight: 750;
  text-align: left;
  text-transform: uppercase;
}

.log-table th:nth-child(2) {
  width: 154px;
}

.log-table th:nth-child(3) {
  width: 104px;
}

.log-table th:nth-child(4) {
  width: 160px;
}

.log-table th:nth-child(6) {
  width: 150px;
}

.log-table td {
  min-width: 0;
  padding: 12px;
  border-bottom: 1px solid #eceef0;
  color: #343a41;
  font-size: 12px;
  vertical-align: middle;
}

.log-row {
  transition: background-color 120ms ease;
}

.log-row:hover,
.log-row.expanded {
  background: #fafbfb;
}

.expand-column {
  width: 44px;
  padding-right: 2px !important;
  padding-left: 12px !important;
}

.expand-button {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #7a828c;
}

.expand-button:hover {
  background: #e9ecef;
  color: var(--text);
}

.expand-button svg {
  transition: transform 140ms ease;
}

.expanded .expand-button svg {
  transform: rotate(90deg);
}

.timestamp,
.request-id,
.endpoint,
.json-block {
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
}

.timestamp {
  color: #555d66;
  font-size: 11px;
  white-space: nowrap;
}

.level-badge {
  display: inline-flex;
  min-height: 23px;
  align-items: center;
  padding: 0 7px;
  border: 1px solid #d8dce0;
  border-radius: 4px;
  background: #f3f4f5;
  color: #555d66;
  font-size: 9px;
  font-weight: 800;
}

.level-debug {
  border-color: #d3d7dc;
  background: #f2f3f4;
  color: #626a74;
}

.level-info,
.level-notice {
  border-color: #bfd5e8;
  background: var(--blue-soft);
  color: var(--blue);
}

.level-warning {
  border-color: #edc98f;
  background: var(--warning-soft);
  color: var(--warning);
}

.level-error,
.level-critical,
.level-alert,
.level-emergency {
  border-color: #efc0c5;
  background: var(--danger-soft);
  color: var(--danger);
}

.service-cell {
  min-width: 0;
}

.service-cell strong,
.service-cell span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-cell strong {
  margin-bottom: 3px;
  color: #343a41;
  font-size: 11px;
}

.service-cell span {
  color: var(--text-faint);
  font-size: 10px;
}

.message-cell {
  overflow: hidden;
  color: #2e343a;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.request-id {
  display: block;
  overflow: hidden;
  color: #727a84;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-row td {
  padding: 0;
  background: #f8faf9;
}

.log-detail {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(320px, 1.2fr);
  gap: 24px;
  padding: 20px 24px 22px 56px;
  border-bottom: 1px solid var(--border);
  box-shadow: inset 3px 0 var(--accent);
}

.detail-section {
  min-width: 0;
}

.detail-section h3 {
  margin: 0 0 11px;
  color: #555d66;
  font-size: 11px;
  text-transform: uppercase;
}

.detail-message {
  max-height: 220px;
  margin: 0 0 18px;
  overflow: auto;
  color: #252a30;
  font-size: 13px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.detail-list {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 8px 12px;
  margin: 0;
  font-size: 11px;
}

.detail-list dt {
  color: var(--text-faint);
}

.detail-list dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.endpoint {
  color: var(--blue);
  font-size: 10px;
  text-decoration: none;
}

.endpoint:hover {
  text-decoration: underline;
}

.json-block {
  min-height: 108px;
  max-height: 330px;
  margin: 0;
  padding: 14px;
  overflow: auto;
  border: 1px solid #dce1df;
  border-radius: 5px;
  background: #20252a;
  color: #d9e4df;
  font-size: 11px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.empty-state,
.loading-state {
  display: flex;
  min-height: 310px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 40px 20px;
  color: var(--text-muted);
  text-align: center;
}

.empty-state .state-icon {
  margin-bottom: 14px;
  color: #9ba2aa;
}

.empty-state .state-icon svg {
  width: 32px;
  height: 32px;
}

.empty-state strong {
  color: var(--text);
  font-size: 14px;
}

.empty-state p {
  margin: 7px 0 0;
  font-size: 12px;
}

.loading-state {
  gap: 12px;
  font-size: 12px;
}

.error-state {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 16px;
  padding: 14px;
  border: 1px solid #efc7cb;
  border-radius: 5px;
  background: var(--danger-soft);
  color: var(--danger);
}

.error-state .state-icon svg {
  width: 22px;
  height: 22px;
}

.error-state strong {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
}

.error-state p {
  margin: 0;
  color: #8c3f46;
  font-size: 11px;
  line-height: 1.5;
}

.pagination {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
}

.pagination p {
  margin: 0;
  color: var(--text-muted);
  font-size: 11px;
}

.pagination-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pagination-actions > span {
  min-width: 64px;
  color: #4d545d;
  font-size: 11px;
  font-weight: 650;
  text-align: center;
}

.button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 5px;
  font-weight: 650;
}

.button {
  min-height: 38px;
  gap: 8px;
  padding: 0 14px;
  font-size: 12px;
}

.button svg {
  width: 16px;
  height: 16px;
}

.button-full {
  width: 100%;
}

.button-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.button-primary:hover {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
}

.button-secondary {
  border-color: var(--border-strong);
  background: var(--surface);
  color: #444b53;
}

.button-secondary:hover {
  border-color: #aeb4bb;
  background: #f7f8f9;
}

.button-danger {
  border-color: #e9b9be;
  background: #fff;
  color: var(--danger);
}

.button-danger:hover {
  background: var(--danger-soft);
}

.button-left {
  margin-right: auto;
}

.icon-button {
  width: 36px;
  height: 36px;
  padding: 0;
  border-color: var(--border);
  background: var(--surface);
  color: #59616a;
}

.icon-button:hover:not(:disabled) {
  border-color: var(--border-strong);
  background: #f5f6f7;
  color: #252a30;
}

.sidebar .sidebar-close,
.topbar .mobile-menu {
  display: none;
}

.icon-button svg,
[data-icon] svg,
.project-chevron svg {
  display: block;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.modal {
  width: min(590px, calc(100vw - 28px));
  max-height: calc(100vh - 30px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 7px;
  background: var(--surface);
  box-shadow: var(--shadow-modal);
}

.modal::backdrop {
  background: rgba(15, 18, 22, 0.58);
}

.modal-card {
  display: flex;
  max-height: calc(100vh - 30px);
  flex-direction: column;
}

.modal-header,
.modal-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 22px;
}

.modal-header {
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  margin: 0;
  font-size: 18px;
}

.modal-header .eyebrow {
  margin-bottom: 5px;
}

.modal-body {
  display: grid;
  gap: 18px;
  padding: 22px;
  overflow-y: auto;
}

.modal-footer {
  justify-content: flex-end;
  border-top: 1px solid var(--border);
  background: var(--surface-subtle);
}

.password-input {
  position: relative;
  display: block !important;
}

.password-input input {
  padding-right: 48px;
}

.input-action {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
}

.form-message {
  padding: 10px 12px;
  border: 1px solid #c7d8e8;
  border-radius: 5px;
  background: var(--blue-soft);
  color: #285d8d;
  font-size: 11px;
  line-height: 1.5;
}

.form-message.success {
  border-color: #bfe0cf;
  background: var(--success-soft);
  color: var(--success);
}

.form-message.error {
  border-color: #efc5ca;
  background: var(--danger-soft);
  color: var(--danger);
}

.visibility-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 62px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface-subtle);
  cursor: pointer;
}

.visibility-copy {
  display: grid;
  gap: 4px;
}

.visibility-copy strong {
  color: #373d45;
  font-size: 12px;
}

.visibility-copy small {
  color: var(--text-faint);
  font-size: 11px;
}

.visibility-option input,
.manager-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.switch-track {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
  flex: 0 0 auto;
  border: 1px solid #bcc2c9;
  border-radius: 11px;
  background: #d8dce0;
  transition: background-color 140ms ease, border-color 140ms ease;
}

.switch-track::after {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(20, 24, 28, 0.2);
  content: "";
  transition: transform 140ms ease;
}

.visibility-option input:checked + .switch-track,
.manager-switch input:checked + .switch-track {
  border-color: var(--accent);
  background: var(--accent);
}

.visibility-option input:checked + .switch-track::after,
.manager-switch input:checked + .switch-track::after {
  transform: translateX(16px);
}

.visibility-option input:focus-visible + .switch-track,
.manager-switch input:focus-visible + .switch-track {
  outline: 3px solid rgba(23, 107, 91, 0.2);
  outline-offset: 2px;
}

.manager-modal {
  width: min(640px, calc(100vw - 28px));
}

.project-manager-list {
  display: grid;
  max-height: min(480px, calc(100vh - 190px));
  padding: 8px 0;
  overflow-y: auto;
}

.manager-project-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto 36px;
  align-items: center;
  gap: 11px;
  min-height: 66px;
  padding: 8px 18px;
  border-bottom: 1px solid #eceef0;
}

.manager-project-row:last-child {
  border-bottom: 0;
}

.manager-project-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 750;
}

.manager-project-copy {
  min-width: 0;
}

.manager-project-copy strong,
.manager-project-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manager-project-copy strong {
  margin-bottom: 4px;
  color: #30363d;
  font-size: 12px;
}

.manager-project-copy span {
  color: var(--text-faint);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 10px;
}

.manager-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 11px;
}

.manager-edit-button {
  width: 32px;
  height: 32px;
}

.manager-footer {
  justify-content: space-between;
}

.manager-footer p {
  margin: 0;
  color: var(--text-faint);
  font-size: 11px;
}

.toast-region {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 100;
  display: grid;
  width: min(360px, calc(100vw - 36px));
  gap: 9px;
}

.toast {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 9px;
  min-height: 52px;
  padding: 10px 10px 10px 13px;
  border: 1px solid #3d454d;
  border-radius: 6px;
  background: #20252a;
  color: #f5f6f7;
  box-shadow: 0 12px 30px rgba(14, 18, 22, 0.2);
  font-size: 12px;
}

.toast > svg {
  color: #7ed0b5;
}

.toast.error > svg {
  color: #f08c95;
}

.toast button {
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: #aeb5bd;
}

@media (max-width: 1100px) {
  .log-table th:nth-child(6),
  .log-table td:nth-child(6) {
    display: none;
  }

  .log-table th:nth-child(4) {
    width: 140px;
  }

  .log-detail {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    left: 0;
    transform: translateX(-100%);
    transition: transform 180ms ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-close,
  .mobile-menu {
    display: inline-flex;
  }

  .sidebar .sidebar-close,
  .topbar .mobile-menu {
    display: inline-flex;
  }

  .sidebar-close {
    margin-left: auto;
    border-color: rgba(255, 255, 255, 0.12);
    background: transparent;
    color: #bbc1c8;
  }

  .sidebar-scrim {
    position: fixed;
    inset: 0;
    z-index: 25;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(12, 15, 18, 0.5);
  }

  body.sidebar-open .sidebar-scrim {
    display: block;
  }

  .topbar {
    padding-right: 16px;
    padding-left: 16px;
  }

  .content {
    padding: 20px 16px 32px;
  }

  .filter-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .compact-field,
  .page-size-field {
    min-width: 0;
  }

  .filter-meta {
    align-self: center;
    margin: 0;
    text-align: right;
  }

  .query-button {
    align-self: end;
  }
}

@media (max-width: 620px) {
  .topbar {
    min-height: 68px;
  }

  .project-title h1 {
    font-size: 16px;
  }

  .project-title p,
  .status-pill,
  #edit-project-button {
    display: none;
  }

  .content {
    padding: 14px 10px 26px;
  }

  .welcome-state {
    min-height: calc(100vh - 100px);
    padding: 14px;
  }

  .welcome-state h2 {
    font-size: 25px;
  }

  .filter-bar {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .page-size-field {
    display: none;
  }

  .query-button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .filter-meta {
    grid-column: 1 / -1;
    text-align: left;
  }

  .metrics {
    grid-template-columns: 1fr 1fr;
  }

  .metric {
    padding: 14px;
  }

  .metric:nth-child(2) {
    border-right: 0;
  }

  .metric-wide {
    grid-column: 1 / -1;
    border-top: 1px solid var(--border);
  }

  .log-table th:nth-child(2) {
    width: 134px;
  }

  .log-table th:nth-child(4),
  .log-table td:nth-child(4) {
    display: none;
  }

  .log-table th:nth-child(3) {
    width: 92px;
  }

  .log-table {
    min-width: 620px;
  }

  .log-detail {
    padding: 18px;
  }

  .pagination {
    align-items: flex-start;
    flex-direction: column;
  }

  .pagination-actions {
    width: 100%;
    justify-content: space-between;
  }

  .error-state {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .error-state .button {
    grid-column: 1 / -1;
  }

  .modal-footer {
    flex-wrap: wrap;
  }

  .manager-project-row {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    padding: 8px 14px;
  }

  .manager-project-row .manager-switch span:first-child {
    display: none;
  }

  .manager-edit-button {
    display: none;
  }

  .manager-footer p {
    max-width: 190px;
  }

  .button-left {
    width: 100%;
    margin: 0 0 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
