/* ============================================================
   EL PARQUE VETERINARIA — Hoja de estilos
   Tema "Parque cálido": crema + verde pino + coral.
   Fuentes: Fraunces (títulos) + Nunito Sans (texto).
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Nunito+Sans:wght@400;600;700;800&display=swap');

:root {
    --crema:      #F4EEE4;
    --crema-2:    #EDE5D6;
    --blanco:     #FFFDF9;
    --tinta:      #241F19;
    --tinta-2:    #6E6355;
    --pino:       #14524B;
    --pino-osc:   #0E3B36;
    --pino-claro: #1C6A61;
    --coral:      #EC6A4C;
    --coral-osc:  #B84226;
    --mostaza:    #E1A038;
    --menta:      #2FA37C;
    --menta-osc:  #1a6f52;
    --rojo:       #CF4444;
    --wa:         #25D366;
    --borde:      #E2D7C5;
    --borde-2:    #D3C6B0;
    --radio:      16px;
    --radio-ctrl: 12px;
    --sombra:     0 6px 22px rgba(36, 31, 25, .07);
    --sombra-alta:0 18px 48px rgba(36, 31, 25, .20);
    --toque:      52px;
    --ease:       cubic-bezier(0.22, 1, 0.36, 1);
    --f-titulo: 'Fraunces', Georgia, serif;
    --f-texto:  'Nunito Sans', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--f-texto); color: var(--tinta); background-color: var(--crema);
    background-image: radial-gradient(rgba(20,82,75,.028) 1px, transparent 1px);
    background-size: 24px 24px; line-height: 1.6; min-height: 100vh; -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { line-height: 1.15; color: var(--tinta); }
h1 { font-family: var(--f-titulo); font-weight: 600; font-size: 2rem; letter-spacing: -.01em; }
h2 { font-family: var(--f-texto); font-weight: 800; font-size: 1.3rem; letter-spacing: -.005em; }
h3 { font-family: var(--f-texto); font-weight: 800; font-size: 1.05rem; }
a { color: var(--pino); text-decoration: none; transition: color .18s var(--ease); }
a:hover { color: var(--coral-osc); }
.ico { display: inline-block; vertical-align: -0.16em; flex: 0 0 auto; }
:focus-visible { outline: 3px solid rgba(20,82,75,.40); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; } }

/* LAYOUT */
.contenedor { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.pagina { padding: 30px 0 64px; }
.titulo-pagina { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-bottom: 24px; }
.titulo-pagina h1 { font-size: 1.9rem; }
.seccion-titulo { font-size: 1.15rem; margin: 6px 0 14px; }

/* NAVBAR */
.navbar { background: var(--pino); color: var(--crema); box-shadow: var(--sombra); position: sticky; top: 0; z-index: 50; }
.navbar .contenedor { max-width: 1240px; }
.navbar-inner { display: flex; align-items: center; gap: 18px; min-height: 64px; padding: 8px 0; row-gap: 8px; flex-wrap: wrap; }
.marca { display: inline-flex; align-items: center; gap: 10px; font-family: var(--f-titulo); font-weight: 700; font-size: 1.3rem; color: var(--crema); letter-spacing: .2px; flex: 0 0 auto; }
.marca .logo { width: 40px; height: 40px; border-radius: 11px; background: rgba(255,255,255,.10); display: inline-flex; align-items: center; justify-content: center; color: var(--mostaza); }
.marca .marca-tag { font-family: var(--f-texto); font-weight: 700; font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; color: rgba(244,238,228,.68); margin-left: 2px; }
.nav-toggle { display: none; background: rgba(255,255,255,.10); color: var(--crema); border: none; width: 46px; height: 46px; border-radius: 12px; align-items: center; justify-content: center; cursor: pointer; margin-left: auto; }
.nav-toggle:hover { background: rgba(255,255,255,.18); }
.nav-wrap { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; }
.nav-links a { display: inline-flex; align-items: center; color: rgba(244,238,228,.82); font-weight: 700; font-size: .92rem; padding: 10px 14px; border-radius: 999px; transition: background .18s var(--ease), color .18s var(--ease); white-space: nowrap; letter-spacing: .01em; }
.nav-links a:hover { color: var(--crema); background: rgba(255,255,255,.10); }
.nav-links a.activo { color: #fff; background: var(--coral); }
.nav-user { display: flex; align-items: center; gap: 10px; padding-left: 16px; border-left: 1px solid rgba(255,255,255,.16); flex: 0 0 auto; }
.nav-avatar { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.14); color: var(--mostaza); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: .82rem; flex: 0 0 auto; }
.nav-nombre { font-weight: 700; color: var(--crema); font-size: .92rem; white-space: nowrap; }
.nav-salir-link { display: inline-flex; align-items: center; gap: 6px; color: rgba(244,238,228,.72); font-weight: 700; font-size: .88rem; padding: 8px 12px; border-radius: 999px; }
.nav-salir-link:hover { color: var(--crema); background: rgba(255,255,255,.10); }
@media (min-width: 981px) and (max-width: 1160px) { .nav-nombre { display: none; } }

/* BOTONES */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--f-texto); font-weight: 800; font-size: 1rem; line-height: 1; min-height: var(--toque); padding: 0 22px; border: none; border-radius: var(--radio-ctrl); cursor: pointer; transition: transform .12s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease); text-align: center; }
.btn:active { transform: translateY(1px); }
.btn-primario { background: var(--pino); color: #fff; box-shadow: 0 4px 14px rgba(20,82,75,.26); }
.btn-primario:hover { background: var(--pino-osc); color: #fff; }
.btn-acento { background: var(--coral); color: #fff; box-shadow: 0 4px 14px rgba(236,106,76,.30); }
.btn-acento:hover { background: var(--coral-osc); color: #fff; }
.btn-mostaza { background: var(--mostaza); color: #47340a; }
.btn-mostaza:hover { background: #d0912b; }
.btn-peligro { background: var(--rojo); color: #fff; }
.btn-peligro:hover { background: #b23838; }
.btn-wa { background: var(--wa); color: #0a3d20; }
.btn-wa:hover { background: #1db855; color: #0a3d20; }
.btn-fantasma { background: transparent; color: var(--pino); border: 2px solid var(--borde-2); }
.btn-fantasma:hover { border-color: var(--pino); background: var(--crema-2); }
.btn-sm { min-height: 40px; padding: 0 13px; font-size: .88rem; border-radius: 10px; gap: 6px; }
.btn-bloque { width: 100%; }

/* TARJETAS / PANELES */
.tarjeta { background: var(--blanco); border: 1px solid var(--borde); border-radius: var(--radio); box-shadow: var(--sombra); padding: 22px; }
.panel { background: var(--blanco); border: 1px solid var(--borde); border-radius: var(--radio); box-shadow: var(--sombra); overflow: hidden; }
.panel + .panel { margin-top: 20px; }
.panel-cabeza { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--borde); }
.panel-cabeza h2 { font-size: 1.22rem; }
.panel-cuerpo { padding: 22px; }

/* HERO */
.hero { position: relative; overflow: hidden; background: var(--pino); color: var(--crema); border-radius: 20px; padding: 34px 32px; margin-bottom: 26px; box-shadow: var(--sombra); }
.hero h1 { color: #fff; font-size: 2rem; margin-bottom: 6px; }
.hero p { color: rgba(244,238,228,.86); font-size: 1.05rem; max-width: 62ch; }
.hero .marca-agua { position: absolute; right: 22px; bottom: -30px; color: rgba(255,255,255,.09); pointer-events: none; }

/* CONTADORES */
.contadores { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 22px; }
.contador { background: var(--blanco); border: 1px solid var(--borde); border-radius: var(--radio); box-shadow: var(--sombra); padding: 20px; display: flex; flex-direction: column; gap: 5px; }
.contador .chip { width: 46px; height: 46px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 10px; color: var(--pino); }
.contador .numero { font-family: var(--f-titulo); font-weight: 700; font-size: 2.6rem; line-height: 1; color: var(--tinta); }
.contador .etiqueta { font-weight: 800; font-size: .96rem; color: var(--tinta); }
.contador .sub { font-size: .82rem; color: var(--tinta-2); }
.contador.c-servicios .chip { background: #dcebe7; color: var(--pino); }
.contador.c-clientes  .chip { background: #fbe1d9; color: var(--coral-osc); }
.contador.c-mascotas  .chip { background: #f7ead0; color: #8a6210; }
.contador.c-citas     .chip { background: #d6eee5; color: #1a6f52; }

/* FINANZAS */
.finanzas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.fin-tile { border-radius: 14px; padding: 18px 20px; border: 1px solid transparent; }
.fin-tile .lbl { display: flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.fin-tile .val { font-family: var(--f-titulo); font-weight: 700; font-size: 1.95rem; line-height: 1; margin-top: 10px; }
.fin-tile.ingresos { background: #dcebe7; border-color: #c4e0d8; }
.fin-tile.ingresos .lbl, .fin-tile.ingresos .val { color: var(--pino-osc); }
.fin-tile.costos { background: #fbe1d9; border-color: #f3ccc0; }
.fin-tile.costos .lbl, .fin-tile.costos .val { color: var(--coral-osc); }
.fin-tile.ganancia { background: #d6eee5; border-color: #bfe3d3; }
.fin-tile.ganancia .lbl, .fin-tile.ganancia .val { color: var(--menta-osc); }
.fin-mes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 14px; }
.fin-mes .m { background: var(--crema-2); border-radius: 12px; padding: 12px 14px; }
.fin-mes .m .k { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--tinta-2); }
.fin-mes .m .v { font-weight: 800; font-size: 1.1rem; margin-top: 3px; color: var(--tinta); }
.fin-tile.neutro { background: var(--crema-2); border-color: var(--borde); }
.fin-tile.neutro .lbl, .fin-tile.neutro .val { color: var(--tinta); }
.fin-tile.mostaza2 { background: #f7ead0; border-color: #ecd7a8; }
.fin-tile.mostaza2 .lbl, .fin-tile.mostaza2 .val { color: #86600f; }
.resumen-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 22px; }
.periodos { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.rango-nav { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 18px; }
.rango-nav .rango { flex: 1; max-width: 320px; background: var(--blanco); border: 1px solid var(--borde); border-radius: 12px; padding: 12px 16px; font-family: var(--f-titulo); font-weight: 700; font-size: 1.1rem; text-align: center; }

/* TABLAS */
.tabla-wrap { width: 100%; overflow-x: auto; }
.tabla { width: 100%; border-collapse: collapse; font-size: .98rem; }
.tabla thead th { text-align: left; font-family: var(--f-texto); font-weight: 800; font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; color: var(--tinta-2); padding: 12px 16px; border-bottom: 2px solid var(--borde); white-space: nowrap; }
.tabla tbody td { padding: 14px 16px; border-bottom: 1px solid var(--borde); vertical-align: middle; }
.tabla tbody tr { transition: background .15s var(--ease); }
.tabla tbody tr:hover { background: var(--crema-2); }
.tabla tbody tr:last-child td { border-bottom: none; }
.tabla .principal { font-weight: 700; color: var(--tinta); }
.celda-contacto { display: flex; flex-direction: column; gap: 3px; font-size: .9rem; }
.celda-contacto span { display: inline-flex; align-items: center; gap: 6px; color: var(--tinta-2); }
.acciones-celda { display: flex; gap: 8px; flex-wrap: wrap; }

/* FORMULARIOS */
.campo { margin-bottom: 18px; }
.campo label { display: block; font-weight: 700; font-size: .92rem; color: var(--tinta); margin-bottom: 7px; }
.campo .ayuda { font-weight: 400; color: var(--tinta-2); font-size: .82rem; }
.control { width: 100%; min-height: var(--toque); font-family: var(--f-texto); font-size: 1rem; color: var(--tinta); background: var(--blanco); border: 2px solid var(--borde-2); border-radius: var(--radio-ctrl); padding: 12px 14px; transition: border-color .18s var(--ease), box-shadow .18s var(--ease); }
select.control { cursor: pointer; }
textarea.control { min-height: 110px; resize: vertical; line-height: 1.5; }
.control:focus { outline: none; border-color: var(--pino); box-shadow: 0 0 0 4px rgba(20,82,75,.12); }
.control::placeholder { color: #b3a58f; }
.fila { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fila-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.form-acciones { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.seg { display: flex; background: var(--crema-2); border-radius: 12px; padding: 4px; gap: 4px; margin-bottom: 16px; max-width: 340px; }
.seg label { flex: 1; margin: 0; position: relative; }
.seg input { position: absolute; opacity: 0; width: 0; height: 0; }
.seg span { display: block; text-align: center; padding: 11px 14px; border-radius: 9px; font-weight: 800; font-size: .92rem; color: var(--tinta-2); cursor: pointer; transition: background .15s var(--ease), color .15s var(--ease); }
.seg input:checked + span { background: var(--blanco); color: var(--pino); box-shadow: var(--sombra); }
.seg input:focus-visible + span { outline: 3px solid rgba(20,82,75,.40); }
.file-input { display: block; width: 100%; font-size: .9rem; padding: 11px 12px; border: 2px dashed var(--borde-2); border-radius: var(--radio-ctrl); background: var(--crema); cursor: pointer; color: var(--tinta-2); }
.file-input:hover { border-color: var(--pino); }
.fotos-celda { display: flex; gap: 6px; align-items: center; }
.mini-foto { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; border: 1px solid var(--borde); display: block; }
.foto-up { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.foto-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.foto-label { cursor: pointer; }
.foto-thumb { width: 62px; height: 62px; border-radius: 10px; border: 2px dashed var(--borde-2); background: var(--crema); display: flex; align-items: center; justify-content: center; overflow: hidden; flex: 0 0 auto; }
.foto-thumb img { width: 100%; height: 100%; object-fit: cover; display: none; }
.foto-thumb.tiene { border-style: solid; border-color: var(--borde); }
.foto-thumb.tiene img { display: block; }
.foto-thumb.tiene .foto-vacio { display: none; }
.foto-vacio { font-size: .7rem; color: var(--tinta-2); text-align: center; padding: 4px; line-height: 1.2; }
.buscable { position: relative; }
.buscable-panel { display: none; position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: var(--blanco); border: 1px solid var(--borde); border-radius: var(--radio-ctrl); box-shadow: var(--sombra-alta); max-height: 250px; overflow-y: auto; z-index: 30; }
.buscable.abierto .buscable-panel { display: block; }
.buscable-item { padding: 12px 14px; cursor: pointer; font-size: .96rem; border-bottom: 1px solid var(--borde); }
.buscable-item:last-child { border-bottom: none; }
.buscable-item:hover, .buscable-item.sel { background: var(--crema-2); color: var(--pino); font-weight: 700; }
.buscable-vacio { padding: 12px 14px; color: var(--tinta-2); font-size: .9rem; }
.detalle { display: flex; flex-direction: column; }
.fila-det { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--borde); }
.fila-det:last-child { border-bottom: none; }
.fila-det .k { color: var(--tinta-2); font-weight: 700; font-size: .86rem; flex: 0 0 auto; }
.fila-det .v { text-align: right; font-weight: 600; color: var(--tinta); }
.ver-fotos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.ver-fotos:empty { display: none; }
.ver-fotos img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 12px; border: 1px solid var(--borde); display: block; }
.barra-herramientas { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.barra-herramientas .buscador { flex: 1; min-width: 220px; }
.barra-herramientas .control { margin: 0; }

/* BADGES */
.badge { display: inline-flex; align-items: center; gap: 5px; font-weight: 800; font-size: .78rem; padding: 5px 11px; border-radius: 999px; background: var(--crema-2); color: var(--tinta); white-space: nowrap; }
.badge-pino    { background: #dcebe7; color: var(--pino-osc); }
.badge-coral   { background: #fbe1d9; color: var(--coral-osc); }
.badge-mostaza { background: #f7ead0; color: #86600f; }
.badge-menta   { background: #d6eee5; color: #1a6f52; }
.badge-rojo    { background: #f7dada; color: #a32d2d; }
.badge-gris    { background: #e7e0d3; color: var(--tinta-2); }

/* MODAL */
.modal-overlay { position: fixed; inset: 0; background: rgba(14, 30, 27, .55); display: none; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; z-index: 100; }
.modal-overlay.abierto { display: flex; }
.modal { width: 100%; max-width: 580px; background: var(--blanco); border-radius: var(--radio); box-shadow: var(--sombra-alta); overflow: hidden; animation: modalSube .22s var(--ease); }
@keyframes modalSube { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-cabeza { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; background: var(--pino); color: #fff; }
.modal-cabeza h2 { color: #fff; font-size: 1.28rem; }
.modal-cerrar { background: rgba(255,255,255,.15); color: #fff; border: none; width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background .18s var(--ease); }
.modal-cerrar:hover { background: rgba(255,255,255,.28); }
.modal-cuerpo { padding: 22px; }

/* ALERTAS */
.alerta { display: flex; align-items: flex-start; gap: 10px; border-radius: var(--radio-ctrl); padding: 14px 16px; font-weight: 600; margin-bottom: 20px; border: 1px solid; }
.alerta .ico { margin-top: 1px; }
.alerta-ok    { background: #dcefe7; border-color: #bfe0d1; color: #17624a; }
.alerta-error { background: #f8dede; border-color: #eec4c4; color: #a32d2d; }
.alerta-info  { background: #f7ead0; border-color: #ecd7a8; color: #86600f; }

/* LOGIN / SETUP */
.auth-fondo { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--pino); }
.auth-card { width: 100%; max-width: 420px; background: var(--blanco); border-radius: 22px; box-shadow: var(--sombra-alta); padding: 36px 32px; }
.auth-marca { text-align: center; margin-bottom: 26px; }
.auth-marca .logo { width: 66px; height: 66px; border-radius: 18px; margin: 0 auto 14px; background: #dcebe7; color: var(--pino); display: flex; align-items: center; justify-content: center; }
.auth-marca h1 { font-size: 1.7rem; }
.auth-marca p { color: var(--tinta-2); font-size: .92rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; }

/* AGENDA / CALENDARIO */
.cal-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.cal-cab h2 { font-size: 1.5rem; text-transform: capitalize; }
.cal-nav { display: flex; gap: 8px; flex-wrap: wrap; }
.cal-scroll { width: 100%; overflow-x: auto; padding-bottom: 4px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; min-width: 700px; }
.cal-dow { text-align: center; font-weight: 800; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--tinta-2); padding: 4px 0 8px; }
.cal-cell { background: var(--crema); border: 1px solid var(--borde); border-radius: 12px; min-height: 104px; padding: 8px; display: flex; flex-direction: column; gap: 5px; transition: border-color .15s var(--ease); font: inherit; color: inherit; text-align: left; width: 100%; cursor: pointer; -webkit-appearance: none; appearance: none; }
.cal-cell.vacia { background: transparent; border: none; cursor: default; }
.cal-cell:not(.vacia):hover { border-color: var(--borde-2); }
.cal-num { font-weight: 800; font-size: .9rem; color: var(--tinta-2); width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; }
.cal-cell.hoy { border-color: var(--coral); box-shadow: 0 0 0 2px rgba(236,106,76,.22); }
.cal-cell.hoy .cal-num { background: var(--coral); color: #fff; border-radius: 50%; }
.cal-cita { display: flex; align-items: center; gap: 6px; background: #dcebe7; color: var(--pino-osc); border-radius: 8px; padding: 4px 8px; font-size: .72rem; font-weight: 700; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-cita::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--pino); flex: 0 0 auto; }
.cal-cont { display: none; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--coral); color: #fff; font-size: .72rem; font-weight: 800; align-self: flex-start; }
.leyenda { display: flex; align-items: center; gap: 8px; color: var(--tinta-2); font-size: .88rem; margin-top: 16px; }
.leyenda .punto { width: 14px; height: 14px; border-radius: 4px; background: #dcebe7; display: inline-block; }

/* UTILIDADES */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.texto-apagado { color: var(--tinta-2); }
.texto-centro { text-align: center; }
.mt-1 { margin-top: 10px; } .mt-2 { margin-top: 22px; } .mb-0 { margin-bottom: 0; }
.vacio { text-align: center; color: var(--tinta-2); padding: 44px 20px; }
.vacio .ico { color: var(--borde-2); margin-bottom: 12px; }
.lista-mini { list-style: none; }
.lista-mini li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--borde); }
.lista-mini li:last-child { border-bottom: none; }
.lista-mini .info { display: flex; align-items: center; gap: 12px; min-width: 0; }
.lista-mini .info .chip-mini { width: 38px; height: 38px; border-radius: 11px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; background: #dcebe7; color: var(--pino); }
.lista-mini .info .txt { min-width: 0; }
.lista-mini .info strong { display: block; color: var(--tinta); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lista-mini .info small { color: var(--tinta-2); }
.aviso-inline { display: flex; align-items: center; gap: 10px; background: #f7ead0; border: 1px solid #ecd7a8; color: #86600f; border-radius: var(--radio-ctrl); padding: 14px 16px; font-weight: 600; margin-bottom: 20px; }

/* ENTRADA SUAVE + REALCE + ACCIONES RÁPIDAS */
@media (prefers-reduced-motion: no-preference) {
    .pagina > .contenedor > * { animation: revelar .5s var(--ease) both; }
    .pagina > .contenedor > *:nth-child(1) { animation-delay: .02s; }
    .pagina > .contenedor > *:nth-child(2) { animation-delay: .08s; }
    .pagina > .contenedor > *:nth-child(3) { animation-delay: .14s; }
    .pagina > .contenedor > *:nth-child(4) { animation-delay: .20s; }
    .pagina > .contenedor > *:nth-child(5) { animation-delay: .26s; }
}
@keyframes revelar { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.panel { transition: box-shadow .2s var(--ease); }
.panel:hover { box-shadow: 0 10px 30px rgba(36, 31, 25, .10); }
.acc-rapidas { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }
.acc-rapidas .btn { flex: 1; min-width: 190px; }

/* RESPONSIVE */
@media (max-width: 980px) {
    .nav-toggle { display: inline-flex; }
    .nav-wrap { display: none; width: 100%; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 6px; padding: 8px 0 4px; }
    .nav-wrap.abierto { display: flex; }
    .nav-links { flex-direction: column; width: 100%; gap: 4px; }
    .nav-links a { width: 100%; justify-content: flex-start; padding: 13px 14px; font-size: 1rem; }
    .nav-user { width: 100%; justify-content: flex-start; gap: 12px; padding: 12px 6px 4px; border-left: none; border-top: 1px solid rgba(255,255,255,.16); margin-top: 4px; }
    .nav-salir-link { margin-left: auto; }
    .navbar-inner { min-height: 62px; }
}
@media (max-width: 900px) { .contadores { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) {
    .grid-2 { grid-template-columns: 1fr; }
    .fila, .fila-3 { grid-template-columns: 1fr; }
    .hero { padding: 26px 22px; }
    .hero h1 { font-size: 1.6rem; }
    h1 { font-size: 1.6rem; }
    .finanzas { grid-template-columns: 1fr; }
    .fin-mes { grid-template-columns: repeat(3, 1fr); }
}
/* Tablas -> tarjetas apiladas en móvil (evita que se corten las acciones) */
@media (max-width: 600px) {
    .tabla-wrap { overflow-x: visible; }
    .tabla thead { display: none; }
    .tabla, .tabla tbody, .tabla tr, .tabla td { display: block; width: 100%; }
    .tabla tbody tr { border: 1px solid var(--borde); border-radius: 12px; background: var(--blanco); margin-bottom: 12px; padding: 12px 14px; }
    .tabla tbody tr:hover { background: var(--blanco); }
    .tabla tbody td { border: none; padding: 4px 0; }
    .tabla tbody td:empty { display: none; }
    .celda-contacto { flex-direction: row; flex-wrap: wrap; gap: 12px; }
    .acciones-celda { margin-top: 10px; }
    .acciones-celda .btn { flex: 1; }
    /* Calendario que CABE en la pantalla (sin scroll horizontal) */
    .cal-scroll { overflow-x: visible; }
    .cal-grid { min-width: 0; gap: 5px; }
    .cal-dow { font-size: .6rem; letter-spacing: .02em; padding: 2px 0 4px; }
    .cal-cell { min-height: 54px; padding: 5px; border-radius: 10px; align-items: center; justify-content: flex-start; gap: 3px; }
    .cal-num { font-size: .82rem; }
    .cal-cita { display: none; }
    .cal-cont { display: inline-flex; }
    /* Cabecera del calendario: título arriba, flechas en fila compacta */
    .cal-cab { flex-direction: column; align-items: stretch; gap: 12px; }
    .cal-nav { justify-content: space-between; }
    .cal-nav .btn { flex: 1; }
    /* Fotos antes/después: grandes y llenando el ancho (una al lado de otra) */
    .fotos-celda { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
    .fotos-celda .mini-foto { width: 100%; height: auto; aspect-ratio: 1 / 1; border-radius: 12px; }
}
@media (max-width: 480px) {
    .contadores { grid-template-columns: repeat(2, 1fr); }
    .contador { padding: 16px; }
    .contador .numero { font-size: 2.1rem; }
    .contenedor { padding: 0 14px; }
    .titulo-pagina .btn { width: 100%; }
    .form-acciones .btn { flex: 1; }
    .acciones-celda { width: 100%; }
    .acciones-celda .btn { flex: 1; }
    .periodos .btn { flex: 1; }
}
