/* Enjambre — estilos v0 (19 ago 2026).
   Tokens de cristal esmerilado ("liquid glass") adaptados de karen-app/static/styles.css -
   misma técnica (superficies translúcidas + blur + brillo de borde), acento miel (#F5B700)
   para distinguirlo de Karen (naranja) a simple vista. Sin build, sin framework. */

:root {
  color-scheme: light;
  --bg: #F3F4F7;
  --surface: #FFFFFF;
  --surface2: #EAECF1;
  --border: #DDE1E7;
  --text: #171A21;
  --text-dim: #565F6D;
  --accent: #F5B700;
  --accent-ink: #2A1A00;
  --accent-soft: rgba(245, 183, 0, 0.13);
  --accent-line: rgba(245, 183, 0, 0.48);
  --ok: #0B7A3E;
  --warn: #C62828;

  --glass: rgba(255, 255, 255, 0.55);
  --glass-strong: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(20, 22, 30, 0.09);
  --glass-blur: blur(18px) saturate(135%);
  --glass-shine: rgba(255, 255, 255, 0.85);
  --glass-shadow: 0 16px 34px -18px rgba(20, 22, 35, 0.16), 0 1px 0 0 var(--glass-shine) inset;

  --blob-honey: rgba(245, 183, 0, 0.25);
  --blob-blue: rgba(90, 140, 255, 0.22);
  --blob-teal: rgba(45, 212, 191, 0.18);
  --sidebar-width: 232px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0A0B10; --surface: #1B202B; --surface2: #262B3A; --border: #2C3242;
    --text: #E0E6ED; --text-dim: #A1AFBF;
    --ok: #00E676; --warn: #FF9E9E;
    --glass: rgba(27, 32, 43, 0.72); --glass-strong: rgba(38, 43, 58, 0.78);
    --glass-border: rgba(255, 255, 255, 0.07);
    --glass-shine: rgba(255, 255, 255, 0.14);
    --glass-shadow: 0 20px 44px -18px rgba(0, 0, 0, 0.6), 0 1px 0 0 var(--glass-shine) inset;
    --blob-honey: rgba(245, 183, 0, 0.20); --blob-blue: rgba(90, 140, 255, 0.20);
    --blob-teal: rgba(45, 212, 191, 0.14);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0A0B10; --surface: #1B202B; --surface2: #262B3A; --border: #2C3242;
  --text: #E0E6ED; --text-dim: #A1AFBF;
  --ok: #00E676; --warn: #FF9E9E;
  --glass: rgba(27, 32, 43, 0.72); --glass-strong: rgba(38, 43, 58, 0.78);
  --glass-border: rgba(255, 255, 255, 0.07);
  --glass-shine: rgba(255, 255, 255, 0.14);
  --glass-shadow: 0 20px 44px -18px rgba(0, 0, 0, 0.6), 0 1px 0 0 var(--glass-shine) inset;
  --blob-honey: rgba(245, 183, 0, 0.20); --blob-blue: rgba(90, 140, 255, 0.20);
  --blob-teal: rgba(45, 212, 191, 0.14);
}

* { box-sizing: border-box; }
/* Los controles marcados como ocultos no pueden volver a aparecer porque una clase visual
   (por ejemplo .icon-button) les asigne display. */
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  position: relative;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed; inset: -20%;
  background:
    radial-gradient(circle at 15% 20%, var(--blob-honey), transparent 45%),
    radial-gradient(circle at 85% 15%, var(--blob-blue), transparent 40%),
    radial-gradient(circle at 50% 90%, var(--blob-teal), transparent 45%);
  filter: blur(60px);
  z-index: -1;
  pointer-events: none;
}

.login-page { overflow: hidden; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card {
  width: min(100%, 390px); display: grid; gap: 12px; padding: 30px;
  border: 1px solid var(--glass-border); border-radius: 26px; background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
}
.login-card .welcome-mark { margin: 0 0 4px; }
.login-card h1 { margin: 0; font-size: 30px; letter-spacing: -.045em; }
.login-kicker { margin: 0; color: var(--accent); font-size: 11px; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.login-copy { margin: -5px 0 8px; color: var(--text-dim); font-size: 14px; }
.login-card label { color: var(--text-dim); font-size: 12px; font-weight: 650; }
.login-card input {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--glass-border);
  border-radius: 12px; outline: none; color: var(--text); background: var(--glass-strong); font: inherit;
}
.login-card input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.login-card button {
  min-height: 44px; border: 0; border-radius: 12px; color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent), #D99000); font: inherit; font-weight: 700; cursor: pointer;
}
.login-card button:disabled { opacity: .65; cursor: wait; }
.login-error { min-height: 18px; margin: -2px 0; color: var(--warn); font-size: 12px; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  background: var(--glass); border-bottom: 1px solid var(--glass-border);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  position: sticky; top: 0; z-index: 10;
}
.topbar h1 { font-size: 17px; margin: 0; display: flex; align-items: center; gap: 8px; }
.topbar h1 .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.theme-toggle {
  border: 1px solid var(--glass-border); background: var(--glass-strong);
  color: var(--text); border-radius: 999px; padding: 6px 14px; font-size: 13px;
  cursor: pointer;
}

