/* =============================================================
   FAQ Gimnasio Fontana — Hoja de estilos única (público + admin)
   Cambia la paleta institucional en :root.
   ============================================================= */
:root {
  --brand:        #17378a;   /* azul institucional oscuro (fondos) */
  --brand-2:      #1f49b6;   /* azul del logo Gimnasio Fontana */
  --accent:       #c9a227;   /* dorado de acento */
  --bg:           #f4f6fa;
  --surface:      #ffffff;
  --line:         #e3e8f0;
  --text:         #1b2533;
  --muted:        #5f6b7c;
  --ok:           #15803d;
  --warn:         #b45309;
  --danger:       #b91c1c;
  --radius:       14px;
  --shadow:       0 1px 2px rgba(16,36,70,.06), 0 4px 16px rgba(16,36,70,.06);
  --font:         "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,*::before,*::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.55; font-size: 16px; -webkit-font-smoothing: antialiased; }
a { color: var(--brand-2); }
img, svg { vertical-align: middle; }
code { background: #eef2f8; padding: 1px 6px; border-radius: 6px; font-size: .9em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.container { width: min(1100px, 100% - 32px); margin-inline: auto; }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; font-size: .95rem; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, transform .05s; }
.btn:hover { border-color: #c8d1de; background: #f8fafc; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: #fef2f2; border-color: #f3c4c4; }
.btn-sm { padding: 6px 12px; font-size: .85rem; border-radius: 8px; }
.btn-icon { padding: 7px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand-2) 35%, transparent); outline-offset: 2px; }

/* ---------- Formularios ---------- */
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: .9rem; }
.form .hint { font-weight: 400; color: var(--muted); font-size: .82rem; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], input[type=url], input:not([type]), select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #cfd7e3; border-radius: 10px; font: inherit; font-weight: 400; background: #fff; color: var(--text);
}
textarea { min-height: 140px; resize: vertical; }
.check { display: flex !important; align-items: center; gap: 10px; font-weight: 500 !important; grid-template-columns: none !important; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- Alertas ---------- */
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 14px; border: 1px solid; font-size: .93rem; }
.alert-ok    { background: #f0fdf4; border-color: #bbe5c8; color: #14532d; }
.alert-error { background: #fef2f2; border-color: #f3c4c4; color: #7f1d1d; }
.alert-info  { background: #eff6ff; border-color: #c7dcf7; color: #1e3a66; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px; font-size: .76rem; font-weight: 700; background: #eef2f8; color: var(--muted); white-space: nowrap; }
.badge-ok { background: #dcfce7; color: #166534; }
.badge-warn { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-brand { background: #e0e9f7; color: var(--brand); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

/* =============================================================
   SITIO PÚBLICO
   ============================================================= */
.hero { background: linear-gradient(140deg, var(--brand) 0%, var(--brand-2) 100%); color: #fff; padding: 22px 0 88px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: auto -10% -60% auto; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.09), transparent 65%); pointer-events: none; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; letter-spacing: .2px; }
.brand-mark { width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.14); display: grid; place-items: center; border: 1px solid rgba(255,255,255,.2); }
.brand small { display: block; font-weight: 500; opacity: .8; font-size: .78rem; }
/* Logo institucional */
.brand-logo { gap: 16px; }
.brand-logo img { height: 56px; width: auto; display: block; }
.brand-sep { padding-left: 16px; border-left: 1px solid rgba(255,255,255,.35); font-weight: 600; font-size: .9rem; opacity: .9; }
.brand-side { flex-direction: column; align-items: flex-start; gap: 8px; }
.brand-side img { width: 150px; height: auto; display: block; }
.brand-side small { opacity: .75; font-weight: 500; font-size: .78rem; letter-spacing: .3px; }
.auth-logo { text-align: center; margin-bottom: 24px; }
.auth-logo img { width: 190px; height: auto; display: block; margin: 0 auto 10px; }
.auth-logo span { color: var(--muted); font-size: .9rem; }
.topbar a.link-admin { color: rgba(255,255,255,.8); font-size: .85rem; text-decoration: none; white-space: nowrap; }
.topbar a.link-admin:hover { color: #fff; }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 48px 0 8px; line-height: 1.15; }
.hero p.lead { margin: 0 0 26px; opacity: .85; font-size: 1.05rem; }
.hero .accent { color: var(--accent); }

.search { position: relative; max-width: 680px; }
.search > svg { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { padding: 17px 48px 17px 52px; border-radius: 14px; border: 0; font-size: 1.05rem; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.search .clear { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); border: 0; background: #eef2f8; color: var(--muted); border-radius: 8px; width: 32px; height: 32px; cursor: pointer; display: none; place-items: center; }
.search.has-text .clear { display: grid; }

.areas { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: -56px; position: relative; z-index: 2; }
.area-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); cursor: pointer; text-align: left; font: inherit; color: inherit; display: flex; gap: 14px; align-items: flex-start; transition: transform .15s, border-color .15s, box-shadow .15s; }
.area-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--c) 40%, var(--line)); }
.area-card[aria-pressed="true"] { border-color: var(--c); box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 30%, transparent), var(--shadow); }
.area-ico { flex: none; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); }
.area-card strong { display: block; font-size: 1.02rem; }
.area-card div > span { display: block; color: var(--muted); font-size: .84rem; line-height: 1.4; margin-top: 2px; }
.area-card em { font-style: normal; font-size: .76rem; font-weight: 700; color: var(--c); margin-top: 6px; display: inline-block; }

.filters { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 34px 0 14px; flex-wrap: wrap; }
.filters h2 { margin: 0; font-size: 1.25rem; }
.result-count { color: var(--muted); font-size: .9rem; }

.faq-group { margin-bottom: 28px; }
.faq-group-title { display: flex; align-items: center; gap: 10px; font-size: .8rem; text-transform: uppercase; letter-spacing: .8px; color: var(--c); font-weight: 800; margin: 0 0 10px; }
.faq-group-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.faq { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; transition: border-color .15s, box-shadow .15s; scroll-margin-top: 20px; }
.faq[open] { border-color: #cdd7e6; box-shadow: var(--shadow); }
.faq summary { list-style: none; cursor: pointer; padding: 16px 18px; display: flex; gap: 12px; align-items: center; font-weight: 600; border-radius: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { background: #fafbfd; }
.faq summary .q { flex: 1; }
.faq summary .chev { flex: none; color: var(--muted); transition: transform .2s; }
.faq[open] summary .chev { transform: rotate(180deg); }
.faq .star { color: var(--accent); flex: none; }
.faq-body { padding: 0 18px 16px; color: #2c3848; }
.faq-body p { margin: 0 0 10px; }
.faq-body ul, .faq-body ol { margin: 0 0 10px; padding-left: 22px; }
.faq-body li { margin-bottom: 4px; }
.faq-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; border-top: 1px dashed var(--line); padding-top: 12px; margin-top: 6px; font-size: .86rem; color: var(--muted); }
.vote { display: flex; align-items: center; gap: 8px; }
.vote button { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 5px 11px; cursor: pointer; font: inherit; font-size: .84rem; display: inline-flex; gap: 6px; align-items: center; color: var(--muted); }
.vote button:hover { border-color: #b9c4d4; color: var(--text); }
.vote button.sel { background: var(--brand); color: #fff; border-color: var(--brand); }
.copy-link { border: 0; background: none; color: var(--muted); cursor: pointer; font: inherit; font-size: .82rem; text-decoration: underline; }
mark { background: #fde68a; color: inherit; border-radius: 3px; padding: 0 1px; }

.empty { text-align: center; padding: 42px 16px; color: var(--muted); background: var(--surface); border: 1px dashed #cfd7e3; border-radius: var(--radius); }
.empty strong { display: block; color: var(--text); font-size: 1.05rem; margin-bottom: 4px; }

.ask { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; margin: 40px 0; box-shadow: var(--shadow); display: grid; grid-template-columns: 1fr 1.4fr; gap: 28px; }
.ask h2 { margin: 0 0 6px; }
.ask-ico { width: 52px; height: 52px; border-radius: 14px; background: #e0e9f7; color: var(--brand); display: grid; place-items: center; margin-bottom: 14px; }

.site-footer { padding: 26px 0 40px; color: var(--muted); font-size: .86rem; text-align: center; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: #111827; color: #fff; padding: 10px 18px; border-radius: 10px; font-size: .9rem; opacity: 0; pointer-events: none; transition: .25s; z-index: 100; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* =============================================================
   LOGIN / INSTALADOR
   ============================================================= */
.auth-body { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: linear-gradient(140deg, var(--brand), var(--brand-2)); }
.auth-card { width: 100%; max-width: 400px; background: #fff; border-radius: 18px; padding: 30px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.auth-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 22px; color: var(--brand); }
.auth-brand strong { display: block; font-size: 1.15rem; color: var(--text); }
.auth-brand span { display: block; font-size: .85rem; color: var(--muted); }
.steps { padding-left: 20px; } .steps li { margin-bottom: 8px; }

/* =============================================================
   PANEL ADMIN
   ============================================================= */
.admin { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.sidebar { background: var(--brand); color: #dbe5f3; padding: 20px 14px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
.sidebar .brand { padding: 0 8px 20px; border-bottom: 1px solid rgba(255,255,255,.12); margin-bottom: 14px; }
.nav { display: grid; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: #dbe5f3; text-decoration: none; font-weight: 500; font-size: .94rem; }
.nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav a.active { background: rgba(255,255,255,.14); color: #fff; font-weight: 700; }
.nav a .count { margin-left: auto; background: var(--accent); color: #1b1b1b; font-size: .72rem; font-weight: 800; padding: 1px 8px; border-radius: 999px; }
.nav-sep { font-size: .7rem; letter-spacing: 1px; text-transform: uppercase; opacity: .55; padding: 16px 12px 6px; }
.sidebar-user { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid rgba(255,255,255,.12); font-size: .85rem; }
.sidebar-user strong { color: #fff; display: block; }
.sidebar-user a { color: #dbe5f3; }
.main { padding: 28px clamp(16px, 3vw, 36px) 60px; min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 1.6rem; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); margin-bottom: 20px; }
.card h2 { margin: 0 0 14px; font-size: 1.1rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.stat span { color: var(--muted); font-size: .85rem; font-weight: 600; }
.stat strong { display: block; font-size: 2rem; line-height: 1.1; margin-top: 6px; }
.stat small { color: var(--muted); }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.toolbar input, .toolbar select { width: auto; min-width: 180px; }
.toolbar input[type=search] { flex: 1; min-width: 220px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { background: #f7f9fc; font-size: .78rem; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 700; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafbfd; }
td.actions { white-space: nowrap; text-align: right; }
td.actions form { display: inline; }
.cell-title { font-weight: 600; }
.card a.cell-title { text-decoration: none; }
.card a.cell-title:hover { text-decoration: underline; }
td.nowrap { white-space: nowrap; }
.cell-sub { color: var(--muted); font-size: .82rem; }

.bar { height: 8px; background: #eef2f8; border-radius: 99px; overflow: hidden; min-width: 70px; }
.bar i { display: block; height: 100%; background: var(--ok); border-radius: 99px; }

.area-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.area-checks label { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.icon-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; }
.icon-pick label { border: 1px solid var(--line); border-radius: 10px; display: grid !important; place-items: center; padding: 10px; cursor: pointer; }
.icon-pick input { position: absolute; opacity: 0; }
.icon-pick label:has(input:checked) { border-color: var(--brand); background: #e0e9f7; color: var(--brand); }
.editor-help { background: #f7f9fc; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: .84rem; color: var(--muted); }
.editor-help code { background: #fff; }
.preview { border: 1px dashed #cfd7e3; border-radius: 10px; padding: 14px 16px; background: #fcfdff; min-height: 60px; }
.preview p { margin: 0 0 8px; }
.admin-layout-2 { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; align-items: start; }
.mobile-bar { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) { .admin-layout-2.stack-md { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .admin { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 270px; transform: translateX(-100%); transition: transform .2s; z-index: 50; }
  .admin.nav-open .sidebar { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.35); }
  .mobile-bar { display: flex; align-items: center; justify-content: space-between; background: var(--brand); color: #fff; padding: 10px 16px; position: sticky; top: 0; z-index: 40; }
  .mobile-bar button { background: none; border: 0; color: #fff; cursor: pointer; }
  .admin-layout-2 { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .ask { grid-template-columns: 1fr; padding: 20px; }
  .grid-2 { grid-template-columns: 1fr; }
  .areas { grid-template-columns: 1fr 1fr; gap: 10px; }
  .area-card { flex-direction: column; gap: 10px; padding: 14px; }
  .area-card div > span { display: none; }
  .brand-logo img { height: 42px; }
  .brand-sep { display: none; }
  th.hide-sm, td.hide-sm { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* =============================================================
   v2 — Lista con enlaces, página de detalle y contenido enriquecido
   ============================================================= */
.faq-list { display: grid; gap: 10px; }
.faq-item { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s, transform .15s; }
.faq-item:hover { border-color: color-mix(in srgb, var(--c, var(--brand-2)) 45%, var(--line)); box-shadow: var(--shadow); transform: translateY(-1px); }
.faq-item:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand-2) 35%, transparent); outline-offset: 2px; }
.faq-dot { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--c, var(--brand-2)); background: color-mix(in srgb, var(--c, var(--brand-2)) 11%, #fff); }
.faq-txt { flex: 1; min-width: 0; }
.faq-txt .q { display: block; font-size: 1rem; }
.faq-txt .ex { display: block; color: var(--muted); font-size: .87rem; margin-top: 3px; line-height: 1.45; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.faq-media { display: flex; gap: 6px; color: var(--muted); flex: none; }
.faq-go { flex: none; color: var(--muted); transition: transform .15s, color .15s; }
.faq-item:hover .faq-go { transform: translateX(3px); color: var(--c, var(--brand-2)); }
.populares { margin: 34px 0 30px; }

/* Encabezado compacto de la página de detalle */
.hero-sm { padding: 18px 0 22px; }
.hero-sm .brand-logo img { height: 46px; }
.search-mini { flex: 0 1 340px; }
.search-mini input { padding: 11px 14px 11px 42px; border-radius: 10px; font-size: .95rem; box-shadow: none; }
.search-mini > svg { left: 14px; }

.detail { padding-top: 22px; }
.breadcrumb { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: .88rem; color: var(--muted); margin-bottom: 16px; }
.breadcrumb a { color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; gap: 5px; }
.breadcrumb a:hover { color: var(--brand-2); }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; align-items: start; }
.article { padding: clamp(20px, 4vw, 40px); }
.area-chip { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700; text-decoration: none; color: var(--c); background: color-mix(in srgb, var(--c) 11%, #fff); padding: 5px 12px; border-radius: 999px; }
.article h1 { font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.2; margin: 14px 0 6px; }
.article-meta { color: var(--muted); font-size: .88rem; margin: 0 0 24px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.article-foot { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line); }
.article-foot .vote { flex-wrap: wrap; }
.share { display: flex; gap: 8px; flex-wrap: wrap; }
.vote-msg { margin-top: 14px; background: #f0f6ff; border: 1px solid #cfe0f7; color: #1e3a66; border-radius: 10px; padding: 10px 14px; font-size: .92rem; }
.detail-side { display: grid; gap: 16px; position: sticky; top: 16px; }
.side-card { padding: 20px; margin: 0; }
.side-card h2 { font-size: 1rem; margin: 0 0 10px; }
.side-cta { text-align: left; }
.side-cta .ask-ico { width: 44px; height: 44px; margin-bottom: 10px; }
.related { list-style: none; padding: 0; margin: 0 0 12px; }
.related li { border-bottom: 1px solid var(--line); }
.related li:last-child { border: 0; }
.related a { display: block; padding: 9px 0; color: var(--text); text-decoration: none; font-size: .92rem; font-weight: 500; }
.related a:hover { color: var(--brand-2); }

/* ---------- Contenido enriquecido (sitio y editor) ---------- */
.contenido { font-size: 1.04rem; line-height: 1.7; color: #26303e; overflow-wrap: anywhere; }
.contenido > :first-child { margin-top: 0; }
.contenido p { margin: 0 0 1em; }
.contenido h2 { font-size: 1.35rem; margin: 1.6em 0 .5em; line-height: 1.3; color: var(--text); }
.contenido h3 { font-size: 1.12rem; margin: 1.4em 0 .4em; color: var(--text); }
.contenido h4 { font-size: 1rem; margin: 1.2em 0 .4em; }
.contenido ul, .contenido ol { margin: 0 0 1em; padding-left: 1.5em; }
.contenido li { margin-bottom: .35em; }
.contenido a { color: var(--brand-2); text-underline-offset: 2px; }
.contenido blockquote { margin: 1.2em 0; padding: 4px 0 4px 18px; border-left: 4px solid var(--brand-2); color: #3b4757; font-style: italic; }
.contenido hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.contenido img { max-width: 100%; height: auto; border-radius: 10px; display: block; margin: 1em 0; }
.contenido img.img-sm { max-width: 320px; }
.contenido img.img-md { max-width: min(560px, 100%); }
.contenido img.img-full { width: 100%; }
.contenido figure { margin: 1.4em 0; }
.contenido figure img { margin: 0 auto; }
.contenido figcaption { text-align: center; font-size: .86rem; color: var(--muted); margin-top: 8px; }
.contenido .video { position: relative; aspect-ratio: 16 / 9; margin: 1.4em 0; border-radius: 12px; overflow: hidden; background: #0b1220; }
.contenido .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.contenido video { width: 100%; max-height: 520px; border-radius: 12px; background: #0b1220; margin: 1.2em 0; display: block; }
.contenido a.file { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: #f7f9fc; text-decoration: none; color: var(--text); font-weight: 600; font-size: .94rem; margin: 2px 0; }
.contenido a.file::before { content: ""; width: 20px; height: 20px; flex: none; background: var(--brand-2); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12M7 10l5 5 5-5M4 21h16'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12M7 10l5 5 5-5M4 21h16'/%3E%3C/svg%3E") center / contain no-repeat; }
.contenido a.file:hover { border-color: var(--brand-2); background: #eef3fd; }
.contenido .nota { border-radius: 12px; padding: 14px 18px; margin: 1.2em 0; background: #f4f7fb; border: 1px solid var(--line); border-left: 4px solid var(--muted); }
.contenido .nota > :last-child { margin-bottom: 0; }
.contenido .nota-info { background: #eff5ff; border-color: #cfe0f7; border-left-color: var(--brand-2); }
.contenido .nota-alerta { background: #fffaeb; border-color: #f5e0a3; border-left-color: #d97706; }
.contenido .nota-ok { background: #f0fdf4; border-color: #bbe5c8; border-left-color: var(--ok); }
.contenido table { border-collapse: collapse; width: 100%; margin: 1.2em 0; font-size: .95rem; display: block; overflow-x: auto; }
.contenido th, .contenido td { border: 1px solid var(--line); padding: 8px 12px; text-transform: none; letter-spacing: 0; font-size: inherit; color: inherit; }
.contenido th { background: #f4f7fb; }
.contenido pre { background: #0f172a; color: #e2e8f0; padding: 14px; border-radius: 10px; overflow-x: auto; font-size: .9rem; }

@media (max-width: 900px) {
  .detail-grid { grid-template-columns: 1fr; }
  .detail-side { position: static; }
}
@media (max-width: 720px) {
  .hero-sm .topbar { flex-wrap: wrap; }
  .search-mini { flex: 1 1 100%; }
  .faq-media { display: none; }
  .article-foot { flex-direction: column; align-items: flex-start; }
}

/* =============================================================
   v2 — Editor visual, modales y biblioteca de medios (admin)
   ============================================================= */
.edit-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.edit-main { display: grid; gap: 14px; min-width: 0; }
.edit-side { display: grid; gap: 16px; position: sticky; top: 16px; }
.edit-side .card { margin: 0; padding: 18px; }
.edit-side h2 { margin: 0; font-size: 1rem; }
.title-input { font-size: 1.35rem !important; font-weight: 700 !important; padding: 14px 16px !important; border-radius: 12px !important; background: #fff; }

.editor { position: relative; background: #fff; border: 1px solid #cfd7e3; border-radius: 12px; }
.editor:focus-within { border-color: var(--brand-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-2) 15%, transparent); }
.editor.drag { border-color: var(--brand-2); border-style: dashed; background: #f5f8ff; }
.ed-toolbar { display: flex; flex-wrap: wrap; gap: 2px; align-items: center; padding: 6px 8px; border-bottom: 1px solid var(--line); background: #f8fafc; border-radius: 12px 12px 0 0; position: sticky; top: 0; z-index: 5; }
.ed-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; min-width: 34px; justify-content: center; padding: 0 7px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #334155; cursor: pointer; font: inherit; font-size: .84rem; font-weight: 600; }
.ed-btn:hover { background: #eaf0f8; }
.ed-btn.on { background: #dfe8fa; color: var(--brand-2); border-color: #c5d6f5; }
.ed-btn-label { padding: 0 10px 0 8px; }
.ed-block { width: auto !important; padding: 6px 8px !important; height: 34px; font-size: .86rem !important; border-radius: 8px !important; margin-right: 2px; }
.ed-sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.ed-area { min-height: 380px; max-height: 70vh; overflow-y: auto; padding: 22px 26px; outline: none; }
.ed-area:empty::before, .ed-area > p:only-child:has(> br:only-child)::before { content: attr(data-placeholder); color: #94a3b8; pointer-events: none; position: absolute; }
.ed-area img { cursor: pointer; }
.ed-area .video iframe { pointer-events: none; }
.ed-area .video, .ed-area video, .ed-area a.file { cursor: pointer; }
.ed-area .ed-selected { outline: 3px solid var(--brand-2); outline-offset: 2px; }
.ed-area table td, .ed-area table th { min-width: 60px; }
.ed-source { display: block; width: 100%; min-height: 380px; border: 0 !important; border-radius: 0 !important; font: 13px/1.6 ui-monospace, Consolas, monospace !important; padding: 18px !important; background: #0f172a !important; color: #e2e8f0 !important; resize: vertical; }
.ed-status { display: flex; justify-content: space-between; gap: 12px; padding: 6px 12px; border-top: 1px solid var(--line); font-size: .78rem; color: var(--muted); background: #f8fafc; border-radius: 0 0 12px 12px; }
.editor.ed-full { position: fixed; inset: 0; z-index: 90; border-radius: 0; display: flex; flex-direction: column; }
.editor.ed-full .ed-area { flex: 1; max-height: none; max-width: 860px; width: 100%; margin: 0 auto; }
.editor.ed-full .ed-source { flex: 1; }
body.no-scroll { overflow: hidden; }
.ed-pop { position: absolute; z-index: 20; display: flex; gap: 2px; align-items: center; background: #111827; border-radius: 10px; padding: 4px; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.ed-pop button { background: none; border: 0; color: #e5e7eb; font: inherit; font-size: .8rem; font-weight: 600; padding: 6px 10px; border-radius: 7px; cursor: pointer; }
.ed-pop button:hover { background: rgba(255,255,255,.12); }
.ed-pop button.on { background: var(--brand-2); color: #fff; }
.ed-pop button.danger { color: #fca5a5; }
.ed-pop .ed-sep { background: rgba(255,255,255,.2); }

.modal { border: 0; border-radius: 16px; padding: 0; width: min(520px, calc(100% - 24px)); box-shadow: 0 25px 70px rgba(0,0,0,.3); color: var(--text); }
.modal.modal-wide { width: min(760px, calc(100% - 24px)); }
.modal::backdrop { background: rgba(15, 23, 42, .5); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; font-size: 1.1rem; }
.modal-body { padding: 18px 20px; max-height: 65vh; overflow-y: auto; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line); background: #f8fafc; }
.modal-err { color: var(--danger); font-size: .88rem; margin-right: auto; font-weight: 600; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.tabs button { border: 0; background: none; font: inherit; font-weight: 600; font-size: .9rem; color: var(--muted); padding: 8px 14px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--brand-2); border-bottom-color: var(--brand-2); }
.dropzone { display: grid; place-items: center; gap: 6px; text-align: center; padding: 30px 16px; border: 2px dashed #c8d3e3; border-radius: 12px; cursor: pointer; color: var(--brand-2); background: #fafcff; transition: .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--brand-2); background: #eef3fd; }
.dropzone strong { color: var(--text); }
.dropzone.busy { pointer-events: none; opacity: .8; }
.progress { width: 100%; max-width: 320px; height: 8px; background: #e2e8f0; border-radius: 99px; overflow: hidden; margin-top: 6px; }
.progress i { display: block; height: 100%; width: 0; background: var(--brand-2); transition: width .2s; }
.img-prev { margin-top: 14px; text-align: center; background: #f1f5f9; border-radius: 10px; padding: 10px; }
.img-prev img { max-height: 200px; max-width: 100%; border-radius: 8px; }
.vid-prev { display: grid; gap: 8px; justify-items: start; }
.vid-prev img { width: 240px; border-radius: 8px; }
.lib-q { margin-bottom: 10px; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; max-height: 320px; overflow-y: auto; }
.lib-item { border: 2px solid var(--line); border-radius: 10px; background: #fff; padding: 0; cursor: pointer; overflow: hidden; text-align: left; font: inherit; display: flex; flex-direction: column; }
.lib-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: #f1f5f9; }
.lib-item .lib-ext { display: grid; place-items: center; aspect-ratio: 4 / 3; background: #eef3fd; color: var(--brand-2); font-weight: 800; }
.lib-item .lib-name { font-size: .74rem; padding: 5px 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.lib-item.sel { border-color: var(--brand-2); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand-2) 30%, transparent); }
.note-pick { display: grid; gap: 8px; }
.note-pick label { display: flex; gap: 10px; align-items: center; cursor: pointer; }
.nota-demo { flex: 1; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line); border-left: 4px solid; font-weight: 600; font-size: .9rem; }
.nota-demo.nota-info { background: #eff5ff; border-left-color: var(--brand-2); }
.nota-demo.nota-alerta { background: #fffaeb; border-left-color: #d97706; }
.nota-demo.nota-ok { background: #f0fdf4; border-left-color: var(--ok); }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.media-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.media-thumb { display: block; aspect-ratio: 16 / 10; background: #f1f5f9; overflow: hidden; text-decoration: none; }
.media-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-ico { width: 100%; height: 100%; display: grid; place-items: center; align-content: center; gap: 4px; color: var(--brand-2); }
.media-info { padding: 10px 12px; display: grid; gap: 3px; min-width: 0; }
.media-info .cell-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-actions { display: flex; justify-content: space-between; gap: 6px; padding: 0 12px 12px; margin-top: auto; }

@media (max-width: 1100px) {
  .edit-layout { grid-template-columns: 1fr; }
  .edit-side { position: static; }
}
@media (max-width: 720px) {
  .ed-btn-label span { display: none; }
  .ed-area { padding: 16px; min-height: 300px; }
}

/* =============================================================
   v3 — Plantilla pública: buscador en modal, áreas, CTA
   ============================================================= */
.topbar .btn-white { flex: none; }
.btn-white { background: #fff; color: var(--brand); border-color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.12); white-space: nowrap; }
.btn-white:hover { background: #f1f5ff; border-color: #f1f5ff; color: var(--brand-2); }
.topbar { gap: 16px; }
.topbar .brand-logo { flex: none; }

/* Portada: contenido centrado */
.hero-home { padding-bottom: 96px; }
.hero-center { text-align: center; max-width: 760px; margin: 0 auto; }
.hero-center h1 { margin-top: 44px; }
.hero-center .lead { margin-left: auto; margin-right: auto; }

/* Barra que abre el buscador */
.search-trigger { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; cursor: text; font: inherit; text-align: left; background: #fff; color: var(--muted); border-radius: 14px; transition: box-shadow .15s, transform .15s; }
.search-trigger svg { flex: none; color: var(--brand-2); }
.search-trigger span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-trigger kbd, .sm-foot kbd { font: 600 .72rem/1 var(--font); color: var(--muted); background: #f1f5f9; border: 1px solid #dbe2ec; border-bottom-width: 2px; border-radius: 6px; padding: 4px 6px; }
.search-trigger-lg { max-width: 680px; margin: 0 auto; padding: 18px 18px 18px 20px; font-size: 1.05rem; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.search-trigger-lg:hover { box-shadow: 0 14px 36px rgba(0,0,0,.24); transform: translateY(-1px); }
.search-trigger-sm { flex: 1 1 0; min-width: 0; max-width: 440px; margin-left: auto; padding: 10px 12px; font-size: .92rem; border-radius: 10px; }
.search-trigger:focus-visible { outline: 3px solid rgba(255,255,255,.6); outline-offset: 2px; }

/* Tarjetas de área como enlaces */
a.area-card { text-decoration: none; }
.area-card em { display: inline-flex !important; align-items: center; gap: 4px; }
.area-card:hover em svg { transform: translateX(3px); }
.area-card em svg { transition: transform .15s; }
.areas-flat { margin-top: 0; }

.home-section { margin: 40px 0 10px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.section-head h2 { margin: 0; font-size: 1.25rem; display: flex; align-items: center; gap: 10px; line-height: 1.25; }
.section-head h2 svg { flex: none; }
.section-head h2 svg { color: var(--brand-2); }
.faq-area { display: block; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: var(--c); margin-bottom: 2px; }

/* Encabezado de área y de páginas internas */
.hero-area, .hero-page { padding-bottom: 34px; }
.area-hero { display: flex; gap: 20px; align-items: center; margin-top: 34px; }
.area-hero-ico { flex: none; width: 72px; height: 72px; border-radius: 18px; background: #fff; color: var(--c); display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.area-hero h1, .page-hero h1 { margin: 4px 0 4px; font-size: clamp(1.7rem, 3.4vw, 2.4rem); line-height: 1.15; }
.area-hero .lead, .page-hero .lead { margin: 0; opacity: .85; }
.page-hero { margin-top: 34px; max-width: 760px; }
.breadcrumb-light { margin: 0; }
.breadcrumb-light, .breadcrumb-light a { color: rgba(255,255,255,.75); }
.breadcrumb-light a:hover { color: #fff; }
.page-body { padding-top: 26px; }

.area-toolbar { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.filter-box { position: relative; flex: 1; }
.filter-box svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.filter-box input { padding-left: 42px; border-radius: 12px; background: #fff; }
.side-areas { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.side-areas a { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; text-decoration: none; color: var(--text); font-weight: 600; font-size: .93rem; }
.side-areas a:hover { background: #f4f7fb; }
.side-areas small { margin-left: auto; color: var(--muted); font-weight: 600; }
.side-ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 11%, #fff); }

/* Franja "¿No encontraste tu respuesta?" */
.cta-band { display: flex; align-items: center; gap: 18px; margin: 44px 0 10px; padding: 22px 26px; border-radius: var(--radius); background: linear-gradient(135deg, #eef3fd, #fff); border: 1px solid #d6e1f5; }
.cta-ico { flex: none; width: 54px; height: 54px; border-radius: 14px; background: var(--brand-2); color: #fff; display: grid; place-items: center; }
.cta-txt { flex: 1; }
.cta-txt strong { display: block; font-size: 1.12rem; }
.cta-txt span { color: var(--muted); }
.site-footer a { color: var(--muted); }

/* Página "Enviar pregunta" */
.ask-card { padding: clamp(20px, 4vw, 34px); margin: 0; }
.ask-ok { text-align: center; padding: 20px 0; }
.ok-ico { width: 72px; height: 72px; border-radius: 50%; background: #dcfce7; color: var(--ok); display: grid; place-items: center; margin: 0 auto 14px; }
.ask-ok h2 { margin: 0 0 6px; }
.steps-list { margin: 0; padding-left: 20px; font-size: .9rem; color: #3b4757; }
.steps-list li { margin-bottom: 10px; }

/* ---------- Modal de búsqueda ---------- */
.search-modal { border: 0; padding: 0; width: min(680px, calc(100% - 24px)); max-height: min(78vh, 720px); margin: 8vh auto auto; border-radius: 16px; box-shadow: 0 30px 80px rgba(0,0,0,.35); display: none; flex-direction: column; overflow: hidden; color: var(--text); }
.search-modal[open] { display: flex; animation: smIn .16s ease-out; }
.search-modal::backdrop { background: rgba(10, 20, 45, .55); backdrop-filter: blur(3px); }
@keyframes smIn { from { opacity: 0; transform: translateY(-8px) scale(.98); } }
.sm-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.sm-head > svg { color: var(--brand-2); flex: none; }
.sm-head input { border: 0 !important; padding: 6px 0 !important; font-size: 1.15rem !important; box-shadow: none !important; outline: none; background: transparent !important; }
.sm-head input::-webkit-search-cancel-button { display: none; }
.sm-close { flex: none; border: 1px solid #dbe2ec; background: #f8fafc; color: var(--muted); border-radius: 7px; font: 600 .75rem var(--font); padding: 5px 8px; cursor: pointer; }
.sm-body { overflow-y: auto; padding: 8px; flex: 1; overscroll-behavior: contain; }
.sm-sec { font-size: .72rem; font-weight: 800; letter-spacing: .7px; text-transform: uppercase; color: var(--muted); padding: 10px 10px 6px; }
.sm-item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; text-decoration: none; color: var(--text); scroll-margin: 8px; }
.sm-item.active { background: #eef3fd; }
.sm-item.active > svg { color: var(--brand-2); }
.sm-item > svg { flex: none; color: #cbd5e1; }
.sm-ico { flex: none; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 11%, #fff); }
.sm-txt { flex: 1; min-width: 0; }
.sm-txt strong { display: block; font-size: .96rem; }
.sm-txt span { display: block; color: var(--muted); font-size: .84rem; margin-top: 2px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sm-area { flex: none; font-size: .72rem; font-weight: 700; color: var(--c); background: color-mix(in srgb, var(--c) 10%, #fff); border-radius: 999px; padding: 3px 9px; }
.sm-areas { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 10px 8px; }
.sm-areas a { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--text); font-weight: 600; font-size: .88rem; }
.sm-areas a:hover { border-color: var(--c); background: color-mix(in srgb, var(--c) 7%, #fff); }
.sm-areas i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.sm-areas small { color: var(--muted); }
.sm-empty { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 34px 16px; color: var(--muted); }
.sm-empty strong { color: var(--text); }
.sm-spin { display: inline-block; width: 16px; height: 16px; border: 2px solid #cbd5e1; border-top-color: var(--brand-2); border-radius: 50%; animation: spin .7s linear infinite; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.sm-foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--line); background: #f8fafc; font-size: .78rem; color: var(--muted); }
.sm-foot kbd { margin-right: 3px; }

@media (max-width: 900px) {
  .search-trigger-sm { order: 3; flex: 1 1 100%; margin-left: 0; }
  .hero-page .topbar, .hero-area .topbar { flex-wrap: wrap; }
  .hero-page .btn-white, .hero-area .btn-white { margin-left: auto; }
}
@media (max-width: 720px) {
  .btn-white span { display: none; }
  .btn-white { padding: 9px; }
  .search-trigger kbd, .sm-foot { display: none; }
  .search-trigger-lg { padding: 15px 16px; font-size: .98rem; }
  .hero-center h1 { margin-top: 30px; }
  .area-hero { gap: 14px; margin-top: 24px; }
  .area-hero-ico { width: 56px; height: 56px; border-radius: 14px; }
  .cta-band { flex-direction: column; text-align: center; }
  .search-modal { margin-top: 12px; max-height: calc(100vh - 24px); }
  .sm-area { display: none; }
  .area-toolbar { flex-direction: column; align-items: stretch; }
}

/* ---------- Panel de seguridad ---------- */
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.checklist li { display: flex; gap: 12px; padding: 12px 6px; border-bottom: 1px solid var(--line); }
.checklist li:last-child { border: 0; }
.checklist strong { display: block; font-size: .95rem; }
.checklist span:not(.chk-dot) { color: var(--muted); font-size: .86rem; }
.chk-dot { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .85rem; color: #fff; }
.chk-ok .chk-dot { background: var(--ok); }
.chk-warn .chk-dot { background: #d97706; }
.chk-bad .chk-dot { background: var(--danger); }

/* ---------- Campos de contraseña (mostrar / copiar) ---------- */
.pass-wrap { position: relative; display: block; flex: 1; min-width: 0; }
.pass-wrap input { padding-right: 46px !important; }
.pass-wrap.has-copy input { padding-right: 84px !important; }
.pass-btn { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); width: 34px; height: 34px; display: grid; place-items: center; border: 0; background: transparent; color: var(--muted); border-radius: 8px; cursor: pointer; }
.pass-btn:hover { background: #eef2f8; color: var(--brand-2); }
.pass-btn[aria-pressed="true"] { color: var(--brand-2); }
.pass-btn.pass-copy { right: 42px; }
.pass-btn.pass-copy.ok { color: var(--ok); }
.pass-req { list-style: none; margin: 6px 0 0; padding: 0; display: flex; gap: 14px; flex-wrap: wrap; font-size: .8rem; font-weight: 500; color: var(--muted); }
.pass-req li::before { content: "○ "; }
.pass-req li.ok { color: var(--ok); }
.pass-req li.ok::before { content: "✓ "; }

/* ---------- Subida en Medios y selector de biblioteca ---------- */
.upload-card { padding: 16px; }
.dropzone-lg { padding: 34px 16px; }
.upload-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; }
.upload-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto 160px 170px; gap: 12px; align-items: center; font-size: .86rem; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fafcff; }
.upload-list .up-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.upload-list .up-size { color: var(--muted); }
.upload-list .up-bar { height: 6px; background: #e2e8f0; border-radius: 99px; overflow: hidden; }
.upload-list .up-bar i { display: block; height: 100%; width: 0; background: var(--brand-2); transition: width .2s; }
.upload-list .up-est { color: var(--muted); font-weight: 600; text-align: right; }
.upload-list li.ok .up-est { color: var(--ok); }
.upload-list li.ok .up-bar i { background: var(--ok); }
.upload-list li.err { border-color: #f3c4c4; background: #fef6f6; }
.upload-list li.err .up-est { color: var(--danger); grid-column: 3 / -1; text-align: left; }
.upload-list li.err .up-bar { display: none; }
.upload-list li.up-done { display: flex; justify-content: space-between; background: #f0fdf4; border-color: #bbe5c8; color: #14532d; font-weight: 600; }

.lib-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.lib-bar .lib-q { flex: 1; min-width: 200px; margin: 0; }
.lib-tipos { display: flex; gap: 4px; }
.lib-tipos button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: .82rem; font-weight: 600; color: var(--muted); cursor: pointer; }
.lib-tipos button.on { background: var(--brand-2); border-color: var(--brand-2); color: #fff; }
.lib-grid { max-height: 300px; }
.lib-item .lib-ext { display: grid; place-items: center; align-content: center; gap: 4px; aspect-ratio: 4 / 3; background: #eef3fd; color: var(--brand-2); font-weight: 800; }
.lib-item .lib-ext.video { background: #111827; color: #e5e7eb; }
.lib-item .lib-meta { font-size: .7rem; color: #94a3b8; padding: 0 7px 6px; }
.media-opts { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.opts-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.opts-head img, .opts-head .lib-ext { width: 72px; height: 54px; object-fit: cover; border-radius: 8px; flex: none; display: grid; place-items: center; background: #eef3fd; color: var(--brand-2); }
.opts-head .lib-ext.video { background: #111827; color: #e5e7eb; }
.opts-head strong { display: block; word-break: break-all; }
@media (max-width: 720px) {
  .upload-list li { grid-template-columns: 1fr auto; }
  .upload-list .up-bar { grid-column: 1 / -1; }
}
