/* Studio Pardo — estética cinematográfica oscura */
:root {
  --bg: #0a0a0a;
  --bg-2: #141414;
  --bg-3: #1c1c1c;
  --fg: #f0f0f0;
  --fg-mute: #888;
  --accent: #c0e5f0;
  --accent-2: #e0a86b;
  --danger: #e06070;
  --ok: #6bce8e;
  --border: #262626;
  --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* === LOGIN === */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-wrap {
  width: min(420px, 100% - 2rem);
  text-align: center;
  padding: 2rem;
}
.brand h1 {
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 2.8rem;
  letter-spacing: -0.02em;
}
.brand h1 span {
  color: var(--accent-2);
}
.tag {
  color: var(--fg-mute);
  margin-top: 0.5rem;
  margin-bottom: 2.5rem;
  font-size: 0.95rem;
}
.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: left;
}
.login-form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.login-form span {
  font-size: 0.85rem;
  color: var(--fg-mute);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.login-form input,
.form input,
.form select,
.form textarea {
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--fg);
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
}
.login-form input:focus,
.form input:focus,
.form select:focus,
.form textarea:focus {
  border-color: var(--accent);
  outline: none;
}
.login-form button,
.btn {
  background: var(--fg);
  color: var(--bg);
  border: none;
  padding: 0.9rem 1.4rem;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
.btn.primary { background: var(--accent-2); color: var(--bg); }
.btn:hover { opacity: 0.85; }
.btn.link, button.link {
  background: none;
  color: var(--fg-mute);
  font-size: 0.9rem;
  font-weight: 400;
  padding: 0.3rem;
}
.err {
  background: rgba(224, 96, 112, 0.15);
  color: var(--danger);
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  font-size: 0.9rem;
  text-align: center;
}

/* === TOPBAR === */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand-mini {
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-size: 1.4rem;
}
.brand-mini span { color: var(--accent-2); }
.topbar nav {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.user { color: var(--fg-mute); font-size: 0.9rem; }

/* === MAIN === */
.main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.2rem;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.6rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.page-head h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1.8rem;
}

/* === PROJECT GRID === */
.project-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.project-card a {
  display: block;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.15s;
}
.project-card a:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.card-preview {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid var(--border);
}
.card-preview-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--bg-3), var(--bg));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.card-preview-placeholder .big-icon {
  font-size: 2.4rem;
  opacity: 0.5;
}
.card-preview-placeholder small {
  color: var(--fg-mute);
  font-size: 0.8rem;
}
.card-body {
  padding: 1rem 1.2rem 1.2rem;
}
.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.6rem;
}
.card-meta .counts {
  font-size: 0.78rem;
  color: var(--fg-mute);
}
.project-card .type {
  display: inline-block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  background: rgba(192, 229, 240, 0.08);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.6rem;
}
.project-card h3 {
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1.3rem;
  margin-bottom: 0.4rem;
}
.project-card .desc {
  color: var(--fg-mute);
  font-size: 0.85rem;
  margin-bottom: 0.6rem;
}
.status {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fg-mute);
}
.status-rendering { color: var(--accent-2); }
.status-done { color: var(--ok); }

/* === EMPTY STATE === */
.empty {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--fg-mute);
}
.empty p { margin-bottom: 1.4rem; }

