/* Ajustes para celulares de la web pública */
body { overflow-x: clip; }
#inicio h1 { overflow-wrap: break-word; }
@media (max-width: 420px) {
  #inicio .glass-card { padding: 2.25rem 1.25rem; }
  #inicio h1 { font-size: 1.85rem; }
}

/* Estilos del modo administrador (no afectan la web pública) */
.adm-on .adm-editable { outline: 1px dashed rgba(250, 204, 21, .55); outline-offset: 3px; border-radius: 4px; cursor: text; min-width: 2ch; }
.adm-on .adm-editable:hover { outline-color: #facc15; background: rgba(250, 204, 21, .06); }
.adm-on .adm-editable:focus { outline: 2px solid #facc15; background: rgba(0, 0, 0, .15); }
.adm-on .adm-editable:empty::before { content: attr(data-placeholder); opacity: .5; font-style: italic; }
.adm-on .adm-editable:empty:not([data-placeholder])::before { content: "(vacío)"; }
.adm-on .adm-img { cursor: pointer; outline: 2px dashed rgba(250, 204, 21, .7); outline-offset: 2px; }
.adm-on .adm-img:hover { filter: brightness(.75); }
.adm-on #floating-contact { display: none; }

.adm-item-ctrl { position: absolute; top: 6px; right: 6px; z-index: 5; display: flex; gap: 4px; }
.adm-item-ctrl > * { width: 30px; height: 30px; border-radius: 8px; border: 0; display: grid; place-items: center; font: 600 14px/1 Manrope, sans-serif; color: #fff; background: rgba(0, 0, 0, .55); }
.adm-handle { cursor: grab; user-select: none; font-size: 18px !important; }
.adm-del { cursor: pointer; }
.adm-del:hover { background: #dc2626; }
#list-comite .adm-item-ctrl { right: 50%; transform: translateX(118px); }
.sortable-ghost { opacity: .35; }

.adm-add-wrap { display: flex; justify-content: center; margin-top: 1.5rem; }
.adm-add { border: 2px dashed rgba(250, 204, 21, .7); color: #facc15; background: rgba(0, 0, 0, .15); padding: .7rem 1.4rem; border-radius: 999px; font-weight: 700; font-size: .9rem; cursor: pointer; }
.adm-add:hover { background: #facc15; color: #7f1d1d; }

/* barra flotante */
#adm-toolbar { position: fixed; left: 16px; bottom: 16px; z-index: 9999; width: 290px; max-width: calc(100vw - 32px); background: #1c0606; color: #fff; border: 1px solid rgba(250, 204, 21, .45); border-radius: 18px; padding: 12px; box-shadow: 0 20px 50px rgba(0, 0, 0, .5); font-family: Manrope, sans-serif; display: grid; gap: 8px; }
.adm-tb-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.adm-tb-row .adm-btn { flex: 1; }
.adm-tb-foot { font-size: 12px; color: rgba(255, 255, 255, .6); justify-content: space-between; }
.adm-tb-foot span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.adm-badge { background: #facc15; color: #7f1d1d; font-weight: 800; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; padding: 3px 8px; border-radius: 6px; }
#adm-status { font-size: 12px; color: rgba(255, 255, 255, .7); }
#adm-status.adm-warn { color: #facc15; font-weight: 700; }
#adm-toolbar.adm-min > .adm-tb-row:not(:first-child):not(.adm-tb-foot) { display: none; }

.adm-btn { border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .08); color: #fff; padding: 8px 12px; border-radius: 10px; font: 700 13px Manrope, sans-serif; cursor: pointer; }
.adm-btn:hover:not(:disabled) { background: rgba(255, 255, 255, .18); }
.adm-btn:disabled { opacity: .45; cursor: default; }
.adm-primary { background: #facc15; color: #7f1d1d; border-color: #facc15; }
.adm-primary:hover:not(:disabled) { background: #fff; color: #b91c1c; }
.adm-link { background: none; border: 0; color: rgba(255, 255, 255, .75); font: 700 12px Manrope, sans-serif; cursor: pointer; text-decoration: underline; }
.adm-danger { color: #fca5a5; }

/* ventanas */
.adm-overlay { position: fixed; inset: 0; z-index: 10000; background: rgba(0, 0, 0, .65); display: flex; align-items: center; justify-content: center; padding: 16px; font-family: Manrope, sans-serif; overflow-y: auto; }
.adm-modal { width: 100%; max-width: 420px; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); margin: auto; overflow: auto; background: #2a0909; color: #fff; border: 1px solid rgba(250, 204, 21, .35); border-radius: 22px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.adm-wide { max-width: 920px; }
.adm-modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid rgba(255, 255, 255, .1); position: sticky; top: 0; background: #2a0909; z-index: 1; }
.adm-modal-head h3 { font-weight: 800; font-size: 18px; margin: 0; }
.adm-x { background: none; border: 0; color: #fff; font-size: 18px; cursor: pointer; opacity: .7; }
.adm-modal-body { padding: 20px 22px 24px; }
.adm-form { display: grid; gap: 14px; }
.adm-form label { display: grid; gap: 6px; font-size: 13px; font-weight: 700; }
.adm-form input { width: 100%; background: rgba(0, 0, 0, .3); border: 1px solid rgba(255, 255, 255, .15); border-radius: 10px; padding: 10px 12px; color: #fff; font: 500 16px Manrope, sans-serif; outline: none; min-width: 0; }
.adm-form input:focus { border-color: #facc15; }
.adm-inline { grid-template-columns: 1fr auto; margin: 14px 0; }
.adm-help { font-size: 13px; color: rgba(255, 255, 255, .7); line-height: 1.5; margin: 0; }
.adm-error { font-size: 13px; color: #fde047; margin: 0; }
.adm-links { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.adm-links a { color: rgba(255, 255, 255, .75); text-decoration: underline; }

.adm-admin-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.adm-admin-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; background: rgba(0, 0, 0, .25); border-radius: 10px; font-size: 14px; word-break: break-all; }
.adm-admin-list em { color: #facc15; font-style: normal; font-size: 12px; }

.adm-gal-actions { display: flex; align-items: center; gap: 12px; margin: 14px 0; flex-wrap: wrap; }
.adm-gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.adm-gal-item { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: rgba(0, 0, 0, .3); cursor: grab; border: 1px solid rgba(250, 204, 21, .2); }
.adm-gal-item img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.adm-gal-n { position: absolute; left: 6px; top: 6px; background: rgba(0, 0, 0, .65); font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 6px; }
.adm-gal-del { position: absolute; right: 6px; top: 6px; width: 28px; height: 28px; border-radius: 8px; border: 0; background: rgba(0, 0, 0, .65); color: #fff; cursor: pointer; }
.adm-gal-del:hover { background: #dc2626; }

.adm-img-rows { display: grid; gap: 8px; }
.adm-img-row { display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 12px; padding: 8px; background: rgba(0, 0, 0, .25); border-radius: 12px; font-size: 13px; font-weight: 700; }
.adm-img-row img { width: 56px; height: 40px; object-fit: contain; border-radius: 6px; background: rgba(255, 255, 255, .06); }

.adm-toast { position: fixed; left: 50%; top: 20px; transform: translate(-50%, -20px); opacity: 0; z-index: 10001; padding: 12px 18px; border-radius: 12px; font: 700 14px Manrope, sans-serif; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); transition: all .3s; max-width: calc(100vw - 32px); text-align: center; }
.adm-toast.adm-show { opacity: 1; transform: translate(-50%, 0); }
.adm-toast-ok { background: #facc15; color: #7f1d1d; }
.adm-toast-err { background: #fff; color: #b91c1c; }

@media (max-width: 640px) {
  #adm-toolbar { left: 8px; right: 8px; bottom: 8px; width: auto; max-width: none; padding: 10px; gap: 6px; }
  #adm-toolbar .adm-btn { padding: 7px 8px; font-size: 12px; }
  .adm-overlay { padding: 10px; }
  .adm-modal-head { padding: 14px 16px; }
  .adm-modal-body { padding: 16px; }
  .adm-gal-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
  .adm-img-row { grid-template-columns: 48px 1fr auto; gap: 8px; }
  .adm-img-row img { width: 48px; }
  /* deja lugar al final de la página para que la barra no tape el pie */
  body.adm-on { padding-bottom: 190px; }
}
body.adm-on { padding-bottom: 210px; }
