:root {
    --bg: #f8fafc;
    --card: #ffffff;
    --text: #111827;
    --muted: #4b5563;
    --primary: #2deede;
    --primary-strong: #2cdace;
    --danger: #f35959;
    --border: #eaf1d279;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Verdana, Tahoma, sans-serif;
    background: linear-gradient(180deg, #eef2ff 0%, var(--bg) 220px);
    color: var(--text);
}

body.welcome-page {
    min-height: 100dvh;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.8), rgba(15, 118, 110, 0.55)),
        url('https://images.unsplash.com/photo-1511895426328-dc8714191300?auto=format&fit=crop&w=900&q=80') center/cover no-repeat;
}

body.user-page--selector {
    min-height: 100dvh;
    background:
        #172554 url('../img/famila_reunida.jpg') center/contain no-repeat;
}

body.user-page--selector .app {
    display: flex;
    align-items: center;
    justify-content: center;
}

body.user-page--selector .user-selector-card {
    width: 100%;
    background: rgba(15, 23, 42, 0.36);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #ffffff;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.2);
}

body.user-page--selector .user-selector-card h1,
body.user-page--selector .user-selector-card p,
body.user-page--selector .user-selector-card label {
    color: #ffffff;
}

body.user-page--selector .user-selector-card .muted {
    color: #d8ffe5;
}

body.user-page--selector .user-selector-form {
    margin-top: 18px;
}

body.vault-page {
    background:
        linear-gradient(140deg, rgba(2, 6, 23, 0.68), rgba(15, 23, 42, 0.55)),
        url('../img/Boveda.png') center/cover no-repeat fixed;
}

body.vault-page .card {
    background: rgba(100,100,100, 0.1);
     /* Ex transaparent */
}

body.vault-page .app > section.card {
    border: 0;
}

body.vault-page .card-soft,
body.vault-page .list-item {
background: rgba(200,255,100, 0.1);
    /* background: transparent; */
}

body.vault-page .vault-category-field[hidden] {
    display: none !important;
}

body.vault-page .vault-category-field:not([hidden]) {
    display: contents;
}

.btn[hidden] {
    display: none !important;
}

body.minor-readonly .vault-entry-actions,
body.minor-readonly .vault-entry-edit,
body.minor-readonly .vault-new-entry-block,
body.minor-readonly .vault-passkey-management {
    display: none !important;
}
body.minor-readonly:not(.vault-page) form[method="post"] {
    display: none !important;
}

body.vault-page .card,
body.vault-page .card h1,
body.vault-page .card h2,
body.vault-page .card p,
body.vault-page .card label,
body.vault-page .card strong,
body.vault-page .card span,
body.vault-page .card a {  
    color: #d8ffe5;
}

body.vault-page .card .muted {
    color: #c7f7d6;
}

body.vault-page .actions .btn.secondary {
    color: #111111;
}

body.vault-page .site-legal,
body.vault-page .site-legal a,
body.vault-page .site-legal span {
    color: #d8ffe5;
}

.app {
    max-width: 460px;
    margin: 0 auto;
    min-height: 100dvh;
    padding: 16px;
}

.app.app-fullscreen {
    max-width: 460px;
    width: 100%;
    margin: 0 auto;
    min-height: 100dvh;
    padding: 16px;
}

.app.app-fullscreen > .card {
    min-height: auto;
    margin-bottom: 10px;
    border-radius: 14px;
}

@media (max-width: 768px) {
    .app.app-fullscreen {
        max-width: none;
        margin: 0;
        padding: 0;
        min-height: 100svh;
        display: flex;
    }

    .app.app-fullscreen > .card {
        min-height: 100svh;
        flex: 1 1 auto;
        margin: 0;
        border-radius: 0;
        display: flex;
        flex-direction: column;
        
    }

    .app.app-fullscreen > .card .user-actions-bottom {
        margin-top: auto;
        padding-top: 12px;
        
    }
}

.welcome-screen {
    max-width: 460px;
    margin: 0 auto;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.welcome-card {
    width: 100%;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 24px;
    padding: 24px 18px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(8px);
}

.welcome-kicker {
    margin: 0 0 6px;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--primary);
}

