/* ============================================================
   HUB KFC · v5 · panel de configuración (usa los tokens de hub.css)
   ============================================================ */
body { padding-bottom: 0; }
body.has-tabs { padding-bottom: calc(64px + var(--safe-b)); }
.ambient::before { opacity: .55; }

/* ---------- Login ---------- */
.login { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: 24px var(--gutter); }
.login-card { width: 100%; max-width: 420px; padding: 30px 26px 24px; border-radius: 28px; background: var(--bg-2); border: 1px solid var(--line-2); box-shadow: var(--shadow); animation: popIn .4s cubic-bezier(.2,.8,.2,1) both; }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.login-brand img { height: 46px; }
.login-brand .brand-word { font-size: 30px; }
.login-brand small { display: block; font-size: 11px; color: var(--muted); letter-spacing: .14em; text-transform: uppercase; font-weight: 700; }
.login h1 { margin: 6px 0 4px; font-family: var(--font-display); font-size: 40px; letter-spacing: .03em; font-weight: 400; line-height: 1; }
.login p { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.login .btn { width: 100%; margin-top: 14px; }
.login-foot { margin-top: 16px; display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); }
.login-foot a { color: var(--text); font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.login .priv-err { margin-top: 10px; }

/* ---------- Estructura del panel ---------- */
.shell { display: grid; grid-template-columns: 1fr; min-height: 100vh; }
.side { display: none; }
.main { min-width: 0; }
.main-top { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 10px; height: calc(60px + var(--safe-t)); padding: var(--safe-t) var(--gutter) 0; background: var(--glass); backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%); border-bottom: 1px solid var(--line); }
.main-top .brand-logo { height: 34px; }
.main-top h1 { margin: 0; font-family: var(--font-display); font-size: 24px; letter-spacing: .05em; font-weight: 400; line-height: 1; }
.main-top h1 small { font-family: var(--font-body); font-size: 11px; letter-spacing: .12em; color: var(--muted); display: block; margin-top: 2px; font-weight: 700; }
.main-top .spacer { flex: 1; }
.main-top .who { display: none; font-size: 13px; color: var(--muted); }
.main-top .who strong { color: var(--text); }
.content { max-width: 1240px; margin: 0 auto; padding: 18px var(--gutter) 60px; }
.view { display: none; animation: fadeIn .25s ease both; }
.view.is-active { display: block; }

.tabs-bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; height: calc(64px + var(--safe-b)); padding: 6px 8px var(--safe-b); display: grid; grid-template-columns: repeat(5, 1fr); background: var(--glass-strong); backdrop-filter: blur(22px) saturate(160%); -webkit-backdrop-filter: blur(22px) saturate(160%); border-top: 1px solid var(--line-2); }
.tabs-bottom button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-radius: 14px; color: var(--muted); font-size: 10.5px; font-weight: 700; }
.tabs-bottom button .ico { width: 21px; height: 21px; }
.tabs-bottom button.is-active { color: var(--text); background: var(--surface-2); }

@media (min-width: 1000px) {
  body.has-tabs { padding-bottom: 0; }
  .tabs-bottom { display: none; }
  .shell { grid-template-columns: 250px 1fr; }
  .side { display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 20px 14px; border-right: 1px solid var(--line); background: var(--bg-2); }
  .side-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
  .side-brand img { height: 38px; }
  .side-brand .brand-word { font-size: 26px; }
  .side-brand small { display: block; font-size: 10.5px; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; font-weight: 700; }
  .side nav { display: flex; flex-direction: column; gap: 4px; }
  .side nav button { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px; border-radius: 12px; color: var(--muted); font-weight: 600; font-size: 14px; text-align: left; transition: background .2s, color .2s; }
  .side nav button .ico { width: 19px; height: 19px; }
  .side nav button:hover { background: var(--surface); color: var(--text); }
  .side nav button.is-active { background: var(--text); color: var(--bg); }
  .side nav button b { margin-left: auto; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
  .side nav button.is-active b { background: rgba(255,255,255,.2); color: inherit; }
  :root[data-theme="light"] .side nav button.is-active b { background: rgba(0,0,0,.2); }
  .side-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 6px; }
  .side-foot .who { padding: 8px 10px; font-size: 13px; color: var(--muted); }
  .side-foot .who strong { display: block; color: var(--text); font-size: 14px; }
  .side-foot a, .side-foot button { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: 13px; }
  .side-foot a:hover, .side-foot button:hover { background: var(--surface); color: var(--text); }
  .side-foot .ico { width: 17px; height: 17px; }
  .main-top { height: 68px; padding-top: 0; }
  .main-top .brand-logo, .main-top .m-only { display: none; }
  .main-top .who { display: block; }
  .main-top h1 { visibility: hidden; }
  .main-top h1 { font-size: 28px; }
}

