/* =====================================================================
   Vídeo a Clips — sistema de diseño (claro / oscuro)
   ===================================================================== */
:root {
  /* Misma paleta que el estudio «Vídeo a Clips» */
  --bg: #F8FAFC; --surface: #FFFFFF; --surface-2: #F1F4F8; --surface-3: #E6EAF0;
  --border: rgba(20, 21, 26, .08); --border-strong: rgba(20, 21, 26, .14);
  --text: #14151A; --text-2: #6B7280; --text-3: #9CA3AF;
  --accent: #477FFF; --accent-2: #2F5FE0; --accent-soft: rgba(71, 127, 255, .08);
  --ink: #14151A;
  --good: #1FA971; --good-soft: rgba(31, 169, 113, .10);
  --warn: #9A5B00; --warn-soft: rgba(245, 166, 35, .14);
  --bad: #E0503A; --bad-soft: rgba(224, 80, 58, .10);
  --info: #477FFF; --info-soft: rgba(71, 127, 255, .08);
  --radius: 18px; --radius-sm: 12px; --radius-lg: 24px;
  --shadow: 0 1px 2px rgba(20, 21, 26, .04);
  --shadow-lg: 0 18px 50px rgba(20, 21, 26, .14);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --display: "Manrope", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0F1013; --surface: #17181D; --surface-2: #1F2027; --surface-3: #292B33;
  --border: rgba(255,255,255,.08); --border-strong: rgba(255,255,255,.14);
  --text: #F2F3F5; --text-2: #A0A4AE; --text-3: #6E727C;
  --accent: #6E9BFF; --accent-2: #8FB2FF; --accent-soft: rgba(110,155,255,.12);
  --ink: #F2F3F5;
  --good: #3CC88E; --good-soft: rgba(60,200,142,.12);
  --warn: #F0B04A; --warn-soft: rgba(240,176,74,.12);
  --bad: #FF7A63; --bad-soft: rgba(255,122,99,.12);
  --info: #6E9BFF; --info-soft: rgba(110,155,255,.12);
  --shadow: 0 1px 2px rgba(0,0,0,.3); --shadow-lg: 0 18px 50px rgba(0,0,0,.5);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; font-weight: 600; }
a:hover { color: var(--accent-2); }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-family: var(--display); color: var(--text); }
h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; }
h2 { font-size: 15px; font-weight: 800; }
h3 { font-size: 14.5px; font-weight: 800; }
p { margin: 0; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }

/* --- Botones (redondos, como el estudio) --- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; font-weight: 700; font-size: 13.5px; line-height: 1;
  padding: 11px 18px; border-radius: 999px; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, color .15s, opacity .15s; }
.btn:hover { border-color: var(--border-strong); background: var(--surface-2); color: var(--text); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--ink); color: var(--bg); border-color: transparent; }
.btn.primary:hover { background: #2A2C33; color: #fff; }
[data-theme="dark"] .btn.primary:hover { background: #fff; color: #000; }
.btn.accent { background: var(--accent); color: #fff; border-color: transparent; }
.btn.accent:hover { background: var(--accent-2); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { border-color: rgba(224,80,58,.35); color: var(--bad); }
.btn.danger.solid { background: var(--bad); color: #fff; border-color: transparent; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { padding: 7px 13px; font-size: 12.5px; }
.btn.lg { padding: 15px 28px; font-size: 14px; }
.btn .ico, .ico { width: 16px; height: 16px; flex: none; }
.icon-btn { width: 38px; height: 38px; padding: 0; border-radius: 999px; }
.icon-btn:hover { color: var(--accent); border-color: var(--accent); }

/* --- Formularios --- */
label.field { display: block; margin-bottom: 14px; }
label.field > span, .label { display: block; font-size: 12.5px; font-weight: 700; color: var(--text); margin-bottom: 7px; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=number], input[type=datetime-local],
input[type=search], select, textarea {
  width: 100%; font: inherit; font-size: 14px; color: var(--text); background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 11px 13px; transition: border-color .12s, box-shadow .12s; }
textarea { resize: vertical; min-height: 80px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type=color] { width: 40px; height: 34px; border: 1px solid var(--border-strong); border-radius: 8px; padding: 2px; background: var(--surface); cursor: pointer; }
input[type=range] { width: 100%; accent-color: var(--accent); }
input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; }
.hint { font-size: 12.5px; color: var(--text-3); margin-top: 5px; }
.row { display: flex; gap: 12px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.spacer { flex: 1; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-size: 13.5px; }
.switch input { position: absolute; opacity: 0; }
.switch .track { width: 34px; height: 20px; border-radius: 99px; background: var(--surface-3); position: relative; transition: background .15s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(14px); }
.seg { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.seg button { border: 1.5px solid var(--border); background: var(--surface); font: inherit; font-size: 13px; font-weight: 700; padding: 8px 14px; border-radius: 999px; color: var(--text); cursor: pointer; transition: border-color .15s, background .15s; }
.seg button:hover { border-color: rgba(71,127,255,.4); }
.seg button.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-2); }

/* --- Tarjetas, tablas, insignias --- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card.pad0 { padding: 0; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-head h2, .card-head h3 { flex: 1; }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat { padding: 18px 20px; }
.stat .k { font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.stat .v { font-family: var(--display); font-size: 28px; font-weight: 800; letter-spacing: -0.5px; }
.stat .s { font-size: 12px; color: var(--text-3); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-weight: 700; color: var(--text-2); font-size: 12px; text-transform: none; padding: 12px 18px; border-bottom: 1px solid var(--border); background: var(--surface); position: sticky; top: 0; }
.table td { padding: 13px 18px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.click { cursor: pointer; }
.table tr.click:hover td { background: var(--surface-2); }
.table-wrap { overflow: auto; }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.badge.good { background: var(--good-soft); color: var(--good); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.accent { background: var(--accent-soft); color: var(--accent); }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: 12.5px; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.progress { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .4s; }
.progress.good > i { background: var(--good); }
.progress.warn > i { background: var(--warn); }
.progress.bad > i { background: var(--bad); }
.empty { text-align: center; padding: 44px 20px; color: var(--text-2); }
.empty .em-ico { width: 52px; height: 52px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin: 0 auto 12px; color: var(--text-3); }
.empty h3 { color: var(--text); margin-bottom: 6px; }
.alert { border-radius: 14px; padding: 13px 16px; font-size: 13.5px; background: var(--info-soft); color: var(--text); border: 1px solid transparent; }
.alert.warn { background: var(--warn-soft); }
.alert.bad { background: var(--bad-soft); }
.alert.good { background: var(--good-soft); }
.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 8px; }
@keyframes sk { to { background-position: -200% 0; } }
.spin { width: 16px; height: 16px; border: 2px solid var(--border-strong); border-top-color: var(--accent); border-radius: 50%; animation: rot .7s linear infinite; display: inline-block; flex: none; }
@keyframes rot { to { transform: rotate(360deg); } }

/* --- Layout de la app --- */
.app { display: grid; grid-template-columns: auto 1fr; min-height: 100vh; }
/* Barra lateral flotante de iconos (se expande para mostrar los nombres) */
.side { position: sticky; top: 12px; margin: 12px 0 12px 12px; height: calc(100vh - 24px); width: 64px; background: var(--surface-2);
  border-radius: 22px; padding: 14px 10px; display: flex; flex-direction: column; align-items: stretch; overflow-x: hidden; overflow-y: auto;
  transition: width .2s ease; scrollbar-width: none; }
.side::-webkit-scrollbar { display: none; }
.app.expanded .side { width: 232px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 3px 14px; margin-bottom: 10px; border-bottom: 1px solid var(--border-strong);
  font-family: var(--display); font-weight: 800; font-size: 15px; letter-spacing: -0.3px; color: var(--text); white-space: nowrap; }
