/* Leo Dashboard — control plane */

.dash-body {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 70% 40% at 50% -10%, rgba(26, 92, 66, 0.12), transparent 60%),
    var(--paper);
}

.dash-shell {
  width: min(100% - 2rem, 1080px);
  margin-inline: auto;
  padding-bottom: 3rem;
}

.dash-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0 1.25rem;
}

.dash-top .meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--mute);
  font-size: 0.92rem;
}

.dash-hero {
  padding: 0.5rem 0 1.5rem;
}

.dash-hero h1 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3rem);
  letter-spacing: -0.045em;
  line-height: 0.95;
}

.dash-hero p {
  margin: 0;
  color: var(--mute);
  max-width: 46ch;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.stat {
  padding: 1rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--white) 75%, transparent);
}

.stat .label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
}

.stat .value {
  margin-top: 0.25rem;
  font-family: var(--font-display);
  font-size: 1.8rem;
  letter-spacing: -0.03em;
}

.panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.panel-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.app-table {
  width: 100%;
  border-collapse: collapse;
}

.app-table th,
.app-table td {
  padding: 0.85rem 0.35rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.app-table th {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
  font-weight: 700;
}

.app-table a {
  font-weight: 650;
  text-decoration: none;
}

.app-table a:hover {
  text-decoration: underline;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.key-box {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  margin: 0.75rem 0 1rem;
  padding: 0.85rem 0.95rem;
  border-radius: var(--radius);
  background: #0b1210;
  color: #d7e5dc;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  word-break: break-all;
}

.live-room {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}

.live-room:last-child {
  border-bottom: 0;
}

.live-room .title {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.live-room .sub {
  color: var(--mute);
  font-size: 0.92rem;
}

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
  background:
    radial-gradient(ellipse 60% 50% at 70% 20%, rgba(214, 255, 63, 0.14), transparent 55%),
    linear-gradient(165deg, var(--field-deep), var(--field) 55%, #0a2f22);
  color: var(--white);
}

.login-card {
  width: min(100%, 420px);
  padding: 1.6rem 1.4rem;
  border: 1px solid rgba(247, 250, 247, 0.14);
  border-radius: calc(var(--radius) + 4px);
  background: rgba(7, 38, 28, 0.55);
  backdrop-filter: blur(10px);
}

.login-card h1 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: -0.04em;
}

.login-card .lede {
  margin: 0 0 1.2rem;
  color: rgba(247, 250, 247, 0.7);
}

.login-card label {
  display: block;
  margin: 0.75rem 0 0.35rem;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(247, 250, 247, 0.65);
}

.login-card .field {
  width: 100%;
  background: rgba(247, 250, 247, 0.96);
  color: var(--ink);
}

.login-card .btn {
  width: 100%;
  margin-top: 1.1rem;
}

.login-error {
  margin-top: 0.75rem;
  color: #ffb39a;
  font-size: 0.92rem;
  min-height: 1.2em;
}

.empty {
  color: var(--mute);
  padding: 0.5rem 0 0.25rem;
}

/* ---- Leo Studio (Photon + Supabase layout) ---- */
.studio-body {
  min-height: 100vh;
  background: #f3f5f2;
}

.studio {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 100vh;
}

.studio-nav {
  background: #0c1a15;
  color: #e8f0ea;
  padding: 1.1rem 0.85rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.studio-brand {
  color: #fff !important;
  text-decoration: none;
  font-size: 1.15rem;
  padding: 0.25rem 0.45rem;
}

.studio-role {
  margin: 0 0.45rem 0.85rem;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(232, 240, 234, 0.45);
}

.studio-nav .nav-item {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(232, 240, 234, 0.78);
  text-align: left;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.studio-nav .nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.studio-nav .nav-item.active {
  background: rgba(214, 255, 63, 0.16);
  color: #d6ff3f;
}

.studio-foot {
  margin-top: auto;
  padding: 1rem 0.45rem 0;
  display: grid;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: rgba(232, 240, 234, 0.65);
}

.studio-foot a {
  color: #d6ff3f;
  text-decoration: none;
}

.studio-main {
  padding: 1.35rem 1.5rem 2.5rem;
  max-width: 1100px;
}

.studio-main h1 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.04em;
}

.studio-main .lede {
  margin: 0 0 1.25rem;
  color: var(--mute);
  max-width: 60ch;
}

.ccu-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 88px;
  padding: 0.5rem 0;
}

.ccu-chart i {
  flex: 1;
  min-width: 2px;
  background: linear-gradient(180deg, #1a5c42, #d6ff3f);
  border-radius: 2px 2px 0 0;
  opacity: 0.85;
}

.detail-drawer {
  margin-top: 0.85rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.detail-drawer pre {
  margin: 0.5rem 0 0;
  max-height: 280px;
  overflow: auto;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  background: #0b1210;
  color: #d7e5dc;
  padding: 0.75rem;
  border-radius: 8px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}

.tabs button {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
}

.tabs button.active {
  background: #0c1a15;
  color: #d6ff3f;
  border-color: #0c1a15;
}

@media (max-width: 860px) {
  .studio {
    grid-template-columns: 1fr;
  }
  .studio-nav {
    position: sticky;
    top: 0;
    z-index: 5;
  }
  .stat-row {
    grid-template-columns: 1fr;
  }
}

