/*
 * ClawPad PWA — Page Layouts
 */

/* ── Shared: Header Logo ──────────────────────────── */

.header-logo {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  vertical-align: middle;
  margin-right: 8px;
  flex-shrink: 0;
}

/* ── Enroll Page ───────────────────────────────────── */

.page-enroll {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: 32px 24px;
  text-align: center;
}
.enroll-logo {
  width: 80px;
  height: 80px;
  margin-bottom: 24px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.enroll-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.enroll-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 8px;
}
.enroll-subtitle {
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 32px;
  max-width: 300px;
}
.enroll-code-inputs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}
.enroll-digit {
  width: 44px;
  height: 52px;
  background: var(--input-bg);
  border: 2px solid var(--input-border);
  border-radius: var(--radius-lg);
  color: var(--ink);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 22px;
  font-weight: 600;
  text-align: center;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
}
.enroll-digit:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(242, 201, 76, 0.15);
}
.enroll-error {
  color: var(--danger);
  font-size: 13px;
  margin-top: -12px;
  margin-bottom: 16px;
}
.enroll-btn {
  width: 100%;
  max-width: 300px;
  padding: 14px;
  border-radius: var(--radius-lg);
  border: none;
  background: var(--gradient-brand, var(--btn-primary));
  color: var(--btn-primary-text);
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
  box-shadow: var(--shadow-glow);
}
.enroll-btn:active {
  transform: scale(0.97);
}
.enroll-btn:disabled {
  opacity: 0.4;
  cursor: default;
}
.enroll-step-text {
  font-size: 13px;
  color: var(--ink-muted);
  margin-top: 24px;
  line-height: 1.6;
}
.enroll-step-text strong {
  color: var(--ink-soft);
}

/* ── Projects Page ─────────────────────────────────── */

.page-projects {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.projects-header {
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.projects-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.projects-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-soft);
}
.projects-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ── Chat Page ─────────────────────────────────────── */

.page-chat {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.chat-messages-wrap {
  flex: 1;
  position: relative;
  overflow: hidden;
  min-height: 0;
}
.chat-messages {
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 0;
  display: flex;
  flex-direction: column;
}
.chat-messages-spacer {
  flex: 1;
}

/* Date separator */
.date-separator {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
}
.date-separator span {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-muted);
  background: var(--surface);
  padding: 3px 12px;
  border-radius: var(--radius-full);
  letter-spacing: 0.3px;
}

/* ── Search Page ───────────────────────────────────── */

