/* Viollet. Sistema visual propio.
   Radios: controles 10px, paneles 16px, chips y avatar redondos.
   Un solo acento (violeta), neutros con un leve tinte frío. */

@font-face {
  font-family: "Geist";
  src: url("/fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #f7f6fa;
  --surface: #ffffff;
  --surface-2: #efedf4;
  --surface-3: #e6e3ee;
  --line: #e1dee9;
  --line-strong: #cfcbdb;
  --text: #1b1922;
  --text-2: #55516a;
  --text-3: #6f6a82;
  --accent: #6b4fd8;
  --accent-hover: #5c41c7;
  --accent-ink: #ffffff;
  --accent-soft: #ece7ff;
  --accent-text: #5236c2;
  --danger: #b4233c;
  --danger-soft: #fbe9ec;
  --shadow: 0 1px 2px rgb(40 30 80 / .06), 0 8px 24px rgb(40 30 80 / .08);
  --shadow-pop: 0 4px 12px rgb(40 30 80 / .10), 0 20px 48px rgb(40 30 80 / .14);
  --code-bg: #f1eff6;

  --r-ctl: 10px;
  --r-panel: 16px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --sidebar-w: 280px;
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141218;
    --surface: #1c1a22;
    --surface-2: #24212c;
    --surface-3: #2d2a37;
    --line: #2f2c39;
    --line-strong: #3e3a4b;
    --text: #ecebf2;
    --text-2: #b4b0c4;
    --text-3: #918ca3;
    --accent: #8f78ee;
    --accent-hover: #a08cf2;
    --accent-ink: #120f1a;
    --accent-soft: #2c2547;
    --accent-text: #b7a8f7;
    --danger: #f08097;
    --danger-soft: #3a1d25;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px rgb(0 0 0 / .25);
    --shadow-pop: 0 4px 12px rgb(0 0 0 / .35), 0 20px 48px rgb(0 0 0 / .4);
    --code-bg: #121016;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141218;
  --surface: #1c1a22;
  --surface-2: #24212c;
  --surface-3: #2d2a37;
  --line: #2f2c39;
  --line-strong: #3e3a4b;
  --text: #ecebf2;
  --text-2: #b4b0c4;
  --text-3: #918ca3;
  --accent: #8f78ee;
  --accent-hover: #a08cf2;
  --accent-ink: #120f1a;
  --accent-soft: #2c2547;
  --accent-text: #b7a8f7;
  --danger: #f08097;
  --danger-soft: #3a1d25;
  --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px rgb(0 0 0 / .25);
  --shadow-pop: 0 4px 12px rgb(0 0 0 / .35), 0 20px 48px rgb(0 0 0 / .4);
  --code-bg: #121016;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.i { width: 20px; height: 20px; flex: none; }
.i.sm { width: 16px; height: 16px; }
.i.dim { color: var(--text-3); }

/* ---------- Marca ---------- */
.brand { display: flex; align-items: center; gap: 10px; }
.mark {
  display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 650; font-size: 15px; letter-spacing: -0.02em;
}
.mark-lg { width: 44px; height: 44px; border-radius: 12px; font-size: 22px; }
.wordmark { font-weight: 600; font-size: 17px; letter-spacing: -0.02em; }

.boot { position: fixed; inset: 0; display: grid; place-items: center; }
.boot .mark { animation: breathe 1.4s var(--ease-in-out) infinite alternate; }
@keyframes breathe { from { opacity: .45; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: var(--r-ctl);
  font-weight: 550; white-space: nowrap;
  transition: background-color 160ms var(--ease-out), transform 120ms var(--ease-out), box-shadow 160ms var(--ease-out);
}
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn.primary:disabled { opacity: .55; cursor: default; }
.btn.block { width: 100%; }
.btn.subtle { background: var(--surface-2); color: var(--text); }
.btn.subtle:hover { background: var(--surface-3); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; border-radius: var(--r-ctl);
  color: var(--text-2);
  transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out), transform 120ms var(--ease-out);
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn:active { transform: scale(0.94); }

/* ---------- Acceso ---------- */
.auth { min-height: 100dvh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-brand {
  display: flex; flex-direction: column; justify-content: space-between; gap: 48px;
  padding: 40px 56px;
  background:
    radial-gradient(120% 80% at 0% 100%, color-mix(in oklab, var(--accent) 22%, transparent), transparent 60%),
    linear-gradient(160deg, var(--surface-2), var(--bg));
  border-right: 1px solid var(--line);
}
.auth-pitch h1 {
  margin: 0 0 16px; max-width: 14ch;
  font-size: clamp(2.2rem, 4vw, 3.4rem); line-height: 1.04; letter-spacing: -0.035em; font-weight: 620;
}
.auth-pitch p { margin: 0; max-width: 40ch; color: var(--text-2); font-size: 17px; }
.auth-models { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.auth-models li {
  padding: 6px 12px; border-radius: 999px; font-size: 13px; color: var(--text-2);
  background: color-mix(in oklab, var(--surface) 70%, transparent); border: 1px solid var(--line);
}
.auth-panel { display: grid; place-items: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 380px; }
.tabs {
  display: grid; grid-template-columns: 1fr 1fr; padding: 4px; gap: 4px;
  background: var(--surface-2); border-radius: 12px; margin-bottom: 28px;
}
.tabs button {
  height: 36px; border-radius: 8px; color: var(--text-2); font-weight: 550;
  transition: background-color 180ms var(--ease-out), color 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
}
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.auth-hint { margin: 0 0 20px; color: var(--text-2); }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 13px; font-weight: 550; color: var(--text-2); }
.field input {
  height: 44px; width: 100%; padding: 0 14px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-ctl);
  transition: border-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 22%, transparent); }
.help { color: var(--text-3); font-size: 12.5px; }
.input-with-action { position: relative; }
.input-with-action input { padding-right: 46px; }
.input-with-action .icon-btn { position: absolute; right: 4px; top: 4px; }
.form-error {
  margin: 0 0 16px; padding: 10px 12px; border-radius: var(--r-ctl);
  background: var(--danger-soft); color: var(--danger); font-size: 14px;
}

/* ---------- App ---------- */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; height: 100dvh; overflow: hidden; }
.app.sidebar-hidden { grid-template-columns: 0 1fr; }
.app.sidebar-hidden .sidebar { transform: translateX(-100%); visibility: hidden; }

.sidebar {
  display: flex; flex-direction: column; min-width: 0; width: var(--sidebar-w);
  background: var(--surface-2); border-right: 1px solid var(--line);
  transition: transform 260ms var(--ease-out), visibility 260ms;
}
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 12px 10px 16px; }
.new-chat {
  margin: 4px 12px 12px; justify-content: flex-start;
  background: var(--surface); border: 1px solid var(--line); color: var(--text);
}
.new-chat:hover { border-color: var(--line-strong); }
.history { flex: 1; overflow-y: auto; padding: 0 8px 12px; overscroll-behavior: contain; }
.history h3 { margin: 18px 10px 6px; font-size: 12px; font-weight: 600; color: var(--text-3); }
.conv {
  position: relative; display: flex; align-items: center;
  border-radius: var(--r-ctl);
  transition: background-color 140ms var(--ease-out);
}
.conv a {
  flex: 1; min-width: 0; padding: 8px 10px; color: var(--text-2); text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px;
}
.conv:hover { background: var(--surface-3); }
.conv.active { background: var(--surface); }
.conv.active a { color: var(--text); font-weight: 520; }
.conv .conv-actions { display: none; padding-right: 4px; }
.conv:hover .conv-actions, .conv.active .conv-actions, .conv:focus-within .conv-actions { display: flex; }
.conv .icon-btn { width: 28px; height: 28px; }
.conv input {
  flex: 1; min-width: 0; margin: 3px; padding: 5px 8px; font-size: 14px;
  border: 1px solid var(--accent); border-radius: 8px; background: var(--surface);
}
.history-empty { margin: 16px 10px; color: var(--text-3); font-size: 14px; }

