/* =========================================================
   KOVRA PASO 39 — MOBILE / SERVER READY
   Capa final: bloqueo de zoom accidental, legibilidad y estabilidad.
========================================================= */

html {
    -webkit-text-size-adjust: 100% !important;
    text-size-adjust: 100% !important;
    touch-action: pan-x pan-y;
}

body {
    overscroll-behavior-x: none;
    -webkit-overflow-scrolling: touch;
}

/* Safari/iOS hace zoom si el control enfocado usa menos de 16px. */
@media (max-width: 1024px) {
    input,
    select,
    textarea {
        font-size: 16px !important;
    }
}

input,
select,
textarea,
button {
    -webkit-tap-highlight-color: transparent;
}

input,
select,
textarea {
    transform: translateZ(0);
}

/* Controles monetarios: mantienen el mismo diseño, pero aceptan 1,000 / 10,500.50 */
[data-money-input="true"] {
    font-variant-numeric: tabular-nums;
    letter-spacing: .05px;
}

/* Fotos de perfil reutilizables */
.profile-photo-shell {
    position: relative;
    flex: 0 0 auto;
}

.profile-photo-frame {
    position: relative;
    overflow: hidden;
    display: grid;
    place-items: center;
    border: 1px solid rgba(54,230,107,.18);
    border-radius: 50%;
    background: rgba(54,230,107,.09);
    color: #36e66b;
    font-weight: 900;
}

.profile-photo-frame img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.profile-photo-frame.has-photo img {
    display: block;
}

.profile-photo-frame.has-photo .profile-photo-initials {
    opacity: 0;
}

.profile-photo-edit {
    position: absolute;
    right: -3px;
    bottom: -3px;
    width: 29px;
    height: 29px;
    min-height: 29px !important;
    display: grid;
    place-items: center;
    padding: 0;
    border: 2px solid #050807;
    border-radius: 50%;
    background: #36e66b;
    color: #041007;
    font-size: 13px;
    font-weight: 900;
}

.photo-picker-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 11px;
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 12px;
    background: rgba(255,255,255,.018);
}

.photo-picker-card .profile-photo-frame {
    width: 58px;
    height: 58px;
    font-size: 18px;
}

.photo-picker-copy {
    min-width: 0;
    flex: 1;
}

.photo-picker-copy strong,
.photo-picker-copy small {
    display: block;
}

.photo-picker-copy strong {
    font-size: 12px;
}

.photo-picker-copy small {
    margin-top: 3px;
    color: #8f9793;
    font-size: 10px !important;
}

.photo-picker-action {
    min-height: 38px !important;
    padding: 0 11px;
    border: 1px solid rgba(54,230,107,.18);
    border-radius: 9px;
    background: rgba(54,230,107,.08);
    color: #36e66b;
    font-size: 10.5px !important;
    font-weight: 850;
}

/* Nuevo cliente / préstamo: encabezados sin etiquetas decorativas innecesarias. */
.new-record-clean-header {
    display: flex !important;
    align-items: center;
    min-height: 38px;
    grid-template-columns: none !important;
}

.new-record-clean-header .topbar-title > span,
.new-record-clean-header > .secure-chip,
.new-record-clean-header > .brand-icon {
    display: none !important;
}

.new-record-clean-header .topbar-title strong {
    font-size: 19px !important;
}

/* Profile client image */
.profile-hero .avatar.photo-avatar,
.identity-banner .avatar.photo-avatar {
    position: relative;
    overflow: hidden;
}

.photo-avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.photo-avatar.has-photo img { display:block; }
.photo-avatar.has-photo .avatar-initials { opacity:0; }

/* Voucher final: contenido compacto y proporcionado */
.voucher .compact-rule-strip {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    margin-top: 8px;
}

.voucher .compact-rule-strip > div {
    padding: 9px;
    border: 1px solid rgba(255,255,255,.055);
    border-radius: 10px;
    background: rgba(255,255,255,.022);
}

.voucher .compact-rule-strip span,
.voucher .compact-rule-strip strong {
    display: block;
}

.voucher .compact-rule-strip span {
    color: #8f9793;
    font-size: 10px;
}

.voucher .compact-rule-strip strong {
    margin-top: 2px;
    font-size: 12px;
    line-height: 1.35;
}

@media (max-width: 380px) {
    .voucher .compact-rule-strip { grid-template-columns: 1fr; }
}