.status-banner {
  margin: 14px auto 0; max-width: 720px; padding: 10px 16px;
  border-radius: 14px; font-size: 13.5px; display: none;
  background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--text);
}
.status-banner.show { display: block; }

.chat {
  max-width: 720px; margin: 20px auto 140px; padding: 0 16px;
  display: flex; flex-direction: column; gap: 12px;
}
.msg {
  padding: 12px 16px; border-radius: 18px; max-width: 82%;
  background: var(--glass); border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
}
.msg .author { font-size: 11.5px; color: var(--text-dim); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.03em; }
.msg .text { font-size: 14.5px; line-height: 1.5; white-space: pre-wrap; }
.msg.mine { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-color: var(--accent-line); }
.msg.mine .author { color: rgba(42, 26, 0, 0.68); }
.msg.needs-input { border: 1.5px solid var(--warn); }

.empty-state { text-align: center; color: var(--text-dim); margin-top: 60px; font-size: 14px; }

/* Composer estilo "caja única" de apps de chat de IA (ChatGPT/Claude) - un solo cristal
   redondeado con el texto arriba y una barra de controles compacta abajo, en vez de una fila
   de select/textarea/checkbox/botón sueltos con el padding holgado de las tarjetas de Karen.
   Menos aire, más denso - así se ve como un cuadro de escribir, no como una tarjeta de datos. */
