*,
*::before,
*::after {
  box-sizing: border-box;
}

.pc-root {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: #0b141a;
  color: #e9edef;
}

.pc-muted {
  color: #8696a0;
  font-size: 0.9rem;
}

.pc-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.pc-login-card {
  width: 100%;
  max-width: 360px;
  background: #202c33;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.pc-login-card h1 {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
}

.pc-label {
  display: block;
  margin: 1rem 0 0.35rem;
  font-size: 0.85rem;
  color: #8696a0;
}

.pc-input,
.pc-textarea {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #2a3942;
  background: #2a3942;
  color: #e9edef;
  padding: 0.6rem 0.75rem;
  font-size: 1rem;
}

.pc-textarea {
  resize: vertical;
  min-height: 3rem;
}

.pc-btn {
  border: none;
  border-radius: 8px;
  padding: 0.55rem 1rem;
  font-size: 0.95rem;
  cursor: pointer;
  margin-top: 0.75rem;
}

.pc-btn-primary {
  background: #00a884;
  color: #111b21;
  font-weight: 600;
  width: 100%;
}

.pc-btn-ghost {
  background: transparent;
  color: #8696a0;
  margin-top: 0;
}

.pc-error {
  color: #f15c6d;
  font-size: 0.85rem;
  margin: 0.5rem 0 0;
}

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

.pc-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  background: #202c33;
  border-bottom: 1px solid #2a3942;
}

.pc-brand {
  font-weight: 600;
}

.pc-main {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr;
  min-height: 0;
}

@media (max-width: 720px) {
  .pc-main {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .pc-sidebar {
    max-height: 40vh;
    border-right: none;
    border-bottom: 1px solid #2a3942;
  }
}

.pc-sidebar {
  background: #111b21;
  border-right: 1px solid #2a3942;
  overflow: auto;
  padding: 0.75rem;
}

.pc-side-title {
  margin: 0.75rem 0 0.4rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8696a0;
}

.pc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pc-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.35rem 0;
  font-size: 0.9rem;
}

.pc-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pc-pill {
  font-size: 0.65rem;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  text-transform: uppercase;
  background: #2a3942;
  color: #8696a0;
}

.pc-status-running {
  background: #1f3933;
  color: #00a884;
}

.pc-status-error {
  background: #392a2f;
  color: #f15c6d;
}

.pc-issue {
  width: 100%;
  text-align: left;
  border: none;
  border-radius: 8px;
  padding: 0.5rem 0.6rem;
  margin-bottom: 0.35rem;
  background: #202c33;
  color: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.pc-issue-active {
  outline: 2px solid #00a884;
}

.pc-issue-id {
  font-size: 0.75rem;
  color: #00a884;
  font-weight: 600;
}

.pc-issue-title {
  font-size: 0.85rem;
  line-height: 1.25;
  color: #e9edef;
}

.pc-thread {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #0b141a;
}

.pc-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8696a0;
  padding: 2rem;
  text-align: center;
}

.pc-bubbles {
  flex: 1;
  overflow: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.pc-bubble {
  align-self: flex-start;
  max-width: min(640px, 92%);
  background: #202c33;
  border-radius: 8px 8px 8px 2px;
  padding: 0.5rem 0.75rem;
}

.pc-bubble-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.7rem;
  color: #8696a0;
  margin-bottom: 0.35rem;
}

.pc-bubble-body {
  font-size: 0.9rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.pc-composer {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
  padding: 0.75rem;
  border-top: 1px solid #2a3942;
  background: #202c33;
}

.pc-composer .pc-textarea {
  flex: 1;
  margin: 0;
}

.pc-composer .pc-btn-primary {
  width: auto;
  margin: 0;
}
