/* ROBIOS RUNTIME — agent run modal + interactive terminal input */

/* ---------- modal ---------- */
.rt-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(8, 10, 11, 0.72);
  display: grid; place-items: center;
  padding: 16px;
  opacity: 0; visibility: hidden;
  transition: opacity var(--dur-fast) var(--ease-ui),
              visibility 0s linear var(--dur-fast);
}
.rt-overlay.rt-open {
  opacity: 1; visibility: visible;
  transition: opacity var(--dur-fast) var(--ease-ui);
}
.rt-modal {
  width: min(640px, 100%);
  background: var(--bg-terminal);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-card-lg);
  box-shadow: var(--shadow-card-xl);
  overflow: hidden;
  transform: translateY(10px) scale(0.985);
  transition: transform var(--dur-med) var(--ease-pop);
}
.rt-overlay.rt-open .rt-modal { transform: none; }

.rt-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.rt-name {
  font-family: var(--font-display);
  font-size: 15px; font-weight: 700;
  text-transform: uppercase; letter-spacing: var(--ls-display);
}
.rt-status {
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 700;
  border-radius: var(--radius-badge);
  padding: 2px 8px;
  letter-spacing: 0.06em;
}
.rt-queued { background: var(--bg-white-10); color: var(--text-secondary); }
.rt-running { background: var(--accent-20); color: var(--accent); animation: rt-pulse 1.2s ease-in-out infinite; }
.rt-done { background: var(--accent); color: var(--accent-text-on); }
@keyframes rt-pulse { 50% { opacity: 0.55; } }
.rt-close {
  margin-left: auto;
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  color: var(--text-faint);
  transition: color var(--dur-fast) var(--ease-ui), background-color var(--dur-fast) var(--ease-ui);
}
.rt-close:hover { color: var(--text-primary); background: var(--bg-white-5); }

.rt-prompt {
  padding: 10px 16px 0;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  word-break: break-word;
}
.rt-log {
  padding: 10px 16px 14px;
  font-family: var(--font-mono);
  font-size: 13px; line-height: 1.75;
  color: var(--text-secondary);
  min-height: 180px; max-height: 300px;
  overflow-y: auto;
}
.rt-line { animation: rt-line-in 0.25s var(--ease-pop); }
@keyframes rt-line-in { from { opacity: 0; transform: translateY(4px); } }
.rt-ok { color: var(--text-secondary); }
.rt-ok::first-line { color: inherit; }
.rt-warn { color: var(--red-down); }
.rt-cmd { color: var(--accent); }

.rt-result {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 14px 16px 16px;
  background: #0D1011;
}
.rt-verdict { font-size: 14px; line-height: 1.55; color: var(--text-primary); white-space: pre-line; max-height: 260px; overflow-y: auto; }
.rt-rows {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 16px;
}
.rt-row {
  display: flex; justify-content: space-between; gap: 8px;
  font-size: 12.5px;
  padding: 6px 10px;
  background: var(--bg-white-5);
  border-radius: var(--radius-sm);
}
.rt-k { color: var(--text-faint); }
.rt-v { font-family: var(--font-mono); color: var(--text-primary); text-align: right; }
.rt-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.rt-actions .btn { height: 32px; }

.rt-install-box {
  margin-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 12px;
}
.rt-install-note { font-size: 12.5px; color: var(--text-secondary); }
.rt-install-pre {
  margin: 10px 0;
  background: var(--bg-terminal);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.6;
  color: #C9D1C4;
  overflow-x: auto;
  white-space: pre;
}
.rt-install-gh { height: 30px; font-size: 12px; }

