/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

@import url("https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;700&family=IBM+Plex+Sans:wght@400;500;600&family=Noto+Sans+TC:wght@400;500;700&display=swap");

:root {
  --app-bg: #091224;
  --app-panel: #0f1b31;
  --app-card: #13233d;
  --app-ink: #e6eefb;
  --app-muted: #9cb1cc;
  --app-line: rgba(148, 163, 184, 0.28);
  --app-accent: #f97316;
  --app-accent-strong: #ea580c;
  --app-accent-soft: rgba(249, 115, 22, 0.22);
  --app-steel: #d4e2f7;
  --app-shadow: 0 24px 48px rgba(2, 6, 23, 0.45);
  --app-radius: 16px;
  --app-radius-sm: 12px;
  --app-font-body: "IBM Plex Sans", "Noto Sans TC", sans-serif;
  --app-font-display: "Barlow Condensed", "Noto Sans TC", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  font-family: var(--app-font-body);
  color: var(--app-ink);
  background-color: var(--app-bg);
  background-image:
    radial-gradient(1200px 680px at 12% -10%, rgba(249, 115, 22, 0.14), transparent 62%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.24), rgba(3, 8, 22, 0.2) 44%, rgba(2, 6, 23, 0.46)),
    repeating-linear-gradient(90deg, rgba(148, 163, 184, 0.08), rgba(148, 163, 184, 0.08) 1px, transparent 1px, transparent 72px),
    repeating-linear-gradient(0deg, rgba(148, 163, 184, 0.07), rgba(148, 163, 184, 0.07) 1px, transparent 1px, transparent 72px);
  background-size: auto, auto, 64px 64px, 64px 64px;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--app-accent-strong);
}

.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(12px);
  background: rgba(9, 18, 36, 0.88);
  border-bottom: 1px solid var(--app-line);
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.5);
}

.app-header__inner {
  max-width: none;
  margin: 0;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.app-brand {
  font-family: var(--app-font-display);
  font-size: 20px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--app-steel);
}

.app-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.app-nav__link {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 14px;
  letter-spacing: 0.4px;
  color: var(--app-muted);
  transition: all 0.2s ease;
}

.app-nav__link:hover {
  color: var(--app-steel);
  border-color: var(--app-line);
  background: rgba(148, 163, 184, 0.12);
}

.app-nav__link.is-active {
  color: var(--app-steel);
  background: var(--app-accent-soft);
  border-color: rgba(249, 115, 22, 0.4);
}

.app-user {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--app-muted);
  font-size: 14px;
}

.app-user form {
  margin: 0;
}

.app-logout.btn {
  border-radius: 999px;
  font-size: 12px;
  padding: 6px 12px;
}

.app-main {
  flex: 1;
  padding: 20px 0 40px;
}

.app-container {
  max-width: none;
  margin: 0;
  padding: 0 20px;
}

.app-workspace {
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr) minmax(220px, 280px);
  gap: 16px;
  align-items: start;
}

.app-workspace__main {
  min-width: 0;
}

.app-workspace__side {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 12px;
  min-width: 0;
}

.app-workspace-card {
  background: linear-gradient(180deg, rgba(19, 35, 61, 0.95), rgba(15, 27, 49, 0.94));
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: var(--app-radius);
  padding: 14px;
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.32);
}

.app-workspace-card__title {
  margin: 0 0 10px;
  font-family: var(--app-font-display);
  font-size: 20px;
  letter-spacing: 0.5px;
  color: var(--app-steel);
}

.app-workspace-card__subtitle {
  margin: 14px 0 8px;
  font-size: 12px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--app-muted);
}

.app-workspace-nav {
  display: grid;
  gap: 8px;
}

.app-workspace-nav__link {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 10px;
  padding: 8px 10px;
  color: #dbeafe;
  font-size: 14px;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.app-workspace-nav__link:hover {
  border-color: rgba(249, 115, 22, 0.52);
  background: rgba(249, 115, 22, 0.12);
  color: #fef3c7;
}

.app-workspace-nav__link.is-active {
  border-color: rgba(249, 115, 22, 0.68);
  background: rgba(249, 115, 22, 0.2);
  color: #ffedd5;
}

.app-workspace-meta {
  margin: 0;
  display: grid;
  gap: 10px;
}

.app-workspace-meta > div {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(15, 23, 42, 0.44);
}

.app-workspace-meta dt {
  margin: 0;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #bfdbfe;
}

.app-workspace-meta dd {
  margin: 2px 0 0;
  font-size: 13px;
  color: #f8fafc;
  word-break: break-word;
}

.app-shell--full-bleed .app-container {
  max-width: 100%;
  padding: 0;
}

.app-page {
  animation: page-in 0.45s ease both;
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.app-page__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.app-page__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.app-kicker {
  font-family: var(--app-font-display);
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--app-muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.page-title {
  font-family: var(--app-font-display);
  font-size: 32px;
  letter-spacing: 1px;
  margin: 0;
}

.page-subtitle {
  color: #a8bfdc;
  margin: 8px 0 0;
}

.app-card {
  background: var(--app-card);
  border: 1px solid var(--app-line);
  border-radius: var(--app-radius);
  padding: 20px;
  box-shadow: var(--app-shadow);
}

.app-card--soft {
  background: var(--app-panel);
}

.app-card--highlight {
  border-color: rgba(249, 115, 22, 0.35);
  background: linear-gradient(180deg, rgba(249, 115, 22, 0.16), rgba(19, 35, 61, 0.95) 42%);
  box-shadow: 0 18px 40px rgba(249, 115, 22, 0.16);
}

.app-card--conversation {
  border-color: rgba(16, 185, 129, 0.3);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(19, 35, 61, 0.94) 62%);
}

.app-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.app-card__title {
  font-family: var(--app-font-display);
  font-size: 20px;
  letter-spacing: 0.6px;
  margin: 0;
}

.issue-detail__label {
  margin: 0 0 4px;
  font-size: 12px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--app-muted);
}

.issue-detail__value {
  margin: 0;
  color: var(--app-steel);
  line-height: 1.65;
}

.issue-detail__value + .issue-detail__label {
  margin-top: 14px;
}

.issue-detail__summary .issue-status-control {
  margin-top: 2px;
}

.issue-detail__summary-value {
  margin: 0;
  color: #f8fafc;
  font-weight: 600;
  line-height: 1.55;
}

.app-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.app-stat__value {
  font-family: var(--app-font-display);
  font-size: 28px;
  letter-spacing: 1px;
  color: var(--app-steel);
  line-height: 1;
}

.app-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  font-size: 12px;
  color: var(--app-muted);
}

.issue-side-summary {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.issue-side-summary__group {
  display: grid;
  gap: 4px;
}

.issue-side-summary__title {
  margin: 0 0 2px;
  font-size: 20px;
  font-weight: 600;
  color: #f8fafc;
  line-height: 1.35;
}

.issue-side-summary__label {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--app-muted);
}

.issue-side-summary__description {
  margin: 0;
  color: #dbeafe;
  line-height: 1.55;
  word-break: break-word;
}

.issue-side-meta .issue-status-control {
  display: flex;
  margin-top: 2px;
}

.issue-side-meta .issue-status-form {
  width: 100%;
}

.issue-side-meta .issue-status-select {
  width: 100%;
}

.issue-side-meta__hint {
  color: #bfdbfe;
  font-size: 12px;
  line-height: 1.4;
  margin: 10px 0 0;
}

.issue-ai-workbench {
  background: #111a2e;
  border: 1px solid rgba(148, 163, 184, 0.26);
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.32);
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.issue-ai-workbench__title {
  margin: 0;
  font-family: var(--app-font-display);
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: 0.8px;
  color: #f8fafc;
}