/* === FORMS === */
.form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 600px;
}
.form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.form span {
  font-size: 0.85rem;
  color: var(--fg-mute);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.form textarea {
  resize: vertical;
  min-height: 80px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.form-actions {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
  margin-top: 1rem;
}
.back-link {
  display: inline-block;
  color: var(--fg-mute);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.back-link:hover { color: var(--accent); }
.page-title {
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 2rem;
  margin-bottom: 0.4rem;
}
.muted { color: var(--fg-mute); font-size: 0.95rem; }
.muted.small { font-size: 0.85rem; margin-bottom: 1rem; }
.meta {
  color: var(--fg-mute);
  font-size: 0.85rem;
  margin-top: 0.5rem;
}
.ok {
  background: rgba(107, 206, 142, 0.15);
  color: var(--ok);
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  font-size: 0.9rem;
  text-align: center;
}
.card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  margin-top: 1.6rem;
}
.card h3 {
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1.4rem;
  margin-bottom: 0.4rem;
}

/* === TYPE GRID (project create) === */
.type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.6rem;
  margin-top: 0.4rem;
}
.type-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem;
  cursor: pointer;
  transition: border-color 0.15s;
}
.type-card input { display: none; }
.type-card:has(input:checked) {
  border-color: var(--accent-2);
  background: rgba(224, 168, 107, 0.08);
}
.type-card strong {
  display: block;
  margin-bottom: 0.2rem;
}
.type-card p {
  font-size: 0.8rem;
  color: var(--fg-mute);
  text-transform: none;
  letter-spacing: 0;
}

/* === DROPZONE === */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 2.4rem 1.4rem;
  text-align: center;
  margin: 1.6rem 0;
  transition: border-color 0.15s, background 0.15s;
}
.upload-zone.drag {
  border-color: var(--accent);
  background: rgba(192, 229, 240, 0.05);
}
.btn-link {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
}
.upload-progress {
  list-style: none;
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: var(--fg-mute);
}
.upload-progress .err { color: var(--danger); }

/* === ASSETS === */
.assets h3 {
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1.4rem;
  margin: 1.6rem 0 0.8rem;
}
.assets .count {
  font-family: -apple-system, sans-serif;
  font-style: normal;
  color: var(--fg-mute);
  font-size: 0.9rem;
  margin-left: 0.4rem;
}
.asset-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.6rem;
}
.asset-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.asset {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}
.asset.img img,
.asset.video video {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}
.asset.img {
  cursor: grab;
}
.asset.img.dragging {
  opacity: 0.4;
  transform: scale(0.96);
}
.drag-handle {
  position: absolute;
  top: 0.4rem;
  left: 0.4rem;
  background: rgba(0,0,0,0.6);
  color: var(--fg);
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-size: 0.7rem;
  cursor: grab;
  z-index: 2;
  user-select: none;
}
.order-num {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  background: var(--accent-2);
  color: var(--bg);
  font-size: 0.75rem;
  font-weight: 700;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  z-index: 2;
}
.hint {
  font-weight: 400;
  font-style: italic;
  font-size: 0.78rem;
  margin-left: 0.5rem;
}
.asset.audio {
  padding: 0.8rem;
}
.asset.audio audio {
  width: 100%;
}
.asset-info {
  padding: 0.5rem 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
}
.asset-info span {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.asset-info small {
  color: var(--fg-mute);
}
.btn-x {
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--fg-mute);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 0.9rem;
  line-height: 1;
}
.btn-x:hover {
  background: var(--danger);
  color: var(--fg);
}

/* === WELCOME (empty state) === */
.welcome {
  text-align: center;
  padding: 2.5rem 1rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 2rem;
}
.welcome h3 {
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1.8rem;
  margin-bottom: 0.4rem;
}
.welcome > p {
  color: var(--fg-mute);
  margin-bottom: 2rem;
}
.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
  text-align: left;
}
.how-step {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  position: relative;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-2);
  color: var(--bg);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.6rem;
}
.how-step h4 {
  font-size: 1rem;
  margin-bottom: 0.4rem;
}
.how-step p {
  color: var(--fg-mute);
  font-size: 0.85rem;
  line-height: 1.4;
}

/* === HELP CARD (Telegram tips) === */
.help-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  margin-top: 2rem;
}
.help-card h3 {
  font-family: -apple-system, sans-serif;
  font-size: 1.05rem;
  font-style: normal;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.help-card ol {
  margin: 0.8rem 0 1rem 1.2rem;
  color: var(--fg-mute);
  font-size: 0.9rem;
}
.cmd-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.6rem;
  font-size: 0.85rem;
}
.cmd-table th,
.cmd-table td {
  text-align: left;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--border);
}
.cmd-table th {
  color: var(--fg-mute);
  font-weight: 500;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
}
.cmd-table code {
  background: var(--bg-3);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.85em;
  color: var(--accent);
}