.page-search {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.search-results {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.search-result-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.search-result-item:active {
  background: var(--hover-bg);
}
.search-result-project {
  font-size: 12px;
  color: var(--brand);
  font-weight: 500;
  margin-bottom: 2px;
}
.search-result-text {
  font-size: 14px;
  color: var(--ink);
}
.search-result-text mark {
  background: rgba(242, 201, 76, 0.3);
  color: var(--ink);
  border-radius: 2px;
  padding: 0 1px;
}

/* Search scope tabs */
.search-scope-bar {
  display: flex;
  gap: 8px;
  padding: 4px 16px 12px;
}
.scope-chip {
  padding: 6px 16px;
  border-radius: var(--radius-full, 999px);
  font-size: 13px;
  font-weight: 500;
  background: var(--surface);
  color: var(--ink-soft);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}
.scope-chip.active {
  background: var(--gradient-brand, var(--brand));
  color: var(--ink-on-brand);
  border-color: transparent;
  box-shadow: var(--shadow-sm);
}

/* Search result grouped header */
.search-group-header {
  padding: 10px 16px 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 1;
}

/* Search result time */
.search-result-time {
  font-size: 11px;
  color: var(--ink-muted);
  margin-top: 4px;
}

/* Search history */
.search-history {
  padding: 8px 0;
}
.search-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
}
.search-history-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.search-clear-history {
  background: none;
  border: none;
  color: var(--brand);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  padding: 4px 8px;
  -webkit-tap-highlight-color: transparent;
}
.search-history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  color: var(--ink-soft);
  font-size: 14px;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.search-history-item:active {
  background: var(--hover-bg);
}

/* ── Jobs Page ─────────────────────────────────────── */

.page-jobs {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.jobs-header {
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.jobs-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.jobs-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.jobs-filter-bar {
  display: flex;
  gap: 8px;
  padding: 0 16px 12px;
  overflow-x: auto;
}
.jobs-filter-chip {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  background: var(--surface);
  color: var(--ink-soft);
  border: 1px solid var(--line);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}
.jobs-filter-chip.active {
  background: var(--gradient-brand, var(--brand));
  color: var(--ink-on-brand);
  border-color: transparent;
  box-shadow: var(--shadow-sm);
}

/* ── Job Detail Page ──────────────────────────────── */

.page-job-detail {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.page-job-detail .header-more {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink-soft);
  -webkit-tap-highlight-color: transparent;
}
.jd-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.jd-info-section {
  padding: 16px;
}
.jd-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.jd-cadence {
  font-size: 13px;
  color: var(--ink-muted);
}
.jd-brief {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin-bottom: 16px;
}
.jd-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.jd-meta-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  transition: background 0.15s;
}
.jd-meta-label {
  display: block;
  font-size: 11px;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 4px;
}
.jd-meta-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}
.jd-section {
  padding: 0 16px 16px;
}
.jd-section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 24px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--line);
  border-radius: 1px;
}
.timeline-item {
  position: relative;
  padding-bottom: 16px;
}
.timeline-item:last-child {
  padding-bottom: 0;
}
.timeline-dot {
  position: absolute;
  left: -20px;
  top: 5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ink-muted);
  border: 2px solid var(--bg, #0B1020);
  z-index: 1;
}
.timeline-dot.ok { background: var(--ok); }
.timeline-dot.danger { background: var(--danger); }
.timeline-content { }
.timeline-text {
  font-size: 13px;
  color: var(--ink);
  line-height: 1.45;
}
.timeline-time {
  font-size: 11px;
  color: var(--ink-muted);
  margin-top: 4px;
}

/* Run Cards */
.jd-run-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 8px;
}
.jd-run-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.jd-run-time {
  font-size: 12px;
  color: var(--ink-muted);
}
.jd-run-summary {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.4;
}
.jd-run-duration {
  font-size: 11px;
  color: var(--ink-muted);
  margin-top: 4px;
}

/* ── Settings Page ─────────────────────────────────── */

.page-settings {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.settings-header {
  padding: 16px;
}
.settings-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.settings-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  padding: 0 16px 16px;
}
.theme-swatch {
  aspect-ratio: 1;
  border-radius: 12px;
  border: 2px solid transparent;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: border-color 0.15s;
}
.theme-swatch.active {
  border-color: var(--brand);
}
.theme-swatch-inner {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
}
.theme-swatch-top {
  flex: 1;
}
.theme-swatch-accent {
  height: 4px;
}
.theme-swatch-label {
  font-size: 10px;
  color: var(--ink-muted);
  text-align: center;
  margin-top: 4px;
}

/* Connection info card */
.connection-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin: 0 16px 12px;
}
.connection-card-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.connection-card-value {
  font-size: 14px;
  font-family: 'IBM Plex Mono', monospace;
  color: var(--ink);
  word-break: break-all;
}

.disconnect-btn {
  display: block;
  width: calc(100% - 32px);
  margin: 16px auto 32px;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--btn-danger);
  background: transparent;
  color: var(--btn-danger);
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
.disconnect-btn:active {
  background: rgba(228, 92, 92, 0.1);
  transform: scale(0.98);
}

/* ── Auto-Connect Page ────────────────────────────── */

.page-auto-connect {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: 32px 24px;
  text-align: center;
}
.ac-logo {
  width: 72px;
  height: 72px;
  margin-bottom: 24px;
  border-radius: 18px;
  overflow: hidden;
}
.ac-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ac-title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 8px;
}
.ac-status {
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 24px;
  min-height: 20px;
}
.ac-spinner-wrap {
  margin-bottom: 24px;
}
.ac-error {
  max-width: 320px;
}
.ac-error-text {
  font-size: 14px;
  color: var(--danger);
  line-height: 1.5;
}
.ac-hosts {
  margin-top: 24px;
  max-width: 300px;
}
.ac-hosts-title {
  font-size: 12px;
  color: var(--ink-muted);
  margin-bottom: 8px;
}
.ac-host-item {
  font-size: 13px;
  font-family: 'IBM Plex Mono', monospace;
  color: var(--ink-soft);
  padding: 4px 0;
}