.welcome-copy {
    margin: 0 0 16px;
    color: var(--muted);
}

.welcome-form {
    display: grid;
    gap: 10px;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px;
    box-shadow: 0 6px 14px rgba(17, 24, 39, 0.06);
    margin-bottom: 10px;
}

h1 {
    font-size: 1.45rem;
    margin: 0 0 8px;
}

h2 {
    font-size: 1.1rem;
    margin: 0 0 6px;
}

p {
    font-size: 0.9rem;
    line-height: 1.4;
}

small,
.muted {
    color: var(--muted);
    font-size: 0.9rem;
}

.grid {
    display: grid;
    gap: 10px;
}

.btn {
    display: inline-block;
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    background: #ffffff;
    color: #111111;
    text-align: center;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 14px 12px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(17, 24, 39, 0.08);
}

.btn:hover {
    background: #f9fafb;
    box-shadow: 0 6px 14px rgba(17, 24, 39, 0.12);
}

.btn.secondary {
    background: #ffffff;
    color: #111111;
    margin: 14px 0;
}

.btn.secondary.small {
    margin: 8px 0 0;
}

.btn.danger {
    background: #ffffff;
    color: #ec0808;
}

.vivienda-card-actions {
    row-gap: 12px;
}

.vivienda-card-actions .btn {
    margin: 0;
}

.btn.danger:hover {
    background: #f9fafb;
}

.actions {
    display: grid;
    gap: 8px;
    margin-top: 8px;
}

.user-name-title {
    text-align: center;
    margin-bottom: 6px;
}

.user-photo-corner {
    display: flex;
    justify-content: center;
    margin-top: 8px;
    margin-bottom: 6px;
}

.user-page .user-photo-corner {
    justify-content: flex-end;
    padding-right: 8px;
}

.user-photo-button {
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
}

.user-profile-photo {
    width: 86px;
    height: 86px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 10px rgba(17, 24, 39, 0.12);
}

.photo-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.photo-modal[hidden] {
    display: none !important;
}

.photo-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.72);
}

.photo-modal__content {
    position: relative;
    z-index: 1;
    width: min(92vw, 420px);
    background: #fff;
    border-radius: 14px;
    padding: 10px;
    border: 1px solid var(--border);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.35);
}

.photo-modal__close {
    border: 1px solid #d1d5db;
    background: #fff;
    border-radius: 10px;
    padding: 6px 10px;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 8px;
}

.photo-modal__image {
    width: 100%;
    display: block;
    border-radius: 10px;
    border: 1px solid var(--border);
}

.user-panel {
    margin-top: 18px;
}

.user-actions-bottom {
    margin-top: 18px;
}

.user-actions-bottom .btn.secondary {
    background: rgba(255, 255, 255, 0.5);
    text-shadow: 0 0 4px rgba(250, 204, 21, 0.95);
    font-size: calc(1rem + 2px);
    margin: 6px 0;
}

.user-actions-bottom .btn.secondary:first-child {
    margin-top: 18px;
}

.user-actions-bottom .btn.secondary:hover {
    background: rgba(255, 255, 255, 0.65);
}

label {
    display: block;
    font-size: 0.9rem;
    margin: 20px 0 4px;
    font-weight: 600;    
    letter-spacing: 0.03em;
}

input,
select,
textarea {
    width: 100%;
    border: 0.2px solid #c7d5f3;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 0.9rem;
    background: #fff;
    color: rgb(53, 11, 241);
}

body.vault-page input[type="password"]::-ms-reveal,
body.vault-page input[type="password"]::-ms-clear {
    display: none;
}

input[type="text"],
input[type="search"],
input[type="url"],
textarea {
    text-transform: uppercase;
}

textarea.emails-adicionales-field {
    font-size: calc(0.9rem - 3px) !important;
    text-transform: lowercase !important;
}

.emails-adicionales-list {
    margin: 6px 0 0 18px;
    padding: 0;
}

.emails-adicionales-list li {
    font-size: calc(0.9rem - 3px);
    text-transform: lowercase;
}