/* === TG TIP (en proyecto) === */
.tg-tip {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  margin: 1rem 0;
}
.tg-tip > summary {
  padding: 0.9rem 1.2rem;
  cursor: pointer;
  font-size: 0.9rem;
  user-select: none;
  list-style: none;
}
.tg-tip > summary::-webkit-details-marker { display: none; }
.tg-tip > summary::after {
  content: '▾';
  margin-left: 0.4rem;
  color: var(--fg-mute);
}
.tg-tip[open] > summary::after { content: '▴'; }
.tip-body {
  padding: 0 1.2rem 1.2rem;
  border-top: 1px solid var(--border);
}
.tip-body p { margin-top: 0.8rem; }
.cmd-box {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.7rem 1rem;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  text-align: center;
  margin: 0.4rem 0;
}
.cmd-box code {
  color: var(--accent);
  font-size: 1rem;
}
code {
  background: var(--bg-3);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85em;
  color: var(--accent);
}

/* === TOAST === */
.toast {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-2);
  border-radius: var(--radius);
  padding: 0.9rem 1.2rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.toast-success {
  border-left-color: var(--ok);
}
.toast code {
  background: var(--bg-3);
  color: var(--accent);
}

/* === NAV ICON === */
.nav-icon {
  font-size: 1.3rem;
  text-decoration: none;
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
  transition: background 0.15s;
}
.nav-icon:hover {
  background: var(--bg-3);
}

/* === TELEGRAM PAGE === */
.cmd-cats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.2rem;
  margin-top: 1rem;
}
.cmd-cat h4 {
  font-size: 0.9rem;
  color: var(--fg-mute);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.6rem;
}
.cmd-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.cmd-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--fg);
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.cmd-btn:hover {
  border-color: var(--accent);
}
.cmd-btn code {
  background: transparent;
  color: var(--accent);
  font-size: 0.95rem;
  padding: 0;
}
.cmd-btn small {
  color: var(--fg-mute);
  font-size: 0.75rem;
}
.cmd-btn.sending {
  opacity: 0.6;
  pointer-events: none;
}
.cmd-btn.sent code {
  color: var(--ok);
}
.cmd-btn.cmd-mode-local {
  border-left: 3px solid var(--ok);
}
.cmd-btn.cmd-mode-local code {
  color: var(--ok);
}
.cmd-btn.cmd-mode-tg {
  border-left: 3px solid var(--accent);
}

.msg-history {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}
.msg {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
}
.msg-out {
  border-left: 3px solid var(--accent-2);
}
.msg-in {
  border-left: 3px solid var(--accent);
}
.msg small {
  display: block;
  color: var(--fg-mute);
  font-size: 0.7rem;
  margin-bottom: 0.3rem;
}
.msg pre {
  font-family: inherit;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.9rem;
  margin: 0;
}

/* === TELEGRAM 2-COLUMN LAYOUT === */
.tg-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.4rem 1.2rem;
  height: calc(100vh - 60px);
  display: flex;
  flex-direction: column;
}
.tg-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.tg-head h2 { margin-bottom: 0.2rem; }
.tg-head .muted { font-size: 0.9rem; }