.sidebar-foot { position: relative; padding: 10px; border-top: 1px solid var(--line); }
.user-btn {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border-radius: var(--r-ctl); text-align: left;
  transition: background-color 140ms var(--ease-out);
}
.user-btn:hover { background: var(--surface-3); }
.avatar {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; flex: none;
  background: var(--accent-soft); color: var(--accent-text); font-weight: 600; font-size: 14px;
}
.user-meta { display: grid; min-width: 0; flex: 1; line-height: 1.25; }
.user-meta strong { font-weight: 550; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta small { color: var(--text-3); font-size: 12px; }

.menu, .popover {
  position: absolute; z-index: 30;
  min-width: 220px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-pop);
  transform-origin: var(--origin, bottom left);
  animation: pop-in 180ms var(--ease-out);
}
@keyframes pop-in { from { opacity: 0; transform: scale(0.96) translateY(4px); } }
.menu { left: 10px; right: 10px; bottom: calc(100% - 4px); }
.menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 8px; text-align: left; font-size: 14px;
}
.menu button:hover { background: var(--surface-2); }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.topbar { display: flex; align-items: center; gap: 8px; height: 56px; padding: 0 12px; flex: none; }
.app:not(.sidebar-hidden) #open-sidebar { display: none; }
.model-picker { position: relative; }
.model-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px; border-radius: var(--r-ctl);
  font-weight: 580; font-size: 15px;
  transition: background-color 140ms var(--ease-out);
}
.model-btn:hover, .model-btn[aria-expanded="true"] { background: var(--surface-2); }
.model-btn .i { color: var(--text-3); transition: transform 200ms var(--ease-out); }
.model-btn[aria-expanded="true"] .i { transform: rotate(180deg); }
.popover { top: calc(100% + 6px); left: 0; width: 320px; --origin: top left; max-height: min(70dvh, 520px); overflow-y: auto; }
.popover h4 { margin: 10px 10px 4px; font-size: 12px; color: var(--text-3); font-weight: 600; }
.model-opt {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px;
  width: 100%; padding: 8px 10px; border-radius: 8px; text-align: left;
}
.model-opt:hover, .model-opt:focus-visible { background: var(--surface-2); }
.model-opt strong { font-weight: 550; font-size: 14px; }
.model-opt small { grid-column: 1; color: var(--text-3); font-size: 12.5px; }
.model-opt .i { grid-row: 1 / span 2; grid-column: 2; color: var(--accent); visibility: hidden; }
.model-opt[aria-selected="true"] .i { visibility: visible; }
.popover-empty { padding: 12px; color: var(--text-2); font-size: 14px; }

