/* ═══════════════════════════════════════════════════════════════════════
   NANI — Page Styles
   Settings, prompts, feedback, admins, pagination
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Page info callout ────────────────────────────────────────────────── */
.page-info {
  display: flex;
  gap: 14px;
  padding: 16px 20px;
  margin-bottom: 24px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--border);
  border-left: 3px solid var(--text-muted);
  border-radius: 0 10px 10px 0;
}
.page-info > svg,
.page-info > i { flex-shrink: 0; width: 18px; height: 18px; color: var(--text-muted); margin-top: 1px; }
.page-info p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-dim);
  margin: 0 0 6px;
}
.page-info p:last-child { margin-bottom: 0; }
.page-info strong { color: var(--text); font-weight: 600; }
.page-info code {
  font-size: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
}

/* Welcome page info */
.welcome-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 28px;
  text-align: left;
  max-width: 420px;
}
.welcome-info-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
}
.welcome-info-item svg,
.welcome-info-item i { flex-shrink: 0; width: 18px; height: 18px; color: var(--text-muted); margin-top: 1px; }

.welcome-info-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 8px;
}
.welcome-info-heading:first-child { margin-top: 0; }
.welcome-info-heading svg,
.welcome-info-heading i { width: 15px; height: 15px; }

/* ── Settings page ───────────────────────────────────────────────────── */
.settings-page { max-width: 960px; }

.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.settings-header h1 { margin-bottom: 0; }
.settings-preset { width: 200px; }
.settings-preset .input { font-size: 13px; }

.settings-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px 28px;
  margin-bottom: 20px;
  transition: border-color .2s;
}
.settings-section:hover { border-color: var(--border-l); }

.section-heading {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.section-icon {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  border-radius: 10px;
  flex-shrink: 0;
  color: var(--text-dim);
}
.section-icon svg { width: 20px; height: 20px; }
.section-title-lg {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .3px;
  color: #fff;
  margin-bottom: 2px;
}
.section-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.settings-grid:last-child { margin-bottom: 0; }

.setting-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 16px;
  transition: border-color .2s;
}
.settings-grid .setting-item { margin-bottom: 0; }
.setting-item:last-child { margin-bottom: 0; }
.setting-item:hover { border-color: var(--border-l); }

.setting-item .field-label { margin-bottom: 2px; }
.setting-item .field-hint { margin-bottom: 10px; }
.setting-item .input,
.setting-item select,
.setting-item textarea { background: var(--surface); }

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.toggle-row .field-hint { margin-bottom: 0; }

/* Save bar */
.settings-save-section {
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
  border-color: var(--border-l);
}

/* Settings badge */
.settings-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
}
.settings-badge.global {
  background: rgba(255,255,255,.08);
  color: var(--text-muted);
}
.settings-badge.custom {
  background: rgba(200,170,110,.15);
  color: var(--gold);
}

/* Settings actions bar */
.settings-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.settings-actions-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Range slider restyle */
.settings-page .range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  outline: none;
  margin-top: 8px;
}
.settings-page .range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px; height: 18px;
  background: #fff;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,.3);
  transition: transform .15s;
}
.settings-page .range::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}
.settings-page .range::-moz-range-thumb {
  width: 18px; height: 18px;
  background: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,.3);
}

@media (max-width: 768px) {
  .settings-grid { grid-template-columns: 1fr; }
  .settings-header { flex-direction: column; align-items: stretch; }
  .settings-preset { width: 100%; }
  .settings-save-bar { flex-direction: column; align-items: stretch; }
  .settings-section { padding: 18px; }
}

/* ── Prompts page ────────────────────────────────────────────────────── */
.prompts-page { max-width: 960px; }

.prompts-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.prompts-header h1 { margin-bottom: 4px; }
.prompts-header-sub {
  font-size: 13px;
  color: var(--text-muted);
}
.prompts-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.prompt-save-status {
  font-size: 12px;
  font-weight: 500;
  transition: color .2s;
}
.prompt-save-status.unsaved { color: var(--gold); }
.prompt-save-status.saved { color: var(--success); }
.prompt-save-status.error { color: var(--danger); }

.prompt-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 20px;
  overflow: hidden;
  transition: border-color .2s;
}
.prompt-section:hover { border-color: var(--border-l); }

.prompt-section-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.prompt-icon {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  border-radius: 10px;
  flex-shrink: 0;
  color: var(--text-dim);
}
.prompt-icon svg { width: 20px; height: 20px; }

.prompt-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .3px;
  color: #fff;
  margin-bottom: 2px;
}
.prompt-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.prompt-content {
  padding: 20px 24px;
}

