/* Panel del equipo */
html:has(body.admin) { background: #000f13; }
body.admin { min-height: 100vh; background: radial-gradient(rgba(120, 255, 192, .06) 1.2px, transparent 1.7px) 0 0 / 22px 22px,
  radial-gradient(90% 70% at 80% 0%, #06404a, transparent 60%), linear-gradient(180deg, #001a20, #000f13); background-attachment: fixed; }
.admin .title { margin-bottom: .2em; font-size: clamp(1.6rem, 3.4vw, 2.6rem); }

.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login__card { width: min(520px, 100%); padding: clamp(24px, 4vw, 44px); border-radius: 40px; background: var(--glass); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 30px 80px rgba(0, 0, 0, .45); }
.login__mark { width: 84px; height: 84px; margin-bottom: 10px; overflow: visible; }
.login__card .kicker { font-size: 1.2rem; }
.login__lead { font-size: .95rem; margin-bottom: 6px; }
.login__help { margin-top: 8px; font-size: .88rem; border-top: 1px solid var(--line); padding-top: 14px; }
.login__help summary { cursor: pointer; color: var(--cyan); font-weight: 500; }
.login__help ol { list-style: decimal; padding-left: 1.3em; display: grid; gap: 8px; margin: 12px 0; }
.login__help a { color: var(--cyan); }
.login__help b { color: #fff; }

.abar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 10px var(--pad);
  background: rgba(0, 20, 25, .82); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 99px; background: rgba(0, 15, 19, .6); border: 1px solid var(--line); }
.tabs button { font: inherit; font-size: .9rem; color: var(--ink); cursor: pointer; padding: 8px 18px; border-radius: 99px; border: 0; background: none; transition: background .3s, color .3s; }
.tabs button.is-on { background: var(--cyan); color: var(--abyss); font-weight: 500; }
.abar__user { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: .88rem; }
.abar__link { font: inherit; color: var(--cyan); background: none; border: 0; cursor: pointer; text-decoration: none; padding: 0; }
.abar__link:hover { text-decoration: underline; }

.awrap { width: min(1240px, 100% - var(--pad) * 2); margin-inline: auto; padding: clamp(24px, 5vh, 50px) 0 100px; }
.ahead { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 22px; }
.ahead p { font-size: .9rem; opacity: .85; }
.ahead__tools { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.ahead__tools .search { min-width: 240px; }
.ahead__tools .search input { height: 46px; }
.ahead__tools .btn { border: 0; cursor: pointer; font: inherit; font-weight: 500; min-height: 46px; }

.rows { display: grid; gap: 10px; }
.row { display: grid; grid-template-columns: 76px minmax(0, 1.6fr) minmax(0, 1fr) auto auto; gap: 16px; align-items: center; padding: 10px 16px 10px 10px; border-radius: 22px;
  background: var(--glass); border: 1px solid var(--line); cursor: pointer; transition: border-color .3s, transform .3s var(--ease), background .3s; }
.row:hover { border-color: var(--cyan); transform: translateX(4px); background: rgba(8, 78, 86, .45); }
.row__thumb { width: 76px; height: 56px; border-radius: 14px; overflow: hidden; background: #012a31; }
.row__thumb img { width: 100%; height: 100%; object-fit: cover; }
.row__main, .row__by { display: grid; gap: 2px; min-width: 0; }
.row__main b { color: #fff; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row small { font-size: .78rem; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row__by { font-size: .82rem; }
.row__by b { color: var(--cyan); font-weight: 500; }
.badge { padding: 4px 12px; border-radius: 99px; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.badge.is-pub { background: rgba(120, 255, 192, .16); color: var(--cyan); border: 1px solid rgba(120, 255, 192, .4); }
.badge.is-draft { background: rgba(255, 255, 255, .07); color: var(--ink); border: 1px dashed rgba(223, 229, 234, .4); }
.row__acts { display: flex; gap: 6px; }
.row__acts button, .mini { font: inherit; font-size: .82rem; color: var(--ink); cursor: pointer; padding: 7px 14px; border-radius: 99px; border: 1px solid var(--line); background: rgba(0, 15, 19, .5); transition: background .3s, color .3s, border-color .3s; }
.row__acts button:hover, .mini:hover { background: var(--cyan); color: var(--abyss); border-color: var(--cyan); }
.danger { color: #ff9aa1 !important; border-color: rgba(230, 65, 76, .5) !important; }
.danger:hover { background: var(--red) !important; color: #fff !important; }
.rows .empty { list-style: none; }

.editor__top { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.editor__top .back { font: inherit; background: none; border: 0; cursor: pointer; margin: 0; padding: 0; }
.editor__cols { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: clamp(18px, 3vw, 36px); align-items: start; margin-top: 10px; }
.editor__main, .editor__side { display: grid; gap: 14px; }
.editor__side { position: sticky; top: 84px; padding: 20px; border-radius: 28px; background: var(--glass); border: 1px solid var(--line); }
.box { margin: 0; padding: 14px; border-radius: 20px; border: 1px solid var(--line); display: grid; gap: 10px; min-width: 0; }
.box legend { padding: 0 8px; font-size: .82rem; letter-spacing: .06em; color: var(--cyan); }
.box legend small, .form label small { opacity: .75; color: var(--ink); letter-spacing: 0; }
.cover { position: relative; aspect-ratio: 16 / 10; border-radius: 16px; overflow: hidden; background: rgba(0, 15, 19, .6); display: grid; place-items: center; font-size: .85rem; opacity: .9; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; }
.thumb { position: relative; width: 110px; height: 84px; border-radius: 14px; overflow: hidden; background: #012a31; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.x { position: absolute; right: 6px; top: 6px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0, 10, 13, .8); color: #fff; font-size: 1.1rem; line-height: 1; cursor: pointer; }
.x:hover { background: var(--red); }
.metric { position: relative; display: grid; grid-template-columns: 130px 1fr 30px; gap: 8px; align-items: center; }
.metric .x { position: static; }
.hint { font-size: .82rem; opacity: .7; }
.mini { justify-self: start; }
.mdbox { border-radius: 22px; border: 1px solid rgba(255, 255, 255, .12); overflow: hidden; background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02)); transition: border-color .3s, box-shadow .35s; }
.mdbar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 8px 10px; border-bottom: 1px solid var(--line); background: rgba(8, 78, 86, .35); }
.mdbar__label { font-size: .82rem; letter-spacing: .06em; color: var(--cyan); margin-right: 8px; }
.mdbar button { font: inherit; font-size: .8rem; color: var(--ink); cursor: pointer; padding: 5px 11px; border-radius: 10px; border: 1px solid transparent; background: rgba(255, 255, 255, .06); }
.mdbar button:hover { border-color: var(--cyan); color: #fff; }
.mdbar__prev { margin-left: auto; color: var(--cyan) !important; }
.mdbox textarea { display: block; width: 100%; min-height: 340px; padding: 18px 20px; border: 0; outline: 0; resize: vertical; background: none; color: #fff; font: inherit; font-size: 1rem; line-height: 1.65; }
.mdbox textarea::placeholder { color: rgba(223, 229, 234, .4); }
.mdbox:focus-within { border-color: rgba(120, 255, 192, .6); box-shadow: 0 14px 34px rgba(0, 0, 0, .3), 0 0 0 4px rgba(120, 255, 192, .1); }
.mdprev { border: 0; border-radius: 0; min-height: 320px; background: none; }
.editor__state { font-size: .85rem; }
.editor__state b { color: var(--cyan); }
.editor__acts { display: grid; gap: 8px; }
.editor__acts .btn { width: 100%; justify-self: stretch; }

.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 80; display: grid; gap: 10px; max-width: min(420px, calc(100% - 36px)); }
.toast { padding: 14px 20px; border-radius: 18px; font-size: .9rem; color: #fff; background: #06404a; border: 1px solid var(--cyan); box-shadow: 0 20px 50px rgba(0, 0, 0, .5); animation: toast .4s var(--ease); transition: opacity .4s, transform .4s; }
.toast.is-error { background: #5a1a22; border-color: var(--red); }
.toast.is-wait { border-color: rgba(223, 229, 234, .4); }
.toast.is-out { opacity: 0; transform: translateY(10px); }
.toast a { color: var(--cyan); }
@keyframes toast { from { opacity: 0; transform: translateY(14px); } }

@media (max-width: 900px) {
  .editor__cols { grid-template-columns: 1fr; }
  .editor__side { position: static; }
  .row { grid-template-columns: 60px minmax(0, 1fr) auto; }
  .row__thumb { width: 60px; height: 48px; }
  .row__by { display: none; }
  .row__acts { grid-column: 1 / -1; justify-content: flex-end; }
  .abar__user span { display: none; }
}


/* Campos del panel */
.login__card { gap: 18px; }
.login__card .title { margin-bottom: 0; }
.login__alt { text-align: center; margin-top: -4px; }
.linklike { font: inherit; font-size: .88rem; color: var(--cyan); background: none; border: 0; padding: 4px; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.login__card .btn--send { justify-self: stretch; justify-content: space-between; padding-left: 30px; }
.field--title > input { font-size: clamp(1.2rem, 2vw, 1.6rem); font-weight: 700; padding-top: 30px; padding-bottom: 14px; }
.field--title > span { top: 22px; font-size: 1.15rem; }
.field--short > textarea { min-height: 96px; }
.box { background: rgba(255, 255, 255, .03); border-color: rgba(255, 255, 255, .12); }
.metric input { width: 100%; min-width: 0; font: inherit; font-size: .95rem; color: #fff; padding: 11px 14px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .05); outline: 0; transition: border-color .3s, box-shadow .3s; }
.metric input:focus { border-color: rgba(120, 255, 192, .6); box-shadow: 0 0 0 3px rgba(120, 255, 192, .12); }
.metric input::placeholder { color: rgba(223, 229, 234, .4); }
.metric input[data-m="valor"] { font-weight: 700; color: var(--cyan); }
.mini, .row__acts button { font-family: inherit; font-size: .82rem; font-weight: 400; }
.mdbar button { font-family: inherit; font-size: .8rem; font-weight: 400; }
.editor__acts .btn { border: 0; font: inherit; font-weight: 500; cursor: pointer; }
.editor__acts .btn--glass { border: 1px solid rgba(120, 255, 192, .4); }
.editor__acts .btn[disabled] { opacity: .6; cursor: progress; }
.editor__top .back { font: inherit; font-size: .92rem; color: var(--cyan); }
.editor__side .switch { margin: 2px 4px; }
