/* Infinite Cloud portal: builds on the recorder's app.css (same light design tokens). */

/* ---------- sign in ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: min(420px, 100%); padding: 32px 28px; }
.auth-card .brand { padding: 0 0 24px; }
.auth-card h1 { margin: 0 0 6px; font-size: 22px; letter-spacing: -.02em; }
.auth-card p.lead { margin: 0 0 22px; color: var(--muted); }
.auth-card form { display: flex; flex-direction: column; gap: 14px; }
.auth-card .btn.primary { width: 100%; min-height: 44px; margin-top: 4px; }
.auth-switch { margin-top: 18px; text-align: center; font-size: 14px; color: var(--muted); }
.auth-switch button { border: 0; background: none; color: var(--brand); font-weight: 600; cursor: pointer; padding: 4px; }
.form-error { color: var(--bad-text); font-size: 13px; min-height: 18px; }

/* ---------- top bar layout ---------- */
.top {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 14px;
  height: 64px; padding: 0 24px; background: var(--panel); border-bottom: 1px solid var(--line);
}
.top .brand { padding: 0; }
.top .who { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); min-width: 0; }
.top .who span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page { max-width: 1160px; margin: 0 auto; padding: 28px 24px 56px; }
.crumb { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 500; margin-bottom: 10px; }
.crumb svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }

/* ---------- site cards ---------- */
.sites { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.site { padding: 20px; display: flex; flex-direction: column; gap: 14px; cursor: pointer; transition: box-shadow .15s, transform .15s; }
.site:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.site-top { display: flex; align-items: flex-start; gap: 12px; }
.site-icon {
  width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center; flex: none;
}
.site-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.site-name { font-weight: 650; font-size: 16px; }
.site-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.site-top .pill { margin-left: auto; }
.site-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.site-stats div { background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.site-stats .k { font-size: 12px; color: var(--muted); }
.site-stats .v { font-size: 18px; font-weight: 700; margin-top: 2px; }

/* ---------- recorder page ---------- */
.notice {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px;
  background: var(--brand-soft); color: #173a99; font-size: 14px; margin-bottom: 20px;
}
.notice svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; margin-top: 1px; }
.notice.warn { background: var(--warn-bg); color: var(--warn-text); }
.two { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; word-break: break-word; }
.links { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.code-input { font-size: 20px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; text-align: center; }

/* ---------- ISUP captures ---------- */
.cap { padding: 14px 20px; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.cap:last-child { border-bottom: 0; }
.cap-head { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.cap pre {
  margin: 10px 0 0; padding: 10px 12px; background: var(--bg); border-radius: 8px; overflow-x: auto;
  font-size: 12px; line-height: 1.5; white-space: pre-wrap; word-break: break-all;
}


@media (max-width: 820px) {
  .two { grid-template-columns: 1fr; }
  .top { padding: 0 16px; }
  .page { padding: 22px 16px 48px; }
  .top .who span { display: none; }
}
.ico { display: contents; }
.muted { color: var(--muted); font-size: 14px; }
.form-error:empty { display: none; }

/* ---------- viewer ---------- */
dialog.viewer { width: min(1100px, calc(100vw - 32px)); }
.viewer .dlg-head { gap: 12px; padding-bottom: 14px; }
.v-site { color: var(--muted); font-size: 14px; }
.v-screen { position: relative; background: var(--video); aspect-ratio: 16 / 9; }
.v-video { width: 100%; height: 100%; display: block; background: var(--video); }
.v-status { position: absolute; inset: 0; display: grid; place-items: center; color: #c3cad6; text-align: center; padding: 24px; pointer-events: none; }
.v-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 20px 18px; }
.v-bar .input { min-height: 36px; width: auto; }
.v-sep { width: 1px; height: 24px; background: var(--line); margin: 0 4px; }
.v-info { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
