/* My Streaming Cinema - Area de cuenta web (login, perfiles y panel).
   Tema claro calcado del panel de Stremize con el acento morado de MSC.
   Independiente de style.css (el reproductor web no se toca). */
:root {
  --bg: #f3f5fb;
  --bg2: #eceff8;
  --surface: #ffffff;
  --line: #dde3f0;
  --line-strong: #c3cbdf;
  --text: #131828;
  --muted: #5b6478;
  --accent: #7c5cff;
  --accent2: #5b3df0;
  --accent-ink: #5b3df0;
  --tint: #efeaff;
  --tint2: #e2d7ff;
  --grad: linear-gradient(135deg, #7c5cff, #5b3df0);
  --logo-pill: #12162a;
  --green: #0da678;
  --green-tint: #e2f6ef;
  --red: #b3261e;
  --red-tint: #fdecea;
  --radius: 18px;
  --card-shadow: 0 18px 44px rgba(30, 27, 75, .08);
  --mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15.5px;
  line-height: 1.55;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .brand-txt { font-family: 'Outfit', 'Inter', sans-serif; }
a { color: var(--accent-ink); }
img { max-width: 100%; }
.mono { font-family: var(--mono); }
.hidden { display: none !important; }

/* ------------------------------------------------------------- barra */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60; height: 64px;
  background: #fff; border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 22px;
  display: flex; align-items: center; gap: 26px; height: 64px;
}
.logo-pill {
  display: inline-flex; align-items: center; gap: 2px;
  background: var(--logo-pill); border-radius: 11px; padding: 8px 14px;
  font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 14.5px; letter-spacing: .05em;
  color: #fff; white-space: nowrap; text-decoration: none; line-height: 1;
}
.logo-pill .lp-play { color: var(--accent); font-size: 11px; margin-right: 7px; }
.logo-pill .lp-grad {
  background: linear-gradient(90deg, #a58bff, #7c5cff);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  margin-left: 5px;
}
.top-links { display: flex; gap: 22px; margin: 0 auto; }
.top-links a { text-decoration: none; color: var(--muted); font-size: 15px; font-weight: 500; white-space: nowrap; }
.top-links a:hover { color: var(--text); }
.top-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.top-links + .top-right { margin-left: 0; }
.avatar-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--line);
  overflow: hidden; background: var(--tint); cursor: pointer; padding: 0; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
}
.avatar-btn:hover { border-color: var(--accent); }
.avatar-btn img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-btn svg { width: 62%; height: 62%; }

/* ------------------------------------------------------------- botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 14.5px 'Inter', sans-serif; text-decoration: none; cursor: pointer;
  border-radius: 999px; padding: 10px 20px; border: 1.5px solid transparent;
  transition: transform .15s, border-color .15s, background .15s, opacity .15s;
  white-space: nowrap; background: none; color: var(--text);
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: default; }
.btn-solid { background: var(--grad); color: #fff; box-shadow: 0 8px 20px rgba(91, 61, 240, .25); }
.btn-solid:hover { transform: translateY(-1px); }
.btn-outline { border-color: var(--line-strong); background: var(--surface); }
.btn-outline:hover { border-color: var(--accent); }
.btn-pale { background: var(--tint); color: var(--accent-ink); }
.btn-pale:hover { background: var(--tint2); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { transform: translateY(-1px); }
.btn-danger { background: var(--red-tint); color: var(--red); }
.btn-danger:hover { background: #fadbd8; }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 14px; font-size: 13.5px; }
.btn-lg { padding: 13px 22px; font-size: 15.5px; border-radius: 14px; }

/* ------------------------------------------------------------- layout */
.page { max-width: 1280px; margin: 0 auto; padding: 88px 22px 70px; }
.config-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 4px 2px 18px; color: var(--muted); font-size: 14.5px;
}
.config-row b { color: var(--text); }
.config-row a { font-weight: 600; text-decoration: none; }
.config-row a:hover { text-decoration: underline; }
.layout { display: grid; grid-template-columns: 264px 1fr; gap: 22px; align-items: start; }
.layout > * { min-width: 0; }
.content { min-width: 0; display: flex; flex-direction: column; gap: 22px; }

