/* App-shell reset (box-sizing, html/body sizing, body font/bg/color,
   #root height) comes from pues.css `style.reset`. dojos-specific extras
   only. The TopBar, FilterBar, Legendum, Dialog, drag, and button
   (`.pues-*`) classes all come from pues.css defaults. */
html {
  scrollbar-gutter: stable;
}
body {
  -webkit-font-smoothing: antialiased;
}
#root {
  max-width: 100%;
  margin: 0 auto;
}

/* Lists */
.list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--pues-border-default);
  cursor: pointer;
  background: var(--pues-bg-surface);
  min-height: 56px;
}
.list-item:active {
  background: var(--pues-bg-raised);
}
.list-item-content {
  flex: 1;
  min-width: 0;
}
.list-item-title {
  font-weight: 500;
  color: var(--pues-text-primary);
}
.list-item-meta {
  font-size: 14px;
  color: var(--pues-text-secondary);
  margin-top: 2px;
}
.list-item--no-border {
  border-bottom: none;
}

/* Swipe row (Edit + Delete reveal) */
.row-wrap {
  list-style: none;
  margin: 0;
  overflow: hidden;
  border-bottom: 1px solid var(--pues-border-default);
}
.row-slider {
  display: flex;
  width: 100%;
  transition: transform 0.15s ease-out;
  touch-action: pan-y;
}
.row-edit,
.row-delete {
  flex-shrink: 0;
  width: 72px;
  padding: 0 8px;
  border: none;
  border-radius: 0;
  color: white;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.row-edit {
  background: #3b82f6;
}
.row-edit:hover {
  background: #60a5fa;
}
.row-edit:active {
  background: #2563eb;
}
.row-delete {
  background: #dc2626;
}
.row-delete:hover {
  background: #ef4444;
}
.row-delete:active {
  background: #b91c1c;
}

/* Screens / shared */
.screen-loading {
  padding: 24px;
  text-align: center;
  color: var(--pues-text-secondary);
}
.app-root-panel--hidden {
  display: none;
}
.empty-state-hint {
  padding: 16px;
  color: var(--pues-text-muted);
  text-align: center;
  margin: 0;
}
.empty-state-hint code {
  font-size: 0.9em;
  background: var(--pues-bg-page);
  padding: 0.12em 0.4em;
  border-radius: 4px;
}

/* Forms / dialogs (content classes; framework `.pues-dialog-*` is pues.css) */
.input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--pues-border-default);
  border-radius: 8px;
  background: var(--pues-bg-surface);
  color: var(--pues-text-primary);
  font-size: 16px;
}
.input::placeholder {
  color: var(--pues-text-muted);
}
.form-button-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.form-button-row--end {
  justify-content: flex-end;
}
.dialog-lede {
  margin: 0 0 16px;
}

/* Dojo detail screen */
.detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px 8px;
  border-bottom: 1px solid var(--pues-border-default);
}
.detail-back {
  flex-shrink: 0;
}
.detail-title {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--pues-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Review rows */
.list-item--review {
  cursor: default;
}
.review-number {
  color: var(--pues-text-muted);
  font-variant-numeric: tabular-nums;
}
.review-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.review-state {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.review-state--open {
  background: #14532d;
  color: #bbf7d0;
}
.review-state--merged {
  background: #4c1d95;
  color: #ddd6fe;
}
.review-state--closed {
  background: #334155;
  color: #cbd5e1;
}
.review-conflicted {
  color: var(--pues-danger-text);
  font-size: 12px;
}
.review-actor {
  color: var(--pues-text-secondary);
  font-size: 12px;
}

/* Settings → public-keys section */
.key-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.key-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--pues-border-default);
  border-radius: 8px;
  background: var(--pues-bg-surface);
}
.key-row-main {
  flex: 1;
  min-width: 0;
}
.key-comment {
  font-size: 13px;
  font-weight: 500;
  color: var(--pues-text-primary);
}
.key-fp {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
  color: var(--pues-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.key-remove {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--pues-text-muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.key-remove:hover {
  background: var(--pues-bg-raised);
  color: var(--pues-danger-text);
}
.key-input {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 13px;
  resize: vertical;
  word-break: break-all;
}
.key-flash {
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--pues-success);
}
.key-msg {
  margin: 16px 0 0;
  font-size: 13px;
}
.key-msg--error {
  color: var(--pues-danger-text);
}

/* Install dialog: copy hint on the command block */
.pues-dialog-code .install-copy-hint {
  float: right;
  margin-left: 12px;
  font-size: 11px;
  color: var(--pues-text-muted);
}
