/* Dago App · paneles (dueño y administración). Claro, simple y grande para el celular. */
:root { --bg:#f5f3ef; --card:#fff; --tx:#1c1b19; --tx2:#6d6860; --line:#e4e0d8; --acc:#c9824f; --acc-d:#a4652f; --ok:#1d8a50; --warn:#b7700a; --bad:#c2353a; --r:14px; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.45 Inter, system-ui, sans-serif; color: var(--tx); background: var(--bg); padding-bottom: 86px; }
h1, h2, h3 { font-family: Manrope, Inter, sans-serif; margin: 0 0 10px; line-height: 1.15; }
h1 { font-size: 22px; } h2 { font-size: 18px; } h3 { font-size: 16px; }
a { color: var(--acc-d); }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #1c1b19; color: #fff; }
.top b { font: 800 16px Manrope, sans-serif; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top a, .top button { color: #fff; }
.top .lg { width: 34px; height: 34px; border-radius: 9px; background: var(--acc); display: grid; place-items: center; font: 800 16px Manrope; overflow: hidden; flex: none; }
.top .lg img { width: 100%; height: 100%; object-fit: cover; }
main { max-width: 760px; margin: 0 auto; padding: 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-bottom: 14px; }
.card > h2:first-child { margin-bottom: 12px; }
.hint { color: var(--tx2); font-size: 13px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 11px; border: 0; background: var(--acc); color: #fff;
  font: 700 14px Inter, sans-serif; cursor: pointer; text-decoration: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.btn:active { transform: scale(.97); }
.btn.sec { background: #ece8e1; color: var(--tx); }
.btn.line { background: transparent; color: var(--tx); border: 1.5px solid var(--line); }
.btn.ok { background: var(--ok); } .btn.bad { background: var(--bad); } .btn.wa { background: #25d366; }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn.full { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row.end { justify-content: flex-end; }
.grow { flex: 1; min-width: 0; }
label.f { display: grid; gap: 5px; margin-bottom: 12px; font-weight: 700; font-size: 13px; }
label.f small { font-weight: 500; color: var(--tx2); }
input, select, textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--tx); font: 500 15px Inter, sans-serif; }
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--acc); }
input[type=checkbox], input[type=radio] { width: 22px; min-height: 22px; height: 22px; accent-color: var(--acc); }
input[type=color] { padding: 4px; width: 64px; }
.chk { display: flex; gap: 10px; align-items: center; font-weight: 600; margin-bottom: 12px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.seg button { flex: 1 1 auto; min-height: 40px; padding: 0 12px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; font: 700 13px Inter; cursor: pointer; color: var(--tx); }
.seg button.on { background: var(--tx); color: #fff; border-color: var(--tx); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
@media (max-width: 480px) { .grid2 { grid-template-columns: 1fr; } }

/* Pestañas abajo */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr); background: #fff; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabs button { display: grid; justify-items: center; gap: 2px; padding: 8px 2px 9px; border: 0; background: none; font: 700 11px Inter; color: var(--tx2); cursor: pointer; position: relative; }
.tabs svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabs button.on { color: var(--acc-d); }
.tabs .dot { position: absolute; top: 4px; right: calc(50% - 20px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 11px; line-height: 18px; }

/* Agenda */
.dias { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 8px; }
.dias button { flex: none; min-width: 58px; padding: 8px 6px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; font: 700 12px Inter; cursor: pointer; color: var(--tx); line-height: 1.2; }
.dias button b { display: block; font-size: 18px; }
.dias button.on { background: var(--tx); color: #fff; border-color: var(--tx); }
.dias button .n { display: inline-block; margin-top: 2px; padding: 0 6px; border-radius: 8px; background: var(--acc); color: #fff; font-size: 10px; }
.turno { display: grid; grid-template-columns: 64px 1fr; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; margin-bottom: 8px; }
.turno .h { font: 800 17px Manrope; } .turno .h small { display: block; font: 600 12px Inter; color: var(--tx2); }
.turno .acc { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.st { display: inline-block; padding: 2px 9px; border-radius: 99px; font: 800 10.5px Inter; text-transform: uppercase; letter-spacing: .04em; }
.st.sena { background: #fbe7c4; color: var(--warn); } .st.confirmado { background: #d3f1df; color: var(--ok); }
.st.asistio { background: #ece8e1; color: var(--tx2); } .st.no_vino, .st.cancelado { background: #f8d9da; color: var(--bad); }
.alerta { background: #fff4e0; border: 2px solid #f0a020; border-radius: var(--r); padding: 14px; margin-bottom: 14px; animation: lat 1.2s infinite; }
@keyframes lat { 50% { border-color: #ffd27a; } }
.aviso { background: #fde8e8; border: 1px solid #f3b9bb; border-radius: var(--r); padding: 12px 14px; margin-bottom: 14px; font-weight: 600; }
.ok-msg { background: #e3f6ea; border: 1px solid #b6e2c6; border-radius: var(--r); padding: 12px 14px; margin-bottom: 14px; font-weight: 600; }

/* Listas editables */
.item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.item:first-of-type { border-top: 0; }
.item .av { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; background: #ece8e1; display: grid; place-items: center; font: 800 15px Manrope; flex: none; overflow: hidden; }
.item .av img { width: 100%; height: 100%; object-fit: cover; }
.item .grow small { display: block; color: var(--tx2); }
.off { opacity: .5; }
.galeria { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.galeria .g { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #ece8e1; }
.galeria .g img { width: 100%; height: 100%; object-fit: cover; }
.galeria .g button { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 14px; cursor: pointer; }
.galeria .g small { position: absolute; left: 0; right: 0; bottom: 0; padding: 4px 6px; background: rgba(0,0,0,.55); color: #fff; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.img-pick { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.img-pick .prev { width: 84px; height: 84px; border-radius: 12px; background: #ece8e1 center/cover no-repeat; flex: none; display: grid; place-items: center; color: var(--tx2); font-size: 12px; text-align: center; border: 1px solid var(--line); }
.img-pick .prev.wide { width: 140px; height: 84px; }
.hora-dia { display: grid; grid-template-columns: 82px 1fr; gap: 8px; align-items: start; padding: 10px 0; border-top: 1px solid var(--line); }
.hora-dia:first-child { border-top: 0; }
.rangos { display: grid; gap: 6px; }
.rango { display: flex; gap: 6px; align-items: center; }
.rango input { min-height: 40px; padding: 6px 8px; }

/* Ventanas */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(20,18,16,.55); display: grid; place-items: end center; padding: 0; }
.modal .box { width: 100%; max-width: 560px; max-height: 92dvh; overflow: auto; background: #fff; border-radius: 18px 18px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
@media (min-width: 640px) { .modal { place-items: center; } .modal .box { border-radius: 18px; } }
.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 60; background: #1c1b19; color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 700; box-shadow: 0 10px 30px rgba(0,0,0,.25); max-width: 92vw; }
.toast.bad { background: var(--bad); }
.login { max-width: 420px; margin: 8vh auto; }
.code { font: 800 22px/1.3 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .04em; background: #f5f3ef; border: 1.5px dashed var(--acc); border-radius: 12px; padding: 14px; text-align: center; word-break: break-all; }
.qr { display: grid; place-items: center; padding: 14px; background: #fff; border-radius: 12px; border: 1px solid var(--line); }
.qr svg { width: 220px; height: 220px; }
.swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 12px; }
.swatches button { border: 2px solid var(--line); border-radius: 10px; padding: 0 0 6px; background: #fff; cursor: pointer; font: 700 11px Inter; color: var(--tx); overflow: hidden; }
.swatches button .s { height: 44px; display: grid; place-items: center; font: 800 18px Manrope; margin-bottom: 4px; }
.swatches button.on { border-color: var(--tx); box-shadow: 0 0 0 2px var(--tx); }
.neg { display: grid; grid-template-columns: 52px 1fr; gap: 12px; align-items: center; }
.neg .lg { width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; font: 800 18px Manrope; overflow: hidden; color: #fff; }
.neg .lg img { width: 100%; height: 100%; object-fit: cover; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 99px; font: 700 11px Inter; background: #ece8e1; color: var(--tx2); }
.pill.ok { background: #d3f1df; color: var(--ok); } .pill.warn { background: #fbe7c4; color: var(--warn); } .pill.bad { background: #f8d9da; color: var(--bad); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.stats div { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.stats b { display: block; font: 800 22px Manrope; }
.stats span { font-size: 12px; color: var(--tx2); }