/* ── Telegram Link Page ──────────────────────────── */

.page-tg-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: 32px 24px;
  text-align: center;
}
.tgl-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--ink-soft);
}
.tgl-icon--linked {
  background: rgba(0, 200, 117, 0.12);
  color: #00c875;
}
.tgl-title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 8px;
}
.tgl-subtitle {
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 28px;
  max-width: 320px;
  line-height: 1.5;
}
.tgl-subtitle strong {
  color: var(--ink);
}
.tgl-qr-wrap {
  width: 220px;
  height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 16px;
  margin-bottom: 24px;
  padding: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.tgl-qr-svg {
  width: 100% !important;
  height: 100% !important;
}
.tgl-qr-label {
  font-size: 13px;
  color: var(--ink-muted);
  margin-top: 8px;
}
.tgl-error {
  max-width: 320px;
}
.tgl-error-text {
  font-size: 14px;
  color: var(--danger);
  line-height: 1.5;
}
.tgl-actions {
  width: 100%;
  max-width: 300px;
}
.tgl-unlink-btn {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--btn-danger);
  background: transparent;
  color: var(--btn-danger);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.tgl-back-link {
  margin-top: 24px;
  background: none;
  border: none;
  color: var(--ink-soft);
  font-size: 14px;
  cursor: pointer;
  padding: 8px 16px;
  font-family: inherit;
}
.tgl-bot-input {
  margin-top: 16px;
  margin-bottom: 8px;
  max-width: 300px;
  width: 100%;
  text-align: left;
}
.tgl-label {
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 6px;
  display: block;
}

/* Settings: Telegram button in connection card */
.tgl-settings-btn {
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid var(--brand);
  background: transparent;
  color: var(--brand);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.tgl-settings-btn:active {
  background: rgba(var(--brand-rgb, 100, 140, 255), 0.1);
}

/* ── Local Intelligence Cards ─────────────────────── */

.intel-desc {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin-bottom: 12px;
}

.intel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.intel-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius-md);
  padding: 12px;
  text-align: center;
}

.intel-card-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}

.intel-card-label {
  font-size: 11px;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-top: 4px;
}

.intel-trend {
  font-size: 12px;
  font-family: 'IBM Plex Mono', monospace;
  color: var(--ink-soft);
  padding: 0 2px;
}

.intel-trend-sub {
  font-size: 12px;
  color: var(--ink-muted);
  padding: 2px 2px 0;
}

/* ── TTS Toggle ──────────────────────────────────── */

.cp-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.cp-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.cp-toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s;
}
.cp-toggle-slider::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
}
.cp-toggle input:checked + .cp-toggle-slider {
  background: var(--brand);
}
.cp-toggle input:checked + .cp-toggle-slider::before {
  transform: translateX(20px);
}

/* Range slider */
.cp-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100px;
  height: 4px;
  background: var(--line);
  border-radius: 2px;
  outline: none;
}
.cp-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: var(--brand);
  border-radius: 50%;
  cursor: pointer;
}

/* ── TTS Chat Button ─────────────────────────────── */

.tts-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  color: var(--ink-muted);
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.tts-btn:active {
  background: rgba(255, 255, 255, 0.12);
  color: var(--brand);
}
.tts-btn.playing {
  color: var(--brand);
  background: rgba(var(--brand-rgb, 100, 140, 255), 0.12);
}
.tts-btn svg {
  width: 16px;
  height: 16px;
}

/* ── Ticket Connect Page ─────────────────────────── */

