/* Cloud control plane pages – builds on /static/css/app.css */

.auth-wrap { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: min(460px, 100%); padding: 28px; }
.auth-card.wide { width: min(640px, 100%); }
.auth-card .logo { height: 44px; display: block; margin: 0 auto 18px; }
.auth-card h1 { text-align: center; font-size: 22px; }
.auth-card .sub { text-align: center; margin-bottom: 22px; }
.auth-foot { text-align: center; margin-top: 18px; font-size: 14px; }
.auth-foot a { color: var(--accent-text); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .two { grid-template-columns: 1fr; } }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.banner { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; font-size: 14px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.banner.warn { background: var(--amber-soft); color: var(--amber); }
.banner.info { background: var(--accent-soft); color: var(--accent-text); }
.banner.bad { background: rgba(239, 75, 107, .14); color: var(--red); }
.banner .btn { margin-left: auto; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 10px 14px; color: var(--muted); font-weight: 600; font-size: 14px; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.on { color: var(--text); border-bottom-color: var(--accent); }

.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl a { color: var(--accent-text); text-decoration: none; }
.tbl a:hover { text-decoration: underline; }
.tbl .actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }

.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.stat .v small { font-size: 13px; color: var(--muted); font-weight: 500; margin-left: 4px; }
.stat.good .v { color: var(--green); }
.stat.warn .v { color: var(--amber); }
.stat.bad .v { color: var(--red); }

.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 20px; }
@media (max-width: 480px) { .chart-grid { grid-template-columns: 1fr; } }
.chart { padding: 8px 12px 12px; }
.chart svg { width: 100%; height: 200px; display: block; }
.chart .axis { stroke: var(--line-2); stroke-width: 1; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .legend { display: flex; gap: 14px; font-size: 12px; color: var(--text-2); padding: 0 4px 6px; flex-wrap: wrap; }
.chart .legend i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.chart .nodata { height: 200px; display: grid; place-items: center; color: var(--muted); font-size: 13px; }

.timing td:first-child { color: var(--muted); width: 34%; }
.lvl-error { color: var(--red); font-weight: 600; }
.lvl-warning { color: var(--amber); font-weight: 600; }
.inline-form { padding: 20px; display: grid; gap: 16px; border-bottom: 1px solid var(--line); }
.tokenbox { font-family: var(--mono); font-size: 13px; padding: 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line-2); word-break: break-all; }
.qr-img { width: 180px; height: 180px; background: #fff; border-radius: 12px; padding: 8px; }
.user-chip { font-size: 13px; color: var(--text-2); }

/* phones */
@media (max-width: 720px) {
  .topbar { flex-wrap: wrap; gap: 8px 12px; padding: 10px 16px; }
  .topbar .brand-side, .topbar .user-chip { display: none; }
  .topbar .nav { order: 3; width: 100%; margin-left: 0; overflow-x: auto; }
  .page { padding: 18px 16px 48px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chart-grid { grid-template-columns: minmax(0, 1fr); }
  .card-head { flex-wrap: wrap; }
}

/* speaker studio */
.studio { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
@media (max-width: 1050px) { .studio { grid-template-columns: minmax(0, 1fr); } }
.steps { display: grid; gap: 10px; padding: 16px 20px; }
.step { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.step .n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--surface-3); flex: none; }
.step.done { color: var(--text-2); }
.step.done .n { background: var(--green-soft); color: var(--green); }
.step.now { color: var(--text); font-weight: 600; }
.step.now .n { background: var(--accent-soft); color: var(--accent-text); }
.screen .hidden, .hidden { display: none !important; }
.devices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 16px 18px; }
@media (max-width: 560px) { .devices { grid-template-columns: 1fr; } }

/* the hidden attribute must win over display rules like label.field { display: flex } */
[hidden] { display: none !important; }

/* help tooltips: ⓘ next to field labels and dashboard numbers (hover, tap or keyboard focus) */
.tip { position: relative; display: inline-grid; place-items: center; width: 15px; height: 15px; margin-left: 6px;
  border-radius: 50%; border: 1px solid var(--line-3); color: var(--muted); font: italic 700 10px/1 Georgia, serif;
  cursor: help; vertical-align: 1px; user-select: none; }
.tip:hover, .tip:focus { color: var(--accent-text); border-color: var(--accent); outline: none; }
.tip::after { content: attr(data-tip); position: absolute; z-index: 60; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%);
  width: max-content; max-width: min(280px, 78vw); padding: 9px 11px; border-radius: 10px; background: var(--text); color: var(--bg);
  font: 400 12.5px/1.45 var(--font); font-style: normal; text-align: left; white-space: normal; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: opacity .12s; }
.tip:hover::after, .tip:focus::after { opacity: 1; }
.stat .l .tip::after, .devices .tip::after { left: 0; transform: none; }