.brand:hover { text-decoration: none; color: var(--text); }
.logo { width: 38px; height: 38px; border-radius: 12px; background: var(--ink); display: grid; place-items: center; color: var(--bg); flex: none; }
.nav-group { display: none; }
.app.expanded .nav-group { display: block; font-size: 11.5px; font-weight: 700; color: var(--text-3); padding: 12px 12px 4px; white-space: nowrap; }
.nav { display: flex; flex-direction: column; gap: 6px; }
.nav a { position: relative; display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px; border-radius: 999px; color: var(--text);
  font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.nav a .lbl { opacity: 0; transition: opacity .15s; }
.app.expanded .nav a .lbl { opacity: 1; }
.nav a:hover { background: var(--surface-3); color: var(--text); text-decoration: none; }
.nav a.on { background: rgba(71,127,255,.20); color: var(--accent-2); }
.nav a .ico { width: 19px; height: 19px; flex: none; }
.app:not(.expanded) .nav a:hover::after { content: attr(data-tip); position: fixed; left: 86px; transform: translateY(0); background: var(--ink); color: var(--bg);
  font-size: 12.5px; font-weight: 600; padding: 6px 10px; border-radius: 8px; white-space: nowrap; z-index: 80; pointer-events: none; }
.side-bottom { margin-top: auto; padding-top: 12px; }
.main { min-width: 0; display: flex; flex-direction: column; }
/* Encabezado unido al contenido (mismo fondo, sin línea) */
.top { height: 64px; display: flex; align-items: center; gap: 8px; padding: 0 28px 0 18px; background: var(--bg); position: sticky; top: 0; z-index: 20; }
.top .round { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--surface); box-shadow: var(--shadow); display: grid; place-items: center;
  color: var(--text); cursor: pointer; padding: 0; }
