:root {
  --bg: #0b1116;
  --panel: #141c22;
  --panel-2: #11181e;
  --text: #e7eef5;
  --muted: #9fb0c0;
  --accent: #4fd1c5;
  --accent-2: #34a0a4;
  --danger: #e57373;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at top, #102028 0%, #0b1116 45%, #070b0e 100%);
  color: var(--text);
}

.app {
  max-width: 1200px;
  margin: 32px auto 20px;
  padding: 0 20px;
}

.workspace {
  max-width: 1200px;
  margin: 0 auto 40px;
  padding: 0 20px 40px;
}

.layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-shell {
  background: rgba(10, 15, 19, 0.55);
  border: 1px solid #1e2a33;
  border-radius: 16px;
  padding: 10px;
  box-shadow: 0 18px 36px rgba(4, 10, 14, 0.35);
}

.sidebar input[type="text"] {
  width: 100%;
}

.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.tab-bar {
  display: flex;
  gap: 8px;
}

.tab-btn {
  border: 1px solid #23313b;
  background: #0f151b;
  color: var(--text);
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
}

.tab-btn.is-active {
  background: rgba(79, 209, 197, 0.2);
  border-color: rgba(79, 209, 197, 0.4);
  color: var(--text);
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

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

.chat-header .summary-panel {
  margin-bottom: 0;
  min-width: 220px;
  max-width: 360px;
}

.chat-header .summary-panel:not(.collapsed) {
  max-width: 520px;
}

@media (max-width: 860px) {
  .chat-header {
    flex-direction: column;
    align-items: stretch;
  }

  .chat-header .summary-panel {
    max-width: none;
  }
}

.header {
  margin-bottom: 20px;
  display: grid;
  gap: 12px;
}

.title {
  font-size: 28px;
  font-weight: 700;
}

.subtitle {
  color: var(--muted);
  margin-top: 4px;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-titles {
  min-width: 0;
}

.title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.title-row .title {
  white-space: nowrap;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #1e2a33;
  background: rgba(20, 28, 34, 0.7);
  position: relative;
}

.header-user-info {
  text-align: right;
  line-height: 1.2;
}

.header-user-name {
  font-weight: 600;
  font-size: 14px;
}

.header-user-email {
  font-size: 12px;
  color: var(--muted);
}

.header-avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(79, 209, 197, 0.9), rgba(52, 160, 164, 0.9));
  color: #041013;
  font-weight: 700;
  display: grid;
  place-items: center;
  letter-spacing: 0.5px;
}

.user-menu-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid #2a3a44;
  background: transparent;
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.user-menu-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.user-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 180px;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid #23313b;
  background: linear-gradient(180deg, #0f1a22 0%, #0b1319 100%);
  box-shadow: 0 18px 40px rgba(4, 10, 14, 0.4);
  display: grid;
  gap: 6px;
  z-index: 20;
}

.user-menu.hidden {
  display: none;
}

.user-menu-item {
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: rgba(79, 209, 197, 0.08);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
}

.user-menu-item:hover {
  border-color: rgba(79, 209, 197, 0.35);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.account-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
}

.icon-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-btn span {
  font-size: 12px;
}

.icon-only {
  padding: 8px;
}

.icon-btn.danger {
  color: var(--danger);
  border-color: rgba(229, 115, 115, 0.5);
}

.icon-btn.danger svg {
  stroke: var(--danger);
}

.thread-actions {
  justify-content: space-between;
  gap: 8px;
}

.thread-actions .icon-btn {
  flex: 1;
  justify-content: center;
}

.input-actions {
  justify-content: space-between;
  flex-wrap: wrap;
  margin-top: 10px;
}

.input-actions-buttons {
  display: flex;
  gap: 8px;
}

.run-status {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #22303a;
  background: rgba(15, 22, 29, 0.8);
  font-size: 12px;
}

.run-status.idle {
  color: var(--muted);
}

.run-status.running {
  color: var(--accent);
  border-color: rgba(79, 209, 197, 0.35);
  background: rgba(79, 209, 197, 0.08);
}

.run-status.done {
  color: #9fd3ad;
  border-color: rgba(159, 211, 173, 0.35);
  background: rgba(159, 211, 173, 0.08);
}

.run-status.error {
  color: #f2a9a9;
  border-color: rgba(229, 115, 115, 0.4);
  background: rgba(229, 115, 115, 0.08);
}

