/* =====================================================================================================================
   patch627 · App de Boxfly, apariencia Android (Material 3 Expressive, estilo Android 16 / Gemini). Pedido de Angel (23/11/2026): que en
   Android se vea como el sistema operativo. Todo va bajo html.tema-and (lo pone el <head> en celulares Android; ?tema=android|ios|auto lo
   fuerza): en el iPhone este archivo no cambia nada. Colores tonales de Material You con el verde de Boxfly, letra del sistema (Roboto),
   barra superior con el título a la izquierda y flecha para volver, barra de navegación abajo con indicador, botón flotante "Nuevo envío",
   listas en bloques redondeados separados (como Ajustes de Android 16), botones en cápsula, chips de filtro, campos con la etiqueta arriba,
   hojas y diálogos de Material, aviso abajo (snackbar), onda al tocar (app.js) y transiciones de eje horizontal.
   ===================================================================================================================== */

/* ---------------------------------------------------------------- colores (claro): esquema Material 3 a partir del verde de Boxfly */
html.tema-and {
    --font: "Google Sans Flex", "Google Sans", "Google Sans Text", Roboto, "Roboto Flex", system-ui, sans-serif;
    --font-r: var(--font);
    --m-btn: #009E68; --m-on-btn: #FFFFFF;                     /* botón lleno: el verde de Boxfly que aprobó Angel */
    --m-primary: #00865A; --m-on-primary: #FFFFFF;             /* texto y elementos activos */
    --m-primary-c: #A6F2CB; --m-on-primary-c: #002113;         /* contenedor principal (botón flotante, avatar) */
    --m-secondary-c: #CFE9DA; --m-on-secondary-c: #0B1F15;     /* tonal (indicador, chips elegidos, botones secundarios) */
    --m-tertiary-c: #C2E8FC; --m-on-tertiary-c: #001F29;
    --m-error: #BA1A1A; --m-on-error: #FFFFFF; --m-error-c: #FFDAD6; --m-on-error-c: #93000A;
    --m-surface: #F5FBF5; --m-surface-lowest: #FFFFFF; --m-surface-low: #EFF5EF; --m-surface-c: #E9EFE9; --m-surface-high: #E4EAE4; --m-surface-highest: #DEE4DE;
    --m-on-surface: #171D1A; --m-on-surface-v: #404943; --m-outline: #707973; --m-outline-v: #BFC9C1;
    --m-inverse-surface: #2C322F; --m-inverse-on-surface: #ECF2ED; --m-inverse-primary: #6CDBA6;
    --m-scrim: rgba(0, 0, 0, .32);
    --m-elev1: 0 1px 2px rgba(0,0,0,.3), 0 1px 3px 1px rgba(0,0,0,.15);
    --m-elev3: 0 1px 3px rgba(0,0,0,.3), 0 4px 8px 3px rgba(0,0,0,.15);
    --m-grad: linear-gradient(90deg, #00A96A 0%, #00B39A 45%, #3C8CF0 100%); /* el saludo con degradé, como el de Gemini */
    /* tokens de la app → Material */
    --bg: var(--m-surface); --bg2: var(--m-surface-lowest); --bg3: var(--m-surface-c);
    --hl: rgba(23, 29, 26, .1);
    --label: var(--m-on-surface); --label2: var(--m-on-surface-v); --label3: var(--m-outline); --label4: var(--m-outline-v); --sep: var(--m-outline-v);
    --fill: var(--m-surface-highest); --fill2: var(--m-surface-high); --fill3: var(--m-surface-high); --fill4: var(--m-surface-c);
    --tint: var(--m-btn); --tint-ink: var(--m-primary); --tint-soft: var(--m-primary-c); --on-tint: var(--m-on-btn);
    --red: var(--m-error); --red-ink: var(--m-error); --blue: #0B57D0; --blue-ink: #0B57D0; --green-ink: #146C2E; --orange-ink: #8B5000;
    --sheet: var(--m-surface-low); --scrim: var(--m-scrim);
    --mono: #3F6B57;
    --ease: cubic-bezier(.2, 0, 0, 1); --spring: cubic-bezier(.3, 1.25, .5, 1);
    --em-dec: cubic-bezier(.05, .7, .1, 1); --em-acc: cubic-bezier(.3, 0, .8, .15);
}
/* ---------------------------------------------------------------- colores (oscuro) */
@media (prefers-color-scheme: dark) {
    html.tema-and {
        --m-btn: #6CDBA6; --m-on-btn: #003824;
        --m-primary: #6CDBA6; --m-on-primary: #003824;
        --m-primary-c: #005236; --m-on-primary-c: #A6F2CB;
        --m-secondary-c: #344B3F; --m-on-secondary-c: #CFE9DA;
        --m-tertiary-c: #254B5B; --m-on-tertiary-c: #C2E8FC;
        --m-error: #FFB4AB; --m-on-error: #690005; --m-error-c: #93000A; --m-on-error-c: #FFDAD6;
        --m-surface: #0F1512; --m-surface-lowest: #0A0F0D; --m-surface-low: #171D1A; --m-surface-c: #1B211E; --m-surface-high: #252B28; --m-surface-highest: #303633;
        --m-on-surface: #DEE4DF; --m-on-surface-v: #BFC9C1; --m-outline: #89938C; --m-outline-v: #404943;
        --m-inverse-surface: #DEE4DF; --m-inverse-on-surface: #2C322F; --m-inverse-primary: #00865A;
        --m-grad: linear-gradient(90deg, #6CDBA6 0%, #4FD8C4 45%, #8AB4F8 100%);
        --bg2: var(--m-surface-c); --hl: rgba(222, 228, 223, .12);
        --blue: #A8C7FA; --blue-ink: #A8C7FA; --green-ink: #7FDA97; --orange-ink: #FFB95C;
        --mono: #4E8C70;
    }
}

/* ---------------------------------------------------------------- base y textos */
html.tema-and body { font: 400 16px/24px var(--font); letter-spacing: .01em; }
html.tema-and .lt, html.tema-and .t1, html.tema-and .t2, html.tema-and .price { letter-spacing: 0; }
html.tema-and .lt { font: 400 28px/36px var(--font); }
html.tema-and .lt-wrap { padding: 4px 4px 18px; }
/* Inicio: el saludo grande con degradé (como el "Hola" de Gemini) */
html.tema-and .lt-wrap:has(> .eyebrow[data-vivo="fecha"]) .lt { display: inline-block; font-size: 32px; line-height: 40px; font-weight: 500; background: var(--m-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
    -webkit-text-fill-color: transparent; padding-bottom: 2px; }
html.tema-and .eyebrow { font: 500 14px/20px var(--font); letter-spacing: .01em; text-transform: none; color: var(--m-on-surface-v); margin-bottom: 2px; }
html.tema-and .t1 { font: 400 28px/36px var(--font); }
html.tema-and .t2 { font: 400 22px/28px var(--font); }
html.tema-and .t3 { font: 500 18px/24px var(--font); }
html.tema-and .hd { font: 500 16px/24px var(--font); }
html.tema-and .sub { font: 400 14px/20px var(--font); }
html.tema-and .foot { font: 400 12px/16px var(--font); letter-spacing: .03em; }
html.tema-and .cap { font: 400 12px/16px var(--font); letter-spacing: .03em; }
html.tema-and a { color: var(--m-primary); }

/* sin vidrio */
html.tema-and .glass { background: none; background-image: none; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
html.tema-and .glass::before { display: none; }

/* ---------------------------------------------------------------- barra superior (top app bar) */
html.tema-and .nb { height: calc(64px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 4px 0; gap: 0; background: var(--m-surface); transition: background-color .25s var(--ease); }
html.tema-and .nb::before { display: none; }
html.tema-and .nb.sc { background: var(--m-surface-c); }
html.tema-and .nb-l, html.tema-and .nb-r { flex: none; gap: 0; }
html.tema-and .nb-t { flex: 1 1 auto; max-width: none; padding: 0 12px; text-align: left; font: 400 22px/28px var(--font); transform: none; }
html.tema-and .nb-l:empty + .nb-t { padding-left: 16px; }
/* botón de ícono (flecha para volver, campana) */
html.tema-and .gb { width: 48px; height: 48px; border-radius: 24px; color: var(--m-on-surface-v); background: none; box-shadow: none; transition: none; }
html.tema-and .gb:active { transform: none; }
html.tema-and .gb::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: currentColor; opacity: 0; transition: opacity .15s linear; pointer-events: none; }
html.tema-and .gb:active::after { opacity: .12; }
html.tema-and .gb .i { font-size: 24px; }
html.tema-and .nb-l .gb { color: var(--m-on-surface); }
html.tema-and .gb .bdg { top: 7px; right: 6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--m-error); color: var(--m-on-error); font: 500 11px/16px var(--font);
    box-shadow: none; }
html.tema-and .avatar { width: 36px; height: 36px; margin: 0 6px 0 2px; background: var(--m-primary-c); color: var(--m-on-primary-c); font: 500 15px/1 var(--font); letter-spacing: 0; }
html.tema-and .avatar:active { transform: none; filter: brightness(.94); }
html.tema-and .avatar.xl { width: 56px; height: 56px; margin: 0; font-size: 22px; }

/* ---------------------------------------------------------------- barra de navegación (abajo) + botón flotante */
html.tema-and .tb { left: 50%; right: auto; bottom: 0; width: 100%; max-width: 500px; transform: translateX(-50%); display: block; }
html.tema-and .tb-cap { height: calc(80px + env(safe-area-inset-bottom)); padding: 12px 0 calc(16px + env(safe-area-inset-bottom)); border-radius: 0; background: var(--m-surface-c);
    align-items: flex-start; }
html.tema-and .tb-ind { display: none; }
html.tema-and .tb-it { justify-content: flex-start; gap: 4px; border-radius: 0; color: var(--m-on-surface-v); font: 500 12px/16px var(--font); letter-spacing: .04em; transition: color .2s linear; }
html.tema-and .tb-it::before { content: ""; position: absolute; z-index: -1; top: 0; left: 50%; width: 64px; height: 32px; margin-left: -32px; border-radius: 16px; background: var(--m-secondary-c);
    opacity: 0; transform: scaleX(.35); transition: transform .35s var(--em-dec), opacity .15s linear; }
html.tema-and .tb-it.on::before { opacity: 1; transform: none; }
html.tema-and .tb-it:active { transform: none; }
html.tema-and .tb-it:active::before { opacity: 1; transform: none; background: color-mix(in srgb, var(--m-on-surface) 10%, transparent); }
html.tema-and .tb-it.on:active::before { background: var(--m-secondary-c); }
html.tema-and .tb-it .i { width: 24px; height: 24px; font-size: 24px; margin: 4px 0 0; }
html.tema-and .tb-it.on { color: var(--m-on-surface); font-weight: 700; }
html.tema-and .tb-it.on .i { color: var(--m-on-secondary-c); }
html.tema-and .tb-it.nav-pend { transform: none; }
/* botón flotante extendido (como "Redactar" de Gmail); al bajar se achica al ícono */
html.tema-and .tb-fab { position: fixed; right: max(16px, calc((100vw - 500px) / 2 + 16px)); bottom: calc(96px + env(safe-area-inset-bottom)); width: auto; min-width: 56px; height: 56px;
    padding: 0 20px 0 16px; gap: 12px; border-radius: 16px; background: var(--m-primary-c); color: var(--m-on-primary-c); box-shadow: var(--m-elev3);
    transition: padding .25s var(--ease), box-shadow .2s linear; overflow: hidden; }
html.tema-and .tb-fab:active { transform: none; box-shadow: var(--m-elev1); }
html.tema-and .tb-fab .i { font-size: 24px; }
html.tema-and .tb-fab .fab-l { display: inline-block; max-width: 140px; white-space: nowrap; overflow: hidden; font: 500 16px/24px var(--font); letter-spacing: .01em;
    transition: max-width .25s var(--ease), opacity .2s linear; }
html.tema-and.fab-chico .tb-fab { padding: 0 16px; gap: 0; }
html.tema-and.fab-chico .tb-fab .fab-l { max-width: 0; opacity: 0; }
html.tema-and .tb-fab.on { filter: none; }
html.tema-and .edge-b { display: none; }
/* el botón flotante va en Inicio, Envíos y Ventas; no en Retiros ni Cuenta (tienen su acción propia), ni en las pantallas internas (con flecha para
   volver), ni en los trámites */
html.tema-and .tb-retiros .tb-fab, html.tema-and .tb-cuenta .tb-fab, html.tema-and body:has(.nb-l .gb) .tb-fab, html.tema-and.flujo .tb { display: none; }
html.tema-and .pg { padding-bottom: calc(176px + env(safe-area-inset-bottom)); }
html.tema-and .pg.sin-tab { padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
html.tema-and body:has(.nb-l .gb) .pg, html.tema-and body:has(.tb-retiros, .tb-cuenta) .pg { padding-bottom: calc(112px + env(safe-area-inset-bottom)); }

/* ---------------------------------------------------------------- secciones */
html.tema-and .sec { margin-bottom: 28px; }
html.tema-and .sec-h { align-items: center; margin: 0 0 12px; padding: 0 4px; }
html.tema-and .sec-h h2 { font: 500 18px/24px var(--font); }
html.tema-and .sec-h a, html.tema-and .sec-h button { padding: 8px 12px; margin: -8px -12px; border-radius: 20px; font: 500 14px/20px var(--font); letter-spacing: .01em; color: var(--m-primary); }
html.tema-and .sec-h a:active, html.tema-and .sec-h button:active { background: color-mix(in srgb, var(--m-primary) 12%, transparent); }
html.tema-and .sec-hs { margin: 0 0 8px; padding: 0 16px; font: 500 14px/20px var(--font); letter-spacing: .01em; color: var(--m-primary); }
html.tema-and .sec-f { margin: 8px 0 0; padding: 0 16px; font: 400 12px/16px var(--font); letter-spacing: .03em; }

/* ---------------------------------------------------------------- listas: bloques redondeados separados (Ajustes de Android 16) */
html.tema-and .lst { display: flex; flex-direction: column; gap: 2px; background: transparent; border-radius: 0; overflow: visible; }
html.tema-and .lst + .lst { margin-top: 16px; }
html.tema-and .lst > * { background-color: var(--bg2); border-radius: 4px; }
html.tema-and .lst > :nth-child(1 of :not([hidden])) { border-top-left-radius: 20px; border-top-right-radius: 20px; }
html.tema-and .lst > :nth-last-child(1 of :not([hidden])) { border-bottom-left-radius: 20px; border-bottom-right-radius: 20px; }
html.tema-and .sh-b .lst { background: transparent; }
html.tema-and .cell { isolation: isolate; overflow: hidden; min-height: 56px; padding: 12px 16px; gap: 16px; font: 400 16px/24px var(--font); transition: background-color .15s linear; }
html.tema-and .cell + .cell::before, html.tema-and .cell + .cell-g::before, html.tema-and .cell-g + .cell::before { display: none; }
html.tema-and a.cell:active, html.tema-and button.cell:active, html.tema-and label.cell.tap:active, html.tema-and .cell.tap:active, html.tema-and a.cell.nav-pend {
    background-color: var(--bg2); background-image: linear-gradient(var(--hl), var(--hl)); }
html.tema-and .cell-ic { width: 40px; height: 40px; border-radius: 50%; font-size: 22px; color: var(--c, var(--gray)); background: color-mix(in srgb, var(--c, var(--gray)) 16%, var(--bg2)); }
html.tema-and .cell-ic.lg { width: 48px; height: 48px; border-radius: 50%; font-size: 24px; }
html.tema-and .cell-t { font: 400 16px/24px var(--font); }
html.tema-and .cell-t.b { font-weight: 500; }
html.tema-and .cell-s { font: 400 14px/20px var(--font); letter-spacing: .015em; }
html.tema-and .cell-v { font: 400 14px/20px var(--font); }
html.tema-and .cell-chev { display: none; }
html.tema-and .cell-ext { font-size: 18px; color: var(--m-on-surface-v); }
html.tema-and .cell.tinted .cell-t { color: var(--m-primary); font-weight: 500; }
html.tema-and .cell .badge-n { min-width: 24px; height: 24px; padding: 0 8px; border-radius: 12px; background: var(--m-error); color: var(--m-on-error); font: 500 12px/24px var(--font); }
html.tema-and .flag { border-radius: 50%; background: var(--m-surface-high); }
html.tema-and .flag.xl { border-radius: 50%; }
/* fila de un envío */
html.tema-and .env { padding-top: 14px; padding-bottom: 14px; gap: 16px; }
html.tema-and .env .flag { border-radius: 50%; }
html.tema-and .env-1 .cell-t { font-weight: 500; }
html.tema-and .env-1 .fe { font: 400 12px/16px var(--font); letter-spacing: .03em; }
html.tema-and .env-3 .deb { font: 500 14px/20px var(--font); }
html.tema-and .st { font: 500 14px/20px var(--font); }
html.tema-and .pill { height: 28px; padding: 0 12px; border-radius: 8px; font: 500 13px/18px var(--font); letter-spacing: .01em; }

/* tarjetas */
html.tema-and .card { border-radius: 24px; padding: 20px; background: var(--bg2); }
html.tema-and .card + .card { margin-top: 12px; }

/* ---------------------------------------------------------------- botones (cápsula de Material 3 Expressive) */
html.tema-and .btn { isolation: isolate; min-height: 56px; padding: 0 24px; border-radius: 28px; background: var(--m-btn); color: var(--m-on-btn); font: 500 16px/24px var(--font); letter-spacing: .01em;
    transition: border-radius .3s var(--ease), box-shadow .2s linear, opacity .2s linear; }
html.tema-and .btn:active { transform: none; filter: none; border-radius: 16px; }
html.tema-and .btn .i { font-size: 20px; }
html.tema-and .btn.gray, html.tema-and .btn.red { min-height: 48px; border-radius: 24px; background: var(--m-secondary-c); color: var(--m-on-secondary-c); }
html.tema-and .btn.gray:active, html.tema-and .btn.red:active { border-radius: 14px; }
html.tema-and .btn.gray.lbl { color: var(--m-on-secondary-c); }
html.tema-and .btn.red { background: color-mix(in srgb, var(--m-error) 12%, transparent); color: var(--m-error); }
html.tema-and .btn.plain { min-height: 48px; padding: 0 16px; border-radius: 24px; background: transparent; color: var(--m-primary); font-weight: 500; }
html.tema-and .btn.wa { background: #25D366; color: #fff; }
html.tema-and .btn.sm { min-height: 40px; padding: 0 16px; border-radius: 20px; font: 500 14px/20px var(--font); letter-spacing: .01em; }
html.tema-and .btn.sm:active { border-radius: 12px; }
html.tema-and .btn.sm .i { font-size: 18px; }
html.tema-and .btn.sm.gray { background: var(--m-secondary-c); }
html.tema-and .btn.sm.soft { background: var(--m-primary-c); color: var(--m-on-primary-c); }
html.tema-and .btns { gap: 12px; }

/* indicador de actividad: anillo de Material */
html.tema-and .spin { background: none; -webkit-mask: none; mask: none; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: bx-and-spin .75s linear infinite; }
html.tema-and .spin.lg { border-width: 3px; }
html.tema-and a.cell.nav-spin::after { background: none; -webkit-mask: none; mask: none; border: 2.5px solid var(--m-primary); border-right-color: transparent; border-radius: 50%;
    animation: bx-and-spin .75s linear infinite; }
@keyframes bx-and-spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- botones segmentados */
html.tema-and .seg { height: 40px; padding: 0; border-radius: 20px; background: transparent; box-shadow: inset 0 0 0 1px var(--m-outline); overflow: hidden; }
html.tema-and .seg-th { top: 0; bottom: 0; left: calc(100% / var(--n, 2) * var(--i, 0)); width: calc(100% / var(--n, 2)); border-radius: 0; background: var(--m-secondary-c); box-shadow: none;
    transition: left .35s var(--em-dec); }
html.tema-and .seg-b { border-radius: 0; padding: 0 12px; gap: 8px; font: 500 14px/20px var(--font); letter-spacing: .01em; color: var(--m-on-surface); }
html.tema-and .seg-b + .seg-b { box-shadow: inset 1px 0 0 var(--m-outline); }
html.tema-and .seg-b.on { font-weight: 500; color: var(--m-on-secondary-c); }
html.tema-and .seg-b .bdg { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--m-error); color: var(--m-on-error); font: 500 11px/18px var(--font); }

/* ---------------------------------------------------------------- chips de filtro */
html.tema-and .chips { gap: 8px; }
html.tema-and .chip { position: relative; isolation: isolate; overflow: hidden; height: 32px; padding: 0 16px; gap: 8px; border-radius: 8px; background: transparent; color: var(--m-on-surface-v);
    box-shadow: inset 0 0 0 1px var(--m-outline-v); font: 500 14px/20px var(--font); letter-spacing: .01em; }
html.tema-and .chip:active { transform: none; }
html.tema-and .chip .n { color: inherit; opacity: .75; font-weight: 500; }
html.tema-and .chip.on { padding-left: 8px; background: var(--m-secondary-c); color: var(--m-on-secondary-c); box-shadow: none; font-weight: 500; }
html.tema-and .chip.on .n { color: inherit; opacity: .75; }
html.tema-and .chip.on::before { content: ""; flex: none; width: 18px; height: 18px; background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%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 24 24'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E") center/contain no-repeat; }

/* ---------------------------------------------------------------- buscador y campos */
html.tema-and .srch { height: 56px; padding: 0 16px; gap: 16px; border-radius: 28px; background: var(--m-surface-high); color: var(--m-on-surface-v); }
html.tema-and .srch .i { font-size: 24px; }
html.tema-and .srch input { font: 400 16px/24px var(--font); letter-spacing: .01em; }
html.tema-and .srch input::placeholder { color: var(--m-on-surface-v); }
html.tema-and .srch .x { color: var(--m-on-surface-v); font-size: 22px; }
html.tema-and .srch:focus-within { box-shadow: inset 0 0 0 2px var(--m-primary); }
/* fila con campo: la etiqueta arriba y el valor abajo (como los campos de Material) */
html.tema-and .cell.f { flex-wrap: wrap; align-content: center; row-gap: 0; min-height: 64px; padding: 8px 16px 6px; cursor: text; }
html.tema-and .cell.f > .cell-t, html.tema-and .cell.f > .cell-tx, html.tema-and .cell.f.l > .cell-t, html.tema-and .cell.f.l > .cell-tx { flex: 1 0 100%; width: auto; max-width: none; white-space: normal; }
html.tema-and .cell.f .cell-t { font: 500 12px/16px var(--font); letter-spacing: .03em; color: var(--m-on-surface-v); transition: color .15s linear; }
html.tema-and .cell.f.err .cell-t { color: var(--m-error); }
html.tema-and .cell.f input, html.tema-and .cell.f select, html.tema-and .cell.f textarea { height: 32px; text-align: left; font: 400 16px/24px var(--font); letter-spacing: .01em; }
html.tema-and .cell.f.l input, html.tema-and .cell.f.l textarea { text-align: left; }
html.tema-and .cell.f textarea { height: auto; min-height: 48px; padding: 4px 0; line-height: 24px; }
html.tema-and .cell.f input::placeholder, html.tema-and .cell.f textarea::placeholder { color: var(--m-outline); }
html.tema-and .cell.f::after { top: 0; bottom: 0; left: 0; right: 0; border-radius: inherit; background: none; box-shadow: inset 0 0 0 2px var(--m-primary); transform: none; transition: opacity .15s linear; }
html.tema-and .cell.f:focus-within .cell-t { color: var(--m-primary); }
html.tema-and .cell.f .sel-i { flex: 1 1 100%; justify-content: flex-start; }
html.tema-and .cell.f .sel-i select { padding-right: 28px; text-align: left; text-align-last: left; }
html.tema-and .cell.f .sel-i .i { font-size: 20px; color: var(--m-on-surface-v); }
html.tema-and .cell.f .u { font: 400 16px/24px var(--font); }
html.tema-and .cell .pop .i { font-size: 20px; color: var(--m-on-surface-v); }
html.tema-and .cell .pop { font: 400 14px/20px var(--font); }
/* medidas y números chicos */
html.tema-and .dims { justify-content: flex-start; gap: 8px; }
html.tema-and .cell.f .dims input, html.tema-and .dims input, html.tema-and .numf { height: 40px; border-radius: 8px; background: var(--m-surface-high); font: 500 16px/24px var(--font); }
html.tema-and .cell.f .dims input:focus, html.tema-and .numf:focus { background: var(--m-surface-high); box-shadow: inset 0 0 0 2px var(--m-primary); }
html.tema-and .cell.f:has(> .dims) { flex-wrap: nowrap; }
html.tema-and .cell.f:has(> .dims) > .cell-t, html.tema-and .cell.f:has(> .dims) > .cell-tx { flex: 0 0 auto; }
html.tema-and .cell.f:has(> .dims) .dims { justify-content: flex-end; }
/* paso + / − */
html.tema-and .stp { height: 40px; border-radius: 20px; background: transparent; box-shadow: inset 0 0 0 1px var(--m-outline-v); }
html.tema-and .stp button { width: 44px; height: 40px; color: var(--m-on-surface-v); font-size: 20px; }
html.tema-and .stp i.sp { display: none; }
html.tema-and .stp-n { font: 500 16px/24px var(--font); }
/* interruptor de Material 3 */
html.tema-and .sw { width: 52px; height: 32px; border-radius: 16px; background: var(--m-surface-highest); box-shadow: inset 0 0 0 2px var(--m-outline); transition: background-color .2s linear, box-shadow .2s linear; }
html.tema-and .sw::after { top: 8px; left: 8px; width: 16px; height: 16px; background: var(--m-outline); box-shadow: none;
    transition: transform .3s var(--em-dec), width .2s var(--ease), height .2s var(--ease), top .2s var(--ease), left .2s var(--ease), background-color .2s linear; }
html.tema-and .sw:checked { background: var(--m-btn); box-shadow: none; }
html.tema-and .sw:checked::after { top: 4px; left: 4px; width: 24px; height: 24px; background: var(--m-on-btn); transform: translateX(20px); }
/* casilla de verificación (cuadrada, como Android) */
html.tema-and .chk { width: 18px; height: 18px; margin: 3px; border-radius: 2px; box-shadow: inset 0 0 0 2px var(--m-on-surface-v); }
html.tema-and .on > .chk, html.tema-and .chk.on, html.tema-and input:checked + .chk { background: var(--m-btn); box-shadow: none; }
html.tema-and .chk::after { background: var(--m-on-btn); }
html.tema-and .cell .okm { color: var(--m-primary); font-size: 22px; }

/* ---------------------------------------------------------------- mensajes, notas, pasos, listo y precio */
html.tema-and .msg { font: 400 14px/20px var(--font); color: var(--m-error); }
html.tema-and .msg.ok { color: var(--green-ink); }
html.tema-and .note { border-radius: 16px; background: var(--m-surface-c); font: 400 14px/20px var(--font); }
html.tema-and .prog { gap: 4px; }
html.tema-and .prog i { height: 4px; border-radius: 2px; background: var(--m-secondary-c); }
html.tema-and .prog i.on { background: var(--m-btn); }
html.tema-and .listo h2 { font: 400 28px/36px var(--font); }
html.tema-and .listo p { font: 400 16px/24px var(--font); }
html.tema-and .listo-c { background: var(--m-btn); }
html.tema-and .listo-c path { stroke: var(--m-on-btn); }
html.tema-and .price { font: 500 36px/44px var(--font); letter-spacing: 0; }
html.tema-and .price.md { font-size: 32px; line-height: 40px; }
html.tema-and .price.sm { font-size: 28px; line-height: 36px; }
html.tema-and .vacio h3 { font: 400 22px/28px var(--font); }
html.tema-and .vacio p { font: 400 14px/20px var(--font); }
html.tema-and .vacio .i { font-size: 48px; color: var(--m-on-surface-v); }
/* barra de abajo de los trámites (Siguiente, Crear envío…) */
html.tema-and .bbar { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--m-surface-c); }
html.tema-and .bbar::before { display: none; }
html.tema-and.flujo .pg { padding-bottom: calc(104px + env(safe-area-inset-bottom)); }

/* ---------------------------------------------------------------- hoja de abajo (bottom sheet de Material) */
html.tema-and .sh-p, html.tema-and .sh:not(.alto) .sh-p { left: 0; right: 0; bottom: var(--kb, 0px); max-height: calc(100% - 72px - var(--kb, 0px)); border-radius: 28px 28px 0 0;
    padding-bottom: env(safe-area-inset-bottom); background: var(--m-surface-low); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: var(--m-elev1);
    transition: transform .4s var(--em-dec); }
html.tema-and .sh.alto .sh-p { max-height: calc(100% - 48px - var(--kb, 0px)); }
html.tema-and .sh-grab { width: 32px; height: 4px; margin: 16px 0 4px; border-radius: 2px; background: var(--m-on-surface-v); opacity: .4; }
html.tema-and .sh-h { min-height: 56px; padding: 0 8px 4px; gap: 4px; }
html.tema-and .sh-h h2 { padding: 0 8px; text-align: left; font: 400 22px/28px var(--font); }
html.tema-and .sh-h .sb { position: relative; width: 48px; height: 48px; border-radius: 24px; background: none; color: var(--m-on-surface-v); font-size: 22px; transition: none; }
html.tema-and .sh-h .sb:active { transform: none; background: color-mix(in srgb, var(--m-on-surface) 10%, transparent); }
html.tema-and .sh-h .sb.ok { width: 40px; height: 40px; margin: 4px; border-radius: 20px; background: var(--m-btn); color: var(--m-on-btn); }
html.tema-and .sh-h .sb.ok:active { border-radius: 12px; background: var(--m-btn); }
html.tema-and .sh-b { padding: 4px 16px 24px; }
html.tema-and .sh-scrim { transition: opacity .3s linear; }

/* ---------------------------------------------------------------- diálogo de Material */
html.tema-and .al { padding: 24px; background: var(--m-scrim); transition: opacity .2s linear; }
html.tema-and .al-p { max-width: 312px; padding: 24px 24px 20px; border-radius: 28px; background: var(--m-surface-high); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: var(--m-elev3);
    text-align: left; transform: scale(.92); opacity: 0; transition: transform .3s var(--em-dec), opacity .15s linear; }
html.tema-and .al.open .al-p { transform: none; opacity: 1; }
html.tema-and .al-p h3 { margin: 0 0 16px; font: 400 24px/32px var(--font); color: var(--m-on-surface); }
html.tema-and .al-p p { margin: 0 0 24px; font: 400 14px/20px var(--font); letter-spacing: .015em; color: var(--m-on-surface-v); }
html.tema-and .al-b, html.tema-and .al-b.v { flex-direction: row; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
html.tema-and .al-b button { position: relative; isolation: isolate; overflow: hidden; flex: none; min-height: 40px; padding: 0 12px; border-radius: 20px; background: transparent; color: var(--m-primary);
    font: 500 14px/20px var(--font); letter-spacing: .01em; }
html.tema-and .al-b button.def { background: transparent; color: var(--m-primary); font-weight: 500; }
html.tema-and .al-b button.des { color: var(--m-error); font-weight: 500; }

/* ---------------------------------------------------------------- aviso abajo (snackbar) */
html.tema-and .hud { top: auto; left: 16px; right: 16px; bottom: calc(96px + env(safe-area-inset-bottom)); max-width: 468px; margin: 0 auto; min-height: 48px; padding: 14px 16px; gap: 12px;
    border-radius: 4px; background: var(--m-inverse-surface); color: var(--m-inverse-on-surface); font: 400 14px/20px var(--font); letter-spacing: .015em; box-shadow: var(--m-elev3);
    transform: translateY(16px); opacity: 0; transition: transform .3s var(--em-dec), opacity .2s linear; }
html.tema-and .hud.open { transform: none; opacity: 1; }
html.tema-and .hud .i { font-size: 20px; color: var(--m-inverse-primary); }
html.tema-and.flujo .hud { bottom: calc(96px + env(safe-area-inset-bottom)); }
html.tema-and body:has(.tb-inicio, .tb-envios):not(:has(.nb-l .gb)) .hud { bottom: calc(168px + env(safe-area-inset-bottom)); } /* arriba del botón flotante */

/* ---------------------------------------------------------------- elegir de una lista guardada, sugerencias y Mis cajas */
html.tema-and .elg .cell-t { font-weight: 500; }
html.tema-and .elg.vacia .cell-t { color: var(--m-primary); }
html.tema-and .el-nuevo .cell-t { color: var(--m-primary); font-weight: 500; }
html.tema-and .el-l .sec-hs { color: var(--m-primary); }
html.tema-and .dir-sug::before, html.tema-and .dir-sug + .cell::before { display: none; }
html.tema-and .dir-op .cell-t { font: 400 16px/24px var(--font); } /* patch637: sin el pin rojo */
html.tema-and .dir-op .cell-s { font: 400 14px/20px var(--font); }
html.tema-and .cj-g { min-height: 40px; padding: 0 16px; border-radius: 20px; background: var(--m-primary-c); color: var(--m-on-primary-c); font: 500 14px/20px var(--font); }
html.tema-and .cj-g:active { transform: none; border-radius: 12px; }

/* ---------------------------------------------------------------- onda al tocar (la crea app.js en Android) */
html.tema-and .chip, html.tema-and .seg-b, html.tema-and .sh-h .sb, html.tema-and .tb-fab { isolation: isolate; }
html.tema-and .rip { position: absolute; z-index: -1; border-radius: 50%; background: currentColor; opacity: .12; transform: scale(0); pointer-events: none; animation: bx-and-rip .5s var(--ease) forwards; }
html.tema-and .rip.fuera { opacity: 0; transition: opacity .35s linear; }
@keyframes bx-and-rip { to { transform: scale(1); } }

/* ---------------------------------------------------------------- transiciones de Material (eje horizontal y atenuación entre pestañas) */
html.tema-and::view-transition-group(root) { animation-duration: .3s; }
html.tema-and:active-view-transition-type(push)::view-transition-old(root) { animation: bx-and-out-izq .3s var(--em-acc) both; box-shadow: none; }
html.tema-and:active-view-transition-type(push)::view-transition-new(root) { animation: bx-and-in-der .35s var(--em-dec) both; box-shadow: none; }
html.tema-and:active-view-transition-type(pop)::view-transition-old(root) { z-index: auto; animation: bx-and-out-der .3s var(--em-acc) both; box-shadow: none; }
html.tema-and:active-view-transition-type(pop)::view-transition-new(root) { animation: bx-and-in-izq .35s var(--em-dec) both; box-shadow: none; }
html.tema-and:active-view-transition-type(tab)::view-transition-old(root) { animation: bx-vt-fade-out .09s linear both; }
html.tema-and:active-view-transition-type(tab)::view-transition-new(root) { animation: bx-and-aparece .26s .05s var(--em-dec) both; }
@keyframes bx-and-in-der { from { transform: translateX(32px); opacity: 0; } }
@keyframes bx-and-out-izq { to { transform: translateX(-32px); opacity: 0; } }
@keyframes bx-and-in-izq { from { transform: translateX(-32px); opacity: 0; } }
@keyframes bx-and-out-der { to { transform: translateX(32px); opacity: 0; } }
@keyframes bx-and-aparece { from { opacity: 0; transform: scale(.97); } }

/* computadora: la app centrada */
@media (min-width: 560px) {
    html.tema-and { background: var(--m-surface-high); }
}
html.tema-and .sh-h .sb, html.tema-and .cj-g, html.tema-and .cj-u { position: relative; overflow: hidden; isolation: isolate; }
html.tema-and .g-sel { align-items: center; }
html.tema-and .g-sel button { padding: 10px 12px; margin: -10px -12px; border-radius: 20px; font: 500 14px/20px var(--font); letter-spacing: .01em; color: var(--m-primary); }

/* ---------------------------------------------------------------- patch638: ícono de cámara de "Completar con una foto" (botón tonal de Material) */
html.tema-and .lst-h { min-height: 64px; padding: 12px 12px 12px 16px; } /* patch639: título dentro de la tarjeta */
html.tema-and .lst-ht { font: 500 18px/24px var(--font); color: var(--m-on-surface); }
html.tema-and .cam { width: 40px; height: 40px; margin-right: 4px; border-radius: 20px; background: color-mix(in srgb, var(--tint) 16%, var(--bg2)); color: var(--tint-ink); font-size: 20px; transition: none; } /* el mismo verde suave de los íconos de las listas */
html.tema-and .cam:active { transform: none; border-radius: 12px; }
html.tema-and .cam .spin { width: 20px; height: 20px; }