@media (max-width: 560px) {
  .rt-rows { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .rt-running { animation: none; }
  .rt-line { animation: none; }
}

/* ---------- dropdown menus (command bar controls) ---------- */
.rt-menu {
  position: absolute;
  z-index: 120;
  min-width: 180px;
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card-xl);
  padding: 4px;
  animation: rt-line-in 0.15s var(--ease-pop);
}
.rt-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  font-size: 13px;
  color: var(--text-secondary);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  transition: background-color var(--dur-fast) var(--ease-ui), color var(--dur-fast) var(--ease-ui);
}
.rt-menu-item:hover { background: var(--bg-white-5); color: var(--text-primary); }
.rt-menu-item.active { color: var(--accent); }
.rt-menu-item.active::after { content: " ✓"; }

.rt-login-mm { width: 100%; margin-top: 10px; }

/* ---------- coming-soon + login modals ---------- */
.rt-soon-body { padding: 14px 16px 18px; }
.rt-soon-note { font-size: 14px; line-height: 1.55; color: var(--text-secondary); }
.rt-soon-road {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 12.5px; line-height: 1.9;
  color: var(--text-faint);
  border-left: 2px solid var(--accent-24);
  padding-left: 12px;
}
.rt-soon-road .rt-ok { color: var(--accent); }
.rt-wait { display: flex; gap: 8px; margin-top: 16px; }
.rt-wait input {
  flex: 1;
  height: 36px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-btn);
  padding: 0 12px;
  font-size: 13px;
  color: var(--text-primary);
}
.rt-wait input::placeholder { color: var(--text-faint); }
.rt-wait input:focus { outline: none; box-shadow: var(--ring-accent); }
.rt-login-out {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--accent);
}
.nav-user-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 7px;
  box-shadow: 0 0 6px var(--accent-glow);
}
.rt-claimed { background: var(--accent-20) !important; color: var(--accent) !important; cursor: default; }

/* ---------- interactive terminal input ---------- */
.sec-terminal .term-input-row {
  position: absolute;
  left: 32px; right: 32px; bottom: 44px;
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 14px;
}
.sec-terminal .term-ps1 { color: var(--accent); flex: none; }
.sec-terminal .term-input {
  flex: 1;
  background: none; border: 0; outline: none;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-primary);
  caret-color: var(--accent);
}
.sec-terminal .term-input::placeholder { color: var(--text-faint); }
.sec-terminal .term-warn { color: var(--red-down); }
@media (max-width: 760px) {
  .sec-terminal .term-input-row { left: 16px; right: 16px; }
}

