/* =========================================================
   Nexo AI — sitio público (landing, precios, auth, legal)
   ========================================================= */
:root {
  color-scheme: dark;
  --bg: #060d0a;
  --bg-soft: #08110d;
  --panel: #0b1712;
  --panel-2: #0d1c16;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .14);
  --text: #eef7f2;
  --muted: #95aaa1;
  --dim: #6d8279;
  --brand: #2ae08f;
  --brand-2: #12c77a;
  --brand-soft: rgba(42, 224, 143, .12);
  --danger: #ff7b7b;
  --radius: 16px;
  --shadow: 0 24px 80px rgba(0, 0, 0, .45);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Sora", "Inter", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; letter-spacing: -.03em; line-height: 1.08; margin: 0; }
p { margin: 0; }
::selection { background: rgba(42, 224, 143, .28); color: #fff; }

.container { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.center { text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--brand);
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: var(--brand); opacity: .7; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  border: 1px solid transparent; border-radius: 12px;
  padding: 14px 22px; font-size: 14.5px; font-weight: 600;
  cursor: pointer; transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(180deg, #3aee9e, #17cf80);
  color: #04140d;
  box-shadow: 0 8px 30px rgba(42, 224, 143, .22), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 38px rgba(42, 224, 143, .3); }
.btn-ghost { background: rgba(255, 255, 255, .035); border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .22); }
.btn-sm { padding: 10px 16px; font-size: 13.5px; border-radius: 10px; }
.btn-lg { padding: 17px 28px; font-size: 15.5px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------- Barra de anuncio ---------- */
.announce {
  background: linear-gradient(90deg, rgba(42, 224, 143, .15), rgba(42, 224, 143, .05) 55%, rgba(42, 224, 143, .14));
  border-bottom: 1px solid rgba(42, 224, 143, .16);
  display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 9px 48px; font-size: 13px; position: relative; z-index: 60;
}
.announce p { color: #d9f7e9; font-weight: 500; }
.announce-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 12px var(--brand); flex: none; }
.announce-link { color: var(--brand); font-weight: 700; display: inline-flex; gap: 5px; align-items: center; }
.announce-link:hover { text-decoration: underline; }
.announce-close {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; color: #9fc7b6; font-size: 20px; line-height: 1; cursor: pointer; padding: 4px 8px;
}
.announce.is-hidden { display: none; }

/* ---------- Navegación ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(6, 13, 10, .72);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  transition: border-color .2s, background .2s;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
.nav.is-scrolled { border-bottom-color: var(--line); background: rgba(6, 13, 10, .9); }
.nav-inner { width: min(1180px, calc(100% - 40px)); margin: 0 auto; height: 68px; display: flex; align-items: center; gap: 32px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 17px; letter-spacing: -.02em; }
.brand img { border-radius: 9px; }
.nav-links { display: flex; align-items: center; gap: 28px; margin-left: 12px; }
.nav-link { font-size: 14px; color: #b7c8c0; font-weight: 500; transition: color .15s; }
.nav-link:hover, .nav-link.is-active { color: #fff; }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.nav-login { font-size: 14px; font-weight: 600; color: #c9d8d1; }
.nav-login:hover { color: var(--brand); }
.credits-pill {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid rgba(42, 224, 143, .22); background: rgba(42, 224, 143, .08);
  color: #baf7d9; border-radius: 999px; padding: 8px 13px; font-size: 12.5px; font-weight: 600;
}
.credit-spark { color: var(--brand); }
.nav-burger { display: none; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: transparent; cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.nav-burger span { display: block; width: 16px; height: 1.5px; background: #d7e6df; transition: transform .2s; }
.nav-burger[aria-expanded="true"] span:first-child { transform: translateY(3.25px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 78px 0 24px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto -10%; height: 900px; pointer-events: none;
  background:
    radial-gradient(48% 46% at 50% 8%, rgba(42, 224, 143, .15), transparent 70%),
    radial-gradient(30% 30% at 82% 30%, rgba(23, 143, 97, .12), transparent 70%),
    radial-gradient(28% 28% at 15% 35%, rgba(42, 224, 143, .07), transparent 70%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(60% 55% at 50% 25%, #000 0%, transparent 100%);
  -webkit-mask-image: radial-gradient(60% 55% at 50% 25%, #000 0%, transparent 100%);
}
.hero-inner { position: relative; z-index: 1; text-align: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 9px;
  border: 1px solid var(--line-strong); background: rgba(255, 255, 255, .035);
  border-radius: 999px; padding: 7px 14px 7px 8px; font-size: 12.5px; color: #cfddd7; margin-bottom: 26px;
  transition: border-color .2s;
}
.hero-badge:hover { border-color: rgba(42, 224, 143, .4); }
.hero-badge b { background: var(--brand); color: #03140c; font-size: 10.5px; font-weight: 800; letter-spacing: .04em; padding: 3px 8px; border-radius: 999px; text-transform: uppercase; }
.hero-title { font-size: clamp(44px, 7.2vw, 82px); letter-spacing: -.05em; line-height: 1.02; }
.hero-title .grad {
  background: linear-gradient(100deg, #b9ffdd 0%, #2ae08f 45%, #0fb574 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  position: relative;
}
.hero-title .grad::after {
  content: ""; position: absolute; left: 2%; right: 2%; bottom: -.06em; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(42, 224, 143, .7), transparent);
}
.hero-sub { max-width: 660px; margin: 24px auto 0; color: #b6c8c0; font-size: clamp(15.5px, 2vw, 18px); line-height: 1.65; }
.hero-cta { display: flex; justify-content: center; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.hero-note { margin-top: 14px; font-size: 12.5px; color: var(--dim); display: flex; justify-content: center; align-items: center; gap: 7px; }
.hero-note svg { opacity: .8; }
.model-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; margin-top: 34px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .025);
  border-radius: 999px; padding: 7px 13px; font-size: 12.5px; color: #c7d8d0; font-weight: 500;
}
.chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--dot, #8aa79b); box-shadow: 0 0 8px var(--dot, transparent); }

/* Mockup del chat */
.mock-wrap { position: relative; margin: 62px auto 0; max-width: 1000px; }
.mock-glow { position: absolute; inset: 8% 12% -6%; background: radial-gradient(50% 60% at 50% 40%, rgba(42, 224, 143, .22), transparent 72%); filter: blur(30px); pointer-events: none; }
.mock {
  position: relative; border: 1px solid var(--line-strong); border-radius: 20px; overflow: hidden;
  background: #07110d; box-shadow: 0 40px 120px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .06);
  display: grid; grid-template-columns: 216px 1fr; text-align: left;
  transform: translateZ(0);
}
.mock-side { border-right: 1px solid var(--line); padding: 16px 14px; background: #08130f; display: flex; flex-direction: column; gap: 12px; }
.mock-brand { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 700; font-size: 13px; }
.mock-brand img { width: 22px; height: 22px; border-radius: 6px; }
.mock-new { border: 1px solid var(--line); border-radius: 9px; padding: 9px 10px; font-size: 11.5px; color: #c6d7cf; display: flex; gap: 7px; align-items: center; background: rgba(255, 255, 255, .02); }
.mock-label { font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: #5f766c; margin-top: 8px; }
.mock-item { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: #8fa69c; padding: 6px 2px; }
.mock-item.is-active { color: #d9ebe2; background: rgba(255, 255, 255, .04); border-radius: 7px; padding: 7px 8px; margin: 0 -6px; }
.mock-item .dot { width: 5px; height: 5px; border-radius: 50%; background: #3d5a4e; flex: none; }
.mock-plan { margin-top: auto; border: 1px solid rgba(42, 224, 143, .22); background: rgba(42, 224, 143, .07); border-radius: 11px; padding: 11px; }
.mock-plan strong { display: block; font-size: 11px; color: #d8f8e8; }
.mock-plan span { font-size: 9.5px; color: #78a08e; }
.mock-bar { height: 4px; background: rgba(255, 255, 255, .08); border-radius: 99px; margin-top: 8px; overflow: hidden; }
.mock-bar i { display: block; height: 100%; width: 62%; background: linear-gradient(90deg, #12c77a, #4df0aa); }

.mock-main { display: flex; flex-direction: column; min-height: 470px; background: radial-gradient(80% 60% at 70% 0%, rgba(42, 224, 143, .045), transparent 60%); }
.mock-top { display: flex; align-items: center; justify-content: space-between; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.mock-model { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: #d7e8e0; border: 1px solid var(--line); border-radius: 9px; padding: 6px 10px; background: rgba(255, 255, 255, .025); }
.mock-model .prov { width: 15px; height: 15px; border-radius: 50%; background: #0e2a1e; display: grid; place-items: center; font-size: 8px; color: var(--brand); font-weight: 700; }
.mock-credits { font-size: 10.5px; color: #8aa69a; display: flex; align-items: center; gap: 5px; }
.mock-credits b { color: #baf7d9; font-weight: 600; }
.mock-chat { padding: 20px 22px; display: flex; flex-direction: column; gap: 16px; flex: 1; }
.mock-msg { display: flex; gap: 10px; max-width: 92%; }
.mock-msg .av { width: 26px; height: 26px; border-radius: 8px; flex: none; display: grid; place-items: center; font-size: 9.5px; font-weight: 700; }
.mock-msg.user { align-self: flex-end; flex-direction: row-reverse; }
.mock-msg.user .av { background: #12352a; color: #7bf0b9; }
.mock-msg.ai .av { background: linear-gradient(160deg, #2ae08f, #0c9a62); color: #04140d; }
.bubble { border-radius: 12px; padding: 11px 13px; font-size: 12.5px; line-height: 1.55; }
.mock-msg.user .bubble { background: rgba(42, 224, 143, .12); border: 1px solid rgba(42, 224, 143, .14); color: #d9f6e8; border-top-right-radius: 4px; }
.mock-msg.ai .bubble { background: rgba(255, 255, 255, .035); border: 1px solid var(--line); border-top-left-radius: 4px; color: #cfdfd8; }
.bubble .row { display: flex; gap: 6px; margin-top: 8px; }
.bubble .tag { font-size: 9px; border: 1px solid var(--line); border-radius: 5px; padding: 2px 6px; color: #9db8ad; }
.typing { display: inline-flex; gap: 3px; margin-left: 4px; }
.typing i { width: 4px; height: 4px; border-radius: 50%; background: var(--brand); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
.mock-composer { margin: 0 18px 18px; border: 1px solid var(--line-strong); background: #0a1712; border-radius: 14px; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; box-shadow: 0 8px 30px rgba(0, 0, 0, .25); }
.mock-composer span { font-size: 12px; color: #637a70; }
.mock-send { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(180deg, #3aee9e, #16cb7e); display: grid; place-items: center; color: #04140d; font-size: 14px; flex: none; }

/* ---------- Trust strip ---------- */
.trust { padding: 40px 0 8px; }
.trust-inner { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 22px 0; display: flex; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap; }
.trust-label { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #5f776c; }
.trust-items { display: flex; gap: 26px; flex-wrap: wrap; align-items: center; }
.trust-item { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #9db4a9; }
.trust-item b { color: #dcebe4; font-weight: 600; }
.trust-item svg { color: var(--brand); flex: none; }

/* ---------- Secciones ---------- */
.section { padding: 96px 0; position: relative; }
.section-tight { padding: 70px 0; }
.section-alt { background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .018) 18%, rgba(255, 255, 255, .018) 82%, transparent); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 720px; margin: 0 auto 52px; text-align: center; }
.section-head h2 { font-size: clamp(30px, 4vw, 46px); margin-top: 14px; }
.section-head p { color: var(--muted); margin-top: 16px; font-size: 16px; }
.section-head.left { margin-left: 0; text-align: left; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature-card {
  position: relative; border: 1px solid var(--line); border-radius: 18px; padding: 26px 24px 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .008));
  overflow: hidden; transition: border-color .2s, transform .2s;
}
.feature-card:hover { border-color: rgba(42, 224, 143, .24); transform: translateY(-2px); }
.feature-card::after { content: ""; position: absolute; width: 180px; height: 180px; right: -80px; top: -90px; background: radial-gradient(circle, rgba(42, 224, 143, .1), transparent 70%); }
.feature-ico { width: 40px; height: 40px; border-radius: 11px; background: rgba(42, 224, 143, .1); border: 1px solid rgba(42, 224, 143, .17); display: grid; place-items: center; color: var(--brand); margin-bottom: 18px; }
.feature-card h3 { font-size: 17.5px; letter-spacing: -.02em; margin-bottom: 8px; }
.feature-card p { color: var(--muted); font-size: 13.8px; line-height: 1.62; }
.feature-card .mini { margin-top: 16px; font-size: 11.5px; color: #79a08e; display: flex; gap: 6px; align-items: center; }

/* ---------- Modelos ---------- */
.models-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.model-card {
  border: 1px solid var(--line); border-radius: 15px; padding: 19px;
  background: rgba(255, 255, 255, .02); transition: border-color .2s, background .2s;
  display: flex; flex-direction: column; gap: 9px;
}
.model-card:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, .035); }
.model-top { display: flex; align-items: center; gap: 10px; }
.prov-mark { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 10px; font-weight: 800; letter-spacing: -.02em; flex: none; }
.prov-openai { background: rgba(139, 233, 201, .12); color: #8be9c9; }
.prov-anthropic { background: rgba(215, 174, 255, .12); color: #d7aeff; }
.prov-google { background: rgba(140, 180, 255, .12); color: #9dbdff; }
.prov-deepseek { background: rgba(120, 160, 255, .14); color: #9db6ff; }
.prov-xai { background: rgba(255, 255, 255, .1); color: #e6f0eb; }
.prov-qwen { background: rgba(255, 174, 120, .12); color: #ffbe8e; }
.prov-meta { background: rgba(120, 170, 255, .12); color: #a8c4ff; }
.prov-mistral { background: rgba(255, 196, 120, .12); color: #ffce8f; }
.prov-other { background: rgba(42, 224, 143, .1); color: #7fe8b6; }
.model-name { font-size: 14px; font-weight: 600; letter-spacing: -.01em; }
.model-prov { font-size: 10.5px; color: var(--dim); }
.model-desc { font-size: 12.3px; color: var(--muted); line-height: 1.5; min-height: 36px; }
.model-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; border-top: 1px solid var(--line); padding-top: 10px; }
.model-ctx { font-size: 10.5px; color: var(--dim); }
.model-badge { font-size: 9.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--brand); background: rgba(42, 224, 143, .1); border: 1px solid rgba(42, 224, 143, .2); padding: 3px 7px; border-radius: 5px; }
.models-foot { margin-top: 26px; display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; }
.models-count { font-size: 12.5px; color: var(--dim); }

/* ---------- Cómo funciona ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: step; }
.step { border: 1px solid var(--line); border-radius: 16px; padding: 26px 22px; background: rgba(255, 255, 255, .02); position: relative; }
.step-num {
  font-family: var(--display); font-size: 12px; font-weight: 700; color: var(--brand);
  border: 1px solid rgba(42, 224, 143, .25); background: rgba(42, 224, 143, .08);
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; margin-bottom: 18px;
}
.step h3 { font-size: 16px; margin-bottom: 7px; }
.step p { font-size: 13.5px; color: var(--muted); line-height: 1.6; }

/* ---------- Precios ---------- */
.pricing-toggle { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); border-radius: 999px; padding: 4px; margin-top: 24px; }
.pricing-toggle button { border: 0; background: transparent; color: #9fb5aa; font-size: 12.5px; font-weight: 600; padding: 8px 15px; border-radius: 999px; cursor: pointer; transition: .18s; }
.pricing-toggle button.is-active { background: #e9fbf2; color: #06150e; }
.pricing-toggle .save { color: var(--brand); font-size: 10.5px; font-weight: 700; margin-left: 2px; }
.plans-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; align-items: stretch; }
.price-card {
  border: 1px solid var(--line); border-radius: 18px; padding: 24px 21px; background: rgba(255, 255, 255, .02);
  display: flex; flex-direction: column; position: relative; transition: border-color .2s, transform .2s;
}
.price-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.price-card.is-featured {
  border-color: rgba(42, 224, 143, .38);
  background: linear-gradient(180deg, rgba(42, 224, 143, .09), rgba(42, 224, 143, .02) 55%, rgba(255, 255, 255, .01));
  box-shadow: 0 20px 70px rgba(11, 130, 88, .14);
}
.price-badge {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(180deg, #3aee9e, #17cf80); color: #04140d;
  font-size: 9.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; white-space: nowrap;
}
.price-name { font-family: var(--display); font-size: 16px; font-weight: 600; }
.price-tagline { font-size: 11.5px; color: var(--dim); margin-top: 4px; min-height: 34px; }
.price-value { display: flex; align-items: baseline; gap: 5px; margin-top: 14px; }
.price-value .num { font-family: var(--display); font-size: 38px; font-weight: 700; letter-spacing: -.04em; line-height: 1; }
.price-value .per { font-size: 11.5px; color: var(--dim); }
.price-yearly-note { font-size: 11px; color: var(--brand); height: 16px; margin-top: 4px; }
.price-credits { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #c8e7d7; background: rgba(42, 224, 143, .07); border: 1px solid rgba(42, 224, 143, .14); border-radius: 7px; padding: 6px 9px; margin: 14px 0 16px; align-self: flex-start; }
.price-features { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.price-features li { display: flex; gap: 8px; font-size: 12.3px; color: #b3c8be; line-height: 1.45; }
.price-features svg { flex: none; margin-top: 2px; color: var(--brand); }
.price-card .btn { width: 100%; }
.pricing-note { margin-top: 22px; text-align: center; font-size: 12.5px; color: var(--dim); }
.pricing-note a { color: var(--brand); }

/* Recargas / pricing page */
.packs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.pack-card { border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 255, 255, .02); padding: 22px; display: flex; flex-direction: column; }
.pack-card h3 { font-size: 15px; }
.pack-card .pack-credits { font-family: var(--display); font-size: 30px; font-weight: 700; letter-spacing: -.03em; margin: 12px 0 2px; }
.pack-card .pack-credits small { font-size: 12px; color: var(--muted); font-family: var(--font); font-weight: 500; }
.pack-card .pack-note { font-size: 12px; color: var(--dim); }
.pack-card .pack-price { margin-top: 14px; font-size: 18px; font-weight: 700; }
.pack-card .btn { margin-top: 16px; }

/* ---------- Casos de uso ---------- */
.cases { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.case { display: flex; gap: 16px; border: 1px solid var(--line); border-radius: 16px; padding: 22px; background: rgba(255, 255, 255, .02); }
.case-ico { width: 40px; height: 40px; border-radius: 11px; background: rgba(42, 224, 143, .08); border: 1px solid rgba(42, 224, 143, .15); display: grid; place-items: center; color: var(--brand); flex: none; }
.case h3 { font-size: 15px; margin-bottom: 5px; }
.case p { font-size: 13px; color: var(--muted); line-height: 1.55; }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.faq-item { border: 1px solid var(--line); border-radius: 13px; background: rgba(255, 255, 255, .02); overflow: hidden; }
.faq-q { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: none; border: 0; color: var(--text); text-align: left; padding: 17px 20px; font-size: 14.5px; font-weight: 500; cursor: pointer; }
.faq-q svg { flex: none; transition: transform .2s; color: var(--muted); }
.faq-item.is-open .faq-q svg { transform: rotate(45deg); color: var(--brand); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .28s ease; }
.faq-a p { padding: 0 20px 18px; color: var(--muted); font-size: 13.6px; line-height: 1.68; }

/* ---------- CTA final ---------- */
.cta-final { padding: 20px 0 100px; }
.cta-panel {
  position: relative; overflow: hidden; border: 1px solid rgba(42, 224, 143, .25); border-radius: 24px;
  padding: 64px 32px; text-align: center;
  background: radial-gradient(70% 120% at 50% 0%, rgba(42, 224, 143, .16), transparent 65%), linear-gradient(180deg, #0a1a13, #07110d);
}
.cta-panel::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px); background-size: 54px 54px; mask-image: radial-gradient(50% 60% at 50% 0%, #000, transparent); -webkit-mask-image: radial-gradient(50% 60% at 50% 0%, #000, transparent); }
.cta-panel > * { position: relative; }
.cta-panel h2 { font-size: clamp(30px, 4.4vw, 48px); }
.cta-panel p { color: #b6c8c0; margin: 16px auto 28px; max-width: 520px; font-size: 15.5px; }
.cta-panel .hero-note { margin-top: 16px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 56px 0 26px; background: #050b08; }
.footer-inner { width: min(1180px, calc(100% - 40px)); margin: 0 auto; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 34px; padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
.footer-brand p { color: var(--muted); font-size: 12.8px; margin-top: 14px; max-width: 320px; line-height: 1.65; }
.footer-brand .footer-tech { color: var(--dim); font-size: 11.5px; }
.footer-brand .footer-tech a { color: #9fc7b6; text-decoration: underline; text-underline-offset: 2px; }
.footer-col h4, .footer-col h2.footer-col-title { font-family: var(--font); font-size: 11px; letter-spacing: .13em; text-transform: uppercase; color: #93aa9f; margin: 0 0 14px; font-weight: 600; }
.footer-col a { display: block; font-size: 13px; color: #a8bcb2; margin-bottom: 9px; transition: color .15s; }
.footer-col a:hover { color: var(--brand); }
.footer-bottom { width: min(1180px, calc(100% - 40px)); margin: 42px auto 0; padding-top: 20px; padding-bottom: env(safe-area-inset-bottom); padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 11.5px; color: var(--dim); }
.footer-pay span { color: #9fb5aa; margin-left: 6px; }

/* ---------- Alertas y formularios ---------- */
.alert { border-radius: 10px; padding: 12px 14px; font-size: 13.2px; line-height: 1.5; margin-bottom: 16px; border: 1px solid transparent; }
.alert-ok { background: rgba(42, 224, 143, .09); border-color: rgba(42, 224, 143, .25); color: #b9f5d8; }
.alert-error { background: rgba(255, 105, 105, .08); border-color: rgba(255, 105, 105, .28); color: #ffc0c0; }
.alert-warn { background: rgba(255, 196, 90, .08); border-color: rgba(255, 196, 90, .25); color: #ffe0ad; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 15px; }
.field label { font-size: 12.5px; font-weight: 500; color: #a9bdb3; }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--line-strong); background: #08120e; color: var(--text);
  border-radius: 10px; padding: 12px 13px; font: inherit; font-size: 14px; transition: border-color .15s, box-shadow .15s;
}
.field input::placeholder, .field textarea::placeholder { color: #5d746a; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: rgba(42, 224, 143, .6); box-shadow: 0 0 0 3px rgba(42, 224, 143, .1); }
.field .hint { font-size: 11.5px; color: var(--dim); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.checkline { display: flex; align-items: flex-start; gap: 9px; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.checkline input { margin-top: 3px; accent-color: var(--brand); }
.form-error { color: #ffb3b3; background: rgba(255, 90, 90, .08); border: 1px solid rgba(255, 90, 90, .22); border-radius: 9px; padding: 10px 12px; font-size: 12.5px; margin-bottom: 14px; }
.form-success { color: #b9f5d8; background: rgba(42, 224, 143, .08); border: 1px solid rgba(42, 224, 143, .22); border-radius: 9px; padding: 10px 12px; font-size: 12.5px; margin-bottom: 14px; }

/* ---------- Auth ---------- */
.auth-body { background: #060d0a; }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-aside {
  position: relative; overflow: hidden; padding: 42px 54px; display: flex; flex-direction: column;
  background: radial-gradient(70% 60% at 20% 0%, rgba(42, 224, 143, .16), transparent 62%), linear-gradient(160deg, #0a1a13, #060d0a 60%);
  border-right: 1px solid var(--line);
}
.auth-aside::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px); background-size: 56px 56px; mask-image: radial-gradient(70% 70% at 30% 20%, #000, transparent); -webkit-mask-image: radial-gradient(70% 70% at 30% 20%, #000, transparent); pointer-events: none; }
.auth-aside > * { position: relative; z-index: 1; }
.auth-aside-copy { margin-top: auto; margin-bottom: auto; max-width: 480px; padding: 40px 0; }
.auth-aside-copy h2 { font-size: clamp(30px, 3.4vw, 46px); margin: 14px 0 18px; }
.auth-aside-copy > p:not(.eyebrow) { color: #a9beb4; font-size: 15px; line-height: 1.7; }
.auth-points { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-direction: column; gap: 11px; }
.auth-points li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: #c6d9d0; }
.auth-points span { color: var(--brand); font-size: 11px; }
.auth-aside-foot { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--dim); }
.model-dots { display: flex; }
.model-dots i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #07110d; margin-left: -6px; background: #173b2c; }
.model-dots i:first-child { margin-left: 0; background: #1f5c42; }
.model-dots i:nth-child(2) { background: #2a7a58; }
.model-dots i:nth-child(3) { background: #391f5c; }
.model-dots i:nth-child(4) { background: #2b3f7a; }
.model-dots i:nth-child(5) { background: #2ae08f; }
.auth-main { display: flex; flex-direction: column; justify-content: center; padding: 36px calc(24px + env(safe-area-inset-right)) 36px calc(24px + env(safe-area-inset-left)); position: relative; }
.auth-topbar { position: absolute; top: 24px; left: calc(24px + env(safe-area-inset-left)); right: calc(24px + env(safe-area-inset-right)); display: flex; justify-content: space-between; align-items: center; }
.auth-back { font-size: 12.5px; color: var(--dim); }
.auth-back:hover { color: var(--brand); }
.auth-mobile-brand { display: none; align-items: center; gap: 8px; font-family: var(--display); font-weight: 700; font-size: 14px; }
.auth-mobile-brand img { border-radius: 7px; }
.auth-card { width: min(420px, 100%); margin: 0 auto; }
.auth-card h1 { font-size: 30px; letter-spacing: -.035em; margin-bottom: 8px; }
.auth-card .auth-sub { color: var(--muted); font-size: 13.8px; margin-bottom: 26px; }
.auth-legal { width: min(420px, 100%); margin: 22px auto 0; font-size: 11px; color: #5a7066; text-align: center; line-height: 1.6; }
.auth-legal a { color: #93b7a6; text-decoration: underline; text-underline-offset: 2px; }
.google-btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
  border: 1px solid var(--line-strong); background: #0e1b15; color: #e8f4ee;
  border-radius: 10px; padding: 11px 14px; font-size: 13.5px; font-weight: 600; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.google-btn:hover { background: #12241b; border-color: rgba(42, 224, 143, .35); }
.google-one-tap { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.google-btn-slot { width: 100%; min-height: 42px; display: flex; justify-content: center; }
.google-btn-slot > div, .google-btn-slot iframe { max-width: 100%; }
.google-fallback { width: 100%; }
.google-error { margin: 0; color: #ffb3b3; font-size: 11.5px; line-height: 1.5; text-align: center; }
.auth-divider { display: flex; align-items: center; gap: 12px; color: #5f766c; font-size: 11px; margin: 18px 0; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.auth-switch { text-align: center; font-size: 12.8px; color: var(--muted); margin-top: 20px; }
.auth-switch a { color: var(--brand); font-weight: 600; }
.auth-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; font-size: 12.3px; }
.auth-row a { color: #a8c4b7; }
.auth-row a:hover { color: var(--brand); }
.pw-wrap { position: relative; }
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear { display: none; }
.pw-wrap input { padding-right: 44px; }
.pw-toggle { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; display: grid; place-items: center; background: none; border: 0; color: #6d8579; cursor: pointer; padding: 0; border-radius: 7px; }
.pw-toggle:hover { color: var(--brand); background: rgba(255, 255, 255, .045); }
.pw-toggle:focus-visible { outline: 2px solid rgba(42, 224, 143, .5); outline-offset: 1px; }
.pw-toggle .ico-eye-off { display: none; }
.pw-toggle.is-on .ico-eye { display: none; }
.pw-toggle.is-on .ico-eye-off { display: block; }

/* ---------- Páginas legales ---------- */
.legal-body { background: var(--bg); }
.legal-head { padding: 150px 0 40px; border-bottom: 1px solid var(--line); background: radial-gradient(60% 60% at 50% 0%, rgba(42, 224, 143, .1), transparent 70%); }
.legal-head h1 { font-size: clamp(34px, 5vw, 52px); }
.legal-head p { color: var(--muted); margin-top: 12px; font-size: 14px; }
.legal { padding: 48px 0 90px; }
.legal-wrap { max-width: 760px; }
.legal h2 { font-size: 21px; margin: 34px 0 10px; }
.legal h2:first-child { margin-top: 0; }
.legal h3 { font-size: 16px; margin: 22px 0 8px; }
.legal p, .legal li { color: #a9bdb3; font-size: 14px; line-height: 1.75; }
.legal p { margin-bottom: 12px; }
.legal ul { padding-left: 20px; margin: 8px 0 16px; }
.legal li { margin-bottom: 6px; }
.legal a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.legal-note { border: 1px solid var(--line); background: rgba(255, 255, 255, .03); border-radius: 12px; padding: 16px 18px; margin: 22px 0; font-size: 13px; color: var(--muted); }

/* ---------- Página de precios ---------- */
.pricing-hero { padding: 72px 0 34px; text-align: center; background: radial-gradient(60% 70% at 50% 0%, rgba(42, 224, 143, .12), transparent 65%); }
.pricing-hero h1 { font-size: clamp(38px, 5.4vw, 62px); }
.pricing-hero p { color: var(--muted); max-width: 620px; margin: 16px auto 0; font-size: 16px; }
.pricing-page .section { padding: 54px 0 80px; }
.compare { width: 100%; border-collapse: collapse; font-size: 12.8px; }
.compare th, .compare td { padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.compare th { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #799286; font-weight: 600; }
.compare td { color: #b2c6bc; }
.compare tr td:first-child { color: #dbeae3; }
.compare th:first-child, .compare td:first-child { position: sticky; left: 0; background: #0a1511; z-index: 2; box-shadow: 8px 0 12px -8px rgba(0, 0, 0, .85); }
.compare .yes { color: var(--brand); }
.compare .no { color: #4e655b; }
.pay-logos { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.pay-logo { border: 1px solid var(--line); border-radius: 8px; padding: 6px 11px; font-size: 10.5px; color: #a4bbaf; background: rgba(255, 255, 255, .03); }

/* ---------- Utilidades ---------- */
.reveal { opacity: 1; transform: none; }
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .55s ease, transform .55s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 16px; z-index: 100; background: #fff; color: #000; padding: 8px 12px; border-radius: 6px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .plans-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid, .models-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 24px; }
  .auth-aside { padding: 36px; }
}
@media (max-width: 860px) {
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #07110d; border-bottom: 1px solid var(--line);
    padding: 8px 20px 16px; margin: 0; display: none;
  }
  .nav-links.is-open { display: flex; }
  .nav-link { padding: 12px 2px; border-bottom: 1px solid rgba(255, 255, 255, .05); font-size: 15px; }
  .nav-burger { display: flex; }
  .nav-actions .credits-pill { display: none; }
  .nav-actions .nav-login { display: none; }
  .mock { grid-template-columns: 1fr; }
  .mock-side { display: none; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-main { min-height: 100vh; }
  .auth-topbar { justify-content: space-between; }
  .auth-mobile-brand { display: inline-flex; }
  .auth-back { font-size: 11.5px; }
  .steps, .packs-grid { grid-template-columns: 1fr; }
  .cases { grid-template-columns: 1fr; }
  .section { padding: 72px 0; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .container, .nav-inner, .footer-inner, .footer-bottom { width: calc(100% - 28px); }
  .announce { padding: 8px calc(34px + env(safe-area-inset-right)) 8px calc(14px + env(safe-area-inset-left)); font-size: 11.5px; gap: 8px; text-align: left; justify-content: flex-start; }
  .announce-link { margin-left: auto; }
  .announce-link span { display: none; }
  .hero { padding-top: 52px; }
  .hero-badge { font-size: 11px; }
  .hero-cta .btn { width: 100%; }
  .hero-cta { gap: 9px; }
  .model-chips { gap: 7px; }
  .chip { font-size: 11px; padding: 6px 10px; }
  .mock-wrap { margin-top: 40px; }
  .mock-main { min-height: 420px; }
  .mock-chat { padding: 16px; }
  .mock-msg { max-width: 100%; }
  .plans-grid, .feature-grid, .models-grid { grid-template-columns: 1fr; }
  .section-head { margin-bottom: 36px; }
  .section-head h2 { font-size: 30px; }
  .cta-panel { padding: 48px 20px; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 26px; }
  .footer-bottom { flex-direction: column; gap: 8px; }
  .auth-main { padding: 85px calc(20px + env(safe-area-inset-right)) calc(30px + env(safe-area-inset-bottom)) calc(20px + env(safe-area-inset-left)); }
  .auth-card h1 { font-size: 26px; }
  .legal-head { padding-top: 120px; }
}

/* =========================================================
   Cuenta / facturación
   ========================================================= */
.panel-page { padding: 56px 0 90px; min-height: 70vh; }
.panel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 30px; flex-wrap: wrap; }
.panel-head h1 { font-size: clamp(30px, 4vw, 42px); margin-top: 10px; }
.panel-head p { color: var(--muted); font-size: 14px; margin-top: 8px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.stat { border: 1px solid var(--line); background: rgba(255, 255, 255, .022); border-radius: 14px; padding: 17px 18px; display: flex; flex-direction: column; gap: 4px; }
.stat-label { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: #6d867a; }
.stat-num { font-family: var(--display); font-size: 26px; font-weight: 700; letter-spacing: -.03em; color: #e9f7f0; }
.stat-note { font-size: 10.8px; color: #6f877c; }
.panel-grid { display: grid; grid-template-columns: 220px 1fr; gap: 22px; align-items: start; }
.panel-side { display: flex; flex-direction: column; gap: 3px; position: sticky; top: 90px; }
.panel-link { font-size: 13px; color: #9cb2a8; padding: 10px 12px; border-radius: 9px; border: 1px solid transparent; }
.panel-link:hover { background: rgba(255, 255, 255, .04); color: #fff; }
.panel-link.is-active { background: rgba(42, 224, 143, .08); border-color: rgba(42, 224, 143, .16); color: #d8f8e8; }
.panel-link-danger { margin-top: 12px; color: #b98b8b; }
.panel-link-danger:hover { background: rgba(255, 90, 90, .08); color: #ffb4b4; }
.panel-content { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.panel-card { border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 255, 255, .022); padding: 22px 22px; }
.panel-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.panel-card-head h2 { font-size: 17px; letter-spacing: -.02em; }
.panel-card-head p { font-size: 12px; color: var(--dim); margin-top: 5px; }
.panel-link-inline { font-size: 12px; color: var(--brand); }
.upgrade-banner { display: flex; align-items: center; justify-content: space-between; gap: 20px; background: linear-gradient(120deg, rgba(42, 224, 143, .12), rgba(42, 224, 143, .03)); border-color: rgba(42, 224, 143, .22); }
.upgrade-banner h2 { font-size: 18px; }
.upgrade-banner p { color: #a5c4b5; font-size: 12.5px; margin-top: 6px; max-width: 480px; }
.upgrade-banner .btn { flex: none; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-grid .field.full { grid-column: 1 / -1; }
.form-actions { grid-column: 1 / -1; margin-top: 2px; display: flex; gap: 8px; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.data-table th, .data-table td { padding: 10px 11px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.data-table th { font-size: 9.8px; letter-spacing: .1em; text-transform: uppercase; color: #6d8579; font-weight: 600; white-space: nowrap; }
.data-table td { color: #b6c9bf; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table .pos { color: var(--brand); font-weight: 600; }
.data-table .neg { color: #e8b0b0; }
.table-empty { text-align: center !important; color: var(--dim) !important; padding: 24px 0 !important; }
.badge { display: inline-flex; align-items: center; font-size: 9.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; border-radius: 5px; padding: 3px 7px; border: 1px solid transparent; }
.badge-ok { background: rgba(42, 224, 143, .1); border-color: rgba(42, 224, 143, .22); color: #8df3c2; }
.badge-warn { background: rgba(255, 196, 90, .1); border-color: rgba(255, 196, 90, .22); color: #ffd590; }
.badge-bad { background: rgba(255, 90, 90, .1); border-color: rgba(255, 90, 90, .22); color: #ffb4b4; }
.badge-muted { background: rgba(255, 255, 255, .05); border-color: var(--line); color: #9cb2a8; }
.balance-pill { border: 1px solid rgba(42, 224, 143, .22); background: rgba(42, 224, 143, .07); border-radius: 999px; padding: 8px 14px; font-size: 13px; color: #c9f7e1; display: inline-flex; align-items: center; gap: 7px; }
.balance-pill span { color: var(--brand); }
.current-plan { border: 1px solid var(--line-strong); border-radius: 16px; background: linear-gradient(115deg, rgba(42, 224, 143, .07), rgba(255, 255, 255, .015)); padding: 20px 22px; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; flex-wrap: wrap; }
.current-plan-label { font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: #729184; }
.current-plan strong { display: block; font-family: var(--display); font-size: 24px; letter-spacing: -.03em; margin-top: 2px; }
.current-plan p { font-size: 12px; color: #8fae9e; margin-top: 4px; }
.current-plan-side { text-align: right; display: flex; flex-direction: column; gap: 3px; }
.current-plan-side span { font-size: 10px; color: #6f8b7d; }
.current-plan-side strong { font-size: 13px; font-family: var(--font); letter-spacing: 0; }
.billing-coupon { display: flex; align-items: center; gap: 16px; border: 1px dashed var(--line-strong); border-radius: 12px; padding: 13px 16px; margin-bottom: 30px; flex-wrap: wrap; }
.billing-coupon label { font-size: 11px; color: #9db3a8; font-weight: 600; white-space: nowrap; }
.billing-coupon > div { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.billing-coupon input { background: #08120e; border: 1px solid var(--line); border-radius: 8px; padding: 8px 11px; color: var(--text); font: inherit; font-size: 12px; width: 200px; text-transform: uppercase; }
.billing-coupon input:focus { outline: none; border-color: rgba(42, 224, 143, .5); }
.billing-section { margin-bottom: 40px; }
.billing-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 18px; flex-wrap: wrap; }
.billing-head h2 { font-size: 23px; }
.billing-head p { color: var(--muted); font-size: 12.8px; margin-top: 5px; max-width: 560px; }
.billing-head .pricing-toggle { margin-top: 0; }
.current-tag { font-size: 8.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--brand); border: 1px solid rgba(42, 224, 143, .25); border-radius: 4px; padding: 2px 5px; vertical-align: middle; font-family: var(--font); }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.info-card { border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .02); padding: 16px; }
.info-card strong { font-size: 12.5px; display: block; margin-bottom: 5px; }
.info-card p { font-size: 11.5px; color: var(--muted); line-height: 1.55; }
.compare-wrap { border: 1px solid var(--line); border-radius: 14px; overflow-x: auto; overflow-y: hidden; background: rgba(255, 255, 255, .015); -webkit-overflow-scrolling: touch; }

@media (max-width: 1020px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .panel-grid { grid-template-columns: 1fr; }
  .panel-side { position: static; flex-direction: row; flex-wrap: wrap; }
  .panel-link { padding: 8px 11px; }
  .panel-link-danger { margin-top: 0; }
  .info-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .panel-page { padding: 34px 0 70px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .upgrade-banner { flex-direction: column; align-items: flex-start; }
  .current-plan-side { text-align: left; }
  .billing-coupon input { width: 100%; }
}
@media (max-width: 380px) {
  .nav-actions .btn-primary { display: none; }
  .nav-inner { gap: 10px; }
  .brand { flex: none; }
  .brand span { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (max-width: 640px) {
  .field input, .field select, .field textarea, .coupon-form input, .billing-coupon input { font-size: 16px; }
  .history-filters input[type="search"], .history-filters select { font-size: 16px; }
}

/* =========================================================
   Checkout / pagos
   ========================================================= */
.checkout-page { padding: 52px 0 84px; min-height: 68vh; }
.checkout-head { margin-bottom: 28px; }
.checkout-head h1 { font-size: clamp(30px, 4.2vw, 42px); margin-top: 10px; }
.checkout-head p { color: var(--muted); font-size: 12.8px; margin-top: 7px; }
.checkout-grid { display: grid; grid-template-columns: 1fr 360px; gap: 22px; align-items: start; }
.checkout-main h2 { font-size: 15px; margin-bottom: 14px; letter-spacing: -.01em; }
.method-list { display: flex; flex-direction: column; gap: 9px; }
.method-card {
  display: flex; align-items: center; gap: 13px; border: 1px solid var(--line); border-radius: 13px;
  background: rgba(255, 255, 255, .022); padding: 15px 16px; transition: border-color .15s, background .15s, transform .15s;
}
.method-card:hover { border-color: rgba(42, 224, 143, .35); background: rgba(42, 224, 143, .04); transform: translateY(-1px); }
.method-icon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font-weight: 800; font-size: 16px; flex: none; }
.method-pay { background: #103a68; color: #9cc8ff; }
.method-binance { background: rgba(240, 185, 11, .13); color: #f0b90b; }
.method-crypto { background: rgba(247, 147, 26, .12); color: #ffb15c; }
.method-body { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.method-body strong { font-size: 13.5px; }
.method-body small { font-size: 11.5px; color: #7d9489; }
.method-fee { display: inline-block; margin-top: 5px; color: #8fd6b3; font-size: 10.8px; line-height: 1.45; }
.method-card.is-selected { border-color: rgba(42, 224, 143, .4); background: rgba(42, 224, 143, .05); }
.coupon-box { margin-top: 18px; border: 1px dashed var(--line-strong); border-radius: 12px; padding: 14px 16px; }
.coupon-box-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.coupon-box-head strong { font-size: 12.5px; }
.coupon-box-head span { font-size: 11px; color: #7d9489; }
.coupon-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.coupon-form input { flex: 1; min-width: 180px; background: #08120e; border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; color: var(--text); font: inherit; font-size: 12px; text-transform: uppercase; }
.coupon-form input:focus { outline: none; border-color: rgba(42, 224, 143, .5); }
.coupon-applied { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; color: #b7d6c6; }
.coupon-applied b { color: var(--brand); }
.method-arrow { color: #5f766c; font-size: 15px; }
.secure-note { font-size: 10.8px; color: #61786d; margin-top: 16px; }
.link-btn { background: none; border: 0; color: #7d9489; font-size: 11.5px; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; padding: 0; }
.link-btn:hover { color: #ff9b9b; }
.order-summary { border: 1px solid var(--line-strong); border-radius: 16px; background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .012)); padding: 20px; position: sticky; top: 90px; }
.order-summary h2 { font-size: 14px; margin-bottom: 14px; }
.summary-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 12px; color: #8fa69b; border-bottom: 1px dashed rgba(255, 255, 255, .06); }
.summary-row strong { color: #d9e9e1; font-weight: 500; text-align: right; }
.summary-discount strong { color: var(--brand); }
.summary-total { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 0 4px; font-size: 12.5px; color: #a9bdb3; }
.summary-total strong { font-family: var(--display); font-size: 25px; letter-spacing: -.03em; color: #fff; }
.summary-total small { font-family: var(--font); font-size: 10px; color: #7d9489; letter-spacing: 0; }
.summary-note { font-size: 10.3px; color: #61786d; line-height: 1.55; margin-top: 10px; }
.summary-note a { color: #8fb3a1; text-decoration: underline; text-underline-offset: 2px; }

.pay-panel { display: grid; grid-template-columns: 330px 1fr; gap: 0; border: 1px solid var(--line-strong); border-radius: 18px; overflow: hidden; background: #091410; }
.pay-panel-side { border-right: 1px solid var(--line); padding: 26px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; background: radial-gradient(80% 60% at 50% 0%, rgba(255, 196, 90, .06), transparent 70%); }
.pay-label { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: #71887c; }
.pay-amount { font-family: var(--display); font-size: 34px; font-weight: 700; letter-spacing: -.03em; margin: 4px 0 18px; }
.pay-amount small { font-family: var(--font); font-size: 12px; color: #8aa296; font-weight: 500; }
.pay-id { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 16px; color: #ffe0ad; background: rgba(255, 196, 90, .07); border: 1px dashed rgba(255, 196, 90, .3); border-radius: 9px; padding: 10px 13px; margin: 7px 0 10px; word-break: break-all; }
.copy-btn { background: rgba(255, 255, 255, .05); border: 1px solid var(--line); color: #cddfd6; border-radius: 7px; padding: 6px 11px; font-size: 10.5px; cursor: pointer; }
.copy-btn:hover { border-color: rgba(42, 224, 143, .35); color: #fff; }
.pay-qr { width: 190px; height: 190px; object-fit: contain; border-radius: 12px; margin: 16px 0 8px; background: #fff; padding: 6px; }
.pay-panel-main { padding: 28px 28px 24px; }
.pay-panel-main h2 { font-size: 20px; margin-bottom: 14px; }
.pay-steps { padding-left: 19px; margin: 0 0 20px; }
.pay-steps li { font-size: 12.5px; color: #a5bab0; margin-bottom: 7px; line-height: 1.55; }
.pay-steps strong { color: #e2f3ea; }
.pay-verify-form .field { margin-bottom: 12px; }
.pay-note { font-size: 10.8px; color: #6d8479; line-height: 1.55; margin-top: 12px; }
.return-card { border: 1px solid var(--line-strong); border-radius: 20px; background: radial-gradient(70% 60% at 50% 0%, rgba(42, 224, 143, .09), transparent 70%), #091410; padding: 40px 32px; text-align: center; }
.return-icon { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 18px; font-size: 25px; font-weight: 700; }
.return-ok { background: rgba(42, 224, 143, .13); border: 1px solid rgba(42, 224, 143, .3); color: var(--brand); }
.return-wait { background: rgba(255, 196, 90, .1); border: 1px solid rgba(255, 196, 90, .28); color: #ffd590; }
.return-bad { background: rgba(255, 90, 90, .09); border: 1px solid rgba(255, 90, 90, .25); color: #ffb4b4; }
.return-card h1 { font-size: clamp(26px, 3.6vw, 36px); margin: 12px 0 10px; }
.return-card > p { color: #a5bab0; font-size: 13px; max-width: 500px; margin: 0 auto 20px; line-height: 1.6; }
.return-summary { border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .02); padding: 8px 16px; margin: 18px 0 22px; text-align: left; }
.return-summary > div { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px dashed rgba(255, 255, 255, .06); font-size: 12px; color: #8fa69b; }
.return-summary > div:last-child { border-bottom: 0; }
.return-summary strong { color: #dcebe4; font-weight: 500; text-align: right; }
.return-small { font-size: 10.8px; color: #61786d; margin-top: 16px; }
.return-small a { color: #8fb3a1; text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 900px) {
  .checkout-grid { grid-template-columns: 1fr; }
  .order-summary { position: static; }
  .pay-panel { grid-template-columns: 1fr; }
  .pay-panel-side { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .checkout-page { padding: 34px 0 64px; }
  .return-card { padding: 30px 20px; }
}

/* Soporte y tickets */
.ticket-upload { display: flex; align-items: center; gap: 10px; border: 1px dashed var(--line-strong); border-radius: 10px; padding: 12px 14px; cursor: pointer; color: #a9c3b6; font-size: 12px; transition: border-color .15s, background .15s; }
.ticket-upload:hover { border-color: rgba(42, 224, 143, .4); background: rgba(42, 224, 143, .03); }
.ticket-upload input { display: none; }
.ticket-files { font-size: 11px; color: #7d9489; margin-top: 6px; line-height: 1.5; }
.ticket-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; margin: 12px 0; }
.ticket-images a { display: block; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.ticket-images img { width: 100%; height: 110px; object-fit: cover; display: block; }
.ticket-reply { background: rgba(42, 224, 143, .05); border: 1px solid rgba(42, 224, 143, .18); border-radius: 10px; padding: 14px; margin-top: 14px; }
.ticket-reply h3 { font-size: 13px; margin-bottom: 6px; }
.ticket-meta { font-size: 10.5px; color: #6f877b; }
.ticket-row { display: flex; flex-direction: column; gap: 3px; padding: 10px 0; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.ticket-row:last-child { border-bottom: 0; }
.ticket-row-subject { font-size: 12.5px; color: #d9ebe2; }
.ticket-row-meta { font-size: 10px; color: #6f877b; }
.ticket-row:hover .ticket-row-subject { color: var(--brand); }

/* Celebración de compra */
.celebrate { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 20px; }
.celebrate[hidden] { display: none; }
.celebrate-scrim { position: absolute; inset: 0; background: rgba(2, 8, 6, .78); backdrop-filter: blur(5px); }
.celebrate-card { position: relative; width: min(460px, 100%); background: #0a1511; border: 1px solid rgba(42, 224, 143, .35); border-radius: 20px; padding: 28px 24px; text-align: center; box-shadow: 0 40px 120px rgba(0, 0, 0, .6); animation: celebrateIn .35s cubic-bezier(.2, .9, .3, 1.2) both; }
.celebrate-card h2 { font-size: 30px; margin: 6px 0 8px; letter-spacing: -.03em; }
.celebrate-card p { font-size: 13px; color: #a9bdb3; line-height: 1.65; margin: 0 0 4px; }
.celebrate-icon { font-size: 54px; line-height: 1; margin-bottom: 8px; animation: celebratePop .8s ease both; }
.celebrate-summary { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 16px 0; padding: 12px 0; text-align: left; }
.celebrate-summary div { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; padding: 4px 0; color: #8fa79b; }
.celebrate-summary strong { color: #d9ebe2; text-align: right; }
.celebrate-close { position: absolute; top: 10px; right: 12px; width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: #7d9489; font-size: 20px; cursor: pointer; }
.celebrate-close:hover { background: rgba(255,255,255,.06); color: #fff; }
.celebrate-later { display: block; width: 100%; margin-top: 10px; border: 0; background: none; color: #7d9489; font-size: 11.5px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.celebrate-later:hover { color: #d9ebe2; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 119; overflow: hidden; }
.confetti-piece { position: absolute; top: -20px; border-radius: 2px; animation-name: confettiFall; animation-timing-function: linear; animation-fill-mode: forwards; }
@keyframes confettiFall { to { transform: translateY(110vh) rotate(720deg); opacity: .9; } }
@keyframes celebrateIn { from { opacity: 0; transform: translateY(20px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes celebratePop { 0% { transform: scale(.4) rotate(-10deg); } 60% { transform: scale(1.15) rotate(4deg); } 100% { transform: scale(1); } }
@media (max-width: 640px) {
  .celebrate-card { padding: 24px 18px calc(18px + env(safe-area-inset-bottom)); }
  .celebrate-card h2 { font-size: 26px; }
  .celebrate-icon { font-size: 46px; }
}

/* Referidos */
.ref-copy { display: flex; gap: 8px; margin-top: 6px; }
.ref-copy input { flex: 1; min-width: 0; background: #08120e; border: 1px solid var(--line); border-radius: 8px; padding: 10px 11px; color: #d9ebe2; font-size: 12px; }
.ref-copy button { white-space: nowrap; }
.ref-stats { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 12px; font-size: 11.5px; color: #8fa79b; }
.ref-stats strong { color: var(--brand); }

/* Modal de recarga (diferente al de suscripción) */
.celebrate-card-credits { border-color: rgba(122, 215, 255, .35); }
.celebrate-card-credits .celebrate-icon { filter: drop-shadow(0 0 22px rgba(122, 215, 255, .45)); }

/* Página de referidos */
.ref-hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 26px; align-items: center; background: radial-gradient(1200px 420px at 0% 0%, rgba(42,224,143,.16), transparent 60%), linear-gradient(160deg, #0b1712, #08120e); border: 1px solid var(--line); border-radius: 18px; padding: 30px; margin: 18px 0 20px; overflow: hidden; }
.ref-hero-copy h2 { font-size: 26px; margin: 10px 0 8px; }
.ref-hero-copy p { color: #9fb5aa; font-size: 13px; line-height: 1.7; max-width: 560px; margin: 0 0 16px; }
.ref-pill { display: inline-flex; align-items: center; gap: 7px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #2ae08f; background: rgba(42,224,143,.1); border: 1px solid rgba(42,224,143,.25); border-radius: 999px; padding: 5px 11px; }
.ref-copy-lg input { font-size: 12.5px; padding: 12px 13px; }
.ref-code-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; font-size: 12px; color: #8fa79b; }
.ref-code-row strong { color: #e8f4ee; letter-spacing: .08em; }
.ref-share { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.ref-share-btn { font-size: 11.5px; font-weight: 600; color: #cfe6da; text-decoration: none; border: 1px solid var(--line); border-radius: 8px; padding: 7px 12px; transition: border-color .15s, color .15s; }
.ref-share-btn:hover { border-color: rgba(42,224,143,.4); color: #2ae08f; }
.ref-hero-art { position: relative; display: grid; place-items: center; }
.ref-hero-art img { width: 100%; max-width: 380px; border-radius: 14px; border: 1px solid rgba(42,224,143,.18); box-shadow: 0 26px 60px rgba(0,0,0,.45); transform: rotate(-2deg); }
.ref-float { position: absolute; display: flex; flex-direction: column; background: #0d1c15; border: 1px solid rgba(42,224,143,.3); border-radius: 12px; padding: 8px 12px; box-shadow: 0 14px 34px rgba(0,0,0,.4); }
.ref-float strong { color: #2ae08f; font-size: 16px; line-height: 1.1; }
.ref-float span { font-size: 9.5px; color: #8fa79b; }
.ref-float-a { top: 6%; left: -4%; }
.ref-float-b { bottom: 7%; right: -2%; border-color: rgba(122,215,255,.3); }
.ref-float-b strong { color: #7ad7ff; }
.ref-stat-grid { margin-top: 0; }
.ref-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.ref-step { background: #0a1511; border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.ref-step-ico { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; color: #2ae08f; background: rgba(42,224,143,.1); border: 1px solid rgba(42,224,143,.2); margin-bottom: 10px; }
.ref-step h3 { font-size: 14.5px; margin: 0 0 6px; }
.ref-step p { font-size: 12px; line-height: 1.65; color: #93a8a0; margin: 0; }
.ref-status { display: inline-flex; font-size: 10px; font-weight: 700; border-radius: 999px; padding: 4px 9px; letter-spacing: .02em; }
.ref-status-ok { color: #2ae08f; background: rgba(42,224,143,.1); border: 1px solid rgba(42,224,143,.25); }
.ref-status-wait { color: #ffd479; background: rgba(255,212,121,.08); border: 1px solid rgba(255,212,121,.22); }
.ref-empty { display: flex; align-items: center; gap: 12px; color: #93a8a0; font-size: 12.5px; padding: 16px; border: 1px dashed var(--line); border-radius: 12px; }
.ref-empty span { color: #2ae08f; font-size: 18px; }
.ref-empty p { margin: 0; }
.ref-rules-list { margin: 0; padding-left: 18px; color: #a9bdb3; font-size: 12.5px; line-height: 1.8; }
.ref-rules-list strong { color: #e8f4ee; }
@media (max-width: 860px) {
  .ref-hero { grid-template-columns: 1fr; padding: 22px; }
  .ref-hero-art { order: -1; }
  .ref-hero-art img { max-width: 300px; }
  .ref-float-a { left: 0; }
  .ref-float-b { right: 0; }
  .ref-steps { grid-template-columns: 1fr; }
}

/* Selector de idioma */
.lang-switch { display: inline-flex; align-items: center; gap: 2px; background: #0a1511; border: 1px solid var(--line); border-radius: 9px; padding: 2px; }
.lang-link { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; color: #8fa79b; text-decoration: none; padding: 5px 7px; border-radius: 7px; transition: color .15s, background .15s; }
.lang-link:hover { color: #d9ebe2; }
.lang-link.is-active { background: rgba(42, 224, 143, .14); color: #2ae08f; }
.nav-links .lang-switch { margin-left: 10px; }
.auth-top-right { display: flex; align-items: center; gap: 14px; }

/* Soporte profesional */
.support-page { padding-bottom: 70px; }
.support-shell { max-width: 900px; margin: 0 auto; }
.support-head { flex-direction: column; align-items: center; text-align: center; gap: 16px; }
.support-head h1 { margin-top: 8px; }
.support-head p { max-width: 560px; margin-left: auto; margin-right: auto; }
.support-page .panel-card { padding: 26px; }
.ticket-create-form { max-width: 720px; margin: 0 auto; }
.ticket-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 20px; }
.ticket-detail-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ticket-detail-title > div { min-width: 0; }
.ticket-detail-title h2 { font-size: 19px; overflow-wrap: anywhere; }
.ticket-icon { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 12px; background: rgba(42, 224, 143, .1); border: 1px solid rgba(42, 224, 143, .2); color: var(--brand); font-size: 18px; }
.ticket-thread { display: flex; flex-direction: column; gap: 14px; margin: 4px 0 22px; }
.ticket-msg { max-width: 86%; border: 1px solid var(--line); border-radius: 14px; padding: 13px 15px; }
.ticket-msg-user { align-self: flex-end; background: rgba(42, 224, 143, .09); border-color: rgba(42, 224, 143, .2); }
.ticket-msg-admin { align-self: flex-start; background: #0b1712; }
.ticket-msg-head { display: flex; justify-content: space-between; gap: 14px; align-items: baseline; margin-bottom: 7px; font-size: 10px; color: #7d9489; }
.ticket-msg-head strong { font-size: 11px; color: #d9ebe2; }
.ticket-bubble { font-size: 13px; line-height: 1.7; color: #c9ded4; overflow-wrap: anywhere; }
.ticket-images-inline { margin: 10px 0 0; }
.ticket-compose { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 6px; }
.ticket-compose-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ticket-compose-actions .ticket-meta { max-width: 430px; line-height: 1.5; }
.ticket-closed-note, .ticket-open-note { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .02); padding: 14px 16px; margin-bottom: 14px; }
.ticket-closed-note strong, .ticket-open-note strong { display: block; font-size: 13px; }
.ticket-closed-note span, .ticket-open-note p { display: block; font-size: 12px; color: #8fa79b; margin: 4px 0 0; }
.ticket-back { margin: 18px 0 0; }
.ticket-list-card { margin-top: 16px; }
.ticket-list { display: flex; flex-direction: column; gap: 8px; }
.ticket-card-row { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .018); color: inherit; text-decoration: none; transition: border-color .15s, background .15s, transform .15s; }
.ticket-card-row:hover { border-color: rgba(42, 224, 143, .35); background: rgba(42, 224, 143, .045); transform: translateY(-1px); }
.ticket-card-icon { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 10px; background: rgba(42, 224, 143, .1); color: var(--brand); font-size: 15px; }
.ticket-card-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.ticket-card-subject { font-size: 13px; color: #e0f0e8; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-card-meta { font-size: 10.5px; color: #71897e; }
.ticket-card-side { display: flex; align-items: center; gap: 8px; flex: none; }
.ticket-unread { display: inline-grid; place-items: center; min-width: 21px; height: 21px; padding: 0 6px; border-radius: 999px; background: #ff4d4f; color: #fff; font-size: 10px; font-weight: 800; line-height: 1; box-shadow: 0 0 0 3px rgba(255, 77, 79, .14); }
.ticket-empty { display: flex; align-items: center; gap: 14px; border: 1px dashed var(--line); border-radius: 12px; padding: 18px; color: #8fa79b; }
.ticket-empty > span { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 10px; background: rgba(42, 224, 143, .08); color: var(--brand); }
.ticket-empty strong { display: block; font-size: 12.5px; color: #d9ebe2; }
.ticket-empty p { font-size: 11.5px; margin: 3px 0 0; }
.ticket-row-subject { font-size: 12.5px; color: #d9ebe2; }
@media (max-width: 640px) {
  .support-page .panel-card { padding: 18px; }
  .ticket-msg { max-width: 96%; }
  .ticket-card-row { align-items: flex-start; }
  .ticket-card-side { flex-direction: column; align-items: flex-end; }
  .ticket-detail-head { align-items: flex-start; }
}

/* Marca dentro de la página de referidos */
.ref-brand { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.ref-brand img { display: block; }
.ref-brand span { font-family: var(--display); font-size: 16px; font-weight: 700; letter-spacing: -.02em; color: #e8f4ee; }

.ticket-detail-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.ticket-detail-actions form { margin: 0; }

/* Badges llamativos de modelos */
.model-badge-hot { background: linear-gradient(90deg, #ff7a18, #ff2d55); color: #fff; border-color: transparent; }
.model-badge-new { background: linear-gradient(90deg, #7c4dff, #e040fb); color: #fff; border-color: transparent; }

/* Iconos oficiales de proveedores */
.prov-icon { width: var(--prov-size, 20px); height: var(--prov-size, 20px); border-radius: 50%; border: 1px solid var(--line-strong); display: inline-grid; place-items: center; background: #0b1712; flex: none; overflow: hidden; }
.prov-icon img { width: 70%; height: 70%; object-fit: contain; display: block; }
.prov-icon svg { width: 70%; height: 70%; display: block; fill: #eef6f1; }
.prov-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
/* Favicons descargados: se aplanan para encajar con el tema oscuro */
.prov-icon.is-raster img { filter: grayscale(1) brightness(1.55) contrast(1.05); opacity: .92; }

/* Imágenes IA */
.image-page { max-width: 1120px; }
.image-head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.image-layout { display: grid; grid-template-columns: 390px minmax(0, 1fr); gap: 16px; align-items: start; }
.image-form-card { position: sticky; top: 90px; }
.cost-badge { position: relative; display: flex; align-items: center; gap: 12px; border-radius: 14px; padding: 13px 15px; background:
  linear-gradient(#0b1712, #0b1712) padding-box,
  linear-gradient(135deg, rgba(42,224,143,.55), rgba(49,167,255,.28) 55%, rgba(42,224,143,.12)) border-box;
  border: 1px solid transparent; box-shadow: 0 10px 26px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.04); overflow: hidden; }
.cost-badge::after { content: ""; position: absolute; inset: 0; background: radial-gradient(120px 60px at 12% 0%, rgba(42,224,143,.16), transparent 70%); pointer-events: none; }
.cost-badge-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; color: #8dffcd; background: linear-gradient(160deg, rgba(42,224,143,.26), rgba(42,224,143,.06)); border: 1px solid rgba(42,224,143,.3); box-shadow: inset 0 1px 0 rgba(255,255,255,.12); flex: none; }
.cost-badge-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.cost-badge-label { font-size: 9.5px; text-transform: uppercase; letter-spacing: .12em; color: #7d9489; font-weight: 600; }
.cost-badge-value { display: flex; align-items: baseline; gap: 6px; }
.cost-badge-value strong { font-family: var(--display); font-size: 24px; line-height: 1.15; color: #eafff6; letter-spacing: -.01em; }
.cost-badge-value em { font-style: normal; font-size: 10.5px; color: #6f877b; text-transform: uppercase; letter-spacing: .1em; }
.cost-badge-price { font-size: 10.5px; color: #6f877b; }
.image-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.image-card { position: relative; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #0a1511; transition: border-color .15s, transform .15s, box-shadow .15s; }
.image-card:hover { border-color: rgba(42,224,143,.35); transform: translateY(-1px); box-shadow: 0 10px 24px rgba(0,0,0,.3); }
.image-card-media { display: block; }
.image-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; background: #07110d; }
.image-card-body { display: flex; flex-direction: column; gap: 2px; padding: 7px 9px 9px; }
.image-card-body span { font-size: 11px; color: #c9ded4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.image-card-body small { font-size: 9.5px; color: #6f877b; }
.image-card-actions { position: absolute; top: 7px; right: 7px; display: flex; gap: 5px; opacity: 0; transform: translateY(-3px); transition: opacity .15s, transform .15s; }
.image-card:hover .image-card-actions, .image-card:focus-within .image-card-actions { opacity: 1; transform: none; }
.image-icon-btn { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 8px; border: 1px solid rgba(255,255,255,.16); background: rgba(5,12,9,.78); color: #d6ece1; backdrop-filter: blur(6px); cursor: pointer; padding: 0; }
.image-icon-btn:hover { border-color: rgba(42,224,143,.55); color: #8dffcd; background: rgba(8,20,15,.9); }
.image-detail { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 14px; background: #091410; }
.image-detail img { width: 100%; max-height: 520px; object-fit: contain; border-radius: 9px; display: block; background: #07110d; }
.image-detail p { font-size: 12.5px; color: #c9ded4; line-height: 1.6; margin: 10px 0 6px; }
.image-detail-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 10px; color: #6f877b; margin-bottom: 10px; }
.image-empty { display: flex; align-items: center; gap: 13px; border: 1px dashed var(--line); border-radius: 12px; padding: 18px; color: #8fa79b; }
.image-empty > span { font-size: 26px; }
.image-empty strong { display: block; font-size: 13px; color: #d9ebe2; }
.image-empty p { font-size: 11.5px; margin: 3px 0 0; }
@media (max-width: 860px) {
  .image-layout { grid-template-columns: minmax(0, 1fr); }
  .image-form-card { position: static; }
}

/* Imágenes IA centrado, como el chat */
.image-mode-bar { display: flex; justify-content: center; margin: 18px 0 6px; }
.image-mode-switch { position: static; transform: none; margin: 0; }
.image-layout { grid-template-columns: minmax(0, 1fr); max-width: 820px; margin: 0 auto; }
.image-form-card { position: static; }
.image-page .panel-head { text-align: center; align-items: center; }
.image-page .panel-head > div { max-width: 720px; margin: 0 auto; }
.image-page .image-head-actions { justify-content: center; }

/* Selector visual de proporción */
.aspect-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(78px, 1fr)); gap: 8px; }
.aspect-option { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 78px; border: 1px solid var(--line); border-radius: 10px; background: #0a1511; cursor: pointer; padding: 8px 4px; text-align: center; transition: border-color .15s, background .15s, box-shadow .15s; }
.aspect-option input { position: absolute; opacity: 0; pointer-events: none; }
.aspect-option:hover { border-color: rgba(42,224,143,.28); }
.aspect-option.is-active { border-color: rgba(42,224,143,.5); background: rgba(42,224,143,.07); box-shadow: 0 0 0 2px rgba(42,224,143,.08); }
.aspect-shape { display: block; border: 1.6px solid #8fa79b; border-radius: 3px; }
.aspect-option.is-active .aspect-shape { border-color: var(--brand); }
.aspect-option > span:last-child { font-size: 10px; line-height: 1.25; color: #9cb2a8; }
.aspect-option small { font-size: 9px; color: #6f877b; }

/* Badge de saldo en la cabecera */
.credit-badge { display: inline-flex; align-items: center; gap: 9px; padding: 7px 12px 7px 9px; border-radius: 12px; text-decoration: none; color: #d9ebe2;
  background: linear-gradient(#0b1712, #0b1712) padding-box, linear-gradient(135deg, rgba(42,224,143,.5), rgba(255,255,255,.06)) border-box;
  border: 1px solid transparent; transition: transform .15s, box-shadow .15s, border-color .15s; }
.credit-badge:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(0,0,0,.32); }
.credit-badge-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; color: #8dffcd; background: linear-gradient(160deg, rgba(42,224,143,.22), rgba(42,224,143,.05)); border: 1px solid rgba(42,224,143,.28); flex: none; }
.credit-badge-body { display: flex; flex-direction: column; line-height: 1.1; }
.credit-badge-label { font-size: 8.5px; text-transform: uppercase; letter-spacing: .12em; color: #7d9489; font-weight: 600; }
.credit-badge-value { font-family: var(--display); font-size: 16px; color: #eafff6; }
.credit-badge-unit { font-size: 9.5px; text-transform: uppercase; letter-spacing: .08em; color: #6f877b; align-self: flex-end; padding-bottom: 2px; }

/* Acciones del detalle */
.image-detail-actions { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.image-detail-actions form { margin: 0; }

/* Prompt reutilizado */
#imagePrompt.is-reused { animation: reusePulse .9s ease; }
@keyframes reusePulse { 0% { box-shadow: 0 0 0 0 rgba(42,224,143,.45); } 100% { box-shadow: 0 0 0 14px rgba(42,224,143,0); } }

/* Plantillas */
.templates-card { margin-top: 18px; }
.templates-head { text-align: left; }
.template-filters { display: flex; flex-wrap: wrap; gap: 7px; margin: 4px 0 14px; }
.template-filter { border: 1px solid var(--line); background: #0a1511; color: #9cb2a8; border-radius: 999px; padding: 5px 13px; font-size: 11px; cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.template-filter:hover { border-color: rgba(42,224,143,.3); color: #d6ece1; }
.template-filter.is-active { border-color: rgba(42,224,143,.5); background: rgba(42,224,143,.1); color: #8dffcd; }
.template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.template-card { border: 1px solid var(--line); border-radius: 13px; overflow: hidden; background: #0a1511; display: flex; flex-direction: column; min-width: 0; transition: border-color .15s, transform .15s, box-shadow .15s; }
.template-card:hover { border-color: rgba(42,224,143,.4); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,0,0,.32); }
.template-media { position: relative; padding: 0; border: 0; background: #07110d; cursor: pointer; display: block; width: 100%; }
.template-media img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; object-position: center; display: block; }
.template-hover { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(4,10,8,.55); color: #eafff6; font-size: 11.5px; letter-spacing: .04em; opacity: 0; transition: opacity .18s; }
.template-media:hover .template-hover, .template-media:focus-visible .template-hover { opacity: 1; }
.template-body { padding: 9px 10px 11px; display: flex; flex-direction: column; gap: 4px; }
.template-cat { align-self: flex-start; font-size: 8.5px; text-transform: uppercase; letter-spacing: .1em; color: #8dffcd; background: rgba(42,224,143,.1); border: 1px solid rgba(42,224,143,.24); border-radius: 999px; padding: 1px 7px; }
.template-body strong { font-size: 12px; color: #d9ebe2; font-weight: 600; }
.template-actions { display: flex; gap: 6px; margin-top: 3px; }
.template-actions .btn { flex: 1; justify-content: center; padding: 5px 8px; font-size: 10.5px; }

/* Modal de plantilla */
.template-modal[hidden] { display: none; }
.template-modal { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 20px; }
.template-modal-backdrop { position: absolute; inset: 0; background: rgba(3,8,6,.78); backdrop-filter: blur(4px); }
.template-modal-panel { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); max-width: 820px; width: 100%; max-height: 88vh; overflow: hidden; border-radius: 16px; border: 1px solid rgba(255,255,255,.1); background: #08120e; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.template-modal-media { background: #050b09; display: grid; place-items: center; min-height: 260px; }
.template-modal-media img { width: 100%; height: 100%; max-height: 88vh; object-fit: contain; display: block; }
.template-modal-body { padding: 22px; display: flex; flex-direction: column; gap: 9px; overflow-y: auto; }
.template-modal-body h3 { margin: 0; font-size: 20px; color: #eafff6; font-family: var(--display); }
.template-modal-body p { margin: 0; font-size: 12.5px; line-height: 1.65; color: #a9c2b7; }
.template-modal-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 10px; }
.template-modal-close { position: absolute; top: 9px; right: 11px; z-index: 2; width: 30px; height: 30px; border-radius: 9px; border: 1px solid rgba(255,255,255,.14); background: rgba(5,12,9,.8); color: #cfe4d9; font-size: 18px; line-height: 1; cursor: pointer; }
.template-modal-close:hover { border-color: rgba(42,224,143,.5); color: #8dffcd; }
body.template-modal-open { overflow: hidden; }
@media (max-width: 720px) {
  .template-modal-panel { grid-template-columns: 1fr; max-height: 92vh; }
  .template-modal-media { max-height: 46vh; }
  .template-modal-media img { max-height: 46vh; }
}
.template-modal-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px; padding: 12px 0 0; border-top: 1px solid rgba(255,255,255,.07); margin-top: 4px; text-align: center; }
.template-modal-meta span { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.template-modal-meta em { font-style: normal; font-size: 9px; text-transform: uppercase; letter-spacing: .12em; color: #6f877b; }
.template-modal-meta strong { font-size: 12.5px; color: #d9ebe2; font-weight: 600; }
.template-card[hidden] { display: none !important; }
.template-pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 18px; font-size: 11px; color: var(--muted); }
@media (hover: none) { .image-card-actions { opacity: 1; transform: none; } }

/* Selector de modelo con badges de créditos */
.model-picker { position: relative; }
.model-picker-trigger { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 11px; border: 1px solid var(--line); background: #0a1511; color: #d9ebe2; cursor: pointer; text-align: left; transition: border-color .15s, box-shadow .15s; }
.model-picker-trigger:hover { border-color: rgba(42,224,143,.35); }
.model-picker.is-open .model-picker-trigger { border-color: rgba(42,224,143,.55); box-shadow: 0 0 0 3px rgba(42,224,143,.1); }
.model-picker-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.model-picker-name { font-size: 13px; font-weight: 500; color: #e4f3ec; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.model-picker-provider { font-size: 10.5px; color: #6f877b; }
.model-picker-caret { color: #6f877b; transition: transform .18s; flex: none; }
.model-picker.is-open .model-picker-caret { transform: rotate(180deg); }
.model-picker-menu { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40; display: none; max-height: 300px; overflow-y: auto; padding: 6px; border-radius: 12px; border: 1px solid rgba(255,255,255,.1); background: #0a1511; box-shadow: 0 22px 50px rgba(0,0,0,.55); }
.model-picker-menu.is-open { display: block; }
.model-picker-option { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 9px; border: 0; border-radius: 9px; background: transparent; color: #c9ded4; cursor: pointer; text-align: left; }
.model-picker-option:hover, .model-picker-option:focus-visible { background: rgba(42,224,143,.08); outline: none; }
.model-picker-option.is-selected { background: rgba(42,224,143,.13); }
.model-picker-opt-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.model-picker-opt-name { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.model-picker-opt-provider { font-size: 10px; color: #6f877b; }
.mc-badge { display: inline-flex; align-items: center; gap: 5px; flex: none; padding: 3px 9px 3px 7px; border-radius: 999px; background: linear-gradient(160deg, rgba(42,224,143,.2), rgba(42,224,143,.05)); border: 1px solid rgba(42,224,143,.35); color: #8dffcd; box-shadow: inset 0 1px 0 rgba(255,255,255,.07); }
.mc-badge svg { opacity: .85; }
.mc-badge b { font-size: 11.5px; font-weight: 700; letter-spacing: .02em; }
.mc-badge em { font-style: normal; font-size: 8px; text-transform: uppercase; letter-spacing: .1em; color: #79a894; }

/* Lista de modelos de imagen con estilo del chat */
.image-model-list { display: flex; flex-direction: column; gap: 3px; max-height: 340px; overflow-y: auto; padding: 6px; border: 1px solid var(--line); border-radius: 13px; background: #08120e; }
.image-model-list .model-option { display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.image-model-list .model-option:hover { background: rgba(255,255,255,.04); }
.image-model-list .model-option.is-selected { background: rgba(42,224,143,.08); border-color: rgba(42,224,143,.22); }
.image-model-list .model-option-body { display: flex; flex-direction: column; flex: 1; min-width: 0; gap: 2px; }
.image-model-list .model-option-name { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; font-size: 12.5px; font-weight: 600; }
.image-model-list .model-option-desc { font-size: 10.5px; color: #738b80; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.image-model-list .model-option-caps { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.image-model-list .mini-badge { font-style: normal; font-size: 8px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #7fe8b6; background: rgba(42,224,143,.1); border-radius: 4px; padding: 2px 5px; }
.image-model-list .cap-chip { font-style: normal; font-size: 8.5px; color: #8fb7a4; background: rgba(255,255,255,.035); border: 1px solid var(--line); border-radius: 999px; padding: 2px 6px; }
.image-model-list .model-option-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.image-model-list .selected-check { color: var(--brand); font-size: 13px; line-height: 1; }
.image-model-list .selected-check.is-off { visibility: hidden; }
.image-model-list .prov-icon { width: 28px; height: 28px; }
.image-model-list .prov-mark { width: 28px; height: 28px; font-size: 9px; border-radius: 8px; }

/* Estilos con miniatura */
.style-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.style-option { position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 6px 5px 7px; border: 1px solid var(--line); border-radius: 10px; background: #0a1511; cursor: pointer; text-align: center; transition: border-color .15s, background .15s, box-shadow .15s; }
.style-option input { position: absolute; opacity: 0; pointer-events: none; }
.style-option img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 7px; display: block; background: #07110d; }
.style-option > span { font-size: 9.5px; line-height: 1.2; color: #9cb2a8; }
.style-option:hover { border-color: rgba(42,224,143,.3); }
.style-option.is-active { border-color: rgba(42,224,143,.55); background: rgba(42,224,143,.08); box-shadow: 0 0 0 2px rgba(42,224,143,.08); }
.style-option.is-active > span { color: #d6ece1; }
.style-preview { position: fixed; z-index: 130; width: 268px; display: flex; flex-direction: column; gap: 7px; padding: 9px; border-radius: 14px; border: 1px solid rgba(255,255,255,.12); background: #08120e; box-shadow: 0 26px 64px rgba(0,0,0,.62); pointer-events: none; }
.style-preview[hidden] { display: none; }
.style-preview img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 10px; display: block; background: #050b09; }
.style-preview span { font-size: 11px; color: #d9ebe2; text-align: center; }

/* Modal de generación */
.gen-modal[hidden] { display: none; }
.gen-modal { position: fixed; inset: 0; z-index: 140; display: grid; place-items: center; padding: 20px; }
.gen-modal-backdrop { position: absolute; inset: 0; background: rgba(2,6,4,.82); backdrop-filter: blur(6px); }
.gen-modal-card { position: relative; width: min(520px, 100%); max-height: 92vh; overflow-y: auto; padding: 28px 24px 24px; border-radius: 18px; border: 1px solid rgba(255,255,255,.1); background: #08120e; box-shadow: 0 40px 120px rgba(0,0,0,.66); }
.gen-modal-close { position: absolute; top: 9px; right: 11px; width: 30px; height: 30px; border-radius: 9px; border: 1px solid rgba(255,255,255,.14); background: rgba(5,12,9,.8); color: #cfe4d9; font-size: 18px; line-height: 1; cursor: pointer; }
.gen-modal-close:hover { border-color: rgba(42,224,143,.5); color: #8dffcd; }
.gen-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 9px; }
.gen-state[hidden] { display: none; }
.gen-state h3 { font-family: var(--display); font-size: 19px; color: #eafff6; margin: 0; }
.gen-model { font-size: 11.5px; color: #9cb2a8; }
.gen-spinner { display: flex; gap: 7px; margin: 10px 0 6px; }
.gen-spinner span { width: 11px; height: 11px; border-radius: 50%; background: linear-gradient(160deg, #8dffcd, #2ae08f); animation: genPulse 1.05s infinite ease-in-out; }
.gen-spinner span:nth-child(2) { animation-delay: .16s; }
.gen-spinner span:nth-child(3) { animation-delay: .32s; }
.gen-progress { width: 100%; height: 6px; border-radius: 999px; background: rgba(255,255,255,.07); overflow: hidden; margin-top: 8px; }
.gen-progress span { display: block; height: 100%; width: 2%; border-radius: 999px; background: linear-gradient(90deg, #2ae08f, #31a7ff); transition: width .45s ease; }
.gen-elapsed { font-size: 10px; color: #6f877b; }
.gen-note { font-size: 10.5px; color: #6f877b; line-height: 1.5; max-width: 340px; }
#genImage { width: 100%; max-height: 54vh; object-fit: contain; border-radius: 12px; background: #050b09; display: block; }
.gen-result-head h3 { margin-top: 4px; }
.gen-result-head p { font-size: 11.5px; color: #9cb2a8; }
.gen-result-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 8px; }
.gen-error-mark { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,105,105,.12); border: 1px solid rgba(255,105,105,.35); color: #ff9b9b; font-size: 20px; font-weight: 700; }
.gen-state p { font-size: 12.5px; color: #a9c2b7; line-height: 1.6; }
body.gen-modal-open { overflow: hidden; }
@keyframes genPulse { 0%, 100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
@media (max-width: 640px) {
  .image-model-list .model-option-desc { white-space: normal; }
  .style-grid { grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); }
  .style-preview { display: none !important; }
}

/* Selector de modelo compacto (cerrado por defecto) */
.img-model-picker { position: relative; }
.img-model-trigger { width: 100%; display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: #0a1511; color: var(--text); text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.img-model-trigger:hover { border-color: rgba(42,224,143,.32); }
.img-model-picker.is-open .img-model-trigger { border-color: rgba(42,224,143,.5); box-shadow: 0 0 0 3px rgba(42,224,143,.09); }
.img-model-icon { display: inline-flex; flex: none; }
.img-model-trigger-main { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.img-model-trigger-name { font-size: 13px; font-weight: 600; color: #e8f4ee; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.img-model-trigger-sub { font-size: 10.5px; color: #6f877b; }
.img-model-chev { width: 9px; height: 9px; border-right: 1.8px solid #7d9489; border-bottom: 1.8px solid #7d9489; transform: rotate(45deg); margin: 0 4px 4px 2px; flex: none; transition: transform .18s; }
.img-model-picker.is-open .img-model-chev { transform: rotate(-135deg); margin-bottom: -2px; }
.img-model-panel { position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 7px); padding: 7px; border-radius: 14px; border: 1px solid rgba(255,255,255,.1); background: #08120e; box-shadow: 0 26px 66px rgba(0,0,0,.6); }
.img-model-panel[hidden] { display: none; }
.img-model-panel .image-model-list { border: 0; background: transparent; padding: 0; max-height: 330px; }

/* Controles compactos: proporción, estilo y coste */
.image-controls { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 10px; align-items: end; }
.image-control { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.image-control > label { font-size: 12px; font-weight: 500; color: #a9bdb3; }
.image-select { width: 100%; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line); background: #0a1511; color: #e4f3ec; font: inherit; font-size: 12.5px; cursor: pointer; }
.image-select:focus { outline: none; border-color: rgba(42,224,143,.55); box-shadow: 0 0 0 3px rgba(42,224,143,.1); }
.image-style-row { display: flex; align-items: center; gap: 8px; }
.image-style-thumb { width: 38px; height: 38px; border-radius: 9px; object-fit: cover; border: 1px solid var(--line-strong); background: #050b09; flex: none; cursor: zoom-in; }
.image-style-thumb:hover, .image-style-thumb:focus-visible { border-color: rgba(42,224,143,.5); outline: none; }
.cost-badge.is-compact { padding: 9px 12px; gap: 10px; }
.cost-badge.is-compact .cost-badge-icon { width: 32px; height: 32px; border-radius: 9px; }
.cost-badge.is-compact .cost-badge-value strong { font-size: 19px; }
@media (max-width: 760px) {
  .image-controls { grid-template-columns: 1fr 1fr; }
  .image-control-cost { grid-column: 1 / -1; }
}

/* Cabecera de la tarjeta con saldo */
.image-form-head { align-items: center; }
.credit-badge.is-inline { padding: 5px 10px 5px 7px; border-radius: 10px; gap: 7px; }
.credit-badge.is-inline .credit-badge-icon { width: 24px; height: 24px; border-radius: 7px; }
.credit-badge.is-inline .credit-badge-value { font-size: 14px; }
.credit-badge.is-inline .credit-badge-label { font-size: 8px; }
.credit-badge.is-inline .credit-badge-unit { font-size: 8.5px; }

/* Desplegables (proporción y estilo) */
.image-control-label { font-size: 12px; font-weight: 500; color: #a9bdb3; }
.dropdown { position: relative; }
.dropdown-trigger { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 11px; border-radius: 10px; border: 1px solid var(--line); background: #0a1511; color: #e4f3ec; font: inherit; font-size: 12.5px; cursor: pointer; text-align: left; transition: border-color .15s, box-shadow .15s; }
.dropdown-trigger:hover { border-color: rgba(42,224,143,.32); }
.dropdown.is-open .dropdown-trigger { border-color: rgba(42,224,143,.55); box-shadow: 0 0 0 3px rgba(42,224,143,.1); }
.dropdown-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropdown-chev { width: 8px; height: 8px; border-right: 1.7px solid #7d9489; border-bottom: 1.7px solid #7d9489; transform: rotate(45deg); margin: 0 3px 4px 0; flex: none; transition: transform .18s; }
.dropdown.is-open .dropdown-chev { transform: rotate(-135deg); margin-bottom: -2px; }
.dropdown-shape { flex: none; border-color: #8fa79b; }
.dropdown.is-open .dropdown-shape { border-color: var(--brand); }
.dropdown-thumb { width: 26px; height: 26px; border-radius: 7px; object-fit: cover; border: 1px solid var(--line-strong); background: #050b09; flex: none; }
.dropdown-panel { position: absolute; z-index: 70; left: 0; top: calc(100% + 7px); padding: 9px; border-radius: 13px; border: 1px solid rgba(255,255,255,.1); background: #08120e; box-shadow: 0 24px 60px rgba(0,0,0,.6); }
.dropdown-panel[hidden] { display: none; }
#aspectPanel { width: 322px; max-width: calc(100vw - 40px); }
#aspectPanel .aspect-grid { grid-template-columns: repeat(4, 1fr); }
#aspectPanel .aspect-option { font: inherit; color: inherit; }
.style-panel { width: 248px; max-width: calc(100vw - 40px); padding: 6px; }
.style-list { display: flex; flex-direction: column; gap: 2px; max-height: 288px; overflow-y: auto; }
.style-item { display: flex; align-items: center; gap: 9px; width: 100%; padding: 5px 7px; border: 0; border-radius: 9px; background: transparent; color: #c9ded4; font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
.style-item img { width: 30px; height: 30px; border-radius: 7px; object-fit: cover; flex: none; background: #050b09; }
.style-item:hover, .style-item:focus-visible { background: rgba(42,224,143,.09); color: #eafff6; outline: none; }
.style-item.is-active { background: rgba(42,224,143,.14); }

/* Modal de imagen de la galería */
.image-view-modal[hidden] { display: none; }
.image-view-modal { position: fixed; inset: 0; z-index: 135; display: grid; place-items: center; padding: 20px; }
.image-view-backdrop { position: absolute; inset: 0; background: rgba(2,6,4,.84); backdrop-filter: blur(6px); }
.image-view-card { position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); width: min(980px, 100%); max-height: 90vh; overflow: hidden; border-radius: 18px; border: 1px solid rgba(255,255,255,.1); background: #08120e; box-shadow: 0 40px 120px rgba(0,0,0,.66); }
.image-view-media { background: #050b09; display: grid; place-items: center; min-height: 240px; }
.image-view-media img { width: 100%; height: 100%; max-height: 90vh; object-fit: contain; display: block; }
.image-view-body { padding: 22px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }
.image-view-body h3 { font-family: var(--display); font-size: 19px; color: #eafff6; margin: 0; }
.image-view-body p { margin: 0; font-size: 12.5px; line-height: 1.65; color: #a9c2b7; }
.image-view-meta { display: flex; flex-wrap: wrap; gap: 10px 18px; font-size: 10.5px; color: #6f877b; }
.image-view-meta span { display: flex; flex-direction: column; gap: 2px; }
.image-view-meta em { font-style: normal; font-size: 9px; text-transform: uppercase; letter-spacing: .12em; color: #6f877b; }
.image-view-meta strong { font-size: 12.5px; color: #d9ebe2; font-weight: 600; }
.image-view-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 10px; }
.image-view-actions form { margin: 0; }
.image-view-close { position: absolute; top: 9px; right: 11px; z-index: 2; width: 30px; height: 30px; border-radius: 9px; border: 1px solid rgba(255,255,255,.14); background: rgba(5,12,9,.8); color: #cfe4d9; font-size: 18px; line-height: 1; cursor: pointer; }
.image-view-close:hover { border-color: rgba(42,224,143,.5); color: #8dffcd; }
body.image-view-open { overflow: hidden; }
@media (max-width: 720px) {
  .image-view-card { grid-template-columns: 1fr; max-height: 92vh; }
  .image-view-media { max-height: 46vh; }
  .image-view-media img { max-height: 46vh; }
}
.image-controls { grid-template-columns: 1fr 1.15fr; }

/* Marcos decorativos de perfil según el plan */
.avatar-frame { position: relative; display: inline-grid; place-items: center; width: calc(var(--av-size, 36px) + 12px); height: calc(var(--av-size, 36px) + 12px); border-radius: 50%; padding: 3px; flex: none; isolation: isolate; }
.avatar-frame-inner { display: inline-flex; border-radius: 50%; overflow: hidden; }
.avatar-frame .avatar { border-radius: 50%; object-fit: cover; display: block; }
.avatar-frame .avatar-initials { display: grid; place-items: center; border-radius: 50%; }
.avatar-frame-silver { background: conic-gradient(from 210deg, #f4f8fa, #8d9aa1, #ffffff, #6f7c83, #e8eef1, #a7b4ba, #f4f8fa); box-shadow: 0 0 0 1px rgba(255,255,255,.16), 0 6px 18px rgba(0,0,0,.35); }
.avatar-frame-gold { background: conic-gradient(from 200deg, #fff3c4, #d7a53a, #fff0b8, #8a5f12, #ffe9a8, #c9962f, #fff3c4); box-shadow: 0 0 0 1px rgba(255,220,140,.35), 0 0 18px rgba(255,190,70,.3), 0 6px 18px rgba(0,0,0,.35); }
.avatar-frame-diamond { background: conic-gradient(from 180deg, #d9f7ff, #6fd2ff, #b98cff, #ffffff, #4aa8ff, #b98cff, #d9f7ff); box-shadow: 0 0 0 1px rgba(180,230,255,.5), 0 0 24px rgba(90,190,255,.45), 0 6px 18px rgba(0,0,0,.4); }
.avatar-frame-diamond::before { content: ""; position: absolute; inset: -4px; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0 55%, rgba(150,225,255,.45) 70%, transparent 85%); animation: avatarSpin 5s linear infinite; z-index: -1; }
@keyframes avatarSpin { to { transform: rotate(360deg); } }
.avatar-gem { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; transform: rotate(45deg); border-radius: 3px; background: linear-gradient(135deg, #ffffff, #9fb4c2); border: 1px solid rgba(255,255,255,.75); box-shadow: 0 0 8px rgba(255,255,255,.35); }
.avatar-frame-gold .avatar-gem { background: linear-gradient(135deg, #fff2c0, #d4a13a); }
.avatar-frame-diamond .avatar-gem { background: linear-gradient(135deg, #eafcff, #6fd2ff); box-shadow: 0 0 10px rgba(110,220,255,.85); }
@media (prefers-reduced-motion: reduce) { .avatar-frame-diamond::before { animation: none; } }

/* Subida de foto de perfil */
.avatar-form { display: flex; align-items: center; gap: 16px; padding: 4px 0 18px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.avatar-preview { flex: none; }
.avatar-copy { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.avatar-copy strong { font-size: 13px; color: #e4f3ec; }
.avatar-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.avatar-file { position: relative; overflow: hidden; cursor: pointer; }
.avatar-file input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.avatar-filename { font-size: 10.5px; color: #6f877b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) { .avatar-form { flex-direction: column; align-items: flex-start; } }

/* Marcos ornamentales de perfil (SVG) */
.avatar-frame { position: relative; display: inline-grid; place-items: center; width: calc(var(--av-size, 36px) * 1.3); height: calc(var(--av-size, 36px) * 1.3); flex: none; background: none !important; box-shadow: none !important; padding: 0; border-radius: 0; }
.avatar-frame::before { display: none !important; }
.avatar-frame-inner { display: inline-flex; width: var(--av-size, 36px); height: var(--av-size, 36px); border-radius: 50%; overflow: hidden; z-index: 1; }
.avatar-frame-inner .avatar { width: 100% !important; height: 100% !important; object-fit: cover; border-radius: 50%; }
.avatar-ring { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; filter: drop-shadow(0 3px 8px rgba(0,0,0,.45)); }
.avatar-frame-gold .avatar-ring { filter: drop-shadow(0 0 6px rgba(255,196,80,.45)) drop-shadow(0 3px 8px rgba(0,0,0,.4)); }
.avatar-frame-diamond .avatar-ring { filter: drop-shadow(0 0 8px rgba(120,210,255,.6)) drop-shadow(0 3px 8px rgba(0,0,0,.4)); }

/* Librería de prompts */
.prompts-page { max-width: 1040px; }
.prompt-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.prompt-cats { display: flex; flex-wrap: wrap; gap: 7px; }
.prompt-search { width: min(300px, 100%); padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: #0a1511; color: #e4f3ec; font: inherit; font-size: 12.5px; }
.prompt-search:focus { outline: none; border-color: rgba(42,224,143,.55); box-shadow: 0 0 0 3px rgba(42,224,143,.1); }
.prompt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.prompt-card { display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.02); padding: 14px; transition: border-color .15s, transform .15s; }
.prompt-card:hover { border-color: rgba(42,224,143,.3); transform: translateY(-1px); }
.prompt-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.prompt-uses { font-size: 9.5px; color: #6f877b; }
.prompt-card strong { font-size: 13.5px; color: #e8f4ee; }
.prompt-card p { font-size: 11.5px; color: #93a9a0; line-height: 1.55; margin: 0; flex: 1; }
.prompt-card .btn { align-self: flex-start; }
.prompt-empty { text-align: center; color: #6d8379; font-size: 12px; padding: 24px 0; }

/* Historial de imágenes */
.history-page { max-width: 1100px; }
.history-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.history-filters input[type="search"], .history-filters select { padding: 8px 11px; border-radius: 10px; border: 1px solid var(--line); background: #0a1511; color: #e4f3ec; font: inherit; font-size: 12px; }
.history-filters input[type="search"] { flex: 1; min-width: 180px; }
.history-clear { font-size: 11px; color: #8fa79b; text-decoration: underline; }
.history-pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 18px; font-size: 11.5px; color: #8fa79b; }
.history-gallery { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }

/* Documentos */
.docs-page { max-width: 1040px; }
.docs-upload { margin-bottom: 16px; }
.docs-upload-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: end; }
.docs-upload-form .field { margin-bottom: 0; }
.docs-upload-form .form-actions { grid-column: 1 / -1; }
.docs-file { position: relative; display: flex; align-items: center; gap: 10px; border: 1px dashed var(--line-strong); border-radius: 11px; padding: 10px 12px; cursor: pointer; background: #0a1511; }
.docs-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.docs-file-name { font-size: 11.5px; color: #8fa79b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.docs-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.docs-search { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.docs-search input { padding: 8px 11px; border-radius: 10px; border: 1px solid var(--line); background: #0a1511; color: #e4f3ec; font: inherit; font-size: 12px; min-width: 220px; }
.docs-count { font-size: 11px; color: #6f877b; }
.docs-list { display: flex; flex-direction: column; gap: 8px; }
.doc-card { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.02); padding: 12px 14px; }
.doc-card:hover { border-color: rgba(42,224,143,.3); }
.doc-icon { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: rgba(42,224,143,.1); border: 1px solid rgba(42,224,143,.2); color: #8dffcd; font-size: 10px; font-weight: 700; flex: none; }
.doc-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.doc-main strong { font-size: 13px; color: #e8f4ee; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-meta { font-size: 10.5px; color: #6f877b; }
.doc-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.doc-actions form { margin: 0; }
.doc-text { white-space: pre-wrap; word-break: break-word; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; line-height: 1.7; color: #c9ded4; max-height: 70vh; overflow: auto; margin: 0; }
@media (max-width: 760px) {
  .docs-upload-form { grid-template-columns: minmax(0, 1fr); }
  .doc-card { flex-wrap: wrap; }
  .doc-actions { width: 100%; }
}

/* El filtro debe ocultar de verdad las tarjetas */
.prompt-card[hidden] { display: none !important; }
.account-pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 12px; font-size: 11px; color: #8fa79b; flex-wrap: wrap; }

/* Documentos: arrastrar, etiquetas y compartir */
.docs-drop { position: relative; display: flex; align-items: center; gap: 12px; border: 1px dashed var(--line-strong); border-radius: 12px; padding: 16px; background: #0a1511; cursor: pointer; transition: border-color .15s, background .15s; }
.docs-drop:hover, .docs-drop.is-drag { border-color: rgba(42,224,143,.55); background: rgba(42,224,143,.06); }
.docs-drop input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.docs-drop-ico { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: rgba(42,224,143,.12); border: 1px solid rgba(42,224,143,.24); color: #8dffcd; font-size: 17px; flex: none; }
.docs-drop-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.docs-drop-copy strong { font-size: 12.5px; color: #dfeee7; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.docs-drop-copy small { font-size: 10.5px; color: #6f877b; }
.docs-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.docs-tag { font-size: 10.5px; color: #8dffcd; background: rgba(42,224,143,.09); border: 1px solid rgba(42,224,143,.22); border-radius: 999px; padding: 3px 9px; text-decoration: none; }
.docs-tag:hover { background: rgba(42,224,143,.16); }
.docs-tag.is-active { background: rgba(42,224,143,.2); border-color: rgba(42,224,143,.5); }
.docs-tag.is-small { font-size: 9.5px; padding: 2px 7px; }
.doc-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 2px; }
.doc-warn { font-size: 9.5px; color: #e8c07a; background: rgba(232,192,122,.08); border: 1px solid rgba(232,192,122,.25); border-radius: 999px; padding: 2px 8px; }
.doc-inline-form { margin: 0; }
.doc-replace { position: relative; overflow: hidden; cursor: pointer; }
.doc-replace input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.doc-share { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.doc-share input { flex: 1; min-width: 220px; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--line); background: #0a1511; color: #9cb2a8; font-size: 11px; }

/* Resumen guardado del documento */
.doc-summary { flex-basis: 100%; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.doc-summary summary { cursor: pointer; font-size: 11.5px; color: #8dffcd; }
.doc-summary-body { margin-top: 8px; font-size: 12px; line-height: 1.65; color: #b9cec4; }

/* Ficha de documento: contenido y acciones en filas separadas */
.doc-card { flex-wrap: wrap; align-items: flex-start; }
.doc-main { flex: 1 1 320px; min-width: 240px; }
.doc-actions { flex: 1 1 100%; justify-content: flex-end; margin-top: 6px; }
.doc-meta { white-space: normal; }
@media (max-width: 760px) {
  .doc-actions { justify-content: flex-start; }
  .doc-main { min-width: 0; }
}

/* Menú de acciones secundarias del documento */
.doc-more { position: relative; }
.doc-more-btn { min-width: 34px; justify-content: center; font-size: 16px; line-height: 1; }
.doc-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 200px; padding: 6px; border-radius: 12px; border: 1px solid rgba(255,255,255,.1); background: #0a1511; box-shadow: 0 22px 54px rgba(0,0,0,.6); }
.doc-menu[hidden] { display: none; }
.doc-menu-item { display: block; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: #c9ded4; font: inherit; font-size: 11.5px; text-align: left; text-decoration: none; cursor: pointer; }
.doc-menu-item:hover { background: rgba(42,224,143,.08); color: #eafff6; }
.doc-menu-item.is-danger { color: #ff9b9b; }
.doc-menu-item.is-danger:hover { background: rgba(255,105,105,.1); color: #ffc0c0; }
.doc-menu-form { margin: 0; }
.doc-replace { position: relative; overflow: hidden; }
.doc-replace input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* Conversación compartida */
.share-chat-page { max-width: 900px; }
.share-chat-card { display: flex; flex-direction: column; gap: 16px; }
.share-msg { display: flex; flex-direction: column; gap: 4px; }
.share-msg-role { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: #6f877b; }
.share-msg-body { font-size: 13px; line-height: 1.7; color: #d6e8df; background: rgba(255,255,255,.02); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.share-msg.is-user .share-msg-body { background: rgba(42,224,143,.06); border-color: rgba(42,224,143,.25); }

/* Landing: herramientas */
.tools-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tool-card { display: flex; flex-direction: column; gap: 8px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.02); transition: border-color .15s, transform .15s; }
.tool-card:hover { border-color: rgba(42,224,143,.3); transform: translateY(-2px); }
.tool-card h3 { font-size: 15px; }
.tool-card p { font-size: 12.5px; color: #93a9a0; line-height: 1.6; margin: 0; }
@media (max-width: 900px) { .tools-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .tools-grid { grid-template-columns: 1fr; } }

/* Modelos de imagen bloqueados por plan */
.image-model-list .is-locked { opacity: .55; }
.image-model-list .is-locked:hover { background: rgba(255,255,255,.02); }
.image-model-list .lock { font-size: 9px; color: #c9a86a; white-space: nowrap; }
.image-model-notice { margin: 8px 2px 0; font-size: 11px; color: #e8c07a; }

/* Catálogo de modelos en movimiento continuo */
.models-marquee { position: relative; overflow: hidden; padding: 4px 0 10px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.models-track { display: flex; width: max-content; animation: modelsScroll 80s linear infinite; }
.models-pass { display: flex; gap: 14px; padding-right: 14px; }
.models-marquee:hover .models-track { animation-play-state: paused; }
.models-marquee .model-card { flex: 0 0 300px; }
@keyframes modelsScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .models-track { animation: none; overflow-x: auto; }
}
@media (max-width: 640px) {
  .models-marquee .model-card { flex-basis: 260px; }
}

/* Modal de planes completo */
.mini-modal-close { position: absolute; top: 9px; right: 11px; width: 30px; height: 30px; border-radius: 9px; border: 1px solid rgba(255,255,255,.14); background: rgba(5,12,9,.8); color: #cfe4d9; font-size: 18px; line-height: 1; cursor: pointer; }
.mini-modal-close:hover { border-color: rgba(42,224,143,.5); color: #8dffcd; }
.upgrade-modal-card { width: min(660px, 100%); max-height: 90vh; overflow-y: auto; }
.upgrade-mark { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; margin: 0 auto; background: rgba(42,224,143,.1); border: 1px solid rgba(42,224,143,.24); color: #8dffcd; font-size: 20px; }
.upgrade-modal-card h2 { text-align: center; margin: 0; font-size: 22px; color: #eafff6; font-family: var(--display); }
.upgrade-modal-card .mini-modal-text { text-align: center; }
.upgrade-plan-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.upgrade-plan-card { display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.upgrade-plan-card.is-featured { border-color: rgba(42,224,143,.3); background: rgba(42,224,143,.04); }
.upgrade-plan-card.is-needed { border-color: rgba(42,224,143,.65); box-shadow: 0 0 0 3px rgba(42,224,143,.1); }
.upgrade-plan-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.upgrade-plan-head strong { font-size: 14px; color: #e8f4ee; }
.plan-badge { font-size: 8px; text-transform: uppercase; letter-spacing: .08em; background: rgba(42,224,143,.15); color: #8dffcd; border-radius: 999px; padding: 2px 7px; }
.upgrade-plan-price { margin-left: auto; font-size: 13px; color: #8dffcd; font-weight: 600; }
.upgrade-plan-price small { font-size: 9px; color: #6f877b; font-weight: 400; }
.upgrade-plan-credits { margin: 0; font-size: 10.5px; color: #8fa79b; }
.upgrade-plan-features { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.upgrade-plan-features li { position: relative; padding-left: 12px; font-size: 10.5px; line-height: 1.45; color: #a9c2b7; }
.upgrade-plan-features li::before { content: "✓"; position: absolute; left: 0; color: #2ae08f; }
.upgrade-later { align-self: center; }
@media (max-width: 640px) { .upgrade-plan-list { grid-template-columns: 1fr; } }

/* Librería de prompts: bloqueo por plan */
.prompts-notice { margin-bottom: 12px; padding: 10px 12px; border: 1px solid rgba(42,224,143,.25); border-radius: 10px; background: rgba(42,224,143,.06); font-size: 11.5px; color: #c9ded4; }
.prompts-notice a { color: #8dffcd; }
.prompt-card.is-locked { opacity: .62; }
.prompt-card.is-locked:hover { transform: none; border-color: var(--line); }
.prompt-lock { font-size: 9px; color: #e8c07a; background: rgba(232,192,122,.08); border: 1px solid rgba(232,192,122,.25); border-radius: 999px; padding: 2px 8px; }
.docs-limit { margin: 10px 0 0; font-size: 11px; color: #8fa79b; }
.docs-limit a { color: #8dffcd; }

/* Mock del hero: accesos a las herramientas */
.mock-links { display: flex; flex-direction: column; gap: 3px; }
.mock-link { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 7px; font-size: 11px; color: #8fa69c; }
.mock-link span { width: 15px; text-align: center; color: #6f9a86; font-size: 11px; }
.mock-link.is-active { background: rgba(42,224,143,.08); color: #d9ebe2; }
.mock-link.is-active span { color: #8dffcd; }

/* Selector de idioma dentro de la app */
.lang-switch { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.03); }
.lang-btn { border: 0; background: transparent; color: #8fa79b; font: inherit; font-size: 9.5px; font-weight: 600; letter-spacing: .04em; padding: 3px 8px; border-radius: 999px; cursor: pointer; }
.lang-btn:hover { color: #eafff6; }
.lang-btn.is-active { background: rgba(42,224,143,.15); color: #8dffcd; }
.panel-head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Modal de planes en una sola fila */
.upgrade-modal-card { width: min(980px, 100%); }
.upgrade-plan-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.upgrade-plan-features li { font-size: 10px; }
@media (max-width: 860px) {
  .upgrade-plan-list { grid-template-columns: 1fr; }
}

/* Filtros de modelos */
.model-filters { display: flex; gap: 6px; padding: 0 12px 8px; }
.model-filter { border: 1px solid var(--line); background: transparent; color: #8fa79b; border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 10.5px; cursor: pointer; }
.model-filter:hover { color: #eafff6; border-color: rgba(42,224,143,.35); }
.model-filter.is-active { background: rgba(42,224,143,.12); border-color: rgba(42,224,143,.45); color: #8dffcd; }

/* Modal de planes: más ancho y con tarjetas espaciosas */
.upgrade-modal-card { width: min(1180px, 96vw); padding: 28px 26px; }
.upgrade-plan-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.upgrade-plan-card { padding: 16px; gap: 8px; }
.upgrade-plan-features li { font-size: 11px; line-height: 1.55; }
.upgrade-plan-credits { font-size: 11px; }
@media (max-width: 900px) { .upgrade-modal-card { width: min(560px, 96vw); } .upgrade-plan-list { grid-template-columns: 1fr; } }

/* Idioma dentro de Datos personales */
.lang-field { max-width: 260px; margin: 0 0 18px; }

/* Modal de planes: ancho, no alto */
.upgrade-modal-card { width: min(1180px, 96vw); padding: 24px 22px; }
.upgrade-plan-card { padding: 14px; }
.upgrade-plan-features li { font-size: 10.5px; line-height: 1.45; }
@media (max-width: 900px) {
  .upgrade-modal-card { width: min(720px, 96vw); }
  .upgrade-plan-list { display: grid; grid-auto-flow: column; grid-auto-columns: 82%; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; padding-bottom: 6px; }
  .upgrade-plan-card { scroll-snap-align: start; }
}

/* El chat carga chat.css después: forzamos el ancho del modal de planes */
.mini-modal-card.upgrade-modal-card { width: min(1180px, 96vw); max-height: 92vh; padding: 24px 22px; }
.upgrade-modal-card .upgrade-plan-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.upgrade-modal-card .upgrade-plan-card { padding: 14px; }
@media (max-width: 900px) {
  .mini-modal-card.upgrade-modal-card { width: min(720px, 96vw); }
  .upgrade-modal-card .upgrade-plan-list { display: grid; grid-auto-flow: column; grid-auto-columns: 82%; grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; padding-bottom: 6px; }
}

/* Ajuste final del ancho del modal de planes */
.mini-modal-card.upgrade-modal-card { width: min(940px, 94vw); }
@media (max-width: 900px) { .mini-modal-card.upgrade-modal-card { width: min(720px, 96vw); } }
.mini-modal-card.upgrade-modal-card { width: min(860px, 92vw); }
.mini-modal-card.upgrade-modal-card { width: min(800px, 92vw); }

/* Base de modales pequeños (también en páginas que no cargan chat.css) */
.mini-modal[hidden] { display: none; }
.mini-modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; }
.mini-modal-backdrop { position: absolute; inset: 0; background: rgba(2,6,4,.82); backdrop-filter: blur(5px); }
.mini-modal-card { position: relative; width: min(440px, 100%); max-height: 90vh; overflow-y: auto; padding: 22px; border-radius: 16px; border: 1px solid var(--line-strong); background: #08120e; box-shadow: 0 40px 120px rgba(0,0,0,.6); display: flex; flex-direction: column; gap: 10px; }
.upgrade-actions { display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.upgrade-actions .btn { flex: 0 0 auto; width: auto; }
.upgrade-modal-card .upgrade-later { align-self: auto; }
.upgrade-plan-cta { margin-top: auto; align-self: stretch; justify-content: center; }
.upgrade-plan-form { margin-top: auto; display: flex; }
.upgrade-plan-form .btn { width: 100%; }
.upgrade-plan-cta.is-current { opacity: .6; cursor: default; }
.upgrade-plan-card.is-current { border-color: rgba(42,224,143,.55); box-shadow: 0 0 0 3px rgba(42,224,143,.08); }
.plan-badge.is-current { background: rgba(42,224,143,.2); color: #8dffcd; }

/* Historial de versiones de documentos */
.doc-versions { flex-basis: 100%; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.doc-versions summary { cursor: pointer; font-size: 11.5px; color: #8dffcd; }
.doc-version-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.doc-version-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 11px; color: #9db3a8; }
.doc-version-meta { flex: 1; min-width: 200px; overflow: hidden; text-overflow: ellipsis; }
.doc-version-action { background: none; border: 1px solid var(--line); border-radius: 7px; color: #b9cec4; font-size: 10.5px; padding: 4px 9px; cursor: pointer; text-decoration: none; }
.doc-version-action:hover { border-color: rgba(42,224,143,.4); color: #e6f6ed; }

/* Mis prompts (prompts guardados por el usuario) */
.my-prompts { margin-bottom: 18px; }
.up-form { display: grid; gap: 10px; margin: 12px 0 16px; }
.up-form .form-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.up-count { margin-left: auto; font-size: 10.5px; color: #6f877b; }
.up-list { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.up-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: rgba(255,255,255,.02); display: flex; flex-direction: column; gap: 8px; }
.up-card.is-editing { border-color: rgba(42,224,143,.5); box-shadow: 0 0 0 3px rgba(42,224,143,.08); }
.up-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.up-uses { font-size: 10px; color: #6f877b; white-space: nowrap; }
.up-card p { margin: 0; font-size: 12px; line-height: 1.5; color: #b9cec4; flex: 1; }
.up-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.up-actions form { display: inline-flex; margin: 0; }
.up-del { color: #ffb4b4; }
.up-empty { font-size: 12px; color: #8fa79c; margin: 4px 0 0; }

.image-view-note { margin: 6px 0 0; font-size: 11px; line-height: 1.5; color: #8fa79c; }

/* Mis prompts en modal + prompts bloqueados difuminados */
.my-prompts-modal { z-index: 220; }
.my-prompts-card { width: min(760px, 100%); max-height: 88vh; overflow-y: auto; }
.my-prompts-card h2 { margin: 0 0 2px; }
.up-badge { display: inline-flex; min-width: 18px; height: 18px; align-items: center; justify-content: center; padding: 0 5px; margin-left: 5px; border-radius: 9px; background: rgba(42,224,143,.18); color: #8dffcd; font-size: 10px; font-weight: 700; }
.prompt-card { -webkit-user-select: none; user-select: none; }
.prompt-card p, .prompt-card strong, .prompt-blur span { -webkit-user-drag: none; }
.prompt-blur { display: flex; flex-direction: column; gap: 6px; margin: 2px 0 10px; opacity: .55; filter: blur(3.5px); pointer-events: none; }
.prompt-blur span { display: block; height: 8px; border-radius: 4px; background: #335345; }
.prompt-blur span:nth-child(1) { width: 100%; }
.prompt-blur span:nth-child(2) { width: 92%; }
.prompt-blur span:nth-child(3) { width: 58%; }

.method-mp { background: rgba(0, 177, 234, .16); color: #6fd8ff; }

/* Compra directa desde /pricing y plan preseleccionado en facturación */
.plan-buy-form { margin-top: auto; display: flex; }
.plan-buy-form .btn { width: 100%; justify-content: center; }
.price-card.is-wanted { border-color: rgba(42, 224, 143, .6); box-shadow: 0 0 0 3px rgba(42, 224, 143, .1); }

/* ---------- Barra de créditos (facturación) ---------- */
.credits-strip {
  border: 1px solid var(--line-strong); border-radius: 16px;
  background: linear-gradient(115deg, rgba(42, 224, 143, .08), rgba(255, 255, 255, .015));
  padding: 16px 20px 14px; margin-bottom: 18px;
}
.cs-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.cs-label { display: block; font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: #729184; }
.cs-value { display: block; font-family: var(--display); font-size: 27px; letter-spacing: -.03em; margin-top: 2px; color: #e9f7ef; }
.cs-value span { color: var(--brand); font-size: 19px; }
.cs-meta { text-align: right; display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; color: #8fae9e; }
.cs-plan { color: #cfe3d9; font-weight: 600; }
.cs-bar { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .07); margin: 13px 0 8px; overflow: hidden; }
.cs-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #2ae08f, #8dffcd); }
.cs-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 11px; color: #729184; }
.cs-foot a { color: var(--brand); font-weight: 600; }
.cs-foot a:hover { text-decoration: underline; }
@media (max-width: 560px) { .cs-meta { text-align: left; } }

/* ---------- Página de novedades ---------- */
.upd-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 20px 22px;
  margin-bottom: 14px;
}
.upd-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.upd-card-top time { font-size: 11px; color: var(--dim); }
.upd-kind {
  display: inline-flex;
  align-items: center;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  border-radius: 5px;
  padding: 3px 8px;
  border: 1px solid transparent;
}
.upd-kind.is-model { background: rgba(42, 224, 143, .10); border-color: rgba(42, 224, 143, .25); color: #8df3c2; }
.upd-kind.is-feature { background: rgba(93, 177, 255, .10); border-color: rgba(93, 177, 255, .25); color: #a8d5ff; }
.upd-kind.is-fix { background: rgba(255, 196, 90, .10); border-color: rgba(255, 196, 90, .22); color: #ffd590; }
.upd-kind.is-offer { background: rgba(255, 120, 200, .10); border-color: rgba(255, 120, 200, .25); color: #ffb3e0; }
.upd-card h2 { font-family: var(--display); font-size: 18px; margin: 0 0 8px; letter-spacing: -.02em; }
.upd-body { font-size: 14px; line-height: 1.75; color: var(--muted); }
.upd-back { margin: 22px 0 0; }
.upd-empty {
  padding: 26px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

/* Confirmacion propia (no nativa) */
.confirm-modal-card { width: min(430px, 100%); }
.confirm-head { display: flex; gap: 12px; align-items: flex-start; }
.confirm-icon { flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: rgba(229,72,77,.12); border: 1px solid rgba(229,72,77,.4); color: #ff9b9b; font-size: 18px; font-weight: 700; }
.confirm-modal-card h3 { margin: 0 0 4px; }
.confirm-modal-card .mini-modal-actions { margin-top: 16px; }
.confirm-modal-card .btn-danger { background: #e5484d; border: 1px solid #e5484d; color: #fff; }
.confirm-modal-card .btn-danger:hover { background: #f2555a; border-color: #f2555a; color: #fff; }
body.confirm-open { overflow: hidden; }
@media (max-width: 480px) {
  .confirm-modal-card .mini-modal-actions { flex-direction: column-reverse; }
  .confirm-modal-card .mini-modal-actions .btn { width: 100%; }
}
/* Markdown en conversaciones compartidas */
.share-msg-body.md { white-space: normal; }
.share-msg-body.md > *:first-child { margin-top: 0; }
.share-msg-body.md > *:last-child { margin-bottom: 0; }
.share-msg-body.md p { margin: 0 0 10px; }
.share-msg-body.md strong, .share-msg-body.md b { color: #eafff6; font-weight: 700; }
.share-msg-body.md em { color: #e6f2ec; }
.share-msg-body.md h1, .share-msg-body.md h2, .share-msg-body.md h3, .share-msg-body.md h4 { color: #eafff6; line-height: 1.3; margin: 14px 0 8px; }
.share-msg-body.md h1 { font-size: 18px; }
.share-msg-body.md h2 { font-size: 16px; }
.share-msg-body.md h3 { font-size: 14px; }
.share-msg-body.md ul, .share-msg-body.md ol { margin: 0 0 10px; padding-left: 20px; }
.share-msg-body.md li { margin: 3px 0; }
.share-msg-body.md a { color: #8dffcd; text-decoration: underline; text-underline-offset: 2px; }
.share-msg-body.md code { background: rgba(255,255,255,.07); border-radius: 5px; padding: 1px 5px; font-size: .92em; }
.share-msg-body.md pre { background: #08120e; border: 1px solid var(--line); border-radius: 10px; padding: 12px; overflow-x: auto; margin: 0 0 10px; }
.share-msg-body.md pre code { background: none; padding: 0; font-size: 12px; }
.share-msg-body.md blockquote { margin: 0 0 10px; padding: 6px 12px; border-left: 3px solid rgba(42,224,143,.35); color: #a9c2b7; }
.share-msg-body.md hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
.share-msg-body.md table { border-collapse: collapse; width: 100%; margin: 0 0 10px; font-size: 12px; }
.share-msg-body.md th, .share-msg-body.md td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; }
.share-msg-body.md th { background: rgba(255,255,255,.04); color: #cfe3d9; }
/* Markdown en el resumen de documentos */
.doc-summary-body.md { white-space: normal; }
.doc-summary-body.md p { margin: 0 0 9px; }
.doc-summary-body.md > *:last-child { margin-bottom: 0; }
.doc-summary-body.md strong { color: #eafff6; font-weight: 700; }
.doc-summary-body.md h1, .doc-summary-body.md h2, .doc-summary-body.md h3, .doc-summary-body.md h4 { color: #eafff6; font-size: 13px; margin: 12px 0 6px; }
.doc-summary-body.md ul, .doc-summary-body.md ol { margin: 0 0 9px; padding-left: 18px; }
.doc-summary-body.md li { margin: 3px 0; }
.doc-summary-body.md code { background: rgba(255,255,255,.07); border-radius: 5px; padding: 1px 5px; font-size: .92em; }
.doc-summary-body.md pre { background: #08120e; border: 1px solid var(--line); border-radius: 10px; padding: 10px; overflow-x: auto; margin: 0 0 9px; }
.doc-summary-body.md pre code { background: none; padding: 0; }
.doc-summary-body.md a { color: #8dffcd; text-decoration: underline; }
.doc-summary-body.md blockquote { margin: 0 0 9px; padding: 5px 10px; border-left: 3px solid rgba(42,224,143,.35); color: #a9c2b7; }
/* Documento con estructura (títulos, listas, tablas) */
.doc-rich { font-size: 13px; line-height: 1.75; color: #cfe0d8; }
.doc-rich p { margin: 0 0 12px; }
.doc-rich .doc-title { font-family: var(--display); font-size: 21px; color: #eafff6; margin: 0 0 14px; line-height: 1.25; letter-spacing: -.02em; }
.doc-rich h2 { font-size: 17px; color: #eafff6; margin: 22px 0 8px; line-height: 1.3; }
.doc-rich h3 { font-size: 15px; color: #e6f4ed; margin: 18px 0 7px; line-height: 1.3; }
.doc-rich h4 { font-size: 13.5px; color: #dcebe4; margin: 16px 0 6px; }
.doc-rich ul { margin: 0 0 12px; padding-left: 20px; }
.doc-rich li { margin: 4px 0; }
.doc-rich strong { color: #eafff6; }
.doc-rich .doc-table-wrap { overflow-x: auto; margin: 0 0 14px; }
.doc-rich table { border-collapse: collapse; width: 100%; font-size: 12px; }
.doc-rich th, .doc-rich td { border: 1px solid var(--line); padding: 7px 10px; text-align: left; vertical-align: top; }
.doc-rich th { background: rgba(255,255,255,.04); color: #cfe3d9; font-weight: 600; }
.doc-rich tr:nth-child(even) td { background: rgba(255,255,255,.015); }
.doc-rich .doc-table-wrap { -webkit-overflow-scrolling: touch; }
@media (max-width: 640px) {
  .doc-rich { font-size: 12.5px; }
  .doc-rich .doc-title { font-size: 18px; }
  .doc-rich h2 { font-size: 15.5px; }
  .doc-rich h3 { font-size: 14px; }
  .doc-rich th, .doc-rich td { padding: 6px 8px; }
}
/* Avisos de enlaces compartidos: discretos y con candado */
.doc-share-note { flex-basis: 100%; display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: #6f877b; line-height: 1.45; }
.doc-share-note svg { flex: none; opacity: .8; }
.share-legal { display: flex; align-items: center; gap: 7px; font-size: 10.5px; color: #6f877b; line-height: 1.5; margin: 14px 0 0; max-width: 620px; }
.share-legal svg { flex: none; opacity: .8; }
.panel-head h1.share-page-title { font-size: clamp(24px, 3.2vw, 34px); }
/* Paginador de documentos */
.docs-pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 16px; font-size: 11.5px; color: #7d9488; flex-wrap: wrap; }
.docs-pager .btn-sm { padding: 6px 12px; font-size: 11.5px; }
@media (max-width: 640px) {
  .docs-pager { gap: 10px; }
  .docs-pager .btn-sm { min-height: 38px; }
}
/* Enlace de documento caducado */
.doc-share.is-expired { gap: 10px; align-items: center; justify-content: space-between; }
.doc-share.is-expired .doc-share-note { flex: 1; color: #e8c07a; }
.doc-share.is-expired .doc-share-note svg { opacity: .9; }
@media (max-width: 640px) {
  .doc-share.is-expired { flex-direction: column; align-items: flex-start; }
  .doc-share.is-expired form { width: 100%; }
  .doc-share.is-expired .btn { width: 100%; }
}
/* Edición de título y etiquetas de un documento */
.doc-edit { flex-basis: 100%; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 8px; }
.doc-edit summary { font-size: 11.5px; color: #8fa89b; cursor: pointer; }
.doc-edit summary:hover { color: #cfe3d9; }
.doc-edit-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-top: 10px; }
.doc-edit-form .field { flex: 1 1 220px; margin: 0; }
.doc-edit-form .field label { font-size: 11px; }
.doc-edit-form input { width: 100%; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--line); background: #0a1511; color: #d8e8e0; font-size: 12.5px; }
@media (max-width: 640px) {
  .doc-edit-form { flex-direction: column; align-items: stretch; }
  .doc-edit-form .btn { width: 100%; }
}
/* Aviso de correos obligatorios (cuenta) */
.notif-note { display: flex; align-items: flex-start; gap: 6px; font-size: 10.5px; color: #6f877b; line-height: 1.55; margin: 12px 0 0; max-width: 640px; }
.notif-note svg { flex: none; margin-top: 2px; opacity: .8; }
@media (max-width: 640px) { .notif-note { font-size: 10px; } }
/* Ordenación y cuota de documentos */
.docs-sort { display: flex; align-items: center; gap: 7px; font-size: 10.5px; color: #6f877b; }
.docs-sort select { padding: 6px 9px; border-radius: 8px; border: 1px solid var(--line); background: #0a1511; color: #cfe3d9; font: inherit; font-size: 11px; }
.docs-storage { margin: 6px 0 0; font-size: 10.5px; color: #6f877b; }
.docs-storage.is-tight { color: #e8c07a; }
@media (max-width: 640px) {
  .docs-sort { width: 100%; }
  .docs-sort select { flex: 1; }
}
/* Contraste accesible en textos pequeños sobre fondo oscuro */
:root { --dim: #80978c; }
.trust-label { color: #93aa9f; }
.mock-label, .mock-composer span { color: #8fa79b; }
.mock-plan span { color: #8fc0aa; }
.field input::placeholder, .field textarea::placeholder { color: #7f968b; }
.secure-note, .summary-note, .return-small { color: #82998e; }
.auth-legal { color: #80978c; }
/* Barra de almacenamiento de documentos */
.doc-storage { margin: 12px 0 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255, 255, 255, .02); }
.ds-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.ds-label { font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: #7d9488; }
.ds-value { font-size: 11.5px; color: #cfe3d9; font-weight: 600; }
.ds-bar { height: 7px; border-radius: 99px; background: rgba(255, 255, 255, .07); margin: 8px 0 6px; overflow: hidden; }
.ds-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #2ae08f, #8dffcd, #2ae08f); background-size: 200% 100%; transition: width .8s cubic-bezier(.22, 1, .36, 1); animation: dsShimmer 3.2s linear infinite; }
.doc-storage.is-tight .ds-bar i { background: linear-gradient(90deg, #e8c07a, #ffd89b, #e8c07a); background-size: 200% 100%; }
.ds-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 10px; color: #7d9488; }
.doc-storage.is-tight .ds-foot { color: #e8c07a; }
@keyframes dsShimmer { from { background-position: 0 0; } to { background-position: 200% 0; } }
@media (prefers-reduced-motion: reduce) { .ds-bar i { animation: none; transition: none; } }
@media (max-width: 640px) {
  .doc-storage { padding: 9px 10px; }
  .ds-value { font-size: 11px; }
}
/* Barra de almacenamiento de imágenes */
.img-storage { margin: 0 0 14px; }
/* Formularios de acceso: estados dinámicos del botón */
.auth-submit { position: relative; overflow: hidden; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; transition: background .25s ease, box-shadow .25s ease, transform .18s ease; }
.auth-submit .btn-label { display: inline-block; transition: opacity .18s ease, transform .18s ease; }
.auth-submit .btn-spinner { display: none; width: 14px; height: 14px; margin-left: 8px; border: 2px solid rgba(4, 20, 13, .22); border-top-color: #04140d; border-radius: 50%; animation: authSpin .65s linear infinite; vertical-align: -2px; }
.auth-submit .btn-check { display: none; margin-left: 8px; font-size: 14px; font-weight: 800; line-height: 1; }
.auth-submit.is-loading { cursor: progress; }
.auth-submit.is-loading .btn-spinner { display: inline-block; }
.auth-submit.is-loading .btn-label { opacity: .82; }
.auth-submit.is-loading::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 25%, rgba(255, 255, 255, .22) 50%, transparent 75%); transform: translateX(-120%); animation: authShine 1.1s ease-in-out infinite; pointer-events: none; }
.auth-submit.is-success { background: linear-gradient(180deg, #7dffc4, #2ae08f); box-shadow: 0 0 0 4px rgba(42, 224, 143, .14), 0 12px 34px rgba(42, 224, 143, .22); transform: translateY(-1px); }
.auth-submit.is-success .btn-check { display: inline-block; }
.auth-submit.is-success .btn-spinner { display: none; }
.auth-submit.is-success .btn-label { opacity: 1; }
.auth-submit:disabled { opacity: 1; }
@keyframes authSpin { to { transform: rotate(360deg); } }
@keyframes authShine { to { transform: translateX(120%); } }
@media (prefers-reduced-motion: reduce) {
  .auth-submit .btn-spinner, .auth-submit.is-loading::after { animation: none; }
}
/* Redes sociales del pie */
.footer-social { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.footer-social a {
  width: 32px; height: 32px; border-radius: 8px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  color: #9fc7b6;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.footer-social a:hover { background: var(--brand); border-color: transparent; color: #04140d; transform: translateY(-1px); }
.footer-social a:focus-visible { outline: 2px solid rgba(42, 224, 143, .6); outline-offset: 2px; }
/* Acciones en lote de documentos */
.docs-bulk-form{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0 0 14px;padding:10px 12px;border:1px solid rgba(120,160,140,.18);border-radius:12px;background:rgba(255,255,255,.02)}
.docs-bulk-form strong{font-size:13px;font-weight:600;color:#9fb8ac;margin-right:2px}
.docs-bulk-form select,.docs-bulk-form input[type="text"]{height:34px;padding:0 10px;border-radius:8px;border:1px solid rgba(120,160,140,.28);background:#0b1512;color:#e8f2ec;font-size:13px;line-height:32px}
.docs-bulk-form input[type="text"]{flex:1 1 200px;min-width:160px}
.docs-bulk-form .btn{height:34px;padding:0 14px;font-size:13px;border-radius:8px;display:inline-flex;align-items:center;line-height:1}
.docs-bulk-form .btn[type="submit"]{background:#22c07a;color:#04140c;border-color:transparent;font-weight:700}
.doc-check{width:16px;height:16px;margin:16px 10px 0 0;accent-color:#22c07a;flex:0 0 auto}
@media (max-width:640px){.docs-bulk-form strong{width:100%}.docs-bulk-form input[type="text"]{flex:1 1 100%}}

/* Texto de ayuda compacto */
.hint {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--dim);
}
