/* Panel de administración */
.adm { background: var(--niebla); min-height: 100vh; }
.adm__top { border-bottom: 3px solid var(--rojo); display: flex; align-items: center; gap: 1.5rem; background: var(--carbon); color: var(--blanco); padding: .6rem 1.25rem; padding-top: calc(.6rem + env(safe-area-inset-top, 0px)); flex-wrap: wrap; position: sticky; top: 0; z-index: 10; }
.adm__top .brand img { height: 30px; width: auto; }
.adm__top .brand__sub { color: #A9ACB2; }
.login .brand img { height: 40px; width: auto; }
.adm__nav { display: flex; gap: .25rem; flex-wrap: wrap; }
.adm__nav a { color: #C9CBCF; text-decoration: none; padding: .45rem .75rem; border-radius: var(--r-sm); }
.adm__nav a:hover { color: var(--blanco); background: var(--acero); }
.adm__nav a[aria-current] { color: var(--blanco); background: var(--rojo); }
.adm__user { margin-left: auto; font-size: .9rem; }
.adm__user a { color: #C9CBCF; }
.adm__main { width: min(100% - 2rem, 1280px); margin: 1.5rem auto 4rem; }
.adm__bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.adm__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: start; }
.adm__cols--cal { grid-template-columns: 1.1fr 1fr; }
@media (max-width: 900px) { .adm__cols, .adm__cols--cal { grid-template-columns: 1fr; } }
.panel { background: var(--blanco); border-radius: var(--r-md); padding: 1.25rem; border: 1px solid var(--gris); }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: 1rem 0 1.5rem; }
.kpi { background: var(--blanco); border: 1px solid var(--gris); border-left: 4px solid var(--rojo); border-radius: var(--r-md); padding: 1rem 1.25rem; text-decoration: none; display: grid; }
.kpi b { font: 700 2rem/1.1 var(--f-display); }
.kpi span { color: var(--muted); font-size: .9rem; }
@media (max-width: 800px) { .kpis { grid-template-columns: 1fr 1fr; } }
.badge { display: inline-block; font-size: .72rem; font-weight: 600; padding: .15rem .5rem; border-radius: 99px; background: var(--niebla); vertical-align: middle; }
.badge--pendiente, .badge--nuevo, .badge--consultar { background: #FFF3DC; color: #8A5A00; }
.badge--confirmada, .badge--confirmado, .badge--pagado, .badge--ok, .badge--disponible { background: #E3F4EA; color: #17693A; }
.badge--completada, .badge--entregado, .badge--despachado { background: #E6EAF5; color: #2C3E73; }
.badge--cancelada, .badge--cancelado, .badge--agotado { background: #FBE6E4; color: #8E1F18; }
.agenda { list-style: none; padding: 0; margin: 0 0 1rem; }
.agenda li { display: grid; grid-template-columns: 56px 1fr auto; gap: .75rem; align-items: center; padding: .7rem 0; border-bottom: 1px solid var(--gris); }
.agenda li > b { font: 700 1.2rem var(--f-display); }
.appt { display: grid; grid-template-columns: 60px 1fr; gap: .75rem; padding: 1rem 0; border-bottom: 1px solid var(--gris); }
.appt p { margin: 0 0 .25rem; }
.appt__time { font-size: .85rem; color: var(--muted); } .appt__time b { font: 700 1.35rem var(--f-display); color: var(--texto); }
.appt--cancelada { opacity: .55; }
.appt__act { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .5rem; }
.appt__act form { display: flex; gap: .4rem; flex-wrap: wrap; }
.btn--sm { min-height: 36px; padding: .35rem .75rem; font-size: .88rem; }
a.day { text-decoration: none; color: inherit; }
.day .pend { color: var(--rojo-osc); }
.tabs { display: flex; gap: .25rem; background: var(--blanco); padding: .25rem; border-radius: var(--r-md); border: 1px solid var(--gris); }
.tabs a { padding: .45rem .8rem; border-radius: var(--r-sm); text-decoration: none; font-weight: 500; }
.tabs a[aria-current] { background: var(--carbon); color: var(--blanco); }
.inline { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.inline input, .inline select { width: auto !important; }
.in-price { width: 110px !important; text-align: right; min-height: 38px !important; }
.thumb { width: 160px; border-radius: var(--r-sm); background: var(--niebla); margin: -.5rem 0 1rem; }
.thumb--sm { width: 56px; margin: 0; aspect-ratio: 4/3; object-fit: contain; }
tr.is-off { opacity: .5; }
.check { display: flex; gap: .5rem; align-items: center; margin-bottom: .75rem; }
.check input { accent-color: var(--rojo); width: 18px; height: 18px; }
.adm--login { display: grid; place-items: center; background: var(--carbon); }
.login { background: var(--blanco); padding: 2rem; border-radius: var(--r-md); width: min(100% - 2rem, 380px); border-top: 4px solid var(--rojo); }
.login .brand { margin-bottom: 1rem; }

/* Botones de WhatsApp, peligro y listas de tareas */
.btn--wa { background: #1FA855; color: #fff; }
.btn--wa:hover { background: #178A45; }
.btn--wa::before { content: ''; width: 16px; height: 16px; flex: none; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M16 3a13 13 0 0 0-11.1 19.8L3 29l6.4-1.8A13 13 0 1 0 16 3Z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M16 3a13 13 0 0 0-11.1 19.8L3 29l6.4-1.8A13 13 0 1 0 16 3Z'/%3E%3C/svg%3E") center / contain no-repeat; }
.btn--off { background: var(--niebla); color: var(--muted); cursor: default; border: 1px dashed #C8CBD0; }
.btn--danger { background: var(--bad); color: #fff; }
.btn--danger:hover { background: #8E1F18; }
.btn--ghost-danger { background: none; color: var(--bad); border: 1px solid transparent; }
.btn--ghost-danger:hover { border-color: var(--bad); background: #FBEAE9; }
.sent { font-size: .78rem; color: var(--ok); font-weight: 600; align-self: center; }
.sent::before { content: '✓ '; }
.appt__wa { display: flex; flex-wrap: wrap; gap: .4rem .75rem; margin-top: .5rem; }
.rowact { white-space: nowrap; }
.rowact, .rowact form { display: flex; gap: .3rem; align-items: center; }
.danger { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1.25rem;
  background: var(--blanco); border: 1px solid #F0C4C0; border-left: 4px solid var(--bad); border-radius: var(--r-md); padding: 1rem 1.25rem; }
.danger p { margin: .2rem 0 0; }
.in-qty { width: 72px !important; min-height: 38px !important; text-align: center; }
.additem { display: grid; grid-template-columns: 1fr 90px; gap: .75rem; margin-top: 1rem; }
.check--sm { margin: 0; justify-content: center; }
.panel--alert { border-left: 4px solid #1FA855; margin-bottom: 1.25rem; }
.todo { display: flex; justify-content: space-between; align-items: center; gap: .75rem 1rem; flex-wrap: wrap; padding: .75rem 0; border-bottom: 1px solid var(--gris); }
.todo:last-child { border-bottom: 0; }
.todo__act { display: flex; flex-wrap: wrap; gap: .4rem .75rem; align-items: center; }

/* Portada */
.fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.25rem; margin-top: 1rem; }
.foto__prev { background: var(--niebla); border-radius: var(--r-sm); display: grid; place-items: center; overflow: hidden; margin: .5rem 0; }
.foto__prev--hero { aspect-ratio: 1920 / 1000; }
.foto__prev--cat { aspect-ratio: 16 / 10; }
.foto__prev img { width: 100%; height: 100%; object-fit: cover; }
.foto__prev span { padding: 1rem; text-align: center; }
.foto__form { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-bottom: .5rem; }
.foto__form input[type=file] { flex: 1; min-width: 0; min-height: 0 !important; padding: .4rem !important; }
.foto:first-child { grid-column: 1 / -1; }
.foto:first-child .foto__prev { max-width: 760px; }