/* ---------- sign in: email code + wallets (EIP-6963) ---------- */
.rt-auth { width: min(440px, 100%); }
.rt-auth-logo {
  width: 26px; height: 26px; flex: none;
  display: grid; place-items: center;
  border-radius: 7px;
  background: var(--accent); color: var(--accent-text-on);
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
}
.rt-auth-tabs {
  display: flex; gap: 4px;
  margin: 14px 18px 0;
  padding: 3px;
  background: var(--bg-card);
  border: 1px solid var(--bg-white-5);
  border-radius: 10px;
}
.rt-auth-tab {
  flex: 1; padding: 7px 0;
  border-radius: 8px;
  font-size: 12.5px; font-weight: 600;
  color: var(--text-secondary);
  transition: background-color var(--dur-fast) var(--ease-ui), color var(--dur-fast) var(--ease-ui);
}
.rt-auth-tab:hover { color: var(--text-primary); }
.rt-auth-tab.is-on { background: var(--bg-elevated); color: var(--text-primary); }
.rt-auth-body { padding: 16px 18px 18px; }
.rt-auth-label {
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 6px;
}
.rt-auth-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: var(--font-mono); font-size: 13px;
  color: var(--text-primary);
  outline: none;
  margin-bottom: 10px;
  transition: border-color var(--dur-fast) var(--ease-ui);
}
.rt-auth-input:focus { border-color: rgba(209, 254, 23, 0.5); }
.rt-auth-input::placeholder { color: var(--text-faint); }
.rt-auth-cta {
  display: block; width: 100%;
  background: var(--accent); color: var(--accent-text-on);
  font-weight: 700; font-size: 13px;
  border-radius: 10px;
  padding: 11px 0;
  transition: filter var(--dur-fast) var(--ease-ui);
}
.rt-auth-cta:hover { filter: brightness(1.06); }
.rt-auth-cta[disabled] { opacity: 0.6; pointer-events: none; }
.rt-auth-note {
  font-size: 12px; line-height: 1.55;
  color: var(--text-secondary);
  margin: 10px 0;
}
.rt-auth-note b { color: var(--text-primary); font-weight: 600; }
.rt-auth-cells { display: flex; gap: 8px; justify-content: space-between; margin: 4px 0 10px; cursor: text; }
.rt-auth-cell {
  width: 56px; height: 60px;
  display: grid; place-items: center;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  font-family: var(--font-mono); font-size: 24px; font-weight: 700;
  color: var(--text-primary);
}
.rt-auth-cell.filled { border-color: rgba(209, 254, 23, 0.5); }
.rt-auth-cell.cursor { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(209, 254, 23, 0.22); }
.rt-auth-codein { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.rt-auth-sub {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11.5px; color: var(--text-faint);
  margin-bottom: 12px;
}
.rt-auth-sub b { color: var(--text-secondary); font-weight: 500; }
.rt-auth-resend { color: var(--accent); font-size: 11.5px; }
.rt-auth-resend[disabled] { color: var(--text-faint); pointer-events: none; }
.rt-auth-alt { margin-top: 12px; text-align: center; font-size: 11.5px; color: var(--text-faint); }
.rt-auth-link {
  color: var(--text-secondary); font-size: 11.5px; font-weight: 500;
  border-bottom: 1px dotted var(--text-faint);
}
.rt-auth-link:hover { color: var(--text-primary); }
.rt-auth-err {
  margin-top: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 77, 77, 0.08);
  border: 1px solid rgba(255, 77, 77, 0.25);
  font-size: 12px; color: #FF9D9D;
}
.rt-auth-sect {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-faint);
  margin: 2px 0 8px;
}
.rt-auth-sect i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.rt-auth-sect:nth-of-type(2) i { display: none; }
.rt-auth-found { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.rt-auth-wrow {
  display: flex; align-items: center; gap: 11px;
  width: 100%; text-align: left;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 11px;
  padding: 9px 12px;
  transition: border-color var(--dur-fast) var(--ease-ui);
}
.rt-auth-wrow:hover { border-color: rgba(209, 254, 23, 0.4); }
.rt-auth-wic {
  width: 28px; height: 28px; flex: none;
  display: grid; place-items: center;
  border-radius: 8px;
  font-family: var(--font-mono); font-size: 13px; font-weight: 700;
  object-fit: contain;
}
.rt-auth-wnm { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.rt-auth-wtag {
  margin-left: auto;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.06em;
  color: var(--accent);
  border: 1px solid rgba(209, 254, 23, 0.35);
  border-radius: 5px;
  padding: 2px 7px;
}
.rt-auth-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.rt-auth-wcell {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--bg-white-5);
  border-radius: 11px;
  padding: 11px 4px 9px;
  text-decoration: none;
  transition: border-color var(--dur-fast) var(--ease-ui);
}
.rt-auth-wcell:hover { border-color: rgba(255, 255, 255, 0.2); }
.rt-auth-wcell .rt-auth-wic { width: 30px; height: 30px; }
.rt-auth-wcell span { font-size: 10.5px; font-weight: 500; color: var(--text-secondary); }
.rt-auth-wcell em { font-style: normal; font-family: var(--font-mono); font-size: 8.5px; color: var(--text-faint); }
.rt-auth-wcell em.go { color: var(--accent); }
@media (max-width: 480px) {
  .rt-auth-cell { width: 44px; height: 52px; font-size: 20px; }
  .rt-auth-grid { grid-template-columns: repeat(3, 1fr); }
}
