/* Mismo diseño que la app local (webapp/styles.css): modo oscuro, acento lima, tarjetas y barra de pestañas. */
:root {
  color-scheme: dark;
  --bg-0: #0f1113; --surface-1: #1a1c1f; --surface-3: #2b2f34; --surface-4: #23262a;
  --border-1: #2a2e33; --border-2: #3a3f45; --border-3: #2f3338;
  --text-1: #f7f7f8; --text-2: #d0d1d4; --text-3: #a8abb0; --ink: #0f1113;
  --accent: #d1fe17; --ok: #4ade80; --danger: #f87171; --slate-600: #50555b;
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-pill: 999px;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg-0); color: var(--text-1); font: 15px/1.6 var(--font-sans); }
a { color: inherit; }
button, input { font-family: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Encabezado */
.studio-header { min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 8px 28px; border-bottom: 1px solid var(--border-1); background: var(--bg-0); }
.studio-brand { display: flex; align-items: center; gap: 14px; min-width: 0; text-decoration: none; }
.studio-brand__logo { flex: none; width: 42px; height: 42px; border-radius: 10px; object-fit: cover; display: block; }
.studio-brand__title { font-weight: 900; font-size: 20px; letter-spacing: -0.5px; line-height: 1.2; }
.studio-brand__title .accent { color: var(--accent); }
.studio-brand__tagline { font-size: 12px; color: var(--text-3); }
.studio-nav { display: flex; align-items: center; gap: 18px; font-size: 13px; flex-wrap: wrap; }
.studio-nav a { color: var(--text-3); text-decoration: none; font-weight: 600; }
.studio-nav a:hover { color: var(--text-1); }
.user-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: var(--r-pill); background: var(--surface-3); border: 1px solid var(--border-2); font-weight: 700; font-size: 13px; }
.user-chip:empty { display: none; }
.user-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }

/* Armazón: panel de control + columna lateral */
.studio-main { flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: 24px; display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.studio-controls { min-width: 0; overflow: hidden; background: var(--surface-1); border-radius: var(--r-lg); }
.studio-tabs { display: flex; border-bottom: 1px solid var(--border-1); }
.studio-tab { flex: 1; padding: 16px 10px; text-align: center; font-weight: 600; font-size: 13px; color: var(--text-3); border-bottom: 2px solid transparent; }
.studio-tab[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.studio-tab-body { padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.studio-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* Tarjetas */
.card-dark { background: var(--surface-4); border: 1px solid var(--border-3); border-radius: var(--r-lg); padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.card-dark h2, .card-dark h3 { margin: 0; font-size: 15px; }
.pill { align-self: flex-start; background: var(--accent); color: var(--ink); font-size: 12px; font-weight: 900; letter-spacing: .4px; padding: 3px 10px; border-radius: var(--r-pill); }

/* Contenido */
h1 { margin: 0; font-size: clamp(24px, 4vw, 32px); line-height: 1.2; letter-spacing: -0.5px; }
p { margin: 0; }
.hint, .small { color: var(--text-3); font-size: 13px; }
code { background: var(--surface-3); padding: 1px 6px; border-radius: 6px; font: .9em var(--font-mono); }
.btn-primary { align-self: flex-start; display: inline-block; background: var(--accent); color: var(--ink); border: 0; border-radius: 10px; padding: 12px 24px; font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none; }
.btn-primary:disabled { background: var(--slate-600); color: var(--text-3); cursor: not-allowed; }
.who { display: flex; align-items: center; gap: 12px; }
.who img { border-radius: 50%; border: 2px solid var(--border-2); }
.who strong { font-size: 16px; }
.drop { display: block; border: 2px dashed var(--border-2); border-radius: var(--r-md); padding: 26px 16px; text-align: center; cursor: pointer; color: var(--text-2); background: var(--surface-1); }
.drop:hover { border-color: var(--accent); }
.drop input { display: none; }
progress { width: 100%; height: 8px; accent-color: var(--accent); }
.msg { min-height: 1.5em; font-size: 13px; }
.msg.ok { color: var(--ok); }
.msg.err { color: var(--danger); }
.actions { display: flex; gap: 18px; flex-wrap: wrap; padding-top: 4px; border-top: 1px solid var(--border-1); }
.link { background: none; border: 0; padding: 8px 0 0; color: var(--text-3); text-decoration: underline; cursor: pointer; font-size: 13px; }
.link.danger { color: var(--danger); }
.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; color: var(--text-2); font-size: 14px; }
.perms { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; color: var(--text-2); font-size: 13px; }

/* Páginas de texto (términos y privacidad) */
.doc { width: 100%; max-width: 820px; margin: 24px auto; padding: 28px; background: var(--surface-1); border-radius: var(--r-lg); }
.doc h1 { margin-bottom: 4px; }
.doc h2 { margin: 26px 0 0; font-size: 17px; }
.doc p, .doc li { color: var(--text-2); }
.doc p { margin-top: 8px; }
.doc ul { margin: 8px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.doc a { color: var(--accent); }

footer { text-align: center; padding: 20px 16px; border-top: 1px solid var(--border-1); color: var(--text-3); font-size: 13px; }
footer a { color: var(--text-2); }

@media (max-width: 960px) { .studio-main { grid-template-columns: minmax(0, 1fr); padding: 16px; } }
@media (max-width: 480px) { .studio-header { padding: 8px 16px; } .studio-brand__tagline { display: none; } .doc { margin: 16px; width: auto; padding: 20px; } }
