/* Panel de administración — complementa ../css/styles.css */
body.adm { background: var(--paper); overflow-x: hidden; }
.wrap--wide { max-width: 1400px; }
[hidden] { display: none !important; }

:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--accent-dark); outline-offset: 2px; border-radius: 6px;
}
.adm .form input:focus-visible, .adm .form select:focus-visible, .adm .form textarea:focus-visible { outline: none; }

.adm-muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85em; white-space: nowrap; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.center { text-align: center; }

/* Header */
.adm-header { gap: 12px; }
.adm-header__user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.adm-header__user .btn { white-space: nowrap; }
.adm-header__name { font-weight: 600; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 22ch; }
.adm-btn-salir { background: var(--ink); color: var(--white); }
.adm-btn-salir:hover { background: var(--ink-soft); }

/* Ingreso */
.adm-login { display: grid; place-items: center; padding: 48px 16px; min-height: calc(100vh - 69px); }
.adm-login__form { width: 100%; max-width: 400px; }
.adm-login__form h1 { font-size: 1.7rem; margin: 0; }
.adm-login__form p { margin: 0; }
.adm-cargando { text-align: center; color: var(--muted); padding: 32px 16px; }

/* Layout */
.adm-app { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 28px; padding-top: 24px; padding-bottom: 64px; align-items: start; }
.adm-nav { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 4px; }
.adm-nav a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 14px; border-radius: 10px; text-decoration: none; font-weight: 500; white-space: nowrap;
}
.adm-nav a:hover { background: var(--paper-2); }
.adm-nav a.is-active { background: var(--ink); color: var(--white); }
.adm-nav__pill { background: var(--red); color: var(--white); border-radius: 999px; font-size: .75rem; font-weight: 600; min-width: 1.6em; padding: 1px 7px; text-align: center; }
.adm-main { min-width: 0; }

.adm-sec__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.adm-sec__head h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 0; }
.adm-sec__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.adm-intro { margin: -4px 0 16px; max-width: 60em; }
.adm-h2 { font-size: 1.25rem; margin: 28px 0 12px; }
.adm-nota { font-size: .85rem; margin-top: 12px; }
.adm-count { color: var(--muted); font-size: .9rem; margin: 0 0 10px; }
.adm-vacio { color: var(--muted); background: var(--white); border: 1px dashed var(--line); border-radius: var(--radius); padding: 20px; margin: 0; }
.adm-error { color: var(--red); background: #fdecea; border-radius: var(--radius); padding: 16px 20px; }

/* Herramientas / filtros */
.adm-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.adm-search { flex: 1 1 260px; min-width: 0; }
.adm-select { flex: 0 1 240px; min-width: 0; }
.adm-tools input[type=search], .adm-tools select, .adm-ed__q,
.adm-input-num, .adm-input-nota, .adm-pw input, .adm-sel-estado {
  font: inherit; color: var(--ink); background: var(--white); border: 1.5px solid var(--line); border-radius: 10px; padding: .55em .75em; width: 100%;
}
.adm-tools input:focus, .adm-tools select:focus, .adm-ed__q:focus, .adm-input-num:focus, .adm-input-nota:focus, .adm-pw input:focus, .adm-sel-estado:focus {
  border-color: var(--ink); box-shadow: 0 0 0 3px rgba(246,195,67,.45); outline: none;
}
.adm-chk { display: inline-flex !important; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.adm .form .adm-chk input, .adm-chk input { width: 18px; height: 18px; accent-color: var(--ink); margin: 0; }
.adm-help { font-weight: 400; font-size: .85rem; color: var(--muted); }

.adm-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; margin-bottom: 6px; scrollbar-width: thin; }
.adm-chip {
  font: 500 .9rem var(--font-body); color: var(--ink); background: var(--white); border: 1.5px solid var(--line);
  border-radius: 999px; padding: .4em 1em; cursor: pointer; white-space: nowrap;
}
.adm-chip:hover { border-color: var(--ink); }
.adm-chip.is-active { background: var(--ink); border-color: var(--ink); color: var(--white); }

/* Tablas */
.adm-table-wrap { position: relative; overflow-x: auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); -webkit-overflow-scrolling: touch; }
.adm-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.adm-table th, .adm-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.adm-table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; background: #fdfbf6; white-space: nowrap; }
.adm-table th.num { text-align: right; }
.adm-table tbody tr:last-child td { border-bottom: 0; }
.adm-table tfoot td { font-weight: 600; border-top: 2px solid var(--line); border-bottom: 0; }
.adm-table tbody tr:hover { background: #fffdf7; }
.adm-cell-name { display: block; font-weight: 500; min-width: 14ch; }
.adm-table small { display: block; font-size: .8rem; }
.adm-acc { white-space: nowrap; }
.adm-acc .btn + .btn { margin-left: 4px; }
td.adm-acc { white-space: normal; min-width: 180px; }
.adm-table--prod td:nth-child(3) { min-width: 220px; }
.adm-table--prod tr.is-dirty { background: #fff8e1; }
.adm-table--prod tr.is-oculto td:not(:nth-last-child(-n+5)) { opacity: .55; }
.adm-table--prod input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--ink); cursor: pointer; }
.adm .form .adm-input-num, .adm .adm-input-num { width: 6.5em; padding: .45em .6em; }
.adm .form .adm-input-nota, .adm .adm-input-nota { min-width: 14em; padding: .45em .6em; }