/* ------------------------------------------------------------- lateral */
.side {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--card-shadow); padding: 14px 10px; position: sticky; top: 88px;
}
.side-head {
  display: flex; align-items: center; justify-content: space-between;
  font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 17px;
  padding: 4px 12px 12px;
}
.side-item {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 10px 12px; border-radius: 12px; border: 0; background: none;
  font: 500 15px 'Inter', sans-serif; color: var(--text); text-decoration: none;
  cursor: pointer; text-align: left;
}
.side-item:hover { background: var(--bg); }
.side-item.active { background: var(--tint); color: var(--accent-ink); font-weight: 600; }
.side-item svg { width: 19px; height: 19px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.side-item .chev { margin-left: auto; width: 15px; height: 15px; transition: transform .2s; }
.side-item.open .chev { transform: rotate(180deg); }
.side-sub { overflow: hidden; }
.side-sub .side-item { padding-left: 42px; font-size: 14.5px; }
.side-badge {
  margin-left: auto; background: var(--grad); color: #fff;
  font: 700 11px 'Inter', sans-serif; border-radius: 999px; padding: 2px 8px;
  max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.side-badge.gray { background: var(--bg2); color: var(--muted); }

/* ------------------------------------------------------------- tarjetas */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--card-shadow); padding: 24px;
}
.card-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 16px; }
.card-ic {
  width: 42px; height: 42px; border-radius: 12px; background: var(--tint);
  display: flex; align-items: center; justify-content: center; flex: none;
}
.card-ic svg { width: 21px; height: 21px; stroke: var(--accent-ink); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card-head h2, .card-head h3 { font-size: 19px; font-weight: 700; line-height: 1.25; }
.card-head .sub { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.card-head .spacer { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.big-num { font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 36px; line-height: 1.1; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.grid-2x2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.subcard { border: 1px solid var(--line); border-radius: 14px; padding: 18px; background: var(--surface); }
.subcard .sc-head { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 15px; margin-bottom: 8px; }
.subcard .sc-head svg { width: 18px; height: 18px; stroke: var(--accent-ink); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.subcard .sc-data { font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 26px; line-height: 1.15; }
.subcard .sc-data small { font: 600 14px 'Inter', sans-serif; color: var(--muted); }
.subcard .sc-detail { color: var(--muted); font-size: 13.5px; margin: 4px 0 12px; overflow-wrap: anywhere; }
.badge {
  display: inline-flex; align-items: center; gap: 5px; border-radius: 999px;
  font: 700 11.5px 'Inter', sans-serif; padding: 3px 10px; background: var(--bg2); color: var(--muted);
  text-transform: uppercase; letter-spacing: .04em;
}
.badge.green { background: var(--green-tint); color: var(--green); }
.badge.accent { background: var(--tint); color: var(--accent-ink); }
.badge.plain { text-transform: none; letter-spacing: 0; font-weight: 600; }

/* ------------------------------------------------------------- formularios */
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 6px; }
.input-wrap { position: relative; }
.input-wrap .ic {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; stroke: #9aa3b8; fill: none; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; pointer-events: none;
}
.input-wrap .eye {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  border: 0; background: none; cursor: pointer; padding: 6px; color: #9aa3b8;
  display: flex; border-radius: 8px;
}
.input-wrap .eye svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
input[type="text"], input[type="email"], input[type="password"], input[type="url"], select, textarea {
  width: 100%; font: 400 16px 'Inter', sans-serif; color: var(--text);
  background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: 12px;
  padding: 12px 14px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.input-wrap input { padding-left: 42px; }
.input-wrap input.has-eye { padding-right: 44px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--tint); }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--accent2); }
.err-band {
  background: var(--red-tint); color: var(--red); border-radius: 12px;
  padding: 11px 14px; font-size: 14px; margin-bottom: 16px; text-align: left;
}
.ok-band {
  background: var(--green-tint); color: #076b4f; border-radius: 12px;
  padding: 11px 14px; font-size: 14px; margin-bottom: 16px; text-align: left;
}
.hint { color: var(--muted); font-size: 13.5px; }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.form-row > * { flex: 1; min-width: 180px; }

/* Selector de tipo de fuente al agregar una lista (como los
   reproductores conocidos: primero el tipo, luego sus campos) */
.type-opts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.type-opt {
  text-align: left; width: 100%; font: inherit; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--surface);
  border-radius: 12px; padding: 11px 14px; color: var(--text);
}
.type-opt:hover { border-color: var(--accent); }
.type-opt.sel { border-color: var(--accent); background: var(--tint); }
.type-opt .to-name { font-weight: 700; font-size: 14.5px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.type-opt .to-desc { color: var(--muted); font-size: 12.5px; margin-top: 2px; }

/* ------------------------------------------------------------- interruptor */
.toggle { position: relative; width: 46px; height: 26px; flex: none; display: inline-block; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle .tr {
  position: absolute; inset: 0; border-radius: 999px; background: #c9d1e3;
  transition: background .2s; cursor: pointer;
}
.toggle .tr::before {
  content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; top: 3px; left: 3px; transition: transform .2s;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
}
.toggle input:checked + .tr { background: var(--green); }
.toggle input:checked + .tr::before { transform: translateX(20px); }
.toggle input:disabled + .tr { opacity: .5; cursor: default; }

/* ------------------------------------------------------------- listas y filas */
.row-item {
  display: flex; align-items: center; gap: 14px; padding: 15px 4px;
  border-bottom: 1px solid var(--line);
}
.row-item:last-child { border-bottom: 0; }
.row-item .grow { flex: 1; min-width: 0; }
.row-item .rname { font-weight: 700; font-size: 15.5px; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.row-item .rurl { font-family: var(--mono); font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 560px; }
.row-item .ractions { display: flex; gap: 8px; flex: none; }
.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.svc-card { border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: var(--surface); }
.svc-card .svc-top { display: flex; align-items: center; gap: 11px; }
.svc-tile {
  width: 40px; height: 40px; border-radius: 11px; flex: none;
  background: var(--tint); color: var(--accent-ink);
  font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 17px;
  display: flex; align-items: center; justify-content: center;
}
.svc-card .svc-name { font-weight: 700; font-size: 15px; }
.svc-card .svc-state { font-size: 13px; color: var(--muted); }
.svc-card .svc-state.on { color: var(--green); font-weight: 600; }
.svc-card .svc-state.off { color: #b97a1e; font-weight: 600; }
.svc-card .svc-actions { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.svc-card .svc-form { margin-top: 12px; }
.stat-row { display: flex; gap: 34px; flex-wrap: wrap; align-items: flex-end; }
.stat .n { font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 32px; line-height: 1; color: var(--accent-ink); }
.stat .l { color: var(--muted); font-size: 13.5px; margin-top: 5px; }
.sec-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%; background: var(--grad); color: #fff;
  font: 800 13px 'Inter', sans-serif; flex: none; margin-right: 9px; vertical-align: -6px;
}
.note-box {
  display: flex; gap: 10px; background: var(--tint); border-radius: 12px;
  padding: 13px 15px; font-size: 14px; color: var(--text); margin-bottom: 18px;
}
.note-box svg { width: 18px; height: 18px; flex: none; stroke: var(--accent-ink); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-top: 2px; }
.help-card p { margin-bottom: 10px; }
.help-card ul, .help-card ol { margin: 0 0 12px 20px; }
.help-card li { margin-bottom: 5px; }
.help-card h4 { font-family: 'Outfit', sans-serif; font-size: 15.5px; margin: 16px 0 7px; }
.help-card h4:first-child { margin-top: 0; }

/* ------------------------------------------------------------- perfiles */
.center-stage { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 20px; text-align: center; }
.wordmark { font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 21px; letter-spacing: .02em; margin-bottom: 26px; }
.wordmark span { color: var(--accent-ink); }
.stage-title { font-size: 34px; font-weight: 800; margin-bottom: 8px; }
.stage-sub { color: var(--muted); max-width: 520px; margin-bottom: 40px; }
.pf-grid { display: flex; gap: 30px; flex-wrap: wrap; justify-content: center; margin-bottom: 42px; }
.pf-item { background: none; border: 0; cursor: pointer; font-family: 'Inter', sans-serif; }
.pf-ava {
  width: 104px; height: 104px; border-radius: 50%; overflow: hidden; margin: 0 auto 11px;
  border: 3px solid transparent; transition: transform .15s, border-color .15s;
  display: flex; align-items: center; justify-content: center; background: var(--tint);
}
.pf-ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-ava svg { width: 58%; height: 58%; }
.pf-item:hover .pf-ava { transform: scale(1.05); border-color: var(--accent); }
.pf-name { font-size: 16px; font-weight: 600; color: var(--text); }
.pf-kids { display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--accent-ink); margin-top: 2px; }

/* avatares reutilizables (clases de avatars.js) */
.av-img, .av-svg { display: inline-flex; width: 100%; height: 100%; }
.av-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.p-avatar { display: inline-flex; width: 100%; height: 100%; align-items: center; justify-content: center; }
.p-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ava-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.ava-fallback svg { width: 60%; height: 60%; }

/* selector de avatar del editor */
.ava-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 10px; }
.ava-opt { border: 2px solid var(--line); border-radius: 14px; padding: 5px; background: var(--surface); cursor: pointer; }
.ava-opt img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 9px; display: block; }
.ava-opt.sel { border-color: var(--accent); background: var(--tint); }

/* ------------------------------------------------------------- colecciones */
.poster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 18px; }
.poster-card { }
.poster-img {
  aspect-ratio: 2/3; border-radius: 13px; overflow: hidden; background: var(--bg2);
  display: flex; align-items: center; justify-content: center; margin-bottom: 8px;
  border: 1px solid var(--line);
}
.poster-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.poster-img .noimg { padding: 12px; text-align: center; color: var(--muted); font-size: 13px; font-weight: 600; }
.poster-title { font-weight: 600; font-size: 14px; line-height: 1.3; }
.poster-meta { color: var(--muted); font-size: 12.5px; display: flex; gap: 7px; align-items: center; margin: 3px 0 7px; }

/* ------------------------------------------------------------- modal */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(19, 24, 40, .45); z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-card {
  background: #fff; border-radius: 20px; box-shadow: 0 30px 80px rgba(10, 10, 40, .3);
  padding: 30px; max-width: 420px; width: 100%; text-align: center;
  max-height: calc(100vh - 40px); overflow-y: auto;
}
.modal-card.left { text-align: left; }
.spinner {
  width: 46px; height: 46px; border-radius: 50%; margin: 0 auto 16px;
  border: 4px solid var(--tint2); border-top-color: var(--accent2);
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.pin-dots { display: flex; gap: 12px; justify-content: center; margin: 18px 0; }
.pin-dots span { width: 15px; height: 15px; border-radius: 50%; border: 2px solid var(--line-strong); }
.pin-dots span.f { background: var(--accent2); border-color: var(--accent2); }
.pin-pad { display: grid; grid-template-columns: repeat(3, 74px); gap: 10px; justify-content: center; }
.pin-pad button {
  font: 600 19px 'Inter', sans-serif; padding: 12px 0; border-radius: 13px;
  border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; color: var(--text);
}
.pin-pad button:hover { border-color: var(--accent); background: var(--tint); }

/* ------------------------------------------------------------- login */
.auth-card {
  background: #fff; border-radius: 24px; box-shadow: var(--card-shadow);
  border: 1px solid var(--line); padding: 30px 30px 20px; width: 100%; max-width: 392px;
  text-align: center;
}
.auth-logo { display: flex; justify-content: center; margin-bottom: 18px; }
.auth-card h1 { font-size: 21px; font-weight: 800; margin-bottom: 5px; }
.auth-sub { color: var(--muted); font-size: 13.5px; margin-bottom: 22px; }
.auth-row { display: flex; align-items: center; justify-content: space-between; margin: 2px 0 18px; }
.auth-row a { font-size: 14px; font-weight: 600; text-decoration: none; }
.auth-row a:hover { text-decoration: underline; }
.auth-alt { margin-top: 16px; font-size: 14px; color: var(--muted); }
.auth-alt a { font-weight: 600; text-decoration: none; }
.auth-alt a:hover { text-decoration: underline; }
.sep { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 18px 0 4px; }
.sep::before, .sep::after { content: ""; flex: 1; border-top: 1px solid var(--line); }

/* ------------------------------------------------------------- toast */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: #171c2e; color: #fff; font-size: 14.5px; font-weight: 500;
  padding: 12px 22px; border-radius: 999px; box-shadow: 0 16px 40px rgba(0,0,0,.3);
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 300;
  max-width: min(92vw, 560px); text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: #8f1d17; }

.empty { color: var(--muted); text-align: center; padding: 28px 10px; }
.mt { margin-top: 14px; }
.mb { margin-bottom: 14px; }

/* ------------------------------------------------------------- responsive */
@media (max-width: 980px) {
  .top-links { display: none; }
  .topbar-inner { padding: 0 14px; gap: 12px; }
  .topbar .logo-pill { font-size: 12.5px; padding: 7px 11px; }
  .layout { grid-template-columns: 1fr; }
  .grid-2, .grid-2x2 { grid-template-columns: 1fr; }
  .page { padding-top: 84px; }
  .btn-player { padding: 9px 12px; }
  .btn-player span { display: none; }
  .avatar-btn { width: 36px; height: 36px; }

  /* Lateral convertida en tira horizontal deslizable sobre el contenido */
  #sidebar { min-width: 0; }
  .side {
    position: static; display: flex; flex-direction: row; align-items: center;
    gap: 6px; overflow-x: auto; overflow-y: hidden; padding: 8px;
    min-width: 0; max-width: 100%;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .side::-webkit-scrollbar { display: none; }
  .side-head { display: none; }
  .side-item {
    width: auto; flex: none; white-space: nowrap;
    padding: 8px 11px; font-size: 14px; gap: 8px;
  }
  .side-item svg { width: 17px; height: 17px; }
  .side-item .chev { display: none; }
  .side-item[data-group] { display: none; }
  .side-sub {
    display: flex !important; flex-direction: row; gap: 6px; overflow: visible;
  }
  .side-sub .side-item { padding-left: 11px; font-size: 14px; }
  .side-badge { margin-left: 6px; }
}

@media (max-width: 640px) {
  .page { padding: 82px 14px 60px; }
  .card { padding: 18px 16px; }
  .config-row { flex-wrap: wrap; gap: 6px 14px; }

  /* Encabezados de tarjeta: el título arriba y los botones a ancho completo */
  .card-head { flex-wrap: wrap; }
  .card-head .spacer { margin-left: 0; width: 100%; }
  .card-head .spacer .btn { flex: 1 1 140px; }
  .stat-row { gap: 18px 24px; }
  .stat-row .hint { margin-left: 0 !important; max-width: 100% !important; text-align: left !important; }
  .big-num { font-size: 30px; }

  /* Formularios: campos a ancho completo y botones alcanzables */
  .form-row > * { flex-basis: 100%; min-width: 0; }
  .row-item { flex-wrap: wrap; }
  .row-item .grow { flex: 1 1 190px; }
  .row-item .rurl { max-width: 100%; }
  .row-item .ractions { margin-left: auto; }
  .row-item .ractions .btn, .svc-card .svc-actions .btn { min-height: 40px; }
  .toggle { width: 50px; height: 28px; }
  .toggle .tr::before { width: 22px; height: 22px; }
  .toggle input:checked + .tr::before { transform: translateX(22px); }

  /* Perfiles, login y colecciones */
  .stage-title { font-size: 27px; }
  .stage-sub { margin-bottom: 30px; }
  .pf-grid { gap: 20px; margin-bottom: 32px; }
  .pf-ava { width: 88px; height: 88px; }
  .auth-card { padding: 24px 20px 14px; }
  .pin-pad { grid-template-columns: repeat(3, 68px); }
  .poster-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 12px; }
  .modal-card { padding: 22px 18px; }
  .toast { font-size: 13.5px; padding: 11px 18px; }
}