.agent-panel {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #1e2a33;
  background: rgba(9, 15, 20, 0.7);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.agent-panel.hidden {
  display: none;
}

.agent-panel-empty {
  grid-column: 1 / -1;
  font-size: 13px;
  color: var(--muted);
}

.agent-card {
  border: 1px solid #23313b;
  border-radius: 10px;
  padding: 10px;
  background: linear-gradient(180deg, #0f1a22 0%, #0b1319 100%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 120px;
  transition: border-color 160ms ease, transform 160ms ease;
}

.agent-card:hover {
  border-color: rgba(79, 209, 197, 0.6);
  transform: translateY(-1px);
}

.agent-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.agent-card-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid rgba(79, 209, 197, 0.35);
  display: grid;
  place-items: center;
  color: var(--accent);
  font-weight: 700;
  background: rgba(79, 209, 197, 0.12);
}

.agent-card-title {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
}

.agent-card-role {
  font-size: 12px;
  color: var(--muted);
}

.agent-card-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.agent-card-squad {
  font-size: 11px;
  color: rgba(159, 176, 192, 0.8);
}

.agent-card-actions {
  margin-top: auto;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.agent-card-btn {
  border: 1px solid #2a3a44;
  border-radius: 8px;
  background: rgba(79, 209, 197, 0.15);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 8px;
  cursor: pointer;
}

.agent-card-btn.secondary {
  background: rgba(79, 209, 197, 0.08);
}

.agent-card-btn.danger {
  border-color: rgba(229, 115, 115, 0.45);
  color: #f2a9a9;
  background: rgba(229, 115, 115, 0.08);
}

.icon-btn.active {
  border-color: rgba(79, 209, 197, 0.6);
  color: var(--accent);
}

.field-inline {
  display: flex;
  align-items: center;
  gap: 8px;
}

.field-inline input[type="text"] {
  flex: 1;
}

.is-hidden {
  display: none !important;
}

@media (max-width: 720px) {
  .header-top {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .header-user-info {
    text-align: left;
  }

  .header-actions {
    align-items: flex-start;
  }
}

.panel {
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%);
  border: 1px solid #1e2a33;
  padding: 14px;
  border-radius: 12px;
  margin-bottom: 16px;
}

.summary-panel {
  border-color: rgba(79, 209, 197, 0.35);
  background: linear-gradient(180deg, rgba(15, 26, 34, 0.95) 0%, rgba(9, 16, 21, 0.95) 100%);
  padding: 10px 12px;
}

.summary-panel.hidden {
  display: none;
}

.summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.summary-toggle {
  border: 1px solid #23313b;
  background: #0f151b;
  color: var(--text);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
}

.summary-panel.collapsed .summary-text {
  display: none;
}

.summary-panel.collapsed {
  padding: 8px 10px;
}

.summary-text {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  white-space: pre-wrap;
  max-height: 140px;
  overflow: auto;
}

.restore-notice {
  margin-bottom: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(79, 209, 197, 0.35);
  background: rgba(79, 209, 197, 0.12);
  color: var(--text);
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.restore-notice.hidden {
  display: none;
}

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

.stack-row {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  margin-top: 12px;
}

.mode-row {
  margin-top: 10px;
  align-items: flex-start;
  gap: 12px;
}

.settings-actions {
  margin-top: 14px;
  flex-wrap: wrap;
}

.status-row {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  justify-content: space-between;
}

label {
  font-size: 14px;
  color: var(--muted);
}

input[type="text"] {
  flex: 1;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #22303a;
  background: #0f151b;
  color: var(--text);
}

input[type="password"] {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #22303a;
  background: #0f151b;
  color: var(--text);
  width: 100%;
}

select {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #22303a;
  background: #0f151b;
  color: var(--text);
  width: 100%;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.toggle input {
  accent-color: var(--accent);
}

textarea {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #22303a;
  background: #0f151b;
  color: var(--text);
  resize: vertical;
}

button {
  background: var(--accent);
  color: #051015;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}

button.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid #2a3a44;
}

.confirm-danger {
  background: var(--danger);
  color: #1b0c0c;
}

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

.chat {
  background: #0a0f13;
  border-radius: 12px;
  border: 1px solid #1e2a33;
  padding: 16px;
  min-height: 320px;
  max-height: 520px;
  overflow-y: auto;
  margin-bottom: 16px;
}

.msg {
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 12px;
  border: 1px solid #1f2a32;
}

.msg.user {
  background: rgba(79, 209, 197, 0.1);
}

.msg.assistant {
  background: rgba(255, 255, 255, 0.04);
}

.msg.thinking {
  border-style: dashed;
}

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(79, 209, 197, 0.25);
  border-top-color: var(--accent);
  border-radius: 999px;
  display: inline-block;
  margin-right: 8px;
  animation: spin 0.8s linear infinite;
}

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

.msg .label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.msg .meta {
  margin-top: 8px;
  font-size: 11px;
  color: var(--muted);
  display: none;
}

.msg .meta.visible {
  display: block;
}

.msg .meta.progress {
  color: var(--accent);
  font-size: 12px;
}

.msg .body a {
  color: var(--accent);
  text-decoration: underline;
  word-break: break-all;
}

.msg .body .protected-file-link {
  color: var(--accent);
  text-decoration: underline;
  word-break: break-all;
  cursor: pointer;
}

.inline-image-wrap {
  margin-top: 8px;
}

.inline-image {
  display: block;
  max-width: min(100%, 560px);
  max-height: 420px;
  border-radius: 10px;
  border: 1px solid #22303a;
  background: #0b1218;
  cursor: zoom-in;
}

.inline-image-error {
  margin-top: 6px;
  font-size: 12px;
  color: #ff9e9e;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.menu-card {
  text-align: left;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #23313b;
  background: linear-gradient(180deg, #0f1a22 0%, #0b1319 100%);
  color: var(--text);
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: start;
  animation: pop-in 240ms ease both;
}

.menu-card:hover {
  transform: translateY(-1px);
  border-color: #2f4250;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.menu-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(79, 209, 197, 0.12);
  border: 1px solid rgba(79, 209, 197, 0.3);
  color: var(--accent);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.5px;
}

.menu-title {
  font-weight: 600;
  margin-bottom: 6px;
}

.menu-desc {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.menu-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
}

.menu-modal.hidden {
  display: none;
}

.menu-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 8, 12, 0.75);
  backdrop-filter: blur(4px);
}

.menu-modal-card {
  position: relative;
  background: linear-gradient(180deg, #111c24 0%, #0b141a 100%);
  border: 1px solid #22303a;
  border-radius: 16px;
  padding: 18px;
  width: min(900px, calc(100% - 32px));
  max-height: 80vh;
  overflow: auto;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  animation: rise-in 220ms ease both;
}

.confirm-modal-card {
  width: min(520px, calc(100% - 32px));
}

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

.menu-modal-hint {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

.image-preview-modal {
  z-index: 70;
}

.image-preview-card {
  width: min(1100px, calc(100% - 32px));
  max-height: 90vh;
}

.image-preview-body {
  margin-top: 12px;
  display: grid;
  place-items: center;
}

.image-preview-body img {
  max-width: 100%;
  max-height: calc(90vh - 110px);
  border-radius: 12px;
  border: 1px solid #22303a;
  background: #0a1016;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.skills-card {
  border: 1px solid #22303a;
  border-radius: 12px;
  padding: 12px;
  background: linear-gradient(180deg, #0f1a22 0%, #0b1319 100%);
  display: grid;
  gap: 8px;
}

.skills-card-title {
  font-weight: 600;
}

.skills-card-desc {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.skills-card-path {
  font-size: 12px;
  color: var(--muted);
}

.skills-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.login-body {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.login-link {
  padding: 10px;
  border-radius: 8px;
  border: 1px dashed #2a3a44;
  background: #0f151b;
  color: var(--text);
  font-size: 12px;
  word-break: break-all;
}

.login-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.login-hint {
  font-size: 12px;
  color: var(--muted);
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 48px 20px;
  position: relative;
  overflow: hidden;
}

.login-page::before,
.login-page::after {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 999px;
  filter: blur(0);
  opacity: 0.6;
  z-index: 0;
}

.login-page::before {
  background: radial-gradient(circle, rgba(79, 209, 197, 0.35), transparent 70%);
  top: -120px;
  left: -80px;
}

.login-page::after {
  background: radial-gradient(circle, rgba(52, 160, 164, 0.3), transparent 70%);
  bottom: -140px;
  right: -60px;
}

.login-page .app {
  max-width: 520px;
  margin: 0;
  width: 100%;
  position: relative;
  z-index: 1;
}

.login-main {
  display: flex;
  justify-content: center;
  width: 100%;
}

.login-panel {
  width: 100%;
  display: grid;
  gap: 12px;
  padding: 22px;
  background: rgba(15, 23, 30, 0.88);
  border: 1px solid rgba(79, 209, 197, 0.18);
  box-shadow: 0 24px 60px rgba(5, 12, 16, 0.45);
  backdrop-filter: blur(8px);
}

.login-panel label {
  display: block;
  margin-top: 4px;
}

.login-panel input[type="text"],
.login-panel input[type="password"] {
  width: 100%;
}

.login-header {
  margin-bottom: 16px;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(79, 209, 197, 0.9), rgba(52, 160, 164, 0.9));
  color: #041013;
  font-weight: 700;
  display: grid;
  place-items: center;
  letter-spacing: 0.5px;
  box-shadow: 0 12px 24px rgba(4, 14, 18, 0.45);
}

.field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid #22303a;
  background: #0f151b;
}

.field input {
  border: none;
  background: transparent;
  padding: 12px 2px;
  color: var(--text);
  outline: none;
  flex: 1;
}

.field-icon {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: rgba(79, 209, 197, 0.12);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 12px;
}

.field-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-panel .row {
  justify-content: space-between;
  flex-wrap: wrap;
}

.login-panel button {
  flex: 1;
  min-width: 140px;
}

@media (max-width: 520px) {
  .login-brand {
    flex-direction: column;
    align-items: flex-start;
  }

  .login-panel .row {
    flex-direction: column;
    align-items: stretch;
  }
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

.panel-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

#appAuthStatus {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.threads-list {
  display: grid;
  gap: 6px;
  margin: 6px 0;
}

.projects-list {
  display: grid;
  gap: 6px;
  margin: 6px 0;
}

.project-item {
  padding: 6px 0;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.project-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.project-meta {
  font-size: 11px;
  color: var(--muted);
  opacity: 0.9;
}

.project-item.active {
  color: var(--text);
  text-decoration: underline;
}

.project-actions {
  display: inline-flex;
  gap: 6px;
}

.project-action {
  width: 18px;
  height: 18px;
  border: none;
  background: transparent;
  padding: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.project-action svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.project-action.danger svg {
  stroke: var(--danger);
}

.project-git-actions {
  flex-wrap: wrap;
}

.project-git-branch-row {
  display: flex;
  gap: 10px;
  align-items: end;
}

.project-git-branch-input {
  flex: 1;
  display: grid;
  gap: 6px;
}

#projectGitCommitMessage {
  min-height: 88px;
}

@media (max-width: 640px) {
  .project-git-branch-row {
    flex-direction: column;
    align-items: stretch;
  }
}

.thread-item {
  padding: 4px 0;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  color: var(--muted);
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 8px;
}

.thread-item.active {
  color: var(--text);
  text-decoration: underline;
}

.thread-info {
  grid-column: 1;
  grid-row: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.thread-meta {
  grid-column: 2;
  grid-row: 1 / span 2;
  font-size: 11px;
  color: var(--muted);
  text-align: right;
  display: flex;
  align-items: center;
  gap: 6px;
}

.thread-delete {
  width: 16px;
  height: 16px;
  border-radius: 0;
  border: none;
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
  align-self: center;
  transform: translateY(-6px);
}

.thread-delete svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: var(--danger);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}

.hint {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  max-width: 420px;
}

.approvals-panel {
  margin-bottom: 16px;
}

.approval-item {
  border: 1px solid #1f2a32;
  background: rgba(255, 255, 255, 0.02);
  padding: 12px;
  border-radius: 10px;
  margin-top: 10px;
}

.approval-title {
  font-weight: 600;
  margin-bottom: 6px;
}

.approval-details {
  font-size: 13px;
  color: var(--muted);
  white-space: pre-wrap;
  margin-bottom: 10px;
}

.approval-actions {
  display: flex;
  gap: 8px;
}

.approval-actions button.danger {
  background: var(--danger);
  color: #220404;
}

.input-grid {
  display: grid;
  gap: 8px;
}

.input-grid label {
  margin-bottom: 2px;
}

.footer {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.admin-users-list {
  display: grid;
  gap: 12px;
}

.admin-users-empty {
  color: var(--muted);
  font-size: 0.95rem;
}

.admin-user-card {
  border: 1px solid #1f2a32;
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.admin-user-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-user-email {
  font-weight: 600;
}

.admin-user-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-status,
.admin-role {
  font-size: 0.8rem;
  border: 1px solid #2d3b44;
  border-radius: 999px;
  padding: 2px 8px;
}

.status-pending {
  border-color: #c79000;
  color: #f6be2a;
}

.status-active {
  border-color: #1d9b5f;
  color: #45d08e;
}

.status-rejected,
.status-disabled {
  border-color: #ba3f54;
  color: #f07f93;
}

.admin-user-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--muted);
}

.admin-user-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-user-actions label {
  font-size: 0.85rem;
  color: var(--muted);
}

.admin-user-actions select {
  min-width: 120px;
}

.admin-user-fixed {
  font-size: 0.85rem;
  color: var(--muted);
}

@media (max-width: 720px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .row {
    flex-direction: column;
    align-items: stretch;
  }

  button {
    width: 100%;
  }
}