/* ---------- Encabezados / barras ---------- */
.vhead { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.vhead h2 { margin: 0; font-family: var(--font-display); font-size: 34px; letter-spacing: .04em; font-weight: 400; line-height: 1; }
.vhead p { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }
.vhead .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 13.5px; border-radius: 12px; }
.btn-xs { min-height: 32px; padding: 0 10px; font-size: 12px; border-radius: 9px; font-weight: 700; }
.btn-xs .ico { width: 14px; height: 14px; }
.btn-danger { background: rgba(228,0,43,.12); color: var(--red-2); border: 1px solid rgba(228,0,43,.35); }
:root[data-theme="light"] .btn-danger { color: #b3001f; }
.btn-danger:hover { background: rgba(228,0,43,.2); }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .search { flex: 1 1 220px; display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-2); }
.toolbar .search input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; font-size: 14px; }
.toolbar .search .ico { color: var(--muted); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 12.5px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; transition: background .2s, color .2s, border-color .2s; }
.chip:hover { color: var(--text); border-color: var(--line-2); }
.chip.is-on { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip .ico { width: 14px; height: 14px; }
select.sel { height: 42px; padding: 0 36px 0 12px; border-radius: 12px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239a9aa6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; border: 1px solid var(--line-2); font-size: 14px; appearance: none; -webkit-appearance: none; color: var(--text); }

/* ---------- Tarjetas / paneles ---------- */
.card { background: var(--bg-2); border: 1px solid var(--line); border-radius: 20px; padding: 16px; box-shadow: var(--shadow-sm); }
.card + .card { margin-top: 14px; }
.card h3 { margin: 0 0 4px; font-size: 16px; font-weight: 800; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
.card h3 .ico { width: 18px; height: 18px; color: var(--red-2); }
.card .hint { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
@media (min-width: 700px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { padding: 14px 16px; border-radius: 18px; background: var(--bg-2); border: 1px solid var(--line); }
.kpi strong { display: block; font-family: var(--font-display); font-size: 34px; line-height: 1; letter-spacing: .03em; }
.kpi strong.red { color: var(--red-2); }
.kpi span { font-size: 11px; color: var(--muted); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

/* ---------- Grupos de accesos ---------- */
.group { background: var(--bg-2); border: 1px solid var(--line); border-radius: 20px; margin-bottom: 14px; overflow: hidden; transition: box-shadow .2s, border-color .2s; }
.group.is-over { border-color: var(--red-2); box-shadow: 0 0 0 3px rgba(228,0,43,.18); }
.group-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--surface); }
.group-head .sec-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--p1, #ff2d4f), var(--p2, #8a0019)); flex: 0 0 auto; }
.group-head .sec-ico .ico { width: 16px; height: 16px; }
.group-head h3 { margin: 0; font-family: var(--font-display); font-size: 22px; letter-spacing: .04em; font-weight: 400; line-height: 1; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.group-head h3 small { font-family: var(--font-body); font-size: 12px; letter-spacing: 0; color: var(--muted); font-weight: 600; margin-left: 8px; }
.group-head .g-acts { display: flex; gap: 6px; }
.group-body { padding: 6px; min-height: 48px; }
.group-empty { padding: 16px; text-align: center; color: var(--muted-2); font-size: 13px; border: 1px dashed var(--line-2); border-radius: 14px; margin: 6px; }
.row { display: grid; grid-template-columns: 24px 44px 1fr auto; align-items: center; gap: 10px; padding: 8px 8px; border-radius: 14px; transition: background .15s, opacity .2s, transform .2s; }
.row:hover { background: var(--surface); }
.row.is-dragging { opacity: .4; }
.row.is-placeholder { outline: 2px dashed var(--red-2); outline-offset: -2px; background: var(--red-soft); }
.row .grip { color: var(--muted-2); cursor: grab; display: grid; place-items: center; height: 36px; touch-action: none; }
.row .grip:active { cursor: grabbing; }
.row .m-app { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; overflow: hidden; color: #fff; background: linear-gradient(135deg, var(--p1), var(--p2)); }
.row.has-logo .m-app { background: #fff; color: var(--p2); }
.row .m-app img { width: 100%; height: 100%; object-fit: contain; padding: 5px; }
.row .m-app .ico { width: 22px; height: 22px; }
.row .m-app .letter { font-family: var(--font-display); font-size: 24px; line-height: 1; padding-top: 2px; }
.row .m-app .emoji { font-size: 22px; }
.row .r-text { min-width: 0; }
.row .r-text strong { display: flex; align-items: center; gap: 6px; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .r-text strong .ico { width: 14px; height: 14px; color: #ffcc33; fill: #ffcc33; flex: 0 0 auto; }
.row .r-text span { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .r-acts { display: flex; align-items: center; gap: 6px; }
.pill { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .04em; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); }
.pill .ico { width: 12px; height: 12px; }
.pill.ACTIVO { color: var(--ok); border-color: rgba(34,197,94,.35); background: rgba(34,197,94,.1); }
.pill.PRIVADO { color: #ffb3c0; border-color: rgba(228,0,43,.4); background: var(--red-soft); }
:root[data-theme="light"] .pill.PRIVADO { color: #b3001f; }
.pill.BLOQUEADO { color: var(--warn); border-color: rgba(245,158,11,.4); background: rgba(245,158,11,.1); }
.pill.OCULTO { color: var(--muted); }
.row .pill { display: none; }
.icon-sm { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); border: 1px solid transparent; transition: background .15s, color .15s, border-color .15s; }
.icon-sm:hover { background: var(--surface-2); color: var(--text); border-color: var(--line); }
.icon-sm .ico { width: 17px; height: 17px; }
.icon-sm.danger:hover { color: var(--red-2); }
@media (min-width: 700px) { .row { grid-template-columns: 24px 44px 1fr auto auto; } .row .pill { display: inline-flex; } }
.menu { position: fixed; z-index: 150; min-width: 220px; padding: 6px; border-radius: 16px; background: var(--bg-2); border: 1px solid var(--line-2); box-shadow: var(--shadow); animation: popIn .15s ease both; }
.menu button { width: 100%; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 10px; border-radius: 10px; font-size: 14px; font-weight: 600; text-align: left; color: var(--text); }
.menu button:hover { background: var(--surface); }
.menu button .ico { width: 16px; height: 16px; color: var(--muted); }
.menu button.danger { color: var(--red-2); }
.menu .menu-sep { height: 1px; background: var(--line); margin: 6px 4px; }
.menu .menu-lbl { padding: 8px 10px 4px; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); }
.menu-backdrop { position: fixed; inset: 0; z-index: 140; }

/* ---------- Editor (cajón lateral / pantalla completa) ---------- */
.drawer-wrap { position: fixed; inset: 0; z-index: 120; display: flex; justify-content: flex-end; background: rgba(5,5,8,.62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fadeIn .2s ease both; }
:root[data-theme="light"] .drawer-wrap { background: rgba(40,40,60,.4); }
.drawer { width: 100%; max-width: 1080px; height: 100%; background: var(--bg); border-left: 1px solid var(--line-2); display: flex; flex-direction: column; animation: slideIn .32s cubic-bezier(.2,.8,.2,1) both; }
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-top { display: flex; align-items: center; gap: 10px; padding: calc(10px + var(--safe-t)) 14px 10px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.drawer-top h2 { margin: 0; font-family: var(--font-display); font-size: 26px; letter-spacing: .04em; font-weight: 400; line-height: 1; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drawer-top h2 small { font-family: var(--font-body); font-size: 11px; letter-spacing: .1em; color: var(--muted); display: block; margin-top: 3px; font-weight: 700; }
.drawer-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; display: grid; grid-template-columns: 1fr; }
.drawer-foot { display: flex; gap: 10px; padding: 12px 14px calc(12px + var(--safe-b)); border-top: 1px solid var(--line); background: var(--bg-2); }
.drawer-foot .btn { flex: 1; }
.drawer-foot .btn-ghost { flex: 0 0 auto; padding: 0 22px; }
@media (max-width: 599px) { .drawer-foot .btn { font-size: 14px; padding: 0 12px; } .drawer-foot .btn-ghost { padding: 0 14px; } .vhead h2 { display: none; } }
.drawer-foot .btn-danger { flex: 0 0 auto; padding: 0 14px; }
.preview-pane { padding: 18px var(--gutter) 6px; }
.form-pane { padding: 6px var(--gutter) 24px; }
@media (min-width: 900px) {
  .drawer-body { grid-template-columns: 380px 1fr; }
  .drawer-body { background: linear-gradient(90deg, var(--bg-2) 0, var(--bg-2) 379px, var(--line) 379px, var(--line) 380px, transparent 380px); }
  .preview-pane { position: sticky; top: 0; align-self: start; padding: 24px 22px; }
  .form-pane { padding: 22px 28px 40px; }
}
.preview-lbl { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-2); margin: 0 0 10px; display: flex; align-items: center; justify-content: space-between; }
.preview-stage { display: grid; grid-template-columns: minmax(0, 190px) 1fr; gap: 14px; align-items: start; }
.preview-stage .tile { animation: none; max-width: 190px; }
.preview-feature { margin-top: 14px; }
.preview-feature .feature { width: 100%; aspect-ratio: 16/9; flex: initial; }
@media (max-width: 899px) { .preview-feature { display: none; } .preview-stage { grid-template-columns: 170px 1fr; } .preview-stage .tile { max-width: 170px; } }
.preview-tips { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.preview-tips b { color: var(--text); }

/* Formularios */
.fgrid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.fgrid.two { grid-template-columns: 1fr 1fr; }
.fsec { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.fsec:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.fsec > h4 { margin: 0 0 12px; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.fsec > h4 .ico { width: 15px; height: 15px; color: var(--red-2); }
.f { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.f label { font-size: 12.5px; font-weight: 700; color: var(--text); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.f label small { font-weight: 500; color: var(--muted-2); font-size: 11.5px; }
.f input[type=text], .f input[type=url], .f input[type=number], .f input[type=password], .f input[type=email], .f textarea, .f select { height: 46px; padding: 0 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-2); font-size: 14.5px; color: var(--text); outline: 0; transition: border-color .2s, box-shadow .2s; width: 100%; }
.f textarea { height: auto; min-height: 84px; padding: 12px 14px; resize: vertical; line-height: 1.45; }
.f input:focus, .f textarea:focus, .f select:focus { border-color: var(--red-2); box-shadow: 0 0 0 4px rgba(228,0,43,.14); }
.f .with-btn { display: flex; gap: 8px; }
.f .with-btn input { flex: 1; }
.f .help { font-size: 12px; color: var(--muted-2); }
.seg { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; padding: 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
@media (min-width: 560px) { .seg { grid-template-columns: repeat(4, 1fr); } }
.seg button { height: 44px; border-radius: 10px; font-size: 13px; font-weight: 700; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 6px; transition: background .2s, color .2s; }
.seg button .ico { width: 15px; height: 15px; }
.seg button.is-on { background: var(--text); color: var(--bg); box-shadow: 0 6px 16px rgba(0,0,0,.2); }
.seg button.is-on.ACTIVO { background: var(--ok); color: #04210f; }
.seg button.is-on.PRIVADO { background: var(--red); color: #fff; }
.seg button.is-on.BLOQUEADO { background: var(--warn); color: #2a1700; }
.seg button.is-on.OCULTO { background: var(--surface-3); color: var(--text); }
.toggle { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); cursor: pointer; }
.toggle .t-text { flex: 1; min-width: 0; }
.toggle .t-text strong { display: block; font-size: 14px; }
.toggle .t-text span { display: block; font-size: 12px; color: var(--muted); }
.toggle .sw { width: 46px; height: 28px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--line-2); position: relative; transition: background .2s; flex: 0 0 auto; }
.toggle .sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3); transition: transform .2s; }
.toggle.is-on .sw { background: var(--red); border-color: var(--red); }
.toggle.is-on .sw::after { transform: translateX(18px); }
.sec-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sec-chips .chip.is-on { background: var(--red); color: #fff; border-color: var(--red); }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 8px; }
.swatch { aspect-ratio: 1; border-radius: 14px; background: linear-gradient(135deg, var(--p1), var(--p2)); border: 2px solid transparent; position: relative; transition: transform .15s, box-shadow .2s; box-shadow: 0 4px 12px rgba(0,0,0,.25); }
.swatch:hover { transform: translateY(-2px); }
.swatch.is-on { border-color: var(--text); box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--text); }
.swatch.is-on::after { content: ''; position: absolute; inset: 0; margin: auto; width: 10px; height: 10px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px rgba(0,0,0,.25); }
.swatch[title]::before { content: attr(title); position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); padding: 3px 7px; border-radius: 6px; background: var(--text); color: var(--bg); font-size: 11px; font-weight: 700; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s; }
.swatch:hover[title]::before { opacity: 1; }
.visual-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 12px; }
.visual-tabs button { height: 40px; border-radius: 10px; font-size: 13px; font-weight: 700; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.visual-tabs button .ico { width: 15px; height: 15px; }
.visual-tabs button.is-on { background: var(--text); color: var(--bg); }
.drop { position: relative; display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 16px; border: 2px dashed var(--line-2); background: var(--surface); transition: border-color .2s, background .2s; cursor: pointer; }
.drop:hover, .drop.is-over { border-color: var(--red-2); background: var(--red-soft); }
.drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.drop .d-thumb { width: 72px; height: 72px; border-radius: 16px; display: grid; place-items: center; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted-2); flex: 0 0 auto; }
.drop .d-thumb img { width: 100%; height: 100%; object-fit: contain; }
.drop.cover .d-thumb { width: 112px; aspect-ratio: 16/10; height: auto; }
.drop.cover .d-thumb img { object-fit: cover; }
.drop .d-thumb .ico { width: 26px; height: 26px; }
.drop .d-text { flex: 1; min-width: 0; }
.drop .d-text strong { display: block; font-size: 14px; }
.drop .d-text span { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.drop .d-acts { position: relative; z-index: 2; display: flex; gap: 6px; flex-wrap: wrap; }
.icon-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 6px; max-height: 240px; overflow-y: auto; padding: 8px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.icon-pick button { aspect-ratio: 1; border-radius: 12px; display: grid; place-items: center; color: var(--muted); transition: background .15s, color .15s; }
.icon-pick button:hover { background: var(--surface-2); color: var(--text); }
.icon-pick button.is-on { background: var(--red); color: #fff; }
.icon-pick button .ico { width: 22px; height: 22px; }
.icon-pick .ip-group { grid-column: 1 / -1; font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); padding: 6px 4px 2px; }
.emoji-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.emoji-row button { width: 40px; height: 40px; border-radius: 10px; font-size: 20px; background: var(--surface); border: 1px solid var(--line); }
.emoji-row button:hover { border-color: var(--line-2); background: var(--surface-2); }
details.more { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 12px; }
details.more summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--muted); list-style: none; display: flex; align-items: center; gap: 8px; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary .ico { width: 15px; height: 15px; transition: transform .2s; }
details.more[open] summary .ico { transform: rotate(180deg); }
details.more .fgrid { margin-top: 12px; }

/* ---------- Listas simples (secciones, avisos, usuarios) ---------- */
.list { display: grid; gap: 8px; }
.item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--bg-2); border: 1px solid var(--line); transition: box-shadow .2s, border-color .2s; }
.item.is-over { border-color: var(--red-2); }
.item .i-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--p1, #ff2d4f), var(--p2, #8a0019)); }
.item .i-ico .ico { width: 19px; height: 19px; }
.item .i-ico.soft { background: var(--surface-2); color: var(--muted); }
.item .i-text { min-width: 0; }
.item .i-text strong { display: block; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .i-text span { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .i-text p { margin: 6px 0 0; font-size: 13px; color: var(--muted); white-space: pre-line; }
.item .i-acts { display: flex; align-items: center; gap: 4px; }
.item .ord { display: flex; flex-direction: column; gap: 2px; }
.item .ord button { width: 28px; height: 22px; border-radius: 7px; display: grid; place-items: center; color: var(--muted); }
.item .ord button:hover { background: var(--surface-2); color: var(--text); }
.item .ord button:disabled { opacity: .3; }
.item .ord .ico { width: 14px; height: 14px; }
.item.off { opacity: .6; }
.bitacora { width: 100%; border-collapse: collapse; font-size: 13px; }
.bitacora th, .bitacora td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.bitacora th { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); }
.bitacora td.t { white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
.status-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (min-width: 700px) { .status-grid { grid-template-columns: repeat(3, 1fr); } }
.status { padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; }
.status strong { display: block; font-size: 15px; margin-top: 2px; }
.status.ok strong { color: var(--ok); }
.status.bad strong { color: var(--red-2); }
.status small { display: block; color: var(--muted); font-size: 11.5px; }
.empty-sm { padding: 24px; text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: 16px; font-size: 13.5px; }

/* Confirmaciones */
.confirm { padding: 22px 20px 10px; }
.confirm h3 { margin: 0 0 6px; font-family: var(--font-display); font-size: 30px; letter-spacing: .04em; font-weight: 400; line-height: 1; }
.confirm p { margin: 0; color: var(--muted); font-size: 14px; }
.confirm .f { margin-top: 14px; }
.progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: linear-gradient(90deg, var(--red), var(--red-2)); z-index: 300; transition: width .3s, opacity .4s; opacity: 0; }
.progress.on { opacity: 1; }
.drag-ghost { position: fixed; z-index: 999; pointer-events: none; opacity: .9; transform: rotate(-2deg); }
