/* DOLCETTINO Domiciliarios — app a pantalla completa */
html, body.rep { margin: 0; height: 100%; background: var(--dc-choco); color: var(--dc-choco); font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
.rep * { box-sizing: border-box; }
.rep-btn { display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 52px; padding: 0 18px; border: 0; border-radius: 16px; background: linear-gradient(180deg, #D9B67D, var(--dc-dorado)); color: var(--dc-choco); font-weight: 800; font-size: 1rem; font-family: inherit; cursor: pointer; text-decoration: none; }
.rep-btn:disabled { opacity: .6; }
.rep-btn--sm { min-height: 42px; font-size: .9rem; background: var(--dc-choco); color: var(--dc-crema); }
.rep-btn--big { min-height: 60px; font-size: 1.08rem; margin-top: 10px; }
.rep-btn--ok { background: #25d366; color: #fff; }
.rep-btn--line { background: transparent; border: 1.5px solid rgba(41, 22, 15, .25); margin-top: 16px; }
.rep-link { display: block; width: 100%; margin-top: 10px; padding: 10px; border: 0; background: none; color: var(--dc-terracota); font-weight: 700; font-family: inherit; text-decoration: underline; }
.rep-err { margin: 0; padding: 10px 12px; border-radius: 12px; background: #fbe9e6; color: var(--dc-bad); font-weight: 700; }
.rep-muted { color: #8c6f5e; font-size: .85rem; }

/* Ingreso */
.rep-login { min-height: 100%; display: grid; align-content: center; gap: 22px; padding: 28px 20px calc(28px + env(safe-area-inset-bottom)); background: radial-gradient(120% 70% at 50% 0%, #4a2a1d, var(--dc-choco) 70%); }
.rep-login__brand { text-align: center; color: var(--dc-crema); }
.rep-login__brand span { display: block; font-weight: 900; font-size: 2rem; letter-spacing: .06em; }
.rep-login__brand small { color: var(--dc-dorado); font-weight: 800; letter-spacing: .3em; text-transform: uppercase; font-size: .75rem; }
.rep-login__form { display: grid; gap: 12px; max-width: 420px; width: 100%; margin: 0 auto; padding: 22px; border-radius: 24px; background: var(--dc-blanco); }
.rep-login__form h1 { margin: 0 0 4px; font-size: 1.4rem; }
.rep-login__form label { display: grid; gap: 6px; font-weight: 700; font-size: .85rem; }
.rep-login__form input { min-height: 52px; padding: 0 14px; border-radius: 14px; border: 1.5px solid rgba(41, 22, 15, .2); font-size: 16px; font-family: inherit; }
.rep-login__help { margin: 0; text-align: center; font-size: .82rem; color: #7b5e4c; }

/* App */
.rep-app { position: fixed; inset: 0; }
.rep-map { position: absolute; inset: 0; height: auto; border-radius: 0; border: 0; }
.rep-top { position: absolute; top: 0; left: 0; right: 0; z-index: 500; display: flex; align-items: center; gap: 12px; padding: calc(10px + env(safe-area-inset-top)) 14px 10px; background: rgba(255, 249, 241, .97); box-shadow: 0 6px 20px -12px rgba(0, 0, 0, .5); }
.rep-avatar { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--dc-choco); color: var(--dc-dorado); font-weight: 900; font-size: 1.1rem; font-family: inherit; }
.rep-avatar.is-big { width: 58px; height: 58px; font-size: 1.5rem; }
.rep-top__status { flex: 1; min-width: 0; }
.rep-top__status strong { display: block; font-size: 1.02rem; }
.rep-top__status small { display: block; color: #7b5e4c; font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rep-top__status small.is-bad { color: var(--dc-bad); font-weight: 700; }
.rep-switch { position: relative; width: 60px; height: 34px; flex: none; }
.rep-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.rep-switch span { position: absolute; inset: 0; border-radius: 999px; background: #cbbfae; transition: background .2s; }
.rep-switch span::after { content: ""; position: absolute; top: 4px; left: 4px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); transition: transform .2s; }
.rep-switch input:checked + span { background: #22b573; }
.rep-switch input:checked + span::after { transform: translateX(26px); }
.rep-recenter { position: absolute; right: 14px; bottom: calc(46vh + 14px); z-index: 500; width: 46px; height: 46px; border-radius: 50%; border: 0; background: #fff; color: var(--dc-choco); box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .5); display: grid; place-items: center; }
.rep-recenter svg { width: 22px; height: 22px; }

.rep-sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 600; height: 46vh; display: flex; flex-direction: column; border-radius: 24px 24px 0 0; background: var(--dc-blanco); box-shadow: 0 -12px 30px -16px rgba(0, 0, 0, .6); padding: 6px 14px calc(12px + env(safe-area-inset-bottom)); transition: height .25s; }
.rep-sheet.is-min { height: 118px; }
.rep-sheet__grip { align-self: center; width: 44px; height: 5px; margin: 4px 0 8px; border-radius: 99px; background: rgba(41, 22, 15, .2); cursor: pointer; }
.rep-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 14px; background: #f1e6d4; flex: none; }
.rep-tabs[hidden] { display: none; }
.rep-tabs button { min-height: 40px; border: 0; border-radius: 10px; background: transparent; color: #6b5040; font-weight: 800; font-size: .84rem; font-family: inherit; }
.rep-tabs button b { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 2px; border-radius: 99px; background: rgba(41, 22, 15, .12); font-size: .72rem; }
.rep-tabs button[aria-selected="true"] { background: var(--dc-choco); color: var(--dc-crema); }
.rep-tabs button[aria-selected="true"] b { background: var(--dc-dorado); color: var(--dc-choco); }
.rep-panel { flex: 1; overflow-y: auto; padding: 10px 2px 4px; -webkit-overflow-scrolling: touch; }
.rep-panel[hidden] { display: none; }

.rep-card { display: grid; gap: 8px; padding: 14px; margin-bottom: 10px; border-radius: 18px; background: #fff; border: 1px solid rgba(41, 22, 15, .08); box-shadow: 0 8px 20px -16px rgba(0, 0, 0, .5); }
.rep-card header { display: flex; justify-content: space-between; align-items: center; }
.rep-card header strong { font-size: 1.1rem; }
.rep-card__route { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; font-size: .9rem; }
.rep-card__route span { display: flex; align-items: center; gap: 6px; grid-column: 1 / -1; }
.rep-card__route svg { width: 18px; height: 18px; color: var(--dc-terracota); flex: none; }
.rep-card__route i { display: block; width: 2px; height: 10px; margin-left: 8px; background: rgba(41, 22, 15, .2); grid-column: 1 / -1; }
.rep-card__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .84rem; color: #6b5040; }
.rep-card__meta b { color: var(--dc-choco); font-size: 1rem; }
.rep-card__cash { margin: 0; padding: 8px 10px; border-radius: 10px; background: #fff4dc; color: #7a4f00; font-size: .88rem; }
.rep-chip { padding: 4px 10px; border-radius: 999px; background: #f1e6d4; font-size: .72rem; font-weight: 800; }
.rep-chip--ready { background: #e6f6ec; color: #1d6b3c; }
.rep-chip--on-the-way { background: #fff1d6; color: #8a5a00; }
.rep-empty { text-align: center; padding: 18px 10px; color: #6b5040; }
.rep-empty h3 { margin: 8px 0 4px; color: var(--dc-choco); }
.rep-empty p { margin: 0; font-size: .9rem; }
.rep-pulse { display: inline-block; width: 18px; height: 18px; border-radius: 50%; background: #22b573; animation: dolcePulse 1.6s ease-out infinite; }

.rep-back { border: 0; background: none; padding: 4px 0 8px; font-weight: 800; color: var(--dc-terracota); font-family: inherit; font-size: .95rem; }
.rep-detail__head { display: flex; justify-content: space-between; align-items: center; }
.rep-detail__head h3 { margin: 0; font-size: 1.4rem; }
.rep-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; list-style: none; margin: 10px 0; padding: 0; }
.rep-steps li { padding: 6px 0 0; border-top: 4px solid #e6dccb; font-size: .78rem; font-weight: 800; color: #9b8574; text-align: center; }
.rep-steps li.is-on { border-color: var(--dc-dorado); color: var(--dc-choco); }
.rep-box { padding: 12px 14px; margin-bottom: 10px; border-radius: 16px; background: #fff; border: 1px solid rgba(41, 22, 15, .08); }
.rep-box p { margin: 2px 0; }
.rep-box ul { margin: 6px 0; padding-left: 18px; font-size: .92rem; }
.rep-label { font-size: .7rem !important; letter-spacing: .12em; text-transform: uppercase; color: var(--dc-terracota); font-weight: 800; }
.rep-name { font-size: 1.15rem; font-weight: 800; }
.rep-note { padding: 8px 10px; border-radius: 10px; background: #fff4dc; }
.rep-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.rep-links a { padding: 9px 14px; border-radius: 999px; background: var(--dc-choco); color: var(--dc-crema); font-weight: 800; font-size: .86rem; text-decoration: none; }
.rep-total { margin-top: 6px !important; }

.rep-me__head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.rep-me__head p { margin: 0; color: #7b5e4c; }
.rep-me__head h3 { margin: 0; font-size: 1.3rem; }
.rep-me__head small { color: #8c6f5e; }
.rep-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rep-stats div { padding: 12px; border-radius: 14px; background: var(--dc-choco); color: var(--dc-crema); }
.rep-stats span { display: block; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--dc-dorado); font-weight: 800; }
.rep-stats b { font-size: 1.15rem; }
.rep-me h4 { margin: 16px 0 6px; }
.rep-hist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rep-hist li { display: grid; grid-template-columns: auto 1fr auto auto; gap: 8px; padding: 9px 12px; border-radius: 12px; background: #fff; font-size: .86rem; }

.rep-toast { position: fixed; left: 14px; right: 14px; top: calc(70px + env(safe-area-inset-top)); z-index: 900; padding: 12px 14px; border-radius: 14px; background: var(--dc-choco); color: var(--dc-crema); font-weight: 700; box-shadow: 0 12px 24px -12px #000; text-align: center; }
.rep-toast.is-bad { background: var(--dc-bad); color: #fff; }
.rep-toast[hidden] { display: none; }
.dolce-pin.has-label em { position: absolute; left: 50%; top: -22px; transform: translateX(-50%); padding: 2px 8px; border-radius: 99px; background: var(--dc-choco); color: var(--dc-dorado); font-style: normal; font-weight: 800; font-size: 11px; white-space: nowrap; }
.dolce-pin--bag span { background: #fff; color: var(--dc-choco); }
@media (min-width: 760px) { .rep-sheet { left: auto; width: 420px; height: auto; top: 76px; border-radius: 24px 0 0 0; } .rep-recenter { bottom: 20px; right: 440px; } }

.rep-eta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0 2px; }
.rep-eta div { padding: 10px 12px; border-radius: 14px; background: var(--dc-choco); color: var(--dc-crema); }
.rep-eta span { display: block; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--dc-dorado); font-weight: 800; }
.rep-eta b { font-size: 1.25rem; }
/* 1.2: recogida en tienda con doble confirmación */
.rep-store { border-color: rgba(201, 163, 106, .5); }
.rep-storestate { display: inline-block; margin: 8px 0 2px !important; padding: 5px 12px; border-radius: 99px; background: #f1e6d4; font-weight: 800; font-size: .82rem; }
.rep-storestate.is-ready { background: #e6f6ec; color: #1d6b3c; }
.rep-wait { margin: 10px 0 0; padding: 12px 14px; border-radius: 14px; background: #fff4dc; color: #7a4f00; font-weight: 700; text-align: center; }
.rep-center { text-align: center; }
.rep-btn:disabled { opacity: .45; }
.dolce-dlv.rep-dlv { margin: 0; }

/* 1.3: llegada a la tienda y ruta del domicilio */
.rep-dlvroute { margin: 8px 0 10px; padding: 12px 14px; border-radius: 16px; background: #fff; border: 1.5px dashed rgba(185, 104, 67, .5); }
.rep-dlvroute .rep-eta { margin: 6px 0; }
.rep-dlv li.is-skip, .dolce-dlv li.is-skip { opacity: .55; }

/* Evidencia (1.4.0) */
.rep-proof { border: 1.5px dashed rgba(185, 104, 67, .55); background: #fffaf3; }
.rep-proof.is-done { border-style: solid; border-color: rgba(31, 157, 85, .45); background: #f1faf4; }
.rep-proof__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 6px 0; }
.rep-proof__grid img, .rep-proof__grid video { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: #1c0f0a; }
.rep-proof__ok { margin: 4px 0 0; color: #1f7a45; font-weight: 800; font-size: .85rem; }
.rep-proof__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.rep-proof__btns .rep-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin: 0; cursor: pointer; }
.rep-proof__btns svg { width: 20px; height: 20px; }
.rep-upl { position: fixed; left: 16px; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 3000; padding: 12px 14px; border-radius: 16px; background: #29160F; color: #FFF9F1; font-weight: 700; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
.rep-upl i { display: block; height: 6px; margin-top: 8px; border-radius: 6px; background: rgba(255, 249, 241, .2); overflow: hidden; }
.rep-upl b { display: block; height: 100%; width: 0; background: #C9A36A; transition: width .2s; }

/* Verificación de identidad (1.5.0) */
.rep-kyc { position: fixed; inset: 0; z-index: 4000; overflow-y: auto; background: #FFF9F1; color: #29160F; -webkit-overflow-scrolling: touch; }
.rep-kyc__in { max-width: 460px; margin: 0 auto; padding: calc(18px + env(safe-area-inset-top)) 18px calc(28px + env(safe-area-inset-bottom)); display: grid; gap: 12px; }
.rep-kyc__brand { display: flex; align-items: baseline; gap: 8px; }
.rep-kyc__brand span { font-weight: 900; letter-spacing: .16em; }
.rep-kyc__brand small { color: #B96843; font-weight: 700; }
.rep-kyc__steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 4px 0; padding: 0; list-style: none; counter-reset: k; }
.rep-kyc__steps li { counter-increment: k; font-size: .72rem; font-weight: 700; text-align: center; color: #a08a7c; padding-top: 8px; border-top: 4px solid #eadfce; }
.rep-kyc__steps li.is-on { color: #29160F; border-color: #C9A36A; }
.rep-kyc__steps li.is-done { color: #1f7a45; border-color: #1f9d55; }
.rep-kyc__hero { text-align: center; }
.rep-kyc__hero > span { font-size: 2.6rem; display: block; }
.rep-kyc__hero h2 { margin: 6px 0; font-size: 1.35rem; }
.rep-kyc__hero p { margin: 4px 0; color: #5b4639; }
.rep-kyc__list { text-align: left; margin: 10px auto; padding: 12px 16px; list-style: none; background: #fff; border-radius: 16px; border: 1px solid rgba(41, 22, 15, .08); display: grid; gap: 8px; }
.rep-kyc__form { display: grid; gap: 12px; }
.rep-kyc__form label { display: grid; gap: 4px; font-weight: 700; font-size: .9rem; }
.rep-kyc__form input:not([type=checkbox]), .rep-kyc__form select { min-height: 48px; padding: 10px 12px; border-radius: 12px; border: 1.5px solid rgba(41, 22, 15, .18); font: inherit; background: #fff; }
.rep-kyc__consent { grid-template-columns: auto 1fr !important; align-items: start; font-weight: 400 !important; font-size: .8rem !important; color: #5b4639; }
.rep-kyc__consent input { width: 22px; height: 22px; margin-top: 2px; }
.rep-kyc__doc { position: relative; aspect-ratio: 1.58; border-radius: 18px; background: #29160F; overflow: hidden; display: grid; place-items: center; }
.rep-kyc__doc img { width: 100%; height: 100%; object-fit: cover; }
.rep-kyc__frame { width: 82%; aspect-ratio: 1.58; border: 3px dashed rgba(201, 163, 106, .8); border-radius: 14px; }
.rep-kyc__cam { position: relative; aspect-ratio: 3 / 4; border-radius: 22px; overflow: hidden; background: #000; }
.rep-kyc__cam video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.rep-kyc__oval { position: absolute; left: 50%; top: 46%; width: 62%; aspect-ratio: .78; transform: translate(-50%, -50%); border-radius: 50%; border: 4px solid rgba(255, 255, 255, .85); box-shadow: 0 0 0 999px rgba(0, 0, 0, .38); transition: border-color .2s; }
.rep-kyc__oval.is-ok { border-color: #22e3a6; }
.rep-kyc__say { margin: 0; text-align: center; font-weight: 800; font-size: 1.1rem; min-height: 1.4em; }
.rep-kyc__prog { height: 8px; border-radius: 8px; background: #eadfce; overflow: hidden; }
.rep-kyc__prog b { display: block; height: 100%; width: 0; background: #1f9d55; transition: width .3s; }
.rep-kyc__thumbs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rep-kyc__thumbs figure { margin: 0; }
.rep-kyc__thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; }
.rep-kyc__thumbs figcaption { font-size: .75rem; color: #7b5e4c; text-align: center; }
.rep-kyc__hero.is-wait > span { animation: repSpin 2.4s linear infinite; display: inline-block; }
@keyframes repSpin { to { transform: rotate(360deg); } }
.rep-kyc__banner { display: block; width: 100%; border: 0; padding: 10px 14px; background: #fff4dc; color: #7a4f00; font-family: inherit; font-weight: 700; font-size: .85rem; line-height: 1.3; text-align: left; cursor: pointer; position: relative; z-index: 500; }
.rep-kyc label.rep-btn { display: flex; align-items: center; justify-content: center; cursor: pointer; }
.rep-kyc__thumbs figure:nth-child(-n+2) img { object-fit: contain; background: #29160F; }