input::placeholder,
textarea::placeholder {
    opacity: 0.2;
}

.notice {
    border-left: 5px solid var(--primary);
    background: #ecfeff;
    padding: 10px;
    border-radius: 8px;
    margin: 8px 0 14px;
}

.notice.error {
    border-left-color: var(--danger);
    background: #fef2f2;
}

.notice.warning-soft {
    border-left-color: #d4a700;
    background: #fff9db;
}

.vault-toast {
    position: fixed;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1600;
    width: min(92vw, 360px);
    padding: 12px 14px;
    border: 1px solid #eab308;
    border-radius: 12px;
    background: #fef08a;
    color: #713f12;
    box-shadow: 0 14px 28px rgba(17, 24, 39, 0.16);
    font-weight: 700;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.vault-toast.is-visible {
    opacity: 1;
}

#vault_unlock_toast {
    text-align: justify;
    text-align-last: center;
    line-height: 1.35;
}

.vault-toast--strong {
    top: 72px;
    background: #fef3a6;
    border-color: #d4a700;
    color: #713f12;
    box-shadow: 0 16px 30px rgba(212, 167, 0, 0.18);
    text-align: justify;
    text-align-last: center;
    line-height: 1.35;
}

.field-error {
    color: var(--danger);
    font-size: 0.95rem;
    margin-top: 4px;
}

.reminder-list {
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
    display: grid;
    gap: 6px;
}

.reminder-list--compact {
    gap: 4px;
}

.reminder-row {
    display: grid;
    grid-template-columns: 118px 1fr auto;
    gap: 6px;
    align-items: center;
    padding: 4px 0;
    border-bottom: 1px solid rgba(209, 213, 219, 0.45);
}

.reminder-date {
    font-family: "Courier New", monospace;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--muted);
}

.reminder-name {
    font-weight: 700;
}

.reminder-delete-form {
    margin: 0;
}

.icon-btn {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    line-height: 1;
}

.icon-btn--plain {
    width: 28px;
    height: 28px;
    font-size: 0.95rem;
}

.icon-btn.danger {
    color: var(--danger);
}

.icon-btn:hover {
    transform: translateY(-1px);
}

.badge {
    display: inline-block;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.88rem;
    font-weight: 600;
    background: #dbeafe;
    color: #1e3a8a;
}

.contact-links {
    display: grid;
    gap: 12px;
    margin: 12px 0 12px;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
}

.contact-link {
    display: inline-block;
    width: 100%;
    border: 0.8px solid #1d4ed8;
    border-radius: 10px;
    padding: 14px;
    text-decoration: none;
    background: #eff6ff;
    color: #1e3a8a;
    font-weight: 600;
    text-align: center;
}

.contact-link:active,
.contact-link:hover {
    background: #dbeafe;
}

.contact-link.whatsapp {
    border-color: #15803d;
    background: #ecfdf3;
    color: #166534;
}

.contact-link.whatsapp:active,
.contact-link.whatsapp:hover {
    background: #dcfce7;
}

.profile-photo {
    width: 100%;
    max-width: 220px;
    border-radius: 14px;
    border: 0.5px solid var(--border);
    display: block;
    margin-top: 6px;
}

.profile-photo--zoomable {
    cursor: zoom-in;
    touch-action: manipulation;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.checkbox-row span {
    font-size: calc(0.7rem + 1px);
}

.vault-recovery-toggle span {
    font-size: 12px;
}

.checkbox-stack {
    display: grid;
    gap: 0;
    margin: 0;
}

.section-stack + .checkbox-stack {
    margin-top: 12px;
}

.check-spacing {
    margin: 15px 0 0;
}

.checkbox-stack .dynamic-section {
    margin-top: 0px;
}

.checkbox-row input {
    width: 20px;
    height: 20px;
}

#toggle_form_cita,
#toggle_form_cumple {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    flex: 0 0 20px;
    transform: none;
}

.capture-file-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 8px 0 10px;
}

#documentos-section {
    overflow-x: hidden;
}