.topbar-end { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.trial-pill {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-text); font-size: 13px; font-weight: 550;
  font-variant-numeric: tabular-nums;
}
.trial-pill.over { background: var(--danger-soft); color: var(--danger); }

/* ---------- Conversación ---------- */
.thread { flex: 1; overflow-y: auto; min-height: 0; scroll-behavior: smooth; }
.empty {
  max-width: 720px; margin: 0 auto; padding: 14vh 24px 24px;
  animation: rise 420ms var(--ease-out) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.empty h2 { margin: 0 0 6px; font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
.empty p { margin: 0 0 28px; color: var(--text-2); font-size: 17px; }
.starters { display: flex; flex-wrap: wrap; gap: 8px; }
.starters button {
  padding: 10px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  color: var(--text-2); font-size: 14px;
  transition: border-color 160ms var(--ease-out), color 160ms var(--ease-out), transform 120ms var(--ease-out);
}
.starters button:hover { border-color: var(--accent); color: var(--text); }
.starters button:active { transform: scale(0.97); }

.messages { max-width: 760px; margin: 0 auto; padding: 8px 24px 32px; }
.msg { margin: 0 0 28px; animation: rise 260ms var(--ease-out) both; }
.msg.static { animation: none; }
.msg.user { display: flex; justify-content: flex-end; }
.msg.user .bubble {
  max-width: 82%; padding: 10px 16px; border-radius: 18px 18px 6px 18px;
  background: var(--surface-3); white-space: pre-wrap; overflow-wrap: anywhere;
}
.msg.assistant .who { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 13px; color: var(--text-3); }
.msg.assistant .who .mark { width: 22px; height: 22px; border-radius: 6px; font-size: 12px; }
.msg.assistant .body { overflow-wrap: anywhere; }
.msg-tools { display: flex; gap: 2px; margin-top: 6px; opacity: 0; transition: opacity 160ms var(--ease-out); }
.msg:hover .msg-tools, .msg-tools:focus-within { opacity: 1; }
.msg-tools .icon-btn { width: 30px; height: 30px; }
.msg-error {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--r-ctl);
  background: var(--danger-soft); color: var(--danger); font-size: 14px;
}
.cursor::after {
  content: ""; display: inline-block; width: 8px; height: 1.05em; margin-left: 2px; vertical-align: -0.15em;
  border-radius: 2px; background: var(--accent); animation: blink 1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.thinking { display: inline-flex; gap: 4px; padding: 6px 0; }
.thinking span { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); animation: dot 1.1s var(--ease-in-out) infinite; }
.thinking span:nth-child(2) { animation-delay: .15s; }
.thinking span:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

/* Markdown */
.body > :first-child { margin-top: 0; }
.body > :last-child { margin-bottom: 0; }
.body p, .body ul, .body ol, .body pre, .body blockquote, .body table { margin: 0 0 14px; }
.body h1, .body h2, .body h3, .body h4 { margin: 22px 0 10px; line-height: 1.25; letter-spacing: -0.015em; }
.body h1 { font-size: 1.4em; } .body h2 { font-size: 1.25em; } .body h3 { font-size: 1.1em; } .body h4 { font-size: 1em; }
.body ul, .body ol { padding-left: 1.4em; }
.body li { margin: 4px 0; }
.body a { color: var(--accent-text); text-underline-offset: 2px; }
.body code { font-family: var(--mono); font-size: .88em; padding: 2px 5px; border-radius: 6px; background: var(--code-bg); }
.body pre { position: relative; padding: 14px 16px; border-radius: 12px; background: var(--code-bg); border: 1px solid var(--line); overflow-x: auto; }
.body pre code { padding: 0; background: none; font-size: 13.5px; line-height: 1.6; }
.body pre .copy-code { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; background: var(--surface); border: 1px solid var(--line); }
.body blockquote { padding-left: 14px; border-left: 3px solid var(--line-strong); color: var(--text-2); }
.body hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.body table { border-collapse: collapse; display: block; overflow-x: auto; font-size: 14px; }
.body th, .body td { padding: 8px 12px; border: 1px solid var(--line); text-align: left; }
.body th { background: var(--surface-2); font-weight: 600; }

/* ---------- Compositor ---------- */
.composer-wrap { flex: none; padding: 0 24px 14px; }
.composer {
  max-width: 760px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 22px;
  box-shadow: var(--shadow);
  transition: border-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}
.composer:focus-within { border-color: color-mix(in oklab, var(--accent) 55%, var(--line-strong)); }
.composer textarea {
  display: block; width: 100%; max-height: 40dvh; min-height: 52px; resize: none;
  padding: 16px 18px 6px; border: 0; background: transparent; outline: none; line-height: 1.5;
}
.composer textarea::placeholder { color: var(--text-3); }
.composer-bar { display: flex; align-items: center; gap: 8px; padding: 6px 8px 8px 10px; }
.effort { display: inline-flex; padding: 3px; gap: 2px; border-radius: 12px; background: var(--surface-2); }
.effort button {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 9px;
  font-size: 13px; color: var(--text-2); font-weight: 520;
  transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out);
}
.effort button:hover { color: var(--text); }
.effort button[aria-checked="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgb(0 0 0 / .08); }
.effort[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.send {
  display: grid; place-items: center; margin-left: auto;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink);
  transition: background-color 160ms var(--ease-out), transform 120ms var(--ease-out), opacity 160ms var(--ease-out);
}
.send:hover:not(:disabled) { background: var(--accent-hover); }
.send:active:not(:disabled) { transform: scale(0.92); }
.send:disabled { opacity: .35; cursor: default; }
.disclaimer { max-width: 760px; margin: 8px auto 0; text-align: center; font-size: 12px; color: var(--text-3); }

/* ---------- Diálogo de administración ---------- */
.dialog {
  width: min(760px, calc(100vw - 32px)); max-height: min(80dvh, 720px); padding: 0;
  border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--surface); color: var(--text);
  box-shadow: var(--shadow-pop);
}
.dialog[open] { animation: pop-in 200ms var(--ease-out); }
.dialog::backdrop { background: rgb(15 12 25 / .45); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 8px 22px; }
.dialog-head h2 { margin: 0; font-size: 18px; font-weight: 600; }
.dialog-body { padding: 4px 22px 22px; overflow-y: auto; }
.users-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.users-table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text-3); padding: 8px 8px 8px 0; }
.users-table td { padding: 10px 8px 10px 0; border-top: 1px solid var(--line); vertical-align: middle; }
.users-table td small { display: block; color: var(--text-3); }
.users-table select {
  height: 32px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface);
}
.users-table .btn { height: 32px; padding: 0 10px; font-size: 13px; }

