* {
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  margin: 0;
  background: #f5f5f5;
  padding-bottom: 70px;
}

.header {
  background: #2b2650;
  color: white;
  padding: 40px 20px;
  text-align: center;
  border-radius: 0 0 30px 30px;
  position: relative;
}

.header span {
  display: block;
  font-size: 14px;
  color: #6fb1e8;
}

.titulo-pantalla {
  text-align: center;
  font-size: 20px;
  margin: 0;
}

.back-arrow {
  position: absolute;
  left: 20px;
  top: 40px;
  color: white;
  font-size: 24px;
  text-decoration: none;
}

.container {
  padding: 30px 20px;
}

label {
  display: block;
  margin-top: 15px;
  font-weight: bold;
  font-size: 14px;
}

input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 12px;
  margin-top: 5px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 16px;
}

button {
  width: 100%;
  margin-top: 25px;
  padding: 14px;
  background: #4a90d9;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
}

#mensaje {
  margin-top: 15px;
  text-align: center;
  color: #d9534f;
}

.link-secundario {
  text-align: center;
  margin-top: 20px;
  color: #333;
}

.link-secundario a {
  color: #4a90d9;
  font-weight: bold;
  text-decoration: none;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 20px;
}

.checkbox-row input {
  width: auto;
  margin-top: 3px;
}

.checkbox-row label {
  font-weight: normal;
  font-size: 13px;
  margin-top: 0;
}

/* Mascotas (listado) */
.card-mascota {
  display: flex;
  align-items: center;
  background: white;
  padding: 15px;
  border-radius: 12px;
  margin-bottom: 12px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.mascota-icono {
  font-size: 28px;
  margin-right: 15px;
}

.mascota-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.mascota-info strong {
  font-size: 16px;
}

.mascota-info span {
  color: #777;
  font-size: 13px;
}

.badge {
  display: inline-block;
  background: #eaf2fb;
  color: #4a90d9;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  margin-top: 5px;
  width: fit-content;
}

.flecha {
  color: #ccc;
  font-size: 20px;
}

/* Credencial general (socio) */
.credencial {
  background: #2b2650;
  color: white;
  padding: 20px;
  border-radius: 12px;
  margin-top: 20px;
  text-align: center;
}

.credencial-top {
  display: flex;
  justify-content: center;
  font-size: 12px;
  color: #6fb1e8;
  margin-bottom: 10px;
}

.qr-box {
  background: white;
  color: #333;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: bold;
}

.qr-contenedor {
  background: white;
  padding: 10px;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  margin: 10px auto;
  width: fit-content;
}

/* Bottom nav */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  display: flex;
  justify-content: space-around;
  padding: 12px 0;
  border-top: 1px solid #eee;
  z-index: 10;
}

.bottom-nav a {
  text-decoration: none;
  color: #999;
  font-size: 13px;
}

.bottom-nav a.activo {
  color: #4a90d9;
  font-weight: bold;
}

/* Detalle de mascota */
.mascota-header-detalle {
  text-align: center;
  margin-bottom: 20px;
}