.top .round:hover { color: var(--accent); }
.top .round .ico { width: 18px; height: 18px; }
.search-pop { position: absolute; right: 0; top: calc(100% + 8px); width: 320px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow-lg); padding: 8px; z-index: 50; }
.search-pop input { border: 0; box-shadow: none !important; }
.top .crumbs { font-size: 13.5px; color: var(--text-2); flex: 1; min-width: 0; padding-left: 6px; }
.top .crumbs b { color: var(--text); font-weight: 580; }
.content { padding: 8px 32px 32px; max-width: 1200px; width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head .t { flex: 1; min-width: 220px; }
.page-head .t p { color: var(--text-2); margin-top: 6px; font-size: 14.5px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.cols { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bad); position: absolute; top: 6px; right: 6px; border: 2px solid var(--bg); }
.rel { position: relative; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 650; font-size: 12.5px; flex: none; }

/* --- Popover / modal / toast --- */
.pop { position: absolute; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); min-width: 240px; z-index: 50; padding: 6px; }
.pop a, .pop button.item { display: flex; width: 100%; gap: 9px; align-items: center; border: 0; background: none; font: inherit; color: var(--text); padding: 8px 10px; border-radius: 8px; cursor: pointer; text-align: left; }
.pop a:hover, .pop button.item:hover { background: var(--surface-2); text-decoration: none; }
.notif { padding: 10px; border-radius: 8px; display: block; color: var(--text); }
.notif:hover { background: var(--surface-2); text-decoration: none; }
.notif.unread { background: var(--accent-soft); }
.modal-bg { position: fixed; inset: 0; background: rgba(10,10,16,.45); z-index: 100; display: grid; place-items: center; padding: 20px; animation: fade .15s; }
.modal { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%; max-width: 520px; max-height: calc(100vh - 40px); display: flex; flex-direction: column; animation: up .18s; border: 1px solid var(--border); }
.modal.wide { max-width: 860px; }
.modal-head { display: flex; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--border); gap: 10px; }
.modal-head h2 { flex: 1; }
.modal-body { padding: 18px; overflow-y: auto; }
.modal-foot { padding: 14px 18px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(8px); opacity: 0; } }
.toasts { position: fixed; bottom: 18px; right: 18px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 999px; font-weight: 600; box-shadow: var(--shadow-lg); font-size: 13.5px; max-width: 380px; animation: up .2s; display: flex; gap: 8px; align-items: flex-start; }
.toast.bad { background: var(--bad); color: #fff; }
.toast.good { background: var(--good); color: #fff; }

/* --- Clips --- */
.clip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.clip-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; position: relative; }
.clip-card.sel { outline: 2px solid var(--accent); }
.clip-thumb { aspect-ratio: 9 / 16; background: var(--surface-2); position: relative; display: grid; place-items: center; overflow: hidden; cursor: pointer; }
.clip-thumb img, .clip-thumb video { width: 100%; height: 100%; object-fit: cover; }
.clip-thumb .dur { position: absolute; bottom: 8px; right: 8px; background: rgba(0,0,0,.7); color: #fff; font-size: 11.5px; padding: 1px 6px; border-radius: 5px; }
.clip-thumb .score { position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,.7); color: #fff; font-size: 11.5px; padding: 1px 7px; border-radius: 5px; }
.clip-thumb .pick { position: absolute; top: 8px; right: 8px; }
.clip-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.clip-body .t { font-weight: 580; font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* --- Editor --- */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: start; }
.editor-preview { position: sticky; top: 72px; }
.phone { margin: 0 auto; background: #000; border-radius: 26px; padding: 10px; box-shadow: var(--shadow-lg); width: 300px; }
.phone.h { width: 100%; border-radius: 14px; }
.screen { position: relative; overflow: hidden; border-radius: 18px; background: #111; aspect-ratio: 9 / 16; container-type: inline-size; }
.phone.h .screen { aspect-ratio: 16 / 9; border-radius: 8px; }
.phone.sq .screen { aspect-ratio: 1 / 1; }
.scene { position: absolute; inset: 0; background: radial-gradient(120% 70% at 50% 25%, #3A4A7A 0%, #1B2238 55%, #0B0F1C 100%); }
.scene .person { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 58%; aspect-ratio: 3/4; }
.scene .person .head { position: absolute; left: 50%; top: 6%; transform: translateX(-50%); width: 38%; aspect-ratio: 1; border-radius: 50%; background: linear-gradient(160deg, #E8C2A0, #B98A66); }
.scene .person .body { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; height: 52%; border-radius: 48% 48% 0 0; background: linear-gradient(160deg, #2E3B5E, #18203A); }
.scene .mic { position: absolute; left: 22%; bottom: 18%; width: 9%; aspect-ratio: 1/2.6; border-radius: 40px; background: linear-gradient(#444, #222); }
.sub-layer { position: absolute; left: 6%; right: 6%; text-align: center; line-height: 1.15; pointer-events: none; }
.sub-word { display: inline-block; margin: 0 .12em; transition: transform .1s, color .1s; }
.hook-layer { position: absolute; left: 6%; right: 6%; text-align: center; pointer-events: none; }
.hook-layer span { display: inline-block; padding: .25em .55em; border-radius: .25em; font-weight: 800; line-height: 1.15; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tpl { border: 1.5px solid var(--border); border-radius: 16px; overflow: hidden; cursor: pointer; background: var(--surface); text-align: left; padding: 0; font: inherit; color: var(--text); }
.tpl:hover { border-color: var(--border-strong); }
.tpl.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tpl .mini { aspect-ratio: 4 / 5; position: relative; background: radial-gradient(120% 70% at 50% 25%, #3A4A7A 0%, #1B2238 60%, #0B0F1C 100%); display: flex; align-items: flex-end; justify-content: center; padding: 10px; }
.tpl .mini b { font-size: 12px; line-height: 1.15; text-align: center; }
.tpl .meta { padding: 8px 10px; }
.tpl .meta .n { font-weight: 600; font-size: 13px; }
.tpl .meta .d { font-size: 11.5px; color: var(--text-3); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tabs button { border: 0; background: none; font: inherit; font-size: 13.5px; font-weight: 700; color: var(--text-2); padding: 10px 12px; border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; }
.tabs button.on { color: var(--text); border-bottom-color: var(--accent); }
.colors { display: flex; align-items: center; gap: 8px; }

/* --- Calendario --- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.cal .dow { background: var(--surface); font-size: 12px; font-weight: 580; color: var(--text-2); padding: 8px; text-align: center; }
.cal .day { background: var(--surface); min-height: 110px; padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.cal .day.out { background: var(--surface-2); }
.cal .day.today .n { background: var(--accent); color: #fff; }
.cal .day .n { font-size: 12px; font-weight: 600; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: var(--text-2); }
.cal .ev { font-size: 11.5px; padding: 2px 6px; border-radius: 5px; background: var(--accent-soft); color: var(--accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.cal .ev.published { background: var(--good-soft); color: var(--good); }
.cal .ev.error { background: var(--bad-soft); color: var(--bad); }

/* --- Gráficos --- */
.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--text-3); font-size: 10.5px; font-family: var(--font); }
.chart .bar { fill: var(--accent); }
.chart .bar2 { fill: var(--bad); }
.chart .grid { stroke: var(--border); }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--text-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* --- Integraciones --- */
.int-card { display: flex; gap: 14px; align-items: flex-start; }
.int-logo { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 700; flex: none; font-size: 15px; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 12px; font-size: 13.5px; }
.kv dt { color: var(--text-2); }
.kv dd { margin: 0; }

@media (max-width: 1100px) {
  .editor { grid-template-columns: 1fr; }
  .editor-preview { position: static; }
  .cols { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; z-index: 60; transform: translateX(-120%); transition: transform .2s, width .2s; box-shadow: var(--shadow-lg); width: 232px; }
  .app.expanded .side { transform: none; }
  .app .nav-group { display: block; }
  .app .nav a .lbl { opacity: 1; }
  .content { padding: 16px; }
  .top { padding: 0 12px; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; }
}

/* --- Subida rápida (mismo diseño que el estudio) --- */
.upload-card { display: flex; align-items: center; gap: 24px; border: 2px dashed rgba(71,127,255,.32); border-radius: 24px;
  background: linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--surface) 96%, var(--accent))); padding: 36px 40px; cursor: pointer;
  transition: border-color .18s, background .18s, transform .18s; }
.upload-card:hover, .upload-card.drag { border-color: var(--accent); background: var(--accent-soft); }
.upload-card .up-ic { width: 62px; height: 62px; border-radius: 18px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.upload-card .up-txt { flex: 1; min-width: 0; }
.upload-card .up-txt h3 { font-size: 18px; margin-bottom: 6px; }
.upload-card .up-txt p { color: var(--text-2); font-size: 13.5px; }
.upload-card .btn.primary { padding: 15px 30px; box-shadow: 0 8px 20px rgba(20,21,26,.18); }
.link-bar { display: flex; align-items: center; gap: 12px; margin-top: 14px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 6px 6px 6px 20px; box-shadow: var(--shadow); }
.link-bar input { border: 0; background: transparent; padding: 10px 0; box-shadow: none !important; }
.link-bar input:focus { box-shadow: none; }
.link-bar .yt { color: #E62117; flex: none; }
@media (max-width: 700px) { .upload-card { flex-direction: column; text-align: center; padding: 28px 20px; } }
.upload-card .up-ic .ico { width: 26px; height: 26px; }
.brand .lbl { opacity: 0; transition: opacity .15s; }
.app.expanded .brand .lbl { opacity: 1; }
@media (max-width: 860px) { .brand .lbl { opacity: 1; } }

.guide{margin-top:14px;border-top:1px solid var(--border);padding-top:12px}
.guide summary{cursor:pointer;font-weight:600;font-size:13px;color:var(--text-2)}
.guide ol{margin:10px 0 0 18px;padding:0;display:grid;gap:6px;font-size:13px;line-height:1.5}
.guide code{background:var(--surface-2);padding:1px 6px;border-radius:6px;font-size:12px}
.badge.bad{background:rgba(239,68,68,.14);color:#ef4444}

.job-card{padding:14px 18px}
.job-thumb{position:relative;width:112px;height:63px;flex:none;border-radius:10px;overflow:hidden;background:var(--surface-2);display:grid;place-items:center}
.job-thumb img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.job-thumb .spin{position:relative;z-index:1;width:20px;height:20px;border-color:rgba(255,255,255,.45);border-top-color:#fff;filter:drop-shadow(0 1px 3px rgba(0,0,0,.5))}
.job-thumb:not(:has(img)) .spin{border-color:var(--border-strong);border-top-color:var(--accent);filter:none}

.ai-key{background:var(--surface-2);border-radius:14px;padding:14px 16px}

.chip-check{display:inline-flex;align-items:center;gap:8px;padding:7px 12px;border:1px solid var(--border);border-radius:999px;cursor:pointer;font-size:13.5px;font-weight:600;background:var(--surface)}
.chip-check:has(input:checked){border-color:var(--accent);background:var(--accent-soft)}
.chip-check input{margin:0}

/* =====================================================================
   Diseño 6: rail oscuro + panel blanco redondeado sobre fondo azul suave,
   tarjetas pastel, botones redondos y píldora de usuario
   ===================================================================== */
:root {
  --bg: #E7F0FC; --frame: #1B1C21; --rail-ink: #8E929C; --rail-on: #FFFFFF;
  --surface: #FFFFFF; --surface-2: #F3F6FB; --surface-3: #E8EDF5;
  --border: rgba(27, 28, 33, .07); --border-strong: rgba(27, 28, 33, .13);
  --accent: #3B82F6; --accent-2: #2563EB; --accent-soft: rgba(59,130,246,.10);
  --pastel-blue: #DCEBFC; --pastel-lilac: #E7E1F8; --pastel-mint: #DDF1E1; --pastel-cream: #F8F0D2; --pastel-rose: #FBE3E1;
  --logo-bg: #FBF1CF; --radius: 22px; --radius-lg: 28px;
  --shadow: 0 1px 2px rgba(27,28,33,.04), 0 6px 18px rgba(27,28,33,.04);
}
[data-theme="dark"] {
  --bg: #0B0C10; --frame: #000000; --rail-ink: #7C808A; --rail-on: #FFFFFF;
  --surface: #15161B; --surface-2: #1D1F26; --surface-3: #272A33;
  --pastel-blue: #1A2433; --pastel-lilac: #221E30; --pastel-mint: #17271D; --pastel-cream: #2A2618; --pastel-rose: #2C1C1B;
  --logo-bg: #F3E6B6;
}
body { background: radial-gradient(1200px 700px at 85% -10%, #F4F8FF 0%, transparent 60%), var(--bg); }
[data-theme="dark"] body { background: var(--bg); }

/* Marco: rail oscuro y panel blanco */
.app { padding: 14px; gap: 0; min-height: 100vh; }
.app::before { content: ""; position: fixed; inset: 14px; border-radius: 34px; background: var(--frame); z-index: -1; box-shadow: 0 30px 80px rgba(27,28,33,.18); }
.side { background: transparent; margin: 0; top: 14px; height: calc(100vh - 28px); border-radius: 34px 0 0 34px; width: 84px; padding: 22px 14px; }
.app.expanded .side { width: 236px; }
.brand { border-bottom: 0; padding: 0 2px 22px; margin-bottom: 8px; color: #fff; }
.brand:hover { color: #fff; }
.logo { width: 48px; height: 48px; border-radius: 15px; background: var(--logo-bg); color: #1B1C21; }
.app.expanded .nav-group { color: #5E626C; }
.nav { gap: 8px; }
.nav a { color: var(--rail-ink); height: 46px; border-radius: 14px; padding: 0 15px; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.on { background: rgba(255,255,255,.08); color: var(--rail-on); }
.nav a.on::before { content: ""; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: #fff; }
.nav a .ico { width: 20px; height: 20px; }
.app:not(.expanded) .nav a:hover::after { left: 96px; background: #fff; color: #1B1C21; box-shadow: var(--shadow-lg); }
.main { background: var(--surface); border-radius: 30px; margin: 6px 6px 6px 0; min-height: calc(100vh - 40px); overflow: clip; position: relative; }
[data-theme="dark"] .main { background: #111217; }
.top { background: transparent; height: 78px; padding: 0 34px 0 24px; backdrop-filter: blur(10px); background: color-mix(in srgb, var(--surface) 86%, transparent); }
[data-theme="dark"] .top { background: color-mix(in srgb, #111217 86%, transparent); }
.top .round { background: var(--surface-2); box-shadow: none; width: 42px; height: 42px; }
.top .round:hover { background: var(--surface-3); color: var(--text); }
.top .crumbs { font-size: 14px; }
.content { padding: 4px 38px 40px; max-width: 1240px; }
h1 { font-size: 30px; letter-spacing: -0.8px; }
.page-head { margin-bottom: 26px; }

/* Píldora de usuario */
.user-pill { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 3px 14px 3px 3px; border-radius: 999px; background: var(--surface-2);
  border: 0; cursor: pointer; font: inherit; color: var(--text); font-weight: 700; font-size: 13.5px; }
.user-pill:hover { background: var(--surface-3); }
.user-pill .avatar { width: 38px; height: 38px; font-size: 12.5px; background: linear-gradient(135deg, #3B82F6, #8B5CF6); }
.user-pill .ico { width: 15px; height: 15px; color: var(--text-2); }
@media (max-width: 700px) { .user-pill .nm, .user-pill .ico { display: none; } .user-pill { padding: 3px; } }

/* Tarjetas: suaves y con radio grande */
.card { border-radius: var(--radius); border-color: var(--border); }
.stats .card, .stat.card { border: 0; box-shadow: none; }
.stats > :nth-child(5n+1) { background: var(--pastel-blue); }
.stats > :nth-child(5n+2) { background: var(--pastel-lilac); }
.stats > :nth-child(5n+3) { background: var(--pastel-mint); }
.stats > :nth-child(5n+4) { background: var(--pastel-cream); }
.stats > :nth-child(5n+5) { background: var(--pastel-rose); }
.stat .v { font-size: 30px; }
.card.dark { background: var(--frame); color: #fff; border: 0; }
.card.dark h2, .card.dark h3 { color: #fff; }
.card.dark .muted { color: #B9BCC4; }
.table th { background: transparent; color: var(--text-3); font-weight: 600; font-size: 12px; border-bottom: 0; }
.table td { border-bottom-color: var(--border); }
.btn { border-radius: 999px; }
.btn.primary { background: #1B1C21; }
[data-theme="dark"] .btn.primary { background: #fff; color: #111; }
.upload-card { background: var(--pastel-blue); border-color: rgba(59,130,246,.28); }
.badge { border-radius: 999px; }

/* Responsive: en móvil el marco desaparece */
@media (max-width: 860px) {
  .app { padding: 0; }
  .app::before { display: none; }
  .side { background: var(--frame); border-radius: 0 24px 24px 0; height: 100vh; top: 0; }
  .main { border-radius: 0; margin: 0; min-height: 100vh; }
}

/* ---------------------------------------------------------------- Notificaciones */
.np { width: 400px; max-width: calc(100vw - 24px); padding: 0; border-radius: 22px; overflow: hidden; }
.np-head { display: flex; align-items: center; gap: 8px; padding: 16px 18px 10px; }
.np-head h3 { flex: 1; font-size: 16px; }
.np-tabs { display: flex; gap: 6px; padding: 0 18px 10px; }
.np-tabs button { border: 0; background: var(--surface-2); color: var(--text-2); font: inherit; font-weight: 700; font-size: 12.5px; padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.np-tabs button.on { background: #1B1C21; color: #fff; }
[data-theme="dark"] .np-tabs button.on { background: #fff; color: #111; }
.np-list { max-height: 440px; overflow: auto; padding: 0 8px 8px; }
.np-day { font-size: 11.5px; font-weight: 700; color: var(--text-3); padding: 10px 10px 4px; text-transform: uppercase; letter-spacing: .04em; }
.np-item { display: flex; gap: 12px; padding: 11px 10px; border-radius: 14px; color: var(--text); position: relative; cursor: pointer; }
.np-item:hover { background: var(--surface-2); text-decoration: none; color: var(--text); }
.np-item .ni { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.np-item .ni .ico { width: 18px; height: 18px; }
.np-item .nt { font-weight: 700; font-size: 13.5px; line-height: 1.35; }
.np-item .nb { font-size: 12.5px; color: var(--text-2); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.np-item .nw { font-size: 11.5px; color: var(--text-3); margin-top: 4px; }
.np-item.unread::after { content: ""; position: absolute; right: 12px; top: 16px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.np-item.unread .nt { padding-right: 16px; }
.np-foot { display: flex; gap: 8px; padding: 10px 14px 14px; border-top: 1px solid var(--border); }
.np-empty { padding: 34px 20px; text-align: center; color: var(--text-2); }
.np-empty .ni { width: 52px; height: 52px; border-radius: 16px; background: var(--surface-2); display: grid; place-items: center; margin: 0 auto 10px; }
.k-good { background: var(--pastel-mint); color: #15803D; }
.k-bad { background: var(--pastel-rose); color: #DC2626; }
.k-info { background: var(--pastel-blue); color: #2563EB; }
.k-warn { background: var(--pastel-cream); color: #A16207; }
.k-live { background: var(--pastel-lilac); color: #7C3AED; }
[data-theme="dark"] .k-good { color: #4ADE80; } [data-theme="dark"] .k-bad { color: #F87171; }
[data-theme="dark"] .k-info { color: #60A5FA; } [data-theme="dark"] .k-warn { color: #FACC15; } [data-theme="dark"] .k-live { color: #C4B5FD; }
.top .dot { top: 9px; right: 10px; width: 9px; height: 9px; border-color: var(--surface-2); }
.bell-count { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #EF4444; color: #fff;
  font-size: 10.5px; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--surface); }
.top .round.ring { animation: ring .8s ease; }
@keyframes ring { 0%,100% { transform: rotate(0); } 20% { transform: rotate(-14deg); } 40% { transform: rotate(12deg); } 60% { transform: rotate(-8deg); } 80% { transform: rotate(4deg); } }

/* Avisos emergentes */
.toasts { top: 20px; right: 20px; bottom: auto; gap: 10px; }
.toast { border-radius: 16px; padding: 12px 16px; align-items: center; animation: slidein .25s ease; }
@keyframes slidein { from { transform: translateX(24px); opacity: 0; } }
.toast-card { display: flex; gap: 12px; align-items: flex-start; width: 360px; max-width: calc(100vw - 40px); background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 18px; padding: 14px; box-shadow: var(--shadow-lg); animation: slidein .25s ease; cursor: pointer; position: relative; overflow: hidden; }
.toast-card .ni { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.toast-card .ni .ico { width: 19px; height: 19px; }
.toast-card .nt { font-weight: 800; font-size: 13.5px; }
.toast-card .nb { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.toast-card .x { position: absolute; top: 8px; right: 8px; border: 0; background: none; color: var(--text-3); cursor: pointer; padding: 4px; }
.toast-card .bar { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--accent); animation: bar 6s linear forwards; }
@keyframes bar { from { width: 100%; } to { width: 0; } }

/* ---------------------------------------------------------------- Mi cuenta */
.acc-hero { display: flex; align-items: center; gap: 20px; padding: 26px; border-radius: var(--radius-lg); background: var(--frame); color: #fff; position: relative; overflow: hidden; }
.acc-hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; border-radius: 50%; border: 1px solid rgba(255,255,255,.12); box-shadow: 0 0 0 40px rgba(255,255,255,.03), 0 0 0 80px rgba(255,255,255,.02); }
.acc-hero .avatar { width: 72px; height: 72px; font-size: 24px; background: linear-gradient(135deg, #3B82F6, #8B5CF6); }
.acc-hero h2 { color: #fff; font-size: 22px; }
.acc-hero .muted { color: #B9BCC4; }
.acc-hero .badge { background: rgba(255,255,255,.12); color: #fff; }
.acc-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
@media (max-width: 1000px) { .acc-grid { grid-template-columns: 1fr; } }
.acc-tabs { display: flex; gap: 6px; margin: 20px 0 16px; flex-wrap: wrap; }
.acc-tabs button { border: 0; background: var(--surface-2); color: var(--text-2); font: inherit; font-weight: 700; font-size: 13px; padding: 9px 16px; border-radius: 999px; cursor: pointer; }
.acc-tabs button.on { background: #1B1C21; color: #fff; }
[data-theme="dark"] .acc-tabs button.on { background: #fff; color: #111; }
.usage-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.usage-row:last-child { border-bottom: 0; }
.usage-row .ui { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.usage-row .ui .ico { width: 17px; height: 17px; }
.usage-row .uk { flex: 1; font-weight: 700; font-size: 13.5px; }
.usage-row .uv { font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
.meter { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin-top: 6px; }
.meter > i { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.meter.hot > i { background: #F59E0B; } .meter.full > i { background: #EF4444; }
.session-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--surface-2); }
.session-row + .session-row { margin-top: 8px; }
.session-row .ui { width: 38px; height: 38px; border-radius: 12px; background: var(--surface); display: grid; place-items: center; flex: none; }
.nav { gap: 4px; }
.nav a { height: 42px; }
.side { padding: 18px 14px; }
.brand { padding-bottom: 16px; }
@media (max-height: 900px) { .nav a { height: 38px; } .logo { width: 42px; height: 42px; } }
.toasts { top: 96px; right: 40px; }
@media (max-width: 860px) { .toasts { top: 76px; right: 12px; } }

/* =====================================================================
   Escritorio: sin marco tipo tablet. Menú lateral oscuro a toda altura
   y área de trabajo a pantalla completa.
   ===================================================================== */
body { background: var(--frame); }
.app { padding: 0; min-height: 100vh; }
.app::before { display: none; }
.side { position: sticky; top: 0; height: 100vh; margin: 0; border-radius: 0; background: var(--frame); padding: 18px 14px; width: 80px; }
.app.expanded .side { width: 248px; }
.nav a.on::before { left: -14px; }
.main { margin: 0; border-radius: 22px 0 0 22px; min-height: 100vh; background: var(--bg-main, #F7F9FC); box-shadow: -8px 0 30px rgba(0,0,0,.18); }
[data-theme="dark"] .main { --bg-main: #111217; }
.top { height: 72px; padding: 0 40px 0 28px; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--bg-main, #F7F9FC) 88%, transparent); }
[data-theme="dark"] .top { background: color-mix(in srgb, #111217 88%, transparent); }
.content { max-width: 1560px; padding: 28px 44px 48px; }
.card { background: var(--surface); }
.top .round { background: var(--surface); border: 1px solid var(--border); }
.user-pill { background: var(--surface); border: 1px solid var(--border); }
@media (min-width: 1600px) { .content { padding: 32px 56px 56px; } }
@media (max-width: 860px) {
  .main { border-radius: 0; box-shadow: none; }
  .side { position: fixed; height: 100vh; border-radius: 0 20px 20px 0; }
}

.brand-logo { display: inline-grid; place-items: center; flex: none; overflow: hidden; }
.brand-logo svg { display: block; }

/* ---------------------------------------------------------------- Editor de estilo */
.ed-card { display: grid; grid-template-columns: 232px minmax(0, 1fr); padding: 0; overflow: hidden; }
.ed-nav { display: flex; flex-direction: column; gap: 4px; padding: 14px; background: var(--surface-2); border-right: 1px solid var(--border); }
.ed-nav button { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 0; background: none; font: inherit; color: var(--text);
  padding: 10px; border-radius: 14px; cursor: pointer; transition: background .12s; }
.ed-nav button:hover { background: var(--surface-3); }
.ed-nav button.on { background: var(--surface); box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 14px rgba(0,0,0,.05); }
.ed-ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none; background: var(--surface); color: var(--text-2); border: 1px solid var(--border); }
.ed-nav button.on .ed-ic { background: #1B1C21; color: #fff; border-color: transparent; }
[data-theme="dark"] .ed-nav button.on .ed-ic { background: #fff; color: #111; }
.ed-ic .ico { width: 17px; height: 17px; }
.ed-tx { display: flex; flex-direction: column; min-width: 0; }
.ed-tx b { font-size: 13.5px; font-weight: 700; }
.ed-tx small { font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-body { padding: 22px 26px 26px; min-width: 0; }
.ed-title { margin-bottom: 18px; }
.ed-title h2 { font-size: 19px; }
.ed-title p { color: var(--text-2); font-size: 13.5px; margin-top: 4px; }
.ed-group { padding: 16px 0; border-top: 1px solid var(--border); }
.ed-group:first-child { border-top: 0; padding-top: 0; }
.ed-gt { font-size: 12px; font-weight: 800; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 12px; }
.ed-adv { border-top: 1px solid var(--border); padding-top: 14px; margin-top: 2px; }
.ed-adv summary { cursor: pointer; font-weight: 700; font-size: 13.5px; color: var(--text-2); list-style: none; display: flex; align-items: center; gap: 8px; }
.ed-adv summary::before { content: "+"; width: 22px; height: 22px; border-radius: 7px; background: var(--surface-2); display: grid; place-items: center; font-weight: 800; }
.ed-adv[open] summary::before { content: "−"; }
.ed-adv summary::-webkit-details-marker { display: none; }
@media (max-width: 1100px) {
  .ed-card { grid-template-columns: 1fr; }
  .ed-nav { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--border); }
  .ed-nav button { width: auto; flex: none; }
  .ed-tx small { display: none; }
}
.ed-card { grid-template-columns: 252px minmax(0, 1fr); }
.ed-tx small { white-space: normal; line-height: 1.3; }

.ed-title { margin: -4px 0 16px; }
.ed-title p { color: var(--text-2); font-size: 13.5px; }

/* Logo de la marca */
.logo-img { width: 100%; height: 100%; object-fit: contain; display: block; }
.logo { background: transparent !important; box-shadow: none !important; border-radius: 0 !important; }
/* En el menú oscuro se marca el borde del logo para que la parte azul marino se distinga */
.side .logo-img { filter: drop-shadow(0 0 1px rgba(255,255,255,.55)) drop-shadow(0 0 6px rgba(59,130,246,.25)); }

.cam-pick { display: flex; flex-direction: column; gap: 10px; max-width: 420px; }
.cam-auto { display: flex; align-items: center; gap: 12px; text-align: left; width: 100%; border: 1.5px solid var(--border); background: var(--surface); color: var(--text);
  font: inherit; padding: 12px 14px; border-radius: 14px; cursor: pointer; }
.cam-auto .ico { color: var(--accent); flex: none; }
.cam-auto b { display: block; font-size: 13.5px; }
.cam-auto small { color: var(--text-2); font-size: 12px; }
.cam-auto.on { border-color: var(--accent); background: var(--accent-soft); }
.cam-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }

/* ---------------------------------------------------------------- Solicitudes de acceso */
.nav-count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #EF4444; color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.app:not(.expanded) .nav-count { position: absolute; top: 4px; right: 6px; min-width: 16px; height: 16px; font-size: 9.5px; padding: 0 4px; margin: 0; }
.req-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.req-stats .card { border: 0; box-shadow: none; padding: 18px 20px; }
.req-stats .card:nth-child(1) { background: var(--pastel-cream); } .req-stats .card:nth-child(2) { background: var(--pastel-mint); } .req-stats .card:nth-child(3) { background: var(--pastel-rose); }
.req-stats .k { font-size: 12.5px; font-weight: 700; color: var(--text-2); } .req-stats .v { font-size: 30px; font-weight: 800; font-family: var(--display); }
.req-list { display: flex; flex-direction: column; gap: 12px; }
.req { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 16px 18px; }
.req .avatar { width: 48px; height: 48px; font-size: 15px; background: linear-gradient(135deg, #3B82F6, #8B5CF6); }
.req .nm { font-weight: 800; font-size: 15px; } .req .em { color: var(--text-2); font-size: 13.5px; }
.req .meta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; font-size: 12px; color: var(--text-3); }
.req .acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.req .acts select { width: auto; min-width: 150px; height: 40px; padding: 0 12px; border-radius: 999px; }
.btn.approve { background: #16A34A; color: #fff; border-color: transparent; } .btn.approve:hover { background: #15803D; color: #fff; }
.btn.wa { color: #16A34A; }
@media (max-width: 900px) { .req { grid-template-columns: auto 1fr; } .req .acts { grid-column: 1 / -1; justify-content: flex-start; } .req-stats { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- Mis instrucciones */
.brief-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 1000px) { .brief-grid { grid-template-columns: 1fr; } }
.brief-txt { min-height: 150px; font-size: 15px; line-height: 1.65; padding: 16px 18px; border-radius: 16px; resize: vertical; }
.brief-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-add { border: 1px dashed var(--border-strong); background: var(--surface-2); color: var(--text-2); font: inherit; font-size: 12.5px; font-weight: 700; padding: 7px 12px; border-radius: 999px; cursor: pointer; }
.chip-add:hover { border-style: solid; border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.brief-sum { margin: 12px 0 0; padding-left: 18px; display: grid; gap: 8px; color: #E8EAEE; font-size: 14px; line-height: 1.5; }
.brief-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.brief-tags span { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.1); color: #fff; padding: 6px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 700; }

/* ---------- Lyrics y marca de agua ---------- */
.ly-grid{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:20px;align-items:start}
@media (max-width:1100px){.ly-grid{grid-template-columns:1fr}}
.ly-side{position:sticky;top:20px}
.ly-or{display:flex;align-items:center;gap:12px;margin:12px 0;color:var(--text-2);font-size:12px}
.ly-or::before,.ly-or::after{content:"";flex:1;height:1px;background:var(--border)}
.ly-file{display:flex;align-items:center;gap:10px;padding:14px 16px;border:1.5px dashed var(--border);border-radius:14px;cursor:pointer;font-size:13.5px;font-weight:600;color:var(--text-2);transition:border-color .15s}
.ly-file:hover{border-color:var(--accent);color:var(--text)}
#lyText{width:100%;margin-top:10px;border:1px solid var(--border);border-radius:12px;padding:12px;font:inherit;font-size:13.5px;background:var(--surface);color:var(--text);resize:vertical}
.ly-styles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
@media (max-width:700px){.ly-styles{grid-template-columns:repeat(2,minmax(0,1fr))}}
.ly-style{display:flex;flex-direction:column;align-items:flex-start;gap:3px;text-align:left;padding:10px;border:1.5px solid var(--border);border-radius:14px;background:var(--surface);cursor:pointer;font:inherit;color:var(--text)}
.ly-style.on{border-color:var(--accent);box-shadow:0 0 0 3px rgba(71,127,255,.15)}
.ly-style strong{font-size:13px}.ly-style small{font-size:11.5px;color:var(--text-2);line-height:1.3}
.ly-box{display:flex;align-items:center;justify-content:center;width:100%;height:62px;margin-bottom:6px;border-radius:10px;background:linear-gradient(135deg,#1b1530,#0c0b14);font-size:15px;overflow:hidden}
.ly-demo{display:inline-flex;flex-wrap:wrap;justify-content:center;gap:0 .3em}
.ly-grid div.field{display:grid;gap:7px;margin-bottom:14px}.ly-grid div.field>span{font-size:12.5px;font-weight:700}
.ly-demo{--ly-c:#fff;--ly-a:#FFD23F;color:var(--ly-c);font-weight:800;letter-spacing:.2px;text-shadow:0 2px 6px rgba(0,0,0,.45)}
.ly-demo b{display:inline-block;font-weight:inherit}
.ly-karaoke b{background:linear-gradient(90deg,var(--ly-a) 50%,var(--ly-c) 50%) right/200% 100% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;animation:lyK 3s infinite}
.ly-karaoke b:nth-child(2){animation-delay:.6s}.ly-karaoke b:nth-child(3){animation-delay:1.2s}
@keyframes lyK{0%,10%{background-position:right}35%,85%{background-position:left}100%{background-position:right}}
.ly-neon{color:#fff;text-shadow:0 0 6px var(--ly-a),0 0 14px var(--ly-a),0 0 26px var(--ly-a)}
.ly-pop b{animation:lyP 2.4s infinite both}.ly-pop b:nth-child(2){animation-delay:.35s}.ly-pop b:nth-child(3){animation-delay:.7s}
@keyframes lyP{0%{opacity:0;transform:scale(.5)}12%{opacity:1;transform:scale(1.15);color:var(--ly-a)}22%,85%{opacity:1;transform:scale(1);color:var(--ly-c)}100%{opacity:0}}
.ly-cinematic{text-transform:uppercase;animation:lyC 3s infinite}
@keyframes lyC{0%{letter-spacing:8px;opacity:0;filter:blur(3px)}30%,85%{letter-spacing:1px;opacity:1;filter:none}100%{opacity:0}}
.ly-typewriter{overflow:hidden;white-space:nowrap}
.ly-typewriter b{animation:lyT 3s steps(1) infinite both}.ly-typewriter b:nth-child(2){animation-delay:.5s}.ly-typewriter b:nth-child(3){animation-delay:1s}
@keyframes lyT{0%{opacity:0}10%,90%{opacity:1}100%{opacity:0}}
.ly-slide{animation:lyS 2.6s infinite}.ly-slide b:nth-child(2){color:var(--ly-a)}
@keyframes lyS{0%{transform:translateY(16px);opacity:0}18%,85%{transform:none;opacity:1}100%{opacity:0}}
.ly-phone{position:relative;margin:0 auto;width:220px;aspect-ratio:9/16;border-radius:22px;overflow:hidden;background:#0c0b14;border:6px solid #111;transition:aspect-ratio .2s,width .2s}
.ly-phone[data-fmt=square]{aspect-ratio:1;width:260px}.ly-phone[data-fmt=horizontal]{aspect-ratio:16/9;width:300px}
.ly-phone[data-bg=video] .ly-phone-in{background:linear-gradient(160deg,#3a3f58,#1a1c26 60%,#2c2434)}
.ly-phone[data-bg=image] .ly-phone-in{background:radial-gradient(circle at 30% 30%,#7a4f9c,#251733 70%)}
.ly-phone[data-bg=gradient] .ly-phone-in{background:linear-gradient(120deg,var(--accent),#3A1C71,#0B0A14);background-size:300% 300%;animation:lyG 8s ease infinite}
@keyframes lyG{0%,100%{background-position:0 50%}50%{background-position:100% 50%}}
.ly-phone-in{position:absolute;inset:0;display:grid;place-items:center;padding:16px;text-align:center;font-size:19px}
.ly-wm{--wm-size:.18;position:absolute;font-weight:800;font-size:calc(var(--wm-size) * 70px);line-height:1;color:#fff;text-shadow:0 1px 3px rgba(0,0,0,.5)}
.ly-wm img{display:block;width:calc(var(--wm-size) * 220px);max-width:none;height:auto}
.ly-wm-tl{top:6%;left:6%}.ly-wm-tr{top:6%;right:6%}.ly-wm-bl{bottom:6%;left:6%}.ly-wm-br{bottom:6%;right:6%}
.ly-wm-tc{top:6%;left:50%;transform:translateX(-50%)}.ly-wm-bc{bottom:9%;left:50%;transform:translateX(-50%)}
.ly-wm-center{top:50%;left:50%;transform:translate(-50%,-50%)}
.ly-wm span{white-space:nowrap}
.wm-pos{display:grid;grid-template-columns:repeat(7,38px);gap:6px}
.wm-pos button{height:38px;border:1.5px solid var(--border);border-radius:10px;background:var(--surface);color:var(--text);font-size:16px;cursor:pointer}
.wm-pos button.on{border-color:var(--accent);background:var(--accent);color:#fff}
.btn.lg{padding:14px 18px;font-size:15px;justify-content:center}
.check{display:flex;align-items:center;gap:8px;cursor:pointer}

/* ---------- Efectos visuales (vistas previas) ---------- */
.fx-wrap{position:absolute;inset:0;overflow:hidden}
.fx-l{position:absolute;inset:0}
.fx-l>*{position:absolute;inset:0}
.fx-vig{position:absolute;inset:0;pointer-events:none;background:radial-gradient(ellipse at center,transparent 45%,rgba(0,0,0,.85) 100%)}
.fx-grain{position:absolute;inset:-50%;pointer-events:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");mix-blend-mode:overlay;animation:fxg .4s steps(3) infinite}
@keyframes fxg{0%{transform:translate(0,0)}33%{transform:translate(-4%,3%)}66%{transform:translate(3%,-2%)}100%{transform:translate(0,0)}}
.fx-glow{position:absolute;inset:0;pointer-events:none;background:radial-gradient(circle at 50% 40%,rgba(255,255,255,.5),transparent 70%);mix-blend-mode:screen}
.fx-rgb{position:absolute;inset:0;pointer-events:none;box-shadow:inset var(--s) 0 0 rgba(255,0,0,.35),inset calc(var(--s) * -1) 0 0 rgba(0,160,255,.35)}
.fx-bar{position:absolute;left:0;right:0;height:8%;background:#000;z-index:2}.fx-bar.t{top:0}.fx-bar.b{bottom:0}
.fx-looks{display:grid;grid-template-columns:repeat(auto-fill,minmax(84px,1fr));gap:8px;margin-bottom:16px}
.fx-look{display:flex;flex-direction:column;gap:5px;align-items:stretch;padding:5px;border:1.5px solid var(--border);border-radius:12px;background:var(--surface);cursor:pointer;font:inherit;color:var(--text)}
.fx-look.on{border-color:var(--accent);box-shadow:0 0 0 3px rgba(71,127,255,.15)}
.fx-look small{font-size:11px;font-weight:700;text-align:center;line-height:1.2}
.fx-sw{display:block;height:46px;border-radius:8px;background:linear-gradient(135deg,#f6c26b 0%,#e8665a 35%,#5a7be8 70%,#3fbf9f 100%)}
.fx-range span{display:flex;justify-content:space-between}.fx-range b{font-weight:600;color:var(--text-2)}
.fx-sws{display:flex;flex-wrap:wrap;gap:12px 22px;margin-top:4px}
.font-select optgroup{font-family:var(--font);font-weight:700;font-style:normal}

/* ---------- Estudio de plantillas de lyrics ---------- */
.lt-grid{display:grid;grid-template-columns:250px minmax(0,1fr) 330px;gap:20px;align-items:start}
@media (max-width:1280px){.lt-grid{grid-template-columns:220px minmax(0,1fr)}.lt-grid>.ly-side{grid-column:1/-1;position:static}}
@media (max-width:860px){.lt-grid{grid-template-columns:1fr}}
.lt-list{position:sticky;top:20px;max-height:calc(100vh - 120px);overflow:auto}
.lt-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.lt-cards-wide{grid-template-columns:repeat(auto-fill,minmax(120px,1fr))}
.ly-tcard{display:flex;flex-direction:column;gap:6px;padding:5px;border:1.5px solid var(--border);border-radius:12px;background:var(--surface);cursor:pointer;font:inherit;color:var(--text);text-align:left}
.ly-tcard.on{border-color:var(--accent);box-shadow:0 0 0 3px rgba(71,127,255,.15)}
.ly-tprev{position:relative;display:block;aspect-ratio:4/5;border-radius:8px;overflow:hidden;background:#0c0b14}
.ly-tword{position:absolute;inset:0;display:grid;place-items:center;padding:6px;font-size:12px;text-align:center;z-index:2}
.ly-tname{font-size:11.5px;font-weight:700;padding:0 3px 2px;line-height:1.25}
.ly-scene{position:absolute;inset:0}
.ly-scene-video{background:radial-gradient(80% 55% at 35% 30%,#E8A87C,#9A5B7A 40%,transparent 70%),radial-gradient(70% 60% at 75% 75%,#3A7BD5,transparent 70%),#1B1F33;filter:blur(2px)}
.ly-scene-image{background:radial-gradient(60% 45% at 50% 35%,#F6D365,#C06C84 45%,#355C7D 85%);filter:blur(1px)}
.ly-scene-gradient{background:linear-gradient(130deg,var(--ly-a),#3A1C71 45%,#0B0A14 75%,#14213D);background-size:300% 300%;animation:lyG 9s ease infinite}
.ly-phone{position:relative}
.ly-phone-in{z-index:2;display:flex;flex-direction:column;gap:10px;justify-content:center;align-items:center}
.ly-next{font-weight:700;font-size:12px;color:rgba(255,255,255,.5)}
.ly-viz{position:absolute;left:0;right:0;bottom:16%;height:9%;display:flex;align-items:center;gap:2px;padding:0 6%;z-index:2}
.ly-viz i{flex:1;height:30%;border-radius:2px;background:var(--ly-a);opacity:.85;animation:lyV .9s ease-in-out infinite alternate}
@keyframes lyV{0%{height:15%}100%{height:95%}}
.ly-phone .ly-wm{z-index:4}
.lt-fonts{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:6px;margin-top:4px}
.lt-fonts button{padding:9px 8px;border:1.5px solid var(--border);border-radius:10px;background:var(--surface);color:var(--text);cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.1}
.lt-fonts button.on{border-color:var(--accent);background:var(--accent-soft)}
.lt-palettes{display:flex;flex-wrap:wrap;gap:8px;margin-top:2px}
.lt-palettes button{display:flex;padding:3px;border:1.5px solid var(--border);border-radius:999px;background:var(--surface);cursor:pointer}
.lt-palettes i{width:18px;height:18px;border-radius:50%;border:1px solid rgba(0,0,0,.12)}
.lt-palettes i+i{margin-left:-5px}
.ly-howto{display:flex;flex-direction:column;gap:8px;align-items:flex-start}
.lt-lyrics{width:100%;margin-top:10px}
.cs-modes{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:18px}
.cs-mode{display:flex;align-items:center;gap:12px;padding:14px 16px;border:1.5px solid var(--border);border-radius:14px;background:var(--surface);cursor:pointer;font:inherit;color:var(--text);text-align:left}
.cs-mode span{display:flex;flex-direction:column;gap:2px}.cs-mode small{color:var(--text-2);font-size:12px}
.cs-mode.on{border-color:var(--accent);background:var(--accent-soft)}

/* ---------- Edición de la transcripción del clip ---------- */
.tr-tools{display:grid;grid-template-columns:1fr 1fr auto;gap:8px;margin:10px 0}
.tr-tools input{padding:8px 10px;font-size:13px}
.tr-lines{display:flex;flex-direction:column;gap:4px;max-height:320px;overflow:auto;padding-right:4px}
.tr-line{display:grid;grid-template-columns:44px 1fr;gap:8px;align-items:start}
.tr-t{font:600 11.5px var(--mono);color:var(--text-2);padding-top:9px;text-align:right}
.tr-line textarea{min-height:0;resize:none;overflow:hidden;padding:7px 10px;font-size:13.5px;line-height:1.4;border-width:1px;background:var(--surface)}
.tr-line textarea.edited{border-color:var(--accent);background:var(--accent-soft)}

/* ---------- Administración: usuarios y gastos ---------- */
.avatar{position:relative}
.avatar.sm{width:34px;height:34px;font-size:13px;background:linear-gradient(135deg,#3B82F6,#8B5CF6)}
.avatar.lg{width:64px;height:64px;font-size:24px;background:linear-gradient(135deg,#3B82F6,#8B5CF6)}
.dot-on{position:absolute;right:-1px;bottom:-1px;width:11px;height:11px;border-radius:50%;background:var(--good);border:2px solid var(--surface)}
.table th.num,.table td.num{text-align:right;white-space:nowrap}
.u-head{display:flex;align-items:center;gap:18px;flex-wrap:wrap;margin-bottom:14px}
.u-tabs{margin-bottom:16px;overflow-x:auto}
.u-vthumb{position:relative;display:grid;place-items:center;width:56px;aspect-ratio:16/10;border-radius:8px;background:var(--surface-2);overflow:hidden;color:var(--text-2)}
.u-vthumb img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.u-clips{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:12px}
.u-clips-all{grid-template-columns:repeat(auto-fill,minmax(140px,1fr))}
.u-cthumb{position:relative;display:grid;place-items:center;aspect-ratio:9/16;border-radius:10px;overflow:hidden;background:var(--surface-2);color:var(--text-2)}
.u-cthumb img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.u-cthumb .dur{position:absolute;right:6px;bottom:6px;font-size:11px;font-weight:700;color:#fff;background:rgba(0,0,0,.6);padding:1px 6px;border-radius:6px}
.cost-rows{display:flex;flex-direction:column;gap:12px}
.cost-row b{font-size:13.5px}
.cost-bar{height:6px;border-radius:99px;background:var(--surface-3);overflow:hidden;margin:6px 0 4px}
.cost-bar i{display:block;height:100%;background:var(--accent);border-radius:99px}

/* ---------- Miniaturas de los clips ---------- */
.cv-box{margin-bottom:14px;padding:14px;border-radius:14px;background:var(--surface-2)}
.cv-row{display:grid;grid-template-columns:72px 128px 1fr;gap:12px;align-items:start}
@media (max-width:900px){.cv-row{grid-template-columns:72px 1fr}.cv-h{display:none}}
.cv-v,.cv-h{display:block;border-radius:8px;overflow:hidden;background:#000;box-shadow:0 2px 8px rgba(0,0,0,.18)}
.cv-v{aspect-ratio:9/16}.cv-h{aspect-ratio:16/9}
.cv-v img,.cv-h img{display:block;width:100%;height:100%;object-fit:cover}
.cv-actions{display:flex;flex-direction:column;gap:8px;min-width:0}
.cv-actions input{padding:7px 10px;font-size:13px}
.cv-frames{display:grid;grid-template-columns:repeat(auto-fill,minmax(84px,1fr));gap:8px;margin-top:12px}
.cv-frames button{position:relative;padding:0;border:2px solid transparent;border-radius:9px;overflow:hidden;background:#000;cursor:pointer;aspect-ratio:16/10}
.cv-frames button.on{border-color:var(--accent)}
.cv-frames img{display:block;width:100%;height:100%;object-fit:cover}
.cv-frames span{position:absolute;left:4px;bottom:4px;font-size:10.5px;font-weight:700;color:#fff;background:rgba(0,0,0,.6);padding:1px 5px;border-radius:5px}
.cv-spin{position:absolute;inset:0;display:grid;place-items:center;background:rgba(0,0,0,.45)}
.th-wrap{display:flex;gap:18px;align-items:flex-start;margin-bottom:6px}
.th-prev{position:relative;flex:none;width:130px;aspect-ratio:9/16;border-radius:12px;overflow:hidden;background:#111;transition:opacity .2s}
.th-scene{position:absolute;inset:0;background:radial-gradient(70% 40% at 50% 32%,#F0B48C,#B06A6A 40%,#3B4A7A 75%,#111a2e)}
.th-grad{position:absolute;left:0;right:0;height:55%}
.th-grad.th-bottom{bottom:0;background:linear-gradient(transparent,rgba(0,0,0,.8))}
.th-grad.th-top{top:0;background:linear-gradient(rgba(0,0,0,.8),transparent)}
.th-grad.th-middle{top:22%;background:radial-gradient(ellipse at center,rgba(0,0,0,.55),transparent 70%)}
.th-text{position:absolute;left:8px;right:8px;text-align:center;line-height:1.05;font-weight:800;-webkit-text-stroke:1px #000;paint-order:stroke fill;text-shadow:0 2px 3px rgba(0,0,0,.6)}
.th-text.th-bottom{bottom:12%}.th-text.th-top{top:10%}.th-text.th-middle{top:50%;transform:translateY(-50%)}
.th-text b{display:inline-block;padding:0 4px;border-radius:4px;color:#111;-webkit-text-stroke:0;text-shadow:none}

/* ---------- Editor: menú y submenú ---------- */
.ed-menu{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;padding:5px;border-radius:14px;background:var(--surface-2)}
.ed-menu button{display:flex;align-items:center;justify-content:center;gap:8px;height:42px;border:0;border-radius:10px;background:transparent;color:var(--text-2);font:inherit;font-weight:700;font-size:13.5px;cursor:pointer;transition:background .15s,color .15s}
.ed-menu button:hover{color:var(--text)}
.ed-menu button.on{background:var(--surface);color:var(--text);box-shadow:0 1px 3px rgba(0,0,0,.08)}
.ed-sub{display:flex;gap:6px;margin:12px 0 2px;flex-wrap:wrap}
.ed-sub button{height:32px;padding:0 14px;border:1.5px solid var(--border);border-radius:999px;background:transparent;color:var(--text-2);font:inherit;font-weight:650;font-size:12.5px;cursor:pointer}
.ed-sub button.on{border-color:var(--accent);background:var(--accent-soft);color:var(--accent)}
@media (max-width:560px){.ed-menu button span{display:none}}

/* ---------- Volver a renderizar ---------- */
.rr-box{padding:14px;border-radius:14px;background:var(--surface-2)}
.rr-strip{display:flex;gap:10px;overflow-x:auto;padding:2px 2px 8px;scrollbar-width:thin}
.rr-opt{position:relative;flex:none;width:104px;cursor:pointer;border-radius:12px}
.rr-opt .tpl,.rr-opt .ly-tcard{width:100%;pointer-events:none;margin:0}
.rr-opt.on .tpl,.rr-opt.on .ly-tcard{border-color:var(--accent);box-shadow:0 0 0 3px rgba(71,127,255,.2)}
.rr-tpl .meta{padding:6px 8px}.rr-tpl .meta .n{font-size:11.5px}
.rr-now{position:absolute;top:6px;left:6px;font-size:10px;font-weight:800;color:#fff;background:var(--accent);padding:2px 6px;border-radius:6px;z-index:3}
.rr-range{display:grid;grid-template-columns:1fr 1fr auto;gap:10px;align-items:end;margin-top:10px}
.rr-range input{font-variant-numeric:tabular-nums}
.rr-dur{display:flex;flex-direction:column;gap:4px;padding:0 6px 10px;min-width:70px}
.rr-dur b{font-size:15px}
.clipm>*{min-width:0}
.rr-box,.cv-box{min-width:0;max-width:100%}
.modal-body{overflow-x:hidden}
.side-ver{padding:6px 18px 14px;font-size:11px;color:rgba(255,255,255,.35);font-weight:600}

/* ---------- Efectos de música (lyrics) ---------- */
.viz-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:10px}
.viz-card{display:flex;flex-direction:column;gap:6px;padding:6px;border:1.5px solid var(--border);border-radius:14px;background:var(--surface);cursor:pointer;font:inherit;color:var(--text);text-align:left}
.viz-card.on{border-color:var(--accent);box-shadow:0 0 0 3px rgba(71,127,255,.15)}
.viz-card strong{font-size:12.5px;padding:0 4px 3px}
.viz-prev{display:grid;place-items:center;height:64px;border-radius:10px;background:linear-gradient(135deg,#141a2e,#0b0d16);overflow:hidden;padding:0 8px}
.vz-none{color:rgba(255,255,255,.5)}
.vz-bars{display:flex;align-items:flex-end;gap:3px;width:100%;height:70%}
.vz-bars i{flex:1;height:30%;background:var(--c);border-radius:2px;animation:vzB .7s ease-in-out infinite alternate}
.vz-mirror{align-items:center}
.vz-mirror i{animation-name:vzM}
@keyframes vzB{0%{height:12%}100%{height:100%}}
@keyframes vzM{0%{height:10%}100%{height:95%}}
.vz-dots{display:flex;align-items:center;justify-content:space-between;width:100%;height:70%}
.vz-dots i{width:5px;height:5px;border-radius:50%;background:var(--c);animation:vzD .6s ease-in-out infinite alternate}
@keyframes vzD{0%{transform:translateY(12px)}100%{transform:translateY(-12px)}}
.vz-wave{display:block;width:100%;height:60%;overflow:hidden}
.vz-wave svg{width:200%;height:100%;animation:vzW 1.6s linear infinite}
@keyframes vzW{0%{transform:translateX(0)}100%{transform:translateX(-50%)}}
.vz-circle{position:relative;display:block;width:46px;height:46px}
.vz-circle b{position:absolute;inset:0;border:2px solid var(--c);border-radius:46% 54% 50% 50%;animation:vzC 1.4s linear infinite}
.vz-circle b+b{inset:6px;opacity:.6;animation-direction:reverse;animation-duration:1s}
@keyframes vzC{0%{transform:rotate(0) scale(1)}50%{transform:rotate(180deg) scale(1.12);border-radius:54% 46% 40% 60%}100%{transform:rotate(360deg) scale(1)}}
.ly-vz{position:absolute;left:6%;right:6%;z-index:2;display:grid;place-items:center;height:11%}
.ly-vz-small{height:8%}.ly-vz-large{height:15%}
.ly-vz-bottom{bottom:12%}.ly-vz-top{top:8%}.ly-vz-center{top:50%;transform:translateY(-50%)}
.ly-vz.is-circle{height:auto}.ly-vz.is-circle .vz-circle{width:90px;height:90px}
.ly-vz .vz-bars,.ly-vz .vz-dots,.ly-vz .vz-wave{height:100%}

/* Tutoriales de integraciones */
.tut-frame { position: relative; aspect-ratio: 16/9; border-radius: 14px; overflow: hidden; background: #000; }
.tut-frame iframe, .tut-frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.tut-empty { aspect-ratio: 16/9; border-radius: 14px; background: var(--surface-2); display: grid; place-content: center; justify-items: center; gap: 10px; color: var(--text-3, var(--muted)); }
.tut-admin { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.img-ph { width: 100%; height: 100%; min-height: 60px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-3, var(--muted)); }

/* Cookies de YouTube */
.ck-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 18px; align-items: start; }
@media (max-width: 900px) { .ck-grid { grid-template-columns: 1fr; } }
.ck-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-3, var(--muted)); }
.ck-ico.ok { background: rgba(40, 190, 120, .14); color: #3ccf8e; }
.ck-ico.warn { background: rgba(230, 170, 30, .14); color: #e3a92b; }

/* Registro de errores */
.er-pre { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; margin: 6px 0 0; white-space: pre-wrap; word-break: break-word; font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; max-height: 260px; overflow: auto; }
.er-trace { max-height: 360px; }
.er-ctx { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 6px 0 0; font-size: 13px; }
.er-ctx dt { color: var(--text-3, var(--muted)); text-transform: capitalize; }
.er-ctx dd { margin: 0; word-break: break-word; }