.page-ticket-connect {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: 32px 24px;
  text-align: center;
}
.tc-logo {
  margin-bottom: 16px;
}
.tc-title {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}
.tc-subtitle {
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 24px;
  max-width: 320px;
  line-height: 1.5;
}
.tc-input {
  width: 100%;
  max-width: 340px;
  padding: 14px;
  border-radius: var(--radius-lg);
  border: 2px solid var(--input-border);
  background: var(--input-bg);
  color: var(--ink);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  resize: none;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  margin-bottom: 16px;
}
.tc-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(242, 201, 76, 0.12);
}
.tc-input::placeholder {
  color: var(--ink-muted);
}
.tc-connect-btn {
  max-width: 340px;
  margin-bottom: 16px;
}
.tc-status {
  font-size: 13px;
  color: var(--ink-soft);
  min-height: 20px;
  margin-bottom: 24px;
}
.tc-status--error {
  color: var(--danger);
}
.tc-instructions {
  max-width: 320px;
  text-align: left;
}
.tc-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.4;
}
.tc-step strong {
  color: var(--ink);
}
.tc-step code {
  background: var(--surface);
  padding: 2px 8px;
  border-radius: 6px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  color: var(--brand);
}
.tc-step-num {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--ink-on-brand, #fff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
}
.tc-download-hint {
  max-width: 340px;
  margin-top: 20px;
}
.tc-download-divider {
  height: 1px;
  background: var(--line, rgba(255,255,255,0.08));
  margin-bottom: 14px;
}
.tc-download-text {
  font-size: 13px;
  color: var(--ink-muted);
  text-align: center;
  margin: 0;
}
.tc-download-link {
  color: var(--brand);
  text-decoration: none;
  font-weight: 500;
}
.tc-download-link:active {
  opacity: 0.7;
}

/* ── Extensions Page ──────────────────────────────── */

.page-extensions {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.ext-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 0;
}
.ext-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin: 0 16px 8px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.ext-card:active {
  background: var(--hover-bg);
  transform: scale(0.98);
}
.ext-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.ext-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--hover-bg) 0%, var(--surface) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  flex-shrink: 0;
}
.ext-info {
  flex: 1;
  min-width: 0;
}
.ext-name {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 2px;
}
.ext-desc {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.35;
}
.ext-tools-count {
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 8px;
  padding-left: 48px;
}
.ext-tools-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ext-tool-item {
  background: var(--hover-bg);
  border-radius: 8px;
  padding: 8px 12px;
}
.ext-tool-name {
  font-size: 13px;
  font-weight: 500;
  font-family: 'IBM Plex Mono', monospace;
  color: var(--brand);
}
.ext-tool-desc {
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 2px;
}

/* ── About Page ───────────────────────────────────── */

.page-about {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.about-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.about-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 16px 24px;
  text-align: center;
  background: var(--gradient-surface, transparent);
}
.about-logo {
  margin-bottom: 12px;
}
.about-app-name {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}
.about-version {
  font-size: 14px;
  color: var(--ink-muted);
  font-family: 'IBM Plex Mono', monospace;
}
.about-section {
  padding: 0 16px 16px;
}
.about-section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.about-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.about-row:last-child { border-bottom: none; }
.about-label {
  font-size: 14px;
  color: var(--ink-soft);
}
.about-value {
  font-size: 14px;
  color: var(--ink);
}
.about-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
}
.about-link:last-child { border-bottom: none; }
.about-link svg { color: var(--ink-muted); }
.about-footer {
  text-align: center;
  padding: 24px 16px 40px;
  font-size: 13px;
  color: var(--ink-soft);
}
.about-footer p { margin: 4px 0; }

/* ── Settings Navigation Items ────────────────────── */

.settings-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  margin: 0 16px 2px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.settings-nav-item:active {
  background: var(--hover-bg);
  transform: scale(0.98);
}
.settings-nav-item span:first-child {
  font-size: 15px;
  color: var(--ink);
}
.settings-nav-item svg {
  color: var(--ink-muted);
}

/* ── Load More (Infinite Scroll) ────────────────── */

.load-more-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.load-more-spinner {
  width: 22px;
  height: 22px;
  border: 2px solid var(--line);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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