#documentos-section,
#documentos-section * {
    box-sizing: border-box;
}

#identidad-section,
#contacto-section,
#conductor-section,
#vehiculos-section,
#documentos-section {
    max-width: 100%;
    overflow-x: hidden;
}

#conductor-section .capture-tile {
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

#conductor-section .capture-file-row {
    width: 100%;
    grid-template-columns: 1fr;
}

#conductor-section .capture-frame,
#conductor-section .capture-frame__image,
#conductor-section .profile-photo,
#conductor-section .capture-file-trigger {
    max-width: 100%;
}

#conductor-section .capture-frame__image {
    object-fit: contain;
    min-height: 0;
    max-height: 100%;
    width: 100%;
    height: 100%;
    background: #fff;
}

#conductor-section .capture-frame {
    min-height: 0;
}

#vehiculos-section .capture-tile {
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

#vehiculos-section .capture-file-row {
    width: 100%;
    grid-template-columns: 1fr;
}

#vehiculos-section .capture-frame,
#vehiculos-section .capture-frame__image,
#vehiculos-section .profile-photo,
#vehiculos-section .capture-file-trigger {
    max-width: 100%;
}

#vehiculos-section .capture-frame__image {
    object-fit: contain;
    min-height: 0;
    max-height: 100%;
    width: 100%;
    height: 100%;
    background: #fff;
}

#vehiculos-section .capture-frame {
    min-height: 0;
}

#vehiculos-section .row-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 10px;
}

#vehiculos-section .row-actions .btn,
#vehiculos-section > button[data-add="vehiculos"] {
    width: 100%;
    min-width: 0;
}

#documentos-section .capture-tile {
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

#documentos-section .capture-file-row {
    width: 100%;
    grid-template-columns: 1fr;
}

#documentos-section .capture-frame,
#documentos-section .capture-frame__image,
#documentos-section .profile-photo,
#documentos-section .capture-file-trigger {
    max-width: 100%;
}

#documentos-section .capture-frame__image {
    object-fit: contain;
    min-height: 0;
    max-height: 100%;
    width: 100%;
    height: 100%;
    background: #fff;
}

#documentos-section .capture-frame {
    min-height: 0;
}

.capture-file-input {
    display: none;
}

.capture-file-trigger {
    width: 100%;
    min-width: 0;
}

@media (max-width: 380px) {
    .capture-file-row {
        grid-template-columns: 1fr;
    }
}

.user-hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 8px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #f8fafc;
}

.user-card--with-bg {
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.55);
}

.user-card--with-bg h1,
.user-card--with-bg h2,
.user-card--with-bg p,
.user-card--with-bg label,
.user-card--with-bg strong,
.user-card--with-bg span {
    /* color: inherit; */
    color: #FFF;
}

.user-card--with-bg .muted {
    color: rgba(255, 255, 255, 0.9);
}

.user-card--with-bg .notice,
.user-card--with-bg .card-soft,
.user-card--with-bg .list-item,
.user-card--with-bg .user-hero {
    color: var(--text);
}

.user-card--with-bg .user-photo-corner,
.user-card--with-bg .user-panel > .card-soft,
.user-card--with-bg .user-panel > .toggle-shell,
.user-card--with-bg .user-panel > .checkbox-row {
    margin-left: auto;
    margin-right: 0;
}

.user-card--with-bg .user-photo-corner {
    justify-content: flex-end;
    padding-right: 8px;
}

.user-card--with-bg .user-panel > .card-soft,
.user-card--with-bg .user-panel > .toggle-shell {
    width: min(100%, 760px);
}

.user-card--with-bg .card-soft,
.user-card--with-bg .user-hero,
.user-card--with-bg .list-item {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-color: rgba(255, 255, 255, 0.12);
}

.user-card--with-bg .card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-color: rgba(255, 255, 255, 0.10);
}

.user-card--with-bg .card-soft {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.10);
}

.user-card--with-bg #contacto_usuario,
.user-card--with-bg #contacto_usuario strong {
    color: #ffffff;
}

