.v2-inbox,
.v2-share-confirmation {
  color: var(--text-primary, #f2f1f7);
}

.v2-inbox-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(140px, auto) auto auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.v2-inbox-toolbar input,
.v2-inbox-toolbar select,
.v2-share-confirmation input,
.v2-share-confirmation textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--border, #2b2933);
  border-radius: 6px;
  background: var(--surface, #17161c);
  color: inherit;
  padding: 9px 10px;
}

.v2-inbox-toolbar button,
.v2-share-actions button {
  min-height: 38px;
  border: 1px solid var(--border, #2b2933);
  border-radius: 6px;
  background: #211f28;
  color: inherit;
  padding: 0 12px;
  cursor: pointer;
}

.v2-inbox-toolbar button:focus-visible,
.v2-share-actions button:focus-visible,
.v2-inbox-toolbar input:focus-visible,
.v2-inbox-toolbar select:focus-visible,
.v2-share-confirmation input:focus-visible,
.v2-share-confirmation textarea:focus-visible {
  outline: 2px solid var(--accent-purple, #8e63d5);
  outline-offset: 2px;
}

.v2-inbox-list {
  border-top: 1px solid var(--border, #2b2933);
}

.v2-inbox-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 12px 4px;
  border-bottom: 1px solid var(--border, #2b2933);
}

.v2-inbox-row h3,
.v2-inbox-row p {
  margin: 0;
}

.v2-inbox-row h3 {
  font-size: 14px;
}

.v2-inbox-row p {
  margin-top: 4px;
  color: var(--text-muted, #8d8999);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.v2-inbox-excerpt {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.v2-inbox-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.v2-inbox-tags span,
.v2-inbox-status {
  border-radius: 4px;
  background: #302d38;
  color: var(--accent-yellow, #f4c95d);
  font-size: 11px;
  padding: 3px 6px;
}

.v2-inbox-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.v2-inbox-row-actions button {
  border: 1px solid var(--border, #2b2933);
  border-radius: 5px;
  background: #211f28;
  color: inherit;
  padding: 6px 8px;
}

.v2-share-confirmation {
  max-width: 760px;
}

.v2-share-confirmation label {
  display: block;
  margin-top: 12px;
}

.v2-share-confirmation label > span {
  display: block;
  margin-bottom: 6px;
  color: var(--text-muted, #8d8999);
  font-size: 12px;
}

.v2-share-warning {
  border-left: 3px solid var(--accent-yellow, #f4c95d);
  background: #26231c;
  padding: 9px 12px;
  color: #f5d989;
}

.v2-share-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.v2-share-actions [data-share-confirm] {
  border-color: var(--accent-purple, #8e63d5);
  background: var(--accent-purple, #8e63d5);
}

.v2-share-actions [data-share-confirm]:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.v2-excerpt-list,
.v2-strategy-list {
  border-top: 1px solid var(--border, #2b2933);
}

.v2-excerpt-row,
.v2-strategy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 14px 4px;
  border-bottom: 1px solid var(--border, #2b2933);
}

.v2-excerpt-heading,
.v2-strategy-heading,
.v2-stage-heading {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.v2-excerpt-row h3,
.v2-excerpt-row p,
.v2-strategy-row h3,
.v2-strategy-row p,
.v2-strategy-editor h3 {
  margin: 0;
}

.v2-excerpt-row h3,
.v2-strategy-row h3,
.v2-strategy-editor h3 {
  font-size: 14px;
}

.v2-excerpt-heading time,
.v2-excerpt-source,
.v2-strategy-row p {
  color: var(--text-muted, #8d8999);
  font-size: 12px;
}

.v2-excerpt-summary {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 6px !important;
  color: var(--text-primary, #f2f1f7);
  font-size: 13px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.v2-knowledge-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.v2-knowledge-tags span,
.v2-strategy-heading span {
  border-radius: 4px;
  background: #302d38;
  color: var(--accent-yellow, #f4c95d);
  font-size: 11px;
  padding: 3px 6px;
}

.v2-knowledge-toolbar,
.v2-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.v2-knowledge-toolbar {
  grid-template-columns: minmax(240px, 520px);
}

.v2-excerpt-editor,
.v2-strategy-editor {
  max-width: 920px;
}

.v2-excerpt-editor label,
.v2-strategy-editor section {
  display: block;
  margin-top: 14px;
}

.v2-excerpt-editor label > span {
  display: block;
  margin-bottom: 6px;
  color: var(--text-muted, #8d8999);
  font-size: 12px;
}

.v2-excerpt-editor input,
.v2-excerpt-editor textarea,
.v2-excerpt-editor select,
.v2-strategy-editor textarea,
.v2-strategy-editor select,
.v2-strategy-action input,
.v2-strategy-action select,
.v2-knowledge-toolbar input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--border, #2b2933);
  border-radius: 6px;
  background: var(--surface, #17161c);
  color: inherit;
  padding: 9px 10px;
}

.v2-strategy-editor > section {
  padding: 14px 0;
  border-top: 1px solid var(--border, #2b2933);
}

.v2-strategy-action {
  display: grid;
  grid-template-columns: 24px minmax(180px, 1fr) minmax(150px, 220px) auto;
  gap: 8px;
  align-items: center;
  margin-top: 9px;
}

.v2-strategy-action input[type="checkbox"] {
  width: 18px;
  height: 18px;
  padding: 0;
}

.v2-editor-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 18px;
}

@media (max-width: 640px) {
  .v2-inbox-toolbar {
    grid-template-columns: 1fr;
  }

  .v2-inbox-row {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .v2-inbox-status {
    grid-column: 2;
    justify-self: start;
  }

  .v2-share-actions button {
    flex: 1;
  }

  .v2-editor-grid,
  .v2-strategy-action {
    grid-template-columns: 1fr;
  }

  .v2-strategy-action input[type="checkbox"] {
    grid-row: 1;
  }

  .v2-excerpt-heading,
  .v2-strategy-heading {
    align-items: flex-start;
  }
}