.composer { position: fixed; bottom: 0; left: 0; right: 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
.composer-box {
  max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 6px;
  padding: 10px 12px 8px; border-radius: 22px;
  background: var(--surface); border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}
.composer textarea {
  font-family: inherit; font-size: 14.5px; line-height: 1.4; color: var(--text);
  border: none; background: transparent; resize: none; outline: none;
  min-height: 24px; max-height: 160px; padding: 4px 4px 0;
}
.composer textarea::placeholder { color: var(--text-dim); }
.composer-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.composer-toolbar-left { display: flex; align-items: center; gap: 6px; min-width: 0; }
.author-label { color: var(--text-dim); font-size: 11.5px; white-space: nowrap; }
.composer select {
  font-family: inherit; font-size: 12.5px; color: var(--text-dim); background: transparent;
  border: 1px solid var(--glass-border); border-radius: 999px; padding: 5px 9px; cursor: pointer;
}
.needs-input { display: flex; align-items: center; gap: 4px; color: var(--text-dim); font-size: 11.5px; white-space: nowrap; }
.needs-input input { accent-color: var(--accent); }
.send-btn {
  flex: none; display: grid; place-items: center; width: 30px; height: 30px; padding: 0;
  border: none; border-radius: 50%; background: var(--accent); color: var(--accent-ink);
  font-size: 15px; line-height: 1; cursor: pointer;
}
.send-btn:disabled { background: var(--glass-strong); color: var(--text-dim); cursor: default; }

/* Estructura v0.3: sidebar pegado al workspace y ocultable, sin marco exterior. */
.app-shell { min-height: 100vh; padding: 0; }
.sidebar-hover-zone { position: fixed; inset: 0 auto 0 0; z-index: 45; width: 12px; }
.sidebar, .workspace {
  background: var(--glass); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
}
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 40; display: flex; flex-direction: column;
  width: var(--sidebar-width); min-height: 100vh; overflow: hidden; padding: 10px 14px 20px;
  border: 0; border-right: 1px solid var(--glass-border); box-shadow: var(--glass-shadow);
  transform: translateX(calc(-100% - 2px)); transition: transform 190ms ease;
}
.app-shell.sidebar-preview .sidebar, .app-shell.sidebar-pinned .sidebar { transform: translateX(0); }
.sidebar-toolbar { height:32px; display:flex; align-items:center; margin-bottom:4px; }
.sidebar-workspace-wrap { position:relative; margin:4px 0 18px; }
.sidebar-workspace-row { display:flex; align-items:center; gap:2px; }
.sidebar-workspace-btn { min-width:0; flex:1; display:flex; align-items:center; gap:6px; padding:8px 8px; color:var(--text); background:none; border:0; border-radius:10px; cursor:pointer; font:inherit; text-align:left; }
.sidebar-workspace-btn:hover { background:var(--accent-soft); color:var(--accent); }
.sidebar-workspace-btn .brand-name { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-family:inherit; font-size:18px; font-weight:700; }
.sidebar-workspace-chevron { display:flex; color:var(--text-dim); transform:rotate(90deg); }.sidebar-workspace-chevron svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }.sidebar-workspace-btn[aria-expanded="true"] .sidebar-workspace-chevron { transform:rotate(-90deg); }
.version-badge { font-size:10px; font-weight:700; color:var(--accent); background:var(--accent-soft); border:1px solid var(--accent-line); border-radius:6px; padding:1px 6px; text-transform:uppercase; letter-spacing:.03em; }
.sidebar-workspace-btn .version-badge { margin-left:auto; font-size:8px; padding:1px 4px; }
.version-divider { color:var(--text-dim); }.version-badge #sidebarDevBadge { display:block; }
.sidebar-utility-btn { display:flex; align-items:center; justify-content:center; width:34px; height:34px; flex:none; padding:1px 6px; border:0; border-radius:8px; color:var(--text-dim); background:transparent; cursor:pointer; }.sidebar-utility-btn:hover { color:var(--accent); background:var(--accent-soft); }.sidebar-utility-btn svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-linecap:round; stroke-linejoin:round; stroke-width:1.8; }
.sidebar-workspace-menu { position:absolute; left:0; right:0; top:42px; z-index:50; padding:6px; border:1px solid var(--glass-border); border-radius:12px; background:var(--surface2); box-shadow:var(--glass-shadow); }.sidebar-workspace-choice { position:relative; display:flex; flex-direction:column; gap:2px; padding:9px 30px 9px 9px; border-radius:8px; color:var(--text); text-decoration:none; font-size:13px; }.sidebar-workspace-choice small { color:var(--text-dim); font-size:11px; }.sidebar-workspace-choice.active { background:var(--accent-soft); }.sidebar-workspace-choice:not(.active):hover { background:var(--glass-strong); }.workspace-check { position:absolute; right:10px; top:15px; color:var(--accent); }
.sidebar-dock-toggle { display:none; place-items:center; width:30px; height:30px; flex:none; padding:0; border:0; border-radius:8px; color:var(--text-dim); background:transparent; cursor:pointer; }
.sidebar-dock-toggle svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-linecap:round; stroke-linejoin:round; stroke-width:2; }
.sidebar-dock-toggle:hover { color:var(--accent); background:var(--accent-soft); }
.app-shell.sidebar-pinned .sidebar-dock-toggle { display:grid; }
.app-shell:not(.sidebar-pinned) .sidebar-toolbar { display:none; }
.new-task, .creation-form button {
  border: 0; border-radius: 14px; color: var(--accent-ink); background: linear-gradient(135deg, var(--accent), #D99000);
  font: inherit; font-weight: 650; cursor: pointer;
}
.new-task { width:100%; min-height:42px; margin:0 0 12px; border:1px solid var(--accent-line); color:var(--accent); background:var(--accent-soft); text-align:left; padding:10px 12px; font-size:13px; font-weight:600; }.new-task:hover, .creation-form button:hover { filter: brightness(1.06); }.new-task:hover { color:var(--accent-ink); background:var(--accent); }
.creation-form { display: grid; gap: 7px; margin-top: 10px; padding: 10px; border: 1px solid var(--glass-border); border-radius: 14px; background: var(--glass-strong); }
.creation-form[hidden] { display: none; }.creation-form label { color: var(--text-dim); font-size: 11px; font-weight: 650; }
.creation-form input, .creation-form select { min-width: 0; border: 1px solid var(--glass-border); border-radius: 9px; padding: 8px; font: inherit; color: var(--text); background: var(--surface); }
.creation-form button { min-height: 32px; font-size: 12px; }.creation-form.compact { margin: 0 0 10px; }
.mission-form textarea { width: 100%; min-height: 66px; resize: vertical; border: 1px solid var(--glass-border); border-radius: 9px; padding: 8px; color: var(--text); background: var(--surface); font: inherit; font-size: 12px; }
.mission-role-grid, .estimate-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }.mission-role-grid label, .estimate-fields label { display: grid; gap: 4px; }.form-hint { margin: 0; color: var(--text-dim); font-size: 11px; line-height: 1.4; }
.project-visual-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.project-visual-fields label { display: grid; gap: 4px; }.creation-form .project-icon-input { text-align: center; font-size: 18px; }
.creation-form .project-color-input { width: 100%; height: 38px; padding: 3px; cursor: pointer; }
.nav-scroll { flex:1; min-height:0; margin:0 -5px 0 0; padding:0 5px 8px 0; overflow:auto; }
.nav-group { margin:0 0 9px; padding:0 0 9px; border-bottom:1px solid var(--glass-border); }
.nav-group-attention { margin-bottom:8px; padding-bottom:0; border-bottom:0; }
.nav-group-label { display:flex; align-items:center; justify-content:space-between; gap:8px; margin:0; padding:8px; border-radius:9px; color:var(--text-dim); font-size:10px; font-weight:750; letter-spacing:.105em; list-style:none; text-transform:uppercase; cursor:pointer; user-select:none; }
.nav-group-label::-webkit-details-marker { display:none; }.nav-group-label:hover { color:var(--text); background:var(--glass-strong); }.nav-group .group-chevron { font-size:16px; line-height:.6; transition:transform 160ms ease; }.nav-group:not([open]) .group-chevron { transform:rotate(-90deg); }
.nav-group:not([open]) { padding-bottom:0; border-bottom:0; }.nav-group:not([open]) + .nav-group { margin-top:2px; }
.nav-section { margin-bottom: 12px; }.nav-group .nav-section:last-child { margin-bottom: 0; }.nav-heading { display: flex; align-items: center; justify-content: space-between; padding-right: 6px; }
.nav-label { margin: 0; padding: 0 8px 6px; color: var(--text-dim); font-size: 11px; font-weight: 700; letter-spacing: .075em; text-transform: uppercase; }
.small-action { display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 7px; color: var(--accent); background: var(--accent-soft); font-size: 18px; cursor: pointer; }
.thread-row { display: flex; align-items: center; width: 100%; gap: 8px; border: 0; border-radius: 10px; padding: 7px 8px; color: var(--text-dim); background: transparent; text-align: left; font: inherit; font-size: 13px; cursor: pointer; }
.thread-row:hover, .thread-row.active { color: var(--text); background: var(--accent-soft); }.thread-row.active { font-weight: 600; }
.thread-icon { flex: none; color: var(--accent); font-size: 14px; }.thread-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.time { margin-left: auto; flex: none; color: var(--text-dim); font-size: 11px; }.project-group { margin-bottom: 8px; }
.project-title { display: flex; align-items: center; width: 100%; gap: 7px; border: 0; border-radius: 10px; padding: 6px 8px; color: var(--text); background: transparent; font: inherit; font-size: 13px; font-weight: 650; text-align: left; cursor: pointer; }.project-title:hover, .project-title.active { background: var(--accent-soft); }
.project-icon { display: grid; place-items: center; width: 24px; height: 24px; flex: none; border-radius: 8px; color: var(--accent-ink); background: var(--project-color, var(--accent)); font-size: 13px; box-shadow: 0 5px 12px -8px rgba(0,0,0,.55); }
.project-title .badge { margin-left: auto; }.project-threads .thread-row { padding-left: 32px; }
.badge { min-width: 18px; padding: 1px 5px; border-radius: 10px; color: var(--accent); background: var(--accent-soft); font-size: 11px; text-align: center; }
.sidebar-empty { margin: 3px 8px; color: var(--text-dim); font-size: 12px; line-height: 1.4; }.sidebar-empty.nested { padding-left: 24px; }
.mission-row { display: flex; align-items: center; width: 100%; gap: 8px; padding: 7px 8px; border: 0; border-radius: 10px; color: var(--text); background: transparent; text-align: left; font: inherit; cursor: pointer; }.mission-row:hover, .mission-row.active { background: var(--accent-soft); }.mission-copy { min-width: 0; }.mission-copy strong, .mission-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.mission-copy strong { font-size: 12px; }.mission-copy small { margin-top: 2px; color: var(--text-dim); font-size: 10.5px; }
.mission-status { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--accent); }.mission-status.building { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 15%, transparent); }.mission-status.reviewing { background: #4F8BFF; }.mission-status.blocked { background: var(--warn); }.mission-status.ready { background: #43B6A7; }
.decisions-count:not(:empty) { color: var(--accent-ink); background: var(--accent); }
.question-row { display: flex; align-items: center; width: 100%; gap: 8px; margin: 0 0 3px; padding: 7px 8px; border: 0; border-radius: 10px; color: var(--text); background: transparent; text-align: left; font: inherit; cursor: pointer; }
.question-row:hover, .question-row.active { background: var(--accent-soft); }
.question-avatar { display: grid; place-items: center; width: 24px; height: 24px; flex: none; border-radius: 50%; color: #fff; font-size: 9px; font-weight: 800; }
.question-avatar.claude-code { background: #D97757; }.question-avatar.codex { background: #4F8BFF; }.question-avatar.antigravity { background: #5B8DEF; }.question-avatar.buscador { background: #23A884; }
.question-summary { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.question-controls { display: grid; gap: 7px; margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--glass-border); }
.question-controls-label { color: var(--text-dim); font-size: 11px; }
.question-options { display: flex; flex-wrap: wrap; gap: 5px; }.question-options button, .question-answer-form button { border: 1px solid var(--accent-line); border-radius: 8px; color: var(--accent); background: var(--accent-soft); font: inherit; font-size: 11px; cursor: pointer; }
.question-options button { padding: 5px 7px; }.question-options button:hover, .question-answer-form button:hover { color: var(--accent-ink); background: var(--accent); }
.question-options button:disabled, .question-answer-form button:disabled { opacity: .5; cursor: default; }
.question-answer-form { display: grid; grid-template-columns: 1fr 28px; gap: 5px; }.question-answer-form input { min-width: 0; padding: 6px 7px; border: 1px solid var(--glass-border); border-radius: 8px; color: var(--text); background: var(--surface); font: inherit; font-size: 11px; }.question-answer-form button { padding: 0; }
.dispatch-row { display: flex; gap: 8px; align-items: flex-start; padding: 7px 8px; border-radius: 10px; }.dispatch-row strong, .dispatch-row small { display: block; }
.dispatch-row strong { font-size: 12px; font-weight: 600; line-height: 1.3; }.dispatch-row small { margin-top: 2px; color: var(--text-dim); font-size: 10px; line-height: 1.35; overflow-wrap: anywhere; }
.run-dot { width: 7px; height: 7px; flex: none; margin-top: 4px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 15%, transparent); animation: pulse 1.8s infinite; }
@keyframes pulse { 50% { opacity: .45; box-shadow: 0 0 0 6px color-mix(in srgb, var(--ok) 0%, transparent); } }
.app-row { display: flex; align-items: center; width: 100%; gap: 9px; margin-bottom: 3px; padding: 8px; border: 0; border-radius: 11px; color: var(--text); background: transparent; text-align: left; font: inherit; cursor: pointer; }
.app-row:hover, .app-row.active { background: var(--accent-soft); }.app-row.active { box-shadow: 0 0 0 1px var(--accent-line) inset; }
.app-status-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; }.app-status-dot.is-active { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 15%, transparent); }.app-status-dot.is-down { background: var(--warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 12%, transparent); }
.app-row-copy { min-width: 0; }.app-row-copy strong, .app-row-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.app-row-copy strong { font-size: 12.5px; }.app-row-copy small { margin-top: 2px; color: var(--text-dim); font-size: 10.5px; }

