/* ═══════════════════ Tokens (claro) ═══════════════════ */
:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-2: #f2f3f5;
  --surface-3: #e9ebee;
  --text: #0f1419;
  --text-2: #3d4753;
  --muted: #6b7684;
  --border: #e3e6ea;
  --border-strong: #cfd4da;
  --primary: #0f6b66;
  --primary-hover: #0b5753;
  --primary-soft: #e6f3f2;
  --on-primary: #ffffff;
  --strong: #0f1419;
  --on-strong: #ffffff;
  --heart: #e0245e;
  --star: #f2a516;
  --star-empty: #d5dae0;
  --danger: #c4321c;
  --danger-soft: #fdeceb;
  --warn: #9a5b00;
  --warn-soft: #fff4e2;
  --success: #12795a;
  --success-soft: #e5f5ee;
  --shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-lg: 0 16px 40px rgba(16, 24, 40, .16);
  --glass: rgba(255, 255, 255, .86);
  --radius: 14px;
  --radius-sm: 10px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --side-w: 248px;
  color-scheme: light;
}

/* ═══════════════════ Tokens (oscuro) ═══════════════════ */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0f14; --surface: #12171e; --surface-2: #1a2028; --surface-3: #232b35;
    --text: #e8edf2; --text-2: #b9c3ce; --muted: #8893a1; --border: #242c36; --border-strong: #34404d;
    --primary: #2fb5a8; --primary-hover: #46c7ba; --primary-soft: rgba(47, 181, 168, .14); --on-primary: #06201e;
    --strong: #e8edf2; --on-strong: #0b0f14; --heart: #ff4d7d; --star-empty: #3a4450;
    --danger: #ff7a66; --danger-soft: rgba(255, 122, 102, .13); --warn: #f5b74e; --warn-soft: rgba(245, 183, 78, .13);
    --success: #4fd1a0; --success-soft: rgba(79, 209, 160, .13);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4); --shadow-lg: 0 16px 40px rgba(0, 0, 0, .55);
    --glass: rgba(11, 15, 20, .86); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0f14; --surface: #12171e; --surface-2: #1a2028; --surface-3: #232b35;
  --text: #e8edf2; --text-2: #b9c3ce; --muted: #8893a1; --border: #242c36; --border-strong: #34404d;
  --primary: #2fb5a8; --primary-hover: #46c7ba; --primary-soft: rgba(47, 181, 168, .14); --on-primary: #06201e;
  --strong: #e8edf2; --on-strong: #0b0f14; --heart: #ff4d7d; --star-empty: #3a4450;
  --danger: #ff7a66; --danger-soft: rgba(255, 122, 102, .13); --warn: #f5b74e; --warn-soft: rgba(245, 183, 78, .13);
  --success: #4fd1a0; --success-soft: rgba(79, 209, 160, .13);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4); --shadow-lg: 0 16px 40px rgba(0, 0, 0, .55);
  --glass: rgba(11, 15, 20, .86); color-scheme: dark;
}

