:root {
    --navy: #232E73;
    --green: #69AE2B;
    --green-dark: #558E22;
    --blue: #3BA4DB;
    --orange: #E8742C;
    --text: #2A2F3A;
    --muted: #6B7280;
    --bg: #FFFFFF;
    --bg-soft: #F4F7FB;
    --border: #E7EAF0;
    --radius: 14px;
    --shadow: 0 1px 3px rgba(20,30,80,.06), 0 8px 28px rgba(20,30,80,.06);
}

* { box-sizing: border-box; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    margin: 0; color: var(--text); background: var(--bg); line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: 'Poppins', system-ui, sans-serif; color: var(--navy);
             font-weight: 600; line-height: 1.2; text-wrap: balance;
             letter-spacing: -0.01em; }
a { color: var(--navy); text-decoration: none; }

/* Accesibilidad: anillo de foco visible al navegar con teclado */
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; border-radius: 4px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }

/* Barra de navegación (responsive) */
.topbar { position: sticky; top: 0; z-index: 50;
    background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border); }
.topbar-inner { max-width: 1120px; margin: 0 auto; display: flex;
    align-items: center; gap: 1.5rem; padding: .75rem 1.5rem; flex-wrap: wrap; }
.topbar .logo { display: inline-flex; align-items: center; }
.topbar .logo img { height: 50px; display: block; }

.nav-toggle { display: none; background: none; border: none; cursor: pointer;
    font-size: 1.7rem; color: var(--navy); margin-left: auto; line-height: 1; }

.nav-collapse { display: flex; flex: 1; align-items: center; gap: 1.5rem; }
.nav-links { display: flex; gap: 1.4rem; }
.nav-links a { color: var(--muted); font-size: .95rem; font-weight: 500; transition: color .15s; }
.nav-links a:hover { color: var(--green); }
.auth { display: flex; align-items: center; gap: 1.1rem; margin-left: auto; }
.auth a.login { color: var(--navy); font-weight: 500; }
.auth a.login:hover { color: var(--green); }
.auth .username { color: var(--navy); font-weight: 500; }
.auth form.logout { margin: 0; }
.auth form.logout button { background: none; border: 1.5px solid var(--border);
    color: var(--navy); font: inherit; font-weight: 500; padding: .45rem 1.1rem;
    border-radius: 999px; cursor: pointer; transition: .15s; }
.auth form.logout button:hover { border-color: var(--navy); }

/* Barra de tabs horizontal (mobile only) */
.mobile-tabs { display: none; }

@media (max-width: 768px) {
    .mobile-tabs {
        display: flex;
        position: sticky;
        top: 65px;
        z-index: 40;
        background: #fff;
        border-bottom: 1px solid var(--border);
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 0 .5rem;
    }
    .mobile-tabs::-webkit-scrollbar { display: none; }
    .mobile-tabs a {
        flex-shrink: 0;
        padding: .65rem .75rem;
        font-size: .82rem;
        font-weight: 500;
        color: var(--muted);
        white-space: nowrap;
        border-bottom: 2px solid transparent;
        transition: color .15s, border-color .15s;
    }
    .mobile-tabs a:hover { color: var(--green); border-bottom-color: var(--green); }

    /* Hamburger ya no necesario: nav-links están en mobile-tabs */
    .nav-toggle { display: none; }
    .topbar-inner { flex-wrap: nowrap; }
    .nav-collapse { display: flex !important; flex: 0; padding: 0; width: auto; gap: .5rem; margin-left: auto; }
    .nav-links { display: none; }
    .auth { flex-direction: row; align-items: center; gap: .4rem; margin-left: 0; width: auto; }
    /* Ocultar nombre en el botón de perfil para ahorrar espacio */
    .user-trigger .user-name, .user-trigger i { display: none; }
    .user-trigger { padding: .2rem; border: none; background: none; }
    /* Login y ¿Eres Vet? más compactos */
    .auth a.login { font-size: .85rem; }
    .auth a.btn-vet { font-size: .8rem; padding: .35rem .7rem; }
}

/* Botones */
.btn, .btn-outline, .btn-vet { font-family: 'Inter', sans-serif; font-weight: 600;
    border-radius: 11px; cursor: pointer; transition: .18s; display: inline-block;
    text-align: center; }