.issue-ai-workbench__meta {
  color: #cbd5e1;
  font-size: 12px;
  margin: -4px 0 0;
}

.ai-draft-conversation {
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.52);
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  overflow: auto;
  padding: 12px;
}

.ai-draft {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
}

.ai-draft + .ai-draft {
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  margin-top: 4px;
  padding-top: 12px;
}

.ai-draft__meta {
  align-items: center;
  color: #bfd3ee;
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  gap: 6px;
}

.ai-draft__status {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  color: #dbeafe;
  font-size: 11px;
  line-height: 1;
  padding: 2px 8px;
}

.ai-draft__status--succeeded {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.45);
  color: #d1fae5;
}

.ai-draft__status--queued {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.45);
  color: #dbeafe;
}

.ai-draft__status--failed {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.45);
  color: #fecaca;
}

.ai-draft__thread {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ai-draft__bubble {
  border-radius: 12px;
  border: 1px solid var(--app-line);
  max-width: 86%;
  padding: 12px 14px;
}

.ai-draft__bubble--ai {
  align-self: flex-start;
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.36);
}

.ai-draft__bubble--user {
  align-self: flex-end;
  background: rgba(59, 130, 246, 0.22);
  border-color: rgba(96, 165, 250, 0.4);
}

.ai-draft__bubble-label {
  color: #bfdbfe;
  font-size: 12px;
  margin-bottom: 6px;
}

.ai-draft__bubble-header {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.ai-draft__bubble-header .ai-draft__bubble-label {
  margin-bottom: 0;
}

.ai-draft__content {
  color: #e2e8f0;
  line-height: 1.48;
  margin: 0;
  word-break: break-word;
}

.ai-draft__bubble--user .ai-draft__content {
  max-height: 240px;
  overflow-y: auto;
}

.ai-draft__content--loading {
  animation: ai-draft-pulse 1.2s ease-in-out infinite;
}

@keyframes ai-draft-pulse {
  0%,
  100% {
    opacity: 0.45;
  }
  50% {
    opacity: 1;
  }
}

.ai-draft__content p {
  margin: 0 0 10px;
}

.ai-draft__content p:last-child {
  margin-bottom: 0;
}

.ai-draft-composer {
  border-top: 1px solid rgba(148, 163, 184, 0.26);
  flex-shrink: 0;
  margin: 0;
  padding-top: 8px;
}

.ai-draft-composer .app-form {
  gap: 8px;
}

.ai-draft-composer__row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.ai-draft-composer__row--top {
  align-items: center;
  flex-wrap: nowrap;
  justify-content: space-between;
  margin-bottom: 8px;
}

.ai-draft-composer__prompt-label {
  margin: 0;
}

.ai-draft-composer__template-inline {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  margin-left: auto;
}

.ai-draft-composer__template-label {
  color: #cbd5e1;
  font-size: 12px;
  margin: 0;
}

.ai-draft-composer__template-inline .form-select {
  min-width: 176px;
}

.ai-draft-composer textarea.form-control {
  line-height: 1.45;
  max-height: 220px;
  min-height: 74px;
  overflow-y: hidden;
  resize: none;
}

.ai-draft-composer__input-row {
  align-items: flex-end;
  display: flex;
  gap: 8px;
}

.ai-draft-composer__input-row .form-control {
  flex: 1 1 auto;
}

.ai-draft-composer__send {
  flex: 0 0 auto;
  margin-bottom: 0;
  min-width: 72px;
}

.ai-draft-composer .form-control:focus,
.ai-draft-composer .form-select:focus,
.ai-draft-composer textarea.form-control:focus {
  border-color: rgba(148, 163, 184, 0.36);
  background: rgba(9, 18, 36, 0.82);
  color: var(--app-ink);
  box-shadow: none;
  outline: none;
}

.app-meta {
  color: var(--app-muted);
  font-size: 13px;
  margin-bottom: 6px;
}

.app-inline-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.app-inline-list li {
  background: rgba(148, 163, 184, 0.14);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--app-muted);
}

.app-summary-list {
  display: grid;
  gap: 12px;
}

.app-summary-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--app-line);
  background: rgba(15, 28, 50, 0.92);
}

.app-summary-main {
  min-width: 0;
}

.app-summary-title {
  display: inline-flex;
  font-weight: 600;
  color: var(--app-steel);
}

.app-summary-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--app-muted);
}

.app-summary-time {
  font-size: 12px;
  color: var(--app-muted);
  white-space: nowrap;
}

.project-settings {
  display: grid;
  gap: 16px;
}

.project-settings__item {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px dashed var(--app-line);
  background: rgba(15, 28, 50, 0.7);
}

.project-settings__title {
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--app-muted);
  margin-bottom: 8px;
}

.project-index-summary {
  margin-bottom: 12px;
  padding: 10px 14px;
  border-color: rgba(148, 163, 184, 0.32);
  background: linear-gradient(145deg, rgba(19, 35, 61, 0.95), rgba(15, 27, 49, 0.92));
}

.project-index-summary__compact {
  margin: 0;
  color: #c6d6eb;
  font-size: 14px;
  line-height: 1.4;
}

.project-index-summary__compact strong {
  font-family: var(--app-font-display);
  font-size: 22px;
  line-height: 1;
  color: #f8fafc;
}

.project-index-grid {
  align-items: stretch;
}

.project-index-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 12px;
}