.mascota-avatar {
  font-size: 50px;
  background: white;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: -65px auto 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.mascota-header-detalle h2 {
  margin: 5px 0 0;
}

.mascota-header-detalle p {
  color: #777;
  margin: 3px 0 0;
}

.plan-mini {
  background: #eaf2fb;
  padding: 15px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}

.plan-mini strong {
  color: #2b2650;
}

.plan-mini span {
  font-size: 13px;
  color: #666;
}

.accesos-rapidos {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 20px;
}

.acceso {
  flex: 1;
  background: white;
  padding: 15px 5px;
  text-align: center;
  border-radius: 10px;
  font-size: 13px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

a.acceso {
  text-decoration: none;
  color: #333;
  display: block;
}

.datos-mascota {
  background: white;
  border-radius: 10px;
  overflow: hidden;
}

.dato-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 15px;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}

.dato-row span {
  color: #777;
}

/* QR individual por mascota */
.qr-mascota-card {
  background: white;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  margin-bottom: 20px;
}

.qr-mascota-card span {
  color: #999;
  font-size: 12px;
}

/* Historial clínico */
.mascota-chip {
  background: white;
  padding: 12px 15px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  margin-bottom: 15px;
}

.mascota-chip span {
  color: #777;
  font-size: 13px;
}

.filtros {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  overflow-x: auto;
}

.filtro {
  width: auto;
  margin-top: 0;
  padding: 8px 16px;
  background: white;
  color: #555;
  border: 1px solid #ddd;
  border-radius: 20px;
  font-size: 13px;
  font-weight: normal;
  white-space: nowrap;
}

.filtro.activo {
  background: #4a90d9;
  color: white;
  border-color: #4a90d9;
}

.evento-item {
  display: flex;
  gap: 12px;
  background: white;
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 12px;
}

.punto {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}

.punto-azul { background: #4a90d9; }
.punto-verde { background: #5cb85c; }
.punto-naranja { background: #f0ad4e; }
.punto-rojo { background: #d9534f; }
.punto-violeta { background: #9b59b6; }

.evento-info {
  display: flex;
  flex-direction: column;
}

.evento-info span {
  color: #777;
  font-size: 13px;
}

.evento-info p {
  margin: 5px 0 0;
  font-size: 14px;
  color: #444;
}

/* Turnos */
.turno-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: white;
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 12px;
}

.turno-fecha {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #eaf2fb;
  color: #4a90d9;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
}

.turno-fecha strong {
  font-size: 18px;
}

.turno-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.turno-info span {
  color: #777;
  font-size: 13px;
}

.btn-cancelar {
  width: auto;
  margin: 0;
  padding: 6px 12px;
  background: white;
  color: #d9534f;
  border: 1px solid #d9534f;
  font-size: 12px;
  font-weight: normal;
}

.turno-pasado-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  padding: 12px 15px;
  border-radius: 10px;
  margin-bottom: 10px;
  font-size: 14px;
}

.turno-pasado-item span {
  display: block;
  color: #777;
  font-size: 12px;
}

.estado-ok { color: #5cb85c; font-weight: bold; font-size: 13px !important; }
.estado-cancelado { color: #d9534f; font-weight: bold; font-size: 13px !important; }

/* Reservar turno */
.paso-indicador {
  color: #4a90d9;
  font-weight: bold;
  font-size: 13px;
  margin-bottom: 5px;
}

.barra-progreso {
  background: #ddd;
  height: 4px;
  border-radius: 2px;
  margin-bottom: 20px;
}

.barra-progreso-fill {
  background: #4a90d9;
  height: 100%;
  border-radius: 2px;
}

.opcion-mascota {
  display: flex;
  align-items: center;
  gap: 12px;
  background: white;
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 10px;
  border: 2px solid transparent;
  cursor: pointer;
}

.opcion-mascota span {
  font-size: 22px;
}

.opcion-mascota.seleccionado {
  border-color: #4a90d9;
}

.btn-opcion {
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  background: white;
  color: #333;
  border: 1px solid #ddd;
  font-weight: normal;
}

.btn-opcion.activo {
  background: #4a90d9;
  color: white;
  border-color: #4a90d9;
}

.dias-semana {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}

.dia-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
}

.dia-box.dia-activo {
  background: #4a90d9;
  color: white;
}

.pref-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  padding: 12px 15px;
  border-radius: 10px;
  margin-top: 10px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc;
  border-radius: 24px;
  transition: .3s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: .3s;
}

.switch input:checked + .slider {
  background-color: #5cb85c;
}

.switch input:checked + .slider:before {
  transform: translateX(20px);
}

/* Pagos */
.estado-cuenta {
  background: #2b2650;
  color: white;
  padding: 20px;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.label-claro {
  color: #6fb1e8;
  font-size: 12px;
}

.estado-al-dia {
  display: block;
  color: #5cb85c;
  font-size: 20px;
  margin: 5px 0 10px;
}

.estado-cuenta p {
  font-size: 12px;
  color: #ccc;
  margin: 0;
}

.monto-mensual {
  text-align: right;
}

.monto-mensual strong {
  font-size: 22px;
}

.monto-mensual span {
  font-size: 12px;
  color: #ccc;
}

.metodo-pago {
  background: white;
  padding: 15px;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  font-size: 14px;
}

.metodo-pago a {
  color: #4a90d9;
  text-decoration: none;
  font-weight: bold;
  font-size: 13px;
}

.pago-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 10px;
  cursor: pointer;
}

.pago-item span {
  font-size: 13px;
  color: #777;
}

.pago-estado {
  text-align: right;
}

.icono-doc {
  display: block;
  margin-top: 4px;
}

/* Factura */
.factura-header {
  background: white;
  padding: 15px;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.factura-header span {
  font-size: 13px;
  color: #777;
}

.badge-pagado {
  background: #eafaea;
  padding: 4px 10px;
  border-radius: 10px;
  font-size: 12px;
}

.tabla-detalle {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 20px;
}

.detalle-fila-header {
  display: flex;
  justify-content: space-between;
  background: #2b2650;
  color: white;
  padding: 10px 15px;
  font-size: 13px;
}

.detalle-fila {
  display: flex;
  justify-content: space-between;
  padding: 10px 15px;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}

.detalle-fila-sub {
  padding: 5px 15px;
  color: #999;
  font-size: 13px;
  border-bottom: 1px solid #eee;
}

.detalle-total {
  font-weight: bold;
  background: #f9f9f9;
}

.btn-secundario {
  background: white;
  color: #4a90d9;
  border: 1px solid #4a90d9;
}

/* Perfil */
.avatar-perfil {
  width: 70px;
  height: 70px;
  background: #4a90d9;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: bold;
  margin: 15px auto 0;
}

.container-perfil {
  text-align: center;
}

.nombre-perfil {
  margin-bottom: 3px;
}

.subtitulo-perfil {
  color: #777;
  margin-top: 0;
}

.badge-plan {
  display: inline-block;
  background: #eaf2fb;
  color: #4a90d9;
  padding: 5px 15px;
  border-radius: 15px;
  font-size: 13px;
  text-decoration: none;
  font-weight: bold;
}

.datos-mascota .dato-row {
  text-align: left;
}

.link-cerrar-sesion {
  text-align: center;
  color: #d9534f;
  font-weight: bold;
  margin-top: 20px;
  cursor: pointer;
}

/* Mi Plan */
.plan-actual-card {
  background: #2b2650;
  color: white;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  position: relative;
}

.plan-nombre {
  display: block;
  font-size: 22px;
  margin: 5px 0;
}

.plan-precio {
  color: #ccc;
  font-size: 14px;
}

.plan-actual-card p {
  font-size: 12px;
  color: #ccc;
  margin: 10px 0 0;
}

.btn-upgrade {
  position: absolute;
  right: 20px;
  top: 20px;
  width: auto;
  margin: 0;
  padding: 8px 16px;
  background: #6fb1e8;
  font-size: 13px;
}

.cobertura-item {
  display: flex;
  justify-content: space-between;
  background: white;
  padding: 12px 15px;
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 14px;
}

.cobertura-item strong {
  color: #4a90d9;
}

.lista-condiciones {
  padding-left: 20px;
  color: #555;
  font-size: 14px;
}

.lista-condiciones li {
  margin-bottom: 5px;
}
select {
  width: 100%;
  padding: 12px;
  margin-top: 5px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 16px;
  background: white;
}
.link-pdf {
  display: inline-block;
  margin-top: 8px;
  color: #4a90d9;
  font-size: 13px;
  text-decoration: none;
  font-weight: bold;
}
.fab-urgencia {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #e53935;
  color: white;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  z-index: 999;
  cursor: pointer;
}

.modal-urgencia.hidden { display: none; }
.modal-urgencia {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
}
.modal-content {
  position: relative;
  background: white;
  border-radius: 12px;
  padding: 24px;
  width: 90%;
  max-width: 360px;
}
.cerrar-x {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
}
.urgencia-tooltip{
    position: fixed;
    bottom: 18px;
    right: 18px;
    display: flex;
    align-items: center;
    gap: 12px;

    background: #fff;
    border: 2px solid #ff4d4f;
    border-radius: 18px;
    padding: 12px 16px;

    box-shadow: 0 8px 25px rgba(255,77,79,.25);

    cursor: pointer;
    z-index: 9999;

    max-width: 230px;

    animation: pulseUrgencia 1.8s infinite;
}

/* Flechita */

.urgencia-tooltip::after{
    content:'';
    position:absolute;
    bottom:-10px;
    right:35px;

    width:18px;
    height:18px;

    background:#fff;
    border-right:2px solid #ff4d4f;
    border-bottom:2px solid #ff4d4f;

    transform:rotate(45deg);
}

.urgencia-icono{
    font-size:34px;
    line-height:1;
    flex-shrink:0;
}

.urgencia-texto{
    display:flex;
    flex-direction:column;
    line-height:1.2;
}

.urgencia-texto strong{
    color:#e53935;
    font-size:22px;
}

.urgencia-texto span{
    color:#333;
    font-size:17px;
}

@keyframes pulseUrgencia{

    0%,100%{
        transform:scale(1);
        box-shadow:0 8px 25px rgba(255,77,79,.25);
    }

    50%{
        transform:scale(1.04);
        box-shadow:0 8px 35px rgba(255,77,79,.45);
    }
}

body{
background:#f5f7fb;
}

.stats-grid{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
gap:18px;
margin-top:20px;
}

.stat-card{

background:white;
border-radius:18px;
padding:22px;
box-shadow:0 6px 18px rgba(0,0,0,.08);

transition:.25s;

text-align:center;

}

.stat-card:hover{

transform:translateY(-4px);

box-shadow:0 12px 24px rgba(0,0,0,.15);

}

.stat-icon{

font-size:40px;
margin-bottom:10px;

}

.stat-number{

font-size:32px;
font-weight:bold;
color:#1565C0;

}

.stat-title{

margin-top:8px;
font-size:14px;
font-weight:600;
color:#666;

}

.chart-card{

background:white;

margin-top:25px;

padding:25px;

border-radius:18px;

box-shadow:0 6px 18px rgba(0,0,0,.08);

}

.chart-card h3{

margin:0 0 20px 0;

font-size:20px;

color:#0D47A1;

}

canvas{

max-height:320px;

}

@media(max-width:700px){

.stat-number{

font-size:26px;

}

.stat-icon{

font-size:32px;

}

}
.staff-menu{
    display:flex;
    margin:15px 0 20px;
    background:#fff;
    border-radius:12px;
    overflow:hidden;
    box-shadow:0 2px 8px rgba(0,0,0,.08);
}

.staff-tab{
    flex:1;
    text-align:center;
    padding:14px;
    text-decoration:none;
    color:#555;
    font-weight:600;
    transition:.2s;
}

.staff-tab:hover{
    background:#f3f7ff;
}

.staff-tab.activo{
    background:#1565C0;
    color:#fff;
}
#listaEspecialidades{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:10px;
    margin-top:10px;
}

#listaEspecialidades .btn-opcion{
    width:100%;
    min-height:58px;
    padding:12px 8px;
    display:flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    white-space:normal;
    line-height:1.25;
    font-size:15px;
    box-sizing:border-box;
}

/* El último botón ocupa las dos columnas */
#listaEspecialidades .btn-opcion:last-child{
    grid-column:1 / -1;
}
