/* ==========================================================================
   Remote Control page — matches the EdgyX dark violet site.
   Relies on the design tokens (colors, fonts, radii) defined in site.css,
   which is loaded before this file.
   ========================================================================== */

.remote-page { padding-top: 44px; padding-bottom: 88px; }

/* ---------- Hero ---------- */
.remote-hero { max-width: 720px; margin-bottom: 42px; }
.remote-hero h1 {
  font-family: var(--display); font-size: clamp(36px, 5.4vw, 60px);
  font-weight: 700; letter-spacing: -.02em; line-height: 1.02; margin-top: 4px;
}
.remote-hero h1 em {
  font-style: normal;
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.remote-hero p { margin-top: 18px; color: var(--text-2); font-size: 17px; line-height: 1.7; max-width: 54ch; }

/* ---------- Connection block ---------- */
.remote-connect {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: start;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
  padding: 42px;
}
.remote-connect::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 120% at 90% 10%, var(--glow), transparent 60%); opacity: .35;
}
.connect-copy { position: relative; }
.connect-copy h2 { font-family: var(--display); font-size: 25px; font-weight: 700; letter-spacing: -.01em; margin-top: 6px; }
.connect-copy p { margin-top: 12px; color: var(--text-2); font-size: 15px; line-height: 1.65; }
.connect-copy strong { color: var(--text); font-weight: 600; }
.connect-points { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 12px; }
.connect-points li { display: flex; align-items: center; gap: 11px; color: var(--text-2); font-size: 14px; }
.connect-points i { color: var(--accent-bright); font-size: 14px; width: 18px; text-align: center; }

.connect-card { position: relative; display: grid; gap: 18px; align-content: start; }
.remote-page .field { display: grid; gap: 8px; }
.remote-page label { font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.remote-page input {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line-2); color: var(--text);
  border-radius: var(--r-sm); padding: 14px; font-family: var(--sans); font-size: 15px; letter-spacing: .04em;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.remote-page input::placeholder { color: var(--text-3); letter-spacing: normal; }
.remote-page input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.remote-page .hint { font-size: 12.5px; color: var(--text-3); line-height: 1.55; }
.form-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Status pill ---------- */
#status {
  display: inline-flex; align-items: center; gap: 9px; margin: 26px 0 4px;
  font: 500 13.5px/1.4 var(--sans); letter-spacing: 0; color: var(--text-2);
}
#status::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
  background: var(--good);
}
#status.error { color: #fca5a5; }
#status.error::before { background: #f87171; }

/* ---------- Clients ---------- */
#clients { margin-top: 26px; display: grid; gap: 18px; }

.empty {
  padding: 62px 28px; text-align: center;
  border: 1px dashed var(--line-2); border-radius: var(--r-lg); background: var(--surface);
}
.empty-mark {
  display: inline-grid; place-items: center; width: 58px; height: 58px; margin-bottom: 16px;
  border-radius: 16px; background: var(--accent-soft); border: 1px solid var(--accent-line);
  color: var(--accent-bright); font-size: 24px;
}
.empty h2 { font-family: var(--display); font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.empty p { margin-top: 8px; color: var(--text-2); font-size: 14.5px; max-width: 42ch; margin-inline: auto; }

/* client card (built by remote.js) */
.client {
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); padding: 28px;
  transition: border-color .3s ease;
}
.client:hover { border-color: var(--accent-line); }
.client-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.client h2 { font-family: var(--display); font-size: 20px; font-weight: 700; letter-spacing: -.01em; margin: 0; }

.badge {
  flex-shrink: 0; font: 600 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase;
  padding: 7px 12px; border-radius: var(--r-pill);
  color: var(--good); background: rgba(52,211,153,.12); border: 1px solid rgba(52,211,153,.4);
}
.badge.offline { color: var(--warn); background: rgba(251,191,36,.10); border-color: rgba(251,191,36,.4); }

.meta { margin-top: 8px; color: var(--text-3); font-size: 13px; overflow-wrap: anywhere; }

.session-info {
  display: grid; grid-template-columns: 1fr 1fr; gap: 22px;
  margin: 24px 0; padding: 22px 0; border-block: 1px solid var(--line);
}
.session-info .eyebrow { display: block; margin-bottom: 8px; font-size: 11px; letter-spacing: .18em; }
.session-info p { margin: 0; color: var(--text); font-size: 14.5px; line-height: 1.5; overflow-wrap: anywhere; }

.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions button {
  background: rgba(255,255,255,0.04); color: var(--text-2); border: 1px solid var(--line-2);
  border-radius: var(--r-pill); padding: 9px 16px; font: 600 13px/1 var(--sans); cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease;
}
.actions button:hover:not(:disabled) { color: var(--text); border-color: var(--accent-line); background: rgba(139,92,246,.10); transform: translateY(-1px); }
.actions button:active:not(:disabled) { transform: translateY(0); }
.actions button:disabled { opacity: .4; cursor: default; }

.logs { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.logs summary { cursor: pointer; font-weight: 600; font-size: 13.5px; color: var(--text-2); list-style: none; display: inline-flex; align-items: center; gap: 8px; transition: color .2s ease; }
.logs summary::-webkit-details-marker { display: none; }
.logs summary::before { content: '\203A'; font-size: 16px; line-height: 1; transition: transform .25s var(--ease); }
.logs[open] summary { color: var(--text); }
.logs[open] summary::before { transform: rotate(90deg); }
.logs ul { list-style: none; padding: 0; margin: 14px 0 0; }
.logs li { font: 400 12.5px/1.6 var(--mono); color: var(--text-2); border-bottom: 1px solid var(--line); padding: 9px 0; overflow-wrap: anywhere; }
.logs li:last-child { border-bottom: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .remote-connect { grid-template-columns: 1fr; gap: 28px; padding: 30px; }
  .session-info { grid-template-columns: 1fr; gap: 14px; }
}
@media (max-width: 560px) {
  .remote-page { padding-top: 32px; }
  .remote-connect { padding: 24px; }
  .client { padding: 22px; }
  .client-top { align-items: flex-start; }
  .form-actions .btn { flex: 1 1 auto; }
  .actions button { flex: 1 1 auto; }
}

/* ---------- Entrance ---------- */
@media (prefers-reduced-motion: no-preference) {
  .client { animation: remoteEnter .3s var(--ease) both; }
  @keyframes remoteEnter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
}
