body { background: #f6f7fb; }
.d-login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; background: linear-gradient(135deg, #1c2333, #17a568); }
.d-login .card { width: 100%; max-width: 340px; text-align: center; padding: 26px; }

.d-top { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: #1c2333; color: #fff; position: sticky; top: 0; z-index: 1000; }
.d-top .avatar { width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .12); display: flex; align-items: center; justify-content: center; font-size: 20px; }
.d-top .small { opacity: .8; }

.switch-lg { margin: 0; cursor: pointer; position: relative; }
.switch-lg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-lg input:focus-visible + span { outline: 2px solid #fff; outline-offset: 2px; }
.switch-lg span { display: block; width: 58px; height: 32px; background: #59627a; border-radius: 99px; position: relative; transition: .2s; }
.switch-lg span::after { content: ''; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: .2s; }
/* Texto dentro del interruptor: se entiende sin conocer el ícono */
.switch-lg span::before { content: 'OFF'; position: absolute; top: 0; right: 7px; line-height: 32px; font-size: 10px; font-weight: 800; color: rgba(255, 255, 255, .75); }
.switch-lg input:checked + span { background: var(--success); }
.switch-lg input:checked + span::after { left: 30px; }
.switch-lg input:checked + span::before { content: 'ON'; right: auto; left: 9px; color: #fff; }

/* Salir: siempre a la vista en la barra superior */
.d-exit {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 10px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .08); color: #fff; font-family: inherit; font-size: 13px; font-weight: 700;
}
.d-exit:hover { background: rgba(255, 255, 255, .16); }
.d-exit:disabled { opacity: .5; cursor: progress; }
@media (max-width: 360px) { .d-exit span { display: none; } .d-exit { padding: 0 9px; } }

.d-map-wrap { position: relative; height: 42vh; min-height: 240px; }
#dMap { position: absolute; inset: 0; }
.d-center { position: absolute; right: 10px; bottom: 10px; z-index: 500; }

.d-panel { max-width: 720px; margin: -14px auto 0; background: #fff; border-radius: 18px 18px 0 0; position: relative; z-index: 600; padding: 16px; min-height: 50vh; box-shadow: 0 -6px 20px rgba(0, 0, 0, .06); }
.seg { display: inline-flex; background: var(--bg); border-radius: 10px; padding: 3px; }
.seg button { border: none; background: none; padding: 7px 12px; border-radius: 8px; font-weight: 700; font-size: 13px; cursor: pointer; color: var(--muted); }
.seg button.active { background: #fff; color: var(--text); box-shadow: var(--shadow); }
.seg i { font-style: normal; background: var(--primary); color: #fff; border-radius: 99px; padding: 0 6px; font-size: 11px; margin-left: 2px; }

.job { border: 1px solid var(--border); border-radius: 14px; padding: 14px; margin-bottom: 10px; }
.job.picked { border-color: #ffd1b0; background: #fffaf6; }
.job .head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-bottom: 6px; }
.job .addr { font-size: 15px; font-weight: 600; margin: 6px 0; }
.job .items { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.job .acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.job .acts .wide { grid-column: span 2; }
.pay-tag { white-space: nowrap; background: #fff4dc; color: #a86b00; border-radius: 6px; padding: 2px 8px; font-size: 12px; font-weight: 700; }

/* Pedido asignado sin aceptar: solo ubicación aproximada */
.job.offer { border: 2px solid var(--warning); background: #fffaf0; }
/* Pantalla siempre encendida mientras está en línea */
.d-awake { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; padding: 10px 12px; border-radius: 12px; background: #fffbea; border: 1px solid #f6e3a1; color: var(--text); font-size: 13px; font-weight: 600; cursor: pointer; }
.d-awake input { width: auto; margin: 0; }
.d-gps-tip { margin-top: 8px; line-height: 1.4; }

/* Oferta con tiempo para aceptar */
.offer-countdown { margin: 4px 0 6px; padding: 8px 10px; border-radius: 10px; background: #fff1d6; color: #8a5300; font-size: 13px; font-weight: 600; }
.offer-countdown .offer-timer { font-size: 16px; }
.d-sound { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--bg); }

/* Mensajes con el Centro de control */
.d-chat-btn { position: relative; font-size: 17px; padding: 0 11px; }
.d-badge { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; font-style: normal; font-weight: 800; line-height: 18px; text-align: center; }
.d-sheet { position: fixed; inset: 0; z-index: 2500; display: flex; flex-direction: column; background: #fff; }
.d-sheet-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: #1c2333; color: #fff; }
.d-sheet-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
@media (min-width: 720px) { .d-sheet { inset: auto 16px 16px auto; width: 420px; height: min(640px, calc(100vh - 32px)); border-radius: 16px; overflow: hidden; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); } }

/* Dentro de la APK no se ofrece descargarla */
.native-app .d-apk { display: none; }

/* Cuenta suspendida por el Centro de control: no recibe pedidos */
.d-suspended { margin-bottom: 10px; padding: 12px 14px; border: 1px solid #f3c3c5; border-radius: 12px; background: #fdecee; color: #8f1d22; }
.d-suspended .small { margin-top: 4px; color: #8f1d22; }
.switch-lg input:disabled + span { opacity: .45; cursor: not-allowed; }

/* Cambiar la clave de la app */
.d-pass { margin-top: 10px; }

/* Mi perfil */
.d-top .avatar { cursor: pointer; overflow: hidden; }
.d-top .avatar img { width: 100%; height: 100%; object-fit: cover; }
.dp-body { display: block; overflow: auto; padding: 14px 16px 24px; }
.dp-sec { margin-bottom: 16px; }
.dp-sec h4 { margin: 0 0 6px; }
.dp-head { display: flex; align-items: center; gap: 14px; }
.dp-name { font-size: 18px; }
#dpZoneMap { height: 240px; border-radius: 12px; }
.dp-rating { padding: 8px 0; border-bottom: 1px solid var(--border); }
.dp-ok { color: var(--success); font-weight: 600; }

/* Foto del frente del local: para reconocerlo al ir a retirar */
.d-facade { display: block; width: 100%; margin: 8px 0 4px; padding: 0; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--bg); cursor: zoom-in; font-family: inherit; text-align: left; }
.d-facade img { display: block; width: 100%; height: 150px; object-fit: cover; }
.d-facade span { display: block; padding: 6px 10px; font-size: 12px; font-weight: 600; color: var(--muted); }
.d-facade-full { position: fixed; inset: 0; z-index: 3000; display: flex; flex-direction: column; background: rgba(10, 12, 18, .94); cursor: zoom-out; }
.d-facade-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px; color: #fff; }
.d-facade-full img { flex: 1; min-height: 0; width: 100%; object-fit: contain; padding: 0 8px 16px; box-sizing: border-box; }