.tg-grid {
  display: grid;
  grid-template-columns: minmax(320px, 380px) 1fr;
  gap: 1.2rem;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.tg-col {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.tg-col h3 {
  font-family: -apple-system, sans-serif;
  font-style: normal;
  font-size: 1rem;
  margin-bottom: 0.8rem;
  font-weight: 600;
}
.tg-col-cmds {
  overflow-y: auto;
}
.tg-col-cmds .cmd-cats {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin: 0;
  grid-template-columns: none;
}
.tg-col-cmds textarea {
  width: 100%;
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--fg);
  padding: 0.6rem;
  border-radius: 8px;
  font: inherit;
  font-size: 0.9rem;
  resize: vertical;
}

.tg-col-feed {
  padding: 0;
}
.feed-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--border);
}
.feed-head h3 { margin: 0; }
.feed-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
}
.poll-status {
  color: var(--ok);
  font-size: 1.4rem;
  line-height: 1;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.feed {
  flex: 1;
  overflow-y: auto;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  scroll-behavior: smooth;
}
.feed-empty {
  margin: auto;
  text-align: center;
  padding: 2rem;
}

.bubble {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.6rem 0.9rem;
  max-width: 85%;
  animation: bubbleIn 0.2s ease-out;
}
@keyframes bubbleIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.bubble-user {
  align-self: flex-end;
  background: rgba(224, 168, 107, 0.1);
  border-color: rgba(224, 168, 107, 0.3);
}
.bubble-bot {
  align-self: flex-start;
  background: rgba(192, 229, 240, 0.06);
  border-color: rgba(192, 229, 240, 0.2);
}
.bubble-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.7rem;
  color: var(--fg-mute);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.3rem;
}
.bubble-meta .time {
  font-family: ui-monospace, monospace;
  text-transform: none;
  letter-spacing: 0;
}
.bubble pre {
  font-family: inherit;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.92rem;
  line-height: 1.4;
  margin: 0;
  color: var(--fg);
}

/* === COMPOSER (estilo chat) === */
.composer {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  border-top: 1px solid var(--border);
  background: var(--bg-2);
  flex-shrink: 0;
}
.composer select {
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--fg);
  padding: 0.55rem 0.5rem;
  border-radius: 8px;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  height: 42px;
}
.composer textarea {
  flex: 1;
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--fg);
  padding: 0.6rem 0.8rem;
  border-radius: 18px;
  font: inherit;
  font-size: 0.95rem;
  resize: none;
  line-height: 1.3;
  min-height: 42px;
  max-height: 160px;
  overflow-y: auto;
}
.composer textarea:focus {
  border-color: var(--accent);
  outline: none;
}
.composer-send {
  background: var(--accent-2);
  color: var(--bg);
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s, transform 0.15s;
}
.composer-send:hover {
  transform: scale(1.06);
}
.composer-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Responsive: en móvil, una columna apilada */
@media (max-width: 900px) {
  .tg-main {
    height: auto;
    min-height: 100vh;
  }
  .tg-grid {
    grid-template-columns: 1fr;
    overflow: visible;
  }
  .tg-col-feed {
    height: 70vh;
    min-height: 500px;
  }
  .composer select {
    font-size: 0.78rem;
    padding: 0.45rem 0.4rem;
  }
}

/* === JSON EDITOR === */
.json-editor {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.45;
  background: #0a0e14;
  color: #c0caf5;
  border-color: var(--border);
}

/* === JOB LIST === */
.job-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.job {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
}
.job-running { border-left: 3px solid var(--accent-2); }
.job-done    { border-left: 3px solid var(--ok); }
.job-failed  { border-left: 3px solid var(--danger); }
.job-queued  { border-left: 3px solid var(--fg-mute); }