.user-card--with-bg #contacto_usuario p,
.user-card--with-bg #contacto_usuario li,
.user-card--with-bg #contacto_usuario a {
    color: #bbf7d0;
}

.user-card--with-bg #contacto_usuario a {
    text-decoration: none;
}

#contacto_usuario a {
    text-decoration: none;
}

.user-card--with-bg .user-panel > .toggle-shell {
    background: rgba(22, 163, 74, 0.03);
    border-color: rgba(255, 255, 255, 0.16);
}

.user-card--with-bg .user-panel > .card-soft {
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.16);
}

.user-card--with-bg #documentos_usuario .list-item {
    display: grid;
    justify-items: center;
    text-align: center;
}

.user-card--with-bg #documentos_usuario .profile-photo {
    display: block;
    margin-inline: auto;
}

#documentos_usuario .profile-photo {
    cursor: zoom-in;
}

.user-card--with-bg #documentos_usuario .dni-photo-card {
    padding: 0;
    overflow: hidden;
}

.user-card--with-bg #documentos_usuario .dni-photo-card p {
    margin: 12px 12px 8px;
}

.user-card--with-bg #documentos_usuario .dni-photo-card__image {
    width: 100%;
    max-width: none;
    margin: 0;
    border-radius: 0 0 12px 12px;
}

.user-controls {
    display: grid;
    gap: 8px;
}

.card-soft {
    background: rgb(195, 255, 181);
    border-style: dashed;
    margin: 28px 0 30px;
}

.form-frame {
    border: 1px dashed #9ca3af;
    border-radius: 12px;
    padding: 12px;
}

.form-frame legend {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--muted);
    padding: 10px 8px 0;
    background: rgb(195, 255, 181);
    border-radius: 8px;
}

.alquiler-numero-space {
    margin-bottom: 20px;
}

.alquiler-party-details {
    margin-top: 12px;
    padding: 10px;
    border: 1px dashed var(--border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.55);
}

.ver-details {
    margin: 25px 0;
}

.vivienda-card {
    margin: 0 0 14px;
    padding: 14px;
}

.vivienda-card:last-child {
    margin-bottom: 0;
}

.vivienda-card-title {
    margin: 0 0 8px;
    font-size: 1.05rem;
}

.vivienda-card .vivienda-cuentas .list-item p,
.user-card--with-bg .vivienda-card .vivienda-cuentas .list-item p {
    color: #1d4ed8;
}

.vivienda-card .vivienda-cuentas .list-item strong,
.vivienda-card .vivienda-cuentas .muted,
.user-card--with-bg .vivienda-card .vivienda-cuentas .list-item strong,
.user-card--with-bg .vivienda-card .vivienda-cuentas .muted {
    color: #111827;
}

.ver-details summary,
.ver-details p,
.ver-details .muted {
    font-size: calc(0.9rem - 2px);
}

.alquiler-party-details summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 8px;
}

.alquiler-party-details[open] summary {
    margin-bottom: 10px;
}

.alquiler-extra-block {
    margin-top: 14px;
    padding-top: 8px;
    border-top: 1px dashed var(--border);
}

.section-stack {
    display: grid;
    gap: 12px;
}

.form-footer-block {
    display: grid;
    gap: 12px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid rgba(22, 163, 74, 0.18);
    background: rgba(255, 255, 255, 0.25);
    border-radius: 12px;
}

.toggle-shell {
    margin: 0;
    padding: 10px;
    border: 1px solid rgba(22, 163, 74, 0.22);
    border-radius: 14px;
    background: rgba(22, 163, 74, 0.06);
    box-shadow: inset 0 0 0 1px rgba(22, 163, 74, 0.04);
}

.section-stack > .toggle-shell {
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
}

.toggle-panel {
    margin-top: 10px;
    padding: 12px;
    border: 1px solid rgba(22, 163, 74, 0.14);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
}