.adm-thumb { width: 48px; height: 48px; object-fit: contain; border-radius: 8px; background: #fff; border: 1px solid var(--line); display: block; }
.adm-thumb--vacio { background: #e9e7e1; }

/* Badges */
.adm-badge { display: inline-block; font-size: .74rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--paper-2); color: var(--ink); white-space: nowrap; vertical-align: middle; }
.adm-badge--red { background: #fde3e0; color: #a8261c; }
.adm-badge--ok { background: #dcf3e4; color: #12663a; }
.adm-badge--oferta { background: var(--accent); }
.adm-badge--may, .adm-badge--may-aprobado { background: #dfe5fb; color: var(--ink); }
.adm-badge--may-pendiente { background: #fff0c2; color: #7a5800; }
.adm-badge--may-rechazado { background: #fde3e0; color: #a8261c; }
.adm-badge--admin { background: var(--ink); color: var(--accent); }
.adm-badge--pendiente { background: #fff0c2; color: #7a5800; }
.adm-badge--confirmado { background: #dfe5fb; color: #23367a; }
.adm-badge--preparando { background: #e9defb; color: #4f2a8c; }
.adm-badge--listo { background: #d9f1f4; color: #0d5e6b; }
.adm-badge--entregado { background: #dcf3e4; color: #12663a; }
.adm-badge--cancelado { background: #ececec; color: #555; }

/* Resumen */
.adm-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.adm-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; text-decoration: none; }
.adm-card__lbl { font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.adm-card__num { font: 800 1.9rem var(--font-head); line-height: 1.1; overflow-wrap: anywhere; }
.adm-card--link:hover { border-color: var(--ink); box-shadow: var(--shadow); }
.adm-card--alerta { border-color: var(--accent); background: #fffaeb; }
.adm-estados { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.adm-estado-card { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; text-decoration: none; }
.adm-estado-card strong { font: 800 1.3rem var(--font-head); }
.adm-estado-card:hover { border-color: var(--ink); }

/* Pedidos */
.adm-pedidos { display: grid; gap: 12px; }
.adm-pedido { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; transition: opacity .2s; }
.adm-pedido.is-fuera { opacity: .5; }
.adm-pedido__top { display: flex; align-items: center; gap: 12px 18px; flex-wrap: wrap; }
.adm-pedido__id { display: flex; align-items: baseline; gap: 10px; flex: 1 1 auto; }
.adm-pedido__id strong { font: 800 1.25rem var(--font-head); }
.adm-pedido__total { display: flex; align-items: center; gap: 8px; }
.adm-pedido__total strong { font-size: 1.15rem; }
.adm-pedido__estado { flex: 0 0 auto; }
.adm-sel-estado { width: auto; font-weight: 600; padding: .45em .7em; cursor: pointer; }
.adm-sel-estado--pendiente { background: #fff0c2; }
.adm-sel-estado--confirmado { background: #dfe5fb; }
.adm-sel-estado--preparando { background: #e9defb; }
.adm-sel-estado--listo { background: #d9f1f4; }
.adm-sel-estado--entregado { background: #dcf3e4; }
.adm-sel-estado--cancelado { background: #ececec; }
.adm-pedido__info { display: grid; grid-template-columns: 1.3fr 1fr .7fr; gap: 12px 20px; margin-top: 12px; font-size: .92rem; }
.adm-pedido__info > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.adm-pedido__wa { align-self: flex-start; margin-top: 6px; }
.adm-lbl { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.adm-pedido__det { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.adm-pedido__det summary { cursor: pointer; font-weight: 600; font-size: .92rem; padding: 4px 0; }
.adm-pedido__det .adm-table-wrap { margin-top: 10px; }
.adm-pedido__notas { background: var(--paper); border-radius: 10px; padding: 10px 14px; margin: 10px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Clientes */
.adm-pend { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-bottom: 24px; }
.adm-pend__card { background: #fffaeb; border: 1.5px solid var(--accent); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.adm-pend__card > div:first-child { display: flex; flex-direction: column; overflow-wrap: anywhere; }
.adm-pend__card .adm-muted { font-size: .88rem; }
.adm-pend__acc { display: flex; gap: 8px; flex-wrap: wrap; }
.adm-dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; margin: 0; font-size: .9rem; }
.adm-dl dt { color: var(--muted); }
.adm-dl dd { margin: 0; }
.adm-pw { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.adm .adm-pw input { width: 14em; padding: .45em .6em; }

/* Paginador */
.adm-pager { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 16px; flex-wrap: wrap; }
.adm-pager .btn:disabled { opacity: .4; cursor: default; transform: none; }

/* Formularios en panel */
.adm-panel { grid-template-columns: minmax(0, 1fr); min-width: 0; }
.adm-panel > *, .adm-ed > * { min-width: 0; }
.adm-panel { margin-bottom: 20px; border: 1.5px solid var(--accent); box-shadow: var(--shadow); }
.adm-panel h2 { font-size: 1.35rem; margin: 0; }
.adm-form-acc { display: flex; gap: 10px; flex-wrap: wrap; }
.adm .form .adm-form-acc .btn { justify-self: auto; }
.adm-row-tight { gap: 12px; grid-template-columns: 1.4fr 1fr; }
.adm .btn:disabled { opacity: .55; cursor: wait; }
.adm-btn-peligro { background: var(--red); color: var(--white); }
.adm-btn-peligro:hover { background: #c8443a; }
.adm-btn-peligro-ghost { background: transparent; border-color: #f0b8b2; color: #a8261c; }
.adm-btn-peligro-ghost:hover { background: #fde3e0; }
.adm-confirm { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 600; font-size: .88rem; color: #a8261c; }

/* Editor de productos (kits y listas) */
.adm-ed { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; min-width: 0; }
.adm-ed__buscar { font-weight: 500; font-size: .92rem; }
.adm .form .adm-ed__buscar { display: block; }
.adm-ed__res { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.adm-ed__res:empty { display: none; }
.adm-ed__res-item { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; background: #fdfbf6; }
.adm-ed__res-txt { min-width: 0; display: flex; flex-direction: column; }
.adm-ed__res-txt strong { font-weight: 500; overflow-wrap: anywhere; }
.adm-ed__res-txt small { color: var(--muted); font-size: .8rem; }
.adm-ed__res-precio { font-weight: 600; white-space: nowrap; }
.adm-ed__vacio { color: var(--muted); padding: 6px 2px; }
.adm-ed__titulo { font: 600 1rem var(--font-body); margin: 10px 0 0; }
.adm-ed__total { margin: 0; text-align: right; font-size: 1.02rem; }
.adm-x { width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--white); color: var(--ink); font-size: 1.2rem; line-height: 1; cursor: pointer; }
.adm-x:hover { border-color: var(--red); color: var(--red); }
.adm-kit-resumen { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; background: var(--paper); border-radius: 12px; padding: 12px 16px; }
.adm-kit-resumen strong { font-size: 1.1rem; }

/* Escuelas */
.adm-escuela { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 14px; }
.adm-escuela__head { display: flex; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; align-items: flex-start; }
.adm-escuela__head h2 { font-size: 1.25rem; margin: 0 0 2px; overflow-wrap: anywhere; }
.adm-escuela__head .adm-acc { display: flex; flex-wrap: wrap; gap: 6px; white-space: normal; }
.adm-escuela__head .adm-acc .btn + .btn { margin-left: 0; }
.adm-escuela .adm-vacio { margin-top: 12px; padding: 12px 16px; }
.adm-ciclo h3 { font: 600 .8rem var(--font-body); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 16px 0 6px; }
.adm-listas { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; }
.adm-listas li { display: flex; justify-content: space-between; align-items: center; gap: 8px 16px; flex-wrap: wrap; padding: 10px 14px; }
.adm-listas li + li { border-top: 1px solid var(--line); }
.adm-listas__nom { display: flex; flex-direction: column; min-width: 0; }
.adm-listas__nom small { font-size: .82rem; }
.adm-listas .adm-acc { display: flex; flex-wrap: wrap; gap: 6px; white-space: normal; }
.adm-listas .adm-acc .btn + .btn { margin-left: 0; }

/* Configuración */
.adm-config { max-width: 620px; }
.adm-ejemplo { background: var(--paper); border-left: 4px solid var(--accent); border-radius: 10px; padding: 12px 16px; font-size: .95rem; }

/* Toasts */
.adm-toasts { position: fixed; right: 16px; bottom: 16px; left: 16px; z-index: 50; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; pointer-events: none; }
.adm-toast {
  pointer-events: auto; max-width: 420px; background: var(--ink); color: var(--white); padding: 12px 16px; border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.2); font-size: .92rem; animation: adm-in .2s ease-out; transition: opacity .35s, transform .35s;
}
.adm-toast--error { background: #a8261c; }
.adm-toast.is-out { opacity: 0; transform: translateY(8px); }
@keyframes adm-in { from { opacity: 0; transform: translateY(8px); } }

/* Responsive */
@media (max-width: 900px) {
  .adm-app { grid-template-columns: minmax(0, 1fr); gap: 14px; padding-top: 0; }
  .adm-nav {
    position: sticky; top: 68px; z-index: 15; flex-direction: row; overflow-x: auto; gap: 4px;
    margin: 0 -16px; padding: 8px 16px; background: var(--paper); border-bottom: 1px solid var(--line); scrollbar-width: none;
  }
  .adm-nav::-webkit-scrollbar { display: none; }
  .adm-nav a { padding: 8px 12px; flex: 0 0 auto; }
  .adm-pedido__info { grid-template-columns: 1fr 1fr; }
  .adm-pedido__info > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .adm .form__row { grid-template-columns: 1fr; }
  .adm-row-tight { grid-template-columns: 1.4fr 1fr !important; }
  .adm-header__name { display: none; }
}
@media (max-width: 520px) {
  .adm .logo__text small { display: none; }
  .adm .logo__mark { width: 34px; height: 34px; font-size: 1.25rem; }
  .adm .logo__text { font-size: 1.1rem; }
  .adm-header__user { gap: 6px; }
  .adm-header__user .btn { padding: .5em .8em; font-size: .85rem; }
  .adm-pedido { padding: 14px; }
  .adm-pedido__info { grid-template-columns: 1fr; }
  .adm-ed__res-item { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .adm-ed__res-item .adm-thumb { width: 40px; height: 40px; grid-row: 1 / span 2; }
  .adm-ed__res-precio { grid-column: 2; }
  .adm-ed__res-item .btn { grid-column: 3; grid-row: 1 / span 2; }
  .adm .form { padding: 18px; }
  .adm-row-tight { grid-template-columns: 1fr !important; }
  .adm-card__num { font-size: 1.6rem; }
}

/* Colecciones */
.adm-swatch { --sw: #2b59c3; display: inline-block; width: 28px; height: 28px; border-radius: 50%; background: var(--sw); flex: 0 0 auto; box-shadow: inset 0 0 0 2px rgba(0,0,0,.08); }
.adm-swatch--azul { --sw: #2b59c3; }
.adm-swatch--rojo { --sw: var(--red); }
.adm-swatch--verde { --sw: var(--wa); }
.adm-swatch--violeta { --sw: #7b3fa0; }
.adm-swatch--amarillo { --sw: var(--accent); }
.adm-cols { display: grid; gap: 10px; }
.adm-col { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 10px 16px; align-items: center; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.adm-col__txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.adm-col__txt small { font-size: .85rem; }
.adm-col__fotos { display: flex; gap: 6px; }
.adm-col__fotos .adm-thumb { width: 44px; height: 44px; }
.adm-col .adm-acc { white-space: nowrap; min-width: 0; }
.adm-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.adm-fieldset legend { font-weight: 500; font-size: .92rem; padding: 0; margin-bottom: 6px; }
.adm-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.adm .form .adm-swatch-opt { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--white); cursor: pointer; font-weight: 500; position: relative; }
.adm-swatch-opt input, .adm-seg input { position: absolute; opacity: 0; width: 1px !important; height: 1px; margin: 0; pointer-events: none; }
.adm .form .adm-swatch-opt:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink) inset; }
.adm-swatch-opt:has(input:focus-visible), .adm-seg label:has(input:focus-visible) { outline: 3px solid var(--accent-dark); outline-offset: 2px; }
.adm-seg { display: inline-flex; flex-wrap: wrap; border: 1.5px solid var(--ink); border-radius: 999px; overflow: hidden; }
.adm .form .adm-seg label { display: block; position: relative; cursor: pointer; }
.adm-seg span { display: block; padding: .5em 1.1em; font-weight: 600; font-size: .92rem; }
.adm-seg input:checked + span { background: var(--ink); color: var(--white); }
.adm-col-prev { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.adm-col-prev li { display: flex; flex-direction: column; gap: 4px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 8px; font-size: .85rem; min-width: 0; }
.adm-col-prev .adm-thumb { width: 100%; height: 96px; }
.adm-col-prev span { overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.adm-hint { margin: 0; font-size: .88rem; color: var(--ink-soft); background: var(--paper); border-left: 4px solid var(--accent); border-radius: 8px; padding: 8px 12px; }
.adm .form__row.adm-row-col { grid-template-columns: minmax(0, 1fr) 140px; }
@media (max-width: 760px) {
  .adm-col { grid-template-columns: auto minmax(0, 1fr); }
  .adm-col__fotos, .adm-col .adm-acc { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .adm .form__row.adm-row-col { grid-template-columns: 1fr; }
}

/* Productos propios */
.adm-foto { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 16px; align-items: start; }
.adm-foto__prev .adm-foto__img { width: 120px; height: 120px; }
.adm-help--error { color: #a8261c; font-weight: 500; }

/* Conectar IA */
.adm-ia__lead { color: var(--ink-soft); font-size: 1.02rem; }
.adm-ia__url { background: var(--white); border: 1.5px solid var(--accent); border-radius: var(--radius); padding: 18px; margin-bottom: 20px; box-shadow: var(--shadow); }
.adm-ia__url label { display: block; font-weight: 600; margin-bottom: 8px; }
.adm-copy { display: flex; gap: 10px; flex-wrap: wrap; }
.adm-copy input {
  flex: 1 1 260px; min-width: 0; font: 600 1.1rem ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--line); border-radius: 10px; padding: .7em .85em;
}
.adm-copy input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(246,195,67,.45); }
.adm-ia__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.adm-ia__card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; min-width: 0; }
.adm-ia__card--wide { grid-column: 1 / -1; }
.adm-ia__card h2 { font-size: 1.25rem; margin: 0 0 2px; }
.adm-ia__card > p.adm-muted { margin: 0 0 10px; font-size: .9rem; }
.adm-ia__card ol { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; }
.adm-ia__lbl { margin: 12px 0 6px; font-weight: 500; font-size: .92rem; }
.adm-code { display: flex; gap: 10px; align-items: center; background: #141e40; color: #e8ecfa; border-radius: 10px; padding: 10px 12px; }
.adm-code code { flex: 1 1 auto; min-width: 0; font: .85rem ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.adm-code .btn { border-color: #aab3d1; color: #e8ecfa; flex: 0 0 auto; }
.adm-code .btn:hover { background: #e8ecfa; color: var(--ink); }
.adm-ia__card p code { background: var(--paper); padding: 1px 6px; border-radius: 6px; font-size: .85em; }
.adm-ia__avisos, .adm-ia__ejemplos { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; max-width: 60em; }
.adm-ia__ejemplos { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.adm-ia__ejemplos li { background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: .92rem; }
@media (max-width: 760px) {
  .adm-ia__grid { grid-template-columns: minmax(0, 1fr); }
  .adm-foto { grid-template-columns: minmax(0, 1fr) 88px; }
  .adm-foto__prev .adm-foto__img { width: 88px; height: 88px; }
  .adm-ia__ejemplos li { border-radius: 12px; }
}
.adm .form .adm-chk { white-space: normal; align-items: flex-start; }
.adm .form .adm-chk input { margin-top: 3px; flex: 0 0 auto; }

/* Administrador de fotos */
.adm-table tr.adm-fm-row:hover { background: transparent; }
.adm-fm-row > td { background: #fdfbf6; padding: 14px; }
.adm-fm { display: grid; gap: 12px; width: min(900px, calc(100vw - 64px), 100%); position: sticky; left: 14px; }
.adm-fm__head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.adm-fm__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.adm-fm__item { position: relative; display: flex; flex-direction: column; gap: 6px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 8px; min-width: 0; }
.adm-fm__item img, .adm-fm__vacia { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 8px; background: #fff; display: block; }
.adm-fm__vacia { background: #e9e7e1; }
.adm-fm__item img.is-rota { background: repeating-linear-gradient(45deg, #fde3e0 0 8px, #fff 8px 16px); }
.adm-fm__item--fija { border-style: dashed; background: var(--paper); }
.adm-fm__lbl { font-size: .78rem; color: var(--muted); font-weight: 600; line-height: 1.25; }
.adm-fm__btns { display: flex; justify-content: space-between; gap: 4px; }
.adm-fm__btns .adm-x { width: 32px; height: 32px; font-size: 1rem; }
.adm-fm__btns .adm-x:disabled { opacity: .35; cursor: default; }
.adm-fm__btns .adm-x--del:hover { border-color: var(--red); color: var(--red); }
.adm-fm__subidas { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.adm-fm__subidas:empty { display: none; }
.adm-fm__sub { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .88rem; background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; }
.adm-fm__sub-nom { font-weight: 500; overflow-wrap: anywhere; min-width: 0; flex: 1 1 140px; }
.adm-fm__sub progress { width: 90px; accent-color: var(--ink); }
.adm-fm__sub--error { border-color: #f0b8b2; background: #fdecea; color: #a8261c; }
.adm-fm__acc { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.adm-fm__subir { position: relative; }
.adm-fm__subir input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; font-size: 0; }
.adm-fm__subir:focus-within { outline: 3px solid var(--accent-dark); outline-offset: 2px; }
.adm-fm__subir.is-disabled { opacity: .45; pointer-events: none; }
.adm-fm__link { display: flex; gap: 6px; flex: 1 1 280px; min-width: 0; }
.adm-fm__link input { flex: 1 1 auto; min-width: 0; font: inherit; font-size: .9rem; color: var(--ink); background: var(--white); border: 1.5px solid var(--line); border-radius: 10px; padding: .45em .7em; }
.adm-fm__link input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(246,195,67,.45); }
.adm-fm__pie { display: flex; gap: 8px; flex-wrap: wrap; }
.adm-fm__pie .btn:disabled { opacity: .45; cursor: default; transform: none; }
@media (max-width: 520px) {
  .adm-fm__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .adm-fm__link { flex-basis: 100%; }
}