.job-head {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.85rem;
  color: var(--fg-mute);
}
.job-id {
  color: var(--fg);
  font-weight: 600;
}
.job-status {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.7rem;
}
.job-time {
  margin-left: auto;
  font-family: ui-monospace, monospace;
}
.job-progress {
  margin-top: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.bar {
  flex: 1;
  height: 6px;
  background: var(--bg-2);
  border-radius: 3px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: var(--accent-2);
  transition: width 0.4s ease;
}
.pct {
  font-family: ui-monospace, monospace;
  font-size: 0.85rem;
  min-width: 40px;
  text-align: right;
}
.job-log {
  background: #0a0e14;
  color: #b0b8d4;
  padding: 0.6rem 0.8rem;
  border-radius: 6px;
  margin-top: 0.6rem;
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  white-space: pre-wrap;
  max-height: 180px;
  overflow-y: auto;
}
.job-error {
  background: rgba(224, 96, 112, 0.08);
  color: var(--danger);
  padding: 0.6rem 0.8rem;
  border-radius: 6px;
  margin-top: 0.6rem;
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  white-space: pre-wrap;
  max-height: 180px;
  overflow-y: auto;
}
.job-result {
  margin-top: 0.6rem;
}

/* === ADD ASSET TABS === */
.add-assets-tabs {
  display: flex;
  gap: 0.4rem;
  margin: 1rem 0 0;
  border-bottom: 1px solid var(--border);
}
.tab-btn {
  background: transparent;
  border: 1px solid transparent;
  border-bottom: none;
  color: var(--fg-mute);
  padding: 0.65rem 1.1rem;
  border-radius: 8px 8px 0 0;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.tab-btn:hover { color: var(--fg); }
.tab-btn.active {
  background: var(--bg-2);
  border-color: var(--border);
  color: var(--fg);
  margin-bottom: -1px;
  border-bottom-color: var(--bg-2);
}
.tab-content {
  border-radius: 0 var(--radius) var(--radius) var(--radius);
  margin-top: 0;
}

/* === ACTIVE BANNER (estado de render/upload) === */
.active-banner {
  position: sticky;
  top: 60px;
  z-index: 5;
  background: linear-gradient(135deg, rgba(224, 168, 107, 0.15), rgba(224, 168, 107, 0.05));
  border: 1px solid rgba(224, 168, 107, 0.4);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.ab-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}
.ab-head strong {
  flex: 1;
  font-size: 1rem;
  color: var(--fg);
}
.ab-pct {
  font-family: ui-monospace, monospace;
  font-size: 0.95rem;
  color: var(--accent-2);
  font-weight: 700;
}
.ab-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(224, 168, 107, 0.3);
  border-top-color: var(--accent-2);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.active-banner .bar {
  height: 8px;
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
}
.active-banner .bar-fill {
  background: var(--accent-2);
  height: 100%;
  border-radius: 4px;
}
.ab-msg {
  margin-top: 0.5rem;
  font-family: ui-monospace, monospace;
  font-size: 0.78rem;
  color: var(--fg-mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* === RENDER PREVIEW === */
.render-preview {
  width: 100%;
  max-height: 500px;
  background: #000;
  border-radius: var(--radius);
  display: block;
}

/* === OUTPUT GRID === */
.output-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.output-card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
}
.output-card > h4 {
  font-size: 1rem;
  margin-bottom: 0.4rem;
}
details.output-card {
  cursor: pointer;
}
details.output-card > summary {
  list-style: none;
  cursor: pointer;
}
details.output-card > summary::-webkit-details-marker { display: none; }
details.output-card > summary > h4 {
  display: inline-block;
  font-size: 1rem;
  margin-bottom: 0.2rem;
}
details.output-card > summary::after {
  content: ' ▾';
  color: var(--fg-mute);
  font-size: 0.8em;
}
details.output-card[open] > summary::after { content: ' ▴'; }
details.output-card > .form {
  margin-top: 1rem;
  cursor: default;
}
.output-card .muted.small {
  font-size: 0.82rem;
  margin-bottom: 0.6rem;
}

.job-kind {
  background: var(--bg-2);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--accent);
}
.url-copy {
  display: block;
  margin-top: 0.4rem;
  width: 100%;
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--fg-mute);
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
}

/* === DANGER ZONE === */
.danger-zone {
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  padding-top: 1.6rem;
}
.btn.danger {
  background: rgba(224, 96, 112, 0.1);
  color: var(--danger);
  border: 1px solid rgba(224, 96, 112, 0.3);
}
.btn.danger:hover {
  background: var(--danger);
  color: var(--fg);
}