.toggle-panel {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.toggle-panel > * {
    min-width: 0;
}

.capture-tile {
    margin: 12px 0 14px;
    padding: 12px;
    border: 1px dashed #9ca3af;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
}

.capture-frame {
    position: relative;
    display: grid;
    place-items: center;
    --capture-accent: 22, 163, 74;
    --capture-ratio: 4 / 3;
    min-height: 190px;
    margin-top: 8px;
    padding: 14px;
    aspect-ratio: var(--capture-ratio);
    border: 2px solid rgba(var(--capture-accent), 0.18);
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(var(--capture-accent), 0.06), rgba(255, 255, 255, 0.98)),
        #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8), 0 10px 26px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.capture-frame::before {
    content: '';
    position: absolute;
    inset: 10px;
    border: 1px dashed rgba(var(--capture-accent), 0.22);
    border-radius: 12px;
    pointer-events: none;
}

.capture-frame__placeholder,
.capture-frame__caption {
    position: relative;
    z-index: 1;
    text-align: center;
}

.capture-frame__placeholder {
    display: grid;
    gap: 8px;
    place-items: center;
    color: var(--muted);
}

.capture-frame__placeholder strong {
    font-size: 1rem;
    color: var(--text);
}

.capture-frame__placeholder span {
    font-size: 0.88rem;
}

.capture-frame[data-capture-kind="dni"] {
    --capture-accent: 59, 130, 246;
    --capture-ratio: 1.58 / 1;
    min-height: 175px;
}

.capture-frame[data-capture-kind="persona"] {
    --capture-accent: 249, 115, 22;
    --capture-ratio: 3 / 4;
    min-height: 230px;
}

.capture-frame[data-capture-kind="usuario"] {
    --capture-accent: 168, 85, 247;
    --capture-ratio: 1 / 1;
    min-height: 210px;
}

.capture-frame[data-capture-kind="licencia"] {
    --capture-accent: 14, 165, 233;
    --capture-ratio: 1.45 / 1;
    min-height: 185px;
}

.capture-frame[data-capture-kind="vehiculo"] {
    --capture-accent: 16, 185, 129;
    --capture-ratio: 1.45 / 1;
    min-height: 185px;
}

.capture-frame[data-capture-kind="dni"] .capture-frame__placeholder strong,
.capture-frame[data-capture-kind="persona"] .capture-frame__placeholder strong,
.capture-frame[data-capture-kind="usuario"] .capture-frame__placeholder strong,
.capture-frame[data-capture-kind="licencia"] .capture-frame__placeholder strong,
.capture-frame[data-capture-kind="vehiculo"] .capture-frame__placeholder strong {
    letter-spacing: 0.02em;
}

.capture-frame__image {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    min-height: 160px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14);
}

.capture-frame.is-filled .capture-frame__placeholder {
    display: none;
}

.capture-frame.is-empty .capture-frame__image {
    display: none;
}

.capture-frame__note {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 12px;
    z-index: 1;
    font-size: 0.78rem;
    color: rgba(15, 23, 42, 0.55);
    text-align: center;
    pointer-events: none;
}

.capture-tile label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

.capture-tile input[type="file"] {
    width: 100%;
    min-height: 44px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
}

.list-item {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px;
    margin-top: 10px;
    margin-bottom: 15px;
    background: rgb(240, 253, 224);
}

