/* AgentDeck — mobile PWA styles (dark theme) */

:root {
  --bg: #0b0f14;
  --panel: #121823;
  --panel-2: #1a2230;
  --panel-3: #222c3d;
  --border: #243044;
  --text: #e6edf3;
  --muted: #8b98a8;
  --dim: #5c6878;
  --accent: #4f8cff;
  --accent-2: #2f6fe0;
  --green: #3ddc84;
  --amber: #f5b542;
  --red: #ff5d5d;
  --purple: #a78bfa;
  --radius: 12px;
  --radius-sm: 8px;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Segoe UI", Roboto, "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

body { overflow: hidden; }

.hidden { display: none !important; }

.app {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.noscript { padding: 40px 20px; text-align: center; color: var(--muted); }

.boot {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
}
.boot-logo { font-size: 24px; font-weight: 700; color: var(--text); letter-spacing: 0.5px; }

a { color: var(--accent); text-decoration: none; }

/* ---- generic layout ---- */

.view {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: calc(var(--sat) + 6px) calc(var(--sar) + 10px) 6px calc(var(--sal) + 10px);
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  flex: none;
  min-height: 44px;
}
.topbar .title {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  font-size: 17px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar .title .sub {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar .spacer { flex: 1; }

.content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px calc(var(--sar) + 12px) calc(var(--sab) + 24px) calc(var(--sal) + 12px);
}
.content.tight { padding-top: 6px; }

.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 8px; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.mono { font-family: var(--mono); }
.center { text-align: center; }
.mt { margin-top: 12px; }
.mb { margin-bottom: 12px; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pre { white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; }
.clamp1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.clamp3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }

.section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.4px;
  margin: 14px 2px 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title:first-child { margin-top: 2px; }
.section-title.alert { color: var(--amber); }

.empty {
  padding: 28px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.error-text { color: var(--red); font-size: 14px; }
.ok-text { color: var(--green); font-size: 14px; }

/* ---- buttons ---- */

.btn {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  min-width: 44px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  line-height: 1.2;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  white-space: nowrap;
}
.btn:active { background: var(--panel-3); }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn.primary:active { background: var(--accent-2); }
.btn.danger { background: rgba(255, 93, 93, 0.12); border-color: rgba(255, 93, 93, 0.5); color: var(--red); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.sm { min-height: 44px; min-width: 44px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn.icon { padding: 0; width: 44px; font-size: 20px; }
.btn.block { width: 100%; }
.btn.chip-btn { border-radius: 999px; }

.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-row .btn { flex: 1; }

/* ---- inputs ---- */

input, textarea, select {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  font-size: 16px; /* 16px prevents iOS zoom on focus */
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  min-height: 44px;
  width: 100%;
  outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
input::placeholder, textarea::placeholder { color: var(--dim); }
textarea { resize: none; line-height: 22px; }
select {
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 32px;
}
label.field { display: block; margin-bottom: 12px; }
label.field > span.lbl { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.field-hint { font-size: 12px; color: var(--dim); margin-top: 4px; }

.switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  cursor: pointer;
  touch-action: manipulation;
}
.switch input { position: absolute; opacity: 0; width: 0; height: 0; min-height: 0; }
.switch .track {
  width: 50px; height: 30px; border-radius: 999px; background: var(--panel-3); border: 1px solid var(--border);
  position: relative; transition: background 0.15s;
}
.switch .track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; transition: transform 0.15s;
}
.switch input:checked + .track { background: var(--green); border-color: var(--green); }
.switch input:checked + .track::after { transform: translateX(20px); }

/* ---- banner / toasts ---- */

.banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  padding: calc(var(--sat) + 6px) 12px 6px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  background: var(--amber);
  color: #1a1200;
}
.banner.down { background: var(--red); color: #fff; }

.toasts {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(var(--sab) + 70px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 90;
  pointer-events: none;
  padding: 0 16px;
}
.toast {
  pointer-events: auto;
  max-width: 100%;
  background: #2a3447;
  color: var(--text);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toast-in 0.18s ease-out;
}
.toast.err { background: #4a1f1f; border: 1px solid rgba(255, 93, 93, 0.5); }
.toast.ok { background: #1c3a2a; border: 1px solid rgba(61, 220, 132, 0.4); }
.toast.warn { background: #3d2f12; border: 1px solid rgba(245, 181, 66, 0.5); cursor: pointer; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---- sheets & modals ---- */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fade-in 0.15s ease-out;
}
.backdrop.center { align-items: center; padding: 20px; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.sheet {
  width: 100%;
  max-width: 640px;
  max-height: 88dvh;
  background: var(--panel);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 18px 18px 0 0;
  padding: 10px 16px calc(var(--sab) + 16px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: sheet-in 0.2s ease-out;
}
@keyframes sheet-in { from { transform: translateY(40px); opacity: 0.6; } to { transform: none; opacity: 1; } }
.sheet .grabber { width: 40px; height: 4px; border-radius: 2px; background: var(--border); margin: 0 auto 12px; }
.sheet-title { font-size: 17px; font-weight: 600; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.sheet-title .grow { flex: 1; }

.modal {
  width: 100%;
  max-width: 360px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 16px 14px;
  animation: sheet-in 0.15s ease-out;
}
.modal .msg { font-size: 16px; line-height: 1.5; word-break: break-word; margin-bottom: 16px; white-space: pre-wrap; }

/* ---- PIN pad ---- */

.pin-display {
  display: flex;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  align-items: center;
  margin: 8px 0 6px;
}
.pin-dot {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--muted);
}
.pin-dot.on { background: var(--text); border-color: var(--text); }
.pin-input {
  position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; pointer-events: none;
}
.pin-hint { text-align: center; min-height: 20px; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.pin-hint.err { color: var(--red); }
.pin-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 320px;
  margin: 0 auto;
}
.pin-pad .btn { min-height: 56px; font-size: 22px; font-weight: 500; }
.pin-pad .btn.fn { font-size: 15px; }

/* ---- status dots, badges, pills, chips ---- */

.dot {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  background: var(--dim); flex: none;
}
.dot.green { background: var(--green); box-shadow: 0 0 0 3px rgba(61, 220, 132, 0.18); }
.dot.amber { background: var(--amber); box-shadow: 0 0 0 3px rgba(245, 181, 66, 0.18); }
.dot.grey { background: var(--dim); }
.dot.sm { width: 8px; height: 8px; }

.badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 6px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.3px;
  color: #fff; background: #556;
  text-transform: lowercase;
  flex: none;
}
.badge[data-agent="claude"] { background: #d97757; color: #1b0f08; }
.badge[data-agent="codex"] { background: #10a37f; color: #04150f; }
.badge[data-agent="zcode"] { background: #7c5cff; }
.badge[data-agent="kimi"] { background: #3b82f6; }
.badge[data-agent="grok"] { background: #e6edf3; color: #111; }
.badge[data-agent="cursor"] { background: #a78bfa; color: #160f2a; }
.badge[data-agent="traex"] { background: #f59e0b; color: #1f1400; }
.badge[data-agent="omp"] { background: #ec4899; }

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
  background: var(--panel-3); color: var(--muted);
  flex: none;
  white-space: nowrap;
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.working { background: rgba(79, 140, 255, 0.18); color: #86b1ff; }
.pill.needs_you { background: rgba(245, 181, 66, 0.2); color: var(--amber); }
.pill.idle { background: rgba(139, 152, 168, 0.18); color: var(--muted); }
.pill.ended { background: rgba(92, 104, 120, 0.2); color: var(--dim); }
.pill.working::before { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.tag {
  display: inline-block; padding: 1px 6px; border-radius: 5px;
  font-size: 11px; color: var(--muted); background: var(--panel-3); border: 1px solid var(--border);
  white-space: nowrap;
}
.tag.ok { color: var(--green); border-color: rgba(61, 220, 132, 0.35); }
.tag.warn { color: var(--amber); border-color: rgba(245, 181, 66, 0.35); }

.chips {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 8px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--muted);
  font: inherit; font-size: 14px;
  touch-action: manipulation;
  cursor: pointer;
}
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---- home ---- */

.lockstate {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 8px;
  font: inherit; font-size: 13px; color: var(--muted);
  background: none; border: none;
  border-radius: 10px;
  cursor: pointer;
  touch-action: manipulation;
  white-space: nowrap;
}
.lockstate.unlocked { color: var(--green); }

.node-head {
  display: flex; align-items: center; gap: 8px;
  margin: 16px 2px 8px;
  flex-wrap: wrap;
}
.node-head .name { font-weight: 600; font-size: 15px; }
.node-head .meta { font-size: 12px; color: var(--muted); }
.node-head .caps { display: flex; gap: 4px; }
.node-head.offline .name { color: var(--muted); }
.node-actions { display: flex; gap: 6px; margin-left: auto; }

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 10px;
}
.card.tappable { cursor: pointer; }
.card.tappable:active { background: var(--panel-2); }
.card.needs { border-color: rgba(245, 181, 66, 0.55); box-shadow: 0 0 0 1px rgba(245, 181, 66, 0.15) inset; }
.card.ended { opacity: 0.6; }
.card .head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.card .proj { flex: 1; min-width: 0; font-size: 14px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .proj .branch { color: var(--muted); font-size: 13px; }
.card .ttl { margin-top: 6px; font-size: 15px; font-weight: 500; }
.card .tool { margin-top: 6px; font-size: 13px; color: #86b1ff; font-family: var(--mono); }
.card .pending {
  margin-top: 8px; padding: 8px 10px; border-radius: 8px;
  background: rgba(245, 181, 66, 0.1); border: 1px solid rgba(245, 181, 66, 0.3);
  font-size: 14px;
}
.card .pending .ptext { white-space: pre-wrap; word-break: break-word; }
.card .pending .yn { display: flex; gap: 8px; margin-top: 8px; }
.card .pending .yn .btn { flex: 1; }
.card .last { margin-top: 8px; font-size: 13px; color: var(--muted); white-space: pre-wrap; }
.card .foot { margin-top: 6px; font-size: 12px; color: var(--dim); display: flex; gap: 8px; }

/* ---- session detail ---- */

.sess-head {
  padding: 8px 12px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
  flex: none;
}
.sess-head .line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sess-head .pending {
  margin-top: 8px; padding: 8px 10px; border-radius: 8px;
  background: rgba(245, 181, 66, 0.1); border: 1px solid rgba(245, 181, 66, 0.3);
  color: var(--text); font-size: 14px;
}
.sess-head .pending .yn { display: flex; gap: 8px; margin-top: 8px; }
.sess-head .pending .yn .btn { flex: 1; }

.timeline {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.entry { display: flex; flex-direction: column; max-width: 100%; }
.entry .meta { font-size: 11px; color: var(--dim); margin: 0 6px 2px; }
.entry.user { align-items: flex-end; }
.entry.user .bubble {
  background: var(--accent); color: #fff;
  border-radius: 14px 14px 4px 14px;
  max-width: 88%;
}
.entry.assistant { align-items: flex-start; }
.entry.assistant .bubble {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 14px 14px 14px 4px;
  max-width: 94%;
}
.bubble {
  padding: 8px 12px;
  font-size: 15px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  font-variant-ligatures: none;
}
.entry.tool .tool-row {
  display: flex; align-items: baseline; gap: 6px;
  padding: 4px 8px; font-size: 13px; color: var(--muted);
  font-family: var(--mono);
  border-left: 2px solid var(--border);
  word-break: break-word; overflow-wrap: anywhere;
}
.entry.tool .tool-row .name { color: #86b1ff; font-weight: 600; flex: none; }
.entry.result .result-row {
  font-size: 13px; color: var(--muted);
  border-left: 2px solid var(--border);
  padding: 2px 8px;
}
.entry.result .result-row .toggle {
  background: none; border: none; color: var(--accent); font: inherit; font-size: 13px;
  padding: 6px 0; min-height: 44px; cursor: pointer; touch-action: manipulation;
}
.entry.result .result-row pre {
  margin: 4px 0 0; font-family: var(--mono); font-size: 12px; line-height: 1.4;
  white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; color: var(--text);
  max-height: 60vh; overflow: auto;
}
.entry.system .sys { font-size: 12px; color: var(--dim); text-align: center; padding: 2px 8px; }

.composer {
  flex: none;
  border-top: 1px solid var(--border);
  background: var(--panel);
  padding: 8px 10px calc(var(--sab) + 8px);
}
.composer .input-row { display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { flex: 1; min-height: 44px; max-height: 158px; line-height: 22px; padding: 10px 12px; }
.composer .disabled-note { font-size: 13px; color: var(--muted); padding: 8px 4px; text-align: center; }

.keybar {
  display: flex; gap: 6px; overflow-x: auto; padding: 8px 0 0;
  scrollbar-width: none;
}
.keybar::-webkit-scrollbar { display: none; }
.keybar .btn { flex: none; min-height: 40px; padding: 0 12px; font-size: 14px; font-family: var(--mono); }
.keybar .btn.wide { padding: 0 16px; }
.keybar .btn.ctrl { color: var(--red); }

/* ---- terminal ---- */

.term-view .topbar { padding-bottom: 6px; }
.term-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: #000;
  position: relative;
}
.term-host { display: inline-block; min-width: 100%; vertical-align: top; }
.term-wrap .xterm { padding: 4px 6px; }
.term-wrap .xterm .xterm-viewport { overscroll-behavior: contain; }
.term-snapshot {
  margin: 0;
  padding: 6px 8px calc(var(--sab) + 6px);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.3;
  color: #d8dee9;
  background: #000;
  white-space: pre;
  min-height: 100%;
  min-width: max-content;
}
.term-overlay {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 10px; background: rgba(0, 0, 0, 0.7); color: var(--text); font-size: 14px; padding: 20px; text-align: center;
}
.term-bottom {
  flex: none;
  background: var(--panel);
  border-top: 1px solid var(--border);
  padding: 6px 10px calc(var(--sab) + 6px);
}
.term-bottom .keybar { padding-top: 0; }
.term-bottom .snap-input { display: flex; gap: 8px; margin-top: 6px; }
.term-bottom .snap-input input { font-family: var(--mono); }

/* ---- remote browser ---- */

.bview .topbar { gap: 6px; }
.bview .url {
  flex: 1; min-width: 0; min-height: 40px; padding: 6px 10px; font-size: 14px; border-radius: 10px;
}
.bview .statusline {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 12px; font-size: 12px; color: var(--muted);
  background: var(--panel); border-bottom: 1px solid var(--border);
  flex: none;
}
.bview .statusline .ttl { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.bview .statusline .stats { font-family: var(--mono); flex: none; }
.bview-canvas-wrap {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.bview-canvas-wrap canvas {
  display: block;
  touch-action: none;
  width: 100%;
  height: 100%;
  background: #111;
}
.bview-canvas-wrap.desktop canvas { height: auto; max-height: 100%; }
.bview-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: rgba(0, 0, 0, 0.65); color: var(--text); font-size: 14px; padding: 20px; text-align: center;
}
.bview-bottom {
  flex: none;
  display: flex; gap: 6px; align-items: center;
  padding: 6px 10px calc(var(--sab) + 6px);
  background: var(--panel); border-top: 1px solid var(--border);
}
.bview-bottom .btn { flex: none; }
.bview-bottom .btn.grow { flex: 1; }
.tab-list .tab-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 0; border-bottom: 1px solid var(--border);
}
.tab-list .tab-item .info { flex: 1; min-width: 0; cursor: pointer; }
.tab-list .tab-item .info .t { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tab-list .tab-item .info .u { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tab-list .tab-item.current .info .t { color: var(--accent); }

/* ---- screenshots ---- */

.shot { margin-bottom: 16px; }
.shot img { width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--border); display: block; background: #000; }
.shot .cap { font-size: 12px; color: var(--muted); margin-top: 6px; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---- lists (settings, projects, devices) ---- */

.list { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.list .item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; min-height: 52px;
  border-bottom: 1px solid var(--border);
}
.list .item:last-child { border-bottom: none; }
.list .item .info { flex: 1; min-width: 0; }
.list .item .info .t { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list .item .info .s { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list .item.tappable { cursor: pointer; }
.list .item.tappable:active { background: var(--panel-2); }
.list .item.selected { background: rgba(79, 140, 255, 0.12); }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 13px; }
.kv .k { color: var(--muted); white-space: nowrap; }
.kv .v { word-break: break-all; }

.project-pick { max-height: 40dvh; overflow-y: auto; -webkit-overflow-scrolling: touch; }

.result-box {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px; font-size: 14px; white-space: pre-wrap; word-break: break-word;
}

/* ---- enroll ---- */

.enroll {
  max-width: 420px; margin: 0 auto; width: 100%;
  padding: calc(var(--sat) + 32px) 20px calc(var(--sab) + 24px);
}
.enroll h1 { font-size: 26px; margin: 0 0 4px; }
.enroll .lead { color: var(--muted); margin-bottom: 20px; font-size: 14px; }

@media (min-width: 700px) {
  .content, .timeline { padding-left: calc(var(--sal) + 20px); padding-right: calc(var(--sar) + 20px); }
}