/* ---------- Aviso ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 50; transform: translateX(-50%);
  padding: 10px 16px; border-radius: 12px; background: var(--text); color: var(--bg); font-size: 14px;
  box-shadow: var(--shadow-pop); animation: toast-in 220ms var(--ease-out);
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }

.scrim { position: fixed; inset: 0; z-index: 20; background: rgb(15 12 25 / .4); animation: fade 200ms var(--ease-out); }
@keyframes fade { from { opacity: 0; } }

/* ---------- Móvil ---------- */
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-brand { padding: 24px; gap: 24px; border-right: 0; border-bottom: 1px solid var(--line); }
  .auth-pitch h1 { font-size: 2rem; }
  .auth-models { display: none; }

  .app, .app.sidebar-hidden { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 25; width: min(86vw, 320px);
    box-shadow: var(--shadow-pop);
  }
  .app.sidebar-hidden .sidebar { transform: translateX(-100%); }
  .app:not(.sidebar-hidden) #open-sidebar { display: inline-grid; }
  .messages, .composer-wrap { padding-left: 14px; padding-right: 14px; }
  .empty { padding-top: 8vh; }
  .effort button { padding: 0 8px; }
  .effort button .label-long { display: none; }
  .msg-tools { opacity: 1; }
  .users-table .hide-sm { display: none; }
}
@media (max-width: 420px) {
  .effort button { font-size: 0; gap: 0; padding: 0 9px; }
  .effort button .i { width: 16px; height: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
}

/* Enlace de marca y administración ampliada */
.brand-link { color: inherit; text-decoration: none; flex-wrap: wrap; }
.brand-link .by { width: 100%; padding-left: 38px; margin-top: -6px; font-size: 12px; color: var(--text-3); }
.admin-tabs { margin: 4px 22px 12px; max-width: 360px; }
.leads { display: grid; gap: 12px; }
.lead { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; }
.lead header { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.lead header small, .lead > small { color: var(--text-3); font-size: 12.5px; }
.lead p { margin: 6px 0; white-space: pre-wrap; font-size: 14px; }
.lead-service { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font-size: 12px; font-weight: 550; }