.prompt-editor {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text);
  resize: vertical;
  min-height: 180px;
  max-height: 500px;
  outline: none;
  transition: border-color .2s;
}
.prompt-editor:focus { border-color: var(--accent); }
.prompt-editor::-webkit-scrollbar { width: 6px; }
.prompt-editor::-webkit-scrollbar-track { background: transparent; }
.prompt-editor::-webkit-scrollbar-thumb { background: var(--border-l); border-radius: 3px; }
.prompt-editor::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── Feedback page ───────────────────────────────────────────────────── */
.feedback-page { max-width: 960px; }

.feedback-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.feedback-header h1 { margin-bottom: 4px; }
.feedback-header-sub {
  font-size: 13px;
  color: var(--text-muted);
}

/* ── Feedback table ──────────────────────────────────────────────────── */
.row-between { display: flex; align-items: center; justify-content: space-between; }

.fb-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.fb-table th, .fb-table td {
  text-align: left; padding: 10px 12px;
  border-bottom: 1px solid var(--border); vertical-align: top;
}
.fb-table th {
  font-weight: 600; color: var(--text-muted);
  font-size: 11px; text-transform: uppercase; letter-spacing: .5px;
}
.fb-table .actions { display: flex; gap: 6px; white-space: nowrap; align-items: center; }
.fb-table .fb-category { width: auto; min-width: 100px; padding: 4px 8px; font-size: 12px; }
.fb-table .fb-human-translation {
  display: block;
  padding: 6px 8px;
  font-size: 13px;
  min-width: 140px;
  border-radius: 4px;
  outline: none;
  transition: background .15s;
  cursor: text;
}
.fb-table .fb-human-translation:hover { background: var(--surface-2); }
.fb-table .fb-human-translation:focus { background: var(--bg); outline: 1px solid var(--border-l); }
.fb-table .fb-human-translation.empty:empty::before {
  content: attr(data-placeholder);
  color: var(--text-muted);
}
.fb-section-title { font-size: 18px; font-weight: 700; margin-top: 32px; margin-bottom: 4px; }
.fb-section-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }

/* ── Pagination ──────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 16px;
}
.pg-btn {
  min-width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: 1px solid var(--border);
  border-radius: 6px; color: var(--text-dim);
  font-size: 13px; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.pg-btn:hover:not(:disabled) { border-color: var(--border-l); color: var(--text); background: var(--surface-2); }
.pg-btn.active { background: #fff; color: #111; border-color: #fff; font-weight: 600; }
.pg-btn:disabled { opacity: .3; cursor: not-allowed; }

/* ── Admins page ─────────────────────────────────────────────────────── */
.admins-page { max-width: 960px; }

.admins-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.admins-header h1 { margin-bottom: 4px; }
.admins-header-sub {
  font-size: 13px;
  color: var(--text-muted);
}

.admin-add-form {
  display: flex;
  gap: 10px;
  align-items: center;
}
.admin-add-form .input { flex: 1; }

.admin-add-status {
  margin-top: 8px;
  font-size: 13px;
  min-height: 20px;
}
.admin-add-status.success { color: var(--success); }
.admin-add-status.error { color: var(--danger); }

.admin-cards {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.admin-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 8px;
  transition: background .15s;
}
.admin-card:hover { background: var(--surface-2); }
.admin-email {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text);
}
.admin-email svg { width: 16px; height: 16px; color: var(--text-muted); }
.admin-remove {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none;
  color: var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
  transition: color .15s, background .15s;
  opacity: 0;
}
.admin-card:hover .admin-remove { opacity: 1; }
.admin-remove:hover { color: var(--danger); background: rgba(204,68,68,.12); }
.admin-remove svg { width: 15px; height: 15px; }

/* ── Proposals page ──────────────────────────────────────────────────── */
.proposal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 16px;
  transition: border-color .2s;
}
.proposal-card:hover { border-color: var(--border-l); }

.proposal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.proposal-author {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text);
}
.proposal-author svg { width: 16px; height: 16px; color: var(--text-muted); }
.proposal-actions { display: flex; gap: 8px; }

.diff-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.diff-table th {
  text-align: left;
  padding: 6px 10px;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .5px;
  border-bottom: 1px solid var(--border);
}
.diff-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.diff-label { color: var(--text-dim); font-weight: 500; white-space: nowrap; vertical-align: top; }
.diff-from { color: var(--danger); }
.diff-arrow { text-align: center; color: var(--text-muted); width: 30px; }
.diff-to { color: var(--success); }

/* Inline word-diff (git PR style) */
.diff-inline {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-dim);
  word-break: break-word;
}
.diff-del {
  background: rgba(204, 68, 68, .2);
  color: var(--danger);
  text-decoration: line-through;
  text-decoration-color: rgba(204, 68, 68, .5);
  border-radius: 3px;
  padding: 1px 2px;
}
.diff-ins {
  background: rgba(68, 204, 68, .2);
  color: var(--success);
  text-decoration: none;
  border-radius: 3px;
  padding: 1px 2px;
}