.inline {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.inline .btn {
    margin: 0;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.birthday-card {
    background: linear-gradient(135deg, #fff7ed 0%, #fef3c7 100%);
    border-color: #f59e0b;
}

.birthday-card--today {
    background: linear-gradient(135deg, #fff1f2 0%, #fecdd3 100%);
    border-color: #fb7185;
}

.birthday-alert {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(251, 113, 133, 0.35);
}

.birthday-list--notice {
    position: relative;
    z-index: 1;
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
    display: grid;
    gap: 6px;
}

.birthday-list--notice li {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(251, 113, 133, 0.2);
    border-radius: 10px;
    padding: 8px 10px;
    font-weight: 600;
}

.birthday-list--notice .birthday-note {
    display: block;
    margin-top: 2px;
    font-size: 0.82rem;
    font-weight: 400;
    color: var(--muted);
}

.birthday-alert-copy {
    max-width: 34ch;
    margin: 6px auto 0;
    text-align: justify;
    text-align-last: center;
    color: #1f2937;
    font-weight: 600;
    background: rgba(229, 255, 44, 0.5);
    border: 1px solid rgba(229, 255, 44, 0.85);
    border-radius: 10px;
    padding: 6px 8px;
}

.confetti {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.confetti-piece {
    position: absolute;
    top: -12px;
    left: var(--x);
    width: 8px;
    height: 14px;
    border-radius: 2px;
    background: hsl(var(--hue) 90% 55% / 0.95);
    transform: rotate(var(--rot));
    animation: confetti-fall 2.8s linear infinite;
    animation-delay: var(--delay);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.25);
}

.confetti-piece:nth-child(3n) {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.confetti-piece:nth-child(4n) {
    width: 6px;
    height: 18px;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(0) rotate(var(--rot));
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    100% {
        transform: translateY(180px) rotate(calc(var(--rot) + 360deg));
        opacity: 0;
    }
}

.birthday-list-card {
    margin-top: 12px;
}

.birthday-list--agenda .birthday-list-item {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(251, 191, 36, 0.28);
}

.birthday-list-item {
    position: relative;
}

.birthday-list-item .btn.small {
    width: auto;
    min-width: 140px;
    margin: 0;
    padding: 8px 12px;
    font-size: 0.8rem;
}

.birthday-list {
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
    display: grid;
    gap: 8px;
}

.birthday-list li {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.birthday-list--compact-agenda {
    gap: 4px;
}

.birthday-list--compact-agenda .birthday-agenda-row {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    font-size: 0.8rem;
    line-height: 1.2;
}

.birthday-agenda-date {
    font-family: "Courier New", monospace;
    font-size: 0.8rem;
}

.birthday-agenda-name {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-weight: 600;
}

.birthday-agenda-delete-form {
    margin: 0;
}

.vault-block {
    margin-top: 12px;
}

body.vault-page .vault-block {
    margin-top: 50px;
}

#panel_nuevo_registro_privado .grid {
    gap: 0;
}

#panel_nuevo_registro_privado #vault_bank_fields {
    display: grid;
    gap: 10px;
    margin-top: 25px;
}

#panel_nuevo_registro_privado label {
    margin: 0 0 5px;
}

#panel_nuevo_registro_privado input,
#panel_nuevo_registro_privado select,
#panel_nuevo_registro_privado textarea {
    margin: 0;
}

#panel_nuevo_registro_privado textarea + button[type="submit"] {
    margin-top: 25px;
}

#panel_nuevo_registro_privado input + label,
#panel_nuevo_registro_privado select + label,
#panel_nuevo_registro_privado textarea + label {
    margin-top: 25px;
}

.vault-item p {
    margin: 6px 0;
}

.vault-audit-datetime {
    display: inline-flex;
    flex-direction: column;
    margin-left: 4px;
}

.vault-audit-date-line,
.vault-audit-time-line {
    line-height: 1.2;
}

.vault-secret-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
}

.vault-secret-row .btn {
    width: auto;
    min-width: 90px;
    margin: 0;
}

.vault-password-row {
    position: relative;
    display: block;
    align-items: center;
}

.vault-password-row input {
    width: auto;
    min-width: 0;
    padding-right: 120px !important;
}

.vault-password-row .btn {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    width: 108px !important;
    min-width: 108px !important;
    height: 34px;
    padding: 0;
    margin: 0;
    border-radius: 6px;
    line-height: 1;
}

.vault-entry-actions {
    display: flex;
    gap: 8px;
    align-items: stretch;
    margin-top: 14px;
}

.vault-entry-actions .btn {
    width: auto;
    flex: 1 1 0;
    margin: 0;
}