.btn { background: var(--green); color: #fff; padding: .8rem 1.6rem; border: none; }
.btn:hover { background: var(--green-dark); transform: translateY(-1px); }
.btn:active { transform: scale(.98); }
.btn-outline { background: #fff; color: var(--navy); padding: .8rem 1.6rem;
               border: 1.5px solid var(--border); }
.btn-outline:hover { border-color: var(--navy); }
.btn-outline:active { transform: scale(.98); }
.btn-vet { background: var(--orange); color: #fff; padding: .5rem 1.15rem;
           border-radius: 999px; font-size: .92rem; }
.btn-vet:hover { filter: brightness(.95); }
.btn:disabled, .btn-outline:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* Números dinámicos (precios, totales): ancho fijo, sin saltos de layout */
.pay-row span:last-child, .pay-row.total span, .price, [data-price] {
    font-variant-numeric: tabular-nums;
}

main { max-width: 1120px; margin: 0 auto; padding: 0 1.5rem; }
.card { background: var(--bg); border: 1px solid var(--border);
        border-radius: var(--radius); padding: 1.5rem; }

/* Footer */
.site-footer { background: var(--navy); margin-top: 4rem; }
.site-footer .footer-inner { max-width: 1120px; margin: 0 auto; padding: 2.5rem 1.5rem 1.5rem; }
.site-footer .footer-top { display: flex; flex-wrap: wrap; gap: 2rem; justify-content: space-between; }
.site-footer .brand-col { max-width: 280px; }
.site-footer .footer-logo { font-family: 'Poppins', sans-serif; font-size: 1.4rem; font-weight: 600; color: #fff; }
.site-footer .brand-col p { color: #cfd6f0; font-size: .92rem; margin: .6rem 0 0; }
.site-footer h4 { color: #fff; font-family: 'Poppins', sans-serif; font-size: 1rem; margin: 0 0 .8rem; }
.site-footer a { color: #cfd6f0; font-size: .92rem; display: block; padding: .3rem 0; margin-bottom: .1rem; }
.site-footer a:hover { color: #fff; }
.site-footer .socials i { font-size: 1.3rem; margin-right: 1rem; color: #cfd6f0; cursor: pointer; }
.site-footer .footer-bottom { border-top: 1px solid rgba(255,255,255,.15); margin-top: 2rem;
    padding-top: 1.2rem; display: flex; justify-content: space-between; flex-wrap: wrap;
    gap: 1rem; font-size: .85rem; color: #9fa8cf; }
.site-footer .footer-bottom a { display: inline; margin-bottom: 0; }
    
.auth-card .back-link { display: inline-flex; align-items: center; gap: .4rem;
    color: var(--muted); font-size: .9rem; margin-bottom: 1.2rem; text-decoration: none; }
.auth-card .back-link:hover { color: var(--green); }


/* Paginación */
.pagination-nav {
    display: flex; align-items: center; justify-content: center;
    gap: .4rem; margin-top: 1.5rem; flex-wrap: wrap;
}
.page-btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 44px; height: 44px; padding: 0 .7rem;
    border: 1.5px solid var(--border); border-radius: 8px;
    background: var(--bg); color: var(--navy);
    font-size: .88rem; font-weight: 500; text-decoration: none;
    transition: border-color .15s, background .15s, color .15s;
}
.page-btn:hover { border-color: var(--green); color: var(--green); background: #f4fbe8; }
.page-btn--active {
    background: var(--green); border-color: var(--green);
    color: #fff; pointer-events: none;
}
.page-btn--disabled {
    color: var(--muted); border-color: var(--border);
    background: var(--bg-soft); pointer-events: none; opacity: .5;
}

/* Páginas de autenticación (recuperar contraseña, etc.) */
.auth-page-wrap {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 3rem 1.5rem 4rem;
    min-height: 50vh;
}
.auth-page-card {
    width: 100%;
    max-width: 460px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    box-shadow: 0 4px 24px rgba(20,30,80,.08);
    text-align: center;
}
.auth-page-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 18px;
    background: rgba(105,174,43,.12);
    color: var(--green);
    font-size: 2rem;
    margin-bottom: 1.4rem;
}
.auth-page-icon--success {
    background: rgba(105,174,43,.12);
    color: var(--green);
}
.auth-page-icon--error {
    background: rgba(163,45,45,.1);
    color: #A32D2D;
}
.auth-page-card h1 {
    font-size: 1.6rem;
    color: var(--navy);
    margin: 0 0 .6rem;
}
.auth-page-sub {
    color: var(--muted);
    font-size: .95rem;
    line-height: 1.6;
    margin: 0 0 1.8rem;
}
.auth-page-card .auth-card {
    text-align: left;
    margin-bottom: 1rem;
}
.auth-page-btn {
    width: 100%;
    justify-content: center;
    margin-top: .5rem;
}
.auth-page-links {
    margin-top: 1.4rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--border);
}
.auth-page-links a {
    color: var(--muted);
    font-size: .9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    transition: color .15s;
}
.auth-page-links a:hover { color: var(--green); }

/* Formularios — campos modernos */
.form-field { margin-bottom: 1.2rem; }
.form-field label { display: block; font-weight: 500; color: var(--navy);
    margin-bottom: .45rem; font-size: .92rem; }

/* Estiliza TODOS los inputs del formulario, no solo .form-control */
.register-form input:not([type="radio"]):not([type="checkbox"]),
.register-form select,
.auth-card input, .auth-card select,
.form-control {
    width: 100%;
    padding: .8rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: 14px;
    font: inherit;
    color: var(--text);
    background: #fff;
    transition: border-color .18s, box-shadow .18s, background .18s;
    box-shadow: 0 1px 2px rgba(20,30,80,.04);
}

/* Al pasar el mouse */
.register-form input:not([type="radio"]):hover,
.register-form select:hover,
.auth-card input:hover, .form-control:hover {
    border-color: #c7cedd;
}

/* Al hacer foco (campo activo): borde verde + halo suave */
.register-form input:focus,
.register-form select:focus,
.auth-card input:focus, .form-control:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 4px rgba(105,174,43,.15), 0 4px 12px rgba(20,30,80,.08);
    background: #fff;
}

/* Al completar correctamente (campo con contenido válido): borde verde suave */
.register-form input:not(:placeholder-shown):valid,
.register-form select:valid {
    border-color: var(--green);
    box-shadow: 0 2px 8px rgba(105,174,43,.12);
}

.form-actions { margin-top: 1.5rem; }
/* Input con prefijo fijo (teléfono) */
.phone-input-group {
    position: relative;
}
.phone-prefix {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: .95rem;
    opacity: .6;
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
    z-index: 1;
    line-height: 1;
}

.form-field .helptext { font-size: .82rem; color: var(--muted); margin-top: .35rem; }
.form-field .errorlist { font-size: .82rem; color: #c0392b; list-style: none;
    padding: 0; margin: .35rem 0 0; }
/* Campo con error: borde y halo rojos */
.form-field .errorlist ~ input,
.register-form input:not(:focus):invalid:not(:placeholder-shown) {
    border-color: #e07a7a;
}


/* Ajustes responsive generales */
img { max-width: 100%; height: auto; }
@media (max-width: 768px) {
    main { padding-left: 1rem; padding-right: 1rem; }
    .auth-card { margin: 1.5rem 1rem; padding: 1.5rem; }
}

/* Registro por secciones */
.register-wrap { max-width: 760px; margin: 2.5rem auto; background: var(--bg);
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 2.5rem; box-shadow: var(--shadow); }
.register-title { font-size: 2rem; margin: .3rem 0 .3rem; }
.register-sub { color: var(--muted); margin: 0 0 2rem; }
.form-section { padding: 1.5rem 0; border-top: 1px solid var(--border); }
.form-section:first-of-type { border-top: none; padding-top: 0; }
.form-section h2 { font-size: 1.2rem; margin: 0 0 .2rem; }
.form-section .section-hint { color: var(--muted); font-size: .9rem; margin: 0 0 1.2rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.5rem; }
.radio-row { display: flex; gap: 1.5rem; margin-bottom: .6rem; }
.radio-row label { font-weight: 400; color: var(--text); display: inline-flex;
    align-items: center; gap: .4rem; margin: 0; }
.radio-row input { width: auto; }
.checkbox-field { margin-top: 1.5rem; }
/* El texto va dentro de un <span> para que sea UN solo flex item: si no, el gap
   se cuela entre los enlaces y la puntuación ("Privacidad ."). */
.checkbox-field label { font-weight: 400; color: var(--text); display: inline-flex;
    align-items: flex-start; gap: .5rem; margin: 0; }
.checkbox-field input { width: auto; margin-top: .2rem; flex: none; }
.checkbox-field a { text-decoration: underline; }
.form-buttons { display: flex; justify-content: flex-end; gap: 1rem;
    margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.form-buttons .btn, .form-buttons .btn-outline { width: auto; }
@media (max-width: 640px) {
    .register-wrap { margin: 1.5rem 1rem; padding: 1.5rem; }
    .grid-2 { grid-template-columns: 1fr; }
    .form-buttons { flex-direction: column-reverse; }
    .form-buttons .btn, .form-buttons .btn-outline { width: 100%; text-align: center; }
}

/* Campos de subida de archivo */
.register-form input[type="file"] {
    width: 100%; padding: .7rem 1rem; border: 1.5px dashed var(--border);
    border-radius: 14px; background: var(--bg-soft); font: inherit;
    color: var(--muted); cursor: pointer; transition: border-color .18s, background .18s;
}
.register-form input[type="file"]:hover { border-color: var(--green); background: #fff; }
.register-form input[type="file"]::file-selector-button {
    background: var(--navy); color: #fff; border: none; padding: .5rem 1rem;
    border-radius: 8px; margin-right: 1rem; cursor: pointer; font: inherit;
}

/* Páginas legales / institucionales */
.legal-page h2 { margin-top: 2rem; font-size: 1.15rem; }
.legal-page ul, .legal-page ol { padding-left: 1.4rem; }
.legal-page li { margin-bottom: .4rem; }
.legal-note { color: var(--muted); font-size: .85rem; margin-top: 2.5rem;
    padding-top: 1rem; border-top: 1px solid var(--border); }

/* Modal de términos y privacidad (registro) */
.legal-dialog { width: min(640px, calc(100% - 2rem)); max-height: 85vh; padding: 0;
    border: none; border-radius: var(--radius); background: var(--bg); color: var(--text);
    box-shadow: 0 1px 3px rgba(20,30,80,.10), 0 24px 60px rgba(20,30,80,.22); overflow: hidden; }
.legal-dialog[open] { display: flex; flex-direction: column; }
.legal-dialog::backdrop { background: rgba(20,30,80,.45); backdrop-filter: blur(2px); }
.legal-dialog[open] { animation: legal-dialog-in .18s cubic-bezier(.23,1,.32,1); }
.legal-dialog[open]::backdrop { animation: legal-backdrop-in .18s ease-out; }
@keyframes legal-dialog-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes legal-backdrop-in { from { opacity: 0; } }

.legal-dialog-head { display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; padding: .6rem .75rem .6rem 1.25rem; border-bottom: 1px solid var(--border); }
.legal-dialog-external { color: var(--muted); font-size: .85rem; }
.legal-dialog-external:hover { color: var(--navy); text-decoration: underline; }
.legal-dialog-close { width: 40px; height: 40px; display: inline-flex; align-items: center;
    justify-content: center; border: none; border-radius: 10px; background: transparent;
    color: var(--muted); font-size: 1rem; cursor: pointer; transition: background .15s, color .15s; }
.legal-dialog-close:hover { background: var(--bg-soft); color: var(--text); }
.legal-dialog-close:active { transform: scale(.97); }

.legal-dialog-body { overflow-y: auto; padding: 0 1.5rem 1.5rem; }
.legal-dialog-body:focus { outline: none; }
.legal-dialog-body h1 { font-size: 1.35rem; margin: 1.5rem 0 .25rem; }
.legal-dialog-body h2 { font-size: 1.05rem; margin-top: 1.6rem; }
.legal-dialog-body p, .legal-dialog-body li { font-size: .93rem; text-wrap: pretty; }
.legal-dialog-loading { color: var(--muted); padding: 2rem 0; }

.legal-dialog-foot { display: flex; justify-content: flex-end; gap: .75rem;
    padding: .9rem 1.25rem; border-top: 1px solid var(--border); background: var(--bg); }
.legal-dialog-foot .btn, .legal-dialog-foot .btn-outline { width: auto; }

@media (max-width: 640px) {
    .legal-dialog { width: 100%; max-width: 100%; max-height: 92vh; margin: auto auto 0;
        border-radius: var(--radius) var(--radius) 0 0; }
    .legal-dialog-body { padding: 0 1.1rem 1.2rem; }
    .legal-dialog-foot .btn, .legal-dialog-foot .btn-outline { flex: 1; text-align: center; }
}
.steps-list { list-style: none; padding: 0; display: grid; gap: 1.2rem; margin: 1.5rem 0; }
.steps-list li { background: var(--bg-soft); border-radius: var(--radius); padding: 1rem 1.2rem; }
.steps-list li strong { display: block; margin-bottom: .3rem; color: var(--navy); }
.steps-list li p { margin: 0; color: var(--muted); }

/* Mis mascotas */
.page-narrow { max-width: 820px; margin: 2.5rem auto; }
.pets-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem; margin: 1.5rem 0 2rem; }
.pet-card { display: flex; align-items: center; gap: 1rem; background: var(--bg);
    border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem; box-shadow: var(--shadow); }
.pet-card .pet-ic { width: 56px; height: 56px; border-radius: 50%; background: var(--bg-soft);
    color: var(--green); display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; flex-shrink: 0; overflow: hidden; }
.pet-card .pet-ic img.pet-photo { width: 100%; height: 100%; object-fit: cover; }
.pet-card h3 { margin: 0; font-size: 1.05rem; }
.pet-card p { margin: .2rem 0 0; color: var(--muted); font-size: .9rem; }
.pet-bio { font-style: italic; color: var(--muted); font-size: .85rem; margin-top: .35rem !important; }
.add-pet { margin-top: 1rem; } .add-pet h2 { margin-top: 0; font-size: 1.2rem; }
.photo-upload-wrap { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.photo-preview { width: 72px; height: 72px; border-radius: 50%; object-fit: cover;
    border: 2px solid var(--border); flex-shrink: 0; }
.pet-card-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .4rem; }
.btn-edit-sm { background: var(--bg-soft) !important; color: var(--navy) !important; border-color: var(--border) !important; }
.btn-danger { background: #FCEBEB; color: #A32D2D; border: 1px solid #F7C1C1; }
.btn-danger:hover { background: #A32D2D; color: #fff; }
.edit-pet-header { display: flex; align-items: center; gap: 1.25rem; }
.edit-pet-photo { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); flex-shrink: 0; }
.edit-pet-avatar { width: 72px; height: 72px; border-radius: 50%; background: var(--bg-soft);
    color: var(--green); display: flex; align-items: center; justify-content: center;
    font-size: 2rem; flex-shrink: 0; }
.page-header { display: flex; align-items: center; gap: 1rem; }
.btn-back { display: inline-flex; align-items: center; gap: .35rem; color: var(--muted);
    font-size: .9rem; }
.btn-back:hover { color: var(--navy); }
.empty-note { color: var(--muted); }

/* Estado vacío con ícono + CTA */
.empty-state { text-align: center; padding: 3rem 1.5rem; }
.empty-state-ic {
    width: 72px; height: 72px; margin: 0 auto 1rem;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; background: var(--bg-soft);
    color: var(--green); font-size: 2rem;
}
.empty-state h3 { margin: 0 0 .4rem; font-size: 1.15rem; }
.empty-state p { color: var(--muted); margin: 0 auto 1.4rem; max-width: 380px; }
@media (max-width: 640px) { .page-narrow { margin: 1rem .5rem; } }


/* ── Telemedicina landing ───────────────────────── */
.tele-landing { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem 4rem; }

.tele-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center;
    padding: 3rem 0 2.5rem; }
.tele-tag { display: inline-flex; align-items: center; gap: .4rem; background: rgba(105,174,43,.12);
    color: var(--green); font-size: .82rem; font-weight: 700; padding: .25rem .75rem;
    border-radius: 20px; margin-bottom: 1rem; }
.tele-hero h1 { font-size: 2.4rem; line-height: 1.15; color: var(--navy); margin-bottom: .9rem; }
.tele-hero > .tele-hero-text > p { color: var(--muted); font-size: 1.05rem; line-height: 1.65; margin-bottom: 1.6rem; }
.tele-hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.tele-hero-visual { display: flex; justify-content: center; }
.tele-visual-card { background: var(--navy); border-radius: 24px; padding: 2.5rem 2rem;
    display: flex; flex-direction: column; align-items: center; gap: 1rem;
    box-shadow: 0 12px 40px rgba(20,30,80,.18); min-width: 220px; }
.tele-big-icon { font-size: 4rem; color: var(--green); }
.tele-visual-dots { display: flex; gap: .5rem; }
.tele-visual-dots span { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.25); }
.tele-visual-dots span:first-child { background: #e83e3e; }
.tele-visual-dots span:nth-child(2) { background: #f5a623; }
.tele-visual-dots span:last-child { background: var(--green); }
.tele-visual-label { color: rgba(255,255,255,.7); font-size: .85rem; margin: 0; }

.tele-features { padding: 2.5rem 0; border-top: 1px solid var(--border); }
.tele-features h2 { color: var(--navy); text-align: center; margin-bottom: 2rem; }
.tele-features-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.5rem; }
.tele-feature { text-align: center; }
.tele-feature .bi { font-size: 2rem; color: var(--green); display: block; margin-bottom: .6rem; }
.tele-feature h3 { font-size: .98rem; color: var(--navy); margin-bottom: .3rem; }
.tele-feature p { font-size: .88rem; color: var(--muted); line-height: 1.55; margin: 0; }

.tele-how { padding: 2.5rem 0; border-top: 1px solid var(--border); }
.tele-how h2 { color: var(--navy); text-align: center; margin-bottom: 2rem; }
.tele-steps { display: flex; align-items: center; justify-content: center; gap: 1rem; flex-wrap: wrap; }
.tele-step { background: #fff; border: 1.5px solid var(--border); border-radius: 14px;
    padding: 1.4rem 1.2rem; text-align: center; max-width: 200px; flex: 1; min-width: 140px; }
.tele-step-num { display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 50%; background: var(--green); color: #fff;
    font-weight: 700; font-size: 1rem; margin-bottom: .6rem; }
.tele-step h3 { font-size: .95rem; color: var(--navy); margin-bottom: .3rem; }
.tele-step p { font-size: .85rem; color: var(--muted); margin: 0; line-height: 1.5; }
.tele-step-arrow { color: var(--muted); font-size: 1.4rem; }

.tele-cta-band { background: linear-gradient(135deg, var(--navy), #1a2357);
    border-radius: 20px; padding: 3rem 2rem; text-align: center; margin-top: 2.5rem; color: #fff; }
.tele-cta-band h2 { color: #fff; margin-bottom: .6rem; }
.tele-cta-band p { color: rgba(255,255,255,.75); margin-bottom: 1.5rem; }
.btn-white { background: #fff !important; color: var(--navy) !important; }
.btn-white:hover { background: rgba(255,255,255,.9) !important; }

/* ── Telemedicina sesión ───────────────────────── */
.tele-session-wrap { max-width: 1200px; margin: 0 auto; padding: 1.5rem; }
.tele-session-header { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
    margin-bottom: 1.2rem; }
.tele-session-header h2 { margin: 0; font-size: 1.2rem; color: var(--navy); flex: 1; }

.tele-session-body { display: grid; grid-template-columns: 1fr 360px; gap: 1.2rem; align-items: start; }

.tele-video-panel { border-radius: 14px; overflow: hidden; background: #000;
    box-shadow: 0 4px 20px rgba(20,30,80,.15); }
.tele-iframe { width: 100%; height: 580px; border: none; display: block; }

.tele-side-panel { display: flex; flex-direction: column; gap: 1rem; }
.tele-info-bar { background: var(--bg-soft); border-radius: 10px; padding: .75rem 1rem;
    display: flex; flex-direction: column; gap: .3rem; font-size: .88rem; color: var(--muted); }
.tele-info-bar .bi { color: var(--green); margin-right: .3rem; }

.tele-chat { display: flex; flex-direction: column; border: 1.5px solid var(--border);
    border-radius: 14px; overflow: hidden; background: #fff;
    box-shadow: 0 2px 8px rgba(20,30,80,.06); }
.tele-chat-messages { flex: 1; min-height: 340px; max-height: 380px; overflow-y: auto;
    padding: 1rem; display: flex; flex-direction: column; gap: .6rem; }
.tele-chat-empty { color: var(--muted); font-size: .88rem; text-align: center; margin: auto; }

.tele-msg { display: flex; flex-direction: column; max-width: 85%; }
.tele-msg-mine { align-self: flex-end; align-items: flex-end; }
.tele-msg-other { align-self: flex-start; align-items: flex-start; }
.tele-msg-sender { font-size: .72rem; color: var(--muted); font-weight: 600; margin-bottom: .15rem; }
.tele-msg-text { background: var(--bg-soft); border-radius: 12px 12px 12px 2px;
    padding: .5rem .75rem; font-size: .9rem; margin: 0; line-height: 1.45; word-break: break-word; }
.tele-msg-mine .tele-msg-text { background: var(--green); color: #fff;
    border-radius: 12px 12px 2px 12px; }
.tele-msg-time { font-size: .7rem; color: var(--muted); margin-top: .1rem; }

.tele-chat-form { display: flex; border-top: 1px solid var(--border); padding: .6rem; gap: .5rem; }
.tele-chat-form input { flex: 1; border: 1.5px solid var(--border); border-radius: 10px;
    padding: .5rem .75rem; font: inherit; font-size: .9rem; }
.tele-chat-form input:focus { outline: none; border-color: var(--green); }
.tele-chat-form button { background: var(--green); color: #fff; border: none;
    border-radius: 10px; padding: .5rem .85rem; cursor: pointer; font-size: 1rem;
    transition: background .15s; }
.tele-chat-form button:hover { background: var(--green-dark, #5aaa1a); }

.tele-vet-actions { margin-top: .2rem; }
.tele-vet-actions .btn-outline { width: 100%; text-align: center; }

.tele-completed, .tele-gate { display: flex; flex-direction: column; align-items: center;
    gap: 1rem; padding: 3rem 1rem; text-align: center; }
.tele-summary-box { background: var(--bg-soft); border: 1px solid var(--border);
    border-radius: 14px; padding: 1.4rem; text-align: left; max-width: 700px; width: 100%; }
.tele-summary-box h4 { color: var(--navy); margin-bottom: .75rem; }
.tele-summary-box p { color: var(--text); line-height: 1.7; margin: 0; }
.tele-summary-preview { font-size: .85rem; color: var(--green); margin: 0; }

/* ── Responsive telemedicina ───────────────────── */
@media (max-width: 1024px) {
    .tele-session-body { grid-template-columns: 1fr; }
    .tele-iframe { height: 420px; }
}
@media (max-width: 900px) {
    .tele-hero { grid-template-columns: 1fr; }
    .tele-hero-visual { display: none; }
    .tele-iframe { height: 380px; }
    .tele-chat-messages { min-height: 220px; max-height: 280px; }
}
@media (max-width: 600px) {
    .tele-hero h1 { font-size: 1.7rem; }
    .tele-steps { flex-direction: column; }
    .tele-step-arrow { transform: rotate(90deg); }
    .tele-iframe { height: 280px; }
    .tele-chat-messages { min-height: 180px; max-height: 240px; }
}
@media (max-width: 420px) {
    .tele-iframe { height: 220px; }
    .tele-chat-messages { min-height: 150px; max-height: 200px; }
}

/* Paquetes de exámenes */
.exam-bundles-wide { max-width: 1100px; margin: 0 auto 2.5rem; padding: 0 1.5rem; }
.bundles-header h2 { color: var(--navy); margin-bottom: .35rem; }
.section-sub { color: var(--muted); font-size: .95rem; margin-bottom: 1.4rem; }
.bundle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 1.2rem; }
.bundle-card {
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 14px;
    padding: 1.3rem 1.3rem 1.1rem;
    position: relative;
    box-shadow: 0 1px 6px rgba(20,30,80,.06);
    display: flex;
    flex-direction: column;
    gap: .4rem;
    transition: box-shadow .18s, border-color .18s;
}
.bundle-card:hover { box-shadow: 0 4px 16px rgba(20,30,80,.11); border-color: var(--green); }
.bundle-badge {
    position: absolute;
    top: -10px;
    right: 1rem;
    background: #e83e3e;
    color: #fff;
    font-weight: 700;
    font-size: .75rem;
    padding: .2rem .65rem;
    border-radius: 20px;
    letter-spacing: .03em;
}
.bundle-header { display: flex; align-items: center; gap: .7rem; }
.bundle-header .bundle-icon { margin-bottom: 0; }
.bundle-name { font-size: 1.02rem; font-weight: 700; color: var(--navy); margin: 0; }
.bundle-desc { color: var(--muted); font-size: .82rem; margin: 0; line-height: 1.4; }
.bundle-exams { list-style: none; padding: 0; margin: .3rem 0 0; display: flex; flex-wrap: wrap; gap: .3rem .6rem; }
.bundle-exams li { font-size: .82rem; color: var(--navy); display: flex; align-items: center; gap: .25rem; font-weight: 500; }
.bundle-exams .bi-check-circle-fill { color: var(--green); font-size: .72rem; flex-shrink: 0; }
.bundle-details { margin-top: .2rem; }
.bundle-details summary {
    font-size: .78rem; color: var(--green); cursor: pointer; font-weight: 600;
    display: flex; align-items: center; gap: .3rem;
    list-style: none; padding: .3rem 0;
}
.bundle-details summary::-webkit-details-marker { display: none; }
.bundle-details summary .bi { font-size: .72rem; }
.bundle-details[open] summary { margin-bottom: .4rem; }
.bundle-exams-detail { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .5rem;
    background: rgba(59,130,101,.04); border-radius: 8px; padding: .7rem .8rem; }
.bundle-exams-detail li { font-size: .8rem; color: var(--text); line-height: 1.4; }
.bundle-exams-detail li strong { display: block; color: var(--navy); font-size: .82rem; }
.bundle-exams-detail li span { color: var(--muted); font-size: .76rem; }
.bundle-exams-detail .badge-fasting {
    display: inline-flex; align-items: center; gap: .2rem;
    background: #fff3e0; color: #e65100; font-size: .68rem; font-weight: 600;
    padding: .1rem .45rem; border-radius: 4px; margin-top: .15rem;
}
.bundle-pricing { display: flex; align-items: baseline; gap: .5rem; margin-top: auto; padding-top: .5rem; flex-wrap: wrap; }
.bundle-original { text-decoration: line-through; color: var(--muted); font-size: .85rem; }
.bundle-final { font-size: 1.4rem; font-weight: 700; color: var(--green); line-height: 1.1; }
.bundle-savings { font-size: .76rem; color: #e83e3e; font-weight: 600; }
.bundle-btn { margin-top: .5rem; width: 100%; text-align: center; }
.pillar-title { font-size: 1.02rem; font-weight: 700; color: var(--navy); margin: 1.5rem 0 .7rem; border-bottom: 2px solid var(--border); padding-bottom: .35rem; }
.pillar-title .bi { color: var(--green); margin-right: .3rem; }
.bundle-icon { font-size: 1.4rem; color: var(--green); margin-bottom: .2rem; }
.bundle-target { font-size: .76rem; color: var(--navy); font-weight: 500; margin: .1rem 0 0; opacity: .65; }
.bundle-target .bi { font-size: .68rem; }
@media (max-width: 768px) {
    .exam-bundles-wide { padding: 0 1rem; }
    .bundle-grid { grid-template-columns: 1fr; }
}

/* Citas / reservas */
.booking-list { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.5rem; }
.booking-card {
    display: flex; flex-direction: column; gap: 0;
    background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 1.4rem 1.6rem; box-shadow: var(--shadow);
}
.booking-card-top {
    display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem;
}
.booking-main { flex: 1; }
.booking-main h3 { margin: 0 0 .4rem; font-size: 1.05rem; }
.booking-main p { margin: .15rem 0 0; color: var(--muted); font-size: .91rem; display: flex; align-items: center; gap: .35rem; }
.booking-main .vet-line { color: var(--green-dark); }
.booking-map { height: 160px; border-radius: 10px; border: 1px solid var(--border);
    overflow: hidden; margin-top: .9rem; z-index: 0; }
.status { font-size: .8rem; font-weight: 600; padding: .35rem .8rem; border-radius: 999px;
    white-space: nowrap; }
.status-pending { background: #FAEEDA; color: #854F0B; }
.status-accepted { background: #E1F5EE; color: #0F6E56; }
.status-completed { background: #E6F1FB; color: #185FA5; }
.status-cancelled { background: #FCEBEB; color: #A32D2D; }

/* Sidebar de citas: columna derecha con todos los estados y acciones */
.booking-sidebar {
    display: flex; flex-direction: column; gap: .4rem;
    align-items: flex-end; flex-shrink: 0; min-width: 96px;
}
.bk-pill {
    display: inline-block; font-size: .8rem; font-weight: 600;
    padding: .35rem .85rem; border-radius: 999px; white-space: nowrap;
    text-align: center; text-decoration: none; cursor: default;
    border: none; line-height: 1.4; font-family: inherit;
}
a.bk-pill, button.bk-pill { cursor: pointer; }
/* Estados */
.bk-pill--pending   { background: #FAEEDA; color: #854F0B; }
.bk-pill--waiting   { background: #FAEEDA; color: #854F0B; cursor: default; }
.bk-pill--accepted  { background: #E1F5EE; color: #0F6E56; }
.bk-pill--completed { background: #E6F1FB; color: #185FA5; }
.bk-pill--cancelled { background: #FCEBEB; color: #A32D2D; }
/* Pagada */
.bk-pill--paid { background: #D1FAE5; color: #065F46; }
/* Reseñada */
.bk-pill--reviewed { background: #FEF6E7; color: #92400E; }
/* Acciones */
.bk-pill--action-pay    { background: #FEF3C7; color: #92400E; }
.bk-pill--action-pay:hover { background: #FDE68A; }
.bk-pill--action-msg    { background: #EFF6FF; color: #1D4ED8; border: 1px solid #BFDBFE; }
.bk-pill--action-msg:hover { background: #DBEAFE; }
.bk-pill--action-review { background: #FFF7ED; color: #C2410C; border: 1px solid #FDBA74; }
.bk-pill--action-review:hover { background: #FED7AA; }
.bk-pill--action-cancel { background: #FFF; color: #A32D2D; border: 1px solid #FECACA; }
.bk-pill--action-cancel:hover { background: #FCEBEB; }
.bk-pill--action-rebook { background: #EDE9FE; color: #6D28D9; border: 1px solid #C4B5FD; }
.bk-pill--action-rebook:hover { background: #DDD6FE; }
.bk-pill--action-complete { background: var(--green, #4CAF50); color: #fff; }
.bk-pill--action-complete:hover { background: var(--green-dark, #1B5E20); }

.rebook-banner { background: #F5F3FF; border-color: #C4B5FD; color: #5B21B6; }

/* ── Vet Earnings Dashboard ───────────────────────────────── */
.earnings-header {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem;
}
.earnings-header h1 { margin: 0; display: flex; align-items: center; gap: .5rem; }
.earnings-period-tabs {
    display: flex; gap: .35rem; background: var(--bg-alt, #f4f4f5);
    border-radius: 10px; padding: .25rem;
}
.ep-tab {
    padding: .5rem 1rem; border: none; border-radius: 8px;
    background: transparent; font-size: .85rem; font-weight: 600;
    color: var(--muted); cursor: pointer; transition: all .2s;
}
.ep-tab.active {
    background: var(--bg, #fff); color: var(--green-dark, #1B5E20);
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
}
.ep-tab:hover:not(.active) { color: var(--text); }

.kpi-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem; margin-bottom: 1.5rem;
}
.kpi-card {
    display: flex; align-items: center; gap: 1rem;
    background: var(--bg, #fff); border: 1px solid var(--border);
    border-radius: var(--radius, 14px); padding: 1.2rem 1.4rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.04); transition: transform .15s, box-shadow .15s;
}
.kpi-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.kpi-icon {
    width: 48px; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; flex-shrink: 0;
}
.kpi-today .kpi-icon  { background: #E8F5E9; color: #2E7D32; }
.kpi-week .kpi-icon   { background: #E3F2FD; color: #1565C0; }
.kpi-month .kpi-icon  { background: #FFF3E0; color: #E65100; }
.kpi-total .kpi-icon  { background: #F3E5F5; color: #7B1FA2; }
.kpi-body { display: flex; flex-direction: column; min-width: 0; }
.kpi-label { font-size: .78rem; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: .03em; }
.kpi-value { font-size: 1.45rem; font-weight: 700; color: var(--text); line-height: 1.2; }
.kpi-sub { font-size: .8rem; color: var(--muted); margin-top: .15rem; }

.earnings-charts {
    display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem;
}
.chart-card {
    background: var(--bg, #fff); border: 1px solid var(--border);
    border-radius: var(--radius, 14px); padding: 1.4rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.04); margin-bottom: 1rem;
}
.chart-card h3 {
    margin: 0 0 1rem; font-size: 1rem; font-weight: 600;
    display: flex; align-items: center; gap: .4rem; color: var(--text);
}

.recent-table-wrap { overflow-x: auto; }
.recent-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.recent-table th {
    text-align: left; padding: .6rem .5rem; font-weight: 600;
    color: var(--muted); font-size: .75rem; text-transform: uppercase;
    letter-spacing: .04em; border-bottom: 2px solid var(--border);
}
.recent-table td {
    padding: .65rem .5rem; border-bottom: 1px solid var(--border);
    color: var(--text);
}
.recent-table tbody tr:hover { background: var(--bg-alt, #f9fafb); }
.recent-table .text-right { text-align: right; }

@media (max-width: 768px) {
    .earnings-header { flex-direction: column; align-items: stretch; }
    .earnings-period-tabs { justify-content: center; }
    .kpi-grid { grid-template-columns: 1fr 1fr; }
    .earnings-charts { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .kpi-grid { grid-template-columns: 1fr; }
    .recent-table { font-size: .82rem; }
    .recent-table th, .recent-table td { padding: .5rem .35rem; }
}

/* Toast notifications */
.messages {
    position: fixed; top: 76px; right: 1.25rem; z-index: 1000;
    display: flex; flex-direction: column; gap: .5rem;
    width: 320px; pointer-events: none;
}
.message {
    display: flex; align-items: flex-start; gap: .75rem;
    padding: .85rem 1rem; border-radius: 12px;
    font-size: .9rem; border: 1px solid transparent;
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
    pointer-events: all;
    opacity: 1; transform: translateX(0);
    transition: opacity .35s ease, transform .35s ease;
}
.message.toast-hiding { opacity: 0; transform: translateX(30px); }
.message-success { background: #E1F5EE; color: #0F6E56; border-color: #9FE1CB; }
.message-error   { background: #FCEBEB; color: #A32D2D; border-color: #F7C1C1; }
.message-info    { background: #E6F1FB; color: #185FA5; border-color: #B5D4F4; }
.message-warning { background: #FEF6E7; color: #92510B; border-color: #FAD78B; }
.toast-text { flex: 1; }
.toast-close {
    background: none; border: none; cursor: pointer;
    color: inherit; opacity: .55; font-size: 1.1rem; line-height: 1;
    padding: 0; flex-shrink: 0;
}
.toast-close:hover { opacity: 1; }
@media (max-width: 480px) { .messages { width: calc(100vw - 2rem); right: 1rem; } }

/* Cancelación */
.cancel-note { color: #A32D2D; font-size: .88rem; margin-top: .4rem; }
.btn-danger { background: #A32D2D; } .btn-danger:hover { background: #791F1F; }


.booking-actions {
    display: flex; flex-direction: row; align-items: center; gap: .65rem;
    flex-wrap: wrap; margin-top: 1rem;
    padding-top: .9rem; border-top: 1px solid var(--border);
}
.btn-link-danger { background: none; border: 1px solid #E7B8B8; color: #A32D2D;
    font: inherit; font-size: .70rem; cursor: pointer; padding: .4rem .9rem;
    border-radius: 8px; text-decoration: none; transition: .15s; }
.btn-link-danger:hover { background: #FCEBEB; border-color: #A32D2D; }


/* Menú de usuario */
.user-menu { position: relative; }
.user-trigger { display: inline-flex; align-items: center; gap: .5rem; background: none;
    border: 1px solid var(--border); border-radius: 999px; padding: .35rem .8rem .35rem .4rem;
    cursor: pointer; font: inherit; color: var(--navy); transition: border-color .15s; }
.user-trigger:hover { border-color: #c7cedd; }
.user-trigger .avatar-sm { width: 30px; height: 30px; border-radius: 50%; background: #E9F3DD;
    color: var(--green-dark); display: flex; align-items: center; justify-content: center;
    font-weight: 500; font-size: .9rem; flex-shrink: 0; }
.user-trigger .user-name { font-weight: 500; font-size: .92rem; }
.user-trigger i { font-size: .75rem; color: var(--muted); transition: transform .2s; }
.user-menu.open .user-trigger i { transform: rotate(180deg); }

.user-dropdown { display: none; position: absolute; right: 0; top: calc(100% + 10px);
    width: 264px; background: #fff; border: 1px solid var(--border); border-radius: 14px;
    box-shadow: 0 10px 30px rgba(20,30,80,.14); overflow: hidden; z-index: 100; }
.user-menu.open .user-dropdown { display: block; }
.ud-header { display: flex; align-items: center; gap: 12px; padding: 15px 16px; }
.ud-header .avatar { width: 42px; height: 42px; border-radius: 50%; background: #E9F3DD;
    color: var(--green-dark); display: flex; align-items: center; justify-content: center;
    font-weight: 500; flex-shrink: 0; }
.ud-name { font-weight: 500; color: var(--navy); font-size: .92rem; }
.ud-email { color: var(--muted); font-size: .8rem; white-space: nowrap; overflow: hidden;
    text-overflow: ellipsis; max-width: 180px; }
.ud-section { padding: 6px 0; border-top: 1px solid var(--border); }
.ud-item { display: flex; align-items: center; gap: 12px; padding: 10px 16px;
    color: var(--text); font-size: .9rem; text-decoration: none; }
.ud-item i { font-size: 1.05rem; color: var(--muted); width: 20px; text-align: center; }
a.ud-item:hover { background: var(--bg-soft); }
.ud-item.disabled { color: #9aa3b2; }
.ud-item .soon { margin-left: auto; font-size: .68rem; background: var(--bg-soft);
    color: var(--muted); padding: 2px 8px; border-radius: 999px; }
.ud-logout { margin: 0; }
.ud-logout button { display: flex; align-items: center; gap: 12px; padding: 10px 16px;
    width: 100%; text-align: left; background: none; border: none; cursor: pointer;
    font: inherit; font-size: .9rem; color: #A32D2D; }
.ud-logout button i { font-size: 1.05rem; }
.ud-logout button:hover { background: #FCEBEB; }

@media (max-width: 768px) {
    .user-menu { width: auto; }
    .user-dropdown {
        position: absolute;
        right: 0;
        left: auto;
        width: 280px;
        box-shadow: 0 10px 30px rgba(20,30,80,.14);
        border: 1px solid var(--border);
        border-radius: 14px;
        margin-top: .5rem;
    }
}


/* Perfil */
.profile-head { display: flex; align-items: center; gap: 1.3rem; margin-top: 1rem; flex-wrap: wrap; }
.profile-avatar { width: 72px; height: 72px; border-radius: 50%; background: #E9F3DD;
    color: var(--green-dark); display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem; font-weight: 500; flex-shrink: 0; }
.profile-id { flex: 1; min-width: 0; }
.profile-name { font-size: 1.3rem; font-weight: 500; color: var(--navy);
    display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.badge-verified { font-size: .72rem; font-weight: 600; color: #0F6E56; background: #E1F5EE;
    border: 1px solid #9FE1CB; padding: .2rem .6rem; border-radius: 999px;
    display: inline-flex; align-items: center; gap: .3rem; }
.profile-meta { margin: .35rem 0 .25rem; color: var(--green-dark); font-weight: 500; }
.profile-sub { margin: 0; color: var(--muted); font-size: .9rem; word-break: break-all; }
.profile-bio { margin: .6rem 0 0; color: var(--text); font-size: .92rem; }


/* Direcciones */
.address-list { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.5rem; }
.address-card { display: flex; align-items: flex-start; gap: 1rem; background: var(--bg);
    border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem 1.4rem; box-shadow: var(--shadow); }
.address-ic { width: 42px; height: 42px; border-radius: 12px; background: var(--bg-soft);
    color: var(--green); display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; flex-shrink: 0; }
.address-main { flex: 1; }
.address-label { font-weight: 500; color: var(--navy); display: flex; align-items: center; gap: .6rem; }
.address-main p { margin: .25rem 0 0; color: var(--muted); font-size: .92rem; }
.address-ref { font-style: italic; }
.badge-default { font-size: .7rem; font-weight: 600; color: #0F6E56; background: #E1F5EE;
    border: 1px solid #9FE1CB; padding: .15rem .55rem; border-radius: 999px; }
.address-actions { display: flex; flex-direction: column; align-items: flex-end; gap: .5rem; flex-shrink: 0; }
.btn-link { background: none; border: none; color: var(--green-dark); font: inherit;
    font-size: .85rem; cursor: pointer; padding: 0; text-decoration: underline; }
.btn-link:hover { color: var(--green); }


.address-hint { font-size: .85rem; color: var(--muted); margin: -.4rem 0 1rem; }
.address-hint a { color: var(--green-dark); font-weight: 500; }


/* Configuración */
.settings-card { margin-top: 1.5rem; }
.settings-card h2 { margin-top: 0; font-size: 1.2rem; }
.setting-row { display: flex; justify-content: space-between; align-items: center;
    gap: 1rem; padding: .6rem 0; flex-wrap: wrap; }
.setting-label { font-weight: 500; color: var(--navy); font-size: .92rem; }
.setting-val { margin: .2rem 0 0; color: var(--muted); font-size: .9rem; }
.setting-hint { color: var(--muted); font-size: .82rem; margin: .6rem 0 0; }

/* Interruptor (toggle) */
.switch-row { display: flex; align-items: center; gap: .8rem; cursor: pointer; }
.switch-row input[type="checkbox"] { appearance: none; -webkit-appearance: none;
    width: 44px; height: 24px; background: var(--border); border-radius: 999px;
    position: relative; cursor: pointer; transition: .2s; flex-shrink: 0; }
.switch-row input[type="checkbox"]::before { content: ""; position: absolute;
    width: 18px; height: 18px; border-radius: 50%; background: #fff; top: 3px; left: 3px; transition: .2s; }
.switch-row input[type="checkbox"]:checked { background: var(--green); }
.switch-row input[type="checkbox"]:checked::before { transform: translateX(20px); }

.danger-zone { border-color: #F0C9C9; }
.danger-zone h2 { color: #A32D2D; }
.danger-zone p { color: var(--muted); font-size: .9rem; margin: .3rem 0 1rem; }


/* Ayuda y contacto */
.help-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1.5rem 0 2.5rem; }
.help-method { display: flex; align-items: center; gap: .9rem; background: var(--bg);
    border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem; box-shadow: var(--shadow); }
.help-method i { font-size: 1.5rem; color: var(--green); }
.help-method .hm-label { font-weight: 500; color: var(--navy); font-size: .9rem; }
.help-method p { margin: .15rem 0 0; color: var(--muted); font-size: .88rem; }
.help-sub { margin-top: 1rem; }

/* Acordeón FAQ (global) */
.faq { margin-top: 1.2rem; }
.faq details { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 1rem 1.3rem; margin-bottom: .8rem; }
.faq summary { cursor: pointer; font-weight: 500; color: var(--navy); list-style: none;
    display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary i { color: var(--muted); transition: transform .2s; }
.faq details[open] summary i { transform: rotate(180deg); }
.faq p { color: var(--muted); margin: .8rem 0 0; }

@media (max-width: 640px) { .help-methods { grid-template-columns: 1fr; } }


/* Avatares con foto */
.avatar-sm img, .avatar img, .profile-avatar img { width: 100%; height: 100%;
    object-fit: cover; border-radius: 50%; }
.profile-avatar { overflow: hidden; }

/* Perfil público del vet */
.vet-profile-head { display: flex; align-items: center; gap: 1.5rem; margin-top: 1rem; flex-wrap: wrap; }
.vp-photo { width: 110px; height: 110px; border-radius: 16px; background: var(--bg-soft);
    color: var(--blue); display: flex; align-items: center; justify-content: center;
    font-size: 3rem; overflow: hidden; flex-shrink: 0; }
.vp-photo img { width: 100%; height: 100%; object-fit: cover; }
.vp-info { flex: 1; min-width: 200px; }
.vp-name { font-size: 1.4rem; font-weight: 500; color: var(--navy); display: flex;
    align-items: center; gap: .6rem; flex-wrap: wrap; }
.vp-specialty { color: var(--green-dark); font-weight: 500; margin: .3rem 0; }
.vp-rating { margin: .2rem 0; color: var(--navy); font-weight: 500; }
.vp-rating .bi-star-fill { color: #F5A623; }
.vp-rating .vp-count { color: var(--muted); font-weight: 400; font-size: .9rem; }
.vp-meta { color: var(--muted); font-size: .9rem; margin: .3rem 0 0; }
.reviews-title { margin-top: 2rem; font-size: 1.3rem; }
.reviews-list { display: flex; flex-direction: column; gap: 1rem; margin-top: 1rem; }
.review-item { background: var(--bg); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.2rem; box-shadow: var(--shadow); }
.review-top { display: flex; justify-content: space-between; align-items: center; }
.review-author { font-weight: 500; color: var(--navy); }
.review-stars { color: #F5A623; letter-spacing: 2px; }
.review-item p { margin: .6rem 0 .4rem; color: var(--text); }
.review-date { color: var(--muted); font-size: .82rem; }

/* Listado de veterinarios — header y filtros */
.vet-list-header { margin-bottom: 1.25rem; }
.vet-list-header h1 { margin-bottom: .15rem; }

.vet-filters {
    display: flex; gap: .6rem; align-items: center; flex-wrap: wrap;
    background: var(--bg-soft); border: 1px solid var(--border);
    border-radius: 12px; padding: .7rem 1rem; margin-bottom: 1rem;
}
.filter-group {
    display: flex; align-items: center; gap: .4rem;
    background: var(--bg); border: 1px solid var(--border);
    border-radius: 8px; padding: .35rem .6rem;
}
.filter-icon { color: var(--muted); font-size: .9rem; }
.filter-select {
    border: none; outline: none; background: transparent;
    font-size: .88rem; color: var(--text); cursor: pointer;
    font-family: inherit;
}
.filter-clear {
    display: inline-flex; align-items: center; gap: .3rem;
    font-size: .85rem; color: var(--muted); white-space: nowrap;
    margin-left: auto;
}
.filter-clear:hover { color: var(--navy); }

/* Grid de veterinarios */
.vet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
    gap: 1rem; margin-top: 1.25rem; }

.vet-card {
    background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 1.25rem 1.4rem; box-shadow: var(--shadow);
    display: flex; flex-direction: row; align-items: center; gap: 1.1rem;
    transition: box-shadow .2s ease, border-color .2s ease;
    text-decoration: none; color: inherit;
}
.vet-card:hover { box-shadow: 0 4px 20px rgba(20,30,80,.12); border-color: var(--blue); }

.vet-card-photo {
    width: 72px; height: 72px; border-radius: 50%;
    background: linear-gradient(135deg, var(--bg-soft), #d6e8f7);
    color: var(--blue); display: flex; align-items: center; justify-content: center;
    font-size: 2rem; overflow: hidden; flex-shrink: 0;
    border: 2px solid var(--border);
}
.vet-card-photo img { width: 100%; height: 100%; object-fit: cover; }

.vet-card-body { flex: 1; min-width: 0; }
.vet-card-body h3 { margin: 0 0 .15rem; font-size: 1rem; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis; }

.vc-specialty { color: var(--green-dark); font-size: .82rem; font-weight: 500;
    margin: 0 0 .4rem; }
.vc-rating { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin: 0; }
.vc-rating .bi-star-fill { color: #F5A623; font-size: .85rem; }
.vc-rating span { font-size: .82rem; }
.vc-new { color: var(--muted); font-size: .8rem; }

.vet-card-cta { flex-shrink: 0; }
.vet-card-cta .btn-outline {
    font-size: .85rem; padding: .45rem .9rem; white-space: nowrap;
}

/* Status dot */
.vet-status-wrap { position: relative; display: inline-block; }
.status-dot {
    position: absolute; bottom: 2px; right: 2px;
    width: 13px; height: 13px; border-radius: 50%;
    border: 2px solid #fff; display: flex; align-items: center; justify-content: center;
}
.status-dot--ACTIVE  { background: #22c55e; }
.status-dot--AWAY    { background: #f97316; }
.status-dot--BUSY    { background: #ef4444; }
.status-dot--OFFLINE { background: #9ca3af; font-size: 7px; color: #fff; font-weight: 700; line-height: 1; }

/* Selector de estado (vet navbar) */
.vet-status-selector {
    display: flex; align-items: center; gap: .4rem;
    font-size: .82rem; background: var(--bg-soft);
    border: 1px solid var(--border); border-radius: 8px;
    padding: .3rem .6rem; cursor: pointer;
}
.vet-status-selector select {
    border: none; background: transparent; font-size: .82rem;
    font-family: inherit; cursor: pointer; outline: none; color: var(--text);
}


.directed-banner { display: flex; align-items: center; gap: .6rem; background: #E1F5EE;
    border: 1px solid #9FE1CB; color: #0F6E56; border-radius: 12px; padding: .9rem 1.2rem;
    margin: 1.2rem 0; font-size: .92rem; }
.reviewed-tag { color: #F5A623; font-size: .85rem; font-weight: 500; white-space: nowrap; }
.reviewed-tag .bi-star-fill { color: #F5A623; }


/* Estrellas reseña */
.star-rating { display: flex; gap: .35rem; font-size: 2.4rem; cursor: pointer; margin: .3rem 0 .4rem; }
.star-rating i { color: #D9DEE7; transition: transform .12s, color .12s; }
.star-rating i.active { color: #F5A623; }
.star-rating i:hover { transform: scale(1.18); }
.star-rating i.bi-star-fill { animation: pop .2s ease; }
.star-label { font-size: .9rem; color: var(--muted); font-weight: 500; }
@keyframes pop {
    0% { transform: scale(.7); }
    60% { transform: scale(1.25); }
    100% { transform: scale(1); }
}


.btn-review { display: inline-flex; align-items: center; gap: .4rem; background: #fff;
    color: var(--green-dark); border: 1.5px solid var(--green); border-radius: 999px;
    padding: .45rem 1rem; font-size: .88rem; font-weight: 600; text-decoration: none; transition: .15s; }
.btn-review:hover { background: var(--green); color: #fff; }
.btn-review i { font-size: .95rem; }


/* Pago */
.pay-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1.5rem; margin-top: 1.5rem; align-items: start; }
.pay-summary h2 { margin-top: 0; font-size: 1.15rem; }
.pay-row { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0;
    border-bottom: 1px solid var(--border); font-size: .92rem; color: var(--text); }
.pay-row span:first-child { color: var(--muted); }
.pay-row.total { border-bottom: none; font-weight: 600; color: var(--navy); font-size: 1.1rem; padding-top: 1rem; }
.pay-brands { margin-top: 1rem; color: var(--muted); font-size: .85rem; }
.pay-sim-note { background: #FEF6E7; color: #854F0B; border: 1px solid #F5D89A;
    border-radius: 10px; padding: .7rem .9rem; font-size: .85rem; margin: 1rem 0; }
.paid-tag { color: #0F6E56; font-size: .85rem; font-weight: 600; white-space: nowrap; }

/* Comprobante de pago */
.page-wide { max-width: 1000px; margin: 2rem auto; padding: 0 1.5rem; }
.receipt { display: grid; grid-template-columns: 1fr 1.1fr; gap: 2.5rem;
    background: var(--bg); border: 1px solid var(--border); border-radius: 20px;
    padding: 2.5rem; box-shadow: var(--shadow); align-items: start; }

.receipt-left { text-align: center; }
.success-ic { font-size: 3.2rem; color: var(--green); animation: pop .4s ease; }
.receipt-left h1 { font-size: 1.5rem; margin: .6rem 0 .4rem; }
.receipt-pet { width: 170px; height: 170px; object-fit: cover; border-radius: 18px;
    margin: 1.2rem auto .5rem; display: block; }
.receipt-pet.placeholder { background: var(--bg-soft); color: var(--green);
    font-size: 3.5rem; display: flex; align-items: center; justify-content: center; }
.receipt-petname { font-weight: 600; color: var(--navy); margin: 0; }

.receipt-field { margin-bottom: 1rem; }
.rf-label { font-size: .8rem; color: var(--muted); font-weight: 500; display: block; margin-bottom: .3rem; }
.rf-box { border: 1.5px solid var(--border); border-radius: 10px; padding: .65rem .9rem;
    color: var(--text); font-size: .95rem; background: var(--bg-soft); }
.rf-box.track { font-family: monospace; font-weight: 600; color: var(--green-dark); }

.receipt-paid { display: flex; justify-content: space-between; align-items: center;
    background: #E1F5EE; border: 1px solid #9FE1CB; border-radius: 12px;
    padding: .9rem 1.2rem; margin-top: 1.2rem; color: #0F6E56; }
.receipt-paid strong { font-size: 1.2rem; }
.receipt-brands { margin-top: .8rem; color: var(--muted); font-size: .82rem; text-align: center; }





/* ===== Responsive global ===== */

/* Nada se desborda horizontalmente */
html, body { overflow-x: hidden; }
img, video, table { max-width: 100%; }
* { word-wrap: break-word; overflow-wrap: break-word; }

/* ── Tablet landscape (≤ 900px) ── */
@media (max-width: 900px) {
    .pay-grid { grid-template-columns: 1fr; }
    .receipt { grid-template-columns: 1fr; gap: 1.5rem; padding: 1.5rem; }
    .vet-grid { grid-template-columns: 1fr; }
}

/* ── Tablet (≤ 768px) ── */
@media (max-width: 768px) {
    main, .page-narrow, .page-wide, .messages { padding-left: 1rem; padding-right: 1rem; }
    .page-narrow, .page-wide { margin-left: 0; margin-right: 0; }
    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.3rem; }
    .card, .register-wrap, .auth-card { padding: 1.3rem; }



    /* Perfil: cabecera apila */
    .profile-head { flex-direction: column; text-align: center; gap: 1rem; }
    .profile-avatar { margin: 0 auto; }
    .profile-name { justify-content: center; }
    .profile-sub { font-size: .85rem; }

    /* Perfil público vet */
    .vet-profile-head { flex-direction: column; text-align: center; gap: 1.2rem; }
    .vp-photo { margin: 0 auto; }
    .vp-info { text-align: center; min-width: 0; width: 100%; }
    .vp-name { justify-content: center; }
    .vp-action { width: 100%; }
    .vp-action .btn, .vp-action .btn-outline { width: 100%; }

    /* Footer: apilar columnas */
    .site-footer .footer-top { flex-direction: column; gap: 1.5rem; }
    .site-footer .brand-col { max-width: 100%; }

    /* Topbar: logo más chico */
    .topbar .logo img { height: 40px; }

    /* Notif dropdown alineado a la derecha */
    .notif-dropdown { right: 0; width: 290px; }
}

/* ── Móvil (≤ 640px) ── */
@media (max-width: 640px) {
    .grid-2, .help-methods, .steps, .reviews { grid-template-columns: 1fr; }

    /* Register form: reduce padding */
    .register-wrap { margin: 1rem .5rem; padding: 1.2rem; }

    /* Perfil form: campos a 1 columna, ya cubierto por .grid-2 */

    /* Formulario acciones: apilar */
    .form-buttons { flex-direction: column-reverse; }
    .form-buttons .btn, .form-buttons .btn-outline { width: 100%; text-align: center; }
    .form-actions { text-align: center; }
    .form-actions .btn { width: 100%; }

    /* Chat: mensajes más anchos */
    .msg { max-width: 88%; }
    .chat-box { max-height: 350px; min-height: 180px; }

    /* Vet grid: columna única */
    .vet-grid { grid-template-columns: 1fr; }

    /* Vet card: apilar en mobile */
    .vet-card { flex-wrap: wrap; }
    .vet-card-cta { width: 100%; }
    .vet-card-cta .btn-outline { width: 100%; text-align: center; }

    /* Help methods */
    .help-methods { grid-template-columns: 1fr; }
}

/* ── Móvil pequeño (≤ 540px) ── */
@media (max-width: 540px) {
    /* Tarjetas de booking/dirección/mascota: apilar */
    .booking-card { align-items: stretch; }
    .booking-card-top { flex-direction: column; align-items: stretch; }
    .booking-sidebar { align-items: flex-start; min-width: 0; flex-direction: row; flex-wrap: wrap; gap: .4rem; }
    .address-card { flex-direction: column; align-items: stretch; }
    .pet-card { flex-direction: column; align-items: stretch; }
    .booking-actions { gap: .5rem; }
    .address-actions { flex-direction: row; flex-wrap: wrap; gap: .5rem; }
    .booking-card h3 { font-size: 1rem; }

    /* Mapa en bookings: más bajo */
    .booking-map { height: 130px; }

    /* Settings row: apilar */
    .setting-row { flex-direction: column; align-items: flex-start; gap: .4rem; }

    /* Perfil cabecera: más compacta */
    .profile-avatar { width: 60px; height: 60px; font-size: 1.5rem; }
    .profile-name { font-size: 1.1rem; }
}

/* ── Pantalla muy pequeña (≤ 420px) ── */
@media (max-width: 420px) {
    .btn, .btn-outline { display: block; width: 100%; text-align: center; }

    /* Topbar padding reducido */
    .topbar-inner { padding: .6rem .8rem; }
    .topbar .logo img { height: 36px; }

    /* Page narrow: márgenes mínimos */
    .page-narrow { margin: 1rem .5rem; }
    main { padding-left: .6rem; padding-right: .6rem; }

    /* Notif y user dropdown: alineados a derecha, ancho razonable */
    .notif-dropdown { width: calc(100vw - 2rem); right: 0; }
    .user-dropdown { width: calc(100vw - 2rem); right: 0; }

    /* Review stars: más chicas */
    .star-rating { font-size: 2rem; }

    /* Convo list */
    .convo-avatar { width: 38px; height: 38px; font-size: .9rem; }
    .convo-time { font-size: .72rem; }

    /* Vet card photo */
    .vet-card-photo { width: 70px; height: 70px; font-size: 2rem; }
    .vp-photo { width: 80px; height: 80px; font-size: 2.2rem; }
}

/* Notificaciones — campanita */
.notif-menu { position: relative; }
.notif-trigger { position: relative; background: none; border: 1px solid var(--border);
    width: 44px; height: 44px; border-radius: 50%; cursor: pointer; color: var(--navy);
    font-size: 1.1rem; display: flex; align-items: center; justify-content: center; transition: .15s; }
.notif-trigger:hover { border-color: #c7cedd; }
.notif-badge { position: absolute; top: -4px; right: -4px; background: #E8742C; color: #fff;
    font-size: .68rem; font-weight: 600; min-width: 18px; height: 18px; padding: 0 4px;
    border-radius: 999px; display: flex; align-items: center; justify-content: center; }
.notif-dropdown { display: none; position: absolute; right: 0; top: calc(100% + 10px);
    width: 320px; background: #fff; border: 1px solid var(--border); border-radius: 14px;
    box-shadow: 0 10px 30px rgba(20,30,80,.14); overflow: hidden; z-index: 100; }
.notif-menu.open .notif-dropdown { display: block; }
.nd-header { display: flex; justify-content: space-between; align-items: center;
    padding: 13px 16px; border-bottom: 1px solid var(--border); font-weight: 600; color: var(--navy); }
.nd-readall { background: none; border: none; color: var(--green-dark); font-size: .8rem;
    cursor: pointer; font-weight: 500; }
.nd-item { display: flex; gap: 11px; padding: 11px 16px; text-decoration: none; color: var(--text);
    border-bottom: 1px solid var(--border); }
.nd-item:hover { background: var(--bg-soft); }
.nd-item.unread { background: #F2F8EC; }
.nd-item i { color: var(--green); font-size: 1.1rem; margin-top: 2px; }
.nd-title { font-size: .88rem; font-weight: 500; color: var(--navy); }
.nd-time { font-size: .74rem; color: var(--muted); margin-top: 2px; }
.nd-empty { padding: 1.5rem; text-align: center; color: var(--muted); font-size: .9rem; }
.nd-all { display: block; text-align: center; padding: 11px; color: var(--green-dark);
    font-weight: 500; font-size: .88rem; }

/* Notificaciones — página */
.notif-list { display: flex; flex-direction: column; gap: .8rem; margin-top: 1.5rem; }
.notif-row { display: flex; align-items: flex-start; gap: 1rem; background: var(--bg);
    border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.3rem;
    box-shadow: var(--shadow); text-decoration: none; position: relative; }
.notif-row.unread { border-left: 3px solid var(--green); }
.notif-ic { width: 42px; height: 42px; border-radius: 12px; background: var(--bg-soft);
    color: var(--green); display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; flex-shrink: 0; }
.notif-row-title { font-weight: 500; color: var(--navy); }
.notif-body p { margin: .25rem 0; color: var(--muted); font-size: .9rem; }
.notif-time { font-size: .82rem; color: var(--text); font-weight: 500; }
.notif-date { font-size: .74rem; color: var(--muted); font-weight: 400; }
.notif-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--orange);
    position: absolute; top: 1.2rem; right: 1.2rem; }
@media (max-width: 480px) { .notif-dropdown { width: 280px; } }


/* Mensajería */
.convo-list { display: flex; flex-direction: column; gap: .7rem; margin-top: 1.5rem; }
.convo-row { display: flex; align-items: center; gap: 1rem; background: var(--bg);
    border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.2rem;
    box-shadow: var(--shadow); text-decoration: none; }
.convo-row:hover { background: var(--bg-soft); }
.convo-avatar { width: 44px; height: 44px; border-radius: 50%; background: #E9F3DD;
    color: var(--green-dark); display: flex; align-items: center; justify-content: center;
    font-weight: 600; flex-shrink: 0; }
.convo-name { font-weight: 500; color: var(--navy); }
.convo-last { margin: .2rem 0 0; color: var(--muted); font-size: .88rem; }
.convo-time { margin-left: auto; color: var(--muted); font-size: .8rem; white-space: nowrap; }

.chat-header { display: flex; align-items: center; gap: 1rem; padding: 1rem 0 1.2rem;
    border-bottom: 1px solid var(--border); margin-bottom: 1rem; }
.chat-name { font-weight: 600; color: var(--navy); }
.chat-role { font-size: .82rem; color: var(--muted); }
.chat-box { display: flex; flex-direction: column; gap: .6rem; min-height: 300px;
    max-height: 460px; overflow-y: auto; padding: .5rem 0; }
.msg { max-width: 75%; padding: .65rem .95rem; border-radius: 16px; }
.msg p { margin: 0; font-size: .93rem; }
.msg-time { font-size: .68rem; opacity: .7; display: block; margin-top: .25rem; }
.msg.mine { align-self: flex-end; background: var(--green); color: #fff; border-bottom-right-radius: 4px; }
.msg.theirs { align-self: flex-start; background: var(--bg-soft); color: var(--text); border-bottom-left-radius: 4px; }
.chat-form { display: flex; gap: .7rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.chat-form input { flex: 1; padding: .75rem 1rem; border: 1.5px solid var(--border);
    border-radius: 999px; font: inherit; }
.chat-form input:focus { outline: none; border-color: var(--green); }
.chat-form .btn { border-radius: 50%; width: 46px; padding: 0; flex-shrink: 0; }


.vp-action { display: flex; flex-direction: column; gap: .6rem; }
.vp-action .btn, .vp-action .btn-outline { white-space: nowrap; text-align: center; }
.vp-action .btn-outline { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; }


.receipt-map { height: 200px; border-radius: 12px; border: 1px solid var(--border);
    overflow: hidden; z-index: 0; }


/* ── Exámenes a domicilio ─────────────────────── */
.status-sample_collected { background: #FFF3E0; color: #E65100; }
.status-in_lab { background: #E8EAF6; color: #283593; }
.status-results_ready { background: #E1F5EE; color: #0F6E56; }
.status-delivered { background: #E6F1FB; color: #185FA5; }

.exam-select-section { margin-top: 1rem; }
.exam-select-grid { display: grid; gap: .6rem; }
.exam-option {
    display: flex; align-items: flex-start; gap: .7rem;
    padding: .8rem 1rem; border: 1.5px solid var(--border);
    border-radius: var(--radius); cursor: pointer; transition: border-color .15s;
}
.exam-option:hover { border-color: var(--green); }
.exam-option input[type="checkbox"] { margin-top: .25rem; accent-color: var(--green); }
.exam-option-info { display: flex; flex-direction: column; gap: .2rem; }
.exam-meta { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; font-size: .85rem; color: var(--muted); }
.exam-price { font-weight: 600; color: var(--navy); }
.exam-days { font-size: .82rem; }
.exam-prep { color: var(--muted); font-size: .82rem; margin-top: .15rem; }

.badge-fasting {
    display: inline-flex; align-items: center; gap: .25rem;
    background: #FFF3E0; color: #E65100; font-size: .78rem;
    padding: .15rem .5rem; border-radius: 999px; font-weight: 500;
}

.exam-detail-grid { display: flex; flex-direction: column; gap: .7rem; }
.exam-detail-row { display: flex; justify-content: space-between; align-items: center;
    padding: .4rem 0; border-bottom: 1px solid var(--border); }
.exam-detail-label { color: var(--muted); font-size: .9rem; }

.exam-timeline { margin-top: 1rem; }
.timeline-item {
    display: flex; align-items: center; gap: .6rem;
    padding: .45rem 0; color: var(--muted); font-size: .9rem;
}
.timeline-item.done { color: var(--navy); font-weight: 500; }
.timeline-item.done i { color: var(--green); }
.timeline-item i { font-size: .7rem; }

.result-file-card {
    display: flex; justify-content: space-between; align-items: center;
    padding: .9rem 1.1rem; background: var(--bg-soft);
    border: 1px solid var(--border); border-radius: var(--radius); gap: 1rem;
}
.result-file-card small { display: block; color: var(--muted); font-size: .82rem; margin-top: .15rem; }

/* ══ Fase 4: modo oscuro (variables CSS) ══ */
[data-theme="dark"] {
    --navy: #A9B6FF;
    --green: #7DC24A;
    --green-dark: #69AE2B;
    --blue: #5FB7E8;
    --orange: #F08A4B;
    --text: #E6EAF3;
    --muted: #9AA3B8;
    --bg: #12151F;
    --bg-soft: #1A1F2E;
    --border: #2A3145;
    --shadow: 0 1px 3px rgba(0,0,0,.4), 0 8px 28px rgba(0,0,0,.35);
    color-scheme: dark;
}
[data-theme="dark"] body { background: var(--bg); }
[data-theme="dark"] .topbar,
[data-theme="dark"] .card,
[data-theme="dark"] .vet-card,
[data-theme="dark"] .address-card,
[data-theme="dark"] .booking-card,
[data-theme="dark"] .settings-card,
[data-theme="dark"] .register-form,
[data-theme="dark"] .mobile-tabs { background: var(--bg-soft); }
[data-theme="dark"] .form-control, [data-theme="dark"] .filter-select {
    background: #101420; color: var(--text); border-color: var(--border);
}
[data-theme="dark"] img { filter: brightness(.94); }

/* ══ Fase 4: spinner anti doble envío ══ */
.btn-spinner {
    display: inline-block; width: 1em; height: 1em; vertical-align: -0.15em;
    border: 2px solid currentColor; border-right-color: transparent;
    border-radius: 50%; animation: btn-spin .7s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* ══ Fase 4: botones flotantes (tema + instalar PWA) ══ */
#theme-toggle-btn, #pwa-install-btn {
    position: fixed; z-index: 1100; border: 1px solid var(--border);
    background: var(--bg-soft); color: var(--text); cursor: pointer;
    box-shadow: var(--shadow); font-family: inherit;
}
#theme-toggle-btn {
    right: 16px; bottom: 84px; width: 44px; height: 44px;
    border-radius: 50%; font-size: 1.15rem;
}
#pwa-install-btn {
    right: 16px; bottom: 140px; padding: .5rem .9rem;
    border-radius: 999px; font-size: .9rem;
}

/* ══ Fase 4: mapa de direcciones ══ */
#address-map { height: 260px; border-radius: var(--radius); margin: .75rem 0; }
.map-hint { font-size: .85rem; color: var(--muted); margin: .25rem 0 .75rem; }

/* ══ Fase 4: botón cargar más ══ */
.load-more-btn {
    display: block; margin: 1.5rem auto; padding: .6rem 1.6rem;
    border-radius: 999px; border: 1px solid var(--border);
    background: var(--bg-soft); color: var(--navy); cursor: pointer; font-weight: 600;
}