.sidebar-bottom { position:relative; display:grid; gap:4px; padding-top:10px; border-top:1px solid var(--glass-border); }
.preferences { display:flex; align-items:center; width:100%; gap:10px; padding:8px 10px; border-radius:12px; color:var(--text-dim); text-decoration:none; font-size:13px; font-weight:600; }
.preferences:hover { background: var(--glass-strong); }.settings-mark { font-size: 17px; }
.preferences small { display: block; color: var(--text-dim); font-size: 11px; }.arrow { margin-left: auto; color: var(--text-dim); }
.account-block { padding:5px; border:0; border-radius:12px; background:transparent; }.account-block:hover { background:var(--glass-strong); }
.account-owner { display:flex; align-items:center; gap:9px; padding:4px 5px; }.account-owner strong { display:block; font-size:13px; }
.account-avatar { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 50%; color: var(--accent-ink); background: linear-gradient(135deg, var(--accent), #4e8ce8); font-size: 12px; font-weight: 750; }

.workspace { position:relative; display:flex; flex-direction:column; min-height:100vh; overflow:hidden; border:0; transition:margin-left 190ms ease; }
.app-shell.sidebar-pinned .workspace { margin-left: var(--sidebar-width); }
.topline { display:flex; align-items:center; justify-content:space-between; min-height:52px; gap:16px; padding:9px 18px; border-bottom:1px solid var(--glass-border); }
.app-topbar { position: relative; z-index: 20; background: var(--glass); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
.topline-left, .header-actions, .thread-history { display: flex; align-items: center; }.topline-left { min-width: 0; gap: 10px; }.header-actions { position: relative; gap: 8px; }.thread-history { gap: 3px; }
.product-identity { display:flex; align-items:center; gap:8px; min-width:max-content; line-height:1; }.product-identity > span:last-child { display:grid; gap:3px; }.product-identity strong { font-size:14px; letter-spacing:-.01em; }.product-identity small { color:var(--text-dim); font-size:9px; font-weight:700; letter-spacing:.09em; text-transform:uppercase; }.product-mark { display:grid; place-items:center; width:28px; height:28px; border-radius:9px; color:var(--accent-ink); background:var(--accent); font-size:16px; }.topline-divider { width:1px; height:24px; background:var(--glass-border); }
.thread-meta { min-width:0; }.crumb { margin:0; color:var(--text-dim); font-size:12px; }.thread-title { max-width:52vw; margin:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:15px; font-weight:600; letter-spacing:0; }
.icon-button, .theme-toggle, .pin-toggle { border: 1px solid var(--glass-border); color: var(--text); background: var(--glass-strong); font: inherit; cursor: pointer; }
.icon-button { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border-radius: 10px; font-size: 22px; line-height: 1; }.icon-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.icon-button:hover, .icon-button.active { color: var(--accent); background: var(--accent-soft); }.icon-button:disabled { opacity: .32; cursor: default; }
.app-shell.sidebar-pinned .sidebar-toggle { display:none; }
.app-shell.sidebar-pinned .product-identity,
.app-shell.sidebar-pinned .topline-divider { display:none; }
.theme-toggle, .pin-toggle { border-radius: 11px; padding: 7px 11px; font-size: 13px; }.pin-toggle.is-pinned { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }.pin-toggle:disabled { cursor: default; opacity: .5; }
.theme-toggle { padding:0; color:var(--text-dim); font-size:16px; }
.header-popover-wrap { position:relative; }.swarm-status { display:flex; align-items:center; gap:7px; min-height:32px; padding:5px 9px; border:1px solid transparent; border-radius:18px; color:var(--ok); background:transparent; font:inherit; font-size:12px; font-weight:650; cursor:pointer; }.swarm-status:hover, .swarm-status[aria-expanded="true"] { border-color:var(--glass-border); background:var(--glass-strong); }.status-dot { width:8px; height:8px; border-radius:50%; background:currentColor; flex:none; }.swarm-status.needs-input { color:var(--warn); }.swarm-status.needs-input .status-dot { animation:swarm-pulse 1.2s ease-in-out infinite; }.header-popover { position:absolute; top:calc(100% + 8px); right:0; z-index:30; width:280px; padding:13px; border:1px solid var(--glass-border); border-radius:14px; color:var(--text); background:var(--surface); box-shadow:var(--glass-shadow); }.header-popover[hidden] { display:none; }.header-popover h2 { margin:0 0 5px; font-size:13px; }.header-popover p { margin:0; color:var(--text-dim); font-size:12px; line-height:1.45; }.status-summary { display:grid; gap:9px; }.status-summary-row { display:flex; align-items:baseline; justify-content:space-between; gap:12px; padding-top:9px; border-top:1px solid var(--glass-border); color:var(--text-dim); font-size:12px; }.status-summary-row strong { color:var(--text); font-size:14px; }.notification-button { position:relative; }.notification-button svg { width:17px; height:17px; fill:none; stroke:currentColor; stroke-linecap:round; stroke-linejoin:round; stroke-width:1.8; }.notification-badge { position:absolute; top:-4px; right:-4px; display:grid; place-items:center; min-width:16px; height:16px; padding:0 4px; border:2px solid var(--bg); border-radius:10px; color:var(--accent-ink); background:var(--accent); font-size:9px; font-weight:800; }.notifications-panel { padding:6px; }.notification-empty, .notification-item { padding:9px 10px; border-radius:10px; color:var(--text-dim); font-size:12px; line-height:1.4; }.notification-item { display:grid; gap:3px; width:100%; border:0; text-align:left; color:var(--text); background:transparent; font:inherit; cursor:pointer; }.notification-item:hover, .notification-item:focus-visible { background:var(--accent-soft); outline:none; }.notification-item small { color:var(--text-dim); font-size:11px; }
@keyframes swarm-pulse { 50% { opacity:.45; transform:scale(.82); } }
.workspace .status-banner { width: calc(100% - 44px); max-width: 800px; margin: 14px auto 0; flex: none; }.status-banner.error { color: var(--warn); border-color: var(--warn); }
.workspace .chat { width: 100%; max-width: 830px; flex: 1; margin: 20px auto 0; padding: 0 26px; overflow: auto; align-self: center; }
.welcome-content { display: grid; justify-items: center; gap: 8px; text-align: center; }.welcome-mark { display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 4px; border-radius: 18px; color: var(--accent); background: var(--accent-soft); font-size: 25px; }
.welcome-content h2 { margin: 0; color: var(--text); font-size: clamp(25px, 3vw, 34px); letter-spacing: -.045em; }.welcome-content p { margin: 0; color: var(--text-dim); font-size: 14px; }
.workspace.home-state .chat { max-width: 1040px; margin: 0 auto; padding: 26px 26px 38px; overflow: auto; }
.workspace.home-state .composer { display:none; }
.home-dashboard { display:grid; gap:14px; width:100%; padding:6px 0 18px; }.home-hero { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; padding:22px 23px; border:1px solid var(--glass-border); border-radius:20px; background:linear-gradient(112deg, color-mix(in srgb, var(--accent-soft) 72%, var(--glass)), var(--glass)); box-shadow:var(--glass-shadow); }.home-hero p, .home-panel header p { margin:0 0 5px; color:var(--accent); font-size:10px; font-weight:750; letter-spacing:.1em; text-transform:uppercase; }.home-hero h2 { margin:0; font-size:25px; letter-spacing:-.035em; }.home-hero span { color:var(--text-dim); font-size:12px; }.home-hero-summary { display:grid; grid-template-columns:auto auto; gap:7px; align-items:center; min-width:112px; }.home-hero-summary strong { color:var(--accent); font-size:30px; line-height:1; }.home-hero-summary span { line-height:1.25; }.home-priority-grid, .home-secondary-grid { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:14px; }.home-panel { min-width:0; border:1px solid var(--glass-border); border-radius:18px; background:var(--glass); box-shadow:var(--glass-shadow); overflow:hidden; }.home-panel > header { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; padding:16px 17px 13px; border-bottom:1px solid var(--glass-border); }.home-panel h3 { margin:0; font-size:15px; }.home-panel-count { display:grid; place-items:center; min-width:24px; height:24px; padding:0 7px; border-radius:999px; color:var(--accent-ink); background:var(--accent); font-size:11px; font-weight:800; }.home-attention .home-panel-count { color:#3e2a00; background:var(--warn); }.home-panel-list { display:grid; gap:7px; padding:9px; }.home-attention-item, .home-mission-card { display:grid; width:100%; border:0; border-radius:12px; color:var(--text); background:transparent; text-align:left; font:inherit; cursor:pointer; }.home-attention-item { grid-template-columns:auto minmax(0, 1fr) auto; align-items:center; gap:9px; padding:8px; }.home-attention-item:hover, .home-mission-card:hover { background:var(--accent-soft); }.home-attention-item strong, .home-attention-item small, .home-card-copy strong, .home-card-copy small, .home-card-copy span { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.home-attention-item strong, .home-card-copy strong { font-size:12px; }.home-attention-item small, .home-card-copy small, .home-card-copy span { margin-top:3px; color:var(--text-dim); font-size:10.5px; }.home-attention-item > span:last-child, .home-card-arrow { color:var(--text-dim); font-size:20px; }.home-mission-card { grid-template-columns:auto minmax(0, 1fr) auto; align-items:start; gap:9px; padding:10px; }.home-mission-card .mission-status { margin-top:5px; }.home-card-copy strong { margin-top:4px; }.home-card-copy span { white-space:normal; line-height:1.35; }.home-empty { display:flex; align-items:center; gap:8px; min-height:68px; padding:10px; color:var(--text-dim); }.home-empty span { color:var(--accent); font-size:18px; }.home-empty p { margin:0; font-size:11.5px; line-height:1.45; }.home-activity ol { display:grid; gap:0; margin:0; padding:5px 16px 12px; list-style:none; }.home-activity li { display:grid; grid-template-columns:auto minmax(0,1fr); gap:8px; padding:9px 0; border-bottom:1px solid var(--glass-border); }.home-activity li:last-child { border-bottom:0; }.home-activity-dot { width:7px; height:7px; margin-top:5px; border-radius:50%; background:var(--accent); }.home-activity strong, .home-activity small { display:block; }.home-activity strong { font-size:11.5px; }.home-activity small, .home-activity-empty { margin-top:3px; color:var(--text-dim); font-size:10.5px; line-height:1.4; }.home-activity-empty { display:block !important; }
.workspace.apps-state .pin-toggle, .workspace.apps-state .composer { display: none; }
.workspace.mission-state .pin-toggle, .workspace.mission-state .composer { display: none; }
.workspace.project-state .pin-toggle, .workspace.project-state .composer { display: none; }
.workspace.apps-state .chat { max-width: 980px; padding-bottom: 30px; }
.app-detail { display: grid; gap: 16px; width: 100%; padding: 8px 0 24px; }
.app-detail-loading { margin: auto; color: var(--text-dim); font-size: 14px; }
.app-detail-summary, .app-metric, .app-logs { border: 1px solid var(--glass-border); background: var(--glass); box-shadow: var(--glass-shadow); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
.app-detail-summary { display: flex; align-items: center; gap: 13px; padding: 18px 20px; border-radius: 20px; }.app-status-dot.large { width: 12px; height: 12px; }.app-detail-summary p { margin: 0 0 2px; color: var(--text-dim); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; }.app-detail-summary h2 { margin: 0; font-size: 21px; }.app-state-label { margin-left: auto; padding: 5px 9px; border-radius: 999px; color: var(--text-dim); background: var(--glass-strong); font-size: 11px; }
.app-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }.app-metric { display: grid; gap: 5px; padding: 16px 18px; border-radius: 18px; }.app-metric > span { color: var(--text-dim); font-size: 11px; }.app-metric strong { font-size: 18px; }.app-metric small { color: var(--text-dim); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10.5px; line-height: 1.6; }.app-metric .is-current { color: var(--ok); }.app-metric .has-changes { color: var(--warn); }
.app-logs { overflow: hidden; border-radius: 20px; }.app-detail-heading { display: flex; align-items: center; justify-content: space-between; padding: 14px 17px; border-bottom: 1px solid var(--glass-border); }.app-detail-heading h3 { margin: 0; font-size: 14px; }.app-detail-heading span { color: var(--text-dim); font-size: 10.5px; }.app-logs pre { min-height: 220px; max-height: 430px; margin: 0; padding: 16px 18px; overflow: auto; color: var(--text-dim); background: color-mix(in srgb, var(--surface) 68%, transparent); font: 11px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.mission-detail { display: grid; gap: 13px; width: 100%; padding: 8px 0 28px; }.mission-detail-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border: 1px solid var(--glass-border); border-radius: 20px; background: var(--glass); box-shadow: var(--glass-shadow); }.mission-detail-head .mission-status { width: 13px; height: 13px; }.mission-detail-head p { margin: 0 0 2px; color: var(--text-dim); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; }.mission-detail-head h2 { margin: 0; font-size: 21px; }.estimate-pill { margin-left: auto; padding: 6px 9px; border-radius: 999px; color: var(--accent); background: var(--accent-soft); font-size: 12px; font-weight: 700; white-space: nowrap; }.mission-card { padding: 16px 18px; border: 1px solid var(--glass-border); border-radius: 18px; background: var(--glass); box-shadow: var(--glass-shadow); }.mission-card h3 { margin: 0 0 9px; font-size: 14px; }.mission-card > p { margin: 0; line-height: 1.5; white-space: pre-wrap; }.mission-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }.mission-roles, .memory-scopes, .mission-events { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }.mission-roles li, .memory-scopes li { display: grid; gap: 2px; }.mission-roles span, .memory-scopes span { color: var(--text-dim); font-size: 12px; }.mission-events li { color: var(--text-dim); font-size: 12px; line-height: 1.4; }.mission-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }.phase-button { border: 1px solid var(--glass-border); border-radius: 999px; padding: 6px 9px; color: var(--text); background: var(--glass-strong); font: inherit; font-size: 12px; cursor: pointer; }.phase-button:hover, .phase-button.active { color: var(--accent-ink); border-color: var(--accent-line); background: var(--accent); }
.project-board { display: grid; gap: 14px; width: 100%; padding: 8px 0 30px; }.project-hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 23px; border: 1px solid var(--glass-border); border-radius: 20px; background: linear-gradient(112deg, color-mix(in srgb, var(--accent-soft) 72%, var(--glass)), var(--glass)); box-shadow: var(--glass-shadow); }.project-hero p, .project-empty > p { margin: 0 0 5px; color: var(--accent); font-size: 10px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }.project-hero h2, .project-empty h2 { margin: 0; font-size: 25px; letter-spacing: -.035em; }.project-hero > div > span { display: block; margin-top: 5px; color: var(--text-dim); font-size: 12px; }.project-metrics { display: grid; grid-template-columns: repeat(3, auto); gap: 15px; margin: 0; }.project-metrics div { display: grid; gap: 3px; min-width: 47px; }.project-metrics dt { color: var(--text-dim); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }.project-metrics dd { margin: 0; color: var(--accent); font-size: 24px; font-weight: 800; line-height: 1; }.project-coordination { display: flex; align-items: flex-start; gap: 9px; margin: 0; padding: 12px 14px; border: 1px solid var(--accent-line); border-radius: 14px; color: var(--text-dim); background: var(--accent-soft); }.project-coordination > span { color: var(--accent); font-size: 18px; line-height: 1; }.project-coordination p { margin: 0; font-size: 11.5px; line-height: 1.45; }.project-coordination strong { color: var(--text); }.project-disclosure { margin: 0; padding: 0 3px; color: var(--text-dim); font-size: 11px; line-height: 1.4; }.project-empty { display: grid; justify-items: start; gap: 8px; width: min(580px, 100%); margin: 34px auto; padding: 23px; border: 1px solid var(--glass-border); border-radius: 20px; background: var(--glass); box-shadow: var(--glass-shadow); }.project-empty strong { margin-top: 5px; font-size: 15px; }.project-empty > span { color: var(--text-dim); font-size: 12px; line-height: 1.45; }.area-board { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }.area-column { min-width: 0; padding: 14px; border: 1px solid var(--glass-border); border-radius: 18px; background: color-mix(in srgb, var(--glass) 80%, var(--surface)); box-shadow: var(--glass-shadow); }.area-column > header { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 13px; }.area-icon { display: grid; place-items: center; width: 29px; height: 29px; flex: none; border-radius: 9px; color: var(--accent-ink); background: var(--accent); font-size: 16px; }.area-column h3 { margin: 1px 0 2px; font-size: 15px; }.area-column header p { margin: 0; color: var(--text-dim); font-size: 11px; line-height: 1.35; }.area-column header .badge { margin-left: auto; }.task-stack { display: grid; gap: 9px; }.task-card { display: grid; gap: 7px; padding: 12px; border: 1px solid var(--glass-border); border-left: 3px solid var(--accent-line); border-radius: 13px; background: var(--surface); }.task-card.reviewing { border-left-color: #4F8BFF; }.task-card.waiting, .task-card.blocked { border-left-color: var(--warn); }.task-card.ready { border-left-color: #43B6A7; }.task-card-top { display: flex; align-items: center; gap: 6px; color: var(--text-dim); font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }.task-state { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }.task-state.reviewing { background: #4F8BFF; }.task-state.waiting, .task-state.blocked { background: var(--warn); }.task-state.ready { background: #43B6A7; }.task-card h4 { margin: 0; font-size: 14px; }.task-scope, .task-note { margin: 0; }.task-scope { color: var(--accent); font: 10.5px ui-monospace, SFMono-Regular, Menlo, monospace; }.task-note { color: var(--text-dim); font-size: 11.5px; line-height: 1.4; }.task-card footer { display: flex; justify-content: space-between; gap: 8px; padding-top: 8px; border-top: 1px solid var(--glass-border); color: var(--text-dim); font-size: 10.5px; }.task-card footer span:first-child { color: var(--text); font-weight: 650; }

/* Es el mismo composer: centrado en bienvenida y anclado abajo al abrir un hilo. */
.workspace .composer { position: static; left: auto; right: auto; bottom: auto; width: 100%; flex: none; padding: 12px 26px calc(12px + env(safe-area-inset-bottom)); }
.workspace .composer-box { max-width: 830px; }
.workspace.welcome-state .composer { position: absolute; top: 50%; left: 50%; width: min(830px, calc(100% - 48px)); padding: 0; transform: translate(-50%, 54px); }
.composer-toolbar-right { display: flex; align-items: center; gap: 5px; }.composer-action { display: grid; place-items: center; width: 30px; height: 30px; flex: none; padding: 0; border: 1px solid var(--glass-border); border-radius: 50%; color: var(--text-dim); background: transparent; font: inherit; font-size: 18px; cursor: default; }

@media (max-width: 760px) {
  :root { --sidebar-width: min(88vw, 320px); }
  body { overflow: hidden; }.sidebar-hover-zone { width: 16px; }.app-shell.sidebar-pinned .workspace { margin-left: 0; }
  .workspace { min-height: 100vh; }.topline { min-height:56px; padding:9px 12px; gap:8px; }.product-identity > span:last-child, .topline-divider, .thread-history { display:none; }.thread-title { max-width:38vw; font-size:16px; }.crumb { display:none; }
  .workspace .chat { padding: 0 16px; }.workspace .composer { padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); }
  .workspace.home-state .chat { padding:16px 14px 28px; }.home-hero { align-items:flex-start; flex-direction:column; padding:18px; }.home-priority-grid, .home-secondary-grid { grid-template-columns:1fr; }.composer-toolbar-left { flex-wrap: wrap; }.needs-input { display: none; }
  .theme-toggle { display:none; }.pin-toggle { padding:7px 9px; }.swarm-status { padding:5px 7px; }.swarm-status #swarmStatusLabel { display:none; }.header-popover { width:min(280px, calc(100vw - 24px)); }.product-mark { width:28px; height:28px; }
  .app-metrics { grid-template-columns: 1fr; }.app-detail-summary { padding: 15px; }.app-state-label { max-width: 38%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mission-grid { grid-template-columns: 1fr; }.mission-detail-head { align-items: flex-start; padding: 15px; }.estimate-pill { margin-left: 0; }.mission-detail-head { flex-wrap: wrap; }
  .area-board { grid-template-columns: 1fr; }.project-hero { align-items: flex-start; flex-direction: column; padding: 18px; }.project-metrics { gap: 18px; }.task-card footer { flex-direction: column; gap: 3px; }
}