/* ═══════════════════ Base ═══════════════════ */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.5; -webkit-font-smoothing: antialiased; transition: background-color .2s, color .2s; overflow-x: hidden; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.015em; }
p { margin: 0 0 1em; }
img, svg { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.ic { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 100; border-radius: 8px; }
.skip:focus { left: 8px; }
#app { outline: none; min-height: 80vh; }
.container { width: 100%; max-width: 1000px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.page { padding: 32px 0 48px; }
.page-head { margin-bottom: 24px; }
.page-head h1 { font-size: clamp(1.5rem, 3vw, 2rem); }
.page-head p { color: var(--text-2); max-width: 680px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.card-pad { padding: 20px; }
.card h3 { font-size: 1rem; }

/* ═══════════════════ Shell / navegación ═══════════════════ */
.shell { margin-left: var(--side-w); min-height: 100vh; display: flex; flex-direction: column; }
.shell > main { flex: 1; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-size: 1.12rem; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand-text { font-weight: 600; }
.brand-text strong { color: var(--primary); font-weight: 800; }
.brand-mark { width: 32px; height: 32px; }

.sidenav { position: fixed; inset: 0 auto 0 0; width: var(--side-w); background: var(--surface); border-right: 1px solid var(--border); padding: 22px 12px 16px; display: flex; flex-direction: column; z-index: 40; }
.sidenav .brand { padding: 4px 12px 26px; }
.sidenav-links { display: grid; gap: 2px; }
.sidenav-links a, .sidenav-bottom button { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 10px; color: var(--text); font-size: .98rem; font-weight: 500; border: 0; background: none; cursor: pointer; text-align: left; width: 100%; transition: background .15s; }
.sidenav-links a:hover, .sidenav-bottom button:hover { background: var(--surface-2); text-decoration: none; }
.sidenav-links .ic { transition: transform .15s; }
.sidenav-links a:hover .ic { transform: scale(1.06); }
.sidenav-links a.active { font-weight: 800; }
.sidenav-links a.active .ic { stroke-width: 2.6; }
.sidenav-bottom { margin-top: auto; display: grid; gap: 6px; }
.sidenav-legal { padding: 6px 12px 0; font-size: .74rem; color: var(--muted); line-height: 1.6; }
.sidenav-legal a { color: var(--muted); }
.sidenav-legal a[href^="mailto"] { display: block; }
.sidenav-legal p { margin: 6px 0 0; }

.topbar { display: none; }
.bottom-nav { display: none; }
.icon-btn { border: 0; background: transparent; width: 40px; height: 40px; border-radius: 10px; color: var(--text); cursor: pointer; display: inline-grid; place-items: center; }
.icon-btn:hover { background: var(--surface-2); text-decoration: none; }

.footer { border-top: 1px solid var(--border); padding: 24px 16px 32px; font-size: .78rem; color: var(--muted); max-width: 1000px; margin: 24px auto 0; width: 100%; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 12px; }
.footer-links a { color: var(--text-2); font-size: .82rem; }
.footer p { margin: 0 0 8px; line-height: 1.6; }
.footer .copy { margin-top: 10px; }

/* ═══════════════════ Botones / formularios básicos ═══════════════════ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 10px; padding: 10px 18px; font-weight: 600; font-size: .94rem; cursor: pointer; transition: background .15s, border-color .15s, transform .05s; text-decoration: none !important; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-outline { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn-outline:hover { background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-soft { background: var(--surface-2); color: var(--text); }
.btn-soft:hover { background: var(--surface-3); }
.btn-sm { padding: 7px 14px; font-size: .86rem; }
.btn-lg { padding: 13px 24px; font-size: 1rem; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }
.input, .select, .textarea { width: 100%; border: 1px solid var(--border); background: var(--surface); border-radius: 10px; padding: 11px 13px; font-size: .97rem; transition: border-color .15s, box-shadow .15s; }
.input::placeholder, .textarea::placeholder { color: var(--muted); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.search-field { position: relative; }
.search-field .ic { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 18px; height: 18px; pointer-events: none; }
.search-field .input { padding-left: 40px; background: var(--surface-2); border-color: transparent; }
.search-field .input:focus { background: var(--surface); }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); white-space: nowrap; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); padding: 6px 14px; border-radius: 999px; font-size: .85rem; font-weight: 600; cursor: pointer; transition: .15s; }
.chip:hover { border-color: var(--border-strong); }
.chip.active { background: var(--strong); border-color: var(--strong); color: var(--on-strong); }

/* ═══════════════════ Estrellas ═══════════════════ */
.stars { position: relative; display: inline-block; font-size: .95rem; line-height: 1; letter-spacing: 1px; color: var(--star-empty); }
.stars::before { content: "★★★★★"; }
.stars i { position: absolute; inset: 0 auto 0 0; overflow: hidden; color: var(--star); white-space: nowrap; font-style: normal; }
.stars i::before { content: "★★★★★"; }
.stars-lg { font-size: 1.3rem; }

/* ═══════════════════ Feed ═══════════════════ */
.feed-layout { display: grid; grid-template-columns: minmax(0, 620px) 300px; gap: 32px; justify-content: center; padding: 24px 16px 40px; }
.feed-layout.single { grid-template-columns: minmax(0, 620px); }
.feed-main { min-width: 0; }
.feed-aside { position: sticky; top: 24px; align-self: start; display: grid; gap: 16px; }

.welcome { padding: 20px; margin-bottom: 14px; position: relative; background: linear-gradient(140deg, var(--primary-soft), transparent 70%), var(--surface); }
.welcome h2 { font-size: 1.12rem; padding-right: 30px; }
.welcome p { color: var(--text-2); font-size: .92rem; margin-bottom: 12px; }
.welcome .close { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; }
.welcome .close .ic { width: 18px; height: 18px; }
.trust { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .8rem; color: var(--text-2); margin-bottom: 14px; }
.trust span { display: inline-flex; align-items: center; gap: 6px; }
.trust .ic { width: 16px; height: 16px; color: var(--success); }
.ic-sm { width: 16px; height: 16px; }

.composer { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 14px; color: var(--muted); transition: border-color .15s; }
.composer:hover { text-decoration: none; border-color: var(--border-strong); }
.composer-input { flex: 1; background: var(--surface-2); border-radius: 999px; padding: 10px 16px; font-size: .94rem; }

.feed-filters { position: sticky; top: 0; z-index: 15; background: var(--glass); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px); margin: 0 -16px 12px; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.feed-tabs { display: flex; gap: 22px; margin-bottom: 10px; }
.feed-tabs button { background: none; border: 0; padding: 4px 0; font-weight: 700; font-size: .95rem; color: var(--muted); cursor: pointer; position: relative; }
.feed-tabs button.active { color: var(--text); }
.feed-tabs button.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 2px; border-radius: 2px; background: var(--primary); }
.active-filter { display: flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--text-2); margin: 0 0 12px; }

/* Avatares */
.logo { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; color: #fff; font-size: .8rem; letter-spacing: .02em; }
.logo-xl { width: 72px; height: 72px; border-radius: 18px; font-size: 1.5rem; }
.anon { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--c, var(--primary)); background: color-mix(in srgb, var(--c, var(--primary)) 16%, var(--surface)); border: 1.5px solid color-mix(in srgb, var(--c, var(--primary)) 35%, transparent); }
.anon .ic { width: 20px; height: 20px; }

/* Tarjeta de publicación */
.feed { display: flex; flex-direction: column; gap: 14px; }
.pc { position: relative; padding: 16px 18px 6px 22px; animation: rise .35s ease both; transition: border-color .15s, box-shadow .15s; }
.pc:has(.menu.open) { z-index: 25; }
.pc:hover { border-color: var(--border-strong); }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.pc-accent { position: absolute; left: -1px; top: -1px; bottom: -1px; width: 6px; border-radius: var(--radius) 0 0 var(--radius); }
.pc-head { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.pc-who { flex: 1; min-width: 0; line-height: 1.3; }
.pc-alias { font-weight: 700; font-size: .95rem; }
.pc-who small { display: block; color: var(--muted); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-who small a { color: var(--text-2); font-weight: 600; }
.pc-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.cat-chip { display: inline-flex; align-items: center; gap: 7px; font-size: .76rem; font-weight: 700; color: var(--text-2); background: var(--surface-2); padding: 4px 10px 4px 8px; border-radius: 999px; }
.cat-chip i { width: 10px; height: 10px; border-radius: 50%; display: block; }
.pc-rating { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; }
.rec { font-size: .74rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.rec.yes { color: var(--success); background: var(--success-soft); }
.rec.no { color: var(--danger); background: var(--danger-soft); }
.pc-title { font-size: 1.16rem; line-height: 1.3; margin: 0 0 6px; }
.pc-title a { color: var(--text); }
.pc-full .pc-title { font-size: 1.45rem; }
.pc-text { color: var(--text-2); white-space: pre-line; word-wrap: break-word; margin: 0 0 6px; font-size: .97rem; line-height: 1.6; }
.pc-full .pc-text { color: var(--text); font-size: 1.02rem; }
.pc-text.clamp { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.pc-more { background: none; border: 0; padding: 0; color: var(--primary); font-weight: 600; cursor: pointer; font-size: .9rem; margin-bottom: 6px; }
.pc-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .78rem; color: var(--muted); margin: 4px 0 2px; }
.pc-meta span { display: inline-flex; align-items: center; gap: 5px; }
.pc-meta .ic { width: 14px; height: 14px; }
.pc-foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; border-top: 1px solid var(--border); margin: 12px -18px 0 -22px; padding: 8px 14px 4px 18px; }
.pc-foot .spacer { flex: 1; }
.pc-preview { pointer-events: none; }
.pill { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px; border: 0; background: transparent; color: var(--text-2); font-size: .84rem; font-weight: 600; cursor: pointer; transition: background .15s, color .15s; text-decoration: none !important; }
.pill:hover { background: var(--surface-2); color: var(--text); }
.pill .ic { width: 18px; height: 18px; }
.pill .lbl { font-weight: 500; }
.pill-icon { width: 34px; padding: 0; justify-content: center; }
.pill.on[data-type="apoyo"] { color: var(--heart); background: color-mix(in srgb, var(--heart) 10%, transparent); }
.pill.on[data-type="apoyo"] .ic { fill: currentColor; }
.pill.on[data-type="identifico"] { color: #7c6cff; background: color-mix(in srgb, #7c6cff 12%, transparent); }
.pill.on[data-type="identifico"] .ic { fill: currentColor; fill-opacity: .25; }
.pill.on[data-type="util"] { color: var(--star); background: color-mix(in srgb, var(--star) 12%, transparent); }
.pill.on[data-type="util"] .ic { fill: currentColor; fill-opacity: .3; }
.pill.saved, .ract.saved { color: var(--primary); }
.pill.saved .ic, .ract.saved .ic { fill: currentColor; }
.pop .ic { animation: pop .35s ease; }
@keyframes pop { 40% { transform: scale(1.3); } 100% { transform: scale(1); } }

.g-ambiente  { background: linear-gradient(150deg, #0f6b66, #123a5c); }
.g-liderazgo { background: linear-gradient(150deg, #3b3f9e, #1b2350); }
.g-salario   { background: linear-gradient(150deg, #1f8a4c, #0f4a3b); }
.g-acoso     { background: linear-gradient(150deg, #a3233a, #4a1030); }
.g-discrim   { background: linear-gradient(150deg, #7a3e9d, #321a52); }
.g-horarios  { background: linear-gradient(150deg, #d9691e, #8a2e12); }
.g-despidos  { background: linear-gradient(150deg, #4b5a6e, #1c2430); }
.g-seguridad { background: linear-gradient(150deg, #c08a12, #6b3d0a); }
.g-positiva  { background: linear-gradient(150deg, #16a37f, #0d6a8c); }
.g-otro      { background: linear-gradient(150deg, #475467, #1d2939); }

/* Menú contextual "..." */
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: 100%; z-index: 30; min-width: 230px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; display: none; }
.menu.open { display: block; animation: fade .15s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(-4px); } }
.menu button, .menu a { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; background: none; border-radius: 8px; color: var(--text); font-size: .9rem; cursor: pointer; text-align: left; }
.menu button:hover, .menu a:hover { background: var(--surface-2); text-decoration: none; }
.menu .danger { color: var(--danger); font-weight: 600; }
.menu .ic { width: 18px; height: 18px; }

/* Estado del feed / skeleton */
.feed-status { text-align: center; color: var(--muted); padding: 16px 0 32px; font-size: .9rem; }
.feed-end { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 0 20px; }
.tick { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 8px; background: var(--primary); color: #fff; }
.tick .ic { stroke-width: 3; }
.feed-end strong { color: var(--text); font-size: 1rem; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; margin: 0 auto 8px; }
@keyframes spin { to { transform: rotate(360deg); } }
.sk { background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface-3) 50%, var(--surface-2) 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 6px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.sk-card { padding: 18px; }
.sk-head { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; }
.sk-av { width: 40px; height: 40px; border-radius: 50%; }
.sk-line { height: 12px; width: 40%; }
.empty { text-align: center; padding: 48px 20px; }
.empty .ic { width: 52px; height: 52px; margin: 0 auto 12px; color: var(--muted); stroke-width: 1.4; }
.empty p { color: var(--muted); }
.to-top { position: fixed; right: 24px; bottom: 24px; z-index: 40; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); cursor: pointer; display: grid; place-items: center; opacity: 0; pointer-events: none; transform: translateY(10px); transition: .2s; }
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }
.reels-mode .to-top { display: none; }

/* Panel lateral del feed */
.aside-title { display: flex; justify-content: space-between; align-items: baseline; font-size: .86rem; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.aside-title a { font-size: .8rem; }
.suggest { list-style: none; margin: 0; padding: 0; }
.suggest li { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.suggest .logo { width: 40px; height: 40px; }
.suggest div { flex: 1; min-width: 0; line-height: 1.3; }
.suggest a.name { color: var(--text); font-weight: 700; font-size: .9rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggest small { color: var(--muted); font-size: .78rem; }
.suggest .see { font-size: .8rem; font-weight: 700; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; gap: 8px; padding: 16px; }
.stat-row strong { display: block; font-size: 1.2rem; font-weight: 800; }
.stat-row span { color: var(--muted); font-size: .74rem; }
.reels-promo { display: flex; align-items: center; gap: 14px; padding: 16px; color: #fff; border: 0; background: linear-gradient(135deg, #12263f, #0f6b66 60%, #2fb5a8); }
.reels-promo:hover { text-decoration: none; filter: brightness(1.06); }
.reels-promo-ic { width: 44px; height: 44px; border-radius: 12px; background: rgba(255,255,255,.16); display: grid; place-items: center; flex: 0 0 auto; }
.reels-promo strong { display: block; }
.reels-promo small { color: rgba(255,255,255,.82); font-size: .82rem; line-height: 1.4; display: block; }
.aside-legal { font-size: .74rem; color: var(--muted); line-height: 1.6; margin: 0; }
.aside-legal a { color: var(--muted); }

/* ═══════════════════ Reels ═══════════════════ */
.reels-mode .footer { display: none; }
.reels-wrap { position: relative; height: 100vh; height: 100dvh; display: flex; justify-content: center; background: var(--bg); }
.reels { height: 100%; width: 100%; max-width: 480px; overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior: contain; scrollbar-width: none; outline: none; }
.reels::-webkit-scrollbar { display: none; }
.reel-slot { height: 100%; scroll-snap-align: start; scroll-snap-stop: always; padding: 16px 0; }
.reel { position: relative; height: 100%; border-radius: 20px; overflow: hidden; color: #fff; isolation: isolate; box-shadow: var(--shadow-lg); }
.reel::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(120% 70% at 100% 0%, rgba(255,255,255,.16), transparent 55%), linear-gradient(to top, rgba(0,0,0,.55), transparent 38%); }
.reel-inner { position: absolute; inset: 0 76px 120px 0; padding: 72px 24px 0 26px; display: flex; flex-direction: column; justify-content: center; user-select: none; -webkit-user-select: none; cursor: default; }
.reel-cat { align-self: flex-start; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; background: rgba(255,255,255,.16); padding: 5px 11px; border-radius: 999px; margin-bottom: 16px; }
.reel h2 { font-size: 1.9rem; line-height: 1.18; font-weight: 800; margin: 0 0 14px; letter-spacing: -.02em; text-wrap: balance; }
.reel h2.m { font-size: 1.6rem; }
.reel h2.l { font-size: 1.32rem; }
.reel-text { font-size: 1.02rem; line-height: 1.6; opacity: .92; margin: 0; white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 9; -webkit-box-orient: vertical; overflow: hidden; }
.reel-rating { display: flex; align-items: center; gap: 8px; margin-top: 16px; font-size: .86rem; font-weight: 600; }
.reel-rating .stars { color: rgba(255,255,255,.3); }
.reel-rating .stars i { color: #ffd166; }
.reel-read { color: #fff; font-weight: 700; margin-top: 14px; text-decoration: underline; text-underline-offset: 3px; }
.reel-side { position: absolute; right: 10px; bottom: 110px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.ract { display: flex; flex-direction: column; align-items: center; gap: 3px; background: none; border: 0; color: #fff; cursor: pointer; font-size: .74rem; font-weight: 700; padding: 0; text-decoration: none !important; }
.ract .ic { width: 30px; height: 30px; padding: 0; filter: drop-shadow(0 1px 4px rgba(0,0,0,.35)); transition: transform .1s; }
.ract:active .ic { transform: scale(.86); }
.ract.on[data-type="apoyo"] .ic { fill: #ff4d7d; stroke: #ff4d7d; }
.ract.on[data-type="identifico"] .ic { fill: #a99cff; stroke: #a99cff; fill-opacity: .5; }
.ract.on[data-type="util"] .ic { fill: #ffd166; stroke: #ffd166; fill-opacity: .5; }
.ract.saved .ic { color: #fff; }
.ract-menu .icon-btn { color: #fff; }
.ract-menu .icon-btn:hover { background: rgba(255,255,255,.15); }
.ract-menu .menu { top: auto; bottom: 100%; right: 0; color: var(--text); }
.reel-info { position: absolute; left: 0; right: 76px; bottom: 0; padding: 0 20px 22px 24px; display: grid; gap: 10px; }
.reel-author { display: flex; align-items: center; gap: 10px; font-size: .92rem; }
.reel-author span { opacity: .75; }
.reel-author .anon { width: 36px; height: 36px; color: #fff; background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.35); }
.reel-company { display: inline-flex; align-items: center; gap: 8px; align-self: start; justify-self: start; color: #fff; font-weight: 700; font-size: .86rem; background: rgba(0,0,0,.28); padding: 5px 12px 5px 5px; border-radius: 999px; backdrop-filter: blur(6px); }
.reel-company .logo { width: 26px; height: 26px; border-radius: 7px; font-size: .62rem; }
.reel-company:hover { text-decoration: none; background: rgba(0,0,0,.4); }
.reel-end { display: grid; place-items: center; text-align: center; padding: 30px; }
.reel-end .ic { width: 28px; height: 28px; }
.reel-end > div > .ic { width: 52px; height: 52px; margin: 0 auto 12px; }
.reel-end .tick { background: rgba(255,255,255,.2); }
.reel-end p { opacity: .85; }
.reel-end .btn { background: #fff; color: #12263f; margin: 4px; }
.btn-ghost-light { background: transparent !important; color: #fff !important; border: 1px solid rgba(255,255,255,.5) !important; }
.reel-loading { height: 100%; display: grid; place-items: center; scroll-snap-align: start; }
.burst { position: absolute; left: 50%; top: 45%; width: 110px; height: 110px; margin: -55px 0 0 -55px; fill: #fff; stroke: none; opacity: 0; pointer-events: none; filter: drop-shadow(0 4px 18px rgba(0,0,0,.3)); }
.burst.go { animation: burst .9s ease forwards; }
@keyframes burst { 0% { opacity: 0; transform: scale(.2); } 15% { opacity: 1; transform: scale(1.2); } 30% { transform: scale(.95); } 45%, 70% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1) translateY(-30px); } }
.reels-tabs { position: absolute; top: 30px; left: 50%; transform: translateX(-50%); z-index: 5; display: flex; gap: 4px; background: rgba(0,0,0,.28); backdrop-filter: blur(8px); padding: 4px; border-radius: 999px; }
.reels-tabs button { white-space: nowrap; border: 0; background: none; color: rgba(255,255,255,.8); font-weight: 700; font-size: .84rem; padding: 6px 14px; border-radius: 999px; cursor: pointer; }
.reels-tabs button.active { background: #fff; color: #12263f; }
.reels-hint { position: absolute; bottom: 128px; left: 50%; transform: translateX(-50%); z-index: 5; display: flex; flex-direction: column; align-items: center; color: #fff; font-size: .78rem; font-weight: 600; pointer-events: none; animation: hint 1.6s ease-in-out infinite; transition: opacity .3s; text-shadow: 0 1px 6px rgba(0,0,0,.4); }
.reels-hint .ic { width: 22px; height: 22px; }
.reels-hint.gone { opacity: 0; }
@keyframes hint { 50% { transform: translate(-50%, -8px); } }

/* ═══════════════════ Explorar (cuadrícula) ═══════════════════ */
.explore-head { position: sticky; top: 0; z-index: 15; background: var(--glass); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px); padding: 16px 0 10px; display: grid; gap: 10px; }
.grid-feed { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.tile { position: relative; aspect-ratio: 1; overflow: hidden; color: #fff; padding: 14px; display: flex; flex-direction: column; justify-content: flex-end; cursor: pointer; animation: rise .35s ease both; isolation: isolate; }
.tile:hover { text-decoration: none; }
.tile::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(120% 80% at 100% 0%, rgba(255,255,255,.16), transparent 55%); }
.tile h3 { font-size: 1rem; line-height: 1.22; margin: 0; font-weight: 800; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.tile small { position: absolute; top: 12px; left: 14px; right: 14px; font-size: .68rem; font-weight: 700; opacity: .8; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .hover { position: absolute; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; gap: 18px; font-weight: 800; opacity: 0; transition: opacity .15s; }
.tile .hover span { display: inline-flex; align-items: center; gap: 6px; }
.tile .hover .ic { fill: #fff; stroke: #fff; width: 20px; height: 20px; }
.tile:hover .hover { opacity: 1; }
.grid-feed .feed-status { grid-column: 1 / -1; }
.sk-tile { aspect-ratio: 1; border-radius: 0; }

/* ═══════════════════ Empresas ═══════════════════ */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.toolbar .search-field { flex: 1; min-width: 220px; }
.toolbar .select { width: auto; }
.grid-companies { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.company-card { display: block; color: inherit; padding: 18px; transition: border-color .15s, transform .15s, box-shadow .15s; }
.company-card:hover { text-decoration: none; border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.company-card .top { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.company-card .avatar { width: 48px; height: 48px; font-size: .95rem; }
.company-card h3 { margin: 0; font-size: 1rem; color: var(--text); }
.company-card .row { display: flex; justify-content: space-between; align-items: center; font-size: .85rem; color: var(--text-2); }
.company-card .row + .row { margin-top: 8px; }
.score { font-weight: 800; color: var(--text); }

/* Perfil de empresa */
.company-head { padding: 22px; margin: 12px 0 22px; }
.company-top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.company-id { flex: 1; min-width: 180px; }
.company-id h1 { font-size: 1.5rem; margin: 0 0 2px; }
.company-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.company-kpis > div { background: var(--surface-2); border-radius: var(--radius-sm); padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.company-kpis strong { font-size: 1.6rem; font-weight: 800; line-height: 1; }
.company-kpis span { color: var(--muted); font-size: .8rem; }
.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 170px 1fr 36px; gap: 12px; align-items: center; font-size: .88rem; color: var(--text-2); }
.bar { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.bar b { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), #2fb5a8); border-radius: 99px; transform-origin: left; animation: grow .8s ease both; }
@keyframes grow { from { transform: scaleX(0); } }
.bar-row .v { font-weight: 800; color: var(--text); text-align: right; }
.cat-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.section-head h2 { font-size: 1.15rem; margin: 0; }
.seg-mini { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 3px; }
.seg-mini button { border: 0; background: none; width: 36px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); cursor: pointer; }
.seg-mini button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.seg-mini .ic { width: 18px; height: 18px; }

/* ═══════════════════ Detalle del relato ═══════════════════ */
.page > .back { margin-bottom: 4px; }
.pc-full { margin-top: 12px; }
.sub-ratings { background: var(--surface-2); border-radius: var(--radius-sm); padding: 14px; margin: 12px 0 0; }
.sub-ratings .bar-row { grid-template-columns: 160px 1fr 30px; font-size: .85rem; }
.post-disclaimer { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0 0; padding: 10px 12px; background: var(--surface-2); border-radius: var(--radius-sm); font-size: .78rem; color: var(--muted); }
.post-disclaimer .ic { width: 16px; height: 16px; margin-top: 1px; }
.comments { padding: 18px; margin-top: 14px; }
.comments h3 { font-size: 1rem; margin-bottom: 14px; }
.comment-form { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 16px; }
.comment-form .anon { width: 36px; height: 36px; }
.comment-form textarea { flex: 1; border: 1px solid var(--border); background: var(--surface-2); border-radius: 18px; resize: none; padding: 9px 14px; font-size: .92rem; max-height: 160px; height: 40px; line-height: 1.45; }
.comment-form textarea:focus { outline: none; border-color: var(--primary); background: var(--surface); }
.comment { display: flex; gap: 10px; padding: 6px 0; }
.comment .anon { width: 36px; height: 36px; }
.comment-main { flex: 1; min-width: 0; }
.comment-bubble { background: var(--surface-2); border-radius: 4px 16px 16px 16px; padding: 9px 13px; display: inline-block; max-width: 100%; }
.comment-bubble b { font-size: .84rem; display: block; margin-bottom: 1px; }
.comment-bubble p { margin: 0; white-space: pre-line; word-wrap: break-word; font-size: .92rem; }
.comment-main small { color: var(--muted); font-size: .76rem; display: flex; gap: 12px; margin: 4px 0 0 6px; }
.comment-main small button { background: none; border: 0; padding: 0; color: var(--muted); font-size: .76rem; cursor: pointer; font-weight: 600; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-weight: 600; font-size: .9rem; }
.back .ic { width: 18px; height: 18px; }
.more-details summary { cursor: pointer; color: var(--primary); font-weight: 600; font-size: .92rem; margin-top: 4px; }

/* ═══════════════════ Formulario de publicación ═══════════════════ */
.form-section { padding: 24px; margin-bottom: 16px; }
.form-section > h2 { font-size: 1.08rem; display: flex; align-items: center; gap: 10px; }
.form-section > h2 .step { width: 26px; height: 26px; border-radius: 50%; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; font-size: .8rem; }
.form-section > p.hint { color: var(--muted); font-size: .88rem; margin-top: -4px; }
.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.field label, .field .label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.field .opt { font-weight: 400; color: var(--muted); }
.field small { display: block; color: var(--muted); font-size: .8rem; margin-top: 5px; }
.textarea { min-height: 200px; resize: vertical; line-height: 1.55; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.counter { text-align: right; }
.notice { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 25%, transparent); color: var(--text); font-size: .9rem; margin-bottom: 16px; }
.notice > svg { width: 20px; height: 20px; margin-top: 1px; color: var(--warn); flex: 0 0 auto; }
.notice.info { background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 25%, transparent); }
.notice.info > svg { color: var(--primary); }
.legal-notice ul { margin: 6px 0 0; padding-left: 1.1em; }
.legal-notice li { margin-bottom: 4px; }
.legal-box { font-size: .84rem; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.segmented { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; flex-wrap: wrap; }
.segmented label { margin: 0; font-weight: 500; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: block; padding: 9px 16px; cursor: pointer; border-right: 1px solid var(--border); font-size: .9rem; background: var(--surface); }
.segmented label:last-child span { border-right: 0; }
.segmented input:checked + span { background: var(--strong); color: var(--on-strong); }
.segmented input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: -2px; }
.star-input { display: inline-flex; gap: 2px; }
.star-input button { border: 0; background: none; font-size: 1.6rem; line-height: 1; padding: 2px; cursor: pointer; color: var(--star-empty); transition: transform .1s; }
.star-input button.on { color: var(--star); }
.star-input button:hover { transform: scale(1.12); }
.rating-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; }
.rating-grid .field { margin: 0; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; cursor: pointer; }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--primary); flex: 0 0 auto; }
.form-actions { display: flex; justify-content: flex-end; align-items: center; gap: 12px; flex-wrap: wrap; }
.error-box { background: var(--danger-soft); color: var(--danger); border-radius: var(--radius-sm); padding: 12px 14px; font-size: .9rem; margin-bottom: 14px; display: none; }
.error-box.show { display: block; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.preview-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.preview-col { position: sticky; top: 24px; }
.preview-label { font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.success { text-align: center; padding: 48px 24px; }
.success .ok { width: 64px; height: 64px; border-radius: 50%; background: var(--success-soft); color: var(--success); display: grid; place-items: center; margin: 0 auto 16px; }
.success .ok .ic { width: 32px; height: 32px; }

/* ═══════════════════ Páginas estáticas ═══════════════════ */
.prose h2 { font-size: 1.2rem; margin-top: 1.6em; }
.prose ul { padding-left: 1.2em; color: var(--text-2); }
.prose li { margin-bottom: .45em; }
.prose p { color: var(--text-2); }
.prose strong { color: var(--text); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 24px 0; }
.steps .card { padding: 22px; }
.steps .n { width: 36px; height: 36px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-weight: 800; margin-bottom: 12px; }

/* ═══════════════════ Toast ═══════════════════ */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--strong); color: var(--on-strong); padding: 12px 18px; border-radius: 10px; box-shadow: var(--shadow-lg); font-size: .9rem; font-weight: 500; opacity: 0; pointer-events: none; transition: .25s; z-index: 200; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ═══════════════════ Responsive ═══════════════════ */
@media (max-width: 1180px) {
  .feed-layout { grid-template-columns: minmax(0, 470px); }
  .feed-aside { display: none; }
}
@media (max-width: 1100px) {
  :root { --side-w: 76px; }
  .sidenav { padding: 22px 10px 16px; align-items: center; }
  .sidenav .brand { padding: 4px 0 26px; }
  .sidenav .brand-text, .sidenav-links span, .sidenav-bottom span, .sidenav-legal { display: none; }
  .sidenav-links a, .sidenav-bottom button { justify-content: center; padding: 12px; }
  .preview-wrap { grid-template-columns: 1fr; }
  .preview-col { display: none; }
}
@media (max-width: 767px) {
  .shell { margin-left: 0; padding-top: 52px; padding-bottom: calc(52px + env(safe-area-inset-bottom)); }
  .sidenav { display: none; }
  .topbar { display: flex; position: fixed; top: 0; left: 0; right: 0; height: 52px; z-index: 50; align-items: center; justify-content: space-between; padding: 0 8px 0 14px; background: var(--glass); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--border); }
  .topbar .brand-mark { width: 28px; height: 28px; }
  .topbar-actions { display: flex; }
  .bottom-nav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; height: calc(52px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--glass); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px); border-top: 1px solid var(--border); justify-content: space-around; align-items: center; }
  .bottom-nav a { flex: 1; display: grid; place-items: center; height: 100%; color: var(--text); }
  .bottom-nav a .ic { width: 26px; height: 26px; }
  .bottom-nav a.active .ic { stroke-width: 2.6; }
  .bottom-nav a.active[data-nav="guardados"] .ic, .bottom-nav a.active[data-nav="home"] .ic { fill: currentColor; }

  /* Feed a pantalla completa como en la app */
  .feed-layout { padding: 0 0 20px; }
  .active-filter { padding: 0 12px; }
  .feed-status { padding-left: 16px; padding-right: 16px; }
  .to-top { bottom: calc(66px + env(safe-area-inset-bottom)); right: 14px; width: 42px; height: 42px; }
  .toast { bottom: calc(66px + env(safe-area-inset-bottom)); }

  .page { padding: 18px 0 32px; }
  .explore-head { padding: 10px 12px; margin: 0 -16px; top: 52px; }
  .explore-wrap .grid-feed { margin: 0 -16px; gap: 2px; }
  .tile { padding: 10px; }
  .tile h3 { font-size: .8rem; }
  .tile small { font-size: .58rem; top: 8px; left: 10px; }
  .bar-row { grid-template-columns: 130px 1fr 30px; }
  .grid-2, .rating-grid { grid-template-columns: 1fr; }
  .form-section { padding: 18px; }
  .segmented { display: flex; width: 100%; }
  .segmented label { flex: 1; }
  .segmented span { text-align: center; padding: 10px 6px; }
  .star-input button { font-size: 1.9rem; padding: 4px; }
  .form-actions .btn-lg { width: 100%; }
  .toolbar .select { width: 100%; }
  .steps { grid-template-columns: 1fr; }
  .input, .select, .textarea, .comment-form textarea { font-size: 16px; } /* evita zoom automático en iOS */
  .footer { margin-top: 8px; }
}
@media (max-width: 380px) {
  .bar-row { grid-template-columns: 110px 1fr 28px; font-size: .82rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ═══════════════════ Responsive: feed, reels, empresa ═══════════════════ */
@media (max-width: 1100px) {
  .feed-layout { grid-template-columns: minmax(0, 620px); }
  .feed-aside { display: none; }
}
@media (max-width: 767px) {
  .feed-layout { padding: 8px 0 20px; }
  .feed-main { padding: 0 10px; }
  .feed-filters { margin: 0 -10px 10px; padding: 10px 12px; top: 52px; }
  .welcome { margin-bottom: 10px; }
  .feed { gap: 10px; }
  .pc { padding: 14px 14px 4px 18px; border-radius: 12px; }
  .pc-foot { margin: 10px -14px 0 -18px; padding: 6px 8px 2px 10px; gap: 2px; }
  .pill { padding: 0 9px; }
  .pill .lbl { display: none; }
  .pc-title { font-size: 1.08rem; }
  .pc-full .pc-title { font-size: 1.28rem; }
  .company-kpis { gap: 8px; }
  .company-kpis > div { padding: 10px; }
  .company-kpis strong { font-size: 1.25rem; }
  .company-top .btn { width: 100%; }
  .sub-ratings .bar-row { grid-template-columns: 120px 1fr 26px; }

  /* Reels a pantalla completa entre las barras */
  .reels-mode .topbar { display: none; }
  .reels-mode .shell { padding-top: 0; }
  .reels-wrap { height: calc(100dvh - 52px - env(safe-area-inset-bottom)); }
  .reels { max-width: none; }
  .reel-slot { padding: 0; }
  .reel { border-radius: 0; box-shadow: none; }
  .reels-tabs { top: 14px; }
  .reel-inner { padding: 64px 18px 0 20px; inset: 0 66px 116px 0; }
  .reel h2 { font-size: 1.6rem; }
  .reel h2.m { font-size: 1.38rem; }
  .reel h2.l { font-size: 1.18rem; }
  .reel-text { font-size: .96rem; -webkit-line-clamp: 8; }
  .reel-side { right: 8px; bottom: 96px; gap: 12px; }
  .reel-info { right: 66px; padding: 0 16px 18px 20px; }
  .reels-hint { bottom: 122px; }
}
@media (max-width: 380px) {
  .reel-text { -webkit-line-clamp: 6; }
  .reel h2 { font-size: 1.4rem; }
}

/* ═══════════════════ Panel de moderación ═══════════════════ */
.admin-body { background: var(--bg); }
.admin-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 12px 20px; background: var(--glass); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.admin-top .spacer { flex: 1; }
.admin-badge { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--warn); background: var(--warn-soft); padding: 4px 10px; border-radius: 999px; }
.admin-wrap { max-width: 980px; margin: 0 auto; padding: 20px 16px 60px; }
.admin-tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--border); margin-bottom: 10px; scrollbar-width: none; }
.admin-tabs button { flex: 0 0 auto; border: 0; background: none; padding: 10px 14px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; display: inline-flex; align-items: center; gap: 6px; }
.admin-tabs button.active { color: var(--text); border-bottom-color: var(--primary); }
.admin-count { background: var(--danger); color: #fff; font-size: .7rem; font-weight: 800; padding: 1px 7px; border-radius: 999px; }
.admin-hint { font-size: .86rem; margin: 6px 0 14px; }
.admin-item { padding: 16px; margin-bottom: 12px; }
.admin-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted); margin-bottom: 8px; }
.admin-meta b { color: var(--text); }
.admin-st { font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); }
.admin-st.good { background: var(--success-soft); color: var(--success); }
.admin-st.warn { background: var(--warn-soft); color: var(--warn); }
.admin-st.bad { background: var(--danger-soft); color: var(--danger); }
.admin-reason { font-size: .82rem; font-weight: 600; color: var(--warn); background: var(--warn-soft); padding: 6px 10px; border-radius: 8px; margin-bottom: 10px; }
.admin-reason.good { color: var(--success); background: var(--success-soft); }
.admin-item h3 { font-size: 1.02rem; margin-bottom: 4px; }
.admin-body-text { white-space: pre-line; color: var(--text-2); font-size: .92rem; margin: 0 0 10px; max-height: 220px; overflow: auto; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; border-top: 1px solid var(--border); padding-top: 12px; }
.admin-actions .spacer { flex: 1; }
.admin-danger { color: var(--danger) !important; }
.admin-target { border-left: 3px solid var(--border-strong); padding: 4px 0 4px 12px; margin: 4px 0 12px; }
.admin-resolve { display: flex; gap: 8px; margin-top: 12px; }
.admin-resolve .input { flex: 1; }
.admin-sub { font-size: .9rem; color: var(--muted); margin: 26px 0 10px; text-transform: uppercase; letter-spacing: .05em; }
.admin-log { overflow-x: auto; }
.admin-log table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.admin-log th, .admin-log td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.admin-log th { color: var(--muted); font-weight: 700; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; }
@media (max-width: 600px) { .admin-resolve { flex-direction: column; } .admin-top .brand-text { display: none; } }
.success .ok.wait { background: var(--warn-soft); color: var(--warn); }
.ts-box:not(:empty) { margin-bottom: 14px; }
.totp-input { font-size: 1.4rem !important; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.menu button, .menu a { white-space: nowrap; }
.pc .menu { right: -4px; }

/* ═══════════════════ Diálogos propios ═══════════════════ */
.dlg-backdrop { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 16px; background: rgba(5, 8, 12, .55); backdrop-filter: blur(3px); opacity: 0; transition: opacity .15s ease; }
.dlg-backdrop.show { opacity: 1; }
.dlg { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 22px; transform: translateY(8px) scale(.98); transition: transform .15s ease; }
.dlg-backdrop.show .dlg { transform: none; }
.dlg h2 { font-size: 1.08rem; margin: 0 0 6px; }
.dlg p { color: var(--text-2); font-size: .92rem; margin: 0 0 14px; }
.dlg-options { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.dlg-input { margin-bottom: 4px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(1.08); }
.dlg-shake { animation: shake .35s ease; border-color: var(--danger) !important; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
body.dlg-open { overflow: hidden; }
@media (max-width: 480px) {
  .dlg-backdrop { place-items: end center; padding: 0; }
  .dlg { max-width: none; border-radius: 18px 18px 0 0; padding: 20px 18px calc(18px + env(safe-area-inset-bottom)); }
  .dlg-actions .btn { flex: 1; }
}
