/* Tracemate's soft gray and butter-yellow palette. */
:root {
  --app-bg: #fdfdfd;
  --app-panel: #f0f0f0;
  --app-card: #ffffff;
  --app-ink: #303030;
  --app-muted: #606060;
  --app-line: #dedede;
  --app-control-border: #808080;
  --app-accent: #a17624;
  --app-accent-strong: #71551b;
  --app-accent-soft: #fff9eb;
  --app-warm-surface: #fffbf2;
  --app-hover-bg: #fffdf5;
  --app-steel: var(--app-ink);
  --app-info-bg: #f1f1f1;
  --app-info-border: #7d7d7d;
  --app-info-text: #555555;
}

body:not(.app-shell--dev-terminal) {
  background-image:
    linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(148, 163, 184, 0.07) 1px, transparent 1px);
  background-size: 64px 64px;
}

a:hover { color: var(--app-accent-strong); }
.app-nav__link:hover, .app-workspace-nav__link:hover, .app-list a:hover,
.btn-outline-primary:hover, .btn-outline-secondary:hover, .btn-outline-light:hover,
body.app-shell--project-docs .docs-tree__link:hover,
.line-messages-conversation-item:hover, .codex-chat-project:hover,
.codex-chat-nav-item:hover { background: var(--app-hover-bg); }
.btn-primary, .btn-primary:focus {
  background: #f6dfad;
  border-color: var(--app-accent);
  color: #403719;
}
.btn-primary:hover, .btn-primary:active {
  background: #efd08b;
  border-color: var(--app-accent-strong);
  color: #332a13;
}
.mcp-alias-rule__arrow { color: var(--app-accent-strong); }

.table {
  --bs-table-bg: var(--app-card);
  --bs-table-hover-bg: var(--app-hover-bg);
}
.table-responsive:has(> .table), .bootstrap-table .fixed-table-body {
  border: 1px solid var(--app-line);
  border-radius: 8px;
}
.bootstrap-table .fixed-table-body > .fixed-table-loading { right: 0; width: auto; }
/* The rounded container supplies the outer border; retain the inner grid. */
.table-responsive > .table > :not(caption) > tr > :first-child,
.bootstrap-table .fixed-table-body > .table > :not(caption) > tr > :first-child { border-left-width: 0; }
.table-responsive > .table > :not(caption) > tr > :last-child,
.bootstrap-table .fixed-table-body > .table > :not(caption) > tr > :last-child { border-right-width: 0; }
.table-responsive > .table > thead > tr:first-child,
.table-responsive > .table > thead > tr:first-child > *,
.bootstrap-table .fixed-table-body > .table > thead > tr:first-child,
.bootstrap-table .fixed-table-body > .table > thead > tr:first-child > * { border-top-width: 0; }
.table-responsive > .table > tbody:last-child > tr:last-child,
.table-responsive > .table > tbody:last-child > tr:last-child > *,
.bootstrap-table .fixed-table-body > .table > tbody:last-child > tr:last-child,
.bootstrap-table .fixed-table-body > .table > tbody:last-child > tr:last-child > * { border-bottom-width: 0; }
@media (max-width: 767px) {
  .table-responsive:has(> .table.app-table--cards),
  .bootstrap-table .fixed-table-body:has(> .table.app-table--cards) { border: 0; }
  .table-responsive > .app-table--cards > tbody:last-child > tr:last-child,
  .bootstrap-table .fixed-table-body > .app-table--cards > tbody:last-child > tr:last-child {
    border-bottom: 1px solid var(--app-line);
  }
}
.table-hover > tbody > tr > *, .ew-list-table tbody tr > td {
  transition: background-color 180ms ease, box-shadow 180ms ease;
}
@media (prefers-reduced-motion: reduce) {
  .table-hover > tbody > tr > *, .ew-list-table tbody tr > td { transition: none; }
}
.table thead th, .project-index-table thead th, .ew-list-table th { background: #f7f9fc; }
.project-index-table__runtime { min-width: 136px; }
.table .project-runtime-versions { background: transparent; padding: 0; }
.ew-list-table tr:hover td { background: var(--app-hover-bg); }
.workspace-recent-card__list a, .app-workspace-meta > div { background: var(--app-warm-surface); }
.workspace-recent-card__list a:hover { background: var(--app-hover-bg); }
.workspace-recent-card__badge, .app-inline-list li, .app-tag,
.project-index-table__identifier, .project-index-table__branch,
body.app-shell--project-docs .project-docs__badge {
  background: #eeeeee;
}
.workspace-recent-card__badge, .project-index-table__identifier,
.project-index-table__branch { background: var(--app-accent-soft); }
.form-control::placeholder, .ew-page .form-control::placeholder { color: #666666; }
.form-control:disabled, .form-select:disabled, .form-control[readonly],
.btn:disabled, .btn.disabled { background: #eeeeee; color: var(--app-muted); }

/* Keep status meanings distinct within the gray palette. */
.issue-status--open {
  background-color: var(--app-info-bg);
  border-color: var(--app-info-border);
  color: var(--app-info-text);
}
.issue-status-badge.issue-status--open {
  --status-background: var(--app-info-bg);
  --status-border: var(--app-info-border);
  background: transparent;
  color: var(--app-info-text);
}
.issue-status--archived { background-color: #eeeeee; border-color: var(--app-control-border); color: var(--app-muted); }
.issue-status-badge.issue-status--archived {
  --status-background: #eeeeee;
  --status-border: var(--app-control-border);
  background: transparent;
  color: var(--app-muted);
}
.ai-draft__status--queued, .codex-chat-nav-item__source--web {
  background: var(--app-info-bg);
  border-color: var(--app-info-border);
  color: var(--app-info-text);
}

.ai-draft__bubble--user, .issue-spec-message--user .issue-spec-message__content {
  background: var(--app-info-bg);
  border-color: #d5d5d5;
}
.ai-draft__bubble--ai, .issue-spec-message--assistant .issue-spec-message__content { background: #f7f7f7; }
.issue-spec-message--system .issue-spec-message__content, .ew-badge--neutral { background: #eeeeee; }
.codex-chat-message--user { background: var(--app-info-bg); }
.line-messages-conversation-item__avatar--fallback,
.line-messages-item__avatar--fallback { background: #e8e8e8; }
.ew-page { --ew-muted: var(--app-muted); --ew-border: var(--app-line); }