.vault-entry-edit {
    margin-top: 14px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.vault-entry-edit form,
.vault-entry-edit input,
.vault-entry-edit select,
.vault-entry-edit textarea {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.vault-entry-edit .vault-password-row {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.vault-entry-edit .vault-password-row input {
    width: 100%;
    padding-right: 120px !important;
}

.vault-entry-edit h3 {
    margin-top: 0;
}

.vault-secret {
    font-family: "Courier New", monospace;
}

.vault-passkey-block {
    margin-top: 12px;
    padding-top: 4px;
}

.site-legal {
    margin: 18px 0 6px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--muted);
}

.site-legal a {
    color: inherit;
    text-decoration: underline;
}

.site-legal span {
    margin: 0 6px;
}

.terms-gate-open .site-legal {
    display: none;
}

.clausulas-progress-card {
    border-style: dashed;
    background: #f8fafcb0;
}

.clause-step {
    border-left: 4px solid #2deede;
}

.clause-step p {
    text-align: justify;
    text-justify: inter-word;
}

.clause-check-row {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid #d1d5db;
}

#clausulas_accion_final {
    border-left: 4px solid #22c55e;
    background: #ecfdf5;
}

.terms-cover {
    position: relative;
    min-height: 100svh;
    margin: 0;
    border-radius: 0;
    border: 0;
    overflow: hidden;
    display: flex;
    align-items: stretch;
    background: url('../img/caratula_familiar.png') center/cover no-repeat;
}

.terms-cover__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
}

.terms-cover__content {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 100svh;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px 14px 24px;
    gap: 8px;
}

.terms-cover__content h1,
.terms-cover__content p,
.terms-cover__content label,
.terms-cover__content span {
    color: #ffffff;
}

.terms-cover__content .terms-brand {
    font-size: calc(1em + 4px);
}

.terms-cover__actions {
    display: grid;
    gap: 10px;
    margin-top: auto;
    padding-top: 8px;
}

.terms-cover .btn {
    backdrop-filter: blur(1px);
}

.terms-cover .terms-continue-btn {
    display: none;
    margin-bottom: 50px;
}

.app.app-fullscreen.app-cover {
    max-width: none;
    margin: 0;
    padding: 0;
    min-height: 100svh;
    display: flex;
}

.app.app-fullscreen.app-cover > .card {
    min-height: 100svh;
    flex: 1 1 auto;
    margin: 0;
    border-radius: 0;
    display: flex;
    flex-direction: column;
}

.terms-cover .checkbox-row input {
    accent-color: #2deede;
}

.terms-cover .checkbox-row {
    margin-bottom: 30px;
}

.vault-passkey-block .btn {
    margin-top: 6px;
}

.vault-passkey-list {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.vault-audit-item {
    background: #f8fafc;
}

.vault-entry-card {
    margin-bottom: 10px;
}

.vault-entry-toggle {
    margin-top: 0;
}

.vault-entry-summary {
    font-weight: 600;
}

.vault-entry-card .card-soft {
    margin-top: 8px;
}

.servicios-resumen-card {
    margin-top: 10px;
    border-radius: 12px;
    border: 1px solid rgba(22, 163, 74, 0.16);
    background: rgba(22, 163, 74, 0.04);
    padding: 12px;
    box-shadow: inset 0 0 0 1px rgba(22, 163, 74, 0.04);
}

.servicios-resumen-title {
    margin: 0 0 2px;
    font-size: 1.02rem;
}

.servicios-resumen-head {
    margin-bottom: 2px;
}

.servicios-prop-delete-form {
    margin: 20px auto;
    width: min(160px, 100%);
}

.servicios-prop-delete-form .btn.small {
    margin: 0;
    width: 100%;
    padding: 6px 9px;
    font-size: 0.8rem;
    background: #b91c1c;
    border-color: #991b1b;
    color: #fde047;
    font-weight: 800;
}

.servicios-prop-delete-form .btn.small:hover {
    background: #991b1b;
    color: #fef08a;
}

.servicios-resumen-meta {
    margin: 0 0 8px;
}

.servicios-tipo-title {
    margin: 8px 0 6px;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #334155;
}

.servicios-resumen-item {
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(22, 163, 74, 0.12);
    border-radius: 10px;
    padding: 10px;
}

.servicios-resumen-item p {
    margin: 4px 0;
}

@media (max-width: 370px) {
    .inline {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 10px;
    }

    .btn {
        padding: 12px 10px;
        font-size: 0.8rem;
    }
}