.project-index-card__header {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.project-index-card__meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.project-index-card__kicker {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: #9cb1cc;
}

.project-index-card__title {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  min-width: 0;
  overflow: hidden;
}

.project-index-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.project-index-card__name-link {
  display: -webkit-box;
  min-width: 0;
  max-width: 100%;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  line-height: 1.2;
  min-height: 2.4em;
  max-height: 2.4em;
}

.project-index-card__name-link:hover {
  color: #f8fafc;
}

.project-index-card__name-link:focus-visible {
  border-radius: 4px;
  outline: 2px solid rgba(249, 115, 22, 0.5);
  outline-offset: 1px;
}

.project-index-card__identifier {
  border: 1px solid rgba(34, 197, 94, 0.44);
  background: rgba(22, 163, 74, 0.22);
  color: #dcfce7;
  max-width: 132px;
  flex-shrink: 0;
  font-size: 11px;
  line-height: 1.2;
  padding: 3px 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-index-card__issue-count {
  font-size: 11px;
  line-height: 1.2;
  padding: 3px 8px;
}

.project-index-card__issue-count--open {
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(14, 116, 144, 0.26);
  color: #d8f5ff;
}

.project-index-card__issue-count--pending {
  border-color: rgba(250, 204, 21, 0.5);
  background: rgba(161, 98, 7, 0.28);
  color: #fef3c7;
}

.project-index-card__branch {
  border: 1px solid rgba(148, 163, 184, 0.36);
  background: rgba(15, 23, 42, 0.56);
  color: #cfe0f8;
  min-width: 0;
  max-width: 200px;
  font-size: 11px;
  line-height: 1.2;
  padding: 3px 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-index-card__commit {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  background: rgba(9, 18, 36, 0.44);
  padding: 8px 10px;
  min-width: 0;
}

.project-index-card__commit-label {
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #9cb1cc;
}

.project-index-card__commit-message {
  margin: 2px 0 0;
  color: #e8eef9;
  font-size: 13px;
  line-height: 1.35;
  min-width: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  text-overflow: unset;
  white-space: normal;
}

.project-index-card__commit-meta {
  margin: 2px 0 0;
  color: #93a8c4;
  font-size: 11px;
  line-height: 1.3;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-index-card__actions {
  margin-top: auto;
  padding-top: 2px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-index-card__actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  min-height: 30px;
  font-size: 12px;
  line-height: 1.2;
  min-width: 0;
  width: auto;
  flex: 1 1 calc(50% - 6px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-grid {
  display: grid;
  gap: 18px;
}

.app-grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.app-grid.project-index-grid {
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.app-card--animated {
  animation: card-in 0.5s ease both;
  animation-delay: var(--delay, 0s);
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.app-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.app-actions--compact {
  margin-top: 10px;
}

.app-list {
  display: grid;
  gap: 10px;
}

.app-list a {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: rgba(15, 28, 50, 0.58);
  color: var(--app-steel);
  transition: all 0.2s ease;
  min-width: 0;
  max-width: 100%;
}

.app-list a:hover {
  border-color: var(--app-line);
  background: rgba(30, 41, 59, 0.74);
}

.app-workspace-recent-link {
  display: grid;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
}

.workspace-recent-card {
  min-width: 0;
  padding: 14px 12px 12px;
  border-color: rgba(148, 163, 184, 0.28);
  box-shadow:
    0 14px 30px rgba(2, 6, 23, 0.34),
    inset 0 1px 0 rgba(148, 163, 184, 0.16);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  animation: workspace-card-in 0.35s ease both;
}

.app-workspace__side--left .workspace-recent-card:nth-child(2) {
  animation-delay: 0.06s;
}

.app-workspace__side--left .workspace-recent-card:nth-child(3) {
  animation-delay: 0.12s;
}

@keyframes workspace-card-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.workspace-recent-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
}

.workspace-recent-card .app-workspace-card__title {
  margin: 0;
  font-size: 23px;
  letter-spacing: 0.4px;
  line-height: 1.1;
}

.workspace-recent-card__badge {
  border: 1px solid rgba(148, 163, 184, 0.44);
  border-radius: 999px;
  min-width: 26px;
  text-align: center;
  padding: 1px 7px;
  color: #f8fafc;
  font-weight: 600;
  font-size: 12px;
  line-height: 1.5;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.72), rgba(15, 23, 42, 0.72));
}

.workspace-recent-card__hint {
  margin: 0 0 8px;
  font-size: 12px;
  color: #8fa6c6;
  line-height: 1.45;
}

.workspace-recent-card__list {
  gap: 7px;
}

.workspace-recent-card__list a {
  position: relative;
  border-color: rgba(148, 163, 184, 0.22);
  background: linear-gradient(135deg, rgba(9, 18, 36, 0.8), rgba(15, 28, 50, 0.84));
  box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.12);
  overflow: hidden;
  padding: 9px 11px 9px 13px;
}

.workspace-recent-card__list a::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 0;
  width: 3px;
  height: calc(100% - 16px);
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.65);
}

.workspace-recent-card--projects .workspace-recent-card__list a::before {
  background: rgba(249, 115, 22, 0.78);
}

.workspace-recent-card--issues .workspace-recent-card__list a::before {
  background: rgba(56, 189, 248, 0.78);
}

.workspace-recent-card--line .workspace-recent-card__list a::before {
  background: rgba(52, 211, 153, 0.78);
}

.workspace-recent-card__list a:hover {
  transform: translateY(-1px);
  border-color: rgba(148, 163, 184, 0.36);
  background: linear-gradient(135deg, rgba(15, 28, 50, 0.92), rgba(30, 41, 59, 0.88));
  box-shadow:
    inset 0 1px 0 rgba(191, 219, 254, 0.22),
    0 6px 14px rgba(2, 6, 23, 0.32);
}

.workspace-recent-card__list a:focus-visible {
  border-color: rgba(249, 115, 22, 0.72);
  box-shadow:
    0 0 0 2px rgba(249, 115, 22, 0.16),
    inset 0 1px 0 rgba(191, 219, 254, 0.22);
  outline: none;
}

.app-workspace-recent-link__title {
  display: block;
  color: var(--app-steel);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-workspace-recent-link__meta {
  display: block;
  color: #91a7c3;
  font-size: 12px;
  line-height: 1.3;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-workspace-recent-link__meta--preview {
  color: #b8c9df;
}

.app-workspace-recent-link__meta--context {
  color: #7f96b6;
}

@media (max-width: 768px) {
  body.app-shell--projects-index .app-workspace__main {
    order: 1;
  }

  body.app-shell--projects-index .app-workspace__side--left {
    order: 2;
  }

  body.app-shell--projects-index .app-workspace__side--right {
    order: 3;
  }

  .workspace-recent-card {
    padding: 12px 11px 10px;
  }

  .workspace-recent-card .app-workspace-card__title {
    font-size: 21px;
  }

  .workspace-recent-card__hint {
    font-size: 11px;
    margin-bottom: 8px;
  }

  .app-workspace-recent-link__title {
    font-size: 13px;
  }

  .app-workspace-recent-link__meta {
    font-size: 11px;
  }

  .app-workspace-recent-link__meta--preview {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    white-space: normal;
    text-overflow: unset;
    max-height: 2.7em;
  }

  .project-index-summary {
    padding: 10px 12px;
  }

  .project-index-summary__compact {
    font-size: 13px;
  }

  .project-index-summary__compact strong {
    font-size: 20px;
  }

  .project-index-card {
    padding: 10px;
    gap: 7px;
  }

  .project-index-card__title {
    font-size: 17px;
  }

  .project-index-card__identifier,
  .project-index-card__branch {
    max-width: 100%;
  }

  .project-index-card__commit-meta {
    white-space: normal;
  }

  .project-index-card__actions .btn {
    flex: 1 1 100%;
    width: 100%;
  }
}

.app-alert {
  padding: 12px 16px;
  border-radius: var(--app-radius-sm);
  margin-bottom: 16px;
  border: 1px solid transparent;
}

.app-alert--notice {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

.app-alert--danger {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.3);
  color: #fecaca;
}

.app-empty {
  padding: 24px;
  text-align: center;
  border-radius: var(--app-radius);
  border: 1px dashed var(--app-line);
  background: rgba(15, 28, 50, 0.78);
  color: var(--app-muted);
}

.app-empty--compact {
  padding: 16px;
  text-align: left;
}

.dev-terminal__card {
  padding: 0;
  overflow: hidden;
  background: #0b1020;
  border-color: rgba(248, 250, 252, 0.08);
}

.dev-terminal__console {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  min-height: calc(100vh - 260px);
}

.dev-terminal__screen {
  background: #0b1020;
  color: #f8fafc;
  min-height: 45vh;
  max-height: calc(100vh - 360px);
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(248, 250, 252, 0.08);
  overflow: hidden;
}

.dev-terminal__screen .xterm {
  height: 100%;
  min-height: 45vh;
}

.dev-terminal__screen .xterm-viewport {
  scrollbar-width: thin;
}

.dev-terminal__screen[data-scrollbar-hidden="true"] .xterm-viewport {
  scrollbar-width: none;
}

.dev-terminal__screen[data-scrollbar-hidden="true"] .xterm-viewport::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.dev-terminal__screen .xterm .xterm-screen {
  padding-bottom: 8px;
}

.dev-terminal__screen .xterm-viewport {
  scrollbar-width: thin;
}

.dev-terminal__controls {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 10px;
  background: rgba(19, 29, 52, 0.96);
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-top-color: rgba(148, 163, 184, 0.46);
  backdrop-filter: blur(8px);
}

.dev-terminal__toolbar {
  display: grid;
  align-content: start;
  gap: 0;
}

.dev-terminal__toolbar-row {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  grid-auto-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 4px;
}

.dev-terminal__toolbar-row + .dev-terminal__toolbar-row {
  margin-top: 0;
}

.dev-terminal__toolbar-row--arrows {
  grid-template-columns: repeat(10, minmax(0, 1fr));
}

.dev-terminal__button {
  width: 100%;
  min-height: 40px;
  height: 40px;
  line-height: 1;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(248, 250, 252, 0.16);
  background: rgba(15, 23, 42, 0.92);
  color: #f8fafc;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: none;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
  touch-action: manipulation;
}

.dev-terminal__button:active {
  transform: translateY(1px);
}

.dev-terminal__button--modifier {
  background: rgba(249, 115, 22, 0.12);
  border-color: rgba(249, 115, 22, 0.35);
  color: #fed7aa;
}

.dev-terminal__button--modifier.is-active {
  background: rgba(249, 115, 22, 0.85);
  border-color: rgba(249, 115, 22, 0.95);
  color: #0f172a;
}

.dev-terminal__button--enter {
  grid-column: 10;
}

.dev-terminal__button--arrow-up {
  grid-column: 9;
}

.dev-terminal__button--arrow-left {
  grid-column: 8;
}

.dev-terminal__button--arrow-down {
  grid-column: 9;
}

.dev-terminal__button--arrow-right {
  grid-column: 10;
}

.dev-terminal__button--arrow-left {
  grid-column: 8;
}

.dev-terminal__button--arrow-down {
  grid-column: 9;
}

.dev-terminal__button--arrow-right {
  grid-column: 10;
}

.dev-terminal__button--tmux {
  background: rgba(30, 41, 59, 0.9);
}

.dev-terminal__button--tmux-action {
  background: rgba(30, 41, 59, 0.9);
  text-transform: uppercase;
  letter-spacing: 0.2px;
}

.dev-terminal__tmux-panel {
  border-radius: 12px;
  border: 1px solid rgba(248, 250, 252, 0.08);
  background: rgba(15, 23, 42, 0.82);
  padding: 10px;
  display: grid;
  gap: 8px;
}

.dev-terminal__tmux-title {
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(248, 250, 252, 0.68);
  list-style: none;
  cursor: pointer;
}

.dev-terminal__tmux-panel > summary::-webkit-details-marker {
  display: none;
}

.dev-terminal__tmux-panel:not([open]) {
  min-height: auto;
  padding: 6px 10px;
  height: 32px;
  align-items: center;
}

.dev-terminal__tmux-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
}

.dev-terminal__input {
  width: 100%;
  border: none;
  padding: 10px 12px;
  font-size: 14px;
  background: #0f172a;
  color: #f8fafc;
  border-radius: 12px;
  border: 1px solid rgba(248, 250, 252, 0.12);
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

.dev-terminal__input:focus {
  outline: 2px solid rgba(249, 115, 22, 0.5);
  outline-offset: 0;
}

body.app-shell--dev-terminal {
  background-image: none;
  background-color: #0b1020;
}

body.app-shell--dev-terminal .app-header {
  display: none;
}

body.app-shell--dev-terminal .app-page__header {
  display: none;
}

body.app-shell--dev-terminal .app-main {
  padding: 0;
  min-height: 100vh;
}

body.app-shell--dev-terminal .app-container {
  max-width: none;
  padding: 0;
  min-height: 100vh;
}

body.app-shell--dev-terminal .dev-terminal__console {
  min-height: 100vh;
  height: 100vh;
}

body.app-shell--dev-terminal .dev-terminal__screen {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
}

body.app-shell--dev-terminal .dev-terminal__screen .xterm {
  min-height: 0;
}

body.app-shell--dev-terminal .dev-terminal__controls {
  position: static;
}

@media (max-width: 1024px) {
  body.app-shell--dev-terminal {
    background-image: none;
    background-color: #0b1020;
  }

  body.app-shell--dev-terminal .app-header {
    display: none;
  }

  body.app-shell--dev-terminal .app-page__header {
    display: none;
  }

  body.app-shell--dev-terminal .app-main {
    padding: 0;
  }

  body.app-shell--dev-terminal .app-container {
    max-width: none;
    padding: 0;
  }

  body.app-shell--dev-terminal .dev-terminal__card {
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  body.app-shell--dev-terminal .dev-terminal__console {
    min-height: 100vh;
    padding: 0;
    gap: 0;
  }

  body.app-shell--dev-terminal .dev-terminal__screen {
    flex: 0 0 50vh;
    min-height: 50vh;
    max-height: 50vh;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  body.app-shell--dev-terminal .dev-terminal__screen .xterm {
    min-height: 50vh;
  }

  body.app-shell--dev-terminal .dev-terminal__controls {
    position: static;
    flex: 0 0 50vh;
    min-height: 50vh;
    max-height: 50vh;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    overflow-y: auto;
  }
}

@media (max-width: 768px) {
  body.app-shell--dev-terminal .dev-terminal__screen {
    flex: 0 0 66vh;
    min-height: 66vh;
    max-height: 66vh;
  }

  body.app-shell--dev-terminal .dev-terminal__screen .xterm {
    min-height: 66vh;
  }

  body.app-shell--dev-terminal .dev-terminal__controls {
    flex: 0 0 calc(34vh - 6px);
    min-height: calc(34vh - 6px);
    max-height: calc(34vh - 6px);
    margin-top: 6px;
  }

  body.app-shell--dev-terminal .dev-terminal__button {
    min-height: 28px;
    padding: 4px 6px;
    font-size: 9px;
  }

  body.app-shell--dev-terminal .dev-terminal__input {
    font-size: 12px;
    padding: 8px 10px;
  }

  body.app-shell--dev-terminal .dev-terminal__toolbar-row--arrows {
    grid-template-columns: repeat(10, minmax(0, 1fr));
  }

  body.app-shell--dev-terminal .dev-terminal__tmux-grid {
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  }

  body.app-shell--dev-terminal .dev-terminal__tmux-panel {
    padding: 8px;
  }

  body.app-shell--dev-terminal .dev-terminal__tmux-panel:not([open]) .dev-terminal__tmux-grid {
    display: none;
  }
}

.app-form {
  display: grid;
  gap: 16px;
}

.app-form__grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.project-docs {
  animation: none;
  transform: none;
}

.project-docs__header {
  width: 100%;
}

.project-docs__header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  width: 100%;
}

.project-docs__layout {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr) minmax(240px, 320px);
  gap: 16px;
  align-items: start;
  width: 100%;
}

.project-docs__sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.project-docs__section {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--app-line);
}

.project-docs__section:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.project-docs__search {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.project-docs__search-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.project-docs__search-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.project-docs__search-button {
  border-radius: 999px;
  padding: 6px 14px;
  white-space: nowrap;
}

.project-docs__tree-title {
  font-family: var(--app-font-display);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--app-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
}

.docs-tree {
  list-style: none;
  margin: 0;
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.docs-tree__node {
  margin: 0;
}

.docs-tree__dir {
  background: rgba(15, 23, 42, 0.015);
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 12px;
  padding: 6px 10px;
}

.docs-tree__category {
  background: transparent;
  border: 0;
  padding: 0;
}

.docs-tree__category > .project-docs__tree-title {
  padding: 6px 0;
}

.docs-tree__summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--app-steel);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
}

.project-docs__tree-title::marker,
.docs-tree__summary::marker {
  color: transparent;
}

.project-docs__tree-title::-webkit-details-marker,
.docs-tree__summary::-webkit-details-marker {
  display: none;
}

.project-docs__tree-title::before,
.docs-tree__summary::before {
  content: "";
  border-style: solid;
  border-width: 4px 0 4px 6px;
  border-color: transparent transparent transparent var(--app-muted);
  display: inline-block;
  transform: translateY(1px);
  transition: transform 0.2s ease;
}

details[open] > .project-docs__tree-title::before,
details[open] > .docs-tree__summary::before {
  transform: rotate(90deg) translateX(1px);
}

.docs-tree__file {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.docs-tree__link {
  font-size: 14px;
  color: var(--app-ink);
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
  padding: 4px 6px;
  border-radius: 8px;
  transition: background 0.2s ease, color 0.2s ease;
}

.docs-tree__link:hover {
  background: rgba(15, 23, 42, 0.06);
  text-decoration: none;
}

.docs-tree__link--active {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
  font-weight: 600;
}

.docs-tree__meta {
  font-size: 11px;
  color: var(--app-muted);
}

.project-docs__content {
  min-height: 480px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

.project-docs__preview-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.project-docs__updated {
  color: var(--app-muted);
  font-size: 13px;
  margin: 6px 0 0;
}

.project-docs__preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.project-docs__file {
  margin: 0;
  font-size: 20px;
}

.project-docs__badge {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(15, 23, 42, 0.08);
  color: var(--app-steel);
}

.project-docs__badge--warn {
  background: rgba(239, 68, 68, 0.15);
  color: #b91c1c;
}

.project-docs__preview {
  background: rgba(15, 23, 42, 0.03);
  border: 1px solid var(--app-line);
  border-radius: 12px;
  padding: 16px;
  font-size: 14px;
  line-height: 1.6;
  overflow: auto;
}

.project-docs__preview pre {
  background: #0f172a;
  color: #f8fafc;
  padding: 12px;
  border-radius: 10px;
  overflow: auto;
}

.project-docs__preview code {
  font-family: "SFMono-Regular", "Consolas", "Liberation Mono", monospace;
}

.project-docs__section-title {
  font-size: 16px;
  margin: 0 0 8px;
}

.project-docs__form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.project-docs__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-docs__empty {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--app-steel);
  padding: 12px 24px;
}

.project-docs__empty-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
  color: var(--app-ink);
}

.project-docs__empty--warn {
  border: 1px dashed rgba(239, 68, 68, 0.35);
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.04);
  color: #b91c1c;
  min-height: auto;
  padding: 20px 24px;
}

@media (max-width: 1024px) {
  .project-docs__layout {
    grid-template-columns: 1fr;
    padding: 0 16px;
  }

  .project-docs__sidebar,
  .project-docs__content {
    grid-column: auto;
    margin-right: 0;
    padding-right: 0;
  }

  .project-docs__content {
    width: 100%;
  }
}

.form-label {
  font-weight: 600;
  color: var(--app-steel);
}

.form-control,
.form-select,
textarea.form-control {
  border-radius: 12px;
  border-color: rgba(148, 163, 184, 0.34);
  background: rgba(9, 18, 36, 0.82);
  color: var(--app-ink);
  padding: 10px 12px;
}

.form-control::placeholder {
  color: rgba(156, 177, 204, 0.9);
}

.form-control:focus,
.form-select:focus,
textarea.form-control:focus {
  border-color: rgba(249, 115, 22, 0.6);
  background: rgba(9, 18, 36, 0.82);
  color: var(--app-ink);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2);
}

.btn {
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary {
  background: var(--app-accent);
  border-color: var(--app-accent);
  box-shadow: 0 10px 20px rgba(249, 115, 22, 0.24);
}

.btn-primary:hover {
  background: var(--app-accent-strong);
  border-color: var(--app-accent-strong);
  transform: translateY(-1px);
}

.btn-outline-primary {
  color: var(--app-accent-strong);
  border-color: rgba(249, 115, 22, 0.6);
}

.btn-outline-primary:hover {
  background: var(--app-accent);
  border-color: var(--app-accent);
  color: #ffffff;
}

.btn-outline-secondary {
  color: var(--app-steel);
  border-color: rgba(148, 163, 184, 0.4);
}

.btn-outline-secondary:hover {
  background: rgba(148, 163, 184, 0.14);
  color: #f8fafc;
}

.table {
  margin-bottom: 0;
  color: var(--app-ink);
  --bs-table-bg: transparent;
  --bs-table-color: var(--app-ink);
  --bs-table-border-color: var(--app-line);
  --bs-table-striped-bg: rgba(148, 163, 184, 0.08);
  --bs-table-striped-color: var(--app-ink);
}

.table thead th {
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.6px;
  color: var(--app-muted);
  border-bottom-color: var(--app-line);
}

.table tbody tr {
  border-color: var(--app-line);
}

.badge.text-bg-light {
  background: rgba(148, 163, 184, 0.2) !important;
  color: var(--app-steel);
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.issue-status {
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.issue-status--open {
  background: #0b6aa8;
  color: #ffffff;
  border: 1px solid #0a5a8e;
}

.issue-status--pending {
  background: #f59e0b;
  color: #3b2f00;
  border: 1px solid #d97706;
}

.issue-status--solved {
  background: #22c55e;
  color: #083b1b;
  border: 1px solid #16a34a;
}

.issue-status--archived {
  background: #94a3b8;
  color: #0f172a;
  border: 1px solid #64748b;
}

.issue-status-control {
  display: inline-flex;
  align-items: center;
}

.issue-status-form {
  margin: 0;
}

.issue-status-select {
  appearance: none;
  border-radius: 999px;
  padding: 4px 24px 4px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  min-width: 110px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 12px 8px;
  border: 1px solid transparent;
}

.issue-status-select:focus {
  outline: 2px solid rgba(249, 115, 22, 0.75);
  outline-offset: 2px;
}

.issue-status-select option {
  color: #0f172a;
}

.issue-status-select.issue-status--pending,
.issue-status-select.issue-status--archived {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%230f172a' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

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

.app-message {
  border: 1px solid var(--app-line);
  background: rgba(15, 28, 50, 0.9);
  border-radius: var(--app-radius-sm);
  padding: 14px 16px;
}

.app-message__meta {
  font-size: 12px;
  color: var(--app-muted);
}

.app-auth {
  max-width: 440px;
  margin: 80px auto 0;
}

body.app-shell--issue-show {
  height: 100vh;
  overflow: hidden;
}

body.app-shell--issue-show .app-main {
  min-height: 0;
  overflow: hidden;
  padding: 8px 0 12px;
}

body.app-shell--issue-show .app-container {
  height: 100%;
  max-width: none;
  overflow: hidden;
  padding: 0 12px;
}

body.app-shell--issue-show .app-workspace {
  align-items: stretch;
  height: var(--issue-show-viewport-height, calc(100vh - 120px));
  min-height: 0;
}

body.app-shell--issue-show .app-workspace__main,
body.app-shell--issue-show .app-workspace__side {
  min-height: 0;
}

body.app-shell--issue-show .app-workspace__side {
  position: static;
}

body.app-shell--issue-show .issue-page {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

@media (max-width: 1080px) {
  .issue-ai-workbench {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .issue-ai-workbench .ai-draft-conversation {
    max-height: none;
  }
}

@media (max-width: 768px) {
  body.app-shell--issue-show {
    height: auto;
    overflow: auto;
  }

  body.app-shell--issue-show .app-main {
    overflow: visible;
    padding: 16px 0 20px;
  }

  body.app-shell--issue-show .app-container {
    height: auto;
    overflow: visible;
  }

  body.app-shell--issue-show .app-workspace {
    height: auto;
  }

  body.app-shell--issue-show .issue-page {
    height: auto;
  }

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

  .app-user {
    width: 100%;
    justify-content: space-between;
  }

  .app-workspace {
    grid-template-columns: 1fr;
  }

  .app-workspace__side {
    position: static;
  }

  .app-workspace__side--right {
    order: 3;
  }

  .issue-ai-workbench {
    min-height: 0;
    height: 100%;
    overflow: hidden;
  }

  .ai-draft-conversation {
    min-height: 280px;
    max-height: none;
  }

  .ai-draft-composer__row--top {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .ai-draft-composer__template-inline {
    margin-left: 0;
    width: 100%;
  }

  .ai-draft-composer__template-inline .form-select {
    min-width: 0;
    width: 100%;
  }

  .issue-side-summary__description {
    max-height: 180px;
    overflow-y: auto;
  }

  .ai-draft-composer__input-row {
    align-items: flex-end;
  }

  .ai-draft-composer__send {
    min-width: 64px;
    padding-left: 14px;
    padding-right: 14px;
  }

  .ai-draft__bubble--user .ai-draft__content {
    max-height: 180px;
  }

  .ai-draft__bubble {
    max-width: 100%;
  }
}

body.app-shell--project-docs {
  height: 100vh;
  overflow: hidden;
}

body.app-shell--project-docs .app-main {
  min-height: 0;
  overflow: hidden;
  padding: 8px 0 12px;
}

body.app-shell--project-docs .app-container {
  height: 100%;
  max-width: none;
  overflow: hidden;
  padding: 0 12px;
}

body.app-shell--project-docs .project-docs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: var(--project-docs-viewport-height, calc(100vh - 120px));
  min-height: 0;
}

body.app-shell--project-docs .project-docs__header {
  margin-bottom: 0;
}

body.app-shell--project-docs .project-docs__header-inner {
  max-width: none;
  margin: 0;
  padding: 0;
}

body.app-shell--project-docs .project-docs__layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr) minmax(240px, 300px);
  flex: 1;
  min-height: 0;
  gap: 14px;
  padding: 0;
  align-items: stretch;
}

body.app-shell--project-docs .project-docs__sidebar {
  background: linear-gradient(180deg, rgba(19, 35, 61, 0.95), rgba(15, 27, 49, 0.94));
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  box-shadow: 0 18px 32px rgba(2, 6, 23, 0.34);
  min-height: 0;
  overflow: auto;
  padding: 14px;
  height: 100%;
}

body.app-shell--project-docs .project-docs__section {
  border-bottom-color: rgba(148, 163, 184, 0.24);
}

body.app-shell--project-docs .project-docs__section-title {
  color: #f8fafc;
  font-family: var(--app-font-display);
  font-size: 20px;
  letter-spacing: 0.5px;
}

body.app-shell--project-docs .project-docs__tree-title {
  color: #bfdbfe;
}

body.app-shell--project-docs .docs-tree__dir {
  background: rgba(15, 23, 42, 0.42);
  border-color: rgba(148, 163, 184, 0.2);
}

body.app-shell--project-docs .docs-tree__summary {
  color: #f8fafc;
}

body.app-shell--project-docs .docs-tree__link {
  color: #dbeafe;
}

body.app-shell--project-docs .docs-tree__link:hover {
  background: rgba(249, 115, 22, 0.14);
  color: #ffedd5;
}

body.app-shell--project-docs .docs-tree__link--active {
  background: rgba(251, 191, 36, 0.16);
  color: #fef3c7;
}

body.app-shell--project-docs .docs-tree__meta,
body.app-shell--project-docs .app-meta {
  color: #bfdbfe;
}

body.app-shell--project-docs .project-docs__content {
  background: linear-gradient(180deg, rgba(17, 28, 48, 0.98), rgba(13, 22, 39, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  box-shadow: 0 18px 32px rgba(2, 6, 23, 0.34);
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-width: none;
  margin: 0;
  overflow: hidden;
  padding: 0;
  height: 100%;
}

body.app-shell--project-docs .project-docs__content-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 14px;
}

body.app-shell--project-docs .project-docs__context {
  background: linear-gradient(180deg, rgba(19, 35, 61, 0.95), rgba(15, 27, 49, 0.94));
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  box-shadow: 0 18px 32px rgba(2, 6, 23, 0.34);
  min-height: 0;
  overflow: auto;
  padding: 14px;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

body.app-shell--project-docs .project-docs__context-details {
  margin: 0;
}

body.app-shell--project-docs .project-docs__updated {
  color: #bfdbfe;
}

body.app-shell--project-docs .project-docs__file {
  color: #f8fafc;
}

body.app-shell--project-docs .project-docs__badge {
  background: rgba(148, 163, 184, 0.16);
  color: #e2e8f0;
}

body.app-shell--project-docs .project-docs__badge--warn {
  background: rgba(248, 113, 113, 0.2);
  color: #fecaca;
}

body.app-shell--project-docs .project-docs__preview {
  background: rgba(15, 23, 42, 0.42);
  border-color: rgba(148, 163, 184, 0.24);
  color: #e2e8f0;
}

body.app-shell--project-docs .project-docs__empty {
  color: #bfdbfe;
}

body.app-shell--project-docs .project-docs__empty-title {
  color: #f8fafc;
}

body.app-shell--project-docs .project-docs__empty--warn {
  border-color: rgba(248, 113, 113, 0.38);
  background: rgba(127, 29, 29, 0.22);
  color: #fecaca;
}

body.app-shell--project-docs .project-docs__search .form-control,
body.app-shell--project-docs .project-docs__form .form-control {
  background: rgba(15, 23, 42, 0.72);
}

@media (max-width: 1400px) {
  body.app-shell--project-docs .project-docs__layout {
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  }

  body.app-shell--project-docs .project-docs__context {
    grid-column: 2 / 3;
    max-height: 260px;
  }
}

@media (max-width: 1080px) {
  body.app-shell--project-docs {
    height: auto;
    overflow: auto;
  }

  body.app-shell--project-docs .app-main,
  body.app-shell--project-docs .app-container {
    overflow: visible;
  }

  body.app-shell--project-docs .project-docs {
    height: auto;
  }

  body.app-shell--project-docs .project-docs__layout {
    grid-template-columns: 1fr;
    padding: 0;
  }

  body.app-shell--project-docs .project-docs__sidebar {
    max-height: 44vh;
  }

  body.app-shell--project-docs .project-docs__content-body {
    min-height: 320px;
  }
}

@media (max-width: 768px) {
  body.app-shell--project-docs .app-container {
    padding: 0 10px;
  }

  body.app-shell--project-docs .project-docs__section-title {
    font-size: 18px;
  }
}

body.app-shell--line-messages {
  height: 100vh;
  overflow: hidden;
}

body.app-shell--line-messages .app-main {
  min-height: 0;
  overflow: hidden;
  padding: 8px 0 12px;
}

body.app-shell--line-messages .app-container {
  height: 100%;
  max-width: none;
  overflow: hidden;
  padding: 0 12px;
}

.line-messages-page {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: var(--line-messages-viewport-height, calc(100vh - 120px));
  min-height: 0;
}

.line-messages-query {
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.74);
  padding: 12px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.34);
}

.line-messages-query label {
  color: #dbeafe;
  font-size: 12px;
}

.line-messages-query .form-control {
  background: rgba(15, 23, 42, 0.72);
  color: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.36);
}

.line-messages-query__hint {
  margin: 8px 0 0;
  color: #bfdbfe;
  font-size: 12px;
}

.line-messages-workspace {
  display: grid;
  grid-template-columns: minmax(260px, 300px) minmax(0, 1fr) minmax(240px, 280px);
  flex: 1;
  gap: 14px;
  min-height: 0;
}

.line-messages-panel {
  border: 1px solid rgba(148, 163, 184, 0.26);
  background: linear-gradient(180deg, rgba(16, 26, 46, 0.96), rgba(14, 23, 41, 0.98));
  box-shadow: 0 18px 34px rgba(2, 6, 23, 0.34);
  border-radius: 14px;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.line-messages-panel__header {
  padding: 12px 14px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.line-messages-panel__header--main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.line-messages-panel__title {
  margin: 0;
  color: #f8fafc;
  font-family: var(--app-font-display);
  font-size: 20px;
  letter-spacing: 0.4px;
}

.line-messages-panel__meta {
  margin: 0;
  color: #bfdbfe;
  font-size: 12px;
}

.line-messages-conversation-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  overflow: auto;
  padding: 8px 10px 10px;
}

.line-messages-empty {
  margin: 12px;
  border-radius: 10px;
  border: 1px dashed rgba(148, 163, 184, 0.3);
  color: #bfdbfe;
  padding: 14px 12px;
}

.line-messages-conversation-item {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  display: flex;
  gap: 10px;
  padding: 10px;
  background: rgba(15, 23, 42, 0.46);
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.line-messages-conversation-item:hover {
  border-color: rgba(251, 191, 36, 0.55);
  background: rgba(30, 41, 59, 0.72);
}

.line-messages-conversation-item.is-active {
  border-color: rgba(251, 191, 36, 0.72);
  background: rgba(251, 191, 36, 0.14);
}

.line-messages-conversation-item__avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  object-fit: cover;
  flex-shrink: 0;
}

.line-messages-conversation-item__avatar--fallback {
  background: rgba(148, 163, 184, 0.22);
  color: #e2e8f0;
  font-size: 12px;
  align-items: center;
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
}

.line-messages-conversation-item__body {
  min-width: 0;
  flex: 1;
}

.line-messages-conversation-item__header {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.line-messages-conversation-item__name {
  color: #f8fafc;
  font-size: 14px;
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-messages-conversation-item__time {
  color: #bfdbfe;
  font-size: 11px;
  flex-shrink: 0;
}

.line-messages-conversation-item__preview {
  margin-top: 4px;
  color: #cbd5e1;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-messages-message-panel {
  flex: 1;
  min-height: 0;
  background: rgba(10, 17, 33, 0.86);
  padding: 10px;
}

.line-messages-message-panel__scroll {
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.56);
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  min-height: 0;
  overflow: auto;
  padding: 10px;
}

.line-messages-message-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.line-messages-panel--context {
  overflow: auto;
}

.line-messages-context {
  padding: 12px;
}

.line-messages-context__details {
  margin: 0;
}

.line-messages-feedback {
  color: #bfdbfe;
  font-size: 14px;
  margin: 0;
}

.line-messages-feedback--error {
  color: #fecaca;
}

.line-messages-item {
  align-items: flex-start;
  display: flex;
  gap: 8px;
}

.line-messages-item__avatar {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  object-fit: cover;
  flex-shrink: 0;
}

.line-messages-item__avatar--fallback {
  align-items: center;
  background: rgba(148, 163, 184, 0.22);
  color: #e2e8f0;
  display: inline-flex;
  font-size: 10px;
  font-weight: 700;
  justify-content: center;
}

.line-messages-item__content {
  max-width: min(82%, 700px);
}

.line-messages-item__meta {
  align-items: center;
  color: #bfdbfe;
  display: flex;
  flex-wrap: wrap;
  font-size: 11px;
  gap: 8px;
}

.line-messages-item__name {
  color: #f8fafc;
  font-size: 12px;
  font-weight: 600;
}

.line-messages-item__badge {
  border: 1px solid rgba(16, 185, 129, 0.45);
  border-radius: 999px;
  color: #bbf7d0;
  font-size: 10px;
  padding: 1px 7px;
  background: rgba(16, 185, 129, 0.18);
}

.line-messages-item__bubble {
  margin-top: 4px;
  border-radius: 14px;
  border-top-left-radius: 6px;
  background: rgba(17, 24, 39, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: #e2e8f0;
  font-size: 14px;
  line-height: 1.5;
  padding: 9px 10px;
}

.line-messages-item__bubble p {
  margin: 0 0 8px;
}

.line-messages-item__bubble p:last-child {
  margin-bottom: 0;
}

.line-messages-item__media {
  max-width: 100%;
  border-radius: 10px;
}

.line-messages-item__caption {
  margin-top: 8px;
}

.line-messages-item__placeholder {
  color: #cbd5e1;
  font-size: 12px;
}

.line-messages-item__file-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.line-messages-item__file-link {
  color: #93c5fd;
  text-decoration: underline;
  font-weight: 600;
}

@media (max-width: 1360px) {
  .line-messages-workspace {
    grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
  }

  .line-messages-panel--context {
    grid-column: 2 / 3;
    max-height: 240px;
  }
}

@media (max-width: 1080px) {
  body.app-shell--line-messages {
    height: auto;
    overflow: auto;
  }

  body.app-shell--line-messages .app-main,
  body.app-shell--line-messages .app-container {
    overflow: visible;
  }

  .line-messages-page {
    height: auto;
  }

  .line-messages-workspace {
    grid-template-columns: 1fr;
  }

  .line-messages-panel--conversations {
    max-height: 300px;
  }

  .line-messages-message-panel__scroll {
    min-height: 280px;
  }
}

@media (max-width: 768px) {
  body.app-shell--line-messages .app-container {
    padding: 0 10px;
  }

  .line-messages-query {
    padding: 10px;
  }

  .line-messages-panel__title {
    font-size: 18px;
  }

  .line-messages-item__content {
    max-width: 100%;
  }
}

body.app-shell--codex-chat {
  height: 100vh;
  overflow: hidden;
}

body.app-shell--codex-chat .app-main {
  min-height: 0;
  overflow: hidden;
  padding: 8px 0 12px;
}

body.app-shell--codex-chat .app-container {
  height: 100%;
  max-width: none;
  overflow: hidden;
  padding: 0 12px;
}

.codex-chat-page {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: var(--codex-chat-viewport-height, calc(100vh - 120px));
  min-height: 0;
  position: relative;
}

.codex-chat-toolbar {
  display: none;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.codex-chat-sidebar-toggle {
  display: none;
}

.codex-chat-workspace {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr) 280px;
  flex: 1;
  gap: 14px;
  min-height: 0;
}

.codex-chat-sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
  min-height: 0;
  overflow: auto;
  background: linear-gradient(180deg, #16233a, #111a2c);
  border: 1px solid rgba(148, 163, 184, 0.24);
  color: #d9e5f7;
  box-shadow: 0 22px 42px rgba(15, 23, 42, 0.42);
}

.codex-chat-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.codex-chat-section__title {
  font-family: var(--app-font-display);
  font-size: 17px;
  letter-spacing: 0.5px;
  margin: 0;
  color: #f8fafc;
}

.codex-chat-projects,
.codex-chat-nav-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.codex-chat-project {
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 10px;
  padding: 8px 10px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.35);
}

.codex-chat-project.is-active {
  border-color: rgba(251, 191, 36, 0.55);
  background: rgba(251, 191, 36, 0.14);
  color: #fef3c7;
}

.codex-chat-filters {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(15, 23, 42, 0.36);
  display: grid;
  gap: 6px;
}

.codex-chat-filters__item {
  margin: 0;
  display: flex;
  gap: 6px;
  align-items: center;
  color: #cbd5e1;
  font-size: 12px;
}

.codex-chat-nav-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
}

.codex-chat-nav-item-form {
  margin: 0;
}

.codex-chat-nav-item {
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.48);
  color: #e2e8f0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 9px 10px;
  gap: 4px;
  min-height: 78px;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.codex-chat-nav-item:hover {
  border-color: rgba(251, 191, 36, 0.5);
  background: rgba(30, 41, 59, 0.74);
}

.codex-chat-nav-item--conversation {
  text-decoration: none;
}

.codex-chat-nav-item.is-active {
  border-color: rgba(251, 191, 36, 0.72);
  background: rgba(251, 191, 36, 0.16);
  color: #fef3c7;
}

.codex-chat-nav-item.is-archived {
  opacity: 0.68;
}

.codex-chat-nav-item__title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.codex-chat-nav-item__meta {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  color: #bfd3ee;
  font-size: 11px;
}

.codex-chat-nav-item__source {
  border-radius: 999px;
  padding: 1px 7px;
  border: 1px solid rgba(191, 219, 254, 0.42);
  color: #f8fafc;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.codex-chat-nav-item__source--shared {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.52);
  color: #d1fae5;
}

.codex-chat-nav-item__source--web {
  background: rgba(59, 130, 246, 0.24);
  border-color: rgba(96, 165, 250, 0.56);
  color: #dbeafe;
}

.codex-chat-nav-item__path {
  color: rgba(219, 234, 254, 0.8);
  font-size: 11px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.codex-chat-nav-action {
  border: 0;
  background: transparent;
  color: #f8fafc;
  font-size: 11px;
  padding: 4px 0;
  text-decoration: underline;
}

.codex-chat-nav-action:hover {
  color: #fbbf24;
}

.codex-chat-empty,
.codex-chat-empty-main {
  color: var(--app-muted);
  font-size: 14px;
}

.codex-chat-main {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: #111a2e;
  color: #dbeafe;
  border: 1px solid rgba(148, 163, 184, 0.26);
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.32);
}

.codex-chat-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.codex-chat-main__title {
  margin: 0;
  font-family: var(--app-font-display);
  font-size: 24px;
  color: #f8fafc;
}

.codex-chat-main__meta {
  margin: 4px 0 0;
  color: #bfdbfe;
  font-size: 13px;
}

.codex-chat-messages {
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 12px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.52);
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 8px;
  min-height: 0;
  overflow: auto;
}

.codex-chat-message {
  border-radius: 10px;
  padding: 9px 10px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  max-width: 86%;
  color: #e2e8f0;
}

.codex-chat-message--user {
  align-self: flex-end;
  background: rgba(59, 130, 246, 0.22);
}

.codex-chat-message--assistant {
  align-self: flex-start;
  background: rgba(16, 185, 129, 0.2);
}

.codex-chat-message--system {
  align-self: center;
  background: rgba(249, 115, 22, 0.2);
  max-width: 92%;
}

.codex-chat-message__header {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 4px;
}

.codex-chat-message__role {
  font-weight: 700;
}

.codex-chat-message__meta {
  color: #cbd5e1;
  font-size: 12px;
}

.codex-chat-message__mode {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 999px;
  padding: 2px 7px;
  color: #dbeafe;
}

.codex-chat-message__content {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 14px;
  line-height: 1.45;
}

.codex-chat-message__content p {
  margin: 0;
}

.codex-chat-message__content p + p {
  margin-top: 6px;
}

.codex-chat-message__error {
  color: #b91c1c;
  margin: 8px 0 0;
  font-size: 13px;
}

.codex-chat-composer {
  border-top: 1px solid rgba(148, 163, 184, 0.26);
  flex-shrink: 0;
  padding-top: 8px;
}

.codex-chat-composer__input-row {
  align-items: flex-end;
  display: flex;
  gap: 8px;
}

.codex-chat-composer__input-row .form-control {
  flex: 1 1 auto;
  line-height: 1.45;
  max-height: 220px;
  min-height: 74px;
  overflow-y: hidden;
  resize: none;
}

.codex-chat-composer__send {
  flex: 0 0 auto;
  min-width: 72px;
}

.codex-chat-composer__footer {
  align-items: flex-end;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-top: 6px;
  flex-wrap: wrap;
}

.codex-chat-composer__hint {
  color: #bfdbfe;
  font-size: 12px;
}

.codex-chat-composer .form-label {
  color: #dbeafe;
}

.codex-chat-composer .form-control,
.codex-chat-composer .form-select {
  background: rgba(15, 23, 42, 0.72);
  color: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.36);
}

.codex-chat-composer .form-control:focus,
.codex-chat-composer .form-select:focus,
.codex-chat-composer textarea.form-control:focus {
  border-color: rgba(148, 163, 184, 0.36);
  background: rgba(15, 23, 42, 0.72);
  color: #f8fafc;
  box-shadow: none;
  outline: none;
}

.codex-chat-main .codex-chat-empty-main,
.codex-chat-main .codex-chat-empty {
  color: #bfdbfe;
}

.codex-chat-composer__actions {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-left: auto;
}

.codex-chat-composer__mode {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.codex-chat-composer__mode .form-label {
  font-size: 12px;
  margin: 0;
}

.codex-chat-composer__mode .form-select {
  min-width: 172px;
}

.codex-chat-error {
  color: #b91c1c;
  min-height: 1.2em;
  margin-top: 6px;
  font-size: 14px;
}

.codex-chat-context {
  background: linear-gradient(180deg, #1b2a42, #111a2e);
  color: #dbeafe;
  border: 1px solid rgba(148, 163, 184, 0.26);
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.32);
  height: 100%;
  min-height: 0;
  overflow: auto;
}

.codex-chat-context__title {
  margin: 0 0 10px;
  font-family: var(--app-font-display);
  color: #f8fafc;
  font-size: 20px;
}

.codex-chat-context .form-label {
  color: #cbd5e1;
}

.codex-chat-context .form-select {
  background-color: rgba(15, 23, 42, 0.7);
  color: #f8fafc;
  border-color: rgba(148, 163, 184, 0.36);
}

.codex-chat-context__details {
  margin: 14px 0 0;
  display: grid;
  gap: 10px;
}

.codex-chat-context__details > div {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(15, 23, 42, 0.45);
}

.codex-chat-context__details dt {
  font-size: 11px;
  color: #bfdbfe;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.codex-chat-context__details dd {
  margin: 2px 0 0;
  font-size: 13px;
  color: #f8fafc;
  word-break: break-word;
}

.codex-chat-sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
  border: 0;
  z-index: 70;
}

.codex-chat-toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #0f172a;
  color: #fff;
  border-radius: 8px;
  padding: 10px 14px;
  z-index: 100;
}

@media (max-width: 1320px) {
  .codex-chat-workspace {
    grid-template-columns: 300px minmax(0, 1fr);
  }

  .codex-chat-context {
    grid-column: 2 / 3;
  }
}

@media (max-width: 1080px) {
  body.app-shell--codex-chat .app-main,
  body.app-shell--codex-chat .app-container {
    overflow: visible;
  }

  .codex-chat-page {
    height: auto;
  }

  .codex-chat-toolbar {
    display: flex;
  }

  .codex-chat-sidebar-toggle {
    display: inline-flex;
  }

  .codex-chat-workspace {
    grid-template-columns: 1fr;
  }

  .codex-chat-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: min(360px, 88vw);
    max-height: none;
    z-index: 80;
    border-radius: 0;
    transform: translateX(-103%);
    transition: transform 0.24s ease;
  }

  .codex-chat-page.is-sidebar-open .codex-chat-sidebar {
    transform: translateX(0);
  }

  .codex-chat-context {
    grid-column: auto;
  }

  .codex-chat-messages {
    min-height: 280px;
  }
}

@media (max-width: 768px) {
  body.app-shell--codex-chat .app-container {
    padding: 0 10px;
  }

  .codex-chat-composer__input-row {
    align-items: flex-end;
  }

  .codex-chat-composer__send {
    min-width: 64px;
    padding-left: 14px;
    padding-right: 14px;
  }

  .codex-chat-composer__actions {
    width: 100%;
    justify-content: flex-end;
  }

  .codex-chat-message {
    max-width: 100%;
  }

  .codex-chat-main,
  .codex-chat-context {
    padding: 14px;
  }
}